1/*! For license information please see 21.9952df49.chunk.js.LICENSE.txt */ 2(this["webpackJsonpchef2.0"]=this["webpackJsonpchef2.0"]||[]).push([[21],{188:function(e,t,n){"use strict";n.d(t,"g",(function(){return a})),n.d(t,"m",(function(){return o})),n.d(t,"k",(function(){return l})),n.d(t,"l",(function(){return c})),n.d(t,"n",(function(){return d})),n.d(t,"i",(function(){return u})),n.d(t,"h",(function(){return h})),n.d(t,"a",(function(){return p})),n.d(t,"o",(function(){return g})),n.d(t,"j",(function(){return m})),n.d(t,"b",(function(){return f})),n.d(t,"c",(function(){return y})),n.d(t,"f",(function(){return b})),n.d(t,"d",(function(){return v})),n.d(t,"e",(function(){return _}));var i=n(14),r=n.n(i),s=n(63);function a(e,t,n){if(!t)return;const i=document.createElement("script");i.setAttribute("async",""),i.setAttribute("id",n),i.src=e,t.appendChild(i)}function o(e,t){return e.replace("${variant}",t||500).replace("${channel}","web")}function l(e,t){return parseInt(e/100*t)}function c(e,t,n){const i=r.a.duration(e,"seconds"),a=i.hours(),o=i.minutes(),l=i.days();return t?n?[{value:l.toString().padStart(2,"0"),label:s.a.t("Giorni")},{value:a.toString().padStart(2,"0"),label:s.a.t("Ore")},{value:i.minutes().toString().padStart(2,"0"),label:s.a.t("Minuti")},{value:i.seconds().toString().padStart(2,"0"),label:s.a.t("Secondi")}]:l.toString().padStart(2,"0")+s.a.t("g")+" : "+a.toString().padStart(2,"0")+s.a.t("h")+" : "+i.minutes().toString().padStart(2,"0")+s.a.t("m")+" : "+i.seconds().toString().padStart(2,"0")+s.a.t("s"):l||a?(24*l+a).toString().padStart(2,"0")+":"+i.minutes().toString().padStart(2,"0")+" "+s.a.t("ore"):o.toString().padStart(2,"0")+" min"}function d(e,t){const n=[];for(let i=0;i<e.length;i+=t){const r=e.slice(i,i+t);n.push(r)}return n}function u(e){for(var t=0,n=parseInt(e,10)||0;n>=1024&&++t;)n/=1024;return n.toFixed(n<10&&t>0?1:0)+["bytes","kb","mb","gb"][t]}function h(e){for(var t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",i=0;i<e;i++)t+=n.charAt(Math.floor(62*Math.random()));return t}function p(e){return{id:"simple-tab-".concat(e),"aria-controls":"simple-tabpanel-".concat(e)}}function g(e){let t=[...e.trainers_list];return(e.trainers_list.length>1?e.trainers_list.reduce(((e,n,i)=>{const r=t.findIndex((e=>e.last_name===n.last_name&&e.first_name!==n.first_name));if(r>-1){const i=n.first_name+" "+s.a.t("e")+" "+t[r].first_name+" "+n.last_name;t=t.filter((e=>e.last_name!==n.last_name)),e.push(i)}else t.find((e=>e.last_name===n.last_name))&&e.push(n.last_name);return e}),[]):[e.trainers_list.length?e.trainers_list[0].first_name+" "+e.trainers_list[0].last_name:""]).join(", ")}function m(e,t){return e.reduce(((e,t)=>(t.items.forEach((t=>{"d"===t.type?"p"!==t.amount_type?(e.total-=t.amount,e.annuaryTotal-=l(e.annuaryTotal,b(e.subtotal,t.amount)+100)):(e.total-=l(e.total,t.amount),e.annuaryTotal-=l(e.annuaryTotal,t.amount)):(e.total+=t.amount,e.subtotal+=t.amount)})),e)),{total:t.amount,subtotal:t.amount,annuaryTotal:t.amount_yearbook})}function f(e,t){for(var n=[],i=0;i<e.length;i+=t)n.push(e.slice(i,i+t));return n}function y(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const t=String(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(".").map((e=>Number(e)||0)),n=String(e).split(".").map((e=>Number(e)||0)),i=Math.max(t.length,n.length);for(let r=0;r<i;r++){const e=t[r]||0,i=n[r]||0;if(e>i)return 1;if(e<i)return-1}return 0}function b(e,t){return 0===e?t>0?1/0:t<0?-1/0:0:(t-e)/e*100}function v(e){if(null===e||void 0===e||Number.isNaN(Number(e)))return null;const t=Number(e);return"\u20ac ".concat((t/100).toFixed(2).replace(".",","))}function _(e){return e&&null!==e.value&&void 0!==e.value?e.unit?"".concat(e.value," ").concat(e.unit):"".concat(e.value):"-"}},191:function(e,t,n){"use strict";n.d(t,"a",(function(){return h})),n.d(t,"b",(function(){return g})),n.d(t,"c",(function(){return m}));var i=n(0),r=n.n(i),s=n(5),a=n(79),o=n(645),l=n(717),c=n(722),d=n(1);const u=Object(o.a)(c.a)((e=>{let{theme:t}=e;return{textTransform:"none",fontWeight:"bold ",borderRadius:"14px",padding:"10px 24px","&.Mu
2iButton-textPrimary":{color:"#fff",backgroundColor:"#E90133","&.MuiLoadingButton-loading":{color:"transparent"},"& .MuiLoadingButton-loadingIndicator":{color:"#fff"},"&.Mui-disabled":{backgroundColor:"#bcbcbc",opacity:1,color:"#dedede"}},"&.MuiButton-textSecondary":{backgroundColor:"#F5F5F5",color:"#26292D","&.MuiLoadingButton-loading":{color:"transparent"},"& .MuiLoadingButton-loadingIndicator":{color:"#26292D"}},"&:hover":{textDecoration:"none"},"&.Mui-disabled":{opacity:.7},"&.MuiButton-sizeSmall":{padding:"4px 10px",borderRadius:"10px"}}})),h=r.a.forwardRef((function(e,t){return Object(d.jsx)(u,{...e,ref:t})})),p=Object(o.a)(l.a)((e=>{let{theme:t}=e;return{backgroundColor:"#41474e",fontSize:"2rem",padding:"21px","&:hover":{backgroundColor:"#41474e"},"&.Mui-disabled":{backgroundColor:"#41474e",color:"inherit",opacity:.7},"&.MuiIconButton-sizeSmall":{padding:"7px",fontSize:"1.5rem"}}})),g=r.a.forwardRef((function(e,t){return Object(d.jsx)(p,{...e,ref:t})}));function m(e){const{children:t,socialCallBack:n,provider:i,setLoading:o,...l}=e,{i18n:c}=Object(a.a)(),u=Object(s.i)(),p=(r.a.useRef(null),()=>{if(o(!0),"fb"===i&&window.FB.login((e=>{e.authResponse?n(e.authResponse.accessToken):o(!1)}),{scope:"email,public_profile",return_scopes:!0}),"google"===i){localStorage.setItem("return_url",u.pathname+u.search);const e="https://accounts.google.com/o/oauth2/v2/auth?response_type=id_token&client_id=".concat("883622940720-obgi8vlav7j5slpdn2nabt5ah2g5l0gf.apps.googleusercontent.com","&redirect_uri=").concat("https://www.academia.tv/callback/google").concat(u.state?"&state="+encodeURIComponent(JSON.stringify({to:u.state.from.pathname||u.state.from})):"","&scope=openid%20email%20profile&nonce=").concat(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:16;const t=new Uint8Array(e);return window.crypto.getRandomValues(t),Array.from(t,(e=>e.toString(16).padStart(2,"0"))).join("")}());window.location.href=e}"apple"===i&&window.AppleID.auth.signIn()});return r.a.useEffect((()=>{if("apple"===i)return window.AppleID.auth.init({clientId:"com.chefincamicia.academia.web",scope:"name email",state:"IT",redirectURI:"https://www.academia.tv/login/apple",usePopup:!0}),document.addEventListener("AppleIDSignInOnSuccess",(e=>{n(e.detail.authorization.id_token)})),document.addEventListener("AppleIDSignInOnFailure",(e=>{o(!1)})),()=>{document.removeEventListener("AppleIDSignInOnSuccess",(e=>{n(e.detail.authorization.id_token)})),document.removeEventListener("AppleIDSignInOnFailure",(e=>{o(!1)}))}}),[]),r.a.useEffect((()=>{if("google"===i&&u.hash){const e=new URLSearchParams(u.hash.substring(1));if(e.has("id_token")){o(!0);const t=e.get("id_token");n(t)}}}),[u.hash]),Object(d.jsx)(h,{onClick:()=>p(),...l,children:t})}},192:function(e,t,n){"use strict";var i=n(0),r=n.n(i),s=n(56),a=n(645),o=n(188),l=n(1);const c=Object(a.a)("img")((e=>{let{theme:t}=e;return{}}));t.a=e=>{const{src:t,useSet:n,...i}=e,a=Object(s.a)(),d=r.a.useRef(),[u,h]=r.a.useState();return r.a.useLayoutEffect((()=>{let e;n&&(e={srcSet:["".concat(Object(o.m)(t,2e3)," 2000w"),"".concat(Object(o.m)(t,1200)," 1200w"),"".concat(Object(o.m)(t,800)," 800w"),"".concat(Object(o.m)(t,600)," 600w"),"".concat(Object(o.m)(t,300)," 300w"),"".concat(Object(o.m)(t,100)," 100w")].join(", "),...!!n.sizes&&{sizes:n.sizes.reduce(((e,t)=>(1===t.length?e.push(t[0]):Array.isArray(t[1])?e.push("".concat(a.breakpoints[t[0]](t[1][0],t[1][1]).replace("@media ","")," ").concat(t[2])):e.push("".concat(a.breakpoints[t[0]](t[1]).replace("@media ","")," ").concat(t[2])),e)),[]).join(", ")}}),h({loading:"lazy",src:Object(o.m)(t,d.current.parentNode.clientWidth),...e})}),[t]),Object(l.jsx)(c,{ref:d,...i,...u})}},193:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return Vr}));var i=n(194),r=n.n(i),s=n(237),a=n.n(s),o=n(292),l=n.n(o),c=n(297),d=n.n(c),u=n(83),h=n.n(u),p=n(301),g=n(324),m=n(306),f=n(307),y=n(197),b=n(323),v=n(314),_=n.n(v),T=n(253),x=n(322),S=n(316),A="8.23.4";const w={},j=function(e,t){return w[e]=w[e]||[],t&&(w[e]=w[e].concat(t)),w[e]},k=function(e,t){const n=j(e).indexOf(t);return!(n<=-1)&&(w[e]=w[e].slice(),w[e].splice(n,1),!0)},C={prefixed:!0},O=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"]],E=O[0];let I;for(let t=0;t<O.length;t++)if(O[t][1]in a.a){I=O[t];break}if(I){for(let e=0;e<I.length;e++)C[E[e]]=I[e];C.prefixed=I[0]!==E[0]}let P=[];const R=function e(t){let n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:":",s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",a="info";function o(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];n("log",a,t)}return n=((e,t,n)=>(i,s,a)=>{const o=t.levels[s],l=new RegExp("^(".concat(o,")$"));let c=e;
2if("log"!==i&&a.unshift(i.toUpperCase()+":"),n&&(c="%c".concat(e),a.unshift(n)),a.unshift(c+":"),P){P.push([].concat(a));const e=P.length-1e3;P.splice(0,e>0?e:0)}if(!r.a.console)return;let d=r.a.console[i];d||"debug"!==i||(d=r.a.console.info||r.a.console.log),d&&o&&l.test(i)&&d[Array.isArray(a)?"apply":"call"](r.a.console,a)})(t,o,s),o.createLogger=(n,r,a)=>{const o=void 0!==r?r:i,l=void 0!==a?a:s;return e("".concat(t," ").concat(o," ").concat(n),o,l)},o.createNewLogger=(t,n,i)=>e(t,n,i),o.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:a},o.level=e=>{if("string"===typeof e){if(!o.levels.hasOwnProperty(e))throw new Error('"'.concat(e,'" in not a valid log level'));a=e}return a},o.history=()=>P?[].concat(P):[],o.history.filter=e=>(P||[]).filter((t=>new RegExp(".*".concat(e,".*")).test(t[0]))),o.history.clear=()=>{P&&(P.length=0)},o.history.disable=()=>{null!==P&&(P.length=0,P=null)},o.history.enable=()=>{null===P&&(P=[])},o.error=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return n("error",a,t)},o.warn=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return n("warn",a,t)},o.debug=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return n("debug",a,t)},o}("VIDEOJS"),D=R.createLogger,L=Object.prototype.toString,M=function(e){return U(e)?Object.keys(e):[]};function N(e,t){M(e).forEach((n=>t(e[n],n)))}function B(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return M(e).reduce(((n,i)=>t(n,e[i],i)),n)}function U(e){return!!e&&"object"===typeof e}function F(e){return U(e)&&"[object Object]"===L.call(e)&&e.constructor===Object}function q(){const e={};for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return n.forEach((t=>{t&&N(t,((t,n)=>{F(t)?(F(e[n])||(e[n]={}),e[n]=q(e[n],t)):e[n]=t}))})),e}function z(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=[];for(const n in e)if(e.hasOwnProperty(n)){const i=e[n];t.push(i)}return t}function V(e,t,n){let i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];const r=n=>Object.defineProperty(e,t,{value:n,enumerable:!0,writable:!0}),s={configurable:!0,enumerable:!0,get(){const e=n();return r(e),e}};return i&&(s.set=r),Object.defineProperty(e,t,s)}var H=Object.freeze({__proto__:null,each:N,reduce:B,isObject:U,isPlain:F,merge:q,values:z,defineLazyProperty:V});let W,G=!1,X=null,Y=!1,Q=!1,K=!1,Z=!1,J=!1,$=null,ee=null;const te=Boolean(r.a.cast&&r.a.cast.framework&&r.a.cast.framework.CastReceiverContext);let ne=null,ie=!1,re=!1,se=!1,ae=!1,oe=!1,le=!1,ce=!1;const de=Boolean(fe()&&("ontouchstart"in r.a||r.a.navigator.maxTouchPoints||r.a.DocumentTouch&&r.a.document instanceof r.a.DocumentTouch)),ue=r.a.navigator&&r.a.navigator.userAgentData;if(ue&&ue.platform&&ue.brands&&(Y="Android"===ue.platform,K=Boolean(ue.brands.find((e=>"Microsoft Edge"===e.brand))),Z=Boolean(ue.brands.find((e=>"Chromium"===e.brand))),J=!K&&Z,$=ee=(ue.brands.find((e=>"Chromium"===e.brand))||{}).version||null,re="Windows"===ue.platform),!Z){const e=r.a.navigator&&r.a.navigator.userAgent||"";G=/iPod/i.test(e),X=function(){const t=e.match(/OS (\d+)_/i);return t&&t[1]?t[1]:null}(),Y=/Android/i.test(e),W=function(){const t=e.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!t)return null;const n=t[1]&&parseFloat(t[1]),i=t[2]&&parseFloat(t[2]);return n&&i?parseFloat(t[1]+"."+t[2]):n||null}(),Q=/Firefox/i.test(e),K=/Edg/i.test(e),Z=/Chrome/i.test(e)||/CriOS/i.test(e),J=!K&&Z,$=ee=function(){const t=e.match(/(Chrome|CriOS)\/(\d+)/);return t&&t[2]?parseFloat(t[2]):null}(),ne=function(){const t=/MSIE\s(\d+)\.\d/.exec(e);let n=t&&parseFloat(t[1]);return!n&&/Trident\/7.0/i.test(e)&&/rv:11.0/.test(e)&&(n=11),n}(),oe=/Tizen/i.test(e),le=/Web0S/i.test(e),ce=oe||le,ie=/Safari/i.test(e)&&!J&&!Y&&!K&&!ce,re=/Windows/i.test(e),se=/iPad/i.test(e)||ie&&de&&!/iPhone/i.test(e),ae=/iPhone/i.test(e)&&!se}const he=ae||se||G,pe=(ie||he)&&!J;var ge=Object.freeze({__proto__:null,get IS_IPOD(){return G},get IOS_VERSION(){return X},get IS_ANDROID(){return Y},get ANDROID_VERSION(){return W},get IS_FIREFOX(){return Q},get IS_EDGE(){return K},get IS_CHROMIUM(){return Z},get IS_CHROME(){return J},get CHROMIUM_VERSION(){return $},get CHROME_VERSION(){return ee},IS_CHROMECAST_RECEIVER:te,get IE_VERSION(){return ne},get IS_SAFARI(){return ie},get IS_WINDOWS(){return re},get IS_IPAD(){return se},get IS_IPHONE(){return ae},get IS_TIZEN(){return oe},get IS_WEBOS(){return le},get IS_SMART_TV(){return ce},TOUCH_ENABLED:de,IS_IOS:he,IS_ANY_SAFARI:pe});function me(e){return"string"===typeof e&&Boolean(e.trim())}function fe(){return a.a===r.a.document}function ye(e){return U(e)&&1===e.nodeType}function be(){try{return r.a.parent!==r.a.self}catch(e){return!0}}function ve(e){return function(t,n){if(!me(t))return a.a[e](null);me(n)&&(n=a.a.querySelector(n));const i=ye(n)?n:a.a;return i[e]&&i[e](t)}}function _e(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;const r=a.a.createElement(e);return Object.getOwnPropertyNames(t).forEach((function(e){const n=t[e];"textContent"===e?Te(r,n):r[e]===n&&"tabIndex"!==e||(r[e]=n)}
2)),Object.getOwnPropertyNames(n).forEach((function(e){r.setAttribute(e,n[e])})),i&&Fe(r,i),r}function Te(e,t){return"undefined"===typeof e.textContent?e.innerText=t:e.textContent=t,e}function xe(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function Se(e,t){return function(e){if(e.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}(t),e.classList.contains(t)}function Ae(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return e.classList.add(...n.reduce(((e,t)=>e.concat(t.split(/\s+/))),[])),e}function we(e){if(!e)return R.warn("removeClass was called with an element that doesn't exist"),null;for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return e.classList.remove(...n.reduce(((e,t)=>e.concat(t.split(/\s+/))),[])),e}function je(e,t,n){return"function"===typeof n&&(n=n(e,t)),"boolean"!==typeof n&&(n=void 0),t.split(/\s+/).forEach((t=>e.classList.toggle(t,n))),e}function ke(e,t){Object.getOwnPropertyNames(t).forEach((function(n){const i=t[n];null===i||"undefined"===typeof i||!1===i?e.removeAttribute(n):e.setAttribute(n,!0===i?"":i)}))}function Ce(e){const t={},n=["autoplay","controls","playsinline","loop","muted","default","defaultMuted"];if(e&&e.attributes&&e.attributes.length>0){const i=e.attributes;for(let e=i.length-1;e>=0;e--){const r=i[e].name;let s=i[e].value;n.includes(r)&&(s=null!==s),t[r]=s}}return t}function Oe(e,t){return e.getAttribute(t)}function Ee(e,t,n){e.setAttribute(t,n)}function Ie(e,t){e.removeAttribute(t)}function Pe(){a.a.body.focus(),a.a.onselectstart=function(){return!1}}function Re(){a.a.onselectstart=function(){return!0}}function De(e){if(e&&e.getBoundingClientRect&&e.parentNode){const t=e.getBoundingClientRect(),n={};return["bottom","height","left","right","top","width"].forEach((e=>{void 0!==t[e]&&(n[e]=t[e])})),n.height||(n.height=parseFloat(We(e,"height"))),n.width||(n.width=parseFloat(We(e,"width"))),n}}function Le(e){if(!e||e&&!e.offsetParent)return{left:0,top:0,width:0,height:0};const t=e.offsetWidth,n=e.offsetHeight;let i=0,r=0;for(;e.offsetParent&&e!==a.a[C.fullscreenElement];)i+=e.offsetLeft,r+=e.offsetTop,e=e.offsetParent;return{left:i,top:r,width:t,height:n}}function Me(e,t){const n={x:0,y:0};if(he){let t=e;for(;t&&"html"!==t.nodeName.toLowerCase();){const e=We(t,"transform");
2if(/^matrix/.test(e)){const t=e.slice(7,-1).split(/,\s/).map(Number);n.x+=t[4],n.y+=t[5]}else if(/^matrix3d/.test(e)){const t=e.slice(9,-1).split(/,\s/).map(Number);n.x+=t[12],n.y+=t[13]}if(t.assignedSlot&&t.assignedSlot.parentElement&&r.a.WebKitCSSMatrix){const e=r.a.getComputedStyle(t.assignedSlot.parentElement).transform,i=new r.a.WebKitCSSMatrix(e);n.x+=i.m41,n.y+=i.m42}t=t.parentNode||t.host}}const i={},s=Le(t.target),a=Le(e),o=a.width,l=a.height;let c=t.offsetY-(a.top-s.top),d=t.offsetX-(a.left-s.left);return t.changedTouches&&(d=t.changedTouches[0].pageX-a.left,c=t.changedTouches[0].pageY+a.top,he&&(d-=n.x,c-=n.y)),i.y=1-Math.max(0,Math.min(1,c/l)),i.x=Math.max(0,Math.min(1,d/o)),i}function Ne(e){return U(e)&&3===e.nodeType}function Be(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function Ue(e){return"function"===typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map((e=>("function"===typeof e&&(e=e()),ye(e)||Ne(e)?e:"string"===typeof e&&/\S/.test(e)?a.a.createTextNode(e):void 0))).filter((e=>e))}function Fe(e,t){return Ue(t).forEach((t=>e.appendChild(t))),e}function qe(e,t){return Fe(Be(e),t)}function ze(e){return void 0===e.button&&void 0===e.buttons||(0===e.button&&void 0===e.buttons||("mouseup"===e.type&&0===e.button&&0===e.buttons||("mousedown"===e.type&&0===e.button&&0===e.buttons||0===e.button&&1===e.buttons)))}const Ve=ve("querySelector"),He=ve("querySelectorAll");function We(e,t){if(!e||!t)return"";if("function"===typeof r.a.getComputedStyle){let i;try{i=r.a.getComputedStyle(e)}catch(n){return""}return i?i.getPropertyValue(t)||i[t]:""}return""}function Ge(e){[...a.a.styleSheets].forEach((t=>{try{const n=[...t.cssRules].map((e=>e.cssText)).join(""),i=a.a.createElement("style");i.textContent=n,e.document.head.appendChild(i)}catch(n){const i=a.a.createElement("link");i.rel="stylesheet",i.type=t.type,i.media=t.media.mediaText,i.href=t.href,e.document.head.appendChild(i)}}))}var Xe=Object.freeze({__proto__:null,isReal:fe,isEl:ye,isInFrame:be,createEl:_e,textContent:Te,prependTo:xe,hasClass:Se,addClass:Ae,removeClass:we,toggleClass:je,setAttributes:ke,getAttributes:Ce,getAttribute:Oe,setAttribute:Ee,removeAttribute:Ie,blockTextSelection:Pe,unblockTextSelection:Re,getBoundingClientRect:De,findPosition:Le,getPointerPosition:Me,isTextNode:Ne,emptyEl:Be,normalizeContent:Ue,appendContent:Fe,insertContent:qe,isSingleLeftClick:ze,$:Ve,$$:He,computedStyle:We,copyStyleSheetsToWindow:Ge});let Ye,Qe=!1;const Ke=function(){if(!1===Ye.options.autoSetup)return;const e=Array.prototype.slice.call(a.a.getElementsByTagName("video")),t=Array.prototype.slice.call(a.a.getElementsByTagName("audio")),n=Array.prototype.slice.call(a.a.getElementsByTagName("video-js")),i=e.concat(t,n);if(i&&i.length>0)for(let r=0,s=i.length;r<s;r++){const e=i[r];if(!e||!e.getAttribute){Ze(1);break}if(void 0===e.player){null!==e.getAttribute("data-setup")&&Ye(e)}}else Qe||Ze(1)};function Ze(e,t){fe()&&(t&&(Ye=t),r.a.setTimeout(Ke,e))}function Je(){Qe=!0,r.a.removeEventListener("load",Je)}fe()&&("complete"===a.a.readyState?Je():r.a.addEventListener("load",Je));const $e=function(e){const t=a.a.createElement("style");return t.className=e,t},et=function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t};var tt=new WeakMap;let nt,it=3;function rt(){return it++}function st(e,t){if(!tt.has(e))return;const n=tt.get(e);0===n.handlers[t].length&&(delete n.handlers[t],e.removeEventListener?e.removeEventListener(t,n.dispatcher,!1):e.detachEvent&&e.detachEvent("on"+t,n.dispatcher)),Object.getOwnPropertyNames(n.handlers).length<=0&&(delete n.handlers,delete n.dispatcher,delete n.disabled),0===Object.getOwnPropertyNames(n).length&&tt.delete(e)}function at(e,t,n,i){n.forEach((function(n){e(t,n,i)}))}function ot(e){if(e.fixed_)return e;function t(){return!0}function n(){return!1}if(!e||!e.isPropagationStopped||!e.isImmediatePropagationStopped){const i=e||r.a.event;e={};const s=["layerX","layerY","keyLocation","path","webkitMovementX","webkitMovementY","mozPressure","mozInputSource"];for(const t in i)s.includes(t)||"returnValue"===t&&i.preventDefault||(e[t]=i[t]);if(e.target||(e.target=e.srcElement||a.a),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){i.preventDefault&&i.preventDefault(),e.returnValue=!1,i.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){i.stopPropagation&&i.stopPropagation(),e.cancelBubble=!0,i.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=n,e.stopImmediatePropagation=function(){i.stopImmediatePropagation&&i.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=n,null!==e.clientX&&void 0!==e.clientX){const t=a.a.documentElement,n=a.a.body;e.pageX=e.clientX+(t&&t.scrollLeft||n&&n.scrollLeft||0)-(t&&t.clientLeft||n&&n.clientLeft||0),e.pageY=e.clientY+(t&&t.scrollTop||n&&n.scrollTop||0)-(t&&t.clientTop||n&&n.clientTop||0)}e.which=e.charCode||e.keyCode,null!==e.button&&void 0!==e.button&&(e.button=1&e.button?0:4&e.button?1:2&e.button?2:0)}return e.fixed_=!0,e}const lt=function(){if("boolean"!==typeof nt){nt=!1;try{const e=Object.defineProperty({},"passive",{get(){nt=!0}});r.a.addEventListener("test",null,e),r.a.removeEventListener("test",null,e)}catch(e){}}return nt},ct=["touchstart","touchmove"];function dt(e,t,n){if(Array.isArray(t))return at(dt,e,t,n);tt.has(e)||tt.set(e,{});const i=tt.get(e);if(i.handlers||(i.handlers={}),i.handlers[t]||(i.handlers[t]=[]),n.guid||(n.guid=rt()),i.handlers[t].push(n),i.dispatcher||(i.disabled=!1,i.dispatcher=function(t,n){if(i.disabled)return;t=ot(t);const r=i.handlers[t.type];if(r){const i=r.slice(0);for(let r=0,a=i.length;r<a&&!t.isImmediatePropagationStopped();r++)try{i[r].call(e,t,n)}catch(s){R.error(s)}}}),1===i.handlers[t].length)if(e.addEventListener){let n=!1;lt()&&ct.indexOf(t)>-1&&(n={passive:!0}),e.addEventListener(t,i.dispatcher,n)}else e.attachEvent&&e.attachEvent("on"+t,i.dispatcher)}function ut(e,t,n){if(!tt.has(e))return;const i=tt.get(e);if(!i.handlers)return;if(Array.isArray(t))return at(ut,e,t,n);const r=function(e,t){i.handlers[t]=[],st(e,t)};if(void 0===t){for(const t in i.handlers)Object.prototype.hasOwnProperty.call(i.handlers||{},t)&&r(e,t);return}const s=i.handlers[t];if(s)if(n){if(n.guid)for(let e=0;e<s.length;e++)s[e].guid===n.guid&&s.splice(e--,1);st(e,t)}else r(e,t)}function ht(e,t,n){const i=tt.has(e)?tt.get(e):{},r=e.parentNode||e.ownerDocument;if("string"===typeof t?t={type:t,target:e}:t.target||(t.target=e),t=ot(t),i.dispatcher&&i.dispatcher.call(e,t,n),r&&!t.isPropagationStopped()&&!0===t.bubbles)ht.call(null,r,t,n);else if(!r&&!t.defaultPrevented&&t.target&&t.target[t.type]){tt.has(t.target)||tt.set(t.target,{});const e=tt.get(t.target);t.target[t.type]&&(e.disabled=!0,"function"===typeof t.target[t.type]&&t.target[t.type](),e.disabled=!1)}return!t.defaultPrevented}function pt(e,t,n){if(Array.isArray(t))return at(pt,e,t,n);const i=function(){ut(e,t,i),n.apply(this,arguments)};i.guid=n.guid=n.guid||rt(),dt(e,t,i)}function gt(e,t,n){const i=function(){ut(e,t,i),n.apply(this,arguments)};i.guid=n.guid=n.guid||rt(),dt(e,t,i)}var mt=Object.freeze({__proto__:null,fixEvent:ot,on:dt,off:ut,trigger:ht,one:pt,any:gt});
2const ft=30,yt=function(e,t,n){t.guid||(t.guid=rt());const i=t.bind(e);return i.guid=n?n+"_"+t.guid:t.guid,i},bt=function(e,t){let n=r.a.performance.now();return function(){const i=r.a.performance.now();i-n>=t&&(e(...arguments),n=i)}},vt=function(e,t,n){let i,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:r.a;const a=function(){const r=this,a=arguments;let o=function(){i=null,o=null,n||e.apply(r,a)};!i&&n&&e.apply(r,a),s.clearTimeout(i),i=s.setTimeout(o,t)};return a.cancel=()=>{s.clearTimeout(i),i=null},a};var _t=Object.freeze({__proto__:null,UPDATE_REFRESH_INTERVAL:ft,bind_:yt,throttle:bt,debounce:vt});let Tt;class xt{on(e,t){const n=this.addEventListener;this.addEventListener=()=>{},dt(this,e,t),this.addEventListener=n}off(e,t){ut(this,e,t)}one(e,t){const n=this.addEventListener;this.addEventListener=()=>{},pt(this,e,t),this.addEventListener=n}any(e,t){const n=this.addEventListener;this.addEventListener=()=>{},gt(this,e,t),this.addEventListener=n}trigger(e){const t=e.type||e;"string"===typeof e&&(e={type:t}),e=ot(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),ht(this,e)}queueTrigger(e){Tt||(Tt=new Map);const t=e.type||e;let n=Tt.get(this);n||(n=new Map,Tt.set(this,n));const i=n.get(t);n.delete(t),r.a.clearTimeout(i);const s=r.a.setTimeout((()=>{n.delete(t),0===n.size&&(n=null,Tt.delete(this)),this.trigger(e)}),0);n.set(t,s)}}xt.prototype.allowedEvents_={},xt.prototype.addEventListener=xt.prototype.on,xt.prototype.removeEventListener=xt.prototype.off,xt.prototype.dispatchEvent=xt.prototype.trigger;const St=e=>"function"===typeof e.name?e.name():"string"===typeof e.name?e.name:e.name_?e.name_:e.constructor&&e.constructor.name?e.constructor.name:typeof e,At=e=>e instanceof xt||!!e.eventBusEl_&&["on","one","off","trigger"].every((t=>"function"===typeof e[t])),wt=e=>"string"===typeof e&&/\S/.test(e)||Array.isArray(e)&&!!e.length,jt=(e,t,n)=>{if(!e||!e.nodeName&&!At(e))throw new Error("Invalid target for ".concat(St(t),"#").concat(n,"; must be a DOM node or evented object."))},kt=(e,t,n)=>{if(!wt(e))throw new Error("Invalid event type for ".concat(St(t),"#").concat(n,"; must be a non-empty string or array."))},Ct=(e,t,n)=>{if("function"!==typeof e)throw new Error("Invalid listener for ".concat(St(t),"#").concat(n,"; must be a function."))},Ot=(e,t,n)=>{const i=t.length<3||t[0]===e||t[0]===e.eventBusEl_;let r,s,a;return i?(r=e.eventBusEl_,t.length>=3&&t.shift(),[s,a]=t):(r=t[0],s=t[1],a=t[2]),jt(r,e,n),kt(s,e,n),Ct(a,e,n),a=yt(e,a),{isTargetingSelf:i,target:r,type:s,listener:a}},Et=(e,t,n,i)=>{jt(e,e,t),e.nodeName?mt[t](e,n,i):e[t](n,i)},It={on(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const{isTargetingSelf:i,target:r,type:s,listener:a}=Ot(this,t,"on");if(Et(r,"on",s,a),!i){const e=()=>this.off(r,s,a);e.guid=a.guid;const t=()=>this.off("dispose",e);t.guid=a.guid,Et(this,"on","dispose",e),Et(r,"on","dispose",t)}},one(){for(var e=this,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];const{isTargetingSelf:r,target:s,type:a,listener:o}=Ot(this,n,"one");if(r)Et(s,"one",a,o);else{const t=function(){e.off(s,a,t);for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];o.apply(null,i)};t.guid=o.guid,Et(s,"one",a,t)}},any(){for(var e=this,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];const{isTargetingSelf:r,target:s,type:a,listener:o}=Ot(this,n,"any");if(r)Et(s,"any",a,o);else{const t=function(){e.off(s,a,t);for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];o.apply(null,i)};t.guid=o.guid,Et(s,"any",a,t)}},off(e,t,n){if(!e||wt(e))ut(this.eventBusEl_,e,t);else{const i=e,r=t;jt(i,this,"off"),kt(r,this,"off"),Ct(n,this,"off"),n=yt(this,n),this.off("dispose",n),i.nodeName?(ut(i,r,n),ut(i,"dispose",n)):At(i)&&(i.off(r,n),i.off("dispose",n))}},trigger(e,t){jt(this.eventBusEl_,this,"trigger");const n=e&&"string"!==typeof e?e.type:e;if(!wt(n))throw new Error("Invalid event type for ".concat(St(this),"#trigger; ")+"must be a non-empty string or object with a type key that has a non-empty value.");return ht(this.eventBusEl_,e,t)}};function Pt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{eventBusKey:n}=t;if(n){if(!e[n].nodeName)throw new Error('The eventBusKey "'.concat(n,'" does not refer to an element.'));e.eventBusEl_=e[n]}else e.eventBusEl_=_e("span",{className:"vjs-event-bus"});return Object.assign(e,It),e.eventedCallbacks&&e.eventedCallbacks.forEach((e=>{e()})),e.on("dispose",(()=>{e.off(),[e,e.el_,e.eventBusEl_].forEach((function(e){e&&tt.has(e)&&tt.delete(e)})),r.a.setTimeout((()=>{e.eventBusEl_=null}),0)})),e}const Rt={state:{},setState(e){let t;return"function"===typeof e&&(e=e()),N(e,((e,n)=>{this.state[n]!==e&&(t=t||{},t[n]={from:this.state[n],to:e}),this.state[n]=e})),t&&At(this)&&this.trigger({changes:t,type:"statechanged"}),t}};function Dt(e,t){return Object.assign(e,Rt),e.state=Object.assign({},e.state,t),"function"===typeof e.handleStateChanged&&At(e)&&e.on("statechanged",e.handleStateChanged),e}const Lt=function(e){return"string"!==typeof e?e:e.replace(/./,(e=>e.toLowerCase()))},Mt=function(e){return"string"!==typeof e?e:e.replace(/./,(e=>e.toUpperCase()))},Nt=function(e,t){return Mt(e)===Mt(t)};var Bt=Object.freeze({__proto__:null,toLowerCase:Lt,toTitleCase:Mt,titleCaseEquals:Nt});class Ut{constructor(e,t,n){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=q({},this.options_),t=this.options_=q(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){const t=e&&e.id&&e.id()||"no_player";this.id_="".concat(t,"_component_").concat(rt())}this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),t.className&&this.el_&&t.className.split(" ").forEach((e=>this.addClass(e))),["on","off","one","any","trigger"].forEach((e=>{this[e]=void 0})),!1!==t.evented&&(Pt(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),Dt(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Set,this.setIntervalIds_=new Set,this.rafIds_=new Set,this.namedRafs_=new Map,this.clearingTimersOnDispose_=!1,!1!==t.initChildren&&this.initChildren(),this.ready(n),!1!==t.reportTouchActivity&&this.enableTouchActivity()}dispose(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:"dispose",bubbles:!1}),this.isDisposed_=!0,this.children_)for(let e=this.children_.length-1;e>=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(e.restoreEl?this.el_.parentNode.replaceChild(e.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null}}isDisposed(){return Boolean(this.isDisposed_)}player(){return this.player_}options(e){return e?(this.options_=q(this.options_,e),this.options_):this.options_}el(){return this.el_}createEl(e,t,n){return _e(e,t,n)}localize(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;const i=this.player_.language&&this.player_.language(),r=this.player_.languages&&this.player_.languages(),s=r&&r[
2i],a=i&&i.split("-")[0],o=r&&r[a];let l=n;return s&&s[e]?l=s[e]:o&&o[e]&&(l=o[e]),t&&(l=l.replace(/\{(\d+)\}/g,(function(e,n){const i=t[n-1];let r=i;return"undefined"===typeof i&&(r=e),r}))),l}handleLanguagechange(){}contentEl(){return this.contentEl_||this.el_}id(){return this.id_}name(){return this.name_}children(){return this.children_}getChildById(e){return this.childIndex_[e]}getChild(e){if(e)return this.childNameIndex_[e]}getDescendant(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t=t.reduce(((e,t)=>e.concat(t)),[]);let i=this;for(let r=0;r<t.length;r++)if(i=i.getChild(t[r]),!i||!i.getChild)return;return i}setIcon(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.el();if(!this.player_.options_.experimentalSvgIcons)return;const n="http://www.w3.org/2000/svg",i=_e("span",{className:"vjs-icon-placeholder vjs-svg-icon"},{"aria-hidden":"true"}),r=a.a.createElementNS(n,"svg");r.setAttributeNS(null,"viewBox","0 0 512 512");const s=a.a.createElementNS(n,"use");return r.appendChild(s),s.setAttributeNS(null,"href","#vjs-icon-".concat(e)),i.appendChild(r),this.iconIsSet_?t.replaceChild(i,t.querySelector(".vjs-icon-placeholder")):t.appendChild(i),this.iconIsSet_=!0,i}addChild(e){let t,n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.children_.length;if("string"===typeof e){n=Mt(e);const r=i.componentClass||n;i.name=n;const s=Ut.getComponent(r);if(!s)throw new Error("Component ".concat(r," does not exist"));if("function"!==typeof s)return null;t=new s(this.player_||this,i)}else t=e;if(t.parentComponent_&&t.parentComponent_.removeChild(t),this.children_.splice(r,0,t),t.parentComponent_=this,"function"===typeof t.id&&(this.childIndex_[t.id()]=t),n=n||t.name&&Mt(t.name()),n&&(this.childNameIndex_[n]=t,this.childNameIndex_[Lt(n)]=t),"function"===typeof t.el&&t.el()){let e=null;this.children_[r+1]&&(this.children_[r+1].el_?e=this.children_[r+1].el_:ye(this.children_[r+1])&&(e=this.children_[r+1])),this.contentEl().insertBefore(t.el(),e)}return t}removeChild(e){if("string"===typeof e&&(e=this.getChild(e)),!e||!this.children_)return;let t=!1;for(let i=this.children_.length-1;i>=0;i--)if(this.children_[i]===e){t=!0,this.children_.splice(i,1);break}if(!t)return;e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[Mt(e.name())]=null,this.childNameIndex_[Lt(e.name())]=null;const n=e.el();n&&n.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}initChildren(){const e=this.options_.children;if(e){const t=this.options_,n=e=>{const n=e.name;let i=e.opts;if(void 0!==t[n]&&(i=t[n]),!1===i)return;!0===i&&(i={}),i.playerOptions=this.options_.playerOptions;const r=this.addChild(n,i);r&&(this[n]=r)};let i;const r=Ut.getComponent("Tech");i=Array.isArray(e)?e:Object.keys(e),i.concat(Object.keys(this.options_).filter((function(e){return!i.some((function(t){return"string"===typeof t?e===t:e===t.name}))}))).map((t=>{let n,i;return"string"===typeof t?(n=t,i=e[n]||this.options_[n]||{}):(n=t.name,i=t),{name:n,opts:i}})).filter((e=>{const t=Ut.getComponent(e.opts.componentClass||Mt(e.name));return t&&!r.isTech(t)})).forEach(n)}}buildCSSClass(){return""}ready(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))}triggerReady(){this.isReady_=!0,this.setTimeout((function(){const e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach((function(e){e.call(this)}),this),this.trigger("ready")}),1)}$(e,t){return Ve(e,t||this.contentEl())}$$(e,t){return He(e,t||this.contentEl())}hasClass(e){return Se(this.el_,e)}addClass(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];Ae(this.el_,...t)}removeClass(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];we(this.el_,...t)}toggleClass(e,t){je(this.el_,e,t)}show(){this.removeClass("vjs-hidden")}hide(){this.addClass("vjs-hidden")}lockShowing(){this.addClass("vjs-lock-showing")}unlockShowing(){this.removeClass("vjs-lock-showing")}getAttribute(e){return Oe(this.el_,e)}setAttribute(e,t){Ee(this.el_,e,t)}removeAttribute(e){Ie(this.el_,e)}width(e,t){return this.dimension("width",e,t)}height(e,t){return this.dimension("height",e,t)}dimensions(e,t){this.width(e,!0),this.height(t)}dimension(e,t,n){if(void 0!==t)return null!==t&&t===t||(t=0),-1!==(""+t).indexOf("%")||-1!==(""+t).indexOf("px")?this.el_.style[e]=t:this.el_.style[e]="auto"===t?"":t+"px",void(n||this.trigger("componentresize"));if(!this.el_)return 0;const i=this.el_.style[e],r=i.indexOf("px");return-1!==r?parseInt(i.slice(0,r),10):parseInt(this.el_["offset"+Mt(e)],10)}currentDimension(e){let t=0;if("width"!==e&&"height"!==e)throw new Error("currentDimension only accepts width or height value");if(t=We(this.el_,e),t=parseFloat(t),0===t||isNaN(t)){const n="offset".concat(Mt(e));t=this.el_[n]}return t}currentDimensions(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}}currentWidth(){return this.currentDimension("width")}currentHeight(){return this.currentDimension("height")}getPositions(){const e=this.el_.getBoundingClientRect();return{boundingClientRect:{x:e.x,y:e.y,width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left},center:{x:e.left+e.width/2,y:e.top+e.height/2,width:0,height:0,top:e.top+e.height/2,right:e.left+e.width/2,bottom:e.top+e.height/2,left:e.left+e.width/2}}}focus(){this.el_.focus()}blur(){this.el_.blur()}handleKeyDown(e){this.player_&&("Tab"===e.key||this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled||e.stopPropagation(),this.player_.handleKeyDown(e))}handleKeyPress(e){this.handleKeyDown(e)}emitTapEvents(){let e=0,t=null;let n;this.on("touchstart",(function(i){1===i.touches.length&&(t={pageX:i.touches[0].pageX,pageY:i.touches[0].pageY},e=r.a.performance.now(),n=!0)})),this.on("touchmove",(function(e){if(e.touches.length>1)n=!1;else if(t){const i=e.touches[0].pageX-t.pageX,r=e.touches[0].pageY-t.pageY;Math.sqrt(i*i+r*r)>10&&(n=!1)}}));const i=function(){n=!1};this.on("touchleave",i),this.on("touchcancel",i),this.on("touchend",(function(i){if(t=null,!0===n){r.a.performance.now()-e<200&&(i.preventDefault(),this.trigger("tap"))}}))}enableTouchActivity(){if(!this.player()||!this.player().reportUserActivity)return;const e=yt(this.player(),this.player().reportUserActivity);let t;this.on("touchstart",(function(){e(),this.clearInterval(t),t=this.setInterval(e,250)}));const n=function(n){e(),this.clearInterval(t)};this.on("touchmove",e),this.on("touchend",n),this.on("touchcancel",n)}setTimeout(e,t){var n;return e=yt(this,e),this.clearTimersOnDispose_(),n=r.a.setTimeout((()=>{this.setTimeoutIds_.has(n)&&this.setTimeoutIds_.delete(n),e()}),t),this.setTimeoutIds_.add(n),n}clearTimeout(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),r.a.clearTimeout(e)),e}setInterval(e,t){e=yt(this,e),this.clearTimersOnDispose_();const n=r.a.setInterval(e,t);return this.setIntervalIds_.add(n),n}clearInterval(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),r.a.clearInterval(e)),e}requestAnimationFrame(e){var t;return this.clearTimersOnDispose_(),e=yt(this,e),t=r.a.requestAnimationFrame((()=>{this.rafIds_.has(t)&&this.rafIds_.delete(t),e()})),this.rafIds_.add(t),t}requestNamedAnimationFrame(e,t){this.namedRafs_.has(e)&&this.cancelNamedAnimationFrame(e),this.clearTimersOnDispose_(),t=yt(this,t);const n=this.requestAnimationFrame((()=>{t(),this.namedRafs_.has(e)&&this.namedRafs_.delete(e)}));return this.namedRafs_.set(e,n),e}cancelNamedAnimationFrame(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))}cancelAnimationFrame(e){return this.rafIds_.has(e)&&(this.rafIds_.delete(e),r.a.cancelAnimationFrame(e)),e}clearTimersOnDispose_(){this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",(()=>{[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEac
2h((e=>{let[t,n]=e;this[t].forEach(((e,t)=>this[n](t)))})),this.clearingTimersOnDispose_=!1})))}getIsDisabled(){return Boolean(this.el_.disabled)}getIsExpresslyInert(){return this.el_.inert&&!this.el_.ownerDocument.documentElement.inert}getIsFocusable(e){return(e||this.el_).tabIndex>=0&&!(this.getIsDisabled()||this.getIsExpresslyInert())}getIsAvailableToBeFocused(e){function t(e){const t=r.a.getComputedStyle(e,null),n=t.getPropertyValue("visibility");return"none"!==t.getPropertyValue("display")&&!["hidden","collapse"].includes(n)}return e||(e=this.el()),!!(function(e){if(e.offsetWidth+e.offsetHeight+e.getBoundingClientRect().height+e.getBoundingClientRect().width===0)return!1;const t={x:e.getBoundingClientRect().left+e.offsetWidth/2,y:e.getBoundingClientRect().top+e.offsetHeight/2};if(t.x<0)return!1;if(t.x>(a.a.documentElement.clientWidth||r.a.innerWidth))return!1;if(t.y<0)return!1;if(t.y>(a.a.documentElement.clientHeight||r.a.innerHeight))return!1;let n=a.a.elementFromPoint(t.x,t.y);for(;n;){if(n===e)return!0;if(!n.parentNode)return!1;n=n.parentNode}}(e)&&(n=e,t(n.parentElement)&&t(n)&&"0"!==n.style.opacity&&"0px"!==r.a.getComputedStyle(n).height&&"0px"!==r.a.getComputedStyle(n).width)&&(!e.parentElement||e.tabIndex>=0));var n}static registerComponent(e,t){if("string"!==typeof e||!e)throw new Error('Illegal component name, "'.concat(e,'"; must be a non-empty string.'));const n=Ut.getComponent("Tech"),i=n&&n.isTech(t),r=Ut===t||Ut.prototype.isPrototypeOf(t.prototype);if(i||!r){let t;throw t=i?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error('Illegal component, "'.concat(e,'"; ').concat(t,"."))}e=Mt(e),Ut.components_||(Ut.components_={});const s=Ut.getComponent("Player");if("Player"===e&&s&&s.players){const e=s.players,t=Object.keys(e);if(e&&t.length>0)for(let n=0;n<t.length;n++)if(null!==e[t[n]])throw new Error("Can not register Player component after player has been created.")}return Ut.components_[e]=t,Ut.components_[Lt(e)]=t,t}static getComponent(e){if(e&&Ut.components_)return Ut.components_[e]}}function Ft(e,t,n,i){return function(e,t,n){if("number"!==typeof t||t<0||t>n)throw new Error("Failed to execute '".concat(e,"' on 'TimeRanges': The index provided (").concat(t,") is non-numeric or out of bounds (0-").concat(n,")."))}(e,i,n.length-1),n[i][t]}function qt(e){let t;return t=void 0===e||0===e.length?{length:0,start(){throw new Error("This TimeRanges object is empty")},end(){throw new Error("This TimeRanges object is empty")}}:{length:e.length,start:Ft.bind(null,"start",0,e),end:Ft.bind(null,"end",1,e)},r.a.Symbol&&r.a.Symbol.iterator&&(t[r.a.Symbol.iterator]=()=>(e||[]).values()),t}function zt(e,t){return Array.isArray(e)?qt(e):void 0===e||void 0===t?qt():qt([[e,t]])}Ut.registerComponent("Component",Ut);const Vt=function(e,t){e=e<0?0:e;let n=Math.floor(e%60),i=Math.floor(e/60%60),r=Math.floor(e/3600);const s=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(r=i=n="-"),r=r>0||a>0?r+":":"",i=((r||s>=10)&&i<10?"0"+i:i)+":",n=n<10?"0"+n:n,r+i+n};let Ht=Vt;function Wt(e){Ht=e}function Gt(){Ht=Vt}function Xt(e){return Ht(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:e)}var Yt=Object.freeze({__proto__:null,createTimeRanges:zt,createTimeRange:zt,setFormatTime:Wt,resetFormatTime:Gt,formatTime:Xt});function Qt(e,t){let n,i,r=0;if(!t)return 0;e&&e.length||(e=zt(0,0));for(let s=0;s<e.length;s++)n=e.start(s),i=e.end(s),i>t&&(i=t),r+=i-n;return r/t}function Kt(e){if(e instanceof Kt)return e;"number"===typeof e?this.code=e:"string"===typeof e?this.message=e:U(e)&&("number"===typeof e.code&&(this.code=e.code),Object.assign(this,e)),this.message||(this.message=Kt.defaultMessages[this.code]||"")}function Zt(e){return void 0!==e&&null!==e&&"function"===typeof e.then}function Jt(e){Zt(e)&&e.then(null,(e=>{}))}Kt.prototype.code=0,Kt.prototype.message="",Kt.prototype.status=null,Kt.prototype.metadata=null,Kt.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],Kt.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."},Kt.MEDIA_ERR_CUSTOM=0,Kt.prototype.MEDIA_ERR_CUSTOM=0,Kt.MEDIA_ERR_ABORTED=1,Kt.prototype.MEDIA_ERR_ABORTED=1,Kt.MEDIA_ERR_NETWORK=2,Kt.prototype.MEDIA_ERR_NETWORK=2,Kt.MEDIA_ERR_DECODE=3,Kt.prototype.MEDIA_ERR_DECODE=3,Kt.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Kt.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Kt.MEDIA_ERR_ENCRYPTED=5,Kt.prototype.MEDIA_ERR_ENCRYPTED=5;const $t=function(e){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce(((t,n,i)=>(e[n]&&(t[n]=e[n]),t)),{cues:e.cues&&Array.prototype.map.call(e.cues,(function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}}))})};var en=function(e){const t=e.$$("track"),n=Array.prototype.map.call(t,(e=>e.track));return Array.prototype.map.call(t,(function(e){const t=$t(e.track);return e.src&&(t.src=e.src),t})).concat(Array.prototype.filter.call(e.textTracks(),(function(e){return-1===n.indexOf(e)})).map($t))},tn=function(e,t){return e.forEach((function(e){const n=t.addRemoteTextTrack(e).track;
2!e.src&&e.cues&&e.cues.forEach((e=>n.addCue(e)))})),t.textTracks()},nn=$t;const rn="vjs-modal-dialog";class sn extends Ut{constructor(e,t){super(e,t),this.handleKeyDown_=e=>this.handleKeyDown(e),this.close_=e=>this.close(e),this.opened_=this.hasBeenOpened_=this.hasBeenFilled_=!1,this.closeable(!this.options_.uncloseable),this.content(this.options_.content),this.contentEl_=_e("div",{className:"".concat(rn,"-content")},{role:"document"}),this.descEl_=_e("p",{className:"".concat(rn,"-description vjs-control-text"),id:this.el().getAttribute("aria-describedby")}),Te(this.descEl_,this.description()),this.el_.appendChild(this.descEl_),this.el_.appendChild(this.contentEl_)}createEl(){return super.createEl("div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":"".concat(this.id(),"_description"),"aria-hidden":"true","aria-label":this.label(),role:"dialog","aria-live":"polite"})}dispose(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,super.dispose()}buildCSSClass(){return"".concat(rn," vjs-hidden ").concat(super.buildCSSClass())}label(){return this.localize(this.options_.label||"Modal Window")}description(){let e=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(e+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),e}open(){if(this.opened_)return void(this.options_.fillAlways&&this.fill());const e=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on("keydown",this.handleKeyDown_),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}opened(e){return"boolean"===typeof e&&this[e?"open":"close"](),this.opened_}close(){if(!this.opened_)return;const e=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off("keydown",this.handleKeyDown_),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger({type:"modalclose",bubbles:!0}),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}closeable(e){if("boolean"===typeof e){const t=this.closeable_=!!e;let n=this.getChild("closeButton");if(t&&!n){const e=this.contentEl_;this.contentEl_=this.el_,n=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=e,this.on(n,"close",this.close_)}!t&&n&&(this.off(n,"close",this.close_),this.removeChild(n),n.dispose())}return this.closeable_}fill(){this.fillWith(this.content())}fillWith(e){const t=this.contentEl(),n=t.parentNode,i=t.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,n.removeChild(t),this.empty(),qe(t,e),this.trigger("modalfill"),i?n.insertBefore(t,i):n.appendChild(t);const r=this.getChild("closeButton");r&&n.appendChild(r.el_),this.trigger("aftermodalfill")}empty(){this.trigger("beforemodalempty"),Be(this.contentEl()),this.trigger("modalempty")}content(e){return"undefined"!==typeof e&&(this.content_=e),this.content_}conditionalFocus_(){const e=a.a.activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===e)&&(this.previouslyActiveEl_=e,this.focus())}conditionalBlur_(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)}handleKeyDown(e){if(this.trigger({type:"modalKeydown",originalEvent:e,target:this,bubbles:!0}),e.stopPropagation(),"Escape"===e.key&&this.closeable())return e.preventDefault(),void this.close();if("Tab"!==e.key)return;const t=this.focusableEls_(),n=this.el_.querySelector(":focus");let i;for(let r=0;r<t.length;r++)if(n===t[r]){i=r;break}a.a.activeElement===this.el_&&(i=0),e.shiftKey&&0===i?(t[t.length-1].focus(),e.preventDefault()):e.shiftKey||i!==t.length-1||(t[0].focus(),e.preventDefault())}focusableEls_(){const e=this.el_.querySelectorAll("*");return Array.prototype.filter.call(e,(e=>(e instanceof r.a.HTMLAnchorElement||e instanceof r.a.HTMLAreaElement)&&e.hasAttribute("href")||(e instanceof r.a.HTMLInputElement||e instanceof r.a.HTMLSelectElement||e instanceof r.a.HTMLTextAreaElement||e instanceof r.a.HTMLButtonElement)&&!e.hasAttribute("disabled")||e instanceof r.a.HTMLIFrameElement||e instanceof r.a.HTMLObjectElement||e instanceof r.a.HTMLEmbedElement||e.hasAttribute("tabindex")&&-1!==e.getAttribute("tabindex")||e.hasAttribute("contenteditable")))}}
vendor: 5,531 bytes, line 2
2sn.prototype.options_={pauseOnOpen:!0,temporary:!0},Ut.registerComponent("ModalDialog",sn);class an extends xt{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];super(),this.tracks_=[],Object.defineProperty(this,"length",{get(){return this.tracks_.length}});for(let t=0;t<e.length;t++)this.addTrack(e[t])}addTrack(e){const t=this.tracks_.length;""+t in this||Object.defineProperty(this,t,{get(){return this.tracks_[t]}}),-1===this.tracks_.indexOf(e)&&(this.tracks_.push(e),this.trigger({track:e,type:"addtrack",target:this})),e.labelchange_=()=>{this.trigger({track:e,type:"labelchange",target:this})},At(e)&&e.addEventListener("labelchange",e.labelchange_)}removeTrack(e){let t;for(let n=0,i=this.length;n<i;n++)if(this[n]===e){t=this[n],t.off&&t.off(),this.tracks_.splice(n,1);break}t&&this.trigger({track:t,type:"removetrack",target:this})}getTrackById(e){let t=null;for(let n=0,i=this.length;n<i;n++){const i=this[n];if(i.id===e){t=i;break}}return t}}an.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"};for(const t in an.prototype.allowedEvents_)an.prototype["on"+t]=null;const on=function(e,t){for(let n=0;n<e.length;n++)Object.keys(e[n]).length&&t.id!==e[n].id&&(e[n].enabled=!1)};class ln extends an{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];for(let t=e.length-1;t>=0;t--)if(e[t].enabled){on(e,e[t]);break}super(e),this.changing_=!1}addTrack(e){e.enabled&&on(this,e),super.addTrack(e),e.addEventListener&&(e.enabledChange_=()=>{this.changing_||(this.changing_=!0,on(this,e),this.changing_=!1,this.trigger("change"))},e.addEventListener("enabledchange",e.enabledChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener("enabledchange",e.enabledChange_),e.enabledChange_=null)}}const cn=function(e,t){for(let n=0;n<e.length;n++)Object.keys(e[n]).length&&t.id!==e[n].id&&(e[n].selected=!1)};class dn extends an{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];for(let t=e.length-1;t>=0;t--)if(e[t].selected){cn(e,e[t]);break}super(e),this.changing_=!1,Object.defineProperty(this,"selectedIndex",{get(){for(let e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set(){}})}addTrack(e){e.selected&&cn(this,e),super.addTrack(e),e.addEventListener&&(e.selectedChange_=()=>{this.changing_||(this.changing_=!0,cn(this,e),this.changing_=!1,this.trigger("change"))},e.addEventListener("selectedchange",e.selectedChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.selectedChange_&&(e.removeEventListener("selectedchange",e.selectedChange_),e.selectedChange_=null)}}class un extends an{addTrack(e){super.addTrack(e),this.queueChange_||(this.queueChange_=()=>this.queueTrigger("change")),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=()=>this.trigger("selectedlanguagechange")),e.addEventListener("modechange",this.queueChange_);-1===["metadata","chapters"].indexOf(e.kind)&&e.addEventListener("modechange",this.triggerSelectedlanguagechange_)}removeTrack(e){super.removeTrack(e),e.removeEventListener&&(this.queueChange_&&e.removeEventListener("modechange",this.queueChange_),this.selectedlanguagechange_&&e.removeEventListener("modechange",this.triggerSelectedlanguagechange_))}toJSON(){return this.tracks_.map((e=>e.toJSON()))}}class hn{constructor(e){hn.prototype.setCues_.call(this,e),Object.defineProperty(this,"length",{get(){return this.length_}})}setCues_(e){const t=this.length||0;let n=0;const i=e.length;this.cues_=e,this.length_=e.length;const r=function(e){""+e in this||Object.defineProperty(this,""+e,{get(){return this.cues_[e]}})};if(t<i)for(n=t;n<i;n++)r.call(this,n)}getCueById(e){let t=null;for(let n=0,i=this.length;n<i;n++){const i=this[n];if(i.id===e){t=i;break}}return t}}const pn={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},gn={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},mn={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},fn={disabled:"disabled",hidden:"hidden",showing:"showing"};class yn extends xt{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super();const t={id:e.id||"vjs_track_"+rt(),kind:e.kind||"",language:e.language||""};let n=e.label||"";for(const i in t)Object.defineProperty(this,i,{get:()=>t[i],set(){}});Object.defineProperty(this,"label",{get:()=>n,set(e){e!==n&&(n=e,this.trigger("labelchange"))}})}}const bn=function(e){return new URL(e,a.a.baseURI)},vn=function(e){return new URL(e,a.a.baseURI).href},_n=function(e){if("string"===typeof e){const t=e.split("?")[0].replace(/\/+$/,"").match(/\.([^.\/]+)$/);return t?t[1].toLowerCase():""}return""},Tn=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.a.location;return bn(e).origin!==t.origin};var xn=Object.freeze({__proto__:null,parseUrl:bn,getAbsoluteURL:vn,getFileExtension:_n,isCrossOrigin:Tn});const Sn=function(e,t){const n=new r.a.WebVTT.Parser(r.a,r.a.vttjs,r.a.WebVTT.StringDecoder()),i=[];n.oncue=function(e){t.addCue(e)},n.onparsingerror=function(e){i.push(e)},n.onflush=function(){t.trigger({type:"loadeddata",target:t})},n.parse(e),i.length>0&&(r.a.console&&r.a.console.groupCollapsed&&r.a.console.groupCollapsed("Text Track parsing errors for ".concat(t.src)),i.forEac
2h((e=>R.error(e))),r.a.console&&r.a.console.groupEnd&&r.a.console.groupEnd()),n.flush()},An=function(e,t){const n={uri:e},i=Tn(e);i&&(n.cors=i);const s="use-credentials"===t.tech_.crossOrigin();s&&(n.withCredentials=s),l()(n,yt(this,(function(e,n,i){if(e)return R.error(e,n);t.loaded_=!0,"function"!==typeof r.a.WebVTT?t.tech_&&t.tech_.any(["vttjsloaded","vttjserror"],(e=>{if("vttjserror"!==e.type)return Sn(i,t);R.error("vttjs failed to load, stopping trying to process ".concat(t.src))})):Sn(i,t)})))};class wn extends yn{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e.tech)throw new Error("A tech was not provided.");const t=q(e,{kind:mn[e.kind]||"subtitles",language:e.language||e.srclang||""});let n=fn[t.mode]||"disabled";const i=t.default;"metadata"!==t.kind&&"chapters"!==t.kind||(n="hidden"),super(t),this.tech_=t.tech,this.cues_=[],this.activeCues_=[],this.preload_=!1!==this.tech_.preloadTextTracks;const r=new hn(this.cues_),s=new hn(this.activeCues_);let a=!1;this.timeupdateHandler=yt(this,(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.tech_.isDisposed()||(this.tech_.isReady_?(this.activeCues=this.activeCues,a&&(this.trigger("cuechange"),a=!1),"timeupdate"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))):"timeupdate"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler)))}));this.tech_.one("dispose",(()=>{this.stopTracking()})),"disabled"!==n&&this.startTracking(),Object.defineProperties(this,{default:{get:()=>i,set(){}},mode:{get:()=>n,set(e){fn[e]&&n!==e&&(n=e,this.preload_||"disabled"===n||0!==this.cues.length||An(this.src,this),this.stopTracking(),"disabled"!==n&&this.startTracking(),this.trigger("modechange"))}},cues:{get(){return this.loaded_?r:null},set(){}},activeCues:{get(){if(!this.loaded_)return null;if(0===this.cues.length)return s;const e=this.tech_.currentTime(),t=[];for(let n=0,i=this.cues.length;n<i;n++){const i=this.cues[n];i.startTime<=e&&i.endTime>=e&&t.push(i)}
2if(a=!1,t.length!==this.activeCues_.length)a=!0;else for(let n=0;n<t.length;n++)-1===this.activeCues_.indexOf(t[n])&&(a=!0);return this.activeCues_=t,s.setCues_(this.activeCues_),s},set(){}}}),t.src?(this.src=t.src,this.preload_||(this.loaded_=!0),(this.preload_||"subtitles"!==t.kind&&"captions"!==t.kind)&&An(this.src,this)):this.loaded_=!0}startTracking(){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler),this.tech_.on("timeupdate",this.timeupdateHandler)}stopTracking(){this.rvf_&&(this.tech_.cancelVideoFrameCallback(this.rvf_),this.rvf_=void 0),this.tech_.off("timeupdate",this.timeupdateHandler)}addCue(e){let t=e;if(!("getCueAsHTML"in t)){t=new r.a.vttjs.VTTCue(e.startTime,e.endTime,e.text);for(const n in e)n in t||(t[n]=e[n]);t.id=e.id,t.originalCue_=e}const n=this.tech_.textTracks();for(let i=0;i<n.length;i++)n[i]!==this&&n[i].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)}toJSON(){return nn(this)}removeCue(e){let t=this.cues_.length;for(;t--;){const n=this.cues_[t];if(n===e||n.originalCue_&&n.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}}}wn.prototype.allowedEvents_={cuechange:"cuechange"};class jn extends yn{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=q(e,{kind:gn[e.kind]||""});super(t);let n=!1;Object.defineProperty(this,"enabled",{get:()=>n,set(e){"boolean"===typeof e&&e!==n&&(n=e,this.trigger("enabledchange"))}}),t.enabled&&(this.enabled=t.enabled),this.loaded_=!0}}class kn extends yn{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=q(e,{kind:pn[e.kind]||""});super(t);let n=!1;Object.defineProperty(this,"selected",{get:()=>n,set(e){"boolean"===typeof e&&e!==n&&(n=e,this.trigger("selectedchange"))}}),t.selected&&(this.selected=t.selected)}}class Cn extends xt{constructor(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super();const n=new wn(t);this.kind=n.kind,this.src=n.src,this.srclang=n.language,this.label=n.label,this.default=n.default,Object.defineProperties(this,{readyState:{get:()=>e},track:{get:()=>n}}),e=Cn.NONE,n.addEventListener("loadeddata",(()=>{e=Cn.LOADED,this.trigger({type:"load",target:this})}))}}Cn.prototype.allowedEvents_={load:"load"},Cn.NONE=0,Cn.LOADING=1,Cn.LOADED=2,Cn.ERROR=3;const On={audio:{ListClass:ln,TrackClass:jn,capitalName:"Audio"},video:{ListClass:dn,TrackClass:kn,capitalName:"Video"},text:{ListClass:un,TrackClass:wn,capitalName:"Text"}};Object.keys(On).forEach((function(e){On[e].getterName="".concat(e,"Tracks"),On[e].privateName="".concat(e,"Tracks_")}));const En={remoteText:{ListClass:un,TrackClass:wn,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.trackElements_=[],Object.defineProperty(this,"length",{get(){return this.trackElements_.length}});for(let t=0,n=e.length;t<n;t++)this.addTrackElement_(e[t])}addTrackElement_(e){const t=this.trackElements_.length;""+t in this||Object.defineProperty(this,t,{get(){return this.trackElements_[t]}}),-1===this.trackElements_.indexOf(e)&&this.trackElements_.push(e)}getTrackElementByTrack_(e){let t;for(let n=0,i=this.trackElements_.length;n<i;n++)if(e===this.trackElements_[n].track){t=this.trackElements_[n];break}return t}removeTrackElement_(e){for(let t=0,n=this.trackElements_.length;t<n;t++)if(e===this.trackElements_[t]){this.trackElements_[t].track&&"function"===typeof this.trackElements_[t].track.off&&this.trackElements_[t].track.off(),"function"===typeof this.trackElements_[t].off&&this.trackElements_[t].off(),this.trackElements_.splice(t,1);break}}},TrackClass:Cn,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},In=Object.assign({},On,En);En.names=Object.keys(En),On.names=Object.keys(On),In.names=[].concat(En.names).concat(On.names);class Pn extends Ut{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};e.reportTouchActivity=!1,super(null,e,t),this.onDurationChange_=e=>this.onDurationChange(e),this.trackProgress_=e=>this.trackProgress(e),this.trackCurrentTime_=e=>this.trackCurrentTime(e),this.stopTrackingCurrentTime_=e=>this.stopTrackingCurrentTime(e),this.disposeSourceHandler_=e=>this.disposeSourceHandler(e),this.queuedHanders_=new Set,this.hasStarted_=!1,this.on("playing",(function(){this.hasStarted_=!0})),this.on("loadstart",(function(){this.hasStarted_=!1}
vendor: 2,443 bytes, line 2
2)),In.names.forEach((t=>{const n=In[t];e&&e[n.getterName]&&(this[n.privateName]=e[n.getterName])})),this.featuresProgressEvents||this.manualProgressOn(),this.featuresTimeupdateEvents||this.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach((t=>{!1===e["native".concat(t,"Tracks")]&&(this["featuresNative".concat(t,"Tracks")]=!1)})),!1===e.nativeCaptions||!1===e.nativeTextTracks?this.featuresNativeTextTracks=!1:!0!==e.nativeCaptions&&!0!==e.nativeTextTracks||(this.featuresNativeTextTracks=!0),this.featuresNativeTextTracks||this.emulateTextTracks(),this.preloadTextTracks=!1!==e.preloadTextTracks,this.autoRemoteTextTracks_=new In.text.ListClass,this.initTrackListeners(),e.nativeControlsForTouch||this.emitTapEvents(),this.constructor&&(this.name_=this.constructor.name||"Unknown Tech")}triggerSourceset(e){this.isReady_||this.one("ready",(()=>this.setTimeout((()=>this.triggerSourceset(e)),1))),this.trigger({src:e,type:"sourceset"})}manualProgressOn(){this.on("durationchange",this.onDurationChange_),this.manualProgress=!0,this.one("ready",this.trackProgress_)}manualProgressOff(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange_)}trackProgress(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(yt(this,(function(){const e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger("progress"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()})),500)}onDurationChange(e){this.duration_=this.duration()}buffered(){return zt(0,0)}bufferedPercent(){return Qt(this.buffered(),this.duration_)}stopTrackingProgress(){this.clearInterval(this.progressInterval)}manualTimeUpdatesOn(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime_),this.on("pause",this.stopTrackingCurrentTime_)}manualTimeUpdatesOff(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime_),this.off("pause",this.stopTrackingCurrentTime_)}trackCurrentTime(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}),250)}stopTrackingCurrentTime(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}dispose(){this.clearTracks(On.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),super.dispose()}
2clearTracks(e){(e=[].concat(e)).forEach((e=>{const t=this["".concat(e,"Tracks")]()||[];let n=t.length;for(;n--;){const i=t[n];"text"===e&&this.removeRemoteTextTrack(i),t.removeTrack(i)}}))}cleanupAutoTextTracks(){const e=this.autoRemoteTextTracks_||[];let t=e.length;for(;t--;){const n=e[t];this.removeRemoteTextTrack(n)}}reset(){}crossOrigin(){}setCrossOrigin(){}error(e){return void 0!==e&&(this.error_=new Kt(e),this.trigger("error")),this.error_}played(){return this.hasStarted_?zt(0,0):zt()}play(){}setScrubbing(e){}scrubbing(){}setCurrentTime(e){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}initTrackListeners(){On.names.forEach((e=>{const t=On[e],n=()=>{this.trigger("".concat(e,"trackchange"))},i=this[t.getterName]();i.addEventListener("removetrack",n),i.addEventListener("addtrack",n),this.on("dispose",(()=>{i.removeEventListener("removetrack",n),i.removeEventListener("addtrack",n)}))}))}addWebVttScript_(){if(!r.a.WebVTT)if(a.a.body.contains(this.el())){if(!this.options_["vtt.js"]&&F(d.a)&&Object.keys(d.a).length>0)return void this.trigger("vttjsloaded");const e=a.a.createElement("script");e.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",e.onload=()=>{this.trigger("vttjsloaded")},e.onerror=()=>{this.trigger("vttjserror")},this.on("dispose",(()=>{e.onload=null,e.onerror=null})),r.a.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)}emulateTextTracks(){const e=this.textTracks(),t=this.remoteTextTracks(),n=t=>e.addTrack(t.track),i=t=>e.removeTrack(t.track);t.on("addtrack",n),t.on("removetrack",i),this.addWebVttScript_();const r=()=>this.trigger("texttrackchange"),s=()=>{r();for(let t=0;t<e.length;t++){const n=e[t];n.removeEventListener("cuechange",r),"showing"===n.mode&&n.addEventListener("cuechange",r)}};s(),e.addEventListener("change",s),e.addEventListener("addtrack",s),e.addEventListener("removetrack",s),this.on("dispose",(function(){t.off("addtrack",n),t.off("removetrack",i),e.removeEventListener("change",s),e.removeEventListener("addtrack",s),e.removeEventListener("removetrack",s);for(let t=0;t<e.length;t++){e[t].removeEventListener("cuechange",r)}}))}addTextTrack(e,t,n){if(!e)throw new Error("TextTrack kind is required but was not provided");return function(e,t,n,i){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};const s=e.textTracks();r.kind=t,n&&(r.label=n),i&&(r.language=i),r.tech=e;const a=new In.text.TrackClass(r);return s.addTrack(a),a}(this,e,t,n)}createRemoteTextTrack(e){const t=q(e,{tech:this});return new En.remoteTextEl.TrackClass(t)}addRemoteTextTrack(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;const n=this.createRemoteTextTrack(e);return"boolean"!==typeof t&&(t=!1),this.remoteTextTrackEls().addTrackElement_(n),this.remoteTextTracks().addTrack(n.track),!1===t&&this.ready((()=>this.autoRemoteTextTracks_.addTrack(n.track))),n}removeRemoteTextTrack(e){const t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)}getVideoPlaybackQuality(){return{}}requestPictureInPicture(){return Promise.reject()}disablePictureInPicture(){return!0}setDisablePictureInPicture(){}requestVideoFrameCallback(e){const t=rt();return!this.isReady_||this.paused()?(this.queuedHanders_.add(t),this.one("playing",(()=>{this.queuedHanders_.has(t)&&(this.queuedHanders_.delete(t),e())}))):this.requestNamedAnimationFrame(t,e),t}cancelVideoFrameCallback(e){this.queuedHanders_.has(e)?this.queuedHanders_.delete(e):this.cancelNamedAnimationFrame(e)}setPoster(){}playsinline(){}setPlaysinline(){}overrideNativeAudioTracks(e){}overrideNativeVideoTracks(e){}canPlayType(e){return""}static canPlayType(e){return""}static canPlaySource(e,t){return Pn.canPlayType(e.type)}static isTech(e){return e.prototype instanceof Pn||e instanceof Pn||e===Pn}static registerTech(e,t){if(Pn.techs_||(Pn.techs_={}),!Pn.isTech(t))throw new Error("Tech ".concat(e," must be a Tech"));if(!Pn.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!Pn.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=Mt(e),Pn.techs_[e]=t,Pn.techs_[Lt(e)]=t,"Tech"!==e&&Pn.defaultTechOrder_.push(e),t}static getTech(e){if(e)return Pn.techs_&&Pn.techs_[e]?Pn.techs_[e]:(e=Mt(e),r.a&&r.a.videojs&&r.a.videojs[e]?(R.warn("The ".concat(e," tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)")),r.a.videojs[e]):void 0)}}
2In.names.forEach((function(e){const t=In[e];Pn.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}})),Pn.prototype.featuresVolumeControl=!0,Pn.prototype.featuresMuteControl=!0,Pn.prototype.featuresFullscreenResize=!1,Pn.prototype.featuresPlaybackRate=!1,Pn.prototype.featuresProgressEvents=!1,Pn.prototype.featuresSourceset=!1,Pn.prototype.featuresTimeupdateEvents=!1,Pn.prototype.featuresNativeTextTracks=!1,Pn.prototype.featuresVideoFrameCallback=!1,Pn.withSourceHandlers=function(e){e.registerSourceHandler=function(t,n){let i=e.sourceHandlers;i||(i=e.sourceHandlers=[]),void 0===n&&(n=i.length),i.splice(n,0,t)},e.canPlayType=function(t){const n=e.sourceHandlers||[];let i;for(let e=0;e<n.length;e++)if(i=n[e].canPlayType(t),i)return i;return""},e.selectSourceHandler=function(t,n){const i=e.sourceHandlers||[];let r;for(let e=0;e<i.length;e++)if(r=i[e].canHandleSource(t,n),r)return i[e];return null},e.canPlaySource=function(t,n){const i=e.selectSourceHandler(t,n);return i?i.canHandleSource(t,n):""};["seekable","seeking","duration"].forEach((function(e){const t=this[e];"function"===typeof t&&(this[e]=function(){return this.sourceHandler_&&this.sourceHandler_[e]?this.sourceHandler_[e].apply(this.sourceHandler_,arguments):t.apply(this,arguments)})}),e.prototype),e.prototype.setSource=function(t){let n=e.selectSourceHandler(t,this.options_);n||(e.nativeSourceHandler?n=e.nativeSourceHandler:R.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler_),n!==e.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=n.handleSource(t,this,this.options_),this.one("dispose",this.disposeSourceHandler_)},e.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},Ut.registerComponent("Tech",Pn),Pn.registerTech("Tech",Pn),Pn.defaultTechOrder_=[];const Rn={},Dn={},Ln={};function Mn(e,t,n){e.setTimeout((()=>zn(t,Rn[t.type],n,e)),1)}function Nn(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;const r="call"+Mt(n),s=e.reduce(qn(r),i),a=s===Ln,o=a?null:t[n](s);return function(e,t,n,i){for(let r=e.length-1;r>=0;r--){const s=e[r];s[t]&&s[t](i,n)}}(e,n,o,a),o}const Bn={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},Un={setCurrentTime:1,setMuted:1,setVolume:1},Fn={play:1,pause:1};function qn(e){return(t,n)=>t===Ln?Ln:n[e]?n[e](t):t}function zn(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],s=arguments.length>5&&void 0!==arguments[5]&&arguments[5];const[a,...o]=t;if("string"===typeof a)zn(e,Rn[a],n,i,r,s);else if(a){const t=function(e,t){const n=Dn[e.id()];let i=null;if(void 0===n||null===n)return i=t(e),Dn[e.id()]=[[t,i]],i;for(let r=0;r<n.length;r++){const[e,s]=n[r];e===t&&(i=s)}return null===i&&(i=t(e),n.push([t,i])),i}(i,a);if(!t.setSource)return r.push(t),zn(e,o,n,i,r,s);t.setSource(Object.assign({},e),(function(a,l){if(a)return zn(e,o,n,i,r,s);r.push(t),zn(l,e.type===l.type?o:Rn[l.type],n,i,r,s)}))}else o.length?zn(e,o,n,i,r,s):s?n(e,r):zn(e,Rn["*"],n,i,r,!0)}const Vn={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",m4a:"audio/mp4",mp3:"audio/mpeg",aac:"audio/aac",caf:"audio/x-caf",flac:"audio/flac",oga:"audio/ogg",wav:"audio/wav",m3u8:"application/x-mpegURL",mpd:"application/dash+xml",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"},Hn=function(){const e=_n(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"");return Vn[e.toLowerCase()]||""},Wn=function(e){if(Array.isArray(e)){let t=[];e.forEach((function(e){e=Wn(e),Array.isArray(e)?t=t.concat(e):U(e)&&t.push(e)})),e=t}else e="string"===typeof e&&e.trim()?[Gn({src:e})]:U(e)&&"string"===typeof e.src&&e.src&&e.src.trim()?[Gn(e)]:[];return e};function Gn(e){if(!e.type){const t=Hn(e.src);t&&(e.type=t)}return e}const Xn=oe?10009:le?461:8,Yn={codes:{play:415,pause:19,ff:417,rw:412,back:Xn},names:{415:"play",19:"pause",417:"ff",412:"rw",[Xn]:"back"},isEventKey(e,t){return t=t.toLowerCase(),!(!this.names[e.keyCode]||this.names[e.keyCode]!==t)},getEventName(e){if(this.names[e.keyCode])return this.names[e.keyCode];if(this.codes[e.code]){const t=this.codes[e.code];return this.names[t]}return null}};class Qn extends xt{constructor(e){super(),this.player_=e,this.focusableComponents=[],this.isListening_=!1,this.isPaused_=!1,this.onKeyDown_=this.onKeyDown_.bind(this),this.lastFocusedComponent_=null}
vendor: 4,951 bytes, line 2
2start(){this.isListening_||(this.player_.on("keydown",this.onKeyDown_),this.player_.on("modalKeydown",this.onKeyDown_),this.player_.on("loadedmetadata",(()=>{this.focus(this.updateFocusableComponents()[0])})),this.player_.on("modalclose",(()=>{this.refocusComponent()})),this.player_.on("focusin",this.handlePlayerFocus_.bind(this)),this.player_.on("focusout",this.handlePlayerBlur_.bind(this)),this.isListening_=!0,this.player_.errorDisplay&&this.player_.errorDisplay.on("aftermodalfill",(()=>{this.updateFocusableComponents(),this.focusableComponents.length&&(this.focusableComponents.length>1?this.focusableComponents[1].focus():this.focusableComponents[0].focus())})))}stop(){this.player_.off("keydown",this.onKeyDown_),this.isListening_=!1}onKeyDown_(e){const t=e.originalEvent?e.originalEvent:e;if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(t.key)){if(this.isPaused_)return;t.preventDefault();const e=t.key.substring(5).toLowerCase();this.move(e)}else if(Yn.isEventKey(t,"play")||Yn.isEventKey(t,"pause")||Yn.isEventKey(t,"ff")||Yn.isEventKey(t,"rw")){t.preventDefault();const e=Yn.getEventName(t);this.performMediaAction_(e)}else Yn.isEventKey(t,"Back")&&e.target&&"function"===typeof e.target.closeable&&e.target.closeable()&&(t.preventDefault(),e.target.close())}performMediaAction_(e){if(this.player_)switch(e){case"play":this.player_.paused()&&this.player_.play();break;case"pause":this.player_.paused()||this.player_.pause();break;case"ff":this.userSeek_(this.player_.currentTime()+5);break;case"rw":this.userSeek_(this.player_.currentTime()-5)}}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}pause(){this.isPaused_=!0}resume(){this.isPaused_=!1}handlePlayerBlur_(e){const t=e.relatedTarget;let n=null;const i=this.getCurrentComponent(e.target);t&&(n=Boolean(t.closest(".video-js")),t.classList.contains("vjs-text-track-settings")&&!this.isPaused_&&this.searchForTrackSelect_()),(e.currentTarget.contains(e.relatedTarget)||n)&&t||(i&&"CloseButton"===i.name()?this.refocusComponent():(this.pause(),i&&i.el()&&(this.lastFocusedComponent_=i)))}handlePlayerFocus_(){this.getCurrentComponent()&&this.getCurrentComponent().getIsFocusable()&&this.resume()}updateFocusableComponents(){const e=this.player_,t=[];function n(e){for(const i of e)i.hasOwnProperty("el_")&&i.getIsFocusable()&&i.getIsAvailableToBeFocused(i.el())&&t.push(i),i.hasOwnProperty("children_")&&i.children_.length>0&&n(i.children_)}return e.children_.forEach((e=>{if(e.hasOwnProperty("el_")){if(e.getIsFocusable&&e.getIsAvailableToBeFocused&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el()))return void t.push(e);e.hasOwnProperty("children_")&&e.children_.length>0?n(e.children_):e.hasOwnProperty("items")&&e.items.length>0?n(e.items):this.findSuitableDOMChild(e)&&t.push(e)}if("ErrorDisplay"===e.name_&&e.opened_){const n=e.el_.querySelector(".vjs-errors-ok-button-container");if(n){n.querySelectorAll("button").forEach(((e,n)=>{t.push({name:()=>"ModalButton"+(n+1),el:()=>e,getPositions:()=>{const t=e.getBoundingClientRect();return{boundingClientRect:{x:t.x,y:t.y,width:t.width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left},center:{x:t.left+t.width/2,y:t.top+t.height/2,width:0,height:0,top:t.top+t.height/2,right:t.left+t.width/2,bottom:t.top+t.height/2,left:t.left+t.width/2}}},getIsAvailableToBeFocused:()=>!0,getIsFocusable:e=>!0,focus:()=>e.focus()})}))}}})),this.focusableComponents=t,this.focusableComponents}findSuitableDOMChild(e){return e.el()?function t(n){if(e.getIsFocusable(n)&&e.getIsAvailableToBeFocused(n))return n;for(let e=0;e<n.children.length;e++){const i=t(n.children[e]);if(i)return i}return null}(e.el()):null}getCurrentComponent(e){this.updateFocusableComponents();const t=e||document.activeElement;if(this.focusableComponents.length)for(const n of this.focusableComponents)if(n.el()===t)return n}add(e){const t=[...this.focusableComponents];e.hasOwnProperty("el_")&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el())&&t.push(e),this.focusableComponents=t,this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents})}remove(e){for(let t=0;t<this.focusableComponents.length;t++)if(this.focusableComponents[t].name()===e.name())return this.focusableComponents.splice(t,1),void this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents})}clear(){this.focusableComponents.length>0&&(this.focusableComponents=[],this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents}))}move(e){const t=this.getCurrentComponent();if(!t)return;const n=t.getPositions(),i=this.focusableComponents.filter((i=>i!==t&&this.isInDirection_(n.boundingClientRect,i.getPositions().boundingClientRect,e))),r=this.findBestCandidate_(n.center,i,e);r?this.focus(r):this.trigger({type:"endOfFocusableComponents",direction:e,focu
vendor: 5,694 bytes, line 2
2sedComponent:t})}findBestCandidate_(e,t,n){let i=1/0,r=null;for(const s of t){const t=s.getPositions().center,a=this.calculateDistance_(e,t,n);a<i&&(i=a,r=s)}return r}isInDirection_(e,t,n){switch(n){case"right":return t.left>=e.right;case"left":return t.right<=e.left;case"down":return t.top>=e.bottom;case"up":return t.bottom<=e.top;default:return!1}}refocusComponent(){if(this.lastFocusedComponent_){this.player_.userActive()||this.player_.userActive(!0),this.updateFocusableComponents();for(let e=0;e<this.focusableComponents.length;e++)if(this.focusableComponents[e].name()===this.lastFocusedComponent_.name())return void this.focus(this.focusableComponents[e])}else this.focus(this.updateFocusableComponents()[0])}focus(e){"object"===typeof e&&(e.getIsAvailableToBeFocused(e.el())?e.focus():this.findSuitableDOMChild(e)&&this.findSuitableDOMChild(e).focus())}calculateDistance_(e,t,n){const i=Math.abs(e.x-t.x),r=Math.abs(e.y-t.y);let s;switch(n){case"right":case"left":s=i+100*r;break;case"up":s=2*r+.5*i;break;case"down":s=5*r+i;break;default:s=i+r}return s}searchForTrackSelect_(){const e=this;for(const t of e.updateFocusableComponents())if("TextTrackSelect"===t.constructor.name){e.focus(t);break}}}Ut.registerComponent("MediaLoader",class extends Ut{constructor(e,t,n){if(super(e,q({createEl:!1},t),n),t.playerOptions.sources&&0!==t.playerOptions.sources.length)e.src(t.playerOptions.sources);else for(let i=0,r=t.playerOptions.techOrder;i<r.length;i++){const t=Mt(r[i]);let n=Pn.getTech(t);if(t||(n=Ut.getComponent(t)),n&&n.isSupported()){e.loadTech_(t);break}}}});class Kn extends Ut{constructor(e,t){super(e,t),this.options_.controlText&&this.controlText(this.options_.controlText),this.handleMouseOver_=e=>this.handleMouseOver(e),this.handleMouseOut_=e=>this.handleMouseOut(e),this.handleClick_=e=>this.handleClick(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.emitTapEvents(),this.enable()}createEl(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};t=Object.assign({className:this.buildCSSClass(),tabIndex:0},t),"button"===e&&R.error("Creating a ClickableComponent with an HTML element of ".concat(e," is not supported; use a Button instead.")),n=Object.assign({role:"button"},n),this.tabIndex_=t.tabIndex;const i=_e(e,t,n);return this.player_.options_.experimentalSvgIcons||i.appendChild(_e("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(i),i}dispose(){this.controlTextEl_=null,super.dispose()}createControlTextEl(e){return this.controlTextEl_=_e("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_}controlText(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.el();if(void 0===e)return this.controlText_||"Need Text";const n=this.localize(e);this.controlText_=e,Te(this.controlTextEl_,n),this.nonIconControl||this.player_.options_.noUITitleAttributes||t.setAttribute("title",n)}buildCSSClass(){return"vjs-control vjs-button ".concat(super.buildCSSClass())}enable(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),"undefined"!==typeof this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick_),this.on("keydown",this.handleKeyDown_))}disable(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),"undefined"!==typeof this.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off("mouseover",this.handleMouseOver_),this.off("mouseout",this.handleMouseOut_),this.off(["tap","click"],this.handleClick_),this.off("keydown",this.handleKeyDown_)}handleLanguagechange(){this.controlText(this.controlText_)}handleClick(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)}handleKeyDown(e){" "===e.key||"Enter"===e.key?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):super.handleKeyDown(e)}}Ut.registerComponent("ClickableComponent",Kn);class Zn extends Kn{constructor(e,t){super(e,t),this.update(),this.update_=e=>this.update(e),e.on("posterchange",this.update_)}dispose(){this.player().off("posterchange",this.update_),super.dispose()}createEl(){return _e("div",{className:"vjs-poster"})}crossOrigin(e){if("undefined"===typeof e)return this.$("img")?this.$("img").crossOrigin:this.player_.tech_&&this.player_.tech_.isReady_?this.player_.crossOrigin():this.player_.options_.crossOrigin||this.player_.options_.crossorigin||null;null===e||"anonymous"===e||"use-credentials"===e?this.$("img")&&(this.$("img").crossOrigin=e):this.player_.log.warn('crossOrigin must be null, "anonymous" or "use-credentials", given "'.concat(e,'"'))}update(e){const t=this.player().poster();this.setSrc(t),t?this.show():this.hide()}setSrc(e){e?(this.$("img")||this.el_.appendChild(_e("picture",{className:"vjs-poster",tabIndex:-1},{},_e("img",{loading:"lazy",crossOrigin:this.crossOrigin()},{alt:""}))),this.$("img").src=e):this.el_.textContent=""}handleClick(e){this.player_.controls()&&(this.player_.tech(!0)&&this.player_.tech(!0).focus(),this.player_.paused()?Jt(this.player_.play()):this.player_.pause())}}Zn.prototype.crossorigin=Zn.prototype.crossOrigin,Ut.registerComponent("PosterImage",Zn);const Jn="#222",$n="#ccc",ei={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',
2script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function ti(e,t){let n;if(4===e.length)n=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error("Invalid color code provided, "+e+"; must be formatted as e.g. #f0e or #f604e2.");n=e.slice(1)}return"rgba("+parseInt(n.slice(0,2),16)+","+parseInt(n.slice(2,4),16)+","+parseInt(n.slice(4,6),16)+","+t+")"}function ni(e,t,n){try{e.style[t]=n}catch(i){return}}function ii(e){return e?"".concat(e,"px"):""}Ut.registerComponent("TextTrackDisplay",class extends Ut{constructor(e,t,n){super(e,t,n);const i=e=>this.updateDisplay(e),s=e=>{this.updateDisplayOverlay(),this.updateDisplay(e)};e.on("loadstart",(e=>this.toggleDisplay(e))),e.on("useractive",i),e.on("userinactive",i),e.on("texttrackchange",i),e.on("loadedmetadata",(e=>{this.updateDisplayOverlay(),this.preselectTrack(e)})),e.ready(yt(this,(function(){if(e.tech_&&e.tech_.featuresNativeTextTracks)return void this.hide();e.on("fullscreenchange",s),e.on("playerresize",s);const t=r.a.screen.orientation||r.a,n=r.a.screen.orientation?"change":"orientationchange";t.addEventListener(n,s),e.on("dispose",(()=>t.removeEventListener(n,s)));const i=this.options_.playerOptions.tracks||[];for(let e=0;e<i.length;e++)this.player_.addRemoteTextTrack(i[e],!0);this.preselectTrack()})))}preselectTrack(){const e={captions:1,subtitles:1},t=this.player_.textTracks(),n=this.player_.cache_.selectedLanguage;let i,r,s;for(let a=0;a<t.length;a++){const o=t[a];n&&n.enabled&&n.language&&n.language===o.language&&o.kind in e?o.kind===n.kind?s=o:s||(s=o):n&&!n.enabled?(s=null,i=null,r=null):o.default&&("descriptions"!==o.kind||i?o.kind in e&&!r&&(r=o):i=o)}s?s.mode="showing":r?r.mode="showing":i&&(i.mode="showing")}toggleDisplay(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()}createEl(){return super.createEl("div",{className:"vjs-text-track-display"},{translate:"yes","aria-live":"off","aria-atomic":"true"})}clearDisplay(){"function"===typeof r.a.WebVTT&&r.a.WebVTT.processCues(r.a,[],this.el_)}updateDisplay(){const e=this.player_.textTracks(),t=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),t){const t=[];for(let n=0;n<e.length;++n){const i=e[n];"showing"===i.mode&&t.push(i)}return void this.updateForTrack(t)}let n=null,i=null,s=e.length;for(;s--;){const t=e[s];"showing"===t.mode&&("descriptions"===t.kind?n=t:i=t)}if(i?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(i)):n&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(n)),!r.a.CSS.supports("inset","10px")){const e=this.el_,t=e.querySelectorAll(".vjs-text-track-cue"),n=this.player_.controlBar.el_.getBoundingClientRect().height,i=this.player_.el_.getBoundingClientRect().height;e.style="",ni(e,"position","relative"),ni(e,"height",i-n+"px"),ni(e,"top","unset"),ni(e,"bottom",ce?i+"px":"0px"),t.length>0&&t.forEach((e=>{if(e.style.inset){const t=e.style.inset.split(" ");3===t.length&&Object.assign(e.style,{top:t[0],right:t[1],bottom:t[2],left:"unset"})}}))}}updateDisplayOverlay(){if(!this.player_.videoHeight()||!r.a.CSS.supports("inset-inline: 10px"))return;const e=this.player_.currentWidth(),t=this.player_.currentHeight(),n=e/t,i=this.player_.videoWidth()/this.player_.videoHeight();let s=0,a=0;Math.abs(n-i)>.1&&(n>i?s=Math.round((e-t*i)/2):a=Math.round((t-e/i)/2)),ni(this.el_,"insetInline",ii(s)),ni(this.el_,"insetBlock",ii(a))}updateDisplayState(e){const t=this.player_.textTrackSettings.getValues(),n=e.activeCues;let i=n.length;for(;i--;){const e=n[i];if(!e)continue;const s=e.displayState;if(t.color&&(s.firstChild.style.color=t.color),t.textOpacity&&ni(s.firstChild,"color",ti(t.color||"#fff",t.textOpacity)),t.backgroundColor&&(s.firstChild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&ni(s.firstChild,"backgroundColor",ti(t.backgroundColor||"#000",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?ni(s,"backgroundColor",ti(t.windowColor,t.windowOpacity)):s.style.backgroundColor=t.windowColor),t.edgeStyle&&("dropshadow"===t.edgeStyle?s.firstChild.style.textShadow="2px 2px 3px ".concat(Jn,", 2px 2px 4px ").concat(Jn,", 2px 2px 5px ").concat(Jn):"raised"===t.edgeStyle?s.firstChild.style.textShadow="1px 1px ".concat(Jn,", 2px 2px ").concat(Jn,", 3px 3px ").concat(Jn):"depressed"===t.edgeStyle?s.firstChild.style.textShadow="1px 1px ".concat($n,", 0 1px ").concat($n,", -1px -1px ").concat(Jn,", 0 -1px ").concat(Jn):"uniform"===t.edgeStyle&&(s.firstChild.style.textShadow="0 0 4px ".concat(Jn,", 0 0 4px ").concat(Jn,", 0 0 4px ").concat(Jn,", 0 0 4px ").concat(Jn))),t.fontPercent&&1!==t.fontPercent){const e=r.a.parseFloat(s.style.fontSize);s.style.fontSize=e*t.fontPercent+"px",s.style.height="auto",s.style.top="auto"}
2t.fontFamily&&"default"!==t.fontFamily&&("small-caps"===t.fontFamily?s.firstChild.style.fontVariant="small-caps":s.firstChild.style.fontFamily=ei[t.fontFamily])}}updateForTrack(e){if(Array.isArray(e)||(e=[e]),"function"!==typeof r.a.WebVTT||e.every((e=>!e.activeCues)))return;const t=[];for(let n=0;n<e.length;++n){const i=e[n];for(let e=0;e<i.activeCues.length;++e)t.push(i.activeCues[e])}r.a.WebVTT.processCues(r.a,t,this.el_);for(let n=0;n<e.length;++n){const t=e[n];for(let e=0;e<t.activeCues.length;++e){const i=t.activeCues[e].displayState;Ae(i,"vjs-text-track-cue","vjs-text-track-cue-"+(t.language?t.language:n)),t.language&&Ee(i,"lang",t.language)}this.player_.textTrackSettings&&this.updateDisplayState(t)}}});Ut.registerComponent("LoadingSpinner",class extends Ut{createEl(){const e=this.player_.isAudio(),t=this.localize(e?"Audio Player":"Video Player"),n=_e("span",{className:"vjs-control-text",textContent:this.localize("{1} is loading.",[t])}),i=super.createEl("div",{className:"vjs-loading-spinner",dir:"ltr"});return i.appendChild(n),i}handleLanguagechange(){this.$(".vjs-control-text").textContent=this.localize("{1} is loading.",[this.player_.isAudio()?"Audio Player":"Video Player"])}});class ri extends Kn{createEl(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};e="button",t=Object.assign({className:this.buildCSSClass()},t),n=Object.assign({type:"button"},n);const i=_e(e,t,n);return this.player_.options_.experimentalSvgIcons||i.appendChild(_e("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(i),i}addChild(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.constructor.name;return R.warn("Adding an actionable (user controllable) child to a Button (".concat(n,") is not supported; use a ClickableComponent instead.")),Ut.prototype.addChild.call(this,e,t)}enable(){super.enable(),this.el_.removeAttribute("disabled")}disable(){super.disable(),this.el_.setAttribute("disabled","disabled")}handleKeyDown(e){" "!==e.key&&"Enter"!==e.key?super.handleKeyDown(e):e.stopPropagation()}}Ut.registerComponent("Button",ri);class si extends ri{constructor(e,t){super(e,t),this.mouseused_=!1,this.setIcon("play"),this.on("mousedown",(e=>this.handleMouseDown(e)))}buildCSSClass(){return"vjs-big-play-button"}handleClick(e){const t=this.player_.play();if("tap"===e.type||this.mouseused_&&"clientX"in e&&"clientY"in e)return Jt(t),void(this.player_.tech(!0)&&this.player_.tech(!0).focus());const n=this.player_.getChild("controlBar"),i=n&&n.getChild("playToggle");if(!i)return void this.player_.tech(!0).focus();const r=()=>i.focus();Zt(t)?t.then(r,(()=>{})):this.setTimeout(r,1)}handleKeyDown(e){this.mouseused_=!1,super.handleKeyDown(e)}handleMouseDown(e){this.mouseused_=!0}}si.prototype.controlText_="Play Video",Ut.registerComponent("BigPlayButton",si);Ut.registerComponent("CloseButton",class extends ri{constructor(e,t){super(e,t),this.setIcon("cancel"),this.controlText(t&&t.controlText||this.localize("Close"))}buildCSSClass(){return"vjs-close-button ".concat(super.buildCSSClass())}handleClick(e){this.trigger({type:"close",bubbles:!1})}handleKeyDown(e){"Escape"===e.key?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):super.handleKeyDown(e)}});class ai extends ri{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(e,t),t.replay=void 0===t.replay||t.replay,this.setIcon("play"),this.on(e,"play",(e=>this.handlePlay(e))),this.on(e,"pause",(e=>this.handlePause(e))),t.replay&&this.on(e,"ended",(e=>this.handleEnded(e)))}buildCSSClass(){return"vjs-play-control ".concat(super.buildCSSClass())}handleClick(e){this.player_.paused()?Jt(this.player_.play()):this.player_.pause()}handleSeeked(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)}handlePlay(e){this.removeClass("vjs-ended","vjs-paused"),this.addClass("vjs-playing"),this.setIcon("pause"),this.controlText("Pause")}handlePause(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.setIcon("play"),this.controlText("Play")}handleEnded(e){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.setIcon("replay"),this.controlText("Replay"),this.one(this.player_,"seeked",(e=>this.handleSeeked(e)))}}ai.prototype.controlText_="Play",Ut.registerComponent("PlayToggle",ai);class oi extends Ut{constructor(e,t){super(e,t),this.on(e,["timeupdate","ended","seeking"],(e=>this.update(e))),this.updateTextNode_()}createEl(){const e=this.buildCSSClass(),t=super.createEl("div",{className:"".concat(e," vjs-time-control vjs-control")}),n=_e("span",{className:"vjs-control-text",textContent:"".concat(this.localize(this.labelText_),"\xa0")},{role:"presentation"});return t.appendChild(n),this.contentEl_=_e("span",{className:"".concat(e,"-display")},{role:"presentation"}),t.appendChild(this.contentEl_),t}dispose(){this.contentEl_=null,this.textNode_=null,super.dispose()}update(e){(this.player_.options_.enableSmoothSeeking||"seeking"!==e.type)&&this.updateContent(e)}updateTextNode_(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;e=Xt(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",(()=>{if(!this.contentEl_)return;let e=this.textNode_;e&&this.contentEl_.firstChild!==e&&(e=null,R.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")),this.textNode_=a.a.createTextNode(this.formattedTime_),this.textNode_&&(e?this.contentEl_.replaceChild(this.textNode_,e):this.contentEl_.appendChild(this.textNode_))})))}updateContent(e){}}oi.prototype.labelText_="Time",oi.prototype.controlText_="Time",Ut.registerComponent("TimeDisplay",oi);class li extends oi{buildCSSClass(){return"vjs-current-time"}updateContent(e){let t;t=this.player_.ended()?this.player_.duration():e&&e.target&&"function"===typeof e.target.pendingSeekTime?e.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(t)}}li.prototype.labelText_="Current Time",li.prototype.controlText_="Current Time",Ut.registerComponent("CurrentTimeDisplay",li);class ci extends oi{constructor(e,t){super(e,t);const n=e=>this.updateContent(e);this.on(e,"durationchange",n),this.on(e,"loadstart",n),this.on(e,"loadedmetadata",n)}buildCSSClass(){return"vjs-duration"}updateContent(e){const t=this.player_.duration();this.updateTextNode_(t)}}ci.prototype.labelText_="Duration",ci.prototype.controlText_="Duration",Ut.registerComponent("DurationDisplay",ci);Ut.registerComponent("TimeDivider",class extends Ut{createEl(){const e=super.createEl("div",{className:"vjs-time-control vjs-time-divider"},{"aria-hidden":!0}),t=super.createEl("div"),n=super.createEl("span",{textContent:"/"});return t.appendChild(n),e.appendChild(t),e}});class di extends oi{constructor(e,t){super(e,t),this.on(e,"durationchange",(e=>this.updateContent(e)))}buildCSSClass(){return"vjs-remaining-time"}createEl(){const e=super.createEl();return!1!==this.options_.displayNegative&&e.insertBefore(_e("span",{},{"aria-hidden":!0},"-"),this.contentEl_),e}updateContent(e){if("number"!==typeof this.player_.duration())return;let t;t=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(t)}}di.prototype.labelText_="Remaining Time",di.prototype.controlText_="Remaining Time",Ut.registerComponent("RemainingTimeDisplay",di);Ut.registerComponent("LiveDisplay",class extends Ut{constructor(e,t){super(e,t),this.updateShowing(),this.on(this.player(),"durationchange",(e=>this.updateShowing(e)))}createEl(){const e=super.createEl("div",{className:"vjs-live-control vjs-control"});return this.contentEl_=_e("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.contentEl_.appendChild(_e("span",{className:"vjs-control-text",textContent:"".concat(this.localize("Stream Type"),"\xa0")})),this.contentEl_.appendChild(a.a.createTextNode(this.localize("LIVE"))),e.appendChild(this.contentEl_),e}dispose(){this.contentEl_=null,super.dispose()}updateShowing(e){this.player().duration()===1/0?this.show():this.hide()}});class ui extends ri{constructor(e,t){super(e,t),this.updateLiveEdgeStatus(),this.player_.liveTracker&&(this.updateLiveEdgeStatusHandler_=e=>this.updateLiveEdgeStatus(e),this.on(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_))}createEl(){const e=super.createEl("button",{className:"vjs-seek-to-live-control vjs-control"});return this.setIcon("circle",e),this.textEl_=_e("span",{className:"vjs-seek-to-live-text",textContent:this.localize("LIVE")},{"aria-hidden":"true"}),e.appendChild(this.textEl_),e}updateLiveEdgeStatus(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute("aria-disabled",!0),this.addClass("vjs-at-live-edge"),this.controlText("Seek to live, currently playing live")):(this.setAttribute("aria-disabled",!1),this.removeClass("vjs-at-live-edge"),this.controlText("Seek to live, currently behind live"))}handleClick(){this.player_.liveTracker.seekToLiveEdge()}dispose(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_),this.textEl_=null,super.dispose()}}function hi(e,t,n){return e=Number(e),Math.min(n,Math.max(t,isNaN(e)?t:e))}ui.prototype.controlText_="Seek to live, currently playing live",Ut.registerComponent("SeekToLive",ui);var pi=Object.freeze({__proto__:null,clamp:hi});class gi extends Ut{constructor(e,t){super(e,t),this.handleMouseDown_=e=>this.handleMouseDown(e),this.handleMouseUp_=e=>this.handleMouseUp(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.handleClick_=e=>this.handleClick(e),this.handleMouseMove_=e=>this.handleMouseMove(e),this.update_=e=>this.update(e),this.bar=this.getChild(this.options_.barName),this.vertical(!!this.options_.vertical),this.enable()}enabled(){return this.enabled_}enable(){this.enabled()||(this.on("mousedown",this.handleMouseDown_),this.on("touchstart",this.handleMouseDown_),this.on("keydown",this.handleKeyDown_),this.on("click",this.handleClick_),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)}disable(){if(!this.enabled())return;const e=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown_),this.off("touchstart",this.handleMouseDown_),this.off("keydown",this.handleKeyDown_),this.off("click",this.handleClick_),this.off(this.player_,"controlsvisible",this.update_),this.off(e,"mousemove",this.handleMouseMove_),this.off(e,"mouseup",this.handleMouseUp_),this.off(e,"touchmove",this.handleMouseMove_),this.off(e,"touchend",this.handleMouseUp_),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}createEl(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.className=t.className+" vjs-slider",t=Object.assign({tabIndex:0},t),n=Object.assign({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100},n),super.createEl(e,t,n)}handleMouseDown(e){const t=this.bar.el_.ownerDocument;"mousedown"===e.type&&e.preventDefault(),"touchstart"!==e.type||J||e.preventDefault(),Pe(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(t,"mousemove",this.handleMouseMove_),this.on(t,"mouseup",this.handleMouseUp_),this.on(t,"touchmove",this.handleMouseMove_),this.on(t,"touchend",this.handleMouseUp_),this.handleMouseMove(e,!0)}handleMouseMove(e){}handleMouseUp(e){const t=this.bar.el_.ownerDocument;Re(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(t,"mousemove",this.handleMouseMove_),this.off(t,"mouseup",this.handleMouseUp_),this.off(t,"touchmove",this.handleMouseMove_),this.off(t,"touchend",this.handleMouseUp_),this.update()}update(){if(!this.el_||!this.bar)return;const e=this.getProgress();return e===this.progress_||(this.progress_=e,this.requestNamedAnimationFrame("Slider#update",(()=>{const t=this.vertical()?"height":"width";this.bar.el().style[t]=(100*e).toFixed(2)+"%"}))),e}getProgress(){return Number(hi(this.getPercent(),0,1).toFixed(4))}calculateDistance(e){const t=Me(this.el_,e);return this.vertical()?t.y:t.x}handleKeyDown(e){const t=this.options_.playerOptions.spatialNavigation,n=t&&t.enabled,i=t&&t.horizontalSeek;n?i&&"ArrowLeft"===e.key||!i&&"ArrowDown"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepBack()):i&&"ArrowRight"===e.key||!i&&"ArrowUp"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(this.pendingSeekTime()&&(this.pendingSeekTime(null),this.userSeek_(this.player_.currentTime())),super.handleKeyDown(e)):"ArrowLeft"===e.key||"ArrowDown"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepBack()):"ArrowUp"===e.key||"ArrowRight"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):super.handleKeyDown(e)}handleClick(e){e.stopPropagation(),e.preventDefault()}vertical(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")}}Ut.registerComponent("Slider",gi);const mi=(e,t)=>
vendor: 4,879 bytes, line 2
2hi(e/t*100,0,100).toFixed(2)+"%";Ut.registerComponent("LoadProgressBar",class extends Ut{constructor(e,t){super(e,t),this.partEls_=[],this.on(e,"progress",(e=>this.update(e)))}createEl(){const e=super.createEl("div",{className:"vjs-load-progress"}),t=_e("span",{className:"vjs-control-text"}),n=_e("span",{textContent:this.localize("Loaded")}),i=a.a.createTextNode(": ");return this.percentageEl_=_e("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),e.appendChild(t),t.appendChild(n),t.appendChild(i),t.appendChild(this.percentageEl_),e}dispose(){this.partEls_=null,this.percentageEl_=null,super.dispose()}update(e){this.requestNamedAnimationFrame("LoadProgressBar#update",(()=>{const e=this.player_.liveTracker,t=this.player_.buffered(),n=e&&e.isLive()?e.seekableEnd():this.player_.duration(),i=this.player_.bufferedEnd(),r=this.partEls_,s=mi(i,n);this.percent_!==s&&(this.el_.style.width=s,Te(this.percentageEl_,s),this.percent_=s);for(let a=0;a<t.length;a++){const e=t.start(a),n=t.end(a);let s=r[a];s||(s=this.el_.appendChild(_e()),r[a]=s),s.dataset.start===e&&s.dataset.end===n||(s.dataset.start=e,s.dataset.end=n,s.style.left=mi(e,i),s.style.width=mi(n-e,i))}for(let a=r.length;a>t.length;a--)this.el_.removeChild(r[a-1]);r.length=t.length}))}});Ut.registerComponent("TimeTooltip",class extends Ut{constructor(e,t){super(e,t),this.update=bt(yt(this,this.update),ft)}createEl(){return super.createEl("div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})}update(e,t,n){const i=Le(this.el_),r=De(this.player_.el()),s=e.width*t;if(!r||!i)return;let a=e.left-r.left+s,o=e.width-s+(r.right-e.right);o||(o=e.width-s,a=s);let l=i.width/2;a<l?l+=l-a:o<l&&(l=o),l<0?l=0:l>i.width&&(l=i.width),l=Math.round(l),this.el_.style.right="-".concat(l,"px"),this.write(n)}write(e){Te(this.el_,e)}updateTime(e,t,n,i){this.requestNamedAnimationFrame("TimeTooltip#updateTime",(()=>{let r;const s=this.player_.duration();if(this.player_.liveTracker&&this.player_.liveTracker.isLive()){const e=this.player_.liveTracker.liveWindow(),n=e-t*e;r=(n<1?"":"-")+Xt(n,e)}else r=Xt(n,s);this.update(e,t,r),i&&i()}))}});class fi extends Ut{constructor(e,t){super(e,t),this.setIcon("circle"),this.update=bt(yt(this,this.update),ft)}createEl(){return super.createEl("div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})}update(e,t,n){const i=this.getChild("timeTooltip");if(!i)return;const r=n&&n.target&&"function"===typeof n.target.pendingSeekTime?n.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();i.updateTime(e,t,r)}}fi.prototype.options_={children:[]},he||Y||fi.prototype.options_.children.push("timeTooltip"),Ut.registerComponent("PlayProgressBar",fi);class yi extends Ut{constructor(e,t){super(e,t),this.update=bt(yt(this,this.update),ft)}createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}update(e,t){const n=t*this.player_.duration();this.getChild("timeTooltip").updateTime(e,t,n,(()=>{this.el_.style.left="".concat(e.width*t,"px")}))}}yi.prototype.options_={children:["timeTooltip"]},Ut.registerComponent("MouseTimeDisplay",yi);class bi extends gi{constructor(e,t){(t=q(bi.prototype.options_,t)).children=[...t.children];const n=e.options_.disableSeekWhileScrubbingOnMobile&&(he||Y)||e.options_.disableSeekWhileScrubbingOnSTV;(!he&&!Y||n)&&t.children.splice(1,0,"mouseTimeDisplay"),super(e,t),this.shouldDisableSeekWhileScrubbing_=n,this.pendingSeekTime_=null,this.setEventHandlers_()}setEventHandlers_(){this.update_=yt(this,this.update),this.update=bt(this.update_,ft),this.on(this.player_,["durationchange","timeupdate"],this.update),this.on(this.player_,["ended"],this.update_),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.enableIntervalHandler_=e=>this.enableInterval_(e),this.disableIntervalHandler_=e=>this.disableInterval_(e),this.on(this.player_,["playing"],this.enableIntervalHandler_),this.on(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in a.a&&"visibilityState"in a.a&&this.on(a.a,"visibilitychange",this.toggleVisibility_)}toggleVisibility_(e){"hidden"===a.a.visibilityState?(this.cancelNamedAnimationFrame("SeekBar#update"),this.cancelNamedAnimationFrame("Slider#update"),this.disableInterval_(e)):(this.player_.ended()||this.player_.paused()||this.enableInterval_(),this.update())}enableInterval_(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,ft))}disableInterval_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&"ended"!==e.type||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)}createEl(){return super.createEl("div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})}update(e){if("hidden"===a.a.visibilityState)return;
vendor: 5,785 bytes, line 2
2const t=super.update();return this.requestNamedAnimationFrame("SeekBar#update",(()=>{const n=this.player_.ended()?this.player_.duration():this.getCurrentTime_(),i=this.player_.liveTracker;let r=this.player_.duration();i&&i.isLive()&&(r=this.player_.liveTracker.liveCurrentTime()),this.percent_!==t&&(this.el_.setAttribute("aria-valuenow",(100*t).toFixed(2)),this.percent_=t),this.currentTime_===n&&this.duration_===r||(this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[Xt(n,r),Xt(r,r)],"{1} of {2}")),this.currentTime_=n,this.duration_=r),this.bar&&this.bar.update(De(this.el()),this.getProgress(),e)})),t}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}getCurrentTime_(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}pendingSeekTime(e){if(void 0!==e)if(null!==e){const t=this.player_.duration();this.pendingSeekTime_=Math.max(0,Math.min(e,t))}else this.pendingSeekTime_=null;return this.pendingSeekTime_}getPercent(){if(null!==this.pendingSeekTime())return this.pendingSeekTime()/this.player_.duration();const e=this.getCurrentTime_();let t;const n=this.player_.liveTracker;return n&&n.isLive()?(t=(e-n.seekableStart())/n.liveWindow(),n.atLiveEdge()&&(t=1)):t=e/this.player_.duration(),t}handleMouseDown(e){ze(e)&&(e.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.shouldDisableSeekWhileScrubbing_||this.player_.pause(),super.handleMouseDown(e))}handleMouseMove(e){let t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!ze(e)||isNaN(this.player_.duration()))return;n||this.player_.scrubbing()||this.player_.scrubbing(!0);const i=this.calculateDistance(e),r=this.player_.liveTracker;if(r&&r.isLive()){if(i>=.99)return void r.seekToLiveEdge();const e=r.seekableStart(),n=r.liveCurrentTime();if(t=e+i*r.liveWindow(),t>=n&&(t=n),t<=e&&(t=e+.1),t===1/0)return}else t=i*this.player_.duration(),t===this.player_.duration()&&(t-=.1);this.shouldDisableSeekWhileScrubbing_?this.pendingSeekTime(t):this.userSeek_(t),this.player_.options_.enableSmoothSeeking&&this.update()}enable(){super.enable();const e=this.getChild("mouseTimeDisplay");e&&e.show()}disable(){super.disable();const e=this.getChild("mouseTimeDisplay");e&&e.hide()}handleMouseUp(e){super.handleMouseUp(e),e&&e.stopPropagation(),this.player_.scrubbing(!1),null!==this.pendingSeekTime()&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?Jt(this.player_.play()):this.update_()}handlePendingSeek_(e){this.player_.paused()||this.player_.pause();const t=null!==this.pendingSeekTime()?this.pendingSeekTime():this.player_.currentTime();this.pendingSeekTime(t+e),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}stepForward(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(this.options().stepSeconds):this.userSeek_(this.player_.currentTime()+this.options().stepSeconds)}stepBack(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(-this.options().stepSeconds):this.userSeek_(this.player_.currentTime()-this.options().stepSeconds)}handleAction(e){null!==this.pendingSeekTime()&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.paused()?this.player_.play():this.player_.pause()}handleKeyDown(e){const t=this.player_.liveTracker;if(" "===e.key||"Enter"===e.key)e.preventDefault(),e.stopPropagation(),this.handleAction(e);else if("Home"===e.key)e.preventDefault(),e.stopPropagation(),this.userSeek_(0);else if("End"===e.key)e.preventDefault(),e.stopPropagation(),t&&t.isLive()?this.userSeek_(t.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(e.key)){e.preventDefault(),e.stopPropagation();const n=.1*parseInt(e.key,10);t&&t.isLive()?this.userSeek_(t.seekableStart()+t.liveWindow()*n):this.userSeek_(this.player_.duration()*n)}else"PageDown"===e.key?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()-this.options().stepSeconds*this.options().pageMultiplier)):"PageUp"===e.key?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()+this.options().stepSeconds*this.options().pageMultiplier)):super.handleKeyDown(e)}dispose(){this.disableInterval_(),this.off(this.player_,["durationchange","timeupdate"],this.update),this.off(this.player_,["ended"],this.update_),this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableIntervalHandler_),this.off(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in a.a&&"visibilityState"in a.a&&this.off(a.a,"visibilitychange",this.toggleVisibility_),super.dispose()}}bi.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar",stepSeconds:5,pageMultiplier:12},Ut.registerComponent("SeekBar",bi);class vi extends Ut{constructor(e,t){super(e,t),this.handleMouseMove=bt(yt(this,this.handleMouseMove),ft),this.throttledHandleMouseSeek=bt(yt(this,this.handleMouseSeek),ft),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.handleMouseDownHandler_=e=>this.handleMouseDown(e),this.enable()}createEl(){return super.createEl("div",{className:"vjs-progress-control vjs-control"})}handleMouseMove(e){const t=this.getChild("seekBar");if(!t)return;const n=t.getChild("playProgressBar"),i=t.getChild("mouseTimeDisplay");if(!n&&!i)return;const r=t.el(),s=Le(r);let a=Me(r,e).x;a=hi(a,0,1),i&&i.update(s,a),n&&n.update(s,t.getProgress())}handleMouseSeek(e){const t=this.getChild("seekBar");t&&t.handleMouseMove(e)}enabled(){return this.enabled_}
vendor: 6,629 bytes, line 2
2disable(){if(this.children().forEach((e=>e.disable&&e.disable())),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDownHandler_),this.off(this.el_,["mousemove","touchmove"],this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass("disabled"),this.enabled_=!1,this.player_.scrubbing())){const e=this.getChild("seekBar");this.player_.scrubbing(!1),e.videoWasPlaying&&Jt(this.player_.play())}}enable(){this.children().forEach((e=>e.enable&&e.enable())),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDownHandler_),this.on(this.el_,["mousemove","touchmove"],this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)}removeListenersAddedOnMousedownAndTouchstart(){const e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseSeek),this.off(e,"touchmove",this.throttledHandleMouseSeek),this.off(e,"mouseup",this.handleMouseUpHandler_),this.off(e,"touchend",this.handleMouseUpHandler_)}handleMouseDown(e){const t=this.el_.ownerDocument,n=this.getChild("seekBar");n&&n.handleMouseDown(e),this.on(t,"mousemove",this.throttledHandleMouseSeek),this.on(t,"touchmove",this.throttledHandleMouseSeek),this.on(t,"mouseup",this.handleMouseUpHandler_),this.on(t,"touchend",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.getChild("seekBar");t&&t.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()}}vi.prototype.options_={children:["seekBar"]},Ut.registerComponent("ProgressControl",vi);class _i extends ri{constructor(e,t){super(e,t),this.setIcon("picture-in-picture-enter"),this.on(e,["enterpictureinpicture","leavepictureinpicture"],(e=>this.handlePictureInPictureChange(e))),this.on(e,["disablepictureinpicturechanged","loadedmetadata"],(e=>this.handlePictureInPictureEnabledChange(e))),this.on(e,["loadedmetadata","audioonlymodechange","audiopostermodechange"],(()=>this.handlePictureInPictureAudioModeChange())),this.disable()}buildCSSClass(){return"vjs-picture-in-picture-control vjs-hidden ".concat(super.buildCSSClass())}handlePictureInPictureAudioModeChange(){"audio"===this.player_.currentType().substring(0,5)||this.player_.audioPosterMode()||this.player_.audioOnlyMode()?(this.player_.isInPictureInPicture()&&this.player_.exitPictureInPicture(),this.hide()):this.show()}handlePictureInPictureEnabledChange(){a.a.pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()||this.player_.options_.enableDocumentPictureInPicture&&"documentPictureInPicture"in r.a?this.enable():this.disable()}handlePictureInPictureChange(e){this.player_.isInPictureInPicture()?(this.setIcon("picture-in-picture-exit"),this.controlText("Exit Picture-in-Picture")):(this.setIcon("picture-in-picture-enter"),this.controlText("Picture-in-Picture")),this.handlePictureInPictureEnabledChange()}handleClick(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()}show(){"function"===typeof a.a.exitPictureInPicture&&super.show()}}_i.prototype.controlText_="Picture-in-Picture",Ut.registerComponent("PictureInPictureToggle",_i);class Ti extends ri{constructor(e,t){super(e,t),this.setIcon("fullscreen-enter"),this.on(e,"fullscreenchange",(e=>this.handleFullscreenChange(e))),!1===a.a[e.fsApi_.fullscreenEnabled]&&this.disable()}buildCSSClass(){return"vjs-fullscreen-control ".concat(super.buildCSSClass())}handleFullscreenChange(e){this.player_.isFullscreen()?(this.controlText("Exit Fullscreen"),this.setIcon("fullscreen-exit")):(this.controlText("Fullscreen"),this.setIcon("fullscreen-enter"))}handleClick(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()}}Ti.prototype.controlText_="Fullscreen",Ut.registerComponent("FullscreenToggle",Ti);Ut.registerComponent("VolumeLevel",class extends Ut{createEl(){const e=super.createEl("div",{className:"vjs-volume-level"});return this.setIcon("circle",e),e.appendChild(super.createEl("span",{className:"vjs-control-text"})),e}});Ut.registerComponent("VolumeLevelTooltip",class extends Ut{constructor(e,t){super(e,t),this.update=bt(yt(this,this.update),ft)}createEl(){return super.createEl("div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})}update(e,t,n,i){if(!n){const n=De(this.el_),i=De(this.player_.el()),r=e.width*t;if(!i||!n)return;const s=e.left-i.left+r,a=e.width-r+(i.right-e.right);let o=n.width/2;s<o?o+=o-s:a<o&&(o=a),o<0?o=0:o>n.width&&(o=n.width),this.el_.style.right="-".concat(o,"px")}this.write("".concat(i,"%"))}write(e){Te(this.el_,e)}updateVolume(e,t,n,i,r){this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",(()=>{this.update(e,t,n,i.toFixed(0)),r&&r()}))}});class xi extends Ut{constructor(e,t){super(e,t),this.update=bt(yt(this,this.update),ft)}createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}update(e,t,n){const i=100*t;this.getChild("volumeLevelTooltip").updateVolume(e,t,n,i,(()=>{n?this.el_.style.bottom="".concat(e.height*t,"px"):this.el_.style.left="".concat(e.width*t,"px")}))}}xi.prototype.options_={children:["volumeLevelTooltip"]},Ut.registerComponent("MouseVolumeLevelDisplay",xi);class Si extends gi{constructor(e,t){super(e,t),this.on("slideractive",(e=>this.updateLastVolume_(e))),this.on(e,"volumechange",(e=>this.updateARIAAttributes(e))),e.ready((()=>this.updateARIAAttributes()))}createEl(){return super.createEl("div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})}handleMouseDown(e){ze(e)&&super.handleMouseDown(e)}handleMouseMove(e){const t=this.getChild("mouseVolumeLevelDisplay");if(t){const n=this.el(),i=De(n),r=this.vertical();let s=Me(n,e);s=r?s.y:s.x,s=hi(s,0,1),t.update(i,s,r)}ze(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))}checkMuted(){this.player_.muted()&&this.player_.muted(!1)}getPercent(){return this.player_.muted()?0:this.player_.volume()}stepForward(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)}stepBack(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)}updateARIAAttributes(e){const t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",t),this.el_.setAttribute("aria-valuetext",t+"%")}volumeAsPercentage_(){return Math.round(100*this.player_.volume())}updateLastVolume_(){const e=this.player_.volume();this.one("sliderinactive",(()=>{0===this.player_.volume()&&this.player_.lastVolume_(e)}))}}Si.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},he||Y||Si.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay"),Si.prototype.playerEvent="volumechange",Ut.registerComponent("
2VolumeBar",Si);class Ai extends Ut{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.vertical=t.vertical||!1,("undefined"===typeof t.volumeBar||F(t.volumeBar))&&(t.volumeBar=t.volumeBar||{},t.volumeBar.vertical=t.vertical),super(e,t),function(e,t){t.tech_&&!t.tech_.featuresVolumeControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresVolumeControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))}(this,e),this.throttledHandleMouseMove=bt(yt(this,this.handleMouseMove),ft),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.on("mousedown",(e=>this.handleMouseDown(e))),this.on("touchstart",(e=>this.handleMouseDown(e))),this.on("mousemove",(e=>this.handleMouseMove(e))),this.on(this.volumeBar,["focus","slideractive"],(()=>{this.volumeBar.addClass("vjs-slider-active"),this.addClass("vjs-slider-active"),this.trigger("slideractive")})),this.on(this.volumeBar,["blur","sliderinactive"],(()=>{this.volumeBar.removeClass("vjs-slider-active"),this.removeClass("vjs-slider-active"),this.trigger("sliderinactive")}))}createEl(){let e="vjs-volume-horizontal";return this.options_.vertical&&(e="vjs-volume-vertical"),super.createEl("div",{className:"vjs-volume-control vjs-control ".concat(e)})}handleMouseDown(e){const t=this.el_.ownerDocument;this.on(t,"mousemove",this.throttledHandleMouseMove),this.on(t,"touchmove",this.throttledHandleMouseMove),this.on(t,"mouseup",this.handleMouseUpHandler_),this.on(t,"touchend",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.el_.ownerDocument;this.off(t,"mousemove",this.throttledHandleMouseMove),this.off(t,"touchmove",this.throttledHandleMouseMove),this.off(t,"mouseup",this.handleMouseUpHandler_),this.off(t,"touchend",this.handleMouseUpHandler_)}handleMouseMove(e){this.volumeBar.handleMouseMove(e)}}Ai.prototype.options_={children:["volumeBar"]},Ut.registerComponent("VolumeControl",Ai);class wi extends ri{constructor(e,t){super(e,t),function(e,t){t.tech_&&!t.tech_.featuresMuteControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresMuteControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))}(this,e),this.on(e,["loadstart","volumechange"],(e=>this.update(e)))}buildCSSClass(){return"vjs-mute-control ".concat(super.buildCSSClass())}handleClick(e){const t=this.player_.volume(),n=this.player_.lastVolume_();if(0===t){const e=n<.1?.1:n;this.player_.volume(e),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())}update(e){this.updateIcon_(),this.updateControlText_()}updateIcon_(){const e=this.player_.volume();let t=3;this.setIcon("volume-high"),he&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?(this.setIcon("volume-mute"),t=0):e<.33?(this.setIcon("volume-low"),t=1):e<.67&&(this.setIcon("volume-medium"),t=2),we(this.el_,[0,1,2,3].reduce(((e,t)=>e+"".concat(t?" ":"","vjs-vol-").concat(t)),"")),Ae(this.el_,"vjs-vol-".concat(t))}updateControlText_(){const e=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e)}}wi.prototype.controlText_="Mute",Ut.registerComponent("MuteToggle",wi);class ji extends Ut{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"undefined"!==typeof t.inline?t.inline=t.inline:t.inline=!0,("undefined"===typeof t.volumeControl||F(t.volumeControl))&&(t.volumeControl=t.volumeControl||{},t.volumeControl.vertical=!t.inline),super(e,t),this.handleKeyPressHandler_=e=>this.handleKeyPress(e),this.on(e,["loadstart"],(e=>this.volumePanelState_(e))),this.on(this.muteToggle,"keyup",(e=>this.handleKeyPress(e))),this.on(this.volumeControl,"keyup",(e=>this.handleVolumeControlKeyUp(e))),this.on("keydown",(e=>this.handleKeyPress(e))),this.on("mouseover",(e=>this.handleMouseOver(e))),this.on("mouseout",(e=>this.handleMouseOut(e))),this.on(this.volumeControl,["slideractive"],this.sliderActive_),this.on(this.volumeControl,["sliderinactive"],this.sliderInactive_)}sliderActive_(){this.addClass("vjs-slider-active")}sliderInactive_(){this.removeClass("vjs-slider-active")}volumePanelState_(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")}createEl(){let e="vjs-volume-panel-horizontal";return this.options_.inline||(e="vjs-volume-panel-vertical"),super.createEl("div",{className:"vjs-volume-panel vjs-control ".concat(e)})}dispose(){this.handleMouseOut(),super.dispose()}handleVolumeControlKeyUp(e){"Escape"===e.key&&this.muteToggle.focus()}handleMouseOver(e){this.addClass("vjs-hover"),dt(a.a,"keyup",this.handleKeyPressHandler_)}handleMouseOut(e){this.removeClass("vjs-hover"),ut(a.a,"keyup",this.handleKeyPressHandler_)}handleKeyPress(e){"Escape"===e.key&&this.handleMouseOut()}}ji.prototype.options_={children:["muteToggle","volumeControl"]}
2,Ut.registerComponent("VolumePanel",ji);class ki extends ri{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipForwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon("forward-".concat(this.skipTime)),this.controlText(this.localize("Skip forward {1} seconds",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipForwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.forward}buildCSSClass(){return"vjs-skip-forward-".concat(this.getSkipForwardTime()," ").concat(super.buildCSSClass())}handleClick(e){if(isNaN(this.player_.duration()))return;const t=this.player_.currentTime(),n=this.player_.liveTracker,i=n&&n.isLive()?n.seekableEnd():this.player_.duration();let r;r=t+this.skipTime<=i?t+this.skipTime:i,this.player_.currentTime(r)}handleLanguagechange(){this.controlText(this.localize("Skip forward {1} seconds",[this.skipTime]))}}ki.prototype.controlText_="Skip Forward",Ut.registerComponent("SkipForward",ki);class Ci extends ri{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipBackwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon("replay-".concat(this.skipTime)),this.controlText(this.localize("Skip backward {1} seconds",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipBackwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.backward}buildCSSClass(){return"vjs-skip-backward-".concat(this.getSkipBackwardTime()," ").concat(super.buildCSSClass())}handleClick(e){const t=this.player_.currentTime(),n=this.player_.liveTracker,i=n&&n.isLive()&&n.seekableStart();let r;r=i&&t-this.skipTime<=i?i:t>=this.skipTime?t-this.skipTime:0,this.player_.currentTime(r)}handleLanguagechange(){this.controlText(this.localize("Skip backward {1} seconds",[this.skipTime]))}}Ci.prototype.controlText_="Skip Backward",Ut.registerComponent("SkipBackward",Ci);class Oi extends Ut{constructor(e,t){super(e,t),t&&(this.menuButton_=t.menuButton),this.focusedChild_=-1,this.on("keydown",(e=>this.handleKeyDown(e))),this.boundHandleBlur_=e=>this.handleBlur(e),this.boundHandleTapClick_=e=>this.handleTapClick(e)}addEventListenerForItem(e){e instanceof Ut&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))}removeEventListenerForItem(e){e instanceof Ut&&(this.off(e,"blur",this.boundHandleBlur_),this.off(e,["tap","click"],this.boundHandleTapClick_))}removeChild(e){"string"===typeof e&&(e=this.getChild(e)),this.removeEventListenerForItem(e),super.removeChild(e)}addItem(e){const t=this.addChild(e);t&&this.addEventListenerForItem(t)}createEl(){const e=this.options_.contentElType||"ul";this.contentEl_=_e(e,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");const t=super.createEl("div",{append:this.contentEl_,className:"vjs-menu"});return t.appendChild(this.contentEl_),dt(t,"click",(function(e){e.preventDefault(),e.stopImmediatePropagation()})),t}dispose(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,super.dispose()}handleBlur(e){const t=e.relatedTarget||a.a.activeElement;if(!this.children().some((e=>e.el()===t))){const e=this.menuButton_;e&&e.buttonPressed_&&t!==e.el().firstChild&&e.unpressButton()}}handleTapClick(e){if(this.menuButton_){this.menuButton_.unpressButton();const t=this.children();if(!Array.isArray(t))return;const n=t.filter((t=>t.el()===e.target))[0];if(!n)return;"CaptionSettingsMenuItem"!==n.name()&&this.menuButton_.focus()}}handleKeyDown(e){"ArrowLeft"===e.key||"ArrowDown"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):"ArrowRight"!==e.key&&"ArrowUp"!==e.key||(e.preventDefault(),e.stopPropagation(),this.stepBack())}stepForward(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)}stepBack(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)}focus(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;const t=this.children().slice();t.length&&t[0].hasClass("vjs-menu-title")&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())}}Ut.registerComponent("Menu",Oi);class Ei extends Ut{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(e,t),this.menuButton_=new ri(e,t),this.menuButton_.controlText(this.controlText_),this.menuButton_.el_.setAttribute("aria-haspopup","true");const n=ri.prototype.buildCSSClass();this.menuButton_.el_.className=this.buildCSSClass()+" "+n,this.menuButton_.removeClass("vjs-control"),this.addChild(this.menuButton_),this.update(),this.enabled_=!0;const i=e=>this.handleClick(e);this.handleMenuKeyUp_=e=>this.handleMenuKeyUp(e),this.on(this.menuButton_,"tap",i),this.on(this.menuButton_,"click",i),this.on(this.menuButton_,"keydown",(e=>this.handleKeyDown(e))),this.on(this.menuButton_,"mouseenter",(()=>{this.addClass("vjs-hover"),this.menu.show(),dt(a.a,"keyup",this.handleMenuKeyUp_)}
2)),this.on("mouseleave",(e=>this.handleMouseLeave(e))),this.on("keydown",(e=>this.handleSubmenuKeyDown(e)))}update(){const e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?(this.hide(),this.menu.contentEl_.removeAttribute("role")):(this.show(),this.menu.contentEl_.setAttribute("role","menu"))}createMenu(){const e=new Oi(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){const t=_e("li",{className:"vjs-menu-title",textContent:Mt(this.options_.title),tabIndex:-1}),n=new Ut(this.player_,{el:t});e.addItem(n)}if(this.items=this.createItems(),this.items)for(let t=0;t<this.items.length;t++)e.addItem(this.items[t]);return e}createItems(){}createEl(){return super.createEl("div",{className:this.buildWrapperCSSClass()},{})}setIcon(e){super.setIcon(e,this.menuButton_.el_)}buildWrapperCSSClass(){let e="vjs-menu-button";!0===this.options_.inline?e+="-inline":e+="-popup";const t=ri.prototype.buildCSSClass();return"vjs-menu-button ".concat(e," ").concat(t," ").concat(super.buildCSSClass())}buildCSSClass(){let e="vjs-menu-button";return!0===this.options_.inline?e+="-inline":e+="-popup","vjs-menu-button ".concat(e," ").concat(super.buildCSSClass())}controlText(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.menuButton_.el();return this.menuButton_.controlText(e,t)}dispose(){this.handleMouseLeave(),super.dispose()}handleClick(e){this.buttonPressed_?this.unpressButton():this.pressButton()}handleMouseLeave(e){this.removeClass("vjs-hover"),ut(a.a,"keyup",this.handleMenuKeyUp_)}focus(){this.menuButton_.focus()}blur(){this.menuButton_.blur()}handleKeyDown(e){"Escape"===e.key||"Tab"===e.key?(this.buttonPressed_&&this.unpressButton(),"Tab"===!e.key&&(e.preventDefault(),this.menuButton_.focus())):"Up"!==e.key&&("Down"!==e.key||this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled)||this.buttonPressed_||(e.preventDefault(),this.pressButton())}handleMenuKeyUp(e){"Escape"!==e.key&&"Tab"!==e.key||this.removeClass("vjs-hover")}handleSubmenuKeyPress(e){this.handleSubmenuKeyDown(e)}handleSubmenuKeyDown(e){"Escape"!==e.key&&"Tab"!==e.key||(this.buttonPressed_&&this.unpressButton(),"Tab"===!e.key&&(e.preventDefault(),this.menuButton_.focus()))}pressButton(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),he&&be())return;this.menu.focus()}}unpressButton(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute("aria-expanded","false"))}disable(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()}enable(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()}}Ut.registerComponent("MenuButton",Ei);class Ii extends Ei{constructor(e,t){const n=t.tracks;if(super(e,t),this.items.length<=1&&this.hide(),!n)return;const i=yt(this,this.update);n.addEventListener("removetrack",i),n.addEventListener("addtrack",i),n.addEventListener("labelchange",i),this.player_.on("ready",i),this.player_.on("dispose",(function(){n.removeEventListener("removetrack",i),n.removeEventListener("addtrack",i),n.removeEventListener("labelchange",i)}))}}Ut.registerComponent("TrackButton",Ii);class Pi extends Kn{constructor(e,t){super(e,t),this.selectable=t.selectable,this.isSelected_=t.selected||!1,this.multiSelectable=t.multiSelectable,this.selected(this.isSelected_),this.selectable?this.multiSelectable?this.el_.setAttribute("role","menuitemcheckbox"):this.el_.setAttribute("role","menuitemradio"):this.el_.setAttribute("role","menuitem")}createEl(e,t,n){this.nonIconControl=!0;const i=super.createEl("li",Object.assign({className:"vjs-menu-item",tabIndex:-1},t),n),r=_e("span",{className:"vjs-menu-item-text",textContent:this.localize(this.options_.label)});return this.player_.options_.experimentalSvgIcons?i.appendChild(r):i.replaceChild(r,i.querySelector(".vjs-icon-placeholder")),i}handleKeyDown(e){["Tab","Escape","ArrowUp","ArrowLeft","ArrowRight","ArrowDown"].includes(e.ke
2y)||super.handleKeyDown(e)}handleClick(e){this.selected(!0)}selected(e){this.selectable&&(e?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))}}Ut.registerComponent("MenuItem",Pi);class Ri extends Pi{constructor(e,t){var n;const i=t.track,s=e.textTracks();t.label=i.label||i.language||"Unknown",t.selected="showing"===i.mode,super(e,t),n=this,this.track=i,this.kinds=(t.kinds||[t.kind||this.track.kind]).filter(Boolean);const o=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];n.handleTracksChange.apply(n,t)},l=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];n.handleSelectedLanguageChange.apply(n,t)};if(e.on(["loadstart","texttrackchange"],o),s.addEventListener("change",o),s.addEventListener("selectedlanguagechange",l),this.on("dispose",(function(){e.off(["loadstart","texttrackchange"],o),s.removeEventListener("change",o),s.removeEventListener("selectedlanguagechange",l)})),void 0===s.onchange){let e;this.on(["tap","click"],(function(){if("object"!==typeof r.a.Event)try{e=new r.a.Event("change")}catch(t){}e||(e=a.a.createEvent("Event"),e.initEvent("change",!0,!0)),s.dispatchEvent(e)}))}this.handleTracksChange()}handleClick(e){const t=this.track,n=this.player_.textTracks();if(super.handleClick(e),n)for(let i=0;i<n.length;i++){const e=n[i];-1!==this.kinds.indexOf(e.kind)&&(e===t?"showing"!==e.mode&&(e.mode="showing"):"disabled"!==e.mode&&(e.mode="disabled"))}}handleTracksChange(e){const t="showing"===this.track.mode;t!==this.isSelected_&&this.selected(t)}handleSelectedLanguageChange(e){if("showing"===this.track.mode){const e=this.player_.cache_.selectedLanguage;if(e&&e.enabled&&e.language===this.track.language&&e.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}}dispose(){this.track=null,super.dispose()}}Ut.registerComponent("TextTrackMenuItem",Ri);class Di extends Ri{constructor(e,t){t.track={player:e,kind:t.kind,kinds:t.kinds,default:!1,mode:"disabled"},t.kinds||(t.kinds=[t.kind]),t.label?t.track.label=t.label:t.track.label=t.kinds.join(" and ")+" off",t.selectable=!0,t.multiSelectable=!1,super(e,t)}handleTracksChange(e){const t=this.player().textTracks();let n=!0;for(let i=0,r=t.length;i<r;i++){const e=t[i];if(this.options_.kinds.indexOf(e.kind)>-1&&"showing"===e.mode){n=!1;break}}n!==this.isSelected_&&this.selected(n)}handleSelectedLanguageChange(e){const t=this.player().textTracks();let n=!0;for(let i=0,r=t.length;i<r;i++){const e=t[i];if(["captions","descriptions","subtitles"].indexOf(e.kind)>-1&&"showing"===e.mode){n=!1;break}}n&&(this.player_.cache_.selectedLanguage={enabled:!1})}handleLanguagechange(){this.$(".vjs-menu-item-text").textContent=this.player_.localize(this.options_.label),super.handleLanguagechange()}}Ut.registerComponent("OffTextTrackMenuItem",Di);class Li extends Ii{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.tracks=e.textTracks(),super(e,t)}createItems(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ri;this.label_&&(e="".concat(this.label_," off")),t.push(new Di(this.player_,{kinds:this.kinds_,kind:this.kind_,label:e})),this.hideThreshold_+=1;const i=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(let r=0;r<i.length;r++){const e=i[r];if(this.kinds_.indexOf(e.kind)>-1){const i=new n(this.player_,{track:e,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});i.addClass("vjs-".concat(e.kind,"-menu-item")),t.push(i)}}return t}}Ut.registerComponent("TextTrackButton",Li);class Mi extends Pi{constructor(e,t){const n=t.track,i=t.cue,r=e.currentTime();t.selectable=!0,t.multiSelectable=!1,t.label=i.text,t.selected=i.startTime<=r&&r<i.endTime,super(e,t),this.track=n,this.cue=i}handleClick(e){super.handleClick(),this.player_.currentTime(this.cue.startTime)}}Ut.registerComponent("ChaptersTrackMenuItem",Mi);class Ni extends Li{constructor(e,t,n){super(e,t,n),this.setIcon("chapters"),this.selectCurrentItem_=()=>
2{this.items.forEach((e=>{e.selected(this.track_.activeCues[0]===e.cue)}))}}buildCSSClass(){return"vjs-chapters-button ".concat(super.buildCSSClass())}buildWrapperCSSClass(){return"vjs-chapters-button ".concat(super.buildWrapperCSSClass())}update(e){if(e&&e.track&&"chapters"!==e.track.kind)return;const t=this.findChaptersTrack();t!==this.track_?(this.setTrack(t),super.update()):(!this.items||t&&t.cues&&t.cues.length!==this.items.length)&&super.update()}setTrack(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.removeEventListener("load",this.updateHandler_),this.track_.removeEventListener("cuechange",this.selectCurrentItem_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode="hidden";const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.addEventListener("load",this.updateHandler_),this.track_.addEventListener("cuechange",this.selectCurrentItem_)}}}findChaptersTrack(){const e=this.player_.textTracks()||[];for(let t=e.length-1;t>=0;t--){const n=e[t];if(n.kind===this.kind_)return n}}getMenuCaption(){return this.track_&&this.track_.label?this.track_.label:this.localize(Mt(this.kind_))}createMenu(){return this.options_.title=this.getMenuCaption(),super.createMenu()}createItems(){const e=[];if(!this.track_)return e;const t=this.track_.cues;if(!t)return e;for(let n=0,i=t.length;n<i;n++){const i=t[n],r=new Mi(this.player_,{track:this.track_,cue:i});e.push(r)}return e}}Ni.prototype.kind_="chapters",Ni.prototype.controlText_="Chapters",Ut.registerComponent("ChaptersButton",Ni);class Bi extends Li{constructor(e,t,n){super(e,t,n),this.setIcon("audio-description");const i=e.textTracks(),r=yt(this,this.handleTracksChange);i.addEventListener("change",r),this.on("dispose",(function(){i.removeEventListener("change",r)}))}handleTracksChange(e){const t=this.player().textTracks();let n=!1;for(let i=0,r=t.length;i<r;i++){const e=t[i];if(e.kind!==this.kind_&&"showing"===e.mode){n=!0;break}}n?this.disable():this.enable()}buildCSSClass(){return"vjs-descriptions-button ".concat(super.buildCSSClass())}buildWrapperCSSClass(){return"vjs-descriptions-button ".concat(super.buildWrapperCSSClass())}}Bi.prototype.kind_="descriptions",Bi.prototype.controlText_="Descriptions",Ut.registerComponent("DescriptionsButton",Bi);class Ui extends Li{constructor(e,t,n){super(e,t,n),this.setIcon("subtitles")}buildCSSClass(){return"vjs-subtitles-button ".concat(super.buildCSSClass())}buildWrapperCSSClass(){return"vjs-subtitles-button ".concat(super.buildWrapperCSSClass())}}Ui.prototype.kind_="subtitles",Ui.prototype.controlText_="Subtitles",Ut.registerComponent("SubtitlesButton",Ui);class Fi extends Ri{constructor(e,t){t.track={player:e,kind:t.kind,label:t.kind+" settings",selectable:!1,default:!1,mode:"disabled"},t.selectable=!1,t.name="CaptionSettingsMenuItem",super(e,t),this.addClass("vjs-texttrack-settings"),this.controlText(", opens "+t.kind+" settings dialog")}handleClick(e){this.player().getChild("textTrackSettings").open()}handleLanguagechange(){this.$(".vjs-menu-item-text").textContent=this.player_.localize(this.options_.kind+" settings"),super.handleLanguagechange()}}Ut.registerComponent("CaptionSettingsMenuItem",Fi);class qi extends Li{constructor(e,t,n){super(e,t,n),this.setIcon("captions")}buildCSSClass(){return"vjs-captions-button ".concat(super.buildCSSClass())}buildWrapperCSSClass(){return"vjs-captions-button ".concat(super.buildWrapperCSSClass())}createItems(){const e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(e.push(new Fi(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),super.createItems(e)}}qi.prototype.kind_="captions",qi.prototype.controlText_="Captions",Ut.registerComponent("CaptionsButton",qi);class zi extends Ri{createEl(e,t,n){const i=super.createEl(e,t,n),r=i.querySelector(".vjs-menu-item-text");return"captions"===this.options_.track.kind&&(this.player_.options_.experimentalSvgIcons?this.setIcon("captions",i):r.appendChild(_e("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),r.appendChild(_e("span",{className:"vjs-control-text",textContent:" ".concat(this.localize("Captions"))}))),i}}Ut.registerComponent("SubsCapsMenuItem",zi);class Vi extends Li{constructor(e){super(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}),this.label_="subtitles",this.setIcon("subtitles"),["en","en-us","en-ca","fr-ca"].indexOf(this.player_.language_)>-1&&(this.label_="captions",this.setIcon("captions")),this.menuButton_.controlText(Mt(this.label_))}buildCSSClass(){return"vjs-subs-caps-button ".concat(super.buildCSSClass())}buildWrapperCSSClass(){return"vjs-subs-caps-button ".concat(super.buildWrapperCSSClass())}createItems(){let e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(e.push(new Fi(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=super.createItems(e,zi),e}}Vi.prototype.kinds_=["captions","subtitles"],Vi.prototype.controlText_="Subtitles",Ut.registerComponent("SubsCapsButton",Vi);class Hi extends Pi{constructor(e,t){var n;const i=t.track,r=e.audioTracks();t.label=i.label||i.language||"Unknown",t.selected=i.enabled,super(e,t),n=this,this.track=i,this.addClass("vjs-".concat(i.kind,"-menu-item"));const s=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];n.handleTracksChange.apply(n,t)};r.addEventListener("change",s),this.on("dispose",(()=>{r.removeEventListener("change",s)}))}createEl(e,t,n){const i=super.createEl(e,t,n),r=i.querySelector(".vjs-menu-item-text");return["main-desc","descriptions"].indexOf(this.options_.track.kind)>=0&&(r.appendChild(_e("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),r.appendChild(_e("span",{className:"vjs-control-text",textContent:" "+this.localize("Descriptions")}))),i}handleClick(e){if(super.handleClick(e),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks){const e=this.player_.audioTracks();for(let t=0;t<e.length;t++){const n=e[t];n!==this.track&&(n.enabled=n===this.track)}}}handleTracksChange(e){this.selected(this.track.enabled)}}Ut.registerComponent("AudioTrackMenuItem",Hi);class Wi extends Ii{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.tracks=e.audioTracks(),super(e,t),this.setIcon("audio")}buildCSSClass(){return"vjs-audio-button ".concat(super.buildCSSClass())}buildWrapperCSSClass(){return"vjs-audio-button ".concat(super.buildWrapperCSSClass())}createItems(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.hideThreshold_=1;const t=this.player_.audioTracks();for(let n=0;n<t.length;n++){const i=t[n];e.push(new Hi(this.player_,{track:i,selectable:!0,multiSelectable:!1}))}return e}}Wi.prototype.controlText_="Audio Track",Ut.registerComponent("AudioTrackButton",Wi);class Gi extends Pi{constructor(e,t){const n=t.rate,i=parseFloat(n,10);t.label=n,t.selected=i===e.playbackRate(),t.selectable=!0,t.multiSelectable=!1,super(e,t),this.label=n,this.rate=i,this.on(e,"ratechange",(e=>this.update(e)))}handleClick(e){super.handleClick(),this.player().playbackRate(this.rate)}update(e){this.selected(this.player().playbackRate()===this.rate)}}Gi.prototype.contentElType="button",Ut.registerComponent("PlaybackRateMenuItem",Gi);
2class Xi extends Ei{constructor(e,t){super(e,t),this.menuButton_.el_.setAttribute("aria-describedby",this.labelElId_),this.updateVisibility(),this.updateLabel(),this.on(e,"loadstart",(e=>this.updateVisibility(e))),this.on(e,"ratechange",(e=>this.updateLabel(e))),this.on(e,"playbackrateschange",(e=>this.handlePlaybackRateschange(e)))}createEl(){const e=super.createEl();return this.labelElId_="vjs-playback-rate-value-label-"+this.id_,this.labelEl_=_e("div",{className:"vjs-playback-rate-value",id:this.labelElId_,textContent:"1x"}),e.appendChild(this.labelEl_),e}dispose(){this.labelEl_=null,super.dispose()}buildCSSClass(){return"vjs-playback-rate ".concat(super.buildCSSClass())}buildWrapperCSSClass(){return"vjs-playback-rate ".concat(super.buildWrapperCSSClass())}createItems(){const e=this.playbackRates(),t=[];for(let n=e.length-1;n>=0;n--)t.push(new Gi(this.player(),{rate:e[n]+"x"}));return t}handlePlaybackRateschange(e){this.update()}playbackRates(){const e=this.player();return e.playbackRates&&e.playbackRates()||[]}playbackRateSupported(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0}updateVisibility(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")}updateLabel(e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+"x")}}Xi.prototype.controlText_="Playback Rate",Ut.registerComponent("PlaybackRateMenuButton",Xi);class Yi extends Ut{buildCSSClass(){return"vjs-spacer ".concat(super.buildCSSClass())}createEl(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.className||(t.className=this.buildCSSClass()),super.createEl(e,t,n)}}Ut.registerComponent("Spacer",Yi);Ut.registerComponent("CustomControlSpacer",class extends Yi{buildCSSClass(){return"vjs-custom-control-spacer ".concat(super.buildCSSClass())}createEl(){return super.createEl("div",{className:this.buildCSSClass(),textContent:"\xa0"})}});class Qi extends Ut{createEl(){return super.createEl("div",{className:"vjs-control-bar",dir:"ltr"})}}Qi.prototype.options_={children:["playToggle","skipBackward","skipForward","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","pictureInPictureToggle","fullscreenToggle"]},Ut.registerComponent("ControlBar",Qi);class Ki extends sn{constructor(e,t){super(e,t),this.on(e,"error",(e=>{this.open(e)}))}buildCSSClass(){return"vjs-error-display ".concat(super.buildCSSClass())}content(){const e=this.player().error();return e?this.localize(e.message):""}}Ki.prototype.options_=Object.assign({},sn.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),Ut.registerComponent("ErrorDisplay",Ki);class Zi extends Ut{constructor(e){super(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}),this.el_.setAttribute("aria-labelledby",this.selectLabelledbyIds)}createEl(){this.selectLabelledbyIds=[this.options_.legendId,this.options_.labelId].join(" ").trim();return _e("select",{id:this.options_.id},{},this.options_.SelectOptions.map((e=>{const t=(this.options_.labelId?this.options_.labelId:"vjs-track-option-".concat(rt()))+"-"+e[1].replace(/\W+/g,""),n=_e("option",{id:t,value:this.localize(e[0]),textContent:this.localize(e[1])});return n.setAttribute("aria-labelledby","".concat(this.selectLabelledbyIds," ").concat(t)),n})))}}Ut.registerComponent("TextTrackSelect",Zi);class Ji extends Ut{constructor(e){super(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{});const t=_e("legend",{textContent:this.localize(this.options_.legendText),id:this.options_.legendId});this.el().appendChild(t);const n=this.options_.selects;for(const i of n){const t=this.options_.selectConfigs[i],n=t.className,r=t.id.replace("%s",this.options_.id_);let s=null;const a="vjs_select_".concat(rt());if("colors"===this.options_.type){s=_e("span",{className:n});const e=_e("label",{id:r,className:"vjs-label",textContent:this.localize(t.label)});e.setAttribute("for",a),s.appendChild(e)}const o=new Zi(e,{SelectOptions:t.options,legendId:this.options_.legendId,id:a,labelId:r});this.addChild(o),"colors"===this.options_.type&&(s.appendChild(o.el()),this.el().appendChild(s))}}createEl(){return _e("fieldset",{className:this.options_.className})}}Ut.registerComponent("TextTrackFieldset",Ji);class $i extends Ut{constructor(e){super(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{});const t=this.options_.textTrackComponentid,n=new Ji(e,{id_:t,legendId:"captions-text-legend-".concat(t),legendText:this.localize("Text"),className:"vjs-fg vjs-track-setting",selects:this.options_.fieldSets[
20],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(n);const i=new Ji(e,{id_:t,legendId:"captions-background-".concat(t),legendText:this.localize("Text Background"),className:"vjs-bg vjs-track-setting",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(i);const r=new Ji(e,{id_:t,legendId:"captions-window-".concat(t),legendText:this.localize("Caption Area Background"),className:"vjs-window vjs-track-setting",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(r)}createEl(){return _e("div",{className:"vjs-track-settings-colors"})}}Ut.registerComponent("TextTrackSettingsColors",$i);class er extends Ut{constructor(e){super(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{});const t=this.options_.textTrackComponentid,n=new Ji(e,{id_:t,legendId:"captions-font-size-".concat(t),legendText:"Font Size",className:"vjs-font-percent vjs-track-setting",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:"font"});this.addChild(n);const i=new Ji(e,{id_:t,legendId:"captions-edge-style-".concat(t),legendText:this.localize("Text Edge Style"),className:"vjs-edge-style vjs-track-setting",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:"font"});this.addChild(i);const r=new Ji(e,{id_:t,legendId:"captions-font-family-".concat(t),legendText:this.localize("Font Family"),className:"vjs-font-family vjs-track-setting",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:"font"});this.addChild(r)}createEl(){return _e("div",{className:"vjs-track-settings-font"})}}Ut.registerComponent("TextTrackSettingsFont",er);class tr extends Ut{constructor(e){super(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{});const t=new ri(e,{controlText:this.localize("restore all settings to the default values"),className:"vjs-default-button"});t.el().classList.remove("vjs-control","vjs-button"),t.el().textContent=this.localize("Reset"),this.addChild(t);const n=this.localize("Done"),i=new ri(e,{controlText:n,className:"vjs-done-button"});i.el().classList.remove("vjs-control","vjs-button"),i.el().textContent=n,this.addChild(i)}createEl(){return _e("div",{className:"vjs-track-settings-controls"})}}Ut.registerComponent("TrackSettingsControls",tr);const nr="vjs-text-track-settings",ir=["#000","Black"],rr=["#00F","Blue"],sr=["#0FF","Cyan"],ar=["#0F0","Green"],or=["#F0F","Magenta"],lr=["#F00","Red"],cr=["#FFF","White"],dr=["#FF0","Yellow"],ur=["1","Opaque"],hr=["0.5","Semi-Transparent"],pr=["0","Transparent"],gr={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[ir,cr,lr,ar,rr,dr,or,sr],className:"vjs-bg-color"},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Opacity",options:[ur,hr,pr],className:"vjs-bg-opacity vjs-opacity"},color:{selector:".vjs-text-color > select",id:"captions-foreground-color-%s",label:"Color",options:[cr,ir,lr,ar,rr,dr,or,sr],className:"vjs-text-color"},edgeStyle:{selector:".vjs-edge-style > select",id:"",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Drop shadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:e=>"1.00"===e?null:Number(e)},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Opacity",options:[ur,hr],className:"vjs-text-opacity vjs-opacity"},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color",className:"vjs-window-color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Opacity",options:[pr,hr,ur],className:"vjs-window-opacity vjs-opacity"}};function mr(e,t){if(t&&(e=t(e)),e&&"none"!==e)return e}gr.windowColor.options=gr.backgroundColor.options;Ut.registerComponent("TextTrackSettings",class extends sn{constructor(e,t){t.temporary=!1,super(e,t),this.updateDisplay=this.updateDisplay.bind(this),this.fill(),this.hasBeenOpened_=this.hasBeenFilled_=!0,this.renderModalComponents(e),this.endDialog=_e("p",{className:"vjs-control-text",textContent:this.localize("End of dialog window.")}),this.el().appendChild(this.endDialog),this.setDefaults(),void 0===t.persistTextTrackSettings&&(this.options_.persistTextTrackSettings=this.options_.playerOptions.persistTextTrackSettings),this.bindFunctionsToSelectsAndButtons(),this.options_.persistTextTrackSettings&&this.restoreSettings()}renderModalComponents(e){const t=new $i(e,{textTrackComponentid:this.id_,selectConfigs:gr,fieldSets:[["color","textOpacity"],["backgroundColor","backgroundOpacity"],["windowColor","windowOpacity"]]});this.addChild(t);const n=new er(e,{textTrackComponentid:this.id_,selectConfigs:gr,fieldSets:[["fontPercent"],["edgeStyle"],["fontFamily"]]});this.addChild(n);const i=new tr(e);this.addChild(i)}bindFunctionsToSelectsAndButtons(){this.on(this.$(".vjs-done-button"),["click","tap"],(()=>{this.saveSettings(),this.close()})),this.on(this.$(".vjs-default-button"),["click","tap"],(()=>{this.setDefaults(),this.updateDisplay()})),N(gr,(e=>{this.on(this.$(e.selector),"change",this.updateDisplay)}))}dispose(){this.endDialog=null,super.dispose()}label(){return this.localize("Caption Settings Dialog")}description(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")}buildCSSClass(){return super.buildCSSClass()+" vjs-text-track-settings"}
vendor: 5,515 bytes, line 2
2getValues(){return B(gr,((e,t,n)=>{const i=(r=this.$(t.selector),s=t.parser,mr(r.options[r.options.selectedIndex].value,s));var r,s;return void 0!==i&&(e[n]=i),e}),{})}setValues(e){N(gr,((t,n)=>{!function(e,t,n){if(t)for(let i=0;i<e.options.length;i++)if(mr(e.options[i].value,n)===t){e.selectedIndex=i;break}}(this.$(t.selector),e[n],t.parser)}))}setDefaults(){N(gr,(e=>{const t=e.hasOwnProperty("default")?e.default:0;this.$(e.selector).selectedIndex=t}))}restoreSettings(){let e;try{e=JSON.parse(r.a.localStorage.getItem(nr))}catch(t){R.warn(t)}e&&this.setValues(e)}saveSettings(){if(!this.options_.persistTextTrackSettings)return;const e=this.getValues();try{Object.keys(e).length?r.a.localStorage.setItem(nr,JSON.stringify(e)):r.a.localStorage.removeItem(nr)}catch(t){R.warn(t)}}updateDisplay(){const e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()}handleLanguagechange(){this.fill(),this.renderModalComponents(this.player_),this.bindFunctionsToSelectsAndButtons()}});Ut.registerComponent("ResizeManager",class extends Ut{constructor(e,t){let n=t.ResizeObserver||r.a.ResizeObserver;null===t.ResizeObserver&&(n=!1);super(e,q({createEl:!n,reportTouchActivity:!1},t)),this.ResizeObserver=t.ResizeObserver||r.a.ResizeObserver,this.loadListener_=null,this.resizeObserver_=null,this.debouncedHandler_=vt((()=>{this.resizeHandler()}),100,!1,this),n?(this.resizeObserver_=new this.ResizeObserver(this.debouncedHandler_),this.resizeObserver_.observe(e.el())):(this.loadListener_=()=>{if(!this.el_||!this.el_.contentWindow)return;const e=this.debouncedHandler_;let t=this.unloadListener_=function(){ut(this,"resize",e),ut(this,"unload",t),t=null};dt(this.el_.contentWindow,"unload",t),dt(this.el_.contentWindow,"resize",e)},this.one("load",this.loadListener_))}createEl(){return super.createEl("iframe",{className:"vjs-resize-manager",tabIndex:-1,title:this.localize("No content")},{"aria-hidden":"true"})}resizeHandler(){this.player_&&this.player_.trigger&&this.player_.trigger("playerresize")}dispose(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off("load",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,super.dispose()}});const fr={trackingThreshold:20,liveTolerance:15};Ut.registerComponent("LiveTracker",class extends Ut{constructor(e,t){super(e,q(fr,t,{createEl:!1})),this.trackLiveHandler_=()=>this.trackLive_(),this.handlePlay_=e=>this.handlePlay(e),this.handleFirstTimeupdate_=e=>this.handleFirstTimeupdate(e),this.handleSeeked_=e=>this.handleSeeked(e),this.seekToLiveEdge_=e=>this.seekToLiveEdge(e),this.reset_(),this.on(this.player_,"durationchange",(e=>this.handleDurationchange(e))),this.on(this.player_,"canplay",(()=>this.toggleTracking()))}trackLive_(){const e=this.player_.seekable();if(!e||!e.length)return;const t=Number(r.a.performance.now().toFixed(4)),n=-1===this.lastTime_?0:(t-this.lastTime_)/1e3;this.lastTime_=t,this.pastSeekEnd_=this.pastSeekEnd()+n;const i=this.liveCurrentTime(),s=this.player_.currentTime();let a=this.player_.paused()||this.seekedBehindLive_||Math.abs(i-s)>this.options_.liveTolerance;this.timeupdateSeen_&&i!==1/0||(a=!1),a!==this.behindLiveEdge_&&(this.behindLiveEdge_=a,this.trigger("liveedgechange"))}handleDurationchange(){this.toggleTracking()}toggleTracking(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass("vjs-liveui"),this.startTracking()):(this.player_.removeClass("vjs-liveui"),this.stopTracking())}startTracking(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,ft),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,"seeked",this.handleSeeked_):(this.one(this.player_,"play",this.handlePlay_),this.one(this.player_,"timeupdate",this.handleFirstTimeupdate_)))}handleFirstTimeupdate(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked_)}handleSeeked(){const e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()}handlePlay(){this.one(this.player_,"timeupdate",this.seekToLiveEdge_)}reset_(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,["play","pause"],this.trackLiveHandler_),this.off(this.player_,"seeked",this.handleSeeked_),this.off(this.player_,"play",this.handlePlay_),this.off(this.player_,"timeupdate",this.handleFirstTimeupdate_),this.off(this.player_,"timeupdate",this.seekToLiveEdge_)}nextSeekedFromUser(){this.nextSeekedFromUser_=!0}stopTracking(){this.isTracking()&&(this.reset_(),this.trigger("liveedgechange"))}seekableEnd(){const e=this.player_.seekable(),t=[];let n=e?e.length:0;for(;n--;)t.push(e.end(n));return t.length?t.sort()[t.length-1]:1/0}seekableStart(){const e=this.player_.seekable(),t=[];let n=e?e.length:0;for(;n--;)t.push(e.start(n));return t.length?t.sort()[0]:0}
2liveWindow(){const e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()}isLive(){return this.isTracking()}atLiveEdge(){return!this.behindLiveEdge()}liveCurrentTime(){return this.pastSeekEnd()+this.seekableEnd()}pastSeekEnd(){const e=this.seekableEnd();return-1!==this.lastSeekEnd_&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_}behindLiveEdge(){return this.behindLiveEdge_}isTracking(){return"number"===typeof this.trackingInterval_}seekToLiveEdge(){this.seekedBehindLive_=!1,this.atLiveEdge()||(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))}dispose(){this.stopTracking(),super.dispose()}});Ut.registerComponent("TitleBar",class extends Ut{constructor(e,t){super(e,t),this.on("statechanged",(e=>this.updateDom_())),this.updateDom_()}createEl(){return this.els={title:_e("div",{className:"vjs-title-bar-title",id:"vjs-title-bar-title-".concat(rt())}),description:_e("div",{className:"vjs-title-bar-description",id:"vjs-title-bar-description-".concat(rt())})},_e("div",{className:"vjs-title-bar"},{},z(this.els))}updateDom_(){const e=this.player_.tech_,t=e&&e.el_,n={title:"aria-labelledby",description:"aria-describedby"};["title","description"].forEach((e=>{const i=this.state[e],r=this.els[e],s=n[e];Be(r),i&&Te(r,i),t&&(t.removeAttribute(s),i&&t.setAttribute(s,r.id))})),this.state.title||this.state.description?this.show():this.hide()}update(e){this.setState(e)}dispose(){const e=this.player_.tech_,t=e&&e.el_;t&&(t.removeAttribute("aria-labelledby"),t.removeAttribute("aria-describedby")),super.dispose(),this.els=null}});const yr={initialDisplay:4e3,position:[],takeFocus:!1};Ut.registerComponent("TransientButton",class extends ri{constructor(e,t){super(e,t=q(yr,t)),this.controlText(t.controlText),this.hide(),this.on(this.player_,["useractive","userinactive"],(e=>{this.removeClass("force-display")}))}buildCSSClass(){return"vjs-transient-button focus-visible ".concat(this.options_.position.map((e=>"vjs-".concat(e))).join(" "))}createEl(){const e=_e("button",{},{type:"button",class:this.buildCSSClass()},_e("span"));return this.controlTextEl_=e.querySelector("span"),e}show(){super.show(),this.addClass("force-display"),this.options_.takeFocus&&this.el().focus({preventScroll:!0}),this.forceDisplayTimeout=this.player_.setTimeout((()=>{this.removeClass("force-display")}),this.options_.initialDisplay)}hide(){this.removeClass("force-display"),super.hide()}dispose(){this.player_.clearTimeout(this.forceDisplayTimeout),super.dispose()}});const br=e=>{const t=e.el();if(t.hasAttribute("src"))return e.triggerSourceset(t.src),!0;const n=e.$$("source"),i=[];let r="";if(!n.length)return!1;for(let s=0;s<n.length;s++){const e=n[s].src;e&&-1===i.indexOf(e)&&i.push(e)}return!!i.length&&(1===i.length&&(r=i[0]),e.triggerSourceset(r),!0)},vr=Object.defineProperty({},"innerHTML",{get(){return this.cloneNode(!0).innerHTML},set(e){const t=a.a.createElement(this.nodeName.toLowerCase());t.innerHTML=e;const n=a.a.createDocumentFragment();for(;t.childNodes.length;)n.appendChild(t.childNodes[0]);return this.innerText="",r.a.Element.prototype.appendChild.call(this,n),this.innerHTML}}),_r=(e,t)=>{let n={};for(let i=0;i<e.length&&(n=Object.getOwnPropertyDescriptor(e[i],t),!(n&&n.set&&n.get));i++);return n.enumerable=!0,n.configurable=!0,n},Tr=function(e){const t=e.el();if(t.resetSourceWatch_)return;const n={},i=(e=>_r([e.el(),r.a.HTMLMediaElement.prototype,r.a.Element.prototype,vr],"innerHTML"))(e),s=n=>function(){for(var i=arguments.length,r=new Array(i),s=0;s<i;s++)r[s]=arguments[s];const a=n.apply(t,r);return br(e),a};["append","appendChild","insertAdjacentHTML"].forEach((e=>{t[e]&&(n[e]=t[e],t[e]=s(n[e]))})),Object.defineProperty(t,"innerHTML",q(i,{set:s(i.set)})),t.resetSourceWatch_=()=>{t.resetSourceWatch_=null,Object.keys(n).forEach((e=>{t[e]=n[e]})),Object.defineProperty(t,"innerHTML",i)},e.one("sourceset",t.resetSourceWatch_)},xr=Object.defineProperty({},"src",{get(){return this.hasAttribute("src")?vn(r.a.Element.prototype.getAttribute.call(this,"src")):""},set(e){return r.a.Element.prototype.setAttribute.call(this,"src",e),e}}),Sr=function(e){if(!e.featuresSourceset)return;
2const t=e.el();if(t.resetSourceset_)return;const n=(e=>_r([e.el(),r.a.HTMLMediaElement.prototype,xr],"src"))(e),i=t.setAttribute,s=t.load;Object.defineProperty(t,"src",q(n,{set:i=>{const r=n.set.call(t,i);return e.triggerSourceset(t.src),r}})),t.setAttribute=(n,r)=>{const s=i.call(t,n,r);return/src/i.test(n)&&e.triggerSourceset(t.src),s},t.load=()=>{const n=s.call(t);return br(e)||(e.triggerSourceset(""),Tr(e)),n},t.currentSrc?e.triggerSourceset(t.currentSrc):br(e)||Tr(e),t.resetSourceset_=()=>{t.resetSourceset_=null,t.load=s,t.setAttribute=i,Object.defineProperty(t,"src",n),t.resetSourceWatch_&&t.resetSourceWatch_()}};class Ar extends Pn{constructor(e,t){super(e,t);const n=e.source;let i=!1;if(this.featuresVideoFrameCallback=this.featuresVideoFrameCallback&&"VIDEO"===this.el_.tagName,n&&(this.el_.currentSrc!==n.src||e.tag&&3===e.tag.initNetworkState_)?this.setSource(n):this.handleLateInit_(this.el_),e.enableSourceset&&this.setupSourcesetHandling_(),this.isScrubbing_=!1,this.el_.hasChildNodes()){const e=this.el_.childNodes;let t=e.length;const n=[];for(;t--;){const r=e[t];"track"===r.nodeName.toLowerCase()&&(this.featuresNativeTextTracks?(this.remoteTextTrackEls().addTrackElement_(r),this.remoteTextTracks().addTrack(r.track),this.textTracks().addTrack(r.track),i||this.el_.hasAttribute("crossorigin")||!Tn(r.src)||(i=!0)):n.push(r))}for(let i=0;i<n.length;i++)this.el_.removeChild(n[i])}this.proxyNativeTracks_(),this.featuresNativeTextTracks&&i&&R.warn("Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\nThis may prevent text tracks from loading."),this.restoreMetadataTracksInIOSNativePlayer_(),(de||ae)&&!0===e.nativeControlsForTouch&&this.setControls(!0),this.proxyWebkitFullscreen_(),this.triggerReady()}dispose(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),Ar.disposeMediaElement(this.el_),this.options_=null,super.dispose()}setupSourcesetHandling_(){Sr(this)}restoreMetadataTracksInIOSNativePlayer_(){const e=this.textTracks();let t;const n=()=>{t=[];for(let n=0;n<e.length;n++){const i=e[n];"metadata"===i.kind&&t.push({track:i,storedMode:i.mode})}};n(),e.addEventListener("change",n),this.on("dispose",(()=>e.removeEventListener("change",n)));const i=()=>{for(let e=0;e<t.length;e++){const n=t[e];"disabled"===n.track.mode&&n.track.mode!==n.storedMode&&(n.track.mode=n.storedMode)}e.removeEventListener("change",i)};this.on("webkitbeginfullscreen",(()=>{e.removeEventListener("change",n),e.removeEventListener("change",i),e.addEventListener("change",i)})),this.on("webkitendfullscreen",(()=>{e.removeEventListener("change",n),e.addEventListener("change",n),e.removeEventListener("change",i)}))}overrideNative_(e,t){if(t!==this["featuresNative".concat(e,"Tracks")])return;const n=e.toLowerCase();this["".concat(n,"TracksListeners_")]&&Object.keys(this["".concat(n,"TracksListeners_")]).forEach((e=>{this.el()["".concat(n,"Tracks")].removeEventListener(e,this["".concat(n,"TracksListeners_")][e])})),this["featuresNative".concat(e,"Tracks")]=!t,this["".concat(n,"TracksListeners_")]=null,this.proxyNativeTracksForType_(n)}overrideNativeAudioTracks(e){this.overrideNative_("Audio",e)}overrideNativeVideoTracks(e){this.overrideNative_("Video",e)}proxyNativeTracksForType_(e){const t=On[e],n=this.el()[t.getterName],i=this[t.getterName]();if(!this["featuresNative".concat(t.capitalName,"Tracks")]||!n||!n.addEventListener)return;const r={change:t=>{const n={type:"change",target:i,currentTarget:i,srcElement:i};i.trigger(n),"text"===e&&this[En.remoteText.getterName]().trigger(n)},addtrack(e){i.addTrack(e.track)},removetrack(e){i.removeTrack(e.track)}},s=function(){const e=[];for(let t=0;t<i.length;t++){let r=!1;for(let e=0;e<n.length;e++)if(n[e]===i[t]){r=!0;break}r||e.push(i[t])}for(;e.length;)i.removeTrack(e.shift())};this[t.getterName+"Listeners_"]=r,Object.keys(r).forEach((e=>{const t=r[e];n.addEventListener(e,t),this.on("dispose",(i=>n.removeEventListener(e,t)))})),this.on("loadstart",s),this.on("dispose",(e=>this.off("loadstart",s)))}proxyNativeTracks_(){On.names.forEach((e=>{this.proxyNativeTracksForType_(e)}))}createEl(){let e=this.options_.tag;if(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(e){const t=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(t,e),Ar.disposeMediaElement(e),e=t}else{e=a.a.createElement("video");const t=q({},this.options_.tag&&Ce(this.options_.tag));de&&!0===this.options_.nativeControlsForTouch||delete t.controls,ke(e,Object.assign(t,{id:this.options_.techId,class:"vjs-tech"}))}e.playerId=this.options_.playerId}"undefined"!==typeof this.options_.preload&&Ee(e,"preload",this.options_.preload),void 0!==this.options_.disablePictureInPicture&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);const t=["loop","muted","playsinline","autoplay"];for(let n=0;n<t.length;n++){const i=t[n],r=this.options_[i];"undefined"!==typeof r&&(r?Ee(e,i,i):Ie(e,i),e[i]=r)}return e}handleLateInit_(e){if(0===e.networkState||3===e.networkState)return;if(0===e.readyState){let e=!1;const t=function(){e=!0};this.on("loadstart",t);const n=function(){e||this.trigger("loadstart")};return this.on("loadedmetadata",n),void this.ready((function(){this.off("loadstart",t),this.off("loadedmetadata",n),e||this.trigger("loadstart")}))}const t=["loadstart"];t.push("loadedmetadata"),e.readyState>=2&&t.push("loadeddata"),e.readyState>=3&&t.push("canplay"),e.readyState>=4&&t.push("canplaythrough"),this.ready((function(){t.forEach((function(e){this.trigger(e)}),this)}))}setScrubbing(e){this.isScrubbing_=e}scrubbing(){return this.isScrubbing_}setCurrentTime(e){try{this.isScrubbing_&&this.el_.fastSeek&&pe?this.el_.fastSeek(e):this.el_.currentTime=e}catch(t){R(t,"Video is not ready. (Video.js)")}}duration(){if(this.el_.duration===1/0&&Y&&J&&0===this.el_.currentTime){const e=()=>{this.el_.currentTime>0&&(this.el_.duration===1/0&&this.trigger("durationchange"),this.off("timeupdate",e))};return this.on("timeupdate",e),NaN}return this.el_.duration||NaN}width(){return this.el_.offsetWidth}height(){return this.el_.offsetHeight}
vendor: 5,626 bytes, line 2
2proxyWebkitFullscreen_(){if(!("webkitDisplayingFullscreen"in this.el_))return;const e=function(){this.trigger("fullscreenchange",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},t=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",e),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",t),this.on("dispose",(()=>{this.off("webkitbeginfullscreen",t),this.off("webkitendfullscreen",e)}))}supportsFullScreen(){return"function"===typeof this.el_.webkitEnterFullScreen}enterFullScreen(){const e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)Jt(this.el_.play()),this.setTimeout((function(){e.pause();try{e.webkitEnterFullScreen()}catch(t){this.trigger("fullscreenerror",t)}}),0);else try{e.webkitEnterFullScreen()}catch(t){this.trigger("fullscreenerror",t)}}exitFullScreen(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger("fullscreenerror",new Error("The video is not fullscreen"))}requestPictureInPicture(){return this.el_.requestPictureInPicture()}requestVideoFrameCallback(e){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(e):super.requestVideoFrameCallback(e)}cancelVideoFrameCallback(e){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(e):super.cancelVideoFrameCallback(e)}src(e){if(void 0===e)return this.el_.src;this.setSrc(e)}addSourceElement(e,t){if(!e)return R.error("Invalid source URL."),!1;const n={src:e};t&&(n.type=t);const i=_e("source",{},n);return this.el_.appendChild(i),!0}removeSourceElement(e){if(!e)return R.error("Source URL is required to remove the source element."),!1;const t=this.el_.querySelectorAll("source");for(const n of t)if(n.src===e)return this.el_.removeChild(n),!0;return R.warn("No matching source element found with src: ".concat(e)),!1}reset(){Ar.resetMediaElement(this.el_)}currentSrc(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc}setControls(e){this.el_.controls=!!e}addTextTrack(e,t,n){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,t,n):super.addTextTrack(e,t,n)}createRemoteTextTrack(e){if(!this.featuresNativeTextTracks)return super.createRemoteTextTrack(e);const t=a.a.createElement("track");return e.kind&&(t.kind=e.kind),e.label&&(t.label=e.label),(e.language||e.srclang)&&(t.srclang=e.language||e.srclang),e.default&&(t.default=e.default),e.id&&(t.id=e.id),e.src&&(t.src=e.src),t}addRemoteTextTrack(e,t){const n=super.addRemoteTextTrack(e,t);return this.featuresNativeTextTracks&&this.el().appendChild(n),n}removeRemoteTextTrack(e){if(super.removeRemoteTextTrack(e),this.featuresNativeTextTracks){const t=this.$$("track");let n=t.length;for(;n--;)e!==t[n]&&e!==t[n].track||this.el().removeChild(t[n])}}getVideoPlaybackQuality(){if("function"===typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();const e={};return"undefined"!==typeof this.el().webkitDroppedFrameCount&&"undefined"!==typeof this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),r.a.performance&&(e.creationTime=r.a.performance.now()),e}}V(Ar,"TEST_VID",(function(){if(!fe())return;const e=a.a.createElement("video"),t=a.a.createElement("track");return t.kind="captions",t.srclang="en",t.label="English",e.appendChild(t),e})),Ar.isSupported=function(){try{Ar.TEST_VID.volume=.5}catch(e){return!1}return!(!Ar.TEST_VID||!Ar.TEST_VID.canPlayType)},Ar.canPlayType=function(e){return Ar.TEST_VID.canPlayType(e)},Ar.canPlaySource=function(e,t){return Ar.canPlayType(e.type)},Ar.canControlVolume=function(){try{const e=Ar.TEST_VID.volume;Ar.TEST_VID.volume=e/2+.1;const t=e!==Ar.TEST_VID.volume;return t&&he?(r.a.setTimeout((()=>{Ar&&Ar.prototype&&(Ar.prototype.featuresVolumeControl=e!==Ar.TEST_VID.volume)})),!1):t}catch(e){return!1}},Ar.canMuteVolume=function(){try{const e=Ar.TEST_VID.muted;return Ar.TEST_VID.muted=!e,Ar.TEST_VID.muted?Ee(Ar.TEST_VID,"muted","muted"):Ie(Ar.TEST_VID,"muted"),e!==Ar.TEST_VID.muted}catch(e){return!1}},Ar.canControlPlaybackRate=function(){if(Y&&J&&ee<58)return!1;try{const e=Ar.TEST_VID.playbackRate;return Ar.TEST_VID.playbackRate=e/2+.1,e!==Ar.TEST_VID.playbackRate}catch(e){return!1}},Ar.canOverrideAttributes=function(){try{const e=()=>{};Object.defineProperty(a.a.createElement("video"),"src",{get:e,set:e}),Object.defineProperty(a.a.createElement("audio"),"src",{get:e,set:e}),Object.defineProperty(a.a.createElement("video"),"innerHTML",{get:e,set:e}),Object.defineProperty(a.a.createElement("audio"),"innerHTML",{get:e,set:e})}catch(e){return!1}return!0},Ar.supportsNativeTextTracks=function(){return pe||he&&J},Ar.supportsNativeVideoTracks=function(){return!(!Ar.TEST_VID||!Ar.TEST_VID.videoTracks)},Ar.supportsNativeAudioTracks=function(){return!(!Ar.TEST_VID||!Ar.TEST_VID.audioTracks)},Ar.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],[["featuresMuteControl","canMuteVolume"],["featuresPlaybackRate","canControlPlaybackRate"],["featuresSourceset","canOverrideAttributes"],["featuresNativeTextTracks","supportsNativeTextTracks"],["featuresNativeVideoTracks","supportsNativeVideoTracks"],["featuresNativeAudioTracks","supportsNativeAudioTracks"]].forEac
2h((function(e){let[t,n]=e;V(Ar.prototype,t,(()=>Ar[n]()),!0)})),Ar.prototype.featuresVolumeControl=Ar.canControlVolume(),Ar.prototype.movingMediaElementInDOM=!he,Ar.prototype.featuresFullscreenResize=!0,Ar.prototype.featuresProgressEvents=!0,Ar.prototype.featuresTimeupdateEvents=!0,Ar.prototype.featuresVideoFrameCallback=!(!Ar.TEST_VID||!Ar.TEST_VID.requestVideoFrameCallback),Ar.disposeMediaElement=function(e){if(e){for(e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);e.removeAttribute("src"),"function"===typeof e.load&&function(){try{e.load()}catch(t){}}()}},Ar.resetMediaElement=function(e){if(!e)return;const t=e.querySelectorAll("source");let n=t.length;for(;n--;)e.removeChild(t[n]);e.removeAttribute("src"),"function"===typeof e.load&&function(){try{e.load()}catch(t){}}()},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach((function(e){Ar.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}})),["muted","defaultMuted","autoplay","loop","playsinline"].forEach((function(e){Ar.prototype["set"+Mt(e)]=function(t){this.el_[e]=t,t?this.el_.setAttribute(e,e):this.el_.removeAttribute(e)}})),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","disablePictureInPicture","played","networkState","readyState","videoWidth","videoHeight","crossOrigin"].forEach((function(e){Ar.prototype[e]=function(){return this.el_[e]}})),["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach((function(e){Ar.prototype["set"+Mt(e)]=function(t){this.el_[e]=t}})),["pause","load","play"].forEach((function(e){Ar.prototype[e]=function(){return this.el_[e]()}})),Pn.withSourceHandlers(Ar),Ar.nativeSourceHandler={},Ar.nativeSourceHandler.canPlayType=function(e){try{return Ar.TEST_VID.canPlayType(e)}catch(t){return""}},Ar.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return Ar.nativeSourceHandler.canPlayType(e.type);if(e.src){const t=_n(e.src);return Ar.nativeSourceHandler.canPlayType("video/".concat(t))}return""},Ar.nativeSourceHandler.handleSource=function(e,t,n){t.setSrc(e.src)},Ar.nativeSourceHandler.dispose=function(){},Ar.registerSourceHandler(Ar.nativeSourceHandler),Pn.registerTech("Html5",Ar);const wr=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],jr={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},kr=["tiny","xsmall","small","medium","large","xlarge","huge"],Cr={};kr.forEach((e=>{const t="x"===e.charAt(0)?"x-".concat(e.substring(1)):e;Cr[e]="vjs-layout-".concat(t)}));const Or={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0};class Er extends Ut{constructor(e,t,n){if(e.id=e.id||t.id||"vjs_video_".concat(rt()),(t=Object.assign(Er.getTagSettings(e),t)).initChildren=!1,t.createEl=!1,t.evented=!1,t.reportTouchActivity=!1,!t.language){const n=e.closest("[lang]");n&&(t.language=n.getAttribute("lang"))}if(super(null,t,n),this.boundDocumentFullscreenChange_=e=>this.documentFullscreenChange_(e),this.boundFullWindowOnEscKey_=e=>this.fullWindowOnEscKey(e),this.boundUpdateStyleEl_=e=>this.updateStyleEl_(e),this.boundApplyInitTime_=e=>this.applyInitTime_(e),this.boundUpdateCurrentBreakpoint_=e=>this.updateCurrentBreakpoint_(e),this.boundHandleTechClick_=e=>this.handleTechClick_(e),this.boundHandleTechDoubleClick_=e=>this.handleTechDoubleClick_(e),this.boundHandleTechTouchStart_=e=>this.handleTechTouchStart_(e),this.boundHandleTechTouchMove_=e=>this.handleTechTouchMove_(e),this.boundHandleTechTouchEnd_=e=>this.handleTechTouchEnd_(e),this.boundHandleTechTap_=e=>this.handleTechTap_(e),this.boundUpdatePlayerHeightOnAudioOnlyMode_=e=>this.updatePlayerHeightOnAudioOnlyMode_(e),this.isFullscreen_=!1,this.log=D(this.id_),this.fsApi_=C,this.isPosterFromTech_=!1,this.queuedCallbacks_=[],this.isReady_=!1,this.hasStarted_=!1,this.userActive_=!1,this.debugEnabled_=!1,this.audioOnlyMode_=!1,this.audioPosterMode_=!1,this.audioOnlyCache_={controlBarHeight:null,playerHe
2ight:null,hiddenChildren:[]},!this.options_||!this.options_.techOrder||!this.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(this.tag=e,this.tagAttributes=e&&Ce(e),this.language(this.options_.language),t.languages){const e={};Object.getOwnPropertyNames(t.languages).forEach((function(n){e[n.toLowerCase()]=t.languages[n]})),this.languages_=e}else this.languages_=Er.prototype.options_.languages;this.resetCache_(),this.poster_=t.poster||"",this.controls_=!!t.controls,e.controls=!1,e.removeAttribute("controls"),this.changingSrc_=!1,this.playCallbacks_=[],this.playTerminatedQueue_=[],e.hasAttribute("autoplay")?this.autoplay(!0):this.autoplay(this.options_.autoplay),t.plugins&&Object.keys(t.plugins).forEach((e=>{if("function"!==typeof this[e])throw new Error('plugin "'.concat(e,'" does not exist'))})),this.scrubbing_=!1,this.el_=this.createEl(),Pt(this,{eventBusKey:"el_"}),this.fsApi_.requestFullscreen&&(dt(a.a,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.on(this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_)),this.fluid_&&this.on(["playerreset","resize"],this.boundUpdateStyleEl_);const i=q(this.options_);if(t.plugins&&Object.keys(t.plugins).forEach((e=>{this[e](t.plugins[e])})),t.debug&&this.debug(!0),this.options_.playerOptions=i,this.middleware_=[],this.playbackRates(t.playbackRates),t.experimentalSvgIcons){const e=(new r.a
vendor: 17,827 bytes, line 2
2.DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg">\n <defs>\n <symbol viewBox="0 0 48 48" id="vjs-icon-play">\n <path d="M16 10v28l22-14z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-pause">\n <path d="M12 38h8V10h-8v28zm16-28v28h8V10h-8z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-audio">\n <path d="M24 2C14.06 2 6 10.06 6 20v14c0 3.31 2.69 6 6 6h6V24h-8v-4c0-7.73 6.27-14 14-14s14 6.27 14 14v4h-8v16h6c3.31 0 6-2.69 6-6V20c0-9.94-8.06-18-18-18z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-captions">\n <path d="M38 8H10c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM22 22h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2zm14 0h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-subtitles">\n <path d="M40 8H8c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h32c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM8 24h8v4H8v-4zm20 12H8v-4h20v4zm12 0h-8v-4h8v4zm0-8H20v-4h20v4z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-fullscreen-enter">\n <path d="M14 28h-4v10h10v-4h-6v-6zm-4-8h4v-6h6v-4H10v10zm24 14h-6v4h10V28h-4v6zm-6-24v4h6v6h4V10H28z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-fullscreen-exit">\n <path d="M10 32h6v6h4V28H10v4zm6-16h-6v4h10V10h-4v6zm12 22h4v-6h6v-4H28v10zm4-22v-6h-4v10h10v-4h-6z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-play-circle">\n <path d="M20 33l12-9-12-9v18zm4-29C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-volume-mute">\n <path d="M33 24c0-3.53-2.04-6.58-5-8.05v4.42l4.91 4.91c.06-.42.09-.85.09-1.28zm5 0c0 1.88-.41 3.65-1.08 5.28l3.03 3.03C41.25 29.82 42 27 42 24c0-8.56-5.99-15.72-14-17.54v4.13c5.78 1.72 10 7.07 10 13.41zM8.55 6L6 8.55 15.45 18H6v12h8l10 10V26.55l8.51 8.51c-1.34 1.03-2.85 1.86-4.51 2.36v4.13a17.94 17.94 0 0 0 7.37-3.62L39.45 42 42 39.45l-18-18L8.55 6zM24 8l-4.18 4.18L24 16.36V8z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-volume-low">\n <path d="M14 18v12h8l10 10V8L22 18h-8z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-volume-medium">\n <path d="M37 24c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zm-27-6v12h8l10 10V8L18 18h-8z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-volume-high">\n <path d="M6 18v12h8l10 10V8L14 18H6zm27 6c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zM28 6.46v4.13c5.78 1.72 10 7.07 10 13.41s-4.22 11.69-10 13.41v4.13c8.01-1.82 14-8.97 14-17.54S36.01 8.28 28 6.46z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-spinner">\n <path d="M18.8 21l9.53-16.51C26.94 4.18 25.49 4 24 4c-4.8 0-9.19 1.69-12.64 4.51l7.33 12.69.11-.2zm24.28-3c-1.84-5.85-6.3-10.52-11.99-12.68L23.77 18h19.31zm.52 2H28.62l.58 1 9.53 16.5C41.99 33.94 44 29.21 44 24c0-1.37-.14-2.71-.4-4zm-26.53 4l-7.8-13.5C6.01 14.06 4 18.79 4 24c0 1.37.14 2.71.4 4h14.98l-2.31-4zM4.92 30c1.84 5.85 6.3 10.52 11.99 12.68L24.23 30H4.92zm22.54 0l-7.8 13.51c1.4.31 2.85.49 4.34.49 4.8 0 9.19-1.69 12.64-4.51L29.31 26.8 27.46 30z"></path>\n </symbol>\n <symbol viewBox="0 0 24 24" id="vjs-icon-hd">\n <path d="M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-8 12H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11v6zm2-6h4c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1h-4V9zm1.5 4.5h2v-3h-2v3z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-chapters">\n <path d="M6 26h4v-4H6v4zm0 8h4v-4H6v4zm0-16h4v-4H6v4zm8 8h28v-4H14v4zm0 8h28v-4H14v4zm0-20v4h28v-4H14z"></path>\n </symbol>\n <symbol viewBox="0 0 40 40" id="vjs-icon-downloading">\n <path d="M18.208 36.875q-3.208-.292-5.979-1.729-2.771-1.438-4.812-3.729-2.042-2.292-3.188-5.229-1.146-2.938-1.146-6.23 0-6.583 4.334-11.416 4.333-4.834 10.833-5.5v3.166q-5.167.75-8.583 4.646Q6.25 14.75 6.25 19.958q0 5.209 3.396 9.104 3.396 3.896 8.562 4.646zM20 28.417L11.542 20l2.083-2.083 4.917 4.916v-11.25h2.916v11.25l4.875-4.916L28.417 20zm1.792 8.458v-3.167q1.833-.25 3.541-.958 1.709-.708 3.167-1.875l2.333 2.292q-1.958 1.583-4.25 2.541-2.291.959-4.791 1.167zm6.791-27.792q-1.541-1.125-3.25-1.854-1.708-.729-3.541-1.021V3.042q2.5.25 4.77 1.208 2.271.958 4.271 2.5zm4.584 21.584l-2.25-2.25q1.166-1.5 1.854-3.209.687-1.708.937-3.541h3.209q-.292 2.5-1.229 4.791-.938 2.292-2.521 4.209zm.541-12.417q-.291-1.833-.958-3.562-.667-1.73-1.833-3.188l2.375-2.208q1.541 1.916 2.458 4.208.917 2.292 1.167 4.75z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-file-download">\n <path d="M10.8 40.55q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h26.35v-7.7h3.4v7.7q0 1.4-1 2.4t-2.4 1zM24 32.1L13.9 22.05l2.45-2.45 5.95 5.95V7.15h3.4v18.4l5.95-5.95 2.45 2.45z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-file-download-done">\n <path d="M9.8 40.5v-3.45h28.4v3.45zm9.2-9.05L7.4 19.85l2.45-2.35L19 26.65l19.2-19.2 2.4 2.4z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-file-download-off">\n <path d="M4.9 4.75L43.25 43.1 41 45.3l-4.75-4.75q-.05.05-.075.025-.025-.025-.075-.025H10.8q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h22.05l-7-7-1.85 1.8L13.9 21.9l1.85-1.85L2.7 7zm26.75 14.7l2.45 2.45-3.75 3.8-2.45-2.5zM25.7 7.15V21.1l-3.4-3.45V7.15z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-share">\n <path d="M36 32.17c-1.52 0-2.89.59-3.93 1.54L17.82 25.4c.11-.45.18-.92.18-1.4s-.07-.95-.18-1.4l14.1-8.23c1.07 1 2.5 1.62 4.08 1.62 3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6c0 .48.07.95.18 1.4l-14.1 8.23c-1.07-1-2.5-1.62-4.08-1.62-3.31 0-6 2.69-6 6s2.69 6 6 6c1.58 0 3.01-.62 4.08-1.62l14.25 8.31c-.1.42-.16.86-.16 1.31A5.83 5.83 0 1 0 36 32.17z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-cog">\n <path d="M38.86 25.95c.08-.64.14-1.29.14-1.95s-.06-1.31-.14-1.95l4.23-3.31c.38-.3.49-.84.24-1.28l-4-6.93c-.25-.43-.77-.61-1.22-.43l-4.98 2.01c-1.03-.79-2.16-1.46-3.38-1.97L29 4.84c-.09-.47-.5-.84-1-.84h-8c-.5 0-.91.37-.99.84l-.75 5.3a14.8 14.8 0 0 0-3.38 1.97L9.9 10.1a1 1 0 0 0-1.22.43l-4 6.93c-.25.43-.14.97.24 1.28l4.22 3.31C9.06 22.69 9 23.34 9 24s.06 1.31.14 1.95l-4.22 3.31c-.38.3-.49.84-.24 1.28l4 6.93c.25.43.77.61 1.22.43l4.98-2.01c1.03.79 2.16 1.46 3.38 1.97l.75 5.3c.08.47.49.84.99.84h8c.5 0 .91-.37.99-.84l.75-5.3a14.8 14.8 0 0 0 3.38-1.97l4.98 2.01a1 1 0 0 0 1.22-.43l4-6.93c.25-.43.14-.97-.24-1.28l-4.22-3.31zM24 31c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-square">\n <path d="M36 8H12c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h24c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zm0 28H12V12h24v24z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-circle">\n <circle cx="24" cy="24" r="20"></circle>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-circle-outline">\n <path d="M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-circle-inner-circle">\n <path d="M24 4C12.97 4 4 12.97 4 24s8.97 20 20 20 20-8.97 20-20S35.03 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16zm6-16c0 3.31-2.69 6-6 6s-6-2.69-6-6 2.69-6 6-6 6 2.69 6 6z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-cancel">\n <path d="M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm10 27.17L31.17 34 24 26.83 16.83 34 14 31.17 21.17 24 14 16.83 16.83 14 24 21.17 31.17 14 34 16.83 26.83 24 34 31.17z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-replay">\n <path d="M24 10V2L14 12l10 10v-8c6.63 0 12 5.37 12 12s-5.37 12-12 12-12-5.37-12-12H8c0 8.84 7.16 16 16 16s16-7.16 16-16-7.16-16-16-16z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-repeat">\n <path d="M14 14h20v6l8-8-8-8v6H10v12h4v-8zm20 20H14v-6l-8 8 8 8v-6h24V26h-4v8z"></path>\n </symbol>\n <symbol viewBox="0 96 48 48" id="vjs-icon-replay-5">\n <path d="M17.689 98l-8.697 8.696 8.697 8.697 2.486-2.485-4.32-4.319h1.302c4.93 0 9.071 1.722 12.424 5.165 3.352 3.443 5.029 7.638 5.029 12.584h3.55c0-2.958-.553-5.73-1.658-8.313-1.104-2.583-2.622-4.841-4.555-6.774-1.932-1.932-4.19-3.45-6.773-4.555-2.584-1.104-5.355-1.657-8.313-1.657H15.5l4.615-4.615zm-8.08 21.659v13.861h11.357v5.008H9.609V143h12.7c.834 0 1.55-.298 2.146-.894.596-.597.895-1.31.895-2.145v-7.781c0-.835-.299-1.55-.895-2.147a2.929 2.929 0 0 0-2.147-.894h-8.227v-5.096H25.35v-4.384z"></path>\n </symbol>\n <symbol viewBox="0 96 48 48" id="vjs-icon-replay-10">\n <path d="M42.315 125.63c0-4.997-1.694-9.235-5.08-12.713-3.388-3.479-7.571-5.218-12.552-5.218h-1.315l4.363 4.363-2.51 2.51-8.787-8.786L25.221 97l2.45 2.45-4.662 4.663h1.375c2.988 0 5.788.557 8.397 1.673 2.61 1.116 4.892 2.65 6.844 4.602 1.953 1.953 3.487 4.234 4.602 6.844 1.116 2.61 1.674 5.41 1.674 8.398zM8.183 142v-19.657H3.176V117.8h9.643V142zm13.63 0c-1.156 0-2.127-.393-2.912-1.178-.778-.778-1.168-1.746-1.168-2.902v-16.04c0-1.156.393-2.127 1.178-2.912.779-.779 1.746-1.168 2.902-1.168h7.696c1.156 0 2.126.392 2.911 1.177.779.78 1.168 1.747 1.168 2.903v16.04c0 1.156-.392 2.127-1.177 2.912-.779.779-1.746 1.168-2.902 1.168zm.556-4.636h6.583v-15.02H22.37z"></path>\n </symbol>\n <symbol viewBox="0 96 48 48" id="vjs-icon-replay-30">\n <path d="M26.047 97l-8.733 8.732 8.733 8.733 2.496-2.494-4.336-4.338h1.307c4.95 0 9.108 1.73 12.474 5.187 3.367 3.458 5.051 7.668 5.051 12.635h3.565c0-2.97-.556-5.751-1.665-8.346-1.109-2.594-2.633-4.862-4.574-6.802-1.94-1.941-4.208-3.466-6.803-4.575-2.594-1.109-5.375-1.664-8.345-1.664H23.85l4.634-4.634zM2.555 117.531v4.688h10.297v5.25H5.873v4.687h6.979v5.156H2.555V142H13.36c1.061 0 1.95-.395 2.668-1.186.718-.79 1.076-1.772 1.076-2.94v-16.218c0-1.168-.358-2.149-1.076-2.94-.717-.79-1.607-1.185-2.668-1.185zm22.482.14c-1.149 0-2.11.39-2.885 1.165-.78.78-1.172 1.744-1.172 2.893v15.943c0 1.149.388 2.11 1.163 2.885.78.78 1.745 1.172 2.894 1.172h7.649c1.148 0 2.11-.388 2.884-1.163.78-.78 1.17-1.745 1.17-2.894v-15.943c0-1.15-.386-2.111-1.16-2.885-.78-.78-1.746-1.172-2.894-1.172zm.553 4.518h6.545v14.93H25.59z"></path>\n </symbol>\n <symbol viewBox="0 96 48 48" id="vjs-icon-forward-5">\n <path d="M29.508 97l-2.431 2.43 4.625 4.625h-1.364c-2.965 0-5.742.554-8.332 1.66-2.589 1.107-4.851 2.629-6.788 4.566-1.937 1.937-3.458 4.2-4.565 6.788-1.107 2.59-1.66 5.367-1.66 8.331h3.557c0-4.957 1.68-9.16 5.04-12.611 3.36-3.45 7.51-5.177 12.451-5.177h1.304l-4.326 4.33 2.49 2.49 8.715-8.716zm-9.783 21.61v13.89h11.382v5.018H19.725V142h12.727a2.93 2.93 0 0 0 2.15-.896 2.93 2.93 0 0 0 .896-2.15v-7.798c0-.837-.299-1.554-.896-2.152a2.93 2.93 0 0 0-2.15-.896h-8.245V123h11.29v-4.392z"></path>\n </symbol>\n <symbol viewBox="0 96 48 48" id="vjs-icon-forward-10">\n <path d="M23.119 97l-2.386 2.383 4.538 4.538h-1.339c-2.908 0-5.633.543-8.173 1.63-2.54 1.085-4.76 2.577-6.66 4.478-1.9 1.9-3.392 4.12-4.478 6.66-1.085 2.54-1.629 5.264-1.629 8.172h3.49c0-4.863 1.648-8.986 4.944-12.372 3.297-3.385 7.368-5.078 12.216-5.078h1.279l-4.245 4.247 2.443 2.442 8.55-8.55zm-9.52 21.45v4.42h4.871V142h4.513v-23.55zm18.136 0c-1.125 0-2.066.377-2.824 1.135-.764.764-1.148 1.709-1.148 2.834v15.612c0 1.124.38 2.066 1.139 2.824.764.764 1.708 1.145 2.833 1.145h7.489c1.125 0 2.066-.378 2.824-1.136.764-.764 1.145-1.709 1.145-2.833v-15.612c0-1.125-.378-2.067-1.136-2.825-.764-.764-1.708-1.145-2.833-1.145zm.54 4.42h6.408v14.617h-6.407z"></path>\n </symbol>\n <symbol viewBox="0 96 48 48" id="vjs-icon-forward-30">\n <path d="M25.549 97l-2.437 2.434 4.634 4.635H26.38c-2.97 0-5.753.555-8.347 1.664-2.594 1.109-4.861 2.633-6.802 4.574-1.94 1.94-3.465 4.207-4.574 6.802-1.109 2.594-1.664 5.377-1.664 8.347h3.565c0-4.967 1.683-9.178 5.05-12.636 3.366-3.458 7.525-5.187 12.475-5.187h1.307l-4.335 4.338 2.495 2.494 8.732-8.732zm-11.553 20.53v4.689h10.297v5.249h-6.978v4.688h6.978v5.156H13.996V142h10.808c1.06 0 1.948-.395 2.666-1.186.718-.79 1.077-1.771 1.077-2.94v-16.217c0-1.169-.36-2.15-1.077-2.94-.718-.79-1.605-1.186-2.666-1.186zm21.174.168c-1.149 0-2.11.389-2.884 1.163-.78.78-1.172 1.745-1.172 2.894v15.942c0 1.15.388 2.11 1.162 2.885.78.78 1.745 1.17 2.894 1.17h7.649c1.149 0 2.11-.386 2.885-1.16.78-.78 1.17-1.746 1.17-2.895v-15.942c0-1.15-.387-2.11-1.161-2.885-.78-.78-1.745-1.172-2.894-1.172zm.552 4.516h6.542v14.931h-6.542z"></path>\n </symbol>\n <symbol viewBox="0 0 512 512" id="vjs-icon-audio-description">\n <g fill-rule="evenodd"><path d="M227.29 381.351V162.993c50.38-1.017 89.108-3.028 117.631 17.126 27.374 19.342 48.734 56.965 44.89 105.325-4.067 51.155-41.335 94.139-89.776 98.475-24.085 2.155-71.972 0-71.972 0s-.84-1.352-.773-2.568m48.755-54.804c31.43 1.26 53.208-16.633 56.495-45.386 4.403-38.51-21.188-63.552-58.041-60.796v103.612c-.036 1.466.575 2.22 1.546 2.57"></path><path d="M383.78 381.328c13.336 3.71 17.387-11.06 23.215-21.408 12.722-22.571 22.294-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.226 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894"></path><path d="M425.154 381.328c13.336 3.71 17.384-11.061 23.215-21.408 12.721-22.571 22.291-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.511c-.586 3.874 2.226 7.315 3.866 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894"></path><path d="M466.26 381.328c13.337 3.71 17.385-11.061 23.216-21.408 12.722-22.571 22.292-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.225 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894M4.477 383.005H72.58l18.573-28.484 64.169-.135s.065 19.413.065 28.62h48.756V160.307h-58.816c-5.653 9.537-140.85 222.697-140.85 222.697zm152.667-145.282v71.158l-40.453-.27 40.453-70.888z"></path></g>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-next-item">\n <path d="M12 36l17-12-17-12v24zm20-24v24h4V12h-4z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-previous-item">\n <path d="M12 12h4v24h-4zm7 12l17 12V12z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-shuffle">\n <path d="M21.17 18.34L10.83 8 8 10.83l10.34 10.34 2.83-2.83zM29 8l4.09 4.09L8 37.17 10.83 40l25.09-25.09L40 19V8H29zm.66 18.83l-2.83 2.83 6.26 6.26L29 40h11V29l-4.09 4.09-6.25-6.26z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-cast">\n <path d="M42 6H6c-2.21 0-4 1.79-4 4v6h4v-6h36v28H28v4h14c2.21 0 4-1.79 4-4V10c0-2.21-1.79-4-4-4zM2 36v6h6c0-3.31-2.69-6-6-6zm0-8v4c5.52 0 10 4.48 10 10h4c0-7.73-6.27-14-14-14zm0-8v4c9.94 0 18 8.06 18 18h4c0-12.15-9.85-22-22-22z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-picture-in-picture-enter">\n <path d="M38 22H22v11.99h16V22zm8 16V9.96C46 7.76 44.2 6 42 6H6C3.8 6 2 7.76 2 9.96V38c0 2.2 1.8 4 4 4h36c2.2 0 4-1.8 4-4zm-4 .04H6V9.94h36v28.1z"></path>\n </symbol>\n <symbol viewBox="0 0 22 18" id="vjs-icon-picture-in-picture-exit">\n <path d="M18 4H4v10h14V4zm4 12V1.98C22 .88 21.1 0 20 0H2C.9 0 0 .88 0 1.98V16c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2zm-2 .02H2V1.97h18v14.05z"></path>\n <path fill="none" d="M-1-3h24v24H-1z"></path>\n </symbol>\n <symbol viewBox="0 0 1792 1792" id="vjs-icon-facebook">\n <path d="M1343 12v264h-157q-86 0-116 36t-30 108v189h293l-39 296h-254v759H734V905H479V609h255V391q0-186 104-288.5T1115 0q147 0 228 12z"></path>\n </symbol>\n <symbol viewBox="0 0 1792 1792" id="vjs-icon-linkedin">\n <path d="M477 625v991H147V625h330zm21-306q1 73-50.5 122T312 490h-2q-82 0-132-49t-50-122q0-74 51.5-122.5T314 148t133 48.5T498 319zm1166 729v568h-329v-530q0-105-40.5-164.5T1168 862q-63 0-105.5 34.5T999 982q-11 30-11 81v553H659q2-399 2-647t-1-296l-1-48h329v144h-2q20-32 41-56t56.5-52 87-43.5T1285 602q171 0 275 113.5t104 332.5z"></path>\n </symbol>\n <symbol viewBox="0 0 1200 1227" id="vjs-icon-twitter">\n <path d="M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z"/>\n </symbol>\n <symbol viewBox="0 0 1792 1792" id="vjs-icon-tumblr">\n <path d="M1328 1329l80 237q-23 35-111 66t-177 32q-104 2-190.5-26T787 1564t-95-106-55.5-120-16.5-118V676H452V461q72-26 129-69.5t91-90 58-102 34-99T779 12q1-5 4.5-8.5T791 0h244v424h333v252h-334v518q0 30 6.5 56t22.5 52.5 49.5 41.5 81.5 14q78-2 134-29z"></path>\n </symbol>\n <symbol viewBox="0 0 1792 1792" id="vjs-icon-pinterest">\n <path d="M1664 896q0 209-103 385.5T1281.5 1561 896 1664q-111 0-218-32 59-93 78-164 9-34 54-211 20 39 73 67.5t114 28.5q121 0 216-68.5t147-188.5 52-270q0-114-59.5-214T1180 449t-255-63q-105 0-196 29t-154.5 77-109 110.5-67 129.5T377 866q0 104 40 183t117 111q30 12 38-20 2-7 8-31t8-30q6-23-11-43-51-61-51-151 0-151 104.5-259.5T904 517q151 0 235.5 82t84.5 213q0 170-68.5 289T980 1220q-61 0-98-43.5T859 1072q8-35 26.5-93.5t30-103T927 800q0-50-27-83t-77-33q-62 0-105 57t-43 142q0 73 25 122l-99 418q-17 70-13 177-206-91-333-281T128 896q0-209 103-385.5T510.5 231 896 128t385.5 103T1561 510.5 1664 896z"></path>\n </symbol>\n </defs>\n</svg>',"image/svg+xml");if(e.querySelector("parsererror"))
2R.warn("Failed to load SVG Icons. Falling back to Font Icons."),this.options_.experimentalSvgIcons=null;else{const t=e.documentElement;t.style.display="none",this.el_.appendChild(t),this.addClass("vjs-svg-icons-enabled")}}this.initChildren(),this.isAudio("audio"===e.nodeName.toLowerCase()),this.controls()?this.addClass("vjs-controls-enabled"):this.addClass("vjs-controls-disabled"),this.el_.setAttribute("role","region"),this.isAudio()?this.el_.setAttribute("aria-label",this.localize("Audio Player")):this.el_.setAttribute("aria-label",this.localize("Video Player")),this.isAudio()&&this.addClass("vjs-audio"),t.spatialNavigation&&t.spatialNavigation.enabled&&(this.spatialNavigation=new Qn(this),this.addClass("vjs-spatial-navigation-enabled")),de&&this.addClass("vjs-touch-enabled"),he||this.addClass("vjs-workinghover"),Er.players[this.id_]=this;const s=A.split(".")[0];this.addClass("vjs-v".concat(s)),this.userActive(!0),this.reportUserActivity(),this.one("play",(e=>this.listenForUserActivity_(e))),this.on("keydown",(e=>this.handleKeyDown(e))),this.on("languagechange",(e=>this.handleLanguagechange(e))),this.breakpoints(this.options_.breakpoints),this.responsive(this.options_.responsive),this.on("ready",(()=>{this.audioPosterMode(this.options_.audioPosterMode),this.audioOnlyMode(this.options_.audioOnlyMode)}))}dispose(){var e;this.trigger("dispose"),this.off("dispose"),ut(a.a,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),ut(a.a,"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),Er.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),e=this,Dn.hasOwnProperty(e.id())&&delete Dn[e.
2id()],In.names.forEach((e=>{const t=this[In[e].getterName]();t&&t.off&&t.off()})),super.dispose({restoreEl:this.options_.restoreEl})}createEl(){let e,t=this.tag,n=this.playerElIngest_=t.parentNode&&t.parentNode.hasAttribute&&t.parentNode.hasAttribute("data-vjs-player");const i="video-js"===this.tag.tagName.toLowerCase();n?e=this.el_=t.parentNode:i||(e=this.el_=super.createEl("div"));const s=Ce(t);if(i){for(e=this.el_=t,t=this.tag=a.a.createElement("video");e.children.length;)t.appendChild(e.firstChild);Se(e,"video-js")||Ae(e,"video-js"),e.appendChild(t),n=this.playerElIngest_=e,Object.keys(e).forEach((n=>{try{t[n]=e[n]}catch(i){}}))}t.setAttribute("tabindex","-1"),s.tabindex="-1",J&&re&&(t.setAttribute("role","application"),s.role="application"),t.removeAttribute("width"),t.removeAttribute("height"),"width"in s&&delete s.width,"height"in s&&delete s.height,Object.getOwnPropertyNames(s).forEach((function(n){i&&"class"===n||e.setAttribute(n,s[n]),i&&t.setAttribute(n,s[n])})),t.playerId=t.id,t.id+="_html5_api",t.className="vjs-tech",t.player=e.player=this,this.addClass("vjs-paused");const o=["IS_SMART_TV","IS_TIZEN","IS_WEBOS","IS_ANDROID","IS_IPAD","IS_IPHONE","IS_CHROMECAST_RECEIVER"].filter((e=>ge[e])).map((e=>"vjs-device-"+e.substring(3).toLowerCase().replace(/\_/g,"-")));if(this.addClass(...o),!0!==r.a.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=$e("vjs-styles-dimensions");const e=Ve(".vjs-styles-defaults"),t=Ve("head");t.insertBefore(this.styleEl_,e?e.nextSibling:t.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);const l=t.getElementsByTagName("a");for(let r=0;r<l.length;r++){const e=l.item(r);Ae(e,"vjs-hidden"),e.setAttribute("hidden","hidden")}return t.initNetworkState_=t.networkState,t.parentNode&&!n&&t.parentNode.insertBefore(e,t),xe(t,e),this.children_.unshift(t),this.el_.setAttribute("lang",this.language_),this.el_.setAttribute("translate","no"),this.el_=e,e}crossOrigin(e){if("undefined"===typeof e)return this.techGet_("crossOrigin");null===e||"anonymous"===e||"use-credentials"===e?(this.techCall_("setCrossOrigin",e),this.posterImage&&this.posterImage.crossOrigin(e)):R.warn('crossOrigin must be null, "anonymous" or "use-credentials", given "'.concat(e,'"'))}width(e){return this.dimension("width",e)}height(e){return this.dimension("height",e)}dimension(e,t){const n=e+"_";if(void 0===t)return this[n]||0;if(""===t||"auto"===t)return this[n]=void 0,void this.updateStyleEl_();const i=parseFloat(t);isNaN(i)?R.error('Improper value "'.concat(t,'" supplied for for ').concat(e)):(this[n]=i,this.updateStyleEl_())}fluid(e){if(void 0===e)return!!this.fluid_;var t,n;this.fluid_=!!e,At(this)&&this.off(["playerreset","resize"],this.boundUpdateStyleEl_),e?(this.addClass("vjs-fluid"),this.fill(!1),n=()=>{this.on(["playerreset","resize"],this.boundUpdateStyleEl_)},At(t=this)?n():(t.eventedCallbacks||(t.eventedCallbacks=[]),t.eventedCallbacks.push(n))):this.removeClass("vjs-fluid"),this.updateStyleEl_()}fill(e){if(void 0===e)return!!this.fill_;this.fill_=!!e,e?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")}aspectRatio(e){if(void 0===e)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(e))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()}updateStyleEl_(){if(!0===r.a.VIDEOJS_NO_DYNAMIC_STYLE){const e="number"===typeof this.width_?this.width_:this.options_.width,t="number"===typeof this.height_?this.height_:this.options_.height,n=this.tech_&&this.tech_.el();return void(n&&(e>=0&&(n.width=e),t>=0&&(n.height=t)))}let e,t,n,i;n=void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9";const s=n.split(":"),a=s[1]/s[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/a:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*a,i=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(i),et(this.styleEl_,"\n .".concat(i," {\n width: ").concat(e,"px;\n height: ").concat(t,"px;\n }\n\n .").concat(i,".vjs-fluid:not(.vjs-audio-only-mode) {\n padding-top: ").concat(100*a,"%;\n }\n "))}loadTech_(e,t){this.tech_&&this.unloadTech_();const n=Mt(e),i=e.charAt(0).toLowerCase()+e.slice(1);"Html5"!==n&&this.tag&&(Pn.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=n,this.isReady_=!1;let r=this.autoplay();("string"===typeof this.autoplay()||!0===this.autoplay()&&this.options_.normalizeAutoplay)&&(r=!1);const s={source:t,autoplay:r,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:"".concat(this.id(),"_").concat(i,"_api"),playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};
2In.names.forEach((e=>{const t=In[e];s[t.getterName]=this[t.privateName]})),Object.assign(s,this.options_[n]),Object.assign(s,this.options_[i]),Object.assign(s,this.options_[e.toLowerCase()]),this.tag&&(s.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(s.startTime=this.cache_.currentTime);const a=Pn.getTech(e);if(!a)throw new Error("No Tech named '".concat(n,"' exists! '").concat(n,"' should be registered using videojs.registerTech()'"));this.tech_=new a(s),this.tech_.ready(yt(this,this.handleTechReady_),!0),tn(this.textTracksJson_||[],this.tech_),wr.forEach((e=>{this.on(this.tech_,e,(t=>this["handleTech".concat(Mt(e),"_")](t)))})),Object.keys(jr).forEach((e=>{this.on(this.tech_,e,(t=>{0===this.tech_.playbackRate()&&this.tech_.seeking()?this.queuedCallbacks_.push({callback:this["handleTech".concat(jr[e],"_")].bind(this),event:t}):this["handleTech".concat(jr[e],"_")](t)}))})),this.on(this.tech_,"loadstart",(e=>this.handleTechLoadStart_(e))),this.on(this.tech_,"sourceset",(e=>this.handleTechSourceset_(e))),this.on(this.tech_,"waiting",(e=>this.handleTechWaiting_(e))),this.on(this.tech_,"ended",(e=>this.handleTechEnded_(e))),this.on(this.tech_,"seeking",(e=>this.handleTechSeeking_(e))),this.on(this.tech_,"play",(e=>this.handleTechPlay_(e))),this.on(this.tech_,"pause",(e=>this.handleTechPause_(e))),this.on(this.tech_,"durationchange",(e=>this.handleTechDurationChange_(e))),this.on(this.tech_,"fullscreenchange",((e,t)=>this.handleTechFullscreenChange_(e,t))),this.on(this.tech_,"fullscreenerror",((e,t)=>this.handleTechFullscreenError_(e,t))),this.on(this.tech_,"enterpictureinpicture",(e=>this.handleTechEnterPictureInPicture_(e))),this.on(this.tech_,"leavepictureinpicture",(e=>this.handleTechLeavePictureInPicture_(e))),this.on(this.tech_,"error",(e=>this.handleTechError_(e))),this.on(this.tech_,"posterchange",(e=>this.handleTechPosterChange_(e))),this.on(this.tech_,"textdata",(e=>this.handleTechTextData_(e))),this.on(this.tech_,"ratechange",(e=>this.handleTechRateChange_(e))),this.on(this.tech_,"loadedmetadata",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===n&&this.tag||xe(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)}unloadTech_(){In.names.forEach((e=>{const t=In[e];this[t.privateName]=this[t.getterName]()})),this.textTracksJson_=en(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1}tech(e){return void 0===e&&R.warn("Using the tech directly can be dangerous. I hope you know
2what you're doing.\nSee https://github.com/videojs/video.js/issues/2617 for more info.\n"),this.tech_}version(){return{"video.js":A}}addTechControlsListeners_(){this.removeTechControlsListeners_(),this.on(this.tech_,"click",this.boundHandleTechClick_),this.on(this.tech_,"dblclick",this.boundHandleTechDoubleClick_),this.on(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.on(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.on(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.on(this.tech_,"tap",this.boundHandleTechTap_)}removeTechControlsListeners_(){this.off(this.tech_,"tap",this.boundHandleTechTap_),this.off(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.off(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.off(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.off(this.tech_,"click",this.boundHandleTechClick_),this.off(this.tech_,"dblclick",this.boundHandleTechDoubleClick_)}handleTechReady_(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()}handleTechLoadStart_(){this.removeClass("vjs-ended","vjs-seeking"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):this.trigger("loadstart"),this.manualAutoplay_(!0===this.autoplay()&&this.options_.normalizeAutoplay?"play":this.autoplay())}manualAutoplay_(e){if(!this.tech_||"string"!==typeof e)return;const t=()=>{const e=this.muted();this.muted(!0);const t=()=>{this.muted(e)};this.playTerminatedQueue_.push(t);const n=this.play();if(Zt(n))return n.catch((e=>{throw t(),new Error("Rejection at manualAutoplay. Restoring muted value. ".concat(e||""))}))};let n;return"any"!==e||this.muted()?n="muted"!==e||this.muted()?this.play():t():(n=this.play(),Zt(n)&&(n=n.catch(t))),Zt(n)?n.then((()=>{this.trigger({type:"autoplay-success",autoplay:e})})).catch((()=>{this.trigger({type:"autoplay-failure",autoplay:e})})):void 0}updateSourceCaches_(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=e,n="";"string"!==typeof t&&(t=e.src,n=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!n&&(n=((e,t)=>{if(!t)return"";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;const n=e.cache_.sources.filter((e=>e.src===t));if(n.length)return n[0].type;const i=e.$$("source");for(let r=0;r<i.length;r++){const e=i[r];if(e.type&&e.src&&e.src===t)return e.type}return Hn(t)})(this,t)),this.cache_.source=q({},e,{src:t,type:n});const i=this.cache_.sources.filter((e=>e.src&&e.src===t)),r=[],s=this.$$("source"),a=[];for(let o=0;o<s.length;o++){const e=Ce(s[o]);r.push(e),e.src&&e.src===t&&a.push(e.src)}a.length&&!i.length?this.cache_.sources=r:i.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t}handleTechSourceset_(e){if(!this.changingSrc_){let t=e=>this.updateSourceCaches_(e);const n=this.currentSource().src,i=e.src;n&&!/^blob:/.test(n)&&/^blob:/.test(i)&&(!this.lastSource_||this.lastSource_.tech!==i&&this.lastSource_.player!==n)&&(t=()=>{}),t(i),e.src||this.tech_.any(["sourceset","loadstart"],(e=>{if("sourceset"===e.type)return;const t=this.techGet_("currentSrc");this.lastSource_.tech=t,this.updateSourceCaches_(t)}))}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:"sourceset"})}hasStarted(e){if(void 0===e)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?this.addClass("vjs-has-started"):this.removeClass("vjs-has-started"))}handleTechPlay_(){this.removeClass("vjs-ended","vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")}handleTechRateChange_(){this.tech_.playbackRate()>0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach((e=>e.callback(e.event))),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")}handleTechWaiting_(){this.addClass("vjs-waiting"),this.trigger("waiting");const e=this.currentTime(),t=()=>{e!==this.currentTime()&&(this.removeClass("vjs-waiting"),this.off("timeupdate",t))};this.on("timeupdate",t)}handleTechCanPlay_(){this.removeClass("vjs-waiting"),this.trigger("canplay")}handleTechCanPlayThrough_(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")}handleTechPlaying_(){this.removeClass("vjs-waiting"),this.trigger("playing")}handleTechSeeking_(){this.addClass("vjs-seeking"),this.trigger("seeking")}
vendor: 11,078 bytes, line 2
2handleTechSeeked_(){this.removeClass("vjs-seeking","vjs-ended"),this.trigger("seeked")}handleTechPause_(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")}handleTechEnded_(){this.addClass("vjs-ended"),this.removeClass("vjs-waiting"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")}handleTechDurationChange_(){this.duration(this.techGet_("duration"))}handleTechClick_(e){this.controls_&&(void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.click&&!1===this.options_.userActions.click||(void 0!==this.options_&&void 0!==this.options_.userActions&&"function"===typeof this.options_.userActions.click?this.options_.userActions.click.call(this,e):this.paused()?Jt(this.play()):this.pause()))}handleTechDoubleClick_(e){if(!this.controls_)return;Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),(t=>t.contains(e.target)))||void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.doubleClick&&!1===this.options_.userActions.doubleClick||(void 0!==this.options_&&void 0!==this.options_.userActions&&"function"===typeof this.options_.userActions.doubleClick?this.options_.userActions.doubleClick.call(this,e):this.isInPictureInPicture()&&!a.a.pictureInPictureElement?this.exitPictureInPicture():this.isFullscreen()?this.exitFullscreen():this.requestFullscreen())}handleTechTap_(){this.userActive(!this.userActive())}handleTechTouchStart_(){this.userWasActive=this.userActive()}handleTechTouchMove_(){this.userWasActive&&this.reportUserActivity()}handleTechTouchEnd_(e){e.cancelable&&e.preventDefault()}toggleFullscreenClass_(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")}documentFullscreenChange_(e){const t=e.target.player;if(t&&t!==this)return;const n=this.el();let i=a.a[this.fsApi_.fullscreenElement]===n;!i&&n.matches&&(i=n.matches(":"+this.fsApi_.fullscreen)),this.isFullscreen(i)}handleTechFullscreenChange_(e,t){t&&(t.nativeIOSFullscreen&&(this.addClass("vjs-ios-native-fs"),this.tech_.one("webkitendfullscreen",(()=>{this.removeClass("vjs-ios-native-fs")}))),this.isFullscreen(t.isFullscreen))}handleTechFullscreenError_(e,t){this.trigger("fullscreenerror",t)}togglePictureInPictureClass_(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")}handleTechEnterPictureInPicture_(e){this.isInPictureInPicture(!0)}handleTechLeavePictureInPicture_(e){this.isInPictureInPicture(!1)}handleTechError_(){const e=this.tech_.error();e&&this.error(e)}handleTechTextData_(){let e=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e)}getCache(){return this.cache_}resetCache_(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],playbackRates:[],volume:1}}techCall_(e,t){this.ready((function(){if(e in Un)return function(e,t,n,i){return t[n](e.reduce(qn(n),i))}(this.middleware_,this.tech_,e,t);if(e in Fn)return Nn(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(n){throw R(n),n}}),!0)}techGet_(e){if(this.tech_&&this.tech_.isReady_){if(e in Bn)return function(e,t,n){return e.reduceRight(qn(n),t[n]())}(this.middleware_,this.tech_,e);if(e in Fn)return Nn(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw R("Video.js: ".concat(e," method not defined for ").concat(this.techName_," playback technology."),t),t;if("TypeError"===t.name)throw R("Video.js: ".concat(e," unavailable on ").concat(this.techName_," playback technology element."),t),this.tech_.isReady_=!1,t;throw R(t),t}}}play(){return new Promise((e=>{this.play_(e)}))}play_(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Jt;this.playCallbacks_.push(e);const t=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc())),n=Boolean(pe||he);if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!t)return this.waitToPlay_=e=>{this.play_()},this.one(["ready","loadstart"],this.waitToPlay_),void(!t&&n&&this.load());const i=this.techGet_("play");n&&this.hasClass("vjs-ended")&&this.resetProgressBar_(),null===i?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(i)}runPlayTerminatedQueue_(){const e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach((function(e){e()}))}runPlayCallbacks_(e){const t=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],t.forEach((function(t){t(e)}))}pause(){this.techCall_("pause")}paused(){return!1!==this.techGet_("paused")}played(){return this.techGet_("played")||zt(0,0)}scrubbing(e){if("undefined"===typeof e)return this.scrubbing_;this.scrubbing_=!!e,this.techCall_("setScrubbing",this.scrubbing_),e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")}currentTime(e){return void 0===e?(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime):(e<0&&(e=0),this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_("setCurrentTime",e),this.cache_.initTime=0,void(isFinite(e)&&(this.cache_.currentTime=Number(e)))):(this.cache_.initTime=e,this.off("canplay",this.boundApplyInitTime_),void this.one("canplay",this.boundApplyInitTime_)))}applyInitTime_(){this.currentTime(this.cache_.initTime)}duration(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(e=parseFloat(e))<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),isNaN(e)||this.trigger("durationchange"))}remainingTime(){return this.duration()-this.currentTime()}remainingTimeDisplay(){return Math.floor(this.duration())-Math.floor(this.currentTime())}buffered(){let e=this.techGet_("buffered");return e&&e.length||(e=zt(0,0)),e}seekable(){let e=this.techGet_("seekable");return e&&e.length||(e=zt(0,0)),e}seeking(){return this.techGet_("seeking")}ended(){return this.techGet_("ended")}networkState(){return this.techGet_("networkState")}readyState(){return this.techGet_("readyState")}bufferedPercent(){return Qt(this.buffered(),this.duration())}bufferedEnd(){const e=this.buffered(),t=this.duration();let n=e.end(e.length-1);return n>t&&(n=t),n}volume(e){let t;return void 0!==e?(t=Math.max(0,Math.min(1,e)),this.cache_.volume=t,this.techCall_("setVolume",t),void(t>0&&this.lastVolume_(t))):(t=parseFloat(this.techGet_("volume")),isNaN(t)?1:t)}muted(e){if(void 0===e)return this.techGet_("muted")||!1;this.techCall_("setMuted",e)}defaultMuted(e){return void 0!==e&&this.techCall_("setDefaultMuted",e),this.techGet_("defaultMuted")||!1}lastVolume_(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e}supportsFullScreen(){return this.techGet_("supportsFullScreen")||!1}isFullscreen(e){if(void 0!==e){const t=this.isFullscreen_;return this.isFullscreen_=Boolean(e),this.isFullscreen_!==t&&this.fsApi_.prefixed&&this.trigger("fullscreenchange"),void this.toggleFullscreenClass_()}return this.isFullscreen_}requestFullscreen(e){this.isInPictureInPicture()&&this.exitPictureInPicture();const t=this;return new Promise(((n,i)=>{function r(){t.off("fullscreenerror",a),t.off("fullscreenchange",s)}function s(){r(),n()}function a(e,t){r(),i(t)}t.one("fullscreenchange",s),t.one("fullscreenerror",a);const o=t.requestFullscreenHelper_(e);o&&(o.then(r,r),o.then(n,i))}))}requestFullscreenHelper_(e){let t;if(this.fsApi_.prefixed||(t=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==e&&(t=e)),this.fsApi_.requestFullscreen){const e=this.el_[this.fsApi_.requestFullscreen](t);return e&&e.then((()=>this.isFullscreen(!0)),(()=>this.isFullscreen(!1))),e}this.tech_.supportsFullScreen()&&!0===!this.options_.preferFullWindow?this.techCall_("enterFullScreen"):this.enterFullWindow()}exitFullscreen(){const e=this;return new Promise(((t,n)=>{function i(){e.off("fullscreenerror",s),e.off("fullscreenchange",r)}function r(){i(),t()}function s(e,t){i(),n(t)}e.one("fullscreenchange",r),e.one("fullscreenerror",s);const a=e.exitFullscreenHelper_();a&&(a.then(i,i),a.then(t,n))}))}exitFullscreenHelper_(){if(this.fsApi_.requestFullscreen){const e=a.a[this.fsApi_.exitFullscreen]();return e&&Jt(e.then((()=>this.isFullscreen(!1)))),e}this.tech_.supportsFullScreen()&&!0===!this.options_.preferFullWindow?this.techCall_("exitFullScreen"):this.exitFullWindow()}enterFullWindow(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=a.a.documentElement.style.overflow,dt(a.a,"keydown",this.boundFullWindowOnEscKey_),a.a.documentElement.style.overflow="hidden",Ae(a.a.body,"vjs-full-window"),this.trigger("enterFullWindow")}fullWindowOnEscKey(e){"Escape"===e.key&&!0===this.isFullscreen()&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())}exitFullWindow(){this.isFullscreen(!1),this.isFullWindow=!1,ut(a.a,"keydown",this.boundFullWindowOnEscKey_),a.a.documentElement.style.overflow=this.docOrigOverflow,we(a.a.body,"vjs-full-window"),this.trigger("exitFullWindow")}disablePictureInPicture(e){if(void 0===e)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",e),this.options_.disablePictureInPicture=e,this.trigger("disablepictureinpicturechanged")}isInPictureInPicture(e){return void 0!==e?(this.isInPictureInPicture_=!!e,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_}requestPictureInPicture(){if(this.options_.enableDocumentPictureInPicture&&r.a.documentPictureInPicture){const e=a.a.createElement(this.el().tagName);return e.classList=this.el().classList,e.classList.add("vjs-pip-container"),this.posterImage&&e.appendChild(this.posterImage.el().cloneNode(!0)),this.titleBar&&e.appendChild(this.titleBar.el().cloneNode(!0)),e.appendChild(_e("p",{className:"vjs-pip-text"},{},this.localize("Playing in picture-in-picture"))),r.a.documentPictureInPicture.requestWindow({width:this.videoWidth(),height:this.videoHeight()}).then((t=>(Ge(t),this.el_.parentNode.insertBefore(e,this.el_),t.document.body.appendChild(this.el_),t.document.body.classList.add("vjs-pip-window"),this.player_.isInPictureInPicture(!0),this.player_.trigger({type:"enterpictureinpicture",pipWindow:t}),t.addEventListener("pagehide",(t=>{const n=t.target.querySelector(".video-js");e.parentNode.replaceChild(n,e),this.player_.isInPictureInPicture(!1),this.player_.trigger("leavepictureinpicture")})),t)))}return"pictureInPictureEnabled"in a.a&&!1===this.disablePictureInPicture()?this.techGet_("requestPictureInPicture"):Promise.reject("No PiP mode is available")}exitPictureInPicture(){return r.a.documentPictureInPicture&&r.a.documentPictureInPicture.window?(r.a.documentPictureInPicture.window.close(),Promise.resolve()):"pictureInPictureEnabled"in a.a?a.a.exitPictureInPicture():void 0}handleKeyDown(e){const{userActions:t}=this.options_;if(!t||!t.hotkeys)return;(e=>{const t=e.tagName.toLowerCase();if(e.isContentEditable)return!0;
2if("input"===t)return-1===["button","checkbox","hidden","radio","reset","submit"].indexOf(e.type);return-1!==["textarea"].indexOf(t)})(this.el_.ownerDocument.activeElement)||("function"===typeof t.hotkeys?t.hotkeys.call(this,e):this.handleHotkeys(e))}handleHotkeys(e){const t=this.options_.userActions?this.options_.userActions.hotkeys:{},{fullscreenKey:n=(t=>"f"===e.key.toLowerCase()),muteKey:i=(t=>"m"===e.key.toLowerCase()),playPauseKey:r=(t=>"k"===e.key.toLowerCase()||" "===e.key.toLowerCase())}=t;if(n.call(this,e)){e.preventDefault(),e.stopPropagation();const t=Ut.getComponent("FullscreenToggle");!1!==a.a[this.fsApi_.fullscreenEnabled]&&t.prototype.handleClick.call(this,e)}else if(i.call(this,e)){e.preventDefault(),e.stopPropagation();Ut.getComponent("MuteToggle").prototype.handleClick.call(this,e)}else if(r.call(this,e)){e.preventDefault(),e.stopPropagation();Ut.getComponent("PlayToggle").prototype.handleClick.call(this,e)}}canPlayType(e){let t;for(let n=0,i=this.options_.techOrder;n<i.length;n++){const r=i[n];let s=Pn.getTech(r);if(s||(s=Ut.getComponent(r)),s){if(s.isSupported()&&(t=s.canPlayType(e),t))return t}else R.error('The "'.concat(r,'" tech is undefined. Skipped browser support check for that tech.'))}return""}selectSource(e){const t=this.options_.techOrder.map((e=>[e,Pn.getTech(e)])).filter((e=>{let[t,n]=e;return n?n.isSupported():(R.error('The "'.concat(t,'" tech is undefined. Skipped browser support check for that tech.')),!1)})),n=function(e,t,n){let i;return e.some((e=>t.some((t=>{if(i=n(e,t),i)return!0})))),i};let i;const r=(e,t)=>{let[n,i]=e;if(i.canPlaySource(t,this.options_[n.toLowerCase()]))return{source:t,tech:n}};var s;return i=this.options_.sourceOrder?n(e,t,(s=r,(e,t)=>s(t,e))):n(t,e,r),i||!1}handleSrc_(e,t){if("undefined"===typeof e)return this.cache_.src||"";this.resetRetryOnError_&&this.resetRetryOnError_();const n=Wn(e);if(n.length){if(this.changingSrc_=!0,t||(this.cache_.sources=n),this.updateSourceCaches_(n[0]),Mn(this,n[0],((e,i)=>{this.middleware_=i,t||(this.cache_.sources=n),this.updateSourceCaches_(e);if(this.src_(e))return n.length>1?this.handleSrc_(n.slice(1)):(this.changingSrc_=!1,this.setTimeout((function(){this.error({code:4,message:this.options_.notSupportedMessage})}),0),void this.triggerReady());var r,s;r=i,s=this.tech_,r.forEach((e=>e.setTech&&e.setTech(s)))})),n.length>1){const e=()=>{this.error(null),this.handleSrc_(n.slice(1),!0)},t=()=>{this.off("error",e)};this.one("error",e),this.one("playing",t),this.resetRetryOnError_=()=>{this.off("error",e),this.off("playing",t)}}}else this.setTimeout((function(){this.error({code:4,message:this.options_.notSupportedMessage})}),0)}src(e){return this.handleSrc_(e,!1)}src_(e){const t=this.selectSource([e]);return!t||(Nt(t.tech,this.techName_)?(this.ready((function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),this.changingSrc_=!1}),!0),!1):(this.changingSrc_=!0,this.loadTech_(t.tech,t.source),this.tech_.ready((()=>{this.changingSrc_=!1})),!1))}addSourceElement(e,t){return!!this.tech_&&this.tech_.addSourceElement(e,t)}removeSourceElement(e){return!!this.tech_&&this.tech_.removeSourceElement(e)}load(){this.tech_&&this.tech_.vhs?this.src(this.currentSource()):this.techCall_("load")}reset(){if(this.paused())this.doReset_();else{Jt(this.play().then((()=>this.doReset_())))}}doReset_(){this.tech_&&this.tech_.clearTracks("text"),this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),this.error(null),this.titleBar&&this.titleBar.update({title:void 0,description:void 0}),At(this)&&this.trigger("playerreset")}resetControlBarUI_(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()}resetProgressBar_(){this.currentTime(0);const{currentTimeDisplay:e,durationDisplay:t,progressControl:n,remainingTimeDisplay:i}=this.controlBar||{},{seekBar:r}=n||{};e&&e.updateContent(),t&&t.updateContent(),i&&i.updateContent(),r&&(r.update(
2),r.loadProgressBar&&r.loadProgressBar.update())}resetPlaybackRate_(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()}resetVolumeBar_(){this.volume(1),this.trigger("volumechange")}currentSources(){const e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t}currentSource(){return this.cache_.source||{}}currentSrc(){return this.currentSource()&&this.currentSource().src||""}currentType(){return this.currentSource()&&this.currentSource().type||""}preload(e){return void 0!==e?(this.techCall_("setPreload",e),void(this.options_.preload=e)):this.techGet_("preload")}autoplay(e){if(void 0===e)return this.options_.autoplay||!1;let t;"string"===typeof e&&/(any|play|muted)/.test(e)||!0===e&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_("string"===typeof e?e:"play"),t=!1):this.options_.autoplay=!!e,t="undefined"===typeof t?this.options_.autoplay:t,this.tech_&&this.techCall_("setAutoplay",t)}playsinline(e){return void 0!==e&&(this.techCall_("setPlaysinline",e),this.options_.playsinline=e),this.techGet_("playsinline")}loop(e){return void 0!==e?(this.techCall_("setLoop",e),void(this.options_.loop=e)):this.techGet_("loop")}poster(e){if(void 0===e)return this.poster_;e||(e=""),e!==this.poster_&&(this.poster_=e,this.techCall_("setPoster",e),this.isPosterFromTech_=!1,this.trigger("posterchange"))}handleTechPosterChange_(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){const e=this.tech_.poster()||"";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger("posterchange"))}}controls(e){if(void 0===e)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_("setControls",e),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))}usingNativeControls(e){if(void 0===e)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))}error(e){if(void 0===e)return this.error_||null;if(j("beforeerror").forEach((t=>{const n=t(this,e);U(n)&&!Array.isArray(n)||"string"===typeof n||"number"===typeof n||null===n?e=n:this.log.error("please return a value that MediaError expects in beforeerror hooks")})),this.options_.suppressNotSupportedError&&e&&4===e.code){const t=function(){this.error(e)};return this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],t),void this.one("loadstart",(function(){this.off(["click","touchstart"],t)}))}if(null===e)return this.error_=null,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new Kt(e),this.addClass("vjs-error"),R.error("(CODE:".concat(this.error_.code," ").concat(Kt.errorTypes[this.error_.code],")"),this.error_.message,this.error_),this.trigger("error"),j("error").forEach((e=>e(this,this.error_)))}reportUserActivity(e){this.userActivity_=!0}userActive(e){if(void 0===e)return this.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,this.userActive_)return this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),void this.trigger("useractive");this.tech_&&this.tech_.one("mousemove",(function(e){e.stopPropagation(),e.preventDefault()})),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}}listenForUserActivity_(){let e,t,n;const i=yt(this,this.reportUserActivity),r=function(t){i(),this.clearInterval(e)};this.on("mousedown",(function(){i(),this.clearInterval(e),e=this.setInterval(i,250)})),this.on("mousemove",(function(e){e.screenX===t&&e.screenY===n||(t=e.screenX,n=e.screenY,i())})),this.on("mouseup",r),this.on("mouseleave",r);const s=this.getChild("controlBar");let a;!s||he||Y||(s.on("mouseenter",(function(e){0!==this.player().options_.inactivityTimeout&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0})),s.on("mouseleave",(function(e){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout}))),this.on("keydown",i),this.on("keyup",i);this.setInterval((function(){if(!this.userActivity_)return;this.userActivity_=!1,this.userActive(!0),this.clearTimeout(a);const e=this.options_.inactivityTimeout;e<=0||(a=this.setTimeout((function(){this.userActivity_||this.userActive(!1)}),e))}),250)}playbackRate(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",e)}defaultPlaybackRate(e){return void 0!==e?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1}isAudio(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e}updatePlayerHeightOnAudioOnlyMode_(){const e=this.getChild("ControlBar");e&&this.audioOnlyCache_.controlBarHeight!==e.currentHeight()&&(this.audioOnlyCache_.controlBarHeight=e.currentHeight(),this.height(this.audioOnlyCache_.controlBarHeight))}enableAudioOnlyUI_(){this.addClass("vjs-audio-only-mode");const e=this.children(),t=this.getChild("ControlBar"),n=t&&t.currentHeight();e.forEach((e=>{e!==t&&e.el_&&!e.hasClass("vjs-hidden")&&(e.hide(),this.audioOnlyCache_.hiddenChildren.push(e))}
vendor: 5,436 bytes, line 2
2)),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.audioOnlyCache_.controlBarHeight=n,this.on("playerresize",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.height(n),this.trigger("audioonlymodechange")}disableAudioOnlyUI_(){this.removeClass("vjs-audio-only-mode"),this.off("playerresize",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.audioOnlyCache_.hiddenChildren.forEach((e=>e.show())),this.height(this.audioOnlyCache_.playerHeight),this.trigger("audioonlymodechange")}audioOnlyMode(e){if("boolean"!==typeof e||e===this.audioOnlyMode_)return this.audioOnlyMode_;if(this.audioOnlyMode_=e,e){const e=[];return this.isInPictureInPicture()&&e.push(this.exitPictureInPicture()),this.isFullscreen()&&e.push(this.exitFullscreen()),this.audioPosterMode()&&e.push(this.audioPosterMode(!1)),Promise.all(e).then((()=>this.enableAudioOnlyUI_()))}return Promise.resolve().then((()=>this.disableAudioOnlyUI_()))}enablePosterModeUI_(){(this.tech_&&this.tech_).hide(),this.addClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")}disablePosterModeUI_(){(this.tech_&&this.tech_).show(),this.removeClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")}audioPosterMode(e){if("boolean"!==typeof e||e===this.audioPosterMode_)return this.audioPosterMode_;if(this.audioPosterMode_=e,e){if(this.audioOnlyMode()){return this.audioOnlyMode(!1).then((()=>{this.enablePosterModeUI_()}))}return Promise.resolve().then((()=>{this.enablePosterModeUI_()}))}return Promise.resolve().then((()=>{this.disablePosterModeUI_()}))}addTextTrack(e,t,n){if(this.tech_)return this.tech_.addTextTrack(e,t,n)}addRemoteTextTrack(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)}removeRemoteTextTrack(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{track:t}=e;if(t||(t=e),this.tech_)return this.tech_.removeRemoteTextTrack(t)}getVideoPlaybackQuality(){return this.techGet_("getVideoPlaybackQuality")}videoWidth(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0}videoHeight(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0}language(e){if(void 0===e)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),At(this)&&this.trigger("languagechange"))}languages(){return q(Er.prototype.options_.languages,this.languages_)}toJSON(){const e=q(this.options_),t=e.tracks;e.tracks=[];for(let n=0;n<t.length;n++){let i=t[n];i=q(i),i.player=void 0,e.tracks[n]=i}return e}createModal(e,t){(t=t||{}).content=e||"";const n=new sn(this,t);return this.addChild(n),n.on("dispose",(()=>{this.removeChild(n)})),n.open(),n}updateCurrentBreakpoint_(){if(!this.responsive())return;const e=this.currentBreakpoint(),t=this.currentWidth();for(let n=0;n<kr.length;n++){const i=kr[n];if(t<=this.breakpoints_[i]){if(e===i)return;e&&this.removeClass(Cr[e]),this.addClass(Cr[i]),this.breakpoint_=i;break}}}removeCurrentBreakpoint_(){const e=this.currentBreakpointClass();this.breakpoint_="",e&&this.removeClass(e)}breakpoints(e){return void 0===e||(this.breakpoint_="",this.breakpoints_=Object.assign({},Or,e),this.updateCurrentBreakpoint_()),Object.assign(this.breakpoints_)}responsive(e){if(void 0===e)return this.responsive_;return(e=Boolean(e))!==this.responsive_?(this.responsive_=e,e?(this.on("playerresize",this.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e):void 0}currentBreakpoint(){return this.breakpoint_}currentBreakpointClass(){return Cr[this.breakpoint_]||""}loadMedia(e,t){if(!e||"object"!==typeof e)return;const n=this.crossOrigin();this.reset(),this.cache_.media=q(e);const{artist:i,artwork:r,description:s,poster:a,src:o,textTracks:l,title:c}=this.cache_.media;!r&&a&&(this.cache_.media.artwork=[{src:a,type:Hn(a)}]),n&&this.crossOrigin(n),o&&this.src(o),a&&this.poster(a),Array.isArray(l)&&l.forEach((e=>this.addRemoteTextTrack(e,!1))),this.titleBar&&this.titleBar.update({title:c,description:s||i||""}),this.ready(t)}getMedia(){if(!this.cache_.media){const e=this.poster(),t={src:this.currentSources(),textTracks:Array.prototype.map.call(this.remoteTextTracks(),(e=>({kind:e.kind,label:e.label,language:e.language,src:e.src})))};return e&&(t.poster=e,t.artwork=[{src:t.poster,type:Hn(t.poster)}]),t}return q(this.cache_.media)}static getTagSettings(e){const t={sources:[],tracks:[]},n=Ce(e),i=n["data-setup"];if(Se(e,"vjs-fill")&&(n.fill=!0),Se(e,"vjs-fluid")&&(n.fluid=!0),null!==i)try{Object.assign(n,JSON.parse(i||"{}"))}catch(r){R.error("data-setup",r)}if(Object.assign(t,n),e.hasChildNodes()){const n=e.childNodes;for(let e=0,i=n.length;e<i;e++){const i=n[e],r=i.nodeName.toLowerCase();"source"===r?t.sources.push(Ce(i)):"track"===r&&t.tracks.push(Ce(i))}}return t}debug(e){if(void 0===e)return this.debugEnabled_;e?(this.trigger("debugon"),this.previousLogLevel_=this.log.level,this.log.level("debug"),this.debugEnabled_=!0):(this.trigger("debugoff"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)}playbackRates(e){if(void 0===e)return this.cache_.playbackRates;Array.isArray(e)&&e.every((e=>"number"===typeof e))&&(this.cache_.playbackRates=e,this.trigger("playbackrateschange"))}}Er.prototype.videoTracks=()=>{},Er.prototype.audioTracks=()=>{},Er.prototype.textTracks=()=>{},Er.prototype.remoteTextTracks=()=>{},Er.prototype.remoteTextTrackEls=()=>{}
2,In.names.forEach((function(e){const t=In[e];Er.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}})),Er.prototype.crossorigin=Er.prototype.crossOrigin,Er.players={};const Ir=r.a.navigator;Er.prototype.options_={techOrder:Pn.defaultTechOrder_,html5:{},enableSourceset:!0,inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","titleBar","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:Ir&&(Ir.languages&&Ir.languages[0]||Ir.userLanguage||Ir.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1,spatialNavigation:{enabled:!1,horizontalSeek:!1},enableSmoothSeeking:!1,disableSeekWhileScrubbingOnMobile:!1,disableSeekWhileScrubbingOnSTV:!1},wr.forEach((function(e){Er.prototype["handleTech".concat(Mt(e),"_")]=function(){return this.trigger(e)}})),Ut.registerComponent("Player",Er);const Pr="plugin",Rr="activePlugins_",Dr={},Lr=e=>Dr.hasOwnProperty(e),Mr=e=>Lr(e)?Dr[e]:void 0,Nr=(e,t)=>{e[Rr]=e[Rr]||{},e[Rr][t]=!0},Br=(e,t,n)=>{const i=(n?"before":"")+"pluginsetup";e.trigger(i,t),e.trigger(i+":"+t.name,t)},Ur=(e,t)=>(t.prototype.name=e,function(){Br(this,{name:e,plugin:t,instance:null},!0);for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];const s=new t(...[this,...i]);return this[e]=()=>s,Br(this,s.getEventHash()),s});class Fr{constructor(e){if(this.constructor===Fr)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=e,this.log||(this.log=this.player.log.createLogger(this.name)),Pt(this),delete this.trigger,Dt(this,this.constructor.defaultState),Nr(e,this.name),this.dispose=this.dispose.bind(this),e.on("dispose",this.dispose)}version(){return this.constructor.VERSION}getEventHash(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.name=this.name,e.plugin=this.constructor,e.instance=this,e}trigger(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return ht(this.eventBusEl_,e,this.getEventHash(t))}handleStateChanged(e){}dispose(){const{name:e,player:t}=this;this.trigger("dispose"),this.off(),t.off("dispose",this.dispose),t[Rr][e]=!1,this.player=this.state=null,t[e]=Ur(e,Dr[e])}static isBasic(e){const t="string"===typeof e?Mr(e):e;return"function"===typeof t&&!Fr.prototype.isPrototypeOf(t.prototype)}static registerPlugin(e,t){if("string"!==typeof e)throw new Error('Illegal plugin name, "'.concat(e,'", must be a string, was ').concat(typeof e,"."));if(Lr(e))R.warn('A plugin named "'.concat(e,'" already exists. You may want to avoid re-registering plugins!'));else if(Er.prototype.hasOwnProperty(e))throw new Error('Illegal plugin name, "'.concat(e,'", cannot share a name with an existing player method!'));if("function"!==typeof t)throw new Error('Illegal plugin for "'.concat(e,'", must be a function, was ').concat(typeof t,"."));return Dr[e]=t,e!==Pr&&(Fr.isBasic(t)?Er.prototype[e]=function(e,t){const n=function(){Br(this,{name:e,plugin:t,instance:null},!0);const n=t.apply(this,arguments);return Nr(this,e),Br(this,{name:e,plugin:t,instance:n}),n};return Object.keys(t).forEach((function(e){n[e]=t[e]})),n}(e,t):Er.prototype[e]=Ur(e,t)),t}static deregisterPlugin(e){if(e===Pr)throw new Error("Cannot de-register base plugin.");Lr(e)&&(delete Dr[e],delete Er.prototype[e])}static getPlugins(){let e;return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:Object.keys(Dr)).forEach((t=>{const n=Mr(t);n&&(e=e||{},e[t]=n)})),e}static getPluginVersion(e){const t=Mr(e);return t&&t.VERSION||""}}function qr(e,t,n,i){return function(e,t){let n=!1;return function(){n||R.warn(e),n=!0;for(var i=arguments.length,r=new Array(i),s=0;s<i;s++)r[s]=arguments[s];return t.apply(this,r)}}("".concat(t," is deprecated and will be removed in ").concat(e,".0; please use ").concat(n," instead."),i)}Fr.getPlugin=Mr,Fr.BASE_PLUGIN_NAME=Pr,Fr.registerPlugin(Pr,Fr),Er.prototype.usingPlugin=function(e){return!!this[Rr]&&!0===this[Rr][e]},Er.prototype.hasPlugin=function(e){return!!Lr(e)};const zr=e=>0===e.indexOf("#")?e.slice(1):e;function Vr(e,t,n){let i=Vr.getPlayer(e);if(i)return t&&R.warn('Player "'.concat(e,'" is already initialised. Options will not be applied.')),n&&i.ready(n),i;const s="string"===typeof e?Ve("#"+zr(e)):e;if(!ye(s))throw new TypeError("The element or ID supplied is not val
2id. (videojs)");const a="getRootNode"in s&&s.getRootNode()instanceof r.a.ShadowRoot?s.getRootNode():s.ownerDocument.body;s.ownerDocument.defaultView&&a.contains(s)||R.warn("The element supplied is not included in the DOM"),!0===(t=t||{}).restoreEl&&(t.restoreEl=(s.parentNode&&s.parentNode.hasAttribute&&s.parentNode.hasAttribute("data-vjs-player")?s.parentNode:s).cloneNode(!0)),j("beforesetup").forEach((e=>{const n=e(s,q(t));U(n)&&!Array.isArray(n)?t=q(t,n):R.error("please return an object in beforesetup hooks")}));const o=Ut.getComponent("Player");return i=new o(s,t,n),j("setup").forEach((e=>e(i))),i}if(Vr.hooks_=w,Vr.hooks=j,Vr.hook=function(e,t){j(e,t)},Vr.hookOnce=function(e,t){j(e,[].concat(t).map((t=>{const n=function(){return k(e,n),t(...arguments)};return n})))},Vr.removeHook=k,!0!==r.a.VIDEOJS_NO_DYNAMIC_STYLE&&fe()){let e=Ve(".vjs-styles-defaults");if(!e){e=$e("vjs-styles-defaults");const t=Ve("head");t&&t.insertBefore(e,t.firstChild),et(e,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid:not(.vjs-audio-only-mode) {\n padding-top: 56.25%\n }\n ")}}Ze(1,Vr),Vr.VERSION=A,Vr.options=Er.prototype.options_,Vr.getPlayers=()=>Er.players,Vr.getPlayer=e=>{const t=Er.players;let n;if("string"===typeof e){const i=zr(e),r=t[i];if(r)return r;n=Ve("#"+i)}else n=e;if(ye(n)){const{player:e,playerId:i}=n;if(e||t[i])return e||t[i]}},Vr.getAllPlayers=()=>Object.keys(Er.players).map((e=>Er.players[e])).filter(Boolean),Vr.players=Er.players,Vr.getComponent=Ut.getComponent,Vr.registerComponent=(e,t)=>(Pn.isTech(t)&&R.warn("The ".concat(e," tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)")),Ut.registerComponent.call(Ut,e,t)),Vr.getTech=Pn.getTech,Vr.registerTech=Pn.registerTech,Vr.use=function(e,t){Rn[e]=Rn[e]||[],Rn[e].push(t)},Object.defineProperty(Vr,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(Vr.middleware,"TERMINATOR",{value:Ln,writeable:!1,enumerable:!0}),Vr.browser=ge,Vr.obj=H,Vr.mergeOptions=qr(9,"videojs.mergeOptions","videojs.obj.merge",q),Vr.defineLazyProperty=qr(9,"videojs.defineLazyProperty","videojs.obj.defineLazyProperty",V),Vr.bind=qr(9,"videojs.bind","native Function.prototype.bind",yt),Vr.registerPlugin=Fr.registerPlugin,Vr.deregisterPlugin=Fr.deregisterPlugin,Vr.plugin=(e,t)=>(R.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),Fr.registerPlugin(e,t)),Vr.getPlugins=Fr.getPlugins,Vr.getPlugin=Fr.getPlugin,Vr.getPluginVersion=Fr.getPluginVersion,Vr.addLanguage=function(e,t){return e=(""+e).toLowerCase(),Vr.options.languages=q(Vr.options.languages,{[e]:t}),Vr.options.languages[e]},Vr.log=R,Vr.createLogger=D,Vr.time=Yt,Vr.createTimeRange=qr(9,"videojs.createTimeRange","videojs.time.createTimeRanges",zt),Vr.createTimeRanges=qr(9,"videojs.createTimeRanges","videojs.time.createTimeRanges",zt),Vr.formatTime=qr(9,"videojs.formatTime","videojs.time.formatTime",Xt),Vr.setFormatTime=qr(9,"videojs.setFormatTime","videojs.time.setFormatTime",Wt),Vr.resetFormatTime=qr(9,"videojs.resetFormatTime","videojs.time.resetFormatTime",Gt),Vr.parseUrl=qr(9,"videojs.parseUrl","videojs.url.parseUrl",bn),Vr.isCrossOrigin=qr(9,"videojs.isCrossOrigin","videojs.url.isCrossOrigin",Tn),Vr.EventTarget=xt,Vr.any=gt,Vr.on=dt,Vr.one=pt,Vr.off=ut,Vr.trigger=ht,Vr.xhr=l.a,Vr.TrackList=an,Vr.TextTrack=wn,Vr.TextTrackList=un,Vr.AudioTrack=jn,Vr.AudioTrackList=ln,Vr.VideoTrack=kn,Vr.VideoTrackList=dn,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach((e=>{Vr[e]=function(){return R.warn("videojs.".concat(e,"() is deprecated; use videojs.dom.").concat(e,"() instead")),Xe[e].apply(null,arguments)}})),Vr.computedStyle=qr(9,"videojs.computedStyle","videojs.dom.computedStyle",We),Vr.dom=Xe,Vr.fn=_t,Vr.num=pi,Vr.str=Bt,Vr.url=xn,Vr.Error={NetworkBadStatus:"networkbadstatus",NetworkRequestFailed:"networkrequestfailed",NetworkRequestAborted:"networkrequestaborted",NetworkRequestTimeout:"networkrequesttimeout",NetworkBodyParserFailed:"networkbodyparserfailed",StreamingHlsPlaylistParserError:"streaminghlsplaylistparsererror",StreamingDashManifestParserError:"streamingdashmanifestparsererror",StreamingContentSteeringParserError:"streamingcontentsteeringparsererror",StreamingVttParserError:"streamingvttparsererror",StreamingFailedToSelectNextSegment:"streamingfailedtoselectnextsegment",StreamingFailedToDecryptSegment:"streamingfailedtodecryptsegment",StreamingFailedToTransmuxSegment:"streamingfailedtotransmuxsegment",StreamingFailedToAppendSegment:"streamingfailedtoappendsegment",StreamingCodecsChangeError:"streamingcodecschangeerror"};class Hr{constructor(e){let t=this;return t.id=e.id,t.label=t.id,t.width=e.width,t.height=e.height,t.bitrate=e.bandwidth,t.frameRate=e.frameRate,t.enabled_=e.enabled,Object.defineProperty(t,"enabled",{get:()=>t.enabled_(),set(e){t.enabled_(e)}}),t}}class Wr extends Vr.EventTarget{constructor(){super();let e=this;return e.levels_=[],e.selectedIndex_=-1,Object.defineProperty(e,"selectedIndex",{get:()=>e.selectedIndex_}),Object.defineProperty(e,"length",{get:()=>e.levels_.length}),e[Symbol.iterator]=()=>e.levels_.values(),e}addQualityLevel(e){let t=this.getQualityLevelById(e.id);if(t)return t;const n=this.levels_.length;return t=new Hr(e),""+n in this||Object.defineProperty(this,n,{get(){return this.levels_[n]}}),this.levels_.push(t),this.trigger({qualityLevel:t,type:"addqualitylevel"}),t}removeQualityLevel(e){let t=null;for(let n=0,i=this.length;n<i;n++)if(this[n]===e){t=this.levels_.splice(n,1)[0],this.selectedIndex_===n?this.selectedIndex_=-1:this.selectedIndex_>n&&this.selectedIndex_--;break}return t&&this.trigger({qualityLevel:e,type:"removequalitylevel"}),t}getQualityLevelById(e){for(let t=0,n=this.length;t<n;t++){const n=this[t];if(n.id===e)return n}return null}dispose(){this.selectedIndex_=-1,this.levels_.length=0}}Wr.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"};for(const t in Wr.prototype.allowedEvents_)Wr.prototype["on"+t]=null;var Gr="4.1.0";const Xr=function(e){return function(e,t){const n=e.qualityLevels,i=new Wr,r=function(){i.dispose(),e.qualityLevels=n,e.off("dispose",r)};return e.on("dispose",r),e.qualityLevels=()=>i,e.qualityLevels.VERSION=Gr,i}(this,Vr.obj.merge({},e))};Vr.registerPlugin("qualityLevels",Xr),Xr.VERSION=Gr;const Yr=p.a,Qr=(e,t)=>
2t&&t.responseURL&&e!==t.responseURL?t.responseURL:e,Kr=e=>Vr.log.debug?Vr.log.debug.bind(Vr,"VHS:","".concat(e," >")):function(){};function Zr(){const e=Vr.obj||Vr,t=e.merge||e.mergeOptions;for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return t.apply(e,i)}function Jr(){const e=Vr.time||Vr,t=e.createTimeRanges||e.createTimeRanges;for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return t.apply(e,i)}const $r=1/30,es=.1,ts=function(e,t){const n=[];let i;if(e&&e.length)for(i=0;i<e.length;i++)t(e.start(i),e.end(i))&&n.push([e.start(i),e.end(i)]);return Jr(n)},ns=function(e,t){return ts(e,(function(e,n){return e-es<=t&&n+es>=t}))},is=function(e,t){return ts(e,(function(e){return e-$r>=t}))},rs=e=>{const t=[];if(!e||!e.length)return"";for(let n=0;n<e.length;n++)t.push(e.start(n)+" => "+e.end(n));return t.join(", ")},ss=e=>{const t=[];for(let n=0;n<e.length;n++)t.push({start:e.start(n),end:e.end(n)});return t},as=function(e){if(e&&e.length&&e.end)return e.end(e.length-1)},os=function(e,t){let n=0;if(!e||!e.length)return n;for(let i=0;i<e.length;i++){const r=e.start(i),s=e.end(i);t>s||(n+=t>r&&t<=s?s-t:s-r)}return n},ls=(e,t)=>{if(!t.preload)return t.duration;let n=0;return(t.parts||[]).forEach((function(e){n+=e.duration})),(t.preloadHints||[]).forEach((function(t){"PART"===t.type&&(n+=e.partTargetDuration)})),n},cs=e=>(e.segments||[]).reduce(((e,t,n)=>(t.parts?t.parts.forEach((function(i,r){e.push({duration:i.duration,segmentIndex:n,partIndex:r,part:i,segment:t})})):e.push({duration:t.duration,segmentIndex:n,partIndex:null,segment:t,part:null}),e)),[]),ds=e=>{const t=e.segments&&e.segments.length&&e.segments[e.segments.length-1];return t&&t.parts||[]},us=e=>{let{preloadSegment:t}=e;if(!t)return;const{parts:n,preloadHints:i}=t;let r=(i||[]).reduce(((e,t)=>e+("PART"===t.type?1:0)),0);return r+=n&&n.length?n.length:0,r},hs=(e,t)=>{if(t.endList)return 0;if(e&&e.suggestedPresentationDelay)return e.suggestedPresentationDelay;const n=ds(t).length>0;return n&&t.serverControl&&t.serverControl.partHoldBack?t.serverControl.partHoldBack:n&&t.partTargetDuration?3*t.partTargetDuration:t.serverControl&&t.serverControl.holdBack?t.serverControl.holdBack:t.targetDuration?3*t.targetDuration:0},ps=function(e,t,n){if("undefined"===typeof t&&(t=e.mediaSequence+e.segments.length),t<e.mediaSequence)return 0;const i=function(e,t){let n=0,i=t-e.mediaSequence,r=e.segments[i];if(r){if("undefined"!==typeof r.start)return{result:r.start,precise:!0};if("undefined"!==typeof r.end)return{result:r.end-r.duration,precise:!0}}for(;i--;){if(r=e.segments[i],"undefined"!==typeof r.end)return{result:n+r.end,precise:!0};if(n+=ls(e,r),"undefined"!==typeof r.start)return{result:n+r.start,precise:!0}}return{result:n,precise:!1}}(e,t);if(i.precise)return i.result;const r=function(e,t){let n,i=0,r=t-e.mediaSequence;for(;r<e.segments.length;r++){if(n=e.segments[r],"undefined"!==typeof n.start)return{result:n.start-i,precise:!0};if(i+=ls(e,n),"undefined"!==typeof n.end)return{result:n.end-i,precise:!0}}return{result:-1,precise:!1}}(e,t);return r.precise?r.result:i.result+n},gs=function(e,t,n){if(!e)return 0;if("number"!==typeof n&&(n=0),"undefined"===typeof t){if(e.totalDuration)return e.totalDuration;if(!e.endList)return r.a.Infinity}return ps(e,t,n)},ms=function(e){let{defaultDuration:t,durationList:n,startIndex:i,endIndex:r}=e,s=0;if(i>r&&([i,r]=[r,i]),i<0){for(let e=i;e<Math.min(0,r);e++)s+=t;i=0}for(let a=i;a<r;a++)s+=n[a].duration;return s},fs=function(e,t,n,i){if(!e||!e.segments)return null;if(e.endList)return gs(e);if(null===t)return null;t=t||0;let r=ps(e,e.mediaSequence+e.segments.length,t);return n&&(r-=i="number"===typeof i?i:hs(null,e)),Math.max(0,r)},ys=function(e){return e.excludeUntil&&e.excludeUntil>Date.now()},bs=function(e){return e.excludeUntil&&e.excludeUntil===1/0},vs=function(e){const t=ys(e);return!e.disabled&&!t},_s=function(e,t){return t.attributes&&t.attributes[e]},Ts=(e,t)=>{if(1===e.playlists.length)return!0;const n=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===e.playlists.filter((e=>!!vs(e)&&(e.attributes.BANDWIDTH||0)<n)).length},xs=(e,t)=>!(!e&&!t||!e&&t||e&&!t)&&(e===t||(!(!e.id||!t.id||e.id!==t.id)||(!(!e.resolvedUri||!t.resolvedUri||e.resolvedUri!==t.resolvedUri)||!(!e.uri||!t.uri||e.uri!==t.uri)))),Ss=function(e,t){const n=e&&e.mediaGroups&&e.mediaGroups.AUDIO||{};let i=!1;for(const r in n){for(const e in n[r])if(i=t(n[r][e]),i)break;if(i)break}return!!i},As=e=>{if(!e||!e.playlists||!e.playlists.length){return Ss(e,(e=>e.playlists&&e.playlists.length||e.uri))}for(let t=0;t<e.playlists.length;t++){const n=e.playlists[t],i=n.attributes&&n.attributes.CODECS;if(i&&i.split(",").every((e=>Object(m.f)(e))))continue;if(!Ss(e,(e=>xs(n,e))))return!1}return!0};var ws={liveEdgeDelay:hs,duration:gs,seekable:function(e,t,n){const i=t||0;let r=fs(e,t,!0,n);return null===r?Jr():(r<i&&(r=i),Jr(i,r))},getMediaInfoForTime:function(e){let{playlist:t,currentTime:n,startingSegmentIndex:i,startingPartIndex:r,startTime:s,exactManifestTimings:a}=e,o=n-s;const l=cs(t);let c=0;for(let d=0;d<l.length;d++){const e=l[d];if(i===e.segmentIndex&&("number"!==typeof r||"number"!==typeof e.partIndex||r===e.partIndex)){c=d;break}}if(o<0){if(c>0)for(let e=c-1;e>=0;e--){const n=l[e];
vendor: 1,192 bytes, line 2
2if(o+=n.duration,a){if(o<0)continue}else if(o+$r<=0)continue;return{partIndex:n.partIndex,segmentIndex:n.segmentIndex,startTime:s-ms({defaultDuration:t.targetDuration,durationList:l,startIndex:c,endIndex:e})}}return{partIndex:l[0]&&l[0].partIndex||null,segmentIndex:l[0]&&l[0].segmentIndex||0,startTime:n}}if(c<0){for(let e=c;e<0;e++)if(o-=t.targetDuration,o<0)return{partIndex:l[0]&&l[0].partIndex||null,segmentIndex:l[0]&&l[0].segmentIndex||0,startTime:n};c=0}for(let d=c;d<l.length;d++){const e=l[d];o-=e.duration;const n=e.duration>$r;if(!(0===o)&&!(n&&o+$r>=0)||d===l.length-1){if(a){if(o>0)continue}else if(o-$r>=0)continue;return{partIndex:e.partIndex,segmentIndex:e.segmentIndex,startTime:s+ms({defaultDuration:t.targetDuration,durationList:l,startIndex:c,endIndex:d})}}}return{segmentIndex:l[l.length-1].segmentIndex,partIndex:l[l.length-1].partIndex,startTime:n}},isEnabled:vs,isDisabled:function(e){return e.disabled},isExcluded:ys,isIncompatible:bs,playlistEnd:fs,isAes:function(e){for(let t=0;t<e.segments.length;t++)if(e.segments[t].key)return!0;return!1},hasAttribute:_s,estimateSegmentRequestTime:function(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;
2if(!_s("BANDWIDTH",n))return NaN;return(e*n.attributes.BANDWIDTH-8*i)/t},isLowestEnabledRendition:Ts,isAudioOnly:As,playlistMatch:xs,segmentDurationWithParts:ls};const{log:js}=Vr,ks=(e,t)=>"".concat(e,"-").concat(t),Cs=(e,t,n)=>"placeholder-uri-".concat(e,"-").concat(t,"-").concat(n),Os=(e,t)=>{e.mediaGroups&&["AUDIO","SUBTITLES"].forEach((n=>{if(e.mediaGroups[n])for(const i in e.mediaGroups[n])for(const r in e.mediaGroups[n][i]){const s=e.mediaGroups[n][i][r];t(s,n,i,r)}}))},Es=e=>{let{playlist:t,uri:n,id:i}=e;t.id=i,t.playlistErrors_=0,n&&(t.uri=n),t.attributes=t.attributes||{}},Is=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Cs;e.uri=t;for(let r=0;r<e.playlists.length;r++)if(!e.playlists[r].uri){const t="placeholder-uri-".concat(r);e.playlists[r].uri=t}const i=As(e);Os(e,((t,r,s,a)=>{if(!t.playlists||!t.playlists.length){if(i&&"AUDIO"===r&&!t.uri)for(let t=0;t<e.playlists.length;t++){const n=e.playlists[t];if(n.attributes&&n.attributes.AUDIO&&n.attributes.AUDIO===s)return}t.playlists=[h()({},t)]}
2t.playlists.forEach((function(t,i){const o=n(r,s,a,t),l=ks(i,o);t.uri?t.resolvedUri=t.resolvedUri||Yr(e.uri,t.uri):(t.uri=0===i?o:l,t.resolvedUri=t.uri),t.id=t.id||l,t.attributes=t.attributes||{},e.playlists[t.id]=t,e.playlists[t.uri]=t}))})),(e=>{let t=e.playlists.length;for(;t--;){const n=e.playlists[t];Es({playlist:n,id:ks(t,n.uri)}),n.resolvedUri=Yr(e.uri,n.uri),e.playlists[n.id]=n,e.playlists[n.uri]=n,n.attributes.BANDWIDTH||js.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}})(e),(e=>{Os(e,(t=>{t.uri&&(t.resolvedUri=Yr(e.uri,t.uri))}))})(e)};class Ps{constructor(){this.offset_=null,this.pendingDateRanges_=new Map,this.processedDateRanges_=new Map}setOffset(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(null!==this.offset_)return;if(!e.length)return;const[t]=e;void 0!==t.programDateTime&&(this.offset_=t.programDateTime/1e3)}setPendingDateRanges(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(!e.length)return;const[t]=e,n=t.startDate.getTime();this.trimProcessedDateRanges_(n),this.pendingDateRanges_=e.reduce(((e,t)=>(e.set(t.id,t),e)),new Map)}processDateRange(e){this.pendingDateRanges_.delete(e.id),this.processedDateRanges_.set(e.id,e)}getDateRangesToProcess(){if(null===this.offset_)return[];const e={},t=[];this.pendingDateRanges_.forEach(((n,i)=>{if(!this.processedDateRanges_.has(i)&&(n.startTime=n.startDate.getTime()/1e3-this.offset_,n.processDateRange=()=>this.processDateRange(n),t.push(n),n.class))if(e[n.class]){const t=e[n.class].push(n);n.classListIndex=t-1}else e[n.class]=[n],n.classListIndex=0}));for(const n of t){const t=e[n.class]||[];n.endDate?n.endTime=n.endDate.getTime()/1e3-this.offset_:n.endOnNext&&t[n.classListIndex+1]?n.endTime=t[n.classListIndex+1].startTime:n.duration?n.endTime=n.startTime+n.duration:n.plannedDuration?n.endTime=n.startTime+n.plannedDuration:n.endTime=n.startTime}return t}trimProcessedDateRanges_(e){new Map(this.processedDateRanges_).forEach(((t,n)=>{t.startDate.getTime()<e&&this.processedDateRanges_.delete(n)}))}}const Rs=e=>{let{requestType:t,request:n,error:i,parseFailure:r}=e;const s=n.status<200||n.status>299,a=n.status>=400&&n.status<=499,o={uri:n.uri,requestType:t},l=s&&!a||r;if(i&&a)o.error=h()({},i),o.errorType=Vr.Error.NetworkRequestFailed;else if(n.aborted)o.errorType=Vr.Error.NetworkRequestAborted;else if(n.timedout)o.errorType=Vr.Error.NetworkRequestTimeout;else if(l){const e=r?Vr.Error.NetworkBodyParserFailed:Vr.Error.NetworkBadStatus;o.errorType=e,o.status=n.status,o.headers=n.headers}return o},Ds=Kr("CodecUtils"),Ls=function(e){const t=e.attributes||{};if(t.CODECS)return Object(m.h)(t.CODECS)},Ms=(e,t)=>{const n=t.attributes||{};return e&&e.mediaGroups&&e.mediaGroups.AUDIO&&n.AUDIO&&e.mediaGroups.AUDIO[n.AUDIO]},Ns=function(e){const t={};return e.forEach((e=>{let{mediaType:n,type:i,details:r}=e;t[n]=t[n]||[],t[n].push(Object(m.i)("".concat(i).concat(r)))})),Object.keys(t).forEach((function(e){if(t[e].length>1)return Ds("multiple ".concat(e," codecs found as attributes: ").concat(t[e].join(", "),". Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs.")),void(t[e]=null);t[e]=t[e][0]})),t},Bs=function(e){let t=0;return e.audio&&t++,e.video&&t++,t},Us=function(e,t){const n=t.attributes||{},i=Ns(Ls(t)||[]);if(Ms(e,t)&&!i.audio&&!((e,t)=>{if(!Ms(e,t))return!0;const n=t.attributes||{},i=e.mediaGroups.AUDIO[n.AUDIO];for(const r in i)if(!i[r].uri&&!i[r].playlists)return!0;return!1})(e,t)){const t=Ns(Object(m.d)(e,n.AUDIO)||[]);t.audio&&(i.audio=t.audio)}return i},{EventTarget:Fs}=Vr,qs=(e,t)=>{if(!e)return t;const n=Zr(e,t);if(e.preloadHints&&!t.preloadHints&&delete n.preloadHints,e.parts&&!t.parts)delete n.parts;else if(e.parts&&t.parts)for(let i=0;i<t.parts.length;i++)e.parts&&e.parts[i]&&(n.parts[i]=Zr(e.parts[i],t.parts[i]));return!e.skipped&&t.skipped&&(n.skipped=!1),e.preload&&!t.preload&&(n.preload=!1),n},zs=(e,t)=>{!e.resolvedUri&&e.uri&&(e.resolvedUri=Yr(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=Yr(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=Yr(t,e.map.uri)),e.map&&e.map.key&&!e.map.key.resolvedUri&&(e.map.key.resolvedUri=Yr(t,e.map.key.uri)),e.parts&&e.parts.length&&e.parts.forEac
vendor: 4,587 bytes, line 2
2h((e=>{e.resolvedUri||(e.resolvedUri=Yr(t,e.uri))})),e.preloadHints&&e.preloadHints.length&&e.preloadHints.forEach((e=>{e.resolvedUri||(e.resolvedUri=Yr(t,e.uri))}))},Vs=function(e){const t=e.segments||[],n=e.preloadSegment;if(n&&n.parts&&n.parts.length){if(n.preloadHints)for(let e=0;e<n.preloadHints.length;e++)if("MAP"===n.preloadHints[e].type)return t;n.duration=e.targetDuration,n.preload=!0,t.push(n)}return t},Hs=(e,t)=>e===t||e.segments&&t.segments&&e.segments.length===t.segments.length&&e.endList===t.endList&&e.mediaSequence===t.mediaSequence&&e.preloadSegment===t.preloadSegment,Ws=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Hs;const i=Zr(e,{}),r=i.playlists[t.id];if(!r)return null;if(n(r,t))return null;t.segments=Vs(t);const s=Zr(r,t);if(s.preloadSegment&&!t.preloadSegment&&delete s.preloadSegment,r.segments){if(t.skip){t.segments=t.segments||[];for(let e=0;e<t.skip.skippedSegments;e++)t.segments.unshift({skipped:!0})}s.segments=((e,t,n)=>{const i=e.slice(),r=t.slice();n=n||0;const s=[];let a;for(let o=0;o<r.length;o++){const e=i[o+n],t=r[o];e?(a=e.map||a,s.push(qs(e,t))):(a&&!t.map&&(t.map=a),s.push(t))}return s})(r.segments,t.segments,t.mediaSequence-r.mediaSequence)}s.segments.forEach((e=>{zs(e,s.resolvedUri)}));for(let a=0;a<i.playlists.length;a++)i.playlists[a].id===t.id&&(i.playlists[a]=s);return i.playlists[t.id]=s,i.playlists[t.uri]=s,Os(e,((e,n,i,r)=>{if(e.playlists)for(let a=0;a<e.playlists.length;a++)t.id===e.playlists[a].id&&(e.playlists[a]=s)})),i},Gs=(e,t)=>{const n=e.segments||[],i=n[n.length-1],r=i&&i.parts&&i.parts[i.parts.length-1],s=r&&r.duration||i&&i.duration;return t&&s?1e3*s:500*(e.partTargetDuration||e.targetDuration||10)},Xs=(e,t,n)=>{if(!e)return;const i=[];return e.forEach((e=>{if(!e.attributes)return;const{BANDWIDTH:t,RESOLUTION:n,CODECS:r}=e.attributes;i.push({id:e.id,bandwidth:t,resolution:n,codecs:r})})),{type:t,isLive:n,renditions:i}};class Ys extends Fs{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(super(),!e)throw new Error("A non-empty playlist URL or object is required");this.logger_=Kr("PlaylistLoader");const{withCredentials:i=!1}=n;this.src=e,this.vhs_=t,this.withCredentials=i,this.addDateRangesToTextTrack_=n.addDateRangesToTextTrack;const r=t.options_;this.customTagParsers=r&&r.customTagParsers||[],this.customTagMappers=r&&r.customTagMappers||[],this.llhls=r&&r.llhls,this.dateRangesStorage_=new Ps,this.state="HAVE_NOTHING",this.handleMediaupdatetimeout_=this.handleMediaupdatetimeout_.bind(this),this.on("mediaupdatetimeout",this.handleMediaupdatetimeout_),this.on("loadedplaylist",this.handleLoadedPlaylist_.bind(this))}handleLoadedPlaylist_(){const e=this.media();if(!e)return;this.dateRangesStorage_.setOffset(e.segments),this.dateRangesStorage_.setPendingDateRanges(e.dateRanges);const t=this.dateRangesStorage_.getDateRangesToProcess();t.length&&this.addDateRangesToTextTrack_&&this.addDateRangesToTextTrack_(t)}handleMediaupdatetimeout_(){if("HAVE_METADATA"!==this.state)return;const e=this.media();let t=Yr(this.main.uri,e.uri);this.llhls&&(t=((e,t)=>{if(t.endList||!t.serverControl)return e;const n={};if(t.serverControl.canBlockReload){const{preloadSegment:e}=t;let i=t.mediaSequence+t.segments.length;if(e){const r=e.parts||[],s=us(t)-1;s>-1&&s!==r.length-1&&(n._HLS_part=s),(s>-1||r.length)&&i--}n._HLS_msn=i}if(t.serverControl&&t.serverControl.canSkipUntil&&(n._HLS_skip=t.serverControl.canSkipDateranges?"v2":"YES"),Object.keys(n).length){const t=new r.a.URL(e);["_HLS_skip","_HLS_msn","_HLS_part"].forEach((function(e){n.hasOwnProperty(e)&&t.searchParams.set(e,n[e])})),e=t.toString()}return e})(t,e)),this.state="HAVE_CURRENT_METADATA",this.request=this.vhs_.xhr({uri:t,withCredentials:this.withCredentials,requestType:"hls-playlist"},((e,t)=>{if(this.request)return e?this.playlistRequestError(this.request,this.media(),"HAVE_METADATA"):void this.haveMetadata({playlistString:this.request.responseText,url:this.media().uri,id:this.media().id})}))}playlistRequestError(e,t,n){const{uri:i,id:r}=t;this.request=null,n&&(this.state=n),this.error={playlist:this.main.playlists[r],status:e.status,message:"HLS playlist request error at URL: ".concat(i,"."),responseText:e.responseText,code:e.status>=500?4:2,metadata:Rs({requestType:e.requestType,request:e,error:e.error})},this.trigger("error")}parseManifest_(e){let{url:t,manifestString:n}=e;try{const e=(e=>{let{onwarn:t,oninfo:n,manifestString:i,customTagParsers:r=[],customTagMappers:s=[],llhls:a}=e;const o=new g.a;t&&o.on("warn",t),n&&o.on("info",n),r.forEach((e=>
vendor: 5,510 bytes, line 2
2o.addParser(e))),s.forEach((e=>o.addTagMapper(e))),o.push(i),o.end();const l=o.manifest;if(a||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach((function(e){l.hasOwnProperty(e)&&delete l[e]})),l.segments&&l.segments.forEach((function(e){["parts","preloadHints"].forEach((function(t){e.hasOwnProperty(t)&&delete e[t]}))}))),!l.targetDuration){let e=10;l.segments&&l.segments.length&&(e=l.segments.reduce(((e,t)=>Math.max(e,t.duration)),0)),t&&t({message:"manifest has no targetDuration defaulting to ".concat(e)}),l.targetDuration=e}const c=ds(l);if(c.length&&!l.partTargetDuration){const e=c.reduce(((e,t)=>Math.max(e,t.duration)),0);t&&(t({message:"manifest has no partTargetDuration defaulting to ".concat(e)}),js.error("LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.")),l.partTargetDuration=e}return l})({onwarn:e=>{let{message:n}=e;return this.logger_("m3u8-parser warn for ".concat(t,": ").concat(n))},oninfo:e=>{let{message:n}=e;return this.logger_("m3u8-parser info for ".concat(t,": ").concat(n))},manifestString:n,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,llhls:this.llhls});return e.playlists&&e.playlists.length?(this.excludeAudioOnlyVariants(e.playlists),e):e}catch(i){this.error=i,this.error.metadata={errorType:Vr.Error.StreamingHlsPlaylistParserError,error:i}}}excludeAudioOnlyVariants(e){const t=e=>{const t=e.attributes||{},{width:n,height:i}=t.RESOLUTION||{};if(n&&i)return!0;const r=Ls(e)||[],s=Ns(r);return Boolean(s.video)};e.some(t)&&e.forEach((e=>{t(e)||(e.excludeUntil=1/0)}))}haveMetadata(e){let{playlistString:t,playlistObject:n,url:i,id:r}=e;this.request=null,this.state="HAVE_METADATA";const s={playlistInfo:{type:"media",uri:i}};this.trigger({type:"playlistparsestart",metadata:s});const a=n||this.parseManifest_({url:i,manifestString:t});a.lastRequest=Date.now(),Es({playlist:a,uri:i,id:r});const o=Ws(this.main,a);this.targetDuration=a.partTargetDuration||a.targetDuration,this.pendingMedia_=null,o?(this.main=o,this.media_=this.main.playlists[r]):this.trigger("playlistunchanged"),this.updateMediaUpdateTimeout_(Gs(this.media(),!!o)),s.parsedPlaylist=Xs(this.main.playlists,s.playlistInfo.type,!this.media_.endList),this.trigger({type:"playlistparsecomplete",metadata:s}),this.trigger("loadedplaylist")}dispose(){this.trigger("dispose"),this.stopRequest(),r.a.clearTimeout(this.mediaUpdateTimeout),r.a.clearTimeout(this.finalRenditionTimeout),this.dateRangesStorage_=new Ps,this.off()}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e,t){if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);if("string"===typeof e){if(!this.main.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.main.playlists[e]}if(r.a.clearTimeout(this.finalRenditionTimeout),t){const t=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;return void(this.finalRenditionTimeout=r.a.setTimeout(this.media.bind(this,e,!1),t))}const n=this.state,i=!this.media_||e.id!==this.media_.id,s=this.main.playlists[e.id];if(s&&s.endList||e.endList&&e.segments.length)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=e,void(i&&(this.trigger("mediachanging"),"HAVE_MAIN_MANIFEST"===n?this.trigger("loadedmetadata"):this.trigger("mediachange")));if(this.updateMediaUpdateTimeout_(Gs(e,!0)),!i)return;if(this.state="SWITCHING_MEDIA",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.pendingMedia_=e;const a={playlistInfo:{type:"media",uri:e.uri}};this.trigger({type:"playlistrequeststart",metadata:a}),this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials,requestType:"hls-playlist"},((t,i)=>{if(this.request){if(e.lastRequest=Date.now(),e.resolvedUri=Qr(e.resolvedUri,i),t)return this.playlistRequestError(this.request,e,n);this.trigger({type:"playlistrequestcomplete",metadata:a}),this.haveMetadata({playlistString:i.responseText,url:e.uri,id:e.id}),"HAVE_MAIN_MANIFEST"===n?this.trigger("loadedmetadata"):this.trigger("mediachange")}}))}pause(){this.mediaUpdateTimeout&&(r.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),"HAVE_NOTHING"===this.state&&(this.started=!1),"SWITCHING_MEDIA"===this.state?this.media_?this.state="HAVE_METADATA":this.state="HAVE_MAIN_MANIFEST":"HAVE_CURRENT_METADATA"===this.state&&(this.state="HAVE_METADATA")}load(e){this.mediaUpdateTimeout&&(r.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);const t=this.media();if(e){const e=t?(t.partTargetDuration||t.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=r.a.setTimeout((()=>{this.mediaUpdateTimeout=null,this.load()}),e)}else this.started?t&&!t.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()}updateMediaUpdateTimeout_(e){this.mediaUpdateTimeout&&(r.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.media()&&!this.media().endList&&(this.mediaUpdateTimeout=r.a.setTimeout((()=>{this.mediaUpdateTimeout=null,this.trigger("mediaupdatetimeout"),this.updateMediaUpdateTimeout_(e)}),e))}
2start(){if(this.started=!0,"object"===typeof this.src)return this.src.uri||(this.src.uri=r.a.location.href),this.src.resolvedUri=this.src.uri,void setTimeout((()=>{this.setupInitialPlaylist(this.src)}),0);const e={playlistInfo:{type:"multivariant",uri:this.src}};this.trigger({type:"playlistrequeststart",metadata:e}),this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials,requestType:"hls-playlist"},((t,n)=>{if(!this.request)return;if(this.request=null,t)return this.error={status:n.status,message:"HLS playlist request error at URL: ".concat(this.src,"."),responseText:n.responseText,code:2,metadata:Rs({requestType:n.requestType,request:n,error:t})},"HAVE_NOTHING"===this.state&&(this.started=!1),this.trigger("error");this.trigger({type:"playlistrequestcomplete",metadata:e}),this.src=Qr(this.src,n),this.trigger({type:"playlistparsestart",metadata:e});const i=this.parseManifest_({manifestString:n.responseText,url:this.src});e.parsedPlaylist=Xs(i.playlists,e.playlistInfo.type,!1),this.trigger({type:"playlistparsecomplete",metadata:e}),this.setupInitialPlaylist(i)}))}srcUri(){return"string"===typeof this.src?this.src:this.src.uri}setupInitialPlaylist(e){if(this.state="HAVE_MAIN_MANIFEST",e.playlists)return this.main=e,Is(this.main,this.srcUri()),e.playlists.forEac
vendor: 1,335 bytes, line 2
2h((e=>{e.segments=Vs(e),e.segments.forEach((t=>{zs(t,e.resolvedUri)}))})),this.trigger("loadedplaylist"),void(this.request||this.media(this.main.playlists[0]));const t=this.srcUri()||r.a.location.href;this.main=((e,t)=>{const n=ks(0,t),i={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:r.a.location.href,resolvedUri:r.a.location.href,playlists:[{uri:t,id:n,resolvedUri:t,attributes:{}}]};return i.playlists[n]=i.playlists[0],i.playlists[t]=i.playlists[0],i})(0,t),this.haveMetadata({playlistObject:e,url:t,id:this.main.playlists[0].id}),this.trigger("loadedmetadata")}updateOrDeleteClone(e,t){const n=this.main,i=e.ID;let r=n.playlists.length;for(;r--;){const s=n.playlists[r];if(s.attributes["PATHWAY-ID"]===i){const a=s.resolvedUri,o=s.id;if(t){const t=this.createCloneURI_(s.resolvedUri,e),a=ks(i,t),o=this.createCloneAttributes_(i,s.attributes),l=this.createClonePlaylist_(s,a,e,o);n.playlists[r]=l,n.playlists[a]=l,n.playlists[t]=l}else n.playlists.splice(r,1);delete n.playlists[o],delete n.playlists[a]}}this.updateOrDeleteCloneMedia(e,t)}updateOrDeleteCloneMedia(e,t){const n=this.main,i=e.ID;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((e=>{if(n.mediaGroups[e]&&n.mediaGroups[e][i])for(const t in n.mediaGroups[e])if(t===i){for(const i in n.mediaGroups[e][t]){n.mediaGroups[e][t][i].playlists.forEac
2h(((e,t)=>{const i=n.playlists[e.id],r=i.id,s=i.resolvedUri;delete n.playlists[r],delete n.playlists[s]}))}delete n.mediaGroups[e][t]}})),t&&this.createClonedMediaGroups_(e)}addClonePathway(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.main,i=n.playlists.length,r=this.createCloneURI_(t.resolvedUri,e),s=ks(e.ID,r),a=this.createCloneAttributes_(e.ID,t.attributes),o=this.createClonePlaylist_(t,s,e,a);n.playlists[i]=o,n.playlists[s]=o,n.playlists[r]=o,this.createClonedMediaGroups_(e)}createClonedMediaGroups_(e){const t=e.ID,n=e["BASE-ID"],i=this.main;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((r=>{if(i.mediaGroups[r]&&!i.mediaGroups[r][t])for(const s in i.mediaGroups[r])if(s===n){i.mediaGroups[r][t]={};for(const n in i.mediaGroups[r][s]){const a=i.mediaGroups[r][s][n];i.mediaGroups[r][t][n]=h()({},a);const o=i.mediaGroups[r][t][n],l=this.createCloneURI_(a.resolvedUri,e);o.resolvedUri=l,o.uri=l,o.playlists=[],a.playlists.forEach(((s,a)=>{const l=i.playlists[s.id],c=Cs(r,t,n),d=ks(t,c);if(l&&!i.playlists[d]){const t=this.createClonePlaylist_(l,d,e),n=t.resolvedUri;i.playlists[d]=t,i.playlists[n]=t}o.playlists[a]=this.createClonePlaylist_(s,d,e)}))}}}))}createClonePlaylist_(e,t,n,i){const r=this.createCloneURI_(e.resolvedUri,n),s={resolvedUri:r,uri:r,id:t};return e.segments&&(s.segments=[]),i&&(s.attributes=i),Zr(e,s)}createCloneURI_(e,t){const n=new URL(e);n.hostname=t["URI-REPLACEMENT"].HOST;const i=t["URI-REPLACEMENT"].PARAMS;for(const r of Object.keys(i))n.searchParams.set(r,i[r]);return n.href}createCloneAttributes_(e,t){const n={"PATHWAY-ID":e};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((i=>{t[i]&&(n[i]=e)})),n}getKeyIdSet(e){const t=new Set;if(!e||!e.contentProtection)return t;for(const n in e.contentProtection)if(e.contentProtection[n]&&e.contentProtection[n].attributes&&e.contentProtection[n].attributes.keyId){const i=e.contentProtection[n].attributes.keyId;t.add(i.toLowerCase())}return t}}const Qs=function(e,t,n,i){const r="arraybuffer"===e.responseType?e.response:e.responseText;!t&&r&&(e.responseTime=Date.now(),e.roundTripTime=e.responseTime-e.requestTime,e.bytesReceived=r.byteLength||r.length,e.bandwidth||(e.bandwidth=Math.floor(e.bytesReceived/e.roundTripTime*8*1e3))),n.headers&&(e.responseHeaders=n.headers),t&&"ETIMEDOUT"===t.code&&(e.timedout=!0),t||e.aborted||200===n.statusCode||206===n.statusCode||0===n.statusCode||(t=new Error("XHR Failed with a response of: "+(e&&(r||e.responseText)))),i(t,e)},Ks=function(){const e=function e(t,n){t=Zr({timeout:45e3},t);const i=e.beforeRequest||Vr.Vhs.xhr.beforeRequest,r=e._requestCallbackSet||Vr.Vhs.xhr._requestCallbackSet||new Set,s=e._responseCallbackSet||Vr.Vhs.xhr._responseCallbackSet;i&&"function"===typeof i&&(Vr.log.warn("beforeRequest is deprecated, use onRequest instead."),r.add(i));const a=!0===Vr.Vhs.xhr.original?Vr.xhr:Vr.Vhs.xhr,o=((e,t)=>{if(!e||!e.size)return;let n=t;return e.forEach((e=>{n=e(n)})),n})(r,t);r.delete(i);const l=a(o||t,(function(e,t){return((e,t,n,i)=>{e&&e.size&&e.forEach((e=>{e(t,n,i)}))})(s,l,e,t),Qs(l,e,t,n)})),c=l.abort;return l.abort=function(){return l.aborted=!0,c.apply(l,arguments)},l.uri=t.uri,l.requestType=t.requestType,l.requestTime=Date.now(),l};return e.original=!0,e},Zs=function(e){const t={};return e.byterange&&(t.Range=function(e){let t;const n=e.offset;return t="bigint"===typeof e.offset||"bigint"===typeof e.length?r.a.BigInt(e.offset)+r.a.BigInt(e.length)-r.a.BigInt(1):e.offset+e.length-1,"bytes="+n+"-"+t}(e.byterange)),t},Js=function(e,t){return e.start(t)+"-"+e.end(t)},$s=function(e,t){const n=e.toString(16);return"00".substring(0,2-n.length)+n+(t%2?" ":"")},ea=function(e){return e>=32&&e<126?String.fromCharCode(e):"."},ta=function(e){const t={};return Object.keys(e).forEach((n=>{const i=e[n];Object(y.e)(i)?t[n]={bytes:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength}:t[n]=i})),t},na=function(e){const t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(",")},ia=function(e){return e.resolvedUri},ra=e=>{const t=Array.prototype.slice.call(e),n=16;let i,r,s="";for(let a=0;a<t.length/n;a++)i=t.slice(a*n,a*n+n).map($s).join(""),r=t.slice(a*n,a*n+n).map(ea).join(""),s+=i+" "+r+"\n";return s};var sa=Object.freeze({__proto__:null,createTransferableMessage:ta,initSegmentId:na,segmentKeyId:ia,hexDump:ra,tagDump:e=>{let{bytes:t}=e;return ra(t)},textRanges:e=>{let t,n="";for(t=0;t<e.length;t++)n+=Js(e,t)+" ";return n}});const aa=e=>{let{playlist:t,time:n,callback:i}=e;if(!i)throw new Error("getProgramTime: callback must be provided");
vendor: 4,666 bytes, line 2
2if(!t||void 0===n)return i({message:"getProgramTime: playlist and time must be provided"});const r=((e,t)=>{if(!t||!t.segments||0===t.segments.length)return null;let n,i=0;for(let s=0;s<t.segments.length&&(n=t.segments[s],i=n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationEnd:i+n.duration,!(e<=i));s++);const r=t.segments[t.segments.length-1];if(r.videoTimingInfo&&r.videoTimingInfo.transmuxedPresentationEnd<e)return null;if(e>i){if(e>i+.25*r.duration)return null;n=r}return{segment:n,estimatedStart:n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationStart:i-n.duration,type:n.videoTimingInfo?"accurate":"estimate"}})(n,t);if(!r)return i({message:"valid programTime was not found"});if("estimate"===r.type)return i({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:r.estimatedStart});const s={mediaSeconds:n},a=((e,t)=>{if(!t.dateTimeObject)return null;const n=t.videoTimingInfo.transmuxerPrependedSeconds,i=e-(t.videoTimingInfo.transmuxedPresentationStart+n);return new Date(t.dateTimeObject.getTime()+1e3*i)})(n,r.segment);return a&&(s.programDateTime=a.toISOString()),i(null,s)},oa=e=>{let{programTime:t,playlist:n,retryCount:i=2,seekTo:r,pauseAfterSeek:s=!0,tech:a,callback:o}=e;if(!o)throw new Error("seekToProgramTime: callback must be provided");if("undefined"===typeof t||!n||!r)return o({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!n.endList&&!a.hasStarted_)return o({message:"player must be playing a live stream to start buffering"});if(!(e=>{if(!e.segments||0===e.segments.length)return!1;for(let t=0;t<e.segments.length;t++)if(!e.segments[t].dateTimeObject)return!1;return!0})(n))return o({message:"programDateTime tags must be provided in the manifest "+n.resolvedUri});const l=((e,t)=>{let n;try{n=new Date(e)}catch(l){return null}if(!t||!t.segments||0===t.segments.length)return null;let i=t.segments[0];if(n<new Date(i.dateTimeObject))return null;for(let c=0;c<t.segments.length-1&&(i=t.segments[c],!(n<new Date(t.segments[c+1].dateTimeObject)));c++);const r=t.segments[t.segments.length-1],s=r.dateTimeObject,a=r.videoTimingInfo?(o=r.videoTimingInfo).transmuxedPresentationEnd-o.transmuxedPresentationStart-o.transmuxerPrependedSeconds:r.duration+.25*r.duration;var o;return n>new Date(s.getTime()+1e3*a)?null:(n>new Date(s)&&(i=r),{segment:i,estimatedStart:i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationStart:ws.duration(t,t.mediaSequence+t.segments.indexOf(i)),type:i.videoTimingInfo?"accurate":"estimate"})})(t,n);if(!l)return o({message:"".concat(t," was not found in the stream")});const c=l.segment,d=((e,t)=>{let n,i;try{n=new Date(e),i=new Date(t)}catch(s){}const r=n.getTime();return(i.getTime()-r)/1e3})(c.dateTimeObject,t);if("estimate"===l.type)return 0===i?o({message:"".concat(t," is not buffered yet. Try again")}):(r(l.estimatedStart+d),void a.one("seeked",(()=>{oa({programTime:t,playlist:n,retryCount:i-1,seekTo:r,pauseAfterSeek:s,tech:a,callback:o})})));const u=c.start+d;a.one("seeked",(()=>o(null,a.currentTime()))),s&&a.pause(),r(u)},la=(e,t)=>{if(4===e.readyState)return t()},{EventTarget:ca}=Vr,da=function(e,t){if(!Hs(e,t))return!1;if(e.sidx&&t.sidx&&(e.sidx.offset!==t.sidx.offset||e.sidx.length!==t.sidx.length))return!1;if(!e.sidx&&t.sidx||e.sidx&&!t.sidx)return!1;if(e.segments&&!t.segments||!e.segments&&t.segments)return!1;if(!e.segments&&!t.segments)return!0;for(let n=0;n<e.segments.length;n++){const i=e.segments[n],r=t.segments[n];if(i.uri!==r.uri)return!1;if(!i.byterange&&!r.byterange)continue;const s=i.byterange,a=r.byterange;if(s&&!a||!s&&a)return!1;if(s.offset!==a.offset||s.length!==a.length)return!1}return!0},ua=(e,t,n,i)=>{const r=i.attributes.NAME||n;return"placeholder-uri-".concat(e,"-").concat(t,"-").concat(r)},ha=(e,t,n)=>{let i=!0,r=Zr(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod,timelineStarts:t.timelineStarts});for(let s=0;s<t.playlists.length;s++){const e=t.playlists[s];if(e.sidx){const t=Object(b.b)(e.sidx);n&&n[t]&&n[t].sidx&&Object(b.a)(e,n[t].sidx,e.sidx.resolvedUri)}const a=Ws(r,e,da);a&&(r=a,i=!1)}return Os(t,((e,t,n,s)=>{if(e.playlists&&e.playlists.length){const a=e.playlists[0].id,o=Ws(r,e.playlists[0],da);o&&(r=o,s in r.mediaGroups[t][n]||(r.mediaGroups[t][n][s]=e),r.mediaGroups[t][n][s].playlists[0]=r.playlists[a],i=!1)}})),((e,t)=>{Os(e,((n,i,r,s)=>{t.mediaGroups[i][r]&&s in t.mediaGroups[i][r]||delete e.mediaGroups[i][r][s]}))})(r,t),t.minimumUpdatePeriod!==e.minimumUpdatePeriod&&(i=!1),i?null:r},pa=(e,t)=>{const n={};for(const s in e){const a=e[s].sidx;if(a){const e=Object(b.b)(a);if(!t[e])break;const s=t[e].sidxInfo;
2i=s,r=a,(Boolean(!i.map&&!r.map)||Boolean(i.map&&r.map&&i.map.byterange.offset===r.map.byterange.offset&&i.map.byterange.length===r.map.byterange.length))&&i.uri===r.uri&&i.byterange.offset===r.byterange.offset&&i.byterange.length===r.byterange.length&&(n[e]=t[e])}}var i,r;return n};class ga extends ca{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;super(),this.isPaused_=!0,this.mainPlaylistLoader_=i||this,i||(this.isMain_=!0);const{withCredentials:r=!1}=n;if(this.vhs_=t,this.withCredentials=r,this.addMetadataToTextTrack=n.addMetadataToTextTrack,!e)throw new Error("A non-empty playlist URL or object is required");this.on("minimumUpdatePeriod",(()=>{this.refreshXml_()})),this.on("mediaupdatetimeout",(()=>{this.refreshMedia_(this.media().id)})),this.state="HAVE_NOTHING",this.loadedPlaylists_={},this.logger_=Kr("DashPlaylistLoader"),this.isMain_?(this.mainPlaylistLoader_.srcUrl=e,this.mainPlaylistLoader_.sidxMapping_={}):this.childPlaylist_=e}get isPaused(){return this.isPaused_}requestErrored_(e,t,n){return!this.request||(this.request=null,e?(this.error="object"!==typeof e||e instanceof Error?{status:t.status,message:"DASH request error at URL: "+t.uri,response:t.response,code:2,metadata:e.metadata}:e,n&&(this.state=n),this.trigger("error"),!0):void 0)}addSidxSegments_(e,t,n){const i=e.sidx&&Object(b.b)(e.sidx);if(!e.sidx||!i||this.mainPlaylistLoader_.sidxMapping_[i])return r.a.clearTimeout(this.mediaRequest_),void(this.mediaRequest_=r.a.setTimeout((()=>n(!1)),0));const s=Qr(e.sidx.resolvedUri),a=(r,s)=>{if(this.requestErrored_(r,s,t))return;const a=this.mainPlaylistLoader_.sidxMapping_,{requestType:o}=s;let l;try{l=_()(Object(y.k)(s.response).subarray(8))}catch(c){return c.metadata=Rs({requestType:o,request:s,parseFailure:!0}),void this.requestErrored_(c,s,t)}return a[i]={sidxInfo:e.sidx,sidx:l},Object(b.a)(e,l,e.sidx.resolvedUri),n(!0)};this.request=((e,t,n,i)=>{let r,s=[],a=!1;const o=function(e,t,i,r){return t.abort(),a=!0,n(e,t,i,r)},l=function(e,t){if(a)return;if(e)return e.metadata=Rs({requestType:i,request:t,error:e}),o(e,t,"",s);const n=t.responseText.substring(s&&s.byteLength||0,t.responseText.length);if(s=Object(y.d)(s,Object(y.h)(n,!0)),r=r||Object(T.a)(s),s.length<10||r&&s.length<r+2)return la(t,(()=>o(e,t,"",s)));const l=Object(x.a)(s);return"ts"===l&&s.length<188||!l&&s.length<376?la(t,(()=>o(e,t,"",s))):o(null,t,l,s)},c={uri:e,beforeSend(e){e.overrideMimeType("text/plain; charset=x-user-defined"),e.addEventListener("progress",(function(t){let{total:n,loaded:i}=t;return Qs(e,null,{statusCode:e.status},l)}))}},d=t(c,(function(e,t){return Qs(d,e,t,l)}));return d})(s,this.vhs_.xhr,((t,n,i,r)=>{if(t)return a(t,n);if(!i||"mp4"!==i){const t=i||"unknown";return a({status:n.status,message:"Unsupported ".concat(t," container type for sidx segment at URL: ").concat(s),response:"",playlist:e,internal:!0,playlistExclusionDuration:1/0,code:2},n)}const{offset:o,length:l}=e.sidx.byterange;if(r.length>=l+o)return a(t,{response:r.subarray(o,o+l),status:n.status,uri:n.uri});this.request=this.vhs_.xhr({uri:s,responseType:"arraybuffer",requestType:"dash-sidx",headers:Zs({byterange:e.sidx.byterange})},a)}),"dash-sidx")}dispose(){this.isPaused_=!0,this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},r.a.clearTimeout(this.minimumUpdatePeriodTimeout_),r.a.clearTimeout(this.mediaRequest_),r.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.off()}hasPendingRequest(){return this.request||this.mediaRequest_}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e){if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);const t=this.state;if("string"===typeof e){if(!this.mainPlaylistLoader_.main.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.mainPlaylistLoader_.main.playlists[e]}const n=!this.media_||e.id!==this.media_.id;if(n&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList)return this.state="HAVE_METADATA",this.media_=e,void(n&&(this.trigger("mediachanging"),this.trigger("mediachange")));n&&(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(e,t,(n=>{this.haveMetadata({startingState:t,playlist:e})})))}haveMetadata(e){let{startingState:t,playlist:n}=e;this.state="HAVE_METADATA",this.loadedPlaylists_[n.id]=n,r.a.clearTimeout(this.mediaRequest_),this.mediaRequest_=null,this.refreshMedia_(n.id),"HAVE_MAIN_MANIFEST"===t?this.trigger("loadedmetadata"):this.trigger("mediachange")}pause(){this.isPaused_=!0,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),r.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMain_&&(r.a.clearTimeout(this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_),this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_=null),"HAVE_NOTHING"===this.state&&(this.started=!1)}
2load(e){this.isPaused_=!1,r.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;const t=this.media();if(e){const e=t?t.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=r.a.setTimeout((()=>this.load()),e)}else this.started?t&&!t.endList?(this.isMain_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger("minimumUpdatePeriod"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger("mediaupdatetimeout")):this.trigger("loadedplaylist"):this.start()}start(){if(this.started=!0,!this.isMain_)return r.a.clearTimeout(this.mediaRequest_),void(this.mediaRequest_=r.a.setTimeout((()=>this.haveMain_()),0));this.requestMain_(((e,t)=>{this.haveMain_(),this.hasPendingRequest()||this.media_||this.media(this.mainPlaylistLoader_.main.playlists[0])}))}requestMain_(e){const t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:"manifestrequeststart",metadata:t}),this.request=this.vhs_.xhr({uri:this.mainPlaylistLoader_.srcUrl,withCredentials:this.withCredentials,requestType:"dash-manifest"},((n,i)=>{if(n){const{requestType:e}=i;n.metadata=Rs({requestType:e,request:i,error:n})}if(this.requestErrored_(n,i))return void("HAVE_NOTHING"===this.state&&(this.started=!1));this.trigger({type:"manifestrequestcomplete",metadata:t});const r=i.responseText!==this.mainPlaylistLoader_.mainXml_;return this.mainPlaylistLoader_.mainXml_=i.responseText,i.responseHeaders&&i.responseHeaders.date?this.mainLoaded_=Date.parse(i.responseHeaders.date):this.mainLoaded_=Date.now(),this.mainPlaylistLoader_.srcUrl=Qr(this.mainPlaylistLoader_.srcUrl,i),r?(this.handleMain_(),void this.syncClientServerClock_((()=>e(i,r)))):e(i,r)}))}syncClientServerClock_(e){const t=Object(b.d)(this.mainPlaylistLoader_.mainXml_);return null===t?(this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()):"DIRECT"===t.method?(this.mainPlaylistLoader_.clientOffset_=t.value-Date.now(),e()):void(this.request=this.vhs_.xhr({uri:Yr(this.mainPlaylistLoader_.srcUrl,t.value),method:t.method,withCredentials:this.withCredentials,requestType:"dash-clock-sync"},((n,i)=>{if(!this.request)return;if(n){const{requestType:t}=i;return this.error.metadata=Rs({requestType:t,request:i,error:n}),this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()}let r;r="HEAD"===t.method?i.responseHeaders&&i.responseHeaders.date?Date.parse(i.responseHeaders.date):this.mainLoaded_:Date.parse(i.responseText),this.mainPlaylistLoader_.clientOffset_=r-Date.now(),e()})))}haveMain_(){this.state="HAVE_MAIN_MANIFEST",this.isMain_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)}handleMain_(){r.a.clearTimeout(this.mediaRequest_),this.mediaRequest_=null;const e=this.mainPlaylistLoader_.main,t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};let n;this.trigger({type:"manifestparsestart",metadata:t});try{n=(e=>{let{mainXml:t,srcUrl:n,clientOffset:i,sidxMapping:r,previousManifest:s}=e;const a=Object(b.c)(t,{manifestUri:n,clientOffset:i,sidxMapping:r,previousManifest:s});return Is(a,n,ua),a})({mainXml:this.mainPlaylistLoader_.mainXml_,srcUrl:this.mainPlaylistLoader_.srcUrl,clientOffset:this.mainPlaylistLoader_.clientOffset_,sidxMapping:this.mainPlaylistLoader_.sidxMapping_,previousManifest:e})}catch(s){this.error=s,this.error.metadata={errorType:Vr.Error.StreamingDashManifestParserError,error:s},this.trigger("error")}e&&(n=ha(e,n,this.mainPlaylistLoader_.sidxMapping_)),this.mainPlaylistLoader_.main=n||e;const i=this.mainPlaylistLoader_.main.locations&&this.mainPlaylistLoader_.main.locations[0];if(i&&i!==this.mainPlaylistLoader_.srcUrl&&(this.mainPlaylistLoader_.srcUrl=i),(!e||n&&n.minimumUpdatePeriod!==e.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),this.addEventStreamToMetadataTrack_(n),n){const{duration:e,endList:i}=n,r=[];
vendor: 4,987 bytes, line 2
2n.playlists.forEach((e=>{r.push({id:e.id,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS})}));const s={duration:e,isLive:!i,renditions:r};t.parsedManifest=s,this.trigger({type:"manifestparsecomplete",metadata:t})}return Boolean(n)}updateMinimumUpdatePeriodTimeout_(){const e=this.mainPlaylistLoader_;e.createMupOnMedia_&&(e.off("loadedmetadata",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(r.a.clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);let t=e.main&&e.main.minimumUpdatePeriod;0===t&&(e.media()?t=1e3*e.media().targetDuration:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one("loadedmetadata",e.createMupOnMedia_))),"number"!==typeof t||t<=0?t<0&&this.logger_("found invalid minimumUpdatePeriod of ".concat(t,", not setting a timeout")):this.createMUPTimeout_(t)}createMUPTimeout_(e){const t=this.mainPlaylistLoader_;t.minimumUpdatePeriodTimeout_=r.a.setTimeout((()=>{t.minimumUpdatePeriodTimeout_=null,t.trigger("minimumUpdatePeriod"),t.createMUPTimeout_(e)}),e)}refreshXml_(){this.requestMain_(((e,t)=>{t&&(this.media_&&(this.media_=this.mainPlaylistLoader_.main.playlists[this.media_.id]),this.mainPlaylistLoader_.sidxMapping_=((e,t)=>{let n=pa(e.playlists,t);return Os(e,((e,i,r,s)=>{if(e.playlists&&e.playlists.length){const i=e.playlists;n=Zr(n,pa(i,t))}})),n})(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.sidxMapping_),this.addSidxSegments_(this.media(),this.state,(e=>{this.refreshMedia_(this.media().id)})))}))}refreshMedia_(e){if(!e)throw new Error("refreshMedia_ must take a media id");this.media_&&this.isMain_&&this.handleMain_();const t=this.mainPlaylistLoader_.main.playlists,n=!this.media_||this.media_!==t[e];if(n?this.media_=t[e]:this.trigger("playlistunchanged"),!this.mediaUpdateTimeout){const e=()=>{this.media().endList||(this.mediaUpdateTimeout=r.a.setTimeout((()=>{this.trigger("mediaupdatetimeout"),e()}),Gs(this.media(),Boolean(n))))};e()}this.trigger("loadedplaylist")}addEventStreamToMetadataTrack_(e){if(e&&this.mainPlaylistLoader_.main.eventStream){const e=this.mainPlaylistLoader_.main.eventStream.map((e=>({cueTime:e.start,frames:[{data:e.messageData}]})));this.addMetadataToTextTrack("EventStream",e,this.mainPlaylistLoader_.main.duration)}}getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const n in e.contentProtection){const i=e.contentProtection[n].attributes["cenc:default_KID"];i&&t.add(i.replace(/-/g,"").toLowerCase())}return t}}}var ma={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30};const fa=function(e){return e.on=e.addEventListener,e.off=e.removeEventListener,e},ya=function(e){return function(){const t=function(e){try{return URL.createObjectURL(new Blob([e],{type:"application/javascript"}))}catch(t){const n=new BlobBuilder;return n.append(e),URL.createObjectURL(n.getBlob())}}(e),n=fa(new Worker(t));n.objURL=t;const i=n.terminate;return n.on=n.addEventListener,n.off=n.removeEventListener,n.terminate=function(){return URL.revokeObjectURL(t),i.call(this)},n}},ba=function(e){return"var browserWorkerPolyFill = ".concat(fa.toString(),";\n")+"browserWorkerPolyFill(self);\n"+e},va=function(e){return e.toString().replace(/^function.+?{/,"").slice(0,-1)},_a=ba(va((function(){var t="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof e?e:"undefined"!==typeof self?self:{},n=function(){this.init=function(){var e={};this.on=function(t,n){e[t]||(e[t]=[]),e[t]=e[t].concat(n)},this.off=function(t,n){var i;return!!e[t]&&(i=e[t].indexOf(n),e[t]=e[t].slice(),e[t].splice(i,1),i>-1)},this.trigger=function(t){var n,i,r,s;if(n=e[t])if(2===arguments.length)for(r=n.length,i=0;i<r;++i)n[i].call(this,arguments[1]);else{for(s=[],i=arguments.length,i=1;i<arguments.length;++i)s.push(arguments[i]);for(r=n.length,i=0;i<r;++i)n[i].apply(this,s)}},this.dispose=function(){e={}}}};n.prototype.pipe=function(e){return this.on("data",(function(t){e.push(t)})),this.on("done",(function(t){e.flush(t)})),this.on("partialdone",(function(t){e.partialFlush(t)})),this.on("endedtimeline",(function(t){e.endTimeline(t)})),this.on("reset",(function(t){e.reset(t)})),e},n.prototype.push=function(e){this.trigger("data",e)},n.prototype.flush=function(e){this.trigger("done",e)},n.prototype.partialFlush=function(e){this.trigger("partialdone",e)},n.prototype.endTimeline=function(e){this.trigger("endedtimeline",e)},n.prototype.reset=function(e){this.trigger("reset",e)};var i,r,s,a,o,l,c,d,u,h,p,g,m,f,y,b,v,_,T,x,S,A,w,j,k,C,O,E,I,P,R,D,L,M,N,B,U=n,F=Math.pow(2,32),q={getUint64:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength);return n.getBigUint64?(t=n.getBigUint64(0))<Number.MAX_SAFE_INTEGER?
vendor: 4,284 bytes, line 2
2Number(t):t:n.getUint32(0)*F+n.getUint32(4)},MAX_UINT32:F},z=q.MAX_UINT32;!function(){var e;if(w={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},"undefined"!==typeof Uint8Array){for(e in w)w.hasOwnProperty(e)&&(w[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);j=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),C=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),k=new Uint8Array([0,0,0,1]),O=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]),E=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),I={video:O,audio:E},D=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),R=new Uint8Array([0,0,0,0,0,0,0,0]),L=new Uint8Array([0,0,0,0,0,0,0,0]),M=L,N=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),B=L,P=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),i=function(e){var t,n,i=[],r=0;for(t=1;t<arguments.length;t++)i.push(arguments[t]);for(t=i.length;t--;)r+=i[t].byteLength;for(n=new Uint8Array(r+8),new DataView(n.buffer,n.byteOffset,n.byteLength).setUint32(0,n.byteLength),n.set(e,4),t=0,r=8;t<i.length;t++)n.set(i[t],r),r+=i[t].byteLength;return n},r=function(){return i(w.dinf,i(w.dref,D))},s=function(e){return i(w.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,e.audioobjecttype<<3|e.samplingfrequencyindex>>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},a=function(){return i(w.ftyp,j,k,j,C)},b=function(e){return i(w.hdlr,I[e])},o=function(e){return i(w.mdat,e)},y=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(t[12]=e.samplerate>>>24&255,t[13]=e.samplerate>>>16&255,t[14]=e.samplerate>>>8&255,t[15]=255&e.samplerate),i(w.mdhd,t)},f=function(e){return i(w.mdia,y(e),b(e.type),c(e))},l=function(e){return i(w.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},c=function(e){return i(w.minf,"video"===e.type?i(w.vmhd,P):i(w.smhd,R),r(),_(e))},d=function(e,t){for(var n=[],r=t.length;r--;)n[r]=x(t[r]);return i.apply(null,[w.moof,l(e)].concat(n))},u=function(e){for(var t=e.length,n=[];t--;)n[t]=g(e[t]);return i.apply(null,[w.moov,p(4294967295)].concat(n).concat(h(e)))},h=function(e){for(var t=e.length,n=[];t--;)n[t]=S(e[t]);return i.apply(null,[w.mvex].concat(n))},p=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return i(w.mvhd,t)},v=function(e){var t,n,r=e.samples||[],s=new Uint8Array(4+r.length);for(n=0;n<r.length;n++)t=r[n].flags,s[n+4]=t.dependsOn<<4|t.isDependedOn<<2|t.hasRedundancy;return i(w.sdtp,s)},_=function(e){return i(w.stbl,T(e),i(w.stts,B),i(w.stsc,M),i(w.stsz,N),i(w.stco,L))},function(){var e,t;T=function(n){return i(w.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),"video"===n.type?e(n):t(n))},e=function(e){var t,n,r=e.sps||[],s=e.pps||[],a=[],o=[];for(t=0;t<r.length;t++)a.push((65280&r[t].byteLength)>>>8),a.push(255&r[t].byteLength),a=a.concat(Array.prototype.slice.call(r[t]));for(t=0;t<s.length;t++)o.push((65280&s[t].byteLength)>>>8),o.push(255&s[t].byteLength),o=o.concat(Array.prototype.slice.call(s[t]));if(n=[w.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,(65280&e.width)>>8,255&e.width,(65280&e.height)>>8,255&e.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),i(w.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([r.length],a,[s.length],o))),i(w.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],e.sarRatio){var l=e.s
vendor: 11,368 bytes, line 2
2arRatio[0],c=e.sarRatio[1];n.push(i(w.pasp,new Uint8Array([(4278190080&l)>>24,(16711680&l)>>16,(65280&l)>>8,255&l,(4278190080&c)>>24,(16711680&c)>>16,(65280&c)>>8,255&c])))}return i.apply(null,n)},t=function(e){return i(w.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),s(e))}}(),m=function(e){var t=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,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,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return i(w.tkhd,t)},x=function(e){var t,n,r,s,a,o;return t=i(w.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),a=Math.floor(e.baseMediaDecodeTime/z),o=Math.floor(e.baseMediaDecodeTime%z),n=i(w.tfdt,new Uint8Array([1,0,0,0,a>>>24&255,a>>>16&255,a>>>8&255,255&a,o>>>24&255,o>>>16&255,o>>>8&255,255&o])),92,"audio"===e.type?(r=A(e,92),i(w.traf,t,n,r)):(s=v(e),r=A(e,s.length+92),i(w.traf,t,n,r,s))},g=function(e){return e.duration=e.duration||4294967295,i(w.trak,m(e),f(e))},S=function(e){var t=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==e.type&&(t[t.length-1]=0),i(w.trex,t)},function(){var e,t,n;n=function(e,t){var n=0,i=0,r=0,s=0;return e.length&&(void 0!==e[0].duration&&(n=1),void 0!==e[0].size&&(i=2),void 0!==e[0].flags&&(r=4),void 0!==e[0].compositionTimeOffset&&(s=8)),[0,0,n|i|r|s,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},t=function(e,t){var r,s,a,o,l,c;for(t+=20+16*(o=e.samples||[]).length,a=n(o,t),(s=new Uint8Array(a.length+16*o.length)).set(a),r=a.length,c=0;c<o.length;c++)l=o[c],s[r++]=(4278190080&l.duration)>>>24,s[r++]=(16711680&l.duration)>>>16,s[r++]=(65280&l.duration)>>>8,s[r++]=255&l.duration,s[r++]=(4278190080&l.size)>>>24,s[r++]=(16711680&l.size)>>>16,s[r++]=(65280&l.size)>>>8,s[r++]=255&l.size,s[r++]=l.flags.isLeading<<2|l.flags.dependsOn,s[r++]=l.flags.isDependedOn<<6|l.flags.hasRedundancy<<4|l.flags.paddingValue<<1|l.flags.isNonSyncSample,s[r++]=61440&l.flags.degradationPriority,s[r++]=15&l.flags.degradationPriority,s[r++]=(4278190080&l.compositionTimeOffset)>>>24,s[r++]=(16711680&l.compositionTimeOffset)>>>16,s[r++]=(65280&l.compositionTimeOffset)>>>8,s[r++]=255&l.compositionTimeOffset;return i(w.trun,s)},e=function(e,t){var r,s,a,o,l,c;for(t+=20+8*(o=e.samples||[]).length,a=n(o,t),(r=new Uint8Array(a.length+8*o.length)).set(a),s=a.length,c=0;c<o.length;c++)l=o[c],r[s++]=(4278190080&l.duration)>>>24,r[s++]=(16711680&l.duration)>>>16,r[s++]=(65280&l.duration)>>>8,r[s++]=255&l.duration,r[s++]=(4278190080&l.size)>>>24,r[s++]=(16711680&l.size)>>>16,r[s++]=(65280&l.size)>>>8,r[s++]=255&l.size;return i(w.trun,r)},A=function(n,i){return"audio"===n.type?e(n,i):t(n,i)}}();var V,H,W,G,X,Y,Q,K,Z={ftyp:a,mdat:o,moof:d,moov:u,initSegment:function(e){var t,n=a(),i=u(e);return(t=new Uint8Array(n.byteLength+i.byteLength)).set(n),t.set(i,n.byteLength),t}},J=function(e,t){var n={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return n.dataOffset=t,n.compositionTimeOffset=e.pts-e.dts,n.duration=e.duration,n.size=4*e.length,n.size+=e.byteLength,e.keyFrame&&(n.flags.dependsOn=2,n.flags.isNonSyncSample=0),n},$={groupNalsIntoFrames:function(e){var t,n,i=[],r=[];for(r.byteLength=0,r.nalCount=0,r.duration=0,i.byteLength=0,t=0;t<e.length;t++)"access_unit_delimiter_rbsp"===(n=e[t]).nalUnitType?(i.length&&(i.duration=n.dts-i.dts,r.byteLength+=i.byteLength,r.nalCount+=i.length,r.duration+=i.duration,r.push(i)),(i=[n]).byteLength=n.data.byteLength,i.pts=n.pts,i.dts=n.dts):("slice_layer_without_partitioning_rbsp_idr"===n.nalUnitType&&(i.keyFrame=!0),i.duration=n.dts-i.dts,i.byteLength+=n.data.byteLength,i.push(n));return r.length&&(!i.duration||i.duration<=0)&&(i.duration=r[r.length-1].duration),r.byteLength+=i.byteLength,r.nalCount+=i.length,r.duration+=i.duration,r.push(i),r},groupFramesIntoGops:function(e){var t,n,i=[],r=[];for(i.byteLength=0,i.nalCount=0,i.duration=0,i.pts=e[0].pts,i.dts=e[0].dts,r.byteLength=0,r.nalCount=0,r.duration=0,r.pts=e[0].pts,r.dts=e[0].dts,t=0;t<e.length;t++)(n=e[t]).keyFrame?(i.length&&(r.push(i),r.byteLength+=i.byteLength,r.nalCount+=i.nalCount,r.duration+=i.duration),(i=[n]).nalCount=n.length,i.byteLength=n.byteLength,i.pts=n.pts,i.dts=n.dts,i.duration=n.duration):(i.duration+=n.duration,i.nalCount+=n.length,i.byteLength+=n.byteLength,i.push(n));return r.length&&i.duration<=0&&(i.duration=r[r.length-1].duration),r.byteLength+=i.byteLength,r.nalCount+=i.nalCount,r.duration+=i.duration,r.push(i),r},extendFirstKeyFrame:function(e){var t;return!e[0][0].keyFrame&&e.length>1&&(t=e.shift(),e.byteLength-=t.byteLength,e.nalCount-=t.nalCount,e[0][0].dts=t.dts,e[0][0].pts=t.pts,e[0][0].duration+=t.duration),e},generateSampleTable:function(e,t){var n,i,r,s,a,o=t||0,l=[];for(n=0;n<e.length;n++)for(s=e[n],i=0;i<s.length;i++)a=s[i],o+=(r=J(a,o)).size,l.push(r);return l},concatenateNalData:function(e){var t,n,i,r,s,a,o=0,l=e.byteLength,c=e.nalCount,d=new Uint8Array(l+4*c),u=new DataView(d.buffer);for(t=0;t<e.length;t++)for(r=e[t],n=0;n<r.length;n++)for(s=r[n],i=0;i<s.length;i++)a=s[i],u.setUint32(o,a.data.byteLength),o+=4,d.set(a.data,o),o+=a.data.byteLength;return d},generateSampleTableForFrame:function(e,t){var n,i=[];return n=J(e,t||0),i.push(n),i},concatenateNalDataForFrame:function(e){var t,n,i=0,r=e.byteLength,s=e.length,a=new Uint8Array(r+4*s),o=new DataView(a.buffer);for(t=0;t<e.length;t++)n=e[t],o.setUint32(i,n.data.byteLength),i+=4,a.set(n.data,i),i+=n.data.byteLength;return a}},ee=[33,16,5,32,164,27],te=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],ne=function(e){for(var t=[];e--;)t.push(0);return t},ie=9e4;Y=function(e,t){return H(X(e,t))},Q=function(e,t){return W(G(e),t)},K=function(e,t,n){return G(n?e:e-t)};var re={ONE_SECOND_IN_TS:ie,secondsToVideoTs:H=function(e){return e*ie},secondsToAudioTs:W=function(e,t){return e*t},videoTsToSeconds:G=function(e){return e/ie},audioTsToSeconds:X=function(e,t){return e/t},audioTsToVideoTs:Y,videoTsToAudioTs:Q,metadataTsToSeconds:K},se=function(){if(!V){var e={96e3:[ee,[227,64],ne(154),[56]],88200:[ee,[231],ne(170),[56]],64e3:[ee,[248,192],ne(240),[56]],48e3:[ee,[255,192],ne(268),[55,148,128],ne(54),[112]],44100:[ee,[255,192],ne(268),[55,163,128],ne(84),[112]],32e3:[ee,[255,192],ne(268),[55,234],ne(226),[112]],24e3:[ee,[255,192],ne(268),[55,255,128],ne(268),[111,112],ne(126),[224]],16e3:[ee,[255,192],ne(268),[55,255,128],ne(268),[111,255],ne(269),[223,108],ne(195),[1,192]],12e3:[te,ne(268),[3,127,248],ne(268),[6,255,240],ne(268),[13,255,224],ne(268),[27,253,128],ne(259),[56]],11025:[te,ne(268),[3,127,248],ne(268),[6,255,240],ne(268),[13,255,224],ne(268),[27,255,192],ne(268),[55,175,128],ne(108),[112]],8e3:[te,ne(268),[3,121,16],ne(47),[7]]};t=e,V=Object.keys(t).reduce((function(e,n){return e[n]=new Uint8Array(t[n].reduce((function(e,t){return e.concat(t)}),[])),e}),{})}var t;return V},ae=re,oe={prefixWithSilence:function(e,t,n,i){var r,s,a,o,l,c=0,d=0,u=0;if(t.length&&(r=ae.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),s=Math.ceil(ae.ONE_SECOND_IN_TS/(e.samplerate/1024)),n&&i&&(c=r-Math.max(n,i),u=(d=Math.floor(c/s))*s),!(d<1||u>ae.ONE_SECOND_IN_TS/2))){for((a=se()[e.samplerate])||(a=t[0].data),o=0;o<d;o++)l=t[0],t.splice(0,0,{data:a,dts:l.dts-s,pts:l.pts-s});return e.baseMediaDecodeTime-=Math.floor(ae.videoTsToAudioTs(u,e.samplerate)),u}},trimAdtsFramesByEarliestDts:function(e,t,n){return t.minSegmentDts>=n?e:(t.minSegmentDts=1/0,e.filter((function(e){return e.dts>=n&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)})))},generateSampleTable:function(e){var t,n,i=[];for(t=0;t<e.length;t++)n=e[t],i.push({size:n.data.byteLength,duration:1024});return i},concatenateFrameData:function(e){var t,n,i=0,r=new Uint8Array(function(e){var t,n=0;for(t=0;t<e.length;t++)n+=e[t].data.byteLength;return n}(e));for(t=0;t<e.length;t++)n=e[t],r.set(n.data,i),i+=n.data.byteLength;return r}},le=re.ONE_SECOND_IN_TS,ce={clearDtsInfo:function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},calculateTrackBaseMediaDecodeTime:function(e,t){var n,i=e.minSegmentDts;return t||(i-=e.timelineStartInfo.dts),n=e.timelineStartInfo.baseMediaDecodeTime,n+=i,n=Math.max(0,n),"audio"===e.type&&(n*=e.samplerate/le,n=Math.floor(n)),n},collectDtsInfo:function(e,t){"number"===typeof t.pts&&(void 0===e.timelineStartInfo.pts&&(e.timelineStartInfo.pts=t.pts),void 0===e.minSegmentPts?e.minSegmentPts=t.pts:e.minSegmentPts=Math.min(e.minSegmentPts,t.pts),void 0===e.maxSegmentPts?e.maxSegmentPts=t.pts:e.maxSegmentPts=Math.max(e.maxSegmentPts,t.pts)),"number"===typeof t.dts&&(void 0===e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),void 0===e.minSegmentDts?e.minSegmentDts=t.dts:e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),void 0===e.maxSegmentDts?e.maxSegmentDts=t.dts:e.maxSegmentDts=Math.max(e.maxSegmentDts,t.dts))}},de={parseSei:function(e){for(var t=0,n={payloadType:-1,payloadSize:0},i=0,r=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)i+=255,t++;for(i+=e[t++];255===e[t];)r+=255,t++;if(r+=e[t++],!n.payload&&4===i){if("GA94"===String.fromCharCode(e[t+3],e[t+4],e[t+5],e[t+6])){n.payloadType=i,n.payloadSize=r,n.payload=e.subarray(t,t+r);break}n.payload=void 0}t+=r,i=0,r=0}return n},parseUserData:function(e){return 181!==e.payload[0]||49!==(e.payload[1]<<8|e.payload[2])||"GA94"!==String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])||3!==e.payload[7]?null:e.payload.subarray(8,e.payload.length-1)},parseCaptionPackets:function(e,t){var n,i,r,s,a=[];if(!(64&t[0]))return a;for(i=31&t[0],n=0;n<i;n++)s={type:3&t[(r=3*n)+2],pts:e},4&t[r+2]&&(s.ccData=t[r+3]<<8|t[r+4],a.push(s));return a},discardEmulationPreventionBytes:function(e){for(var t,n,i=e.byteLength,r=[],s=1;s<i-2;)0===e[s]&&0===e[s+1]&&3===e[s+2]?(r.push(s+2),s+=2):s++;if(0===r.length)return e;t=i-r.length,n=new Uint8Array(t);var a=0;for(s=0;s<t;a++,s++)a===r[0]&&(a++,r.shift()),n[s]=e[a];return n},USER_DATA_REGISTERED_ITU_T_T35:4},ue=U,he=de,pe=function(e){e=e||{},pe.prototype.init.call(this),this.parse708captions_="boolean"!==typeof e.parse708captions||e.parse708captions,this.captionPackets_=[],this.ccStreams_=[new Se(0,0),new Se(0,1),new Se(1,0),new Se(1,1)],this.parse708captions_&&(this.cc708Stream_=new be({captionServices:e.captionServices})),this.reset(),this.ccStreams_.forEach((function(e){e.on("data",this.trigger.bind(this,"data")),e.on("partialdone",this.trigger.bind(this,"partialdone")),e.on("done",this.trigger.bind(this,"done"))}),this),this.parse708captions_&&(this.cc708Stream_.on("data",this.trigger.bind(this,"data")),this.cc708Stream_.on("partialdone",this.trigger.bind(this,"partialdone")),this.cc708Stream_.on("done",this.trigger.bind(this,"done")))};pe.prototype=new ue,pe.prototype.push=function(e){var t,n,i;
vendor: 4,462 bytes, line 2
2if("sei_rbsp"===e.nalUnitType&&(t=he.parseSei(e.escapedRBSP)).payload&&t.payloadType===he.USER_DATA_REGISTERED_ITU_T_T35&&(n=he.parseUserData(t)))if(e.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));i=he.parseCaptionPackets(e.pts,n),this.captionPackets_=this.captionPackets_.concat(i),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},pe.prototype.flushCCStreams=function(e){this.ccStreams_.forEach((function(t){return"flush"===e?t.flush():t.partialFlush()}),this)},pe.prototype.flushStream=function(e){this.captionPackets_.length?(this.captionPackets_.forEach((function(e,t){e.presortIndex=t})),this.captionPackets_.sort((function(e,t){return e.pts===t.pts?e.presortIndex-t.presortIndex:e.pts-t.pts})),this.captionPackets_.forEach((function(e){e.type<2?this.dispatchCea608Packet(e):this.dispatchCea708Packet(e)}),this),this.captionPackets_.length=0,this.flushCCStreams(e)):this.flushCCStreams(e)},pe.prototype.flush=function(){return this.flushStream("flush")},pe.prototype.partialFlush=function(){return this.flushStream("partialFlush")},pe.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach((function(e){e.reset()}))},pe.prototype.dispatchCea608Packet=function(e){this.setsTextOrXDSActive(e)?this.activeCea608Channel_[e.type]=null:this.setsChannel1Active(e)?this.activeCea608Channel_[e.type]=0:this.setsChannel2Active(e)&&(this.activeCea608Channel_[e.type]=1),null!==this.activeCea608Channel_[e.type]&&this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)},pe.prototype.setsChannel1Active=function(e){return 4096===(30720&e.ccData)},pe.prototype.setsChannel2Active=function(e){return 6144===(30720&e.ccData)},pe.prototype.setsTextOrXDSActive=function(e){return 256===(28928&e.ccData)||4138===(30974&e.ccData)||6186===(30974&e.ccData)},pe.prototype.dispatchCea708Packet=function(e){this.parse708captions_&&this.cc708Stream_.push(e)};var ge={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},me=function(e){return 32<=e&&e<=127||160<=e&&e<=255},fe=function(e){this.windowNum=e,this.reset()};fe.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},fe.prototype.getText=function(){return this.rows.join("\n")},fe.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},fe.prototype.newLine=function(e){for(this.rows.length>=this.virtualRowCount&&"function"===typeof this.beforeRowOverflow&&this.beforeRowOverflow(e),this.rows.length>0&&(this.rows.push(""),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},fe.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&""===this.rows[0]},fe.prototype.addText=function(e){this.rows[this.rowIdx]+=e},fe.prototype.backspace=function(){if(!this.isEmpty()){var e=this.rows[this.rowIdx];this.rows[this.rowIdx]=e.substr(0,e.length-1)}};var ye=function(e,t,n){this.serviceNum=e,this.text="",this.currentWindow=new fe(-1),this.windows=[],this.stream=n,"string"===typeof t&&this.createTextDecoder(t)};ye.prototype.init=function(e,t){this.startPts=e;for(var n=0;n<8;n++)this.windows[n]=new fe(n),"function"===typeof t&&(this.windows[n].beforeRowOverflow=t)},ye.prototype.setCurrentWindow=function(e){this.currentWindow=this.windows[e]},ye.prototype.createTextDecoder=function(e){if("undefined"===typeof TextDecoder)this.stream.trigger("log",{level:"warn",message:"The `encoding` option is unsupported without TextDecoder support"});else try{this.textDecoder_=new TextDecoder(e)}catch(t){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+e+" encoding. "+t})}};var be=function(e){e=e||{},be.prototype.init.call(this);var t,n=this,i=e.captionServices||{},r={};
vendor: 12,977 bytes, line 2
2Object.keys(i).forEach((e=>{t=i[e],/^SERVICE/.test(e)&&(r[e]=t.encoding)})),this.serviceEncodings=r,this.current708Packet=null,this.services={},this.push=function(e){3===e.type?(n.new708Packet(),n.add708Bytes(e)):(null===n.current708Packet&&n.new708Packet(),n.add708Bytes(e))}};be.prototype=new ue,be.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},be.prototype.add708Bytes=function(e){var t=e.ccData,n=t>>>8,i=255&t;this.current708Packet.ptsVals.push(e.pts),this.current708Packet.data.push(n),this.current708Packet.data.push(i)},be.prototype.push708Packet=function(){var e=this.current708Packet,t=e.data,n=null,i=null,r=0,s=t[r++];for(e.seq=s>>6,e.sizeCode=63&s;r<t.length;r++)i=31&(s=t[r++]),7===(n=s>>5)&&i>0&&(n=s=t[r++]),this.pushServiceBlock(n,r,i),i>0&&(r+=i-1)},be.prototype.pushServiceBlock=function(e,t,n){var i,r=t,s=this.current708Packet.data,a=this.services[e];for(a||(a=this.initService(e,r));r<t+n&&r<s.length;r++)i=s[r],me(i)?r=this.handleText(r,a):24===i?r=this.multiByteCharacter(r,a):16===i?r=this.extendedCommands(r,a):128<=i&&i<=135?r=this.setCurrentWindow(r,a):152<=i&&i<=159?r=this.defineWindow(r,a):136===i?r=this.clearWindows(r,a):140===i?r=this.deleteWindows(r,a):137===i?r=this.displayWindows(r,a):138===i?r=this.hideWindows(r,a):139===i?r=this.toggleWindows(r,a):151===i?r=this.setWindowAttributes(r,a):144===i?r=this.setPenAttributes(r,a):145===i?r=this.setPenColor(r,a):146===i?r=this.setPenLocation(r,a):143===i?a=this.reset(r,a):8===i?a.currentWindow.backspace():12===i?a.currentWindow.clearText():13===i?a.currentWindow.pendingNewLine=!0:14===i?a.currentWindow.clearText():141===i&&r++},be.prototype.extendedCommands=function(e,t){var n=this.current708Packet.data[++e];return me(n)&&(e=this.handleText(e,t,{isExtended:!0})),e},be.prototype.getPts=function(e){return this.current708Packet.ptsVals[Math.floor(e/2)]},be.prototype.initService=function(e,t){var n,i,r=this;return(n="SERVICE"+e)in this.serviceEncodings&&(i=this.serviceEncodings[n]),this.services[e]=new ye(e,i,r),this.services[e].init(this.getPts(t),(function(t){r.flushDisplayed(t,r.services[e])})),this.services[e]},be.prototype.handleText=function(e,t,n){var i,r,s=n&&n.isExtended,a=n&&n.isMultiByte,o=this.current708Packet.data,l=s?4096:0,c=o[e],d=o[e+1],u=t.currentWindow;if(a?(r=[c,d],e++):r=[c],t.textDecoder_&&!s)i=t.textDecoder_.decode(new Uint8Array(r));else if(a){const e=r.map((e=>("0"+(255&e).toString(16)).slice(-2))).join("");i=String.fromCharCode(parseInt(e,16))}else i=function(e){var t=ge[e]||e;return 4096&e&&e===t?"":String.fromCharCode(t)}(l|c);return u.pendingNewLine&&!u.isEmpty()&&u.newLine(this.getPts(e)),u.pendingNewLine=!1,u.addText(i),e},be.prototype.multiByteCharacter=function(e,t){var n=this.current708Packet.data,i=n[e+1],r=n[e+2];return me(i)&&me(r)&&(e=this.handleText(++e,t,{isMultiByte:!0})),e},be.prototype.setCurrentWindow=function(e,t){var n=7&this.current708Packet.data[e];return t.setCurrentWindow(n),e},be.prototype.defineWindow=function(e,t){var n=this.current708Packet.data,i=n[e],r=7&i;t.setCurrentWindow(r);var s=t.currentWindow;return i=n[++e],s.visible=(32&i)>>5,s.rowLock=(16&i)>>4,s.columnLock=(8&i)>>3,s.priority=7&i,i=n[++e],s.relativePositioning=(128&i)>>7,s.anchorVertical=127&i,i=n[++e],s.anchorHorizontal=i,i=n[++e],s.anchorPoint=(240&i)>>4,s.rowCount=15&i,i=n[++e],s.columnCount=63&i,i=n[++e],s.windowStyle=(56&i)>>3,s.penStyle=7&i,s.virtualRowCount=s.rowCount+1,e},be.prototype.setWindowAttributes=function(e,t){var n=this.current708Packet.data,i=n[e],r=t.currentWindow.winAttr;return i=n[++e],r.fillOpacity=(192&i)>>6,r.fillRed=(48&i)>>4,r.fillGreen=(12&i)>>2,r.fillBlue=3&i,i=n[++e],r.borderType=(192&i)>>6,r.borderRed=(48&i)>>4,r.borderGreen=(12&i)>>2,r.borderBlue=3&i,i=n[++e],r.borderType+=(128&i)>>5,r.wordWrap=(64&i)>>6,r.printDirection=(48&i)>>4,r.scrollDirection=(12&i)>>2,r.justify=3&i,i=n[++e],r.effectSpeed=(240&i)>>4,r.effectDirection=(12&i)>>2,r.displayEffect=3&i,e},be.prototype.flushDisplayed=function(e,t){for(var n=[],i=0;i<8;i++)t.windows[i].visible&&!t.windows[i].isEmpty()&&n.push(t.windows[i].getText());t.endPts=e,t.text=n.join("\n\n"),this.pushCaption(t),t.startPts=e},be.prototype.pushCaption=function(e){""!==e.text&&(this.trigger("data",{startPts:e.startPts,endPts:e.endPts,text:e.text,stream:"cc708_"+e.serviceNum}),e.text="",e.startPts=e.endPts)},be.prototype.displayWindows=function(e,t){var n=this.current708Packet.data[++e],i=this.getPts(e);this.flushDisplayed(i,t);for(var r=0;r<8;r++)n&1<<r&&(t.windows[r].visible=1);return e},be.prototype.hideWindows=function(e,t){var n=this.current708Packet.data[++e],i=this.getPts(e);this.flushDisplayed(i,t);for(var r=0;r<8;r++)n&1<<r&&(t.windows[r].visible=0);return e},be.prototype.toggleWindows=function(e,t){var n=this.current708Packet.data[++e],i=this.getPts(e);this.flushDisplayed(i,t);for(var r=0;r<8;r++)n&1<<r&&(t.windows[r].visible^=1);return e},be.prototype.clearWindows=function(e,t){var n=this.current708Packet.data[++e],i=this.getPts(e);this.flushDisplayed(i,t);for(var r=0;r<8;r++)n&1<<r&&t.windows[r].clearText();return e},be.prototype.deleteWindows=function(e,t){var n=this.current708Packet.data[++e],i=this.getPts(e);this.flushDisplayed(i,t);for(var r=0;r<8;r++)n&1<<r&&t.windows[r].reset();return e},be.prototype.setPenAttributes=function(e,t){var n=this.current708Packet.data,i=n[e],r=t.currentWindow.penAttr;return i=n[++e],r.textTag=(240&i)>>4,r.offset=(12&i)>>2,r.penSize=3&i,i=n[++e],r.italics=(128&i)>>7,r.underline=(64&i)>>6,r.edgeType=(56&i)>>3,r.fontStyle=7&i,e},be.prototype.setPenColor=function(e,t){var n=this.current708Packet.data,i=n[e],r=t.currentWindow.penColor;return i=n[++e],r.fgOpacity=(192&i)>>6,r.fgRed=(48&i)>>4,r.fgGreen=(12&i)>>2,r.fgBlue=3&i,i=n[++e],r.bgOpacity=(192&i)>>6,r.bgRed=(48&i)>>4,r.bgGreen=(12&i)>>2,r.bgBlue=3&i,i=n[++e],r.edgeRed=(48&i)>>4,r.edgeGreen=(12&i)>>2,r.edgeBlue=3&i,e},be.prototype.setPenLocation=function(e,t){var n=this.current708Packet.data,i=n[e],r=t.currentWindow.penLoc;return t.currentWindow.pendingNewLine=!0,i=n[++e],r.row=15&i,i=n[++e],r.column=63&i,e},be.prototype.reset=function(e,t){var n=this.getPts(e);return this.flushDisplayed(n,t),this.initService(t.serviceNum,e)};var ve={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},_e=function(e){return null===e?"":(e=ve[e]||e,String.fromCharCode(e))},Te=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],xe=function(){for(var e=[],t=15;t--;)e.push({text:"",indent:0,offset:0});return e},Se=function(e,t){Se.prototype.init.call(this),this.field_=e||0,this.dataChannel_=t||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,n,i,r,s;if((t=32639&e.ccData)!==this.lastControlCode_){if(4096===(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),i=t>>>8,r=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(t===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),n=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=n,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(e.pts);else if(t===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(e.pts);else if(t===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(e.pts);else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===this.BACKSPACE_)"popOn"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=xe();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=xe();else if(t===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=xe()),this.mode_="paintOn",this.startPts_=e.pts;else if(this.isSpecialCharacter(i,r))s=_e((i=(3&i)<<8)|r),this[this.mode_](e.pts,s),this.column_++;else if(this.isExtCharacter(i,r))"popOn"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1),s=_e((i=(3&i)<<8)|r),this[this.mode_](e.pts,s),this.column_++;else if(this.isMidRowCode(i,r))this.clearFormatting(e.pts),this[this.mode_](e.pts," "),this.column_++,14===(14&r)&&this.addFormatting(e.pts,["i"]),1===(1&r)&&this.addFormatting(e.pts,["u"]);else if(this.isOffsetControlCode(i,r)){const e=3&r;this.nonDisplayed_[this.row_].offset=e,this.column_+=e}else if(this.isPAC(i,r)){var a=Te.indexOf(7968&t);if("rollUp"===this.mode_&&(a-this.rollUpRows_+1<0&&(a=this.rollUpRows_-1),this.setRollUp(e.pts,a)),a!==this.row_&&a>=0&&a<=14&&(this.clearFormatting(e.pts),this.row_=a),1&r&&-1===this.formatting_.indexOf("u")&&this.addFormatting(e.pts,["u"]),16===(16&t)){const e=(14&t)>>1;this.column_=4*e,this.nonDisplayed_[this.row_].indent+=e}this.isColorPAC(r)&&14===(14&r)&&this.addFormatting(e.pts,["i"])}else this.isNormalChar(i)&&(0===r&&(r=null),s=_e(i),s+=_e(r),this[this.mode_](e.pts,s),this.column_+=s.length)}else this.lastControlCode_=null}};Se.prototype=new ue,Se.prototype.flushDisplayed=function(e){const t=e=>{this.trigger("log",{level:"warn",message:"Skipping a malformed 608 caption at index "+e+"."})},n=[];this.displayed_.forEach(((e,i)=>{if(e&&e.text&&e.text.length){try{e.text=e.text.trim()}catch(r){t(i)}e.text.length&&n.push({text:e.text,line:i+1,position:10+Math.min(70,10*e.indent)+2.5*e.offset})}else void 0!==e&&null!==e||t(i)})),n.length&&this.trigger("data",{startPts:this.startPts_,endPts:e,content:n,stream:this.name_})},Se.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=xe(),this.nonDisplayed_=xe(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},Se.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},Se.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},Se.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},Se.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},Se.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},Se.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},Se.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},Se.prototype.isNormalChar=function(e){return e>=32&&e<=127},Se.prototype.setRollUp=function(e,t){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(e),this.nonDisplayed_=xe(),this.displayed_=xe()),void 0!==t&&t!==this.row_)for(var n=0;n<this.rollUpRows_;n++)this.displayed_[t-n]=this.displayed_[this.row_-n],this.displayed_[this.row_-n]={text:"",indent:0,offset:0};void 0===t&&(t=this.row_),this.topRow_=t-this.rollUpRows_+1},Se.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var n=t.reduce((function(e,t){return e+"<"+t+">"}),"");this[this.mode_](e,n)},Se.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce((function(e,t){return e+"</"+t+">"}),"");this.formatting_=[],this[this.mode_](e,t)}},Se.prototype.popOn=function(e,t){var n=this.nonDisplayed_[this.row_].text;n+=t,this.nonDisplayed_[this.row_].text=n},Se.prototype.rollUp=function(e,t){var n=this.displayed_[this.row_].text;n+=t,this.displayed_[this.row_].text=n},Se.prototype.shiftRowsUp_=function(){var e;
vendor: 6,736 bytes, line 2
2for(e=0;e<this.topRow_;e++)this.displayed_[e]={text:"",indent:0,offset:0};for(e=this.row_+1;e<15;e++)this.displayed_[e]={text:"",indent:0,offset:0};for(e=this.topRow_;e<this.row_;e++)this.displayed_[e]=this.displayed_[e+1];this.displayed_[this.row_]={text:"",indent:0,offset:0}},Se.prototype.paintOn=function(e,t){var n=this.displayed_[this.row_].text;n+=t,this.displayed_[this.row_].text=n};var Ae={CaptionStream:pe,Cea608Stream:Se,Cea708Stream:be},we={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},je=U,ke="shared",Ce=function(e,t){var n=1;for(e>t&&(n=-1);Math.abs(t-e)>4294967296;)e+=8589934592*n;return e},Oe=function(e){var t,n;Oe.prototype.init.call(this),this.type_=e||ke,this.push=function(e){"metadata"!==e.type?this.type_!==ke&&e.type!==this.type_||(void 0===n&&(n=e.dts),e.dts=Ce(e.dts,n),e.pts=Ce(e.pts,n),t=e.dts,this.trigger("data",e)):this.trigger("data",e)},this.flush=function(){n=t,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){n=void 0,t=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};Oe.prototype=new je;var Ee,Ie={TimestampRolloverStream:Oe,handleRollover:Ce},Pe=(e,t,n)=>{if(!e)return-1;for(var i=n;i<e.length;i++)if(e[i]===t)return i;return-1},Re=Pe,De=3,Le=function(e,t,n){var i,r="";for(i=t;i<n;i++)r+="%"+("00"+e[i].toString(16)).slice(-2);return r},Me=function(e,t,n){return decodeURIComponent(Le(e,t,n))},Ne=function(e,t,n){return unescape(Le(e,t,n))},Be=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},Ue={APIC:function(e){var t,n,i=1;e.data[0]===De&&((t=Re(e.data,0,i))<0||(e.mimeType=Ne(e.data,i,t),i=t+1,e.pictureType=e.data[i],i++,(n=Re(e.data,0,i))<0||(e.description=Me(e.data,i,n),i=n+1,"--\x3e"===e.mimeType?e.url=Ne(e.data,i,e.data.length):e.pictureData=e.data.subarray(i,e.data.length))))},"T*":function(e){e.data[0]===De&&(e.value=Me(e.data,1,e.data.length).replace(/\0*$/,""),e.values=e.value.split("\0"))},TXXX:function(e){var t;e.data[0]===De&&-1!==(t=Re(e.data,0,1))&&(e.description=Me(e.data,1,t),e.value=Me(e.data,t+1,e.data.length).replace(/\0*$/,""),e.data=e.value)},"W*":function(e){e.url=Ne(e.data,0,e.data.length).replace(/\0.*$/,"")},WXXX:function(e){var t;e.data[0]===De&&-1!==(t=Re(e.data,0,1))&&(e.description=Me(e.data,1,t),e.url=Ne(e.data,t+1,e.data.length).replace(/\0.*$/,""))},PRIV:function(e){var t;for(t=0;t<e.data.length;t++)if(0===e.data[t]){e.owner=Ne(e.data,0,t);break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}},Fe={parseId3Frames:function(e){var t,n=10,i=0,r=[];if(!(e.length<10||e[0]!=="I".charCodeAt(0)||e[1]!=="D".charCodeAt(0)||e[2]!=="3".charCodeAt(0))){i=Be(e.subarray(6,10)),i+=10,64&e[5]&&(n+=4,n+=Be(e.subarray(10,14)),i-=Be(e.subarray(16,20)));do{if((t=Be(e.subarray(n+4,n+8)))<1)break;var s={id:String.fromCharCode(e[n],e[n+1],e[n+2],e[n+3]),data:e.subarray(n+10,n+t+10)};s.key=s.id,Ue[s.id]?Ue[s.id](s):"T"===s.id[0]?Ue["T*"](s):"W"===s.id[0]&&Ue["W*"](s),r.push(s),n+=10,n+=t}while(n<i);return r}},parseSyncSafeInteger:Be,frameParsers:Ue},qe=we,ze=Fe;(Ee=function(e){var t,n={descriptor:e&&e.descriptor},i=0,r=[],s=0;if(Ee.prototype.init.call(this),this.dispatchType=qe.METADATA_STREAM_TYPE.toString(16),n.descriptor)for(t=0;t<n.descriptor.length;t++)this.dispatchType+=("00"+n.descriptor[t].toString(16)).slice(-2);this.push=function(e){var t,n,a,o,l;if("timed-metadata"===e.type)if(e.dataAlignmentIndicator&&(s=0,r.length=0),0===r.length&&(e.data.length<10||e.data[0]!=="I".charCodeAt(0)||e.data[1]!=="D".charCodeAt(0)||e.data[2]!=="3".charCodeAt(0)))this.trigger("log",{level:"warn",message:"Skipping unrecognized metadata packet"});else if(r.push(e),s+=e.data.byteLength,1===r.length&&(i=ze.parseSyncSafeInteger(e.data.subarray(6,10)),i+=10),!(s<i)){for(t={data:new Uint8Array(i),frames:[],pts:r[0].pts,dts:r[0].dts},l=0;l<i;)t.data.set(r[0].data.subarray(0,i-l),l),l+=r[0].data.byteLength,s-=r[0].data.byteLength,r.shift();n=10,64&t.data[5]&&(n+=4,n+=ze.parseSyncSafeInteger(t.data.subarray(10,14)),i-=ze.parseSyncSafeInteger(t.data.subarray(16,20)));do{if((a=ze.parseSyncSafeInteger(t.data.subarray(n+4,n+8)))<1){this.trigger("log",{level:"warn",message:"Malformed ID3 frame encountered. Skipping remaining metadata parsing."});break}if((o={id:String.fromCharCode(t.data[n],t.data[n+1],t.data[n+2],t.data[n+3]),data:t.data.subarray(n+10,n+a+10)}).key=o.id,ze.frameParsers[o.id]?ze.frameParsers[o.id](o):"T"===o.id[0]?ze.frameParsers["T*"](o):"W"===o.id[0]&&ze.frameParsers["W*"](o),"com.apple.streaming.transportStreamTimestamp"===o.owner){var c=o.data,d=(1&c[3])<<30|c[4]<<22|c[5]<<14|c[6]<<6|c[7]>>>2;d*=4,d+=3&c[7],o.timeStamp=d,void 0===t.pts&&void 0===t.dts&&(t.pts=o.timeStamp,t.dts=o.timeStamp),this.trigger("timestamp",o)}t.frames.push(o),n+=10,n+=a}while(n<i);this.trigger("data",t)}}}).prototype=new U;var Ve,He,We,Ge=Ee,Xe=U,Ye=Ae,Qe=we,Ke=Ie.TimestampRolloverStream,Ze=188;(Ve=function(){var e=new Uint8Array(Ze),t=0;Ve.prototype.init.call(this),this.push=function(n){var i,r=0,s=Ze;for(t?((i=new Uint8Array(n.byteLength+t)).set(e.subarray(0,t)),i.set(n,t),t=0):i=n;s<i.byteLength;)71!==i[r]||71!==i[s]?(r++,s++):(this.trigger("data",i.subarray(r,s)),r+=Ze,s+=Ze);r<i.byteLength&&(e.set(i.subarray(r),0),t=i.byteLength-r)},this.flush=function(){t===Ze&&71===e[0]&&(this.trigger("data",e),t=0),this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.reset=function(){t=0,this.trigger("reset")}}).prototype=new Xe,He=function(){var e,t,n,i;He.prototype.init.call(this),i=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,e=function(e,i){var r=0;i.payloadUnitStartIndicator&&(r+=e[r]+1),"pat"===i.type?t(e.subarray(r),i):n(e.subarray(r),i)},t=function(e,t){t.section_number=e[7],t.last_section_number=e[8],i.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=i.pmtPid},n=function(e,t){var n,r;if(1&e[5]){for(i.programMapTable={video:null,audio:null,"timed-metadata":{}},n=3+((15&e[1])<<8|e[2])-4,r=12+((15&e[10])<<8|e[11]);r<n;){var s=e[r],a=(31&e[r+1])<<8|e[r+2];s===Qe.H264_STREAM_TYPE&&null===i.programMapTable.video?i.programMapTable.video=a:s===Qe.ADTS_STREAM_TYPE&&null===i.programMapTable.audio?i.programMapTable.audio=a:s===Qe.METADATA_STREAM_TYPE&&(i.programMapTable["timed-metadata"][a]=s),r+=5+((15&e[r+3])<<8|e[r+4])}t.programMapTable=i.programMapTable}},this.push=function(t){var n={},i=4;if(n.payloadUnitStartIndicator=!!(64&t[1]),n.pid=31&t[1],n.pid<<=8,n.pid|=t[2],(48&t[3])>>>4>1&&(i+=t[i]+1),0===n.pid)n.type="pat",e(t.subarray(i),n),this.trigger("data",n);else if(n.pid===this.pmtPid)for(n.type="pmt",e(t.subarray(i),n),this.trigger("data",n);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());
vendor: 4,765 bytes, line 2
2else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,i,n]):this.processPes_(t,i,n)},this.processPes_=function(e,t,n){n.pid===this.programMapTable.video?n.streamType=Qe.H264_STREAM_TYPE:n.pid===this.programMapTable.audio?n.streamType=Qe.ADTS_STREAM_TYPE:n.streamType=this.programMapTable["timed-metadata"][n.pid],n.type="pes",n.data=e.subarray(t),this.trigger("data",n)}},He.prototype=new Xe,He.STREAM_TYPES={h264:27,adts:15},We=function(){var e,t=this,n=!1,i={data:[],size:0},r={data:[],size:0},s={data:[],size:0},a=function(e,n,i){var r,s,a=new Uint8Array(e.size),o={type:n},l=0,c=0;if(e.data.length&&!(e.size<9)){for(o.trackId=e.data[0].pid,l=0;l<e.data.length;l++)s=e.data[l],a.set(s.data,c),c+=s.data.byteLength;!function(e,t){var n;const i=e[0]<<16|e[1]<<8|e[2];t.data=new Uint8Array,1===i&&(t.packetLength=6+(e[4]<<8|e[5]),t.dataAlignmentIndicator=0!==(4&e[6]),192&(n=e[7])&&(t.pts=(14&e[9])<<27|(255&e[10])<<20|(254&e[11])<<12|(255&e[12])<<5|(254&e[13])>>>3,t.pts*=4,t.pts+=(6&e[13])>>>1,t.dts=t.pts,64&n&&(t.dts=(14&e[14])<<27|(255&e[15])<<20|(254&e[16])<<12|(255&e[17])<<5|(254&e[18])>>>3,t.dts*=4,t.dts+=(6&e[18])>>>1)),t.data=e.subarray(9+e[8]))}(a,o),r="video"===n||o.packetLength<=e.size,(i||r)&&(e.size=0,e.data.length=0),r&&t.trigger("data",o)}};We.prototype.init.call(this),this.push=function(o){({pat:function(){},pes:function(){var e,t;switch(o.streamType){case Qe.H264_STREAM_TYPE:e=i,t="video";break;case Qe.ADTS_STREAM_TYPE:e=r,t="audio";break;case Qe.METADATA_STREAM_TYPE:e=s,t="timed-metadata";break;default:return}o.payloadUnitStartIndicator&&a(e,t,!0),e.data.push(o),e.size+=o.data.byteLength},pmt:function(){var i={type:"metadata",tracks:[]};null!==(e=o.programMapTable).video&&i.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:"avc",type:"video"}),null!==e.audio&&i.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:"adts",type:"audio"}),n=!0,t.trigger("data",i)}})[o.type]()},this.reset=function(){i.size=0,i.data.length=0,r.size=0,r.data.length=0,this.trigger("reset")},this.flushStreams_=function(){a(i,"video"),a(r,"audio"),a(s,"timed-metadata")},this.flush=function(){if(!n&&e){var i={type:"metadata",tracks:[]};null!==e.video&&i.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:"avc",type:"video"}),null!==e.audio&&i.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:"adts",type:"audio"}),t.trigger("data",i)}n=!1,this.flushStreams_(),this.trigger("done")}},We.prototype=new Xe;var Je={PAT_PID:0,MP2T_PACKET_LENGTH:Ze,TransportPacketStream:Ve,TransportParseStream:He,ElementaryStream:We,TimestampRolloverStream:Ke,CaptionStream:Ye.CaptionStream,Cea608Stream:Ye.Cea608Stream,Cea708Stream:Ye.Cea708Stream,MetadataStream:Ge};for(var $e in Qe)Qe.hasOwnProperty($e)&&(Je[$e]=Qe[$e]);var et,tt=Je,nt=re.ONE_SECOND_IN_TS,it=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(et=function(e){var t,n=0;et.prototype.init.call(this),this.skipWarn_=function(e,t){this.trigger("log",{level:"warn",message:"adts skiping bytes ".concat(e," to ").concat(t," in frame ").concat(n," outside syncword")})},this.push=function(i){var r,s,a,o,l,c=0;if(e||(n=0),"audio"===i.type){var d;for(t&&t.length?(a=t,(t=new Uint8Array(a.byteLength+i.data.byteLength)).set(a),t.set(i.data,a.byteLength)):t=i.data;c+7<t.length;)if(255===t[c]&&240===(246&t[c+1])){if("number"===typeof d&&(this.skipWarn_(d,c),d=null),s=2*(1&~t[c+1]),r=(3&t[c+3])<<11|t[c+4]<<3|(224&t[c+5])>>5,l=(o=1024*(1+(3&t[c+6])))*nt/it[(60&t[c+2])>>>2],t.byteLength-c<r)break;this.trigger("data",{pts:i.pts+n*l,dts:i.dts+n*l,sampleCount:o,audioobjecttype:1+(t[c+2]>>>6&3),channelcount:(1&t[c+2])<<2|(192&t[c+3])>>>6,samplerate:it[(60&t[c+2])>>>2],samplingfrequencyindex:(60&t[c+2])>>>2,samplesize:16,data:t.subarray(c+7+s,c+r)}),n++,c+=r}else"number"!==typeof d&&(d=c),c++;"number"===typeof d&&(this.skipWarn_(d,c),d=null),t=t.subarray(c)}},this.flush=function(){n=0,this.trigger("done")},this.reset=function(){t=void 0,this.trigger("reset")},this.endTimeline=function(){t=void 0,this.trigger("endedtimeline")}}).prototype=new U;var rt,st,at,ot=et,lt=U,ct=function(e){var t=e.byteLength,n=0,i=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+i},this.loadWord=function(){var r=e.byteLength-t,s=new Uint8Array(4),a=Math.min(4,t);if(0===a)throw new Error("no bytes available");s.set(e.subarray(r,r+a)),n=new DataView(s.buffer).getUint32(0),i=8*a,t-=a},this.skipBits=function(e){var r;i>e?(n<<=e,i-=e):(e-=i,e-=8*(r=Math.floor(e/8)),t-=r,this.loadWord(),n<<=e,i-=e)},this.readBits=function(e){var r=Math.min(i,e),s=n>>>32-r;return(i-=r)>0?n<<=r:t>0&&this.loadWord(),(r=e-r)>0?s<<r|this.readBits(r):s},this.skipLeadingZeros=function(){var e;
vendor: 4,715 bytes, line 2
2for(e=0;e<i;++e)if(0!==(n&2147483648>>>e))return n<<=e,i-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};(st=function(){var e,t,n=0;st.prototype.init.call(this),this.push=function(i){var r;t?((r=new Uint8Array(t.byteLength+i.data.byteLength)).set(t),r.set(i.data,t.byteLength),t=r):t=i.data;for(var s=t.byteLength;n<s-3;n++)if(1===t[n+2]){e=n+5;break}for(;e<s;)switch(t[e]){case 0:if(0!==t[e-1]){e+=2;break}if(0!==t[e-2]){e++;break}n+3!==e-2&&this.trigger("data",t.subarray(n+3,e-2));do{e++}while(1!==t[e]&&e<s);n=e-2,e+=3;break;case 1:if(0!==t[e-1]||0!==t[e-2]){e+=3;break}this.trigger("data",t.subarray(n+3,e-2)),n=e-2,e+=3;break;default:e+=3}t=t.subarray(n),e-=n,n=0},this.reset=function(){t=null,n=0,this.trigger("reset")},this.flush=function(){t&&t.byteLength>3&&this.trigger("data",t.subarray(n+3)),t=null,n=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}}).prototype=new lt,at={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},rt=function(){var e,t,n,i,r,s,a,o=new st;rt.prototype.init.call(this),e=this,this.push=function(e){"video"===e.type&&(t=e.trackId,n=e.pts,i=e.dts,o.push(e))},o.on("data",(function(a){var o={trackId:t,pts:n,dts:i,data:a,nalUnitTypeCode:31&a[0]};switch(o.nalUnitTypeCode){case 5:o.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:o.nalUnitType="sei_rbsp",o.escapedRBSP=r(a.subarray(1));break;case 7:o.nalUnitType="seq_parameter_set_rbsp",o.escapedRBSP=r(a.subarray(1)),o.config=s(o.escapedRBSP);break;case 8:o.nalUnitType="pic_parameter_set_rbsp";break;case 9:o.nalUnitType="access_unit_delimiter_rbsp"}e.trigger("data",o)})),o.on("done",(function(){e.trigger("done")})),o.on("partialdone",(function(){e.trigger("partialdone")})),o.on("reset",(function(){e.trigger("reset")})),o.on("endedtimeline",(function(){e.trigger("endedtimeline")})),this.flush=function(){o.flush()},this.partialFlush=function(){o.partialFlush()},this.reset=function(){o.reset()},this.endTimeline=function(){o.endTimeline()},a=function(e,t){var n,i=8,r=8;for(n=0;n<e;n++)0!==r&&(r=(i+t.readExpGolomb()+256)%256),i=0===r?i:r},r=function(e){for(var t,n,i=e.byteLength,r=[],s=1;s<i-2;)0===e[s]&&0===e[s+1]&&3===e[s+2]?(r.push(s+2),s+=2):s++;if(0===r.length)return e;t=i-r.length,n=new Uint8Array(t);var a=0;for(s=0;s<t;a++,s++)a===r[0]&&(a++,r.shift()),n[s]=e[a];return n},s=function(e){var t,n,i,r,s,o,l,c,d,u,h,p,g=0,m=0,f=0,y=0,b=[1,1];if(n=(t=new ct(e)).readUnsignedByte(),r=t.readUnsignedByte(),i=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),at[n]&&(3===(s=t.readUnsignedExpGolomb())&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(h=3!==s?8:12,p=0;p<h;p++)t.readBoolean()&&a(p<6?16:64,t);if(t.skipUnsignedExpGolomb(),0===(o=t.readUnsignedExpGolomb()))t.readUnsignedExpGolomb();else if(1===o)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),l=t.readUnsignedExpGolomb(),p=0;p<l;p++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),c=t.readUnsignedExpGolomb(),d=t.readUnsignedExpGolomb(),0===(u=t.readBits(1))&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(g=t.readUnsignedExpGolomb(),m=t.readUnsignedExpGolomb(),f=t.readUnsignedExpGolomb(),y=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(t.readUnsignedByte()){case 1:b=[1,1];break;case 2:b=[12,11];break;case 3:b=[10,11];break;case 4:b=[16,11];break;case 5:b=[40,33];break;case 6:b=[24,11];break;case 7:b=[20,11];break;case 8:b=[32,11];break;case 9:b=[80,33];break;case 10:b=[18,11];break;case 11:b=[15,11];break;case 12:b=[64,33];break;case 13:b=[160,99];break;case 14:b=[4,3];break;case 15:b=[3,2];break;case 16:b=[2,1];break;case 255:b=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()]}b&&(b[0],b[1])}return{profileIdc:n,levelIdc:i,profileCompatibility:r,width:16*(c+1)-2*g-2*m,height:(2-u)*(d+1)*16-2*f-2*y,sarRatio:b}}},rt.prototype=new lt;var dt,ut={H264Stream:rt,NalByteStream:st},ht=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],pt=function(e,t){var n=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return n=n>=0?n:0,(16&e[t+5])>>4?n+20:n+10},gt=function(e,t){return e.length-t<10||e[t]!=="I".charCodeAt(0)||e[t+1
vendor: 4,589 bytes, line 2
2]!=="D".charCodeAt(0)||e[t+2]!=="3".charCodeAt(0)?t:(t+=pt(e,t),gt(e,t))},mt=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},ft={isLikelyAacData:function(e){var t=gt(e,0);return e.length>=t+2&&255===(255&e[t])&&240===(240&e[t+1])&&16===(22&e[t+1])},parseId3TagSize:pt,parseAdtsSize:function(e,t){var n=(224&e[t+5])>>5,i=e[t+4]<<3;return 6144&e[t+3]|i|n},parseType:function(e,t){return e[t]==="I".charCodeAt(0)&&e[t+1]==="D".charCodeAt(0)&&e[t+2]==="3".charCodeAt(0)?"timed-metadata":!0&e[t]&&240===(240&e[t+1])?"audio":null},parseSampleRate:function(e){for(var t=0;t+5<e.length;){if(255===e[t]&&240===(246&e[t+1]))return ht[(60&e[t+2])>>>2];t++}return null},parseAacTimestamp:function(e){var t,n,i;t=10,64&e[5]&&(t+=4,t+=mt(e.subarray(10,14)));do{if((n=mt(e.subarray(t+4,t+8)))<1)return null;if("PRIV"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){i=e.subarray(t+10,t+n+10);for(var r=0;r<i.byteLength;r++)if(0===i[r]){var s=unescape(function(e,t,n){var i,r="";for(i=t;i<n;i++)r+="%"+("00"+e[i].toString(16)).slice(-2);return r}(i,0,r));if("com.apple.streaming.transportStreamTimestamp"===s){var a=i.subarray(r+1),o=(1&a[3])<<30|a[4]<<22|a[5]<<14|a[6]<<6|a[7]>>>2;return o*=4,o+=3&a[7]}break}}t+=10,t+=n}while(t<e.byteLength);return null}},yt=ft;(dt=function(){var e=new Uint8Array,t=0;dt.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.push=function(n){var i,r,s,a,o=0,l=0;for(e.length?(a=e.length,(e=new Uint8Array(n.byteLength+a)).set(e.subarray(0,a)),e.set(n,a)):e=n;e.length-l>=3;)if(e[l]!=="I".charCodeAt(0)||e[l+1]!=="D".charCodeAt(0)||e[l+2]!=="3".charCodeAt(0))if(255!==(255&e[l])||240!==(240&e[l+1]))l++;else{if(e.length-l<7)break;if(l+(o=yt.parseAdtsSize(e,l))>e.length)break;s={type:"audio",data:e.subarray(l,l+o),pts:t,dts:t},this.trigger("data",s),l+=o}else{if(e.length-l<10)break;if(l+(o=yt.parseId3TagSize(e,l))>e.length)break;r={type:"timed-metadata",data:e.subarray(l,l+o)},this.trigger("data",r),l+=o}i=e.length-l,e=i>0?e.subarray(l):new Uint8Array},this.reset=function(){e=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){e=new Uint8Array,this.trigger("endedtimeline")}}).prototype=new U;var bt,vt,_t,Tt,xt=U,St=Z,At=$,wt=oe,jt=ce,kt=tt,Ct=re,Ot=ot,Et=ut.H264Stream,It=dt,Pt=ft.isLikelyAacData,Rt=re.ONE_SECOND_IN_TS,Dt=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],Lt=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],Mt=function(e,t){t.stream=e,this.trigger("log",t)},Nt=function(e,t){for(var n=Object.keys(t),i=0;i<n.length;i++){var r=n[i];"headOfPipeline"!==r&&t[r].on&&t[r].on("log",Mt.bind(e,r))}},Bt=function(e,t){var n;if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0},Ut=function(e,t,n,i,r,s){return{start:{dts:e,pts:e+(n-t)},end:{dts:e+(i-t),pts:e+(r-n)},prependedContentDuration:s,baseMediaDecodeTime:e}};vt=function(e,t){var n,i=[],r=0,s=0,a=1/0;n=(t=t||{}).firstSequenceNumber||0,vt.prototype.init.call(this),this.push=function(t){jt.collectDtsInfo(e,t),e&&Dt.forEach((function(n){e[n]=t[n]})),i.push(t)},this.setEarliestDts=function(e){r=e},this.setVideoBaseMediaDecodeTime=function(e){a=e},this.setAudioAppendStart=function(e){s=e},this.flush=function(){var o,l,c,d,u,h,p;0!==i.length?(o=wt.trimAdtsFramesByEarliestDts(i,e,r),e.baseMediaDecodeTime=jt.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),p=wt.prefixWithSilence(e,o,s,a),e.samples=wt.generateSampleTable(o),c=St.mdat(wt.concatenateFrameData(o)),i=[],l=St.moof(n,[e]),d=new Uint8Array(l.byteLength+c.byteLength),n++,d.set(l),d.set(c,l.byteLength),jt.clearDtsInfo(e),u=Math.ceil(1024*Rt/e.samplerate),o.length&&(h=o.length*u,this.trigger("segmentTimingInfo",Ut(Ct.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),o[0].dts,o[0].pts,o[0].dts+h,o[0].pts+h,p||0)),this.trigger("timingInfo",{start:o[0].pts,end:o[0].pts+h})),this.trigger("data",{track:e,boxes:d}),this.trigger("done","AudioSegmentStream")):this.trigger("done","AudioSegmentStream")},this.reset=function(){jt.clearDtsInfo(e),i=[],this.trigger("reset")}},vt.prototype=new xt,bt=function(e,t){var n,i,r,s=[],a=[];n=(t=t||{}).firstSequenceNumber||0,bt.prototype.init.call(this),delete e.minPTS,this.gopCache_=[],this.push=function(t){jt.collectDtsInfo(e,t),"seq_parameter_set_rbsp"!==t.nalUnitType||i||(i=t.config,e.sps=[t.data],Lt.forEach((function(t){e[t]=i[t]}),this)),"pic_parameter_set_rbsp"!==t.nalUnitType||r||(r=t.data,e.pps=[t.data]),s.push(t)},this.flush=function(){for(var i,r,o,l,c,d,u,h,p=0;s.length&&"access_unit_delimiter_rbsp"!==s[0].nalUnitType;)s.shift();
vendor: 19,067 bytes, line 2
2if(0===s.length)return this.resetStream_(),void this.trigger("done","VideoSegmentStream");if(i=At.groupNalsIntoFrames(s),(o=At.groupFramesIntoGops(i))[0][0].keyFrame||((r=this.getGopForFusion_(s[0],e))?(p=r.duration,o.unshift(r),o.byteLength+=r.byteLength,o.nalCount+=r.nalCount,o.pts=r.pts,o.dts=r.dts,o.duration+=r.duration):o=At.extendFirstKeyFrame(o)),a.length){var g;if(!(g=t.alignGopsAtEnd?this.alignGopsAtEnd_(o):this.alignGopsAtStart_(o)))return this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),s=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");jt.clearDtsInfo(e),o=g}jt.collectDtsInfo(e,o),e.samples=At.generateSampleTable(o),c=St.mdat(At.concatenateNalData(o)),e.baseMediaDecodeTime=jt.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),this.trigger("processedGopsInfo",o.map((function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}}))),u=o[0],h=o[o.length-1],this.trigger("segmentTimingInfo",Ut(e.baseMediaDecodeTime,u.dts,u.pts,h.dts+h.duration,h.pts+h.duration,p)),this.trigger("timingInfo",{start:o[0].pts,end:o[o.length-1].pts+o[o.length-1].duration}),this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),s=[],this.trigger("baseMediaDecodeTime",e.baseMediaDecodeTime),this.trigger("timelineStartInfo",e.timelineStartInfo),l=St.moof(n,[e]),d=new Uint8Array(l.byteLength+c.byteLength),n++,d.set(l),d.set(c,l.byteLength),this.trigger("data",{track:e,boxes:d}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),s=[],this.gopCache_.length=0,a.length=0,this.trigger("reset")},this.resetStream_=function(){jt.clearDtsInfo(e),i=void 0,r=void 0},this.getGopForFusion_=function(t){var n,i,r,s,a,o=1/0;for(a=0;a<this.gopCache_.length;a++)r=(s=this.gopCache_[a]).gop,e.pps&&Bt(e.pps[0],s.pps[0])&&e.sps&&Bt(e.sps[0],s.sps[0])&&(r.dts<e.timelineStartInfo.dts||(n=t.dts-r.dts-r.duration)>=-1e4&&n<=45e3&&(!i||o>n)&&(i=s,o=n));return i?i.gop:null},this.alignGopsAtStart_=function(e){var t,n,i,r,s,o,l,c;for(s=e.byteLength,o=e.nalCount,l=e.duration,t=n=0;t<a.length&&n<e.length&&(i=a[t],r=e[n],i.pts!==r.pts);)r.pts>i.pts?t++:(n++,s-=r.byteLength,o-=r.nalCount,l-=r.duration);return 0===n?e:n===e.length?null:((c=e.slice(n)).byteLength=s,c.duration=l,c.nalCount=o,c.pts=c[0].pts,c.dts=c[0].dts,c)},this.alignGopsAtEnd_=function(e){var t,n,i,r,s,o,l;for(t=a.length-1,n=e.length-1,s=null,o=!1;t>=0&&n>=0;){if(i=a[t],r=e[n],i.pts===r.pts){o=!0;break}i.pts>r.pts?t--:(t===a.length-1&&(s=n),n--)}if(!o&&null===s)return null;if(0===(l=o?n:s))return e;var c=e.slice(l),d=c.reduce((function(e,t){return e.byteLength+=t.byteLength,e.duration+=t.duration,e.nalCount+=t.nalCount,e}),{byteLength:0,duration:0,nalCount:0});return c.byteLength=d.byteLength,c.duration=d.duration,c.nalCount=d.nalCount,c.pts=c[0].pts,c.dts=c[0].dts,c},this.alignGopsWith=function(e){a=e}},bt.prototype=new xt,Tt=function(e,t){this.numberOfTracks=0,this.metadataStream=t,"undefined"!==typeof(e=e||{}).remux?this.remuxTracks=!!e.remux:this.remuxTracks=!0,"boolean"===typeof e.keepOriginalTimestamps?this.keepOriginalTimestamps=e.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,Tt.prototype.init.call(this),this.push=function(e){return e.content||e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):(this.pendingTracks.push(e.track),this.pendingBytes+=e.boxes.byteLength,"video"===e.track.type&&(this.videoTrack=e.track,this.pendingBoxes.push(e.boxes)),void("audio"===e.track.type&&(this.audioTrack=e.track,this.pendingBoxes.unshift(e.boxes))))}},Tt.prototype=new xt,Tt.prototype.flush=function(e){var t,n,i,r,s=0,a={captions:[],captionStreams:{},metadata:[],info:{}},o=0;if(this.pendingTracks.length<this.numberOfTracks){if("VideoSegmentStream"!==e&&"AudioSegmentStream"!==e)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}if(this.videoTrack?(o=this.videoTrack.timelineStartInfo.pts,Lt.forEach((function(e){a.info[e]=this.videoTrack[e]}),this)):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,Dt.forEach((function(e){a.info[e]=this.audioTrack[e]}),this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?a.type=this.pendingTracks[0].type:a.type="combined",this.emittedTracks+=this.pendingTracks.length,i=St.initSegment(this.pendingTracks),a.initSegment=new Uint8Array(i.byteLength),a.initSegment.set(i),a.data=new Uint8Array(this.pendingBytes),r=0;r<this.pendingBoxes.length;r++)a.data.set(this.pendingBoxes[r],s),s+=this.pendingBoxes[r].byteLength;for(r=0;r<this.pendingCaptions.length;r++)(t=this.pendingCaptions[r]).startTime=Ct.metadataTsToSeconds(t.startPts,o,this.keepOriginalTimestamps),t.endTime=Ct.metadataTsToSeconds(t.endPts,o,this.keepOriginalTimestamps),a.captionStreams[t.stream]=!0,a.captions.push(t);for(r=0;r<this.pendingMetadata.length;r++)(n=this.pendingMetadata[r]).cueTime=Ct.metadataTsToSeconds(n.pts,o,this.keepOriginalTimestamps),a.metadata.push(n);for(a.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger("data",a),r=0;r<a.captions.length;r++)t=a.captions[r],this.trigger("caption",t);for(r=0;r<a.metadata.length;r++)n=a.metadata[r],this.trigger("id3Frame",n)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},Tt.prototype.setRemux=function(e){this.remuxTracks=e},(_t=function(e){var t,n,i=this,r=!0;_t.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var r={};this.transmuxPipeline_=r,r.type="aac",r.metadataStream=new kt.MetadataStream,r.aacStream=new It,r.audioTimestampRolloverStream=new kt.TimestampRolloverStream("audio"),r.timedMetadataTimestampRolloverStream=new kt.TimestampRolloverStream("timed-metadata"),r.adtsStream=new Ot,r.coalesceStream=new Tt(e,r.metadataStream),r.headOfPipeline=r.aacStream,r.aacStream.pipe(r.audioTimestampRolloverStream).pipe(r.adtsStream),r.aacStream.pipe(r.timedMetadataTimestampRolloverStream).pipe(r.metadataStream).pipe(r.coalesceStream),r.metadataStream.on("timestamp",(function(e){r.aacStream.setTimestamp(e.timeStamp)})),r.aacStream.on("data",(function(s){"timed-metadata"!==s.type&&"audio"!==s.type||r.audioSegmentStream||(n=n||{timelineStartInfo:{baseMediaDecodeTime:i.baseMediaDecodeTime},codec:"adts",type:"audio"},r.coalesceStream.numberOfTracks++,r.audioSegmentStream=new vt(n,e),r.audioSegmentStream.on("log",i.getLogTrigger_("audioSegmentStream")),r.audioSegmentStream.on("timingInfo",i.trigger.bind(i,"audioTimingInfo")),r.adtsStream.pipe(r.audioSegmentStream).pipe(r.coalesceStream),i.trigger("trackinfo",{hasAudio:!!n,hasVideo:!!t}))})),r.coalesceStream.on("data",this.trigger.bind(this,"data")),r.coalesceStream.on("done",this.trigger.bind(this,"done")),Nt(this,r)},this.setupTsPipeline=function(){var r={};this.transmuxPipeline_=r,r.type="ts",r.metadataStream=new kt.MetadataStream,r.packetStream=new kt.TransportPacketStream,r.parseStream=new kt.TransportParseStream,r.elementaryStream=new kt.ElementaryStream,r.timestampRolloverStream=new kt.TimestampRolloverStream,r.adtsStream=new Ot,r.h264Stream=new Et,r.captionStream=new kt.CaptionStream(e),r.coalesceStream=new Tt(e,r.metadataStream),r.headOfPipeline=r.packetStream,r.packetStream.pipe(r.parseStream).pipe(r.elementaryStream).pipe(r.timestampRolloverStream),r.timestampRolloverStream.pipe(r.h264Stream),r.timestampRolloverStream.pipe(r.adtsStream),r.timestampRolloverStream.pipe(r.metadataStream).pipe(r.coalesceStream),r.h264Stream.pipe(r.captionStream).pipe(r.coalesceStream),r.elementaryStream.on("data",(function(s){var a;if("metadata"===s.type){for(a=s.tracks.length;a--;)t||"video"!==s.tracks[a].type?n||"audio"!==s.tracks[a].type||((n=s.tracks[a]).timelineStartInfo.baseMediaDecodeTime=i.baseMediaDecodeTime):(t=s.tracks[a]).timelineStartInfo.baseMediaDecodeTime=i.baseMediaDecodeTime;t&&!r.videoSegmentStream&&(r.coalesceStream.numberOfTracks++,r.videoSegmentStream=new bt(t,e),r.videoSegmentStream.on("log",i.getLogTrigger_("videoSegmentStream")),r.videoSegmentStream.on("timelineStartInfo",(function(t){n&&!e.keepOriginalTimestamps&&(n.timelineStartInfo=t,r.audioSegmentStream.setEarliestDts(t.dts-i.baseMediaDecodeTime))})),r.videoSegmentStream.on("processedGopsInfo",i.trigger.bind(i,"gopInfo")),r.videoSegmentStream.on("segmentTimingInfo",i.trigger.bind(i,"videoSegmentTimingInfo")),r.videoSegmentStream.on("baseMediaDecodeTime",(function(e){n&&r.audioSegmentStream.setVideoBaseMediaDecodeTime(e)})),r.videoSegmentStream.on("timingInfo",i.trigger.bind(i,"videoTimingInfo")),r.h264Stream.pipe(r.videoSegmentStream).pipe(r.coalesceStream)),n&&!r.audioSegmentStream&&(r.coalesceStream.numberOfTracks++,r.audioSegmentStream=new vt(n,e),r.audioSegmentStream.on("log",i.getLogTrigger_("audioSegmentStream")),r.audioSegmentStream.on("timingInfo",i.trigger.bind(i,"audioTimingInfo")),r.audioSegmentStream.on("segmentTimingInfo",i.trigger.bind(i,"audioSegmentTimingInfo")),r.adtsStream.pipe(r.audioSegmentStream).pipe(r.coalesceStream)),i.trigger("trackinfo",{hasAudio:!!n,hasVideo:!!t})}})),r.coalesceStream.on("data",this.trigger.bind(this,"data")),r.coalesceStream.on("id3Frame",(function(e){e.dispatchType=r.metadataStream.dispatchType,i.trigger("id3Frame",e)})),r.coalesceStream.on("caption",this.trigger.bind(this,"caption")),r.coalesceStream.on("done",this.trigger.bind(this,"done")),Nt(this,r)},this.setBaseMediaDecodeTime=function(i){var r=this.transmuxPipeline_;e.keepOriginalTimestamps||(this.baseMediaDecodeTime=i),n&&(n.timelineStartInfo.dts=void 0,n.timelineStartInfo.pts=void 0,jt.clearDtsInfo(n),r.audioTimestampRolloverStream&&r.audioTimestampRolloverStream.discontinuity()),t&&(r.videoSegmentStream&&(r.videoSegmentStream.gopCache_=[]),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,jt.clearDtsInfo(t),r.captionStream.reset()),r.timestampRolloverStream&&r.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){n&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.setRemux=function(t){var n=this.transmuxPipeline_;e.remux=t,n&&n.coalesceStream&&n.coalesceStream.setRemux(t)},this.alignGopsWith=function(e){t&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.getLogTrigger_=function(e){var t=this;return function(n){n.stream=e,t.trigger("log",n)}},this.push=function(e){if(r){var t=Pt(e);t&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),r=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){r=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=new xt;var Ft,qt,zt={Transmuxer:_t,VideoSegmentStream:bt,AudioSegmentStream:vt,AUDIO_PROPERTIES:Dt,VIDEO_PROPERTIES:Lt,generateSegmentTimingInfo:Ut},Vt=function(e){return e>>>0},Ht=function(e){return("00"+e.toString(16)).slice(-2)},Wt=function(e){var t="";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])},Gt=Vt,Xt=Wt,Yt=function(e,t){var n,i,r,s,a,o=[];if(!t.length)return null;for(n=0;n<e.byteLength;)i=Gt(e[n]<<24|e[n+1]<<16|e[n+2]<<8|e[n+3]),r=Xt(e.subarray(n+4,n+8)),s=i>1?n+i:e.byteLength,r===t[0]&&(1===t.length?o.push(e.subarray(n+8,s)):(a=Yt(e.subarray(n+8,s),t.slice(1))).length&&(o=o.concat(a))),n=s;return o},Qt=Yt,Kt=Vt,Zt=q.getUint64,Jt=function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4))};return 1===t.version?t.baseMediaDecodeTime=Zt(e.subarray(4)):t.baseMediaDecodeTime=Kt(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),t},$t=function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:n.getUint32(4)},r=1&i.flags[2],s=2&i.flags[2],a=8&i.flags[2],o=16&i.flags[2],l=32&i.flags[2],c=65536&i.flags[0],d=131072&i.flags[0];return t=8,r&&(t+=4,i.baseDataOffset=n.getUint32(12),t+=4),s&&(i.sampleDescriptionIndex=n.getUint32(t),t+=4),a&&(i.defaultSampleDuration=n.getUint32(t),t+=4),o&&(i.defaultSampleSize=n.getUint32(t),t+=4),l&&(i.defaultSampleFlags=n.getUint32(t)),c&&(i.durationIsEmpty=!0),!r&&d&&(i.baseDataOffsetIsMoof=!0),i},en=q.getUint64,tn=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}},nn=function(e){var t,n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},i=new DataView(e.buffer,e.byteOffset,e.byteLength),r=1&n.flags[2],s=4&n.flags[2],a=1&n.flags[1],o=2&n.flags[1],l=4&n.flags[1],c=8&n.flags[1],d=i.getUint32(4),u=8;for(r&&(n.dataOffset=i.getInt32(u),u+=4),s&&d&&(t={flags:tn(e.subarray(u,u+4))},u+=4,a&&(t.duration=i.getUint32(u),u+=4),o&&(t.size=i.getUint32(u),u+=4),c&&(1===n.version?t.compositionTimeOffset=i.getInt32(u):t.compositionTimeOffset=i.getUint32(u),u+=4),n.samples.push(t),d--);d--;)t={},a&&(t.duration=i.getUint32(u),u+=4),o&&(t.size=i.getUint32(u),u+=4),l&&(t.flags=tn(e.subarray(u,u+4)),u+=4),c&&(1===n.version?t.compositionTimeOffset=i.getInt32(u):t.compositionTimeOffset=i.getUint32(u),u+=4),n.samples.push(t);return n},rn=q.getUint64,sn=function(e){return new Date(1e3*e-20828448e5)},an=Wt,on=function(e){var t,n,i=new DataView(e.buffer,e.byteOffset,e.byteLength),r=[];for(t=0;t+4<e.length;t+=n)if(n=i.getUint32(t),t+=4,n<=0)r.push("<span style='color:red;'>MALFORMED DATA</span>");else switch(31&e[t]){case 1:r.push("slice_layer_without_partitioning_rbsp");break;case 5:r.push("slice_layer_without_partitioning_rbsp_idr");break;case 6:r.push("sei_rbsp");break;case 7:r.push("seq_parameter_set_rbsp");break;case 8:r.push("pic_parameter_set_rbsp");break;case 9:r.push("access_unit_delimiter_rbsp");break;default:r.push("UNKNOWN NAL - "+e[t]&31)}return r},ln={avc1:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{dataReferenceIndex:t.getUint16(6),width:t.getUint16(24),height:t.getUint16(26),horizresolution:t.getUint16(28)+t.getUint16(30)/16,vertresolution:t.getUint16(32)+t.getUint16(34)/16,frameCount:t.getUint16(40),depth:t.getUint16(74),config:Ft(e.subarray(78,e.byteLength))}},avcC:function(e){var t,n,i,r,s=new DataView(e.buffer,e.byteOffset,e.byteLength),a={configurationVersion:e[0],avcProfileIndication:e[1],profileCompatibility:e[2],avcLevelIndication:e[3],lengthSizeMinusOne:3&e[4],sps:[],pps:[]},o=31&e[5];for(i=6,r=0;r<o;r++)n=s.getUint16(i),i+=2,a.sps.push(new Uint8Array(e.subarray(i,i+n))),i+=n;for(t=e[i],i++,r=0;r<t;r++)n=s.getUint16(i),i+=2,a.pps.push(new Uint8Array(e.subarray(i,i+n))),i+=n;return a},btrt:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{bufferSizeDB:t.getUint32(0),maxBitrate:t.getUint32(4),avgBitrate:t.getUint32(8)}},edts:function(e){return{boxes:Ft(e)}},elst:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:n.getUint8(0),flags:new Uint8Array(e.subarray(1,4)),edits:[]},r=n.getUint32(4);for(t=8;r;r--)0===i.version?(i.edits.push({segmentDuration:n.getUint32(t),mediaTime:n.getInt32(t+4),mediaRate:n.getUint16(t+8)+n.getUint16(t+10)/65536}),t+=12):(i.edits.push({segmentDuration:rn(e.subarray(t)),mediaTime:rn(e.subarray(t+8)),mediaRate:n.getUint16(t+16)+n.getUint16(t+18)/65536}),t+=20);return i},esds:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),esId:e[6]<<8|e[7],streamPriority:31&e[8],decoderConfig:{objectProfileIndication:e[11],streamType:e[12]>>>2&63,bufferSize:e[13]<<16|e[14]<<8|e[15],maxBitrate:e[16]<<24|e[17]<<16|e[18]<<8|e[19],avgBitrate:e[20]<<24|e[21]<<16|e[22]<<8|e[23],decoderConfigDescriptor:{tag:e[24],length:e[25],audioObjectType:e[26]>>>3&31,samplingFrequencyIndex:(7&e[26])<<1|e[27]>>>7&1,channelConfiguration:e[27]>>>3&15}}}},ftyp:function(e){for(var t=new DataView(e.buffer,e.byteOffset,e.byteLength),n={majorBrand:an(e.subarray(0,4)),minorVersion:t.getUint32(4),compatibleBrands:[]},i=8;i<e.byteLength;)n.compatibleBrands.push(an(e.subarray(i,i+4))),i+=4;return n},dinf:function(e){return{boxes:Ft(e)}},dref:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),dataReferences:Ft(e.subarray(8))}},hdlr:function(e){var t={version:new DataView(e.buffer,e.byteOffset,e.byteLength).getUint8(0),flags:new Uint8Array(e.subarray(1,4)),handlerType:an(e.subarray(8,12)),name:""},n=8;for(n=24;n<e.byteLength;n++){if(0===e[n]){n++;break}t.name+=String.fromCharCode(e[n])}return t.name=decodeURIComponent(escape(t.name)),t},mdat:function(e){return{byteLength:e.byteLength,nals:on(e)}},mdhd:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i=4,r={version:n.getUint8(0),flags:new Uint8Array(e.subarray(1,4)),language:""};return 1===r.version?(i+=4,r.creationTime=sn(n.getUint32(i)),i+=8,r.modificationTime=sn(n.getUint32(i)),i+=4,r.timescale=n.getUint32(i),i+=8,r.duration=n.getUint32(i)):(r.creationTime=sn(n.getUint32(i)),i+=4,r.modificationTime=sn(n.getUint32(i)),i+=4,r.timescale=n.getUint32(i),i+=4,r.duration=n.getUint32(i)),i+=4,t=n.getUint16(i),r.language+=String.fromCharCode(96+(t>>10)),r.language+=String.fromCharCode(96+((992&t)>>5)),r.language+=String.fromCharCode(96+(31&t)),r},mdia:function(e){return{boxes:Ft(e)}},mfhd:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),sequenceNumber:e[4]<<24|e[5]<<16|e[6]<<8|e[7]}},minf:function(e){return{boxes:Ft(e)}},mp4a:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),n={dataReferenceIndex:t.getUint16(6),channelcount:t.getUint16(16),samplesize:t.getUint16(18),samplerate:t.getUint16(24)+t.getUint16(26)/65536};return e.byteLength>28&&(n.streamDescriptor=Ft(e.subarray(28))[0]),n},moof:function(e){return{boxes:Ft(e)}},moov:function(e){return{boxes:Ft(e)}},mvex:function(e){return{boxes:Ft(e)}},mvhd:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),n=4,i={version:t.getUint8(0),flags:new Uint8Array(e.subarray(1,4))};return 1===i.version?(n+=4,i.creationTime=sn(t.getUint32(n)),n+=8,i.modificationTime=sn(t.getUint32(n)),n+=4,i.timescale=t.getUint32(n),n+=8,i.duration=t.getUint32(n)):(i.creationTime=sn(t.getUint32(n)),n+=4,i.modificationTime=sn(t.getUint32(n)),n+=4,i.timescale=t.getUint32(n),n+=4,i.duration=t.getUint32(n)),n+=4,i.rate=t.getUint16(n)+t.getUint16(n+2)/16,n+=4,i.volume=t.getUint8(n)+t.getUint8(n+1)/8,n+=2,
vendor: 4,274 bytes, line 2
2n+=2,n+=8,i.matrix=new Uint32Array(e.subarray(n,n+36)),n+=36,n+=24,i.nextTrackId=t.getUint32(n),i},pdin:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{version:t.getUint8(0),flags:new Uint8Array(e.subarray(1,4)),rate:t.getUint32(4),initialDelay:t.getUint32(8)}},sdtp:function(e){var t,n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]};for(t=4;t<e.byteLength;t++)n.samples.push({dependsOn:(48&e[t])>>4,isDependedOn:(12&e[t])>>2,hasRedundancy:3&e[t]});return n},sidx:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},i=12;0===n.version?(n.earliestPresentationTime=t.getUint32(i),n.firstOffset=t.getUint32(i+4),i+=8):(n.earliestPresentationTime=en(e.subarray(i)),n.firstOffset=en(e.subarray(i+8)),i+=16),i+=2;var r=t.getUint16(i);for(i+=2;r>0;i+=12,r--)n.references.push({referenceType:(128&e[i])>>>7,referencedSize:2147483647&t.getUint32(i),subsegmentDuration:t.getUint32(i+4),startsWithSap:!!(128&e[i+8]),sapType:(112&e[i+8])>>>4,sapDeltaTime:268435455&t.getUint32(i+8)});return n},smhd:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),balance:e[4]+e[5]/256}},stbl:function(e){return{boxes:Ft(e)}},ctts:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:n.getUint8(0),flags:new Uint8Array(e.subarray(1,4)),compositionOffsets:[]},r=n.getUint32(4);for(t=8;r;t+=8,r--)i.compositionOffsets.push({sampleCount:n.getUint32(t),sampleOffset:n[0===i.version?"getUint32":"getInt32"](t+4)});return i},stss:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:n.getUint8(0),flags:new Uint8Array(e.subarray(1,4)),syncSamples:[]},r=n.getUint32(4);for(t=8;r;t+=4,r--)i.syncSamples.push(n.getUint32(t));return i},stco:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),chunkOffsets:[]},r=n.getUint32(4);for(t=8;r;t+=4,r--)i.chunkOffsets.push(n.getUint32(t));return i},stsc:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i=n.getUint32(4),r={version:e[0],flags:new Uint8Array(e.subarray(1,4)),sampleToChunks:[]};for(t=8;i;t+=12,i--)r.sampleToChunks.push({firstChunk:n.getUint32(t),samplesPerChunk:n.getUint32(t+4),sampleDescriptionIndex:n.getUint32(t+8)});return r},stsd:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),sampleDescriptions:Ft(e.subarray(8))}},stsz:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),sampleSize:n.getUint32(4),entries:[]};for(t=12;t<e.byteLength;t+=4)i.entries.push(n.getUint32(t));return i},stts:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),timeToSamples:[]},r=n.getUint32(4);for(t=8;r;t+=8,r--)i.timeToSamples.push({sampleCount:n.getUint32(t),sampleDelta:n.getUint32(t+4)});return i},styp:function(e){return ln.ftyp(e)},tfdt:Jt,tfhd:$t,tkhd:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),n=4,i={version:t.getUint8(0),flags:new Uint8Array(e.subarray(1,4))};return 1===i.version?(n+=4,i.creationTime=sn(t.getUint32(n)),n+=8,i.modificationTime=sn(t.getUint32(n)),n+=4,i.trackId=t.getUint32(n),n+=4,n+=8,i.duration=t.getUint32(n)):(i.creationTime=sn(t.getUint32(n)),n+=4,i.modificationTime=sn(t.getUint32(n)),n+=4,i.trackId=t.getUint32(n),n+=4,n+=4,i.duration=t.getUint32(n)),n+=4,n+=8,i.layer=t.getUint16(n),n+=2,i.alternateGroup=t.getUint16(n),n+=2,i.volume=t.getUint8(n)+t.getUint8(n+1)/8,n+=2,n+=2,i.matrix=new Uint32Array(e.subarray(n,n+36)),n+=36,i.width=t.getUint16(n)+t.getUint16(n+2)/65536,n+=4,i.height=t.getUint16(n)+t.getUint16(n+2)/65536,i},traf:function(e){return{boxes:Ft(e)}},trak:function(e){return{boxes:Ft(e)}},trex:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:t.getUint32(4),defaultSampleDescriptionIndex:t.getUint32(8),defaultSampleDuration:t.getUint32(12),defaultSampleSize:t.getUint32(16),sampleDependsOn:3&e[20],sampleIsDependedOn:(192&e[21])>>6,sampleHasRedundancy:(48&e[21])>>4,samplePaddingValue:(14&e[21])>>
vendor: 7,905 bytes, line 2
21,sampleIsDifferenceSample:!!(1&e[21]),sampleDegradationPriority:t.getUint16(22)}},trun:nn,"url ":function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4))}},vmhd:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),graphicsmode:t.getUint16(4),opcolor:new Uint16Array([t.getUint16(6),t.getUint16(8),t.getUint16(10)])}}};Ft=function(e){for(var t,n,i,r,s,a=0,o=[],l=new ArrayBuffer(e.length),c=new Uint8Array(l),d=0;d<e.length;++d)c[d]=e[d];for(t=new DataView(l);a<e.byteLength;)n=t.getUint32(a),i=an(e.subarray(a+4,a+8)),r=n>1?a+n:e.byteLength,(s=(ln[i]||function(e){return{data:e}})(e.subarray(a+8,r))).size=n,s.type=i,o.push(s),a=r;return o},qt=function(e,t){var n;return t=t||0,n=new Array(2*t+1).join(" "),e.map((function(e,i){return n+e.type+"\n"+Object.keys(e).filter((function(e){return"type"!==e&&"boxes"!==e})).map((function(t){var i=n+" "+t+": ",r=e[t];if(r instanceof Uint8Array||r instanceof Uint32Array){var s=Array.prototype.slice.call(new Uint8Array(r.buffer,r.byteOffset,r.byteLength)).map((function(e){return" "+("00"+e.toString(16)).slice(-2)})).join("").match(/.{1,24}/g);return s?1===s.length?i+"<"+s.join("").slice(1)+">":i+"<\n"+s.map((function(e){return n+" "+e})).join("\n")+"\n"+n+" >":i+"<>"}return i+JSON.stringify(r,null,2).split("\n").map((function(e,t){return 0===t?e:n+" "+e})).join("\n")})).join("\n")+(e.boxes?"\n"+qt(e.boxes,t+1):"")})).join("\n")};var cn,dn,un,hn,pn,gn,mn,fn={inspect:Ft,textify:qt,parseType:an,findBox:Qt,parseTraf:ln.traf,parseTfdt:ln.tfdt,parseHdlr:ln.hdlr,parseTfhd:ln.tfhd,parseTrun:ln.trun,parseSidx:ln.sidx},yn=function(e){for(var t=0,n=String.fromCharCode(e[t]),i="";"\0"!==n;)i+=n,t++,n=String.fromCharCode(e[t]);return i+=n},bn=q.getUint64,vn=function(e,t){var n="\0"!==t.scheme_id_uri,i=0===e&&_n(t.presentation_time_delta)&&n,r=1===e&&_n(t.presentation_time)&&n;return!(e>1)&&i||r},_n=function(e){return void 0!==e||null!==e},Tn={parseEmsgBox:function(e){var t,n,i,r,s,a,o,l=4,c=e[0];if(0===c)l+=(t=yn(e.subarray(l))).length,l+=(n=yn(e.subarray(l))).length,i=(d=new DataView(e.buffer)).getUint32(l),l+=4,s=d.getUint32(l),l+=4,a=d.getUint32(l),l+=4,o=d.getUint32(l),l+=4;else if(1===c){var d;i=(d=new DataView(e.buffer)).getUint32(l),l+=4,r=bn(e.subarray(l)),l+=8,a=d.getUint32(l),l+=4,o=d.getUint32(l),l+=4,l+=(t=yn(e.subarray(l))).length,l+=(n=yn(e.subarray(l))).length}var u={scheme_id_uri:t,value:n,timescale:i||1,presentation_time:r,presentation_time_delta:s,event_duration:a,id:o,message_data:new Uint8Array(e.subarray(l,e.byteLength))};return vn(c,u)?u:void 0},scaleTime:function(e,t,n,i){return e||0===e?e/t:i+n/t}},xn="undefined"!==typeof window?window:"undefined"!==typeof t?t:"undefined"!==typeof self?self:{},Sn=Vt,An=Ht,wn=Qt,jn=Wt,kn=Tn,Cn=$t,On=nn,En=Jt,In=q.getUint64,Pn=xn,Rn=Fe.parseId3Frames;cn=function(e){return wn(e,["moov","trak"]).reduce((function(e,t){var n,i,r,s,a;return(n=wn(t,["tkhd"])[0])?(i=n[0],s=Sn(n[r=0===i?12:20]<<24|n[r+1]<<16|n[r+2]<<8|n[r+3]),(a=wn(t,["mdia","mdhd"])[0])?(r=0===(i=a[0])?12:20,e[s]=Sn(a[r]<<24|a[r+1]<<16|a[r+2]<<8|a[r+3]),e):null):null}),{})},dn=function(e,t){var n=wn(t,["moof","traf"]).reduce((function(t,n){var i,r=wn(n,["tfhd"])[0],s=Sn(r[4]<<24|r[5]<<16|r[6]<<8|r[7]),a=e[s]||9e4,o=wn(n,["tfdt"])[0],l=new DataView(o.buffer,o.byteOffset,o.byteLength);let c;return"bigint"===typeof(i=1===o[0]?In(o.subarray(4,12)):l.getUint32(4))?c=i/Pn.BigInt(a):"number"!==typeof i||isNaN(i)||(c=i/a),c<Number.MAX_SAFE_INTEGER&&(c=Number(c)),c<t&&(t=c),t}),1/0);return"bigint"===typeof n||isFinite(n)?n:0},un=function(e,t){var n,i=wn(t,["moof","traf"]),r=0,s=0;if(i&&i.length){var a=wn(i[0],["tfhd"])[0],o=wn(i[0],["trun"])[0],l=wn(i[0],["tfdt"])[0];if(a)n=Cn(a).trackId;if(l)r=En(l).baseMediaDecodeTime;if(o){var c=On(o);c.samples&&c.samples.length&&(s=c.samples[0].compositionTimeOffset||0)}}var d=e[n]||9e4;"bigint"===typeof r&&(s=Pn.BigInt(s),d=Pn.BigInt(d));var u=(r+s)/d;return"bigint"===typeof u&&u<Number.MAX_SAFE_INTEGER&&(u=Number(u)),u},hn=function(e){var t=wn(e,["moov","trak"]),n=[];return t.forEach((function(e){var t=wn(e,["mdia","hdlr"]),i=wn(e,["tkhd"]);t.forEach((function(e,t){var r,s,a=jn(e.subarray(8,12)),o=i[t];"vide"===a&&(s=0===(r=new DataView(o.buffer,o.byteOffset,o.byteLength)).getUint8(0)?r.getUint32(12):r.getUint32(20),n.push(s))}))})),n},gn=function(e){var t=0===e[0]?12:20;return Sn(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])},pn=function(e){var t=wn(e,["moov","trak"]),n=[];return t.forEach((function(e){var t,i,r={},s=wn(e,["tkhd"])[0];s&&(i=(t=new DataView(s.buffer,s.byteOffset,s.byteLength)).getUint8(0),r.id=0===i?t.getUint32(12):t.getUint32(20));var a=wn(e,["mdia","hdlr"])[0];if(a){var o=jn(a.subarray(8,12));r.type="vide"===o?"video":"soun"===o?"audio":o}var l=wn(e,["mdia","minf","stbl","stsd"])[0];if(l){var c=l.subarray(8);r.codec=jn(c.subarray(4,8));var d,u=wn(c,[r.codec])[0];u&&(/^[asm]vc[1-9]$/i.test(r.codec)?(d=u.subarray(78),"avcC"===jn(d.subarray(4,8))&&d.length>11?(r.codec+=".",r.codec+=An(d[9]),r.codec+=An(d[10]),r.codec+=An(d[11])):r.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(r.codec)?(d=u.subarray(28),"esds"===jn(d.subarray(4,8))&&d.length>20&&0!==d[19]?(r.codec+="."+An(d[19]),r.codec+="."+An(d[20]>>>2&63).replace(/^0/,"")):r.codec="mp4a.40.2"):r.codec=r.codec.toLowerCase())}var h=wn(e,["mdia","mdhd"])[0];h&&(r.timescale=gn(h)),n.push(r)})),n},mn=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return wn(e,["emsg"]).map((e=>{var n=kn.parseEmsgBox(new Uint8Array(e)),i=Rn(n.message_data);return{cueTime:kn.scaleTime(n.presentation_time,n.timescale,n.presentation_time_delta,t),duration:kn.scaleTime(n.event_duration,n.timescale),frames:i}}))};var Dn={findBox:wn,parseType:jn,timescale:cn,startTime:dn,compositionStartTime:un,videoTrackIds:hn,tracks:pn,getTimescaleFromMediaHeader:gn,getEmsgID3:mn};const{parseTrun:Ln}=fn,{findBox:Mn}=Dn;var Nn=xn,Bn={getMdatTrafPairs:function(e){var t=Mn(e,["moof","traf"]),n=Mn(e,["mdat"]),i=[];return n.forEach((function(e,n){var r=t[n];i.push({mdat:e,traf:r})})),i},parseSamples:function(e,t,n){var i=t,r=n.defaultSampleDuration||0,s=n.defaultSampleSize||0,a=n.trackId,o=[];return e.forEach((function(e){var t=Ln(e).samples;t.forEach((function(e){void 0===e.duration&&(e.duration=r),void 0===e.size&&(e.size=s),e.trackId=a,e.dts=i,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),"bigint"===typeof i?(e.pts=i+Nn.BigInt(e.compositionTimeOffset),i+=Nn.BigInt(e.duration)):(e.pts=i+e.compositionTimeOffset,i+=e.duration)})),o=o.concat(t)})),o}},Un=de.discardEmulationPreventionBytes,Fn=Ae.CaptionStream,qn=Qt,zn=Jt,Vn=$t,{getMdatTrafPairs:Hn,parseSamples:Wn}=Bn,Gn=function(e,t){for(var n=e,i=0;i<t.length;i++){var r=t[i];if(n<r.size)return r;n-=r.size}return null},Xn=function(e,t){var n={};return Hn(e).forEach((function(e){var i,r=e.mdat,s=e.traf,a=qn(s,["tfhd"]),o=Vn(a[0]),l=o.trackId,c=qn(s,["tfdt"]),d=c.length>0?zn(c[0]).baseMediaDecodeTime:0,u=qn(s,["trun"]);t===l&&u.length>0&&(i=function(e,t,n){var i,r,s,a,o=new DataView(e.buffer,e.byteOffset,e.byteLength),l={logs:[],seiNals:[]};for(r=0;r+4<e.length;r+=s)if(s=o.getUint32(r),r+=4,!(s<=0))switch(31&e[r]){case 6:var c=e.subarray(r+1,r+1+s),d=Gn(r,t);if(i={nalUnitType:"sei_rbsp",size:s,data:c,escapedRBSP:Un(c),trackId:n},d)i.pts=d.pts,i.dts=d.dts,a=d;else{if(!a){l.logs.push({level:"warn",message:"We've encountered a nal unit without data at "+r+" for trackId "+n+". See mux.js#223."});break}i.pts=a.pts,i.dts=a.dts}l.seiNals.push(i)}return l}(r,Wn(u,d,o),l),n[l]||(n[l]={seiNals:[],logs:[]}),n[l].seiNals=n[l].seiNals.concat(i.seiNals),n[l].logs=n[l].logs.concat(i.logs))})),n},Yn=function(){var e,t,n,i,r,s,a=!1;this.isInitialized=function(){return a},this.init=function(t){e=new Fn,a=!0,s=!!t&&t.isPartial,e.on("data",(function(e){e.startTime=e.startPts/i,e.endTime=e.endPts/i,r.captions.push(e),r.captionStream
vendor: 6,040 bytes, line 2
2s[e.stream]=!0})),e.on("log",(function(e){r.logs.push(e)}))},this.isNewInit=function(e,t){return!(e&&0===e.length||t&&"object"===typeof t&&0===Object.keys(t).length)&&(n!==e[0]||i!==t[n])},this.parse=function(e,s,a){var o;if(!this.isInitialized())return null;if(!s||!a)return null;if(this.isNewInit(s,a))n=s[0],i=a[n];else if(null===n||!i)return t.push(e),null;for(;t.length>0;){var l=t.shift();this.parse(l,s,a)}return o=function(e,t,n){if(null===t)return null;var i=Xn(e,t)[t]||{};return{seiNals:i.seiNals,logs:i.logs,timescale:n}}(e,n,i),o&&o.logs&&(r.logs=r.logs.concat(o.logs)),null!==o&&o.seiNals?(this.pushNals(o.seiNals),this.flushStream(),r):r.logs.length?{logs:r.logs,captions:[],captionStreams:[]}:null},this.pushNals=function(t){if(!this.isInitialized()||!t||0===t.length)return null;t.forEach((function(t){e.push(t)}))},this.flushStream=function(){if(!this.isInitialized())return null;s?e.partialFlush():e.flush()},this.clearParsedCaptions=function(){r.captions=[],r.captionStreams={},r.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){t=[],n=null,i=null,r?this.clearParsedCaptions():r={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()};const{parseTfdt:Qn}=fn,Kn=Qt,{getTimescaleFromMediaHeader:Zn}=Dn,{parseSamples:Jn,getMdatTrafPairs:$n}=Bn;var ei=function(){let e=9e4;this.init=function(t){const n=Kn(t,["moov","trak","mdia","mdhd"])[0];n&&(e=Zn(n))},this.parseSegment=function(t){const n=[],i=$n(t);let r=0;return i.forEach((function(t){const i=t.mdat,s=t.traf,a=Kn(s,["tfdt"])[0],o=Kn(s,["tfhd"])[0],l=Kn(s,["trun"]);if(a){const e=Qn(a);r=e.baseMediaDecodeTime}if(l.length&&o){const t=Jn(l,r,o);let s=0;t.forEach((function(t){const r=new TextDecoder("utf-8"),a=i.slice(s,s+t.size);if(Kn(a,["vtte"])[0])return void(s+=t.size);Kn(a,["vttc"]).forEach((function(i){const s=Kn(i,["payl"])[0],a=Kn(i,["sttg"])[0],o=t.pts/e,l=(t.pts+t.duration)/e;let c,d;if(s)try{c=r.decode(s)}catch(u){console.error(u)}if(a)try{d=r.decode(a)}catch(u){console.error(u)}t.duration&&c&&n.push({cueText:c,start:o,end:l,settings:d})})),s+=t.size}))}})),n}},ti=we,ni=function(e){var t=31&e[1];return t<<=8,t|=e[2]},ii=function(e){return!!(64&e[1])},ri=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},si=function(e){switch(e){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}},ai={parseType:function(e,t){var n=ni(e);return 0===n?"pat":n===t?"pmt":t?"pes":null},parsePat:function(e){var t=ii(e),n=4+ri(e);return t&&(n+=e[n]+1),(31&e[n+10])<<8|e[n+11]},parsePmt:function(e){var t={},n=ii(e),i=4+ri(e);if(n&&(i+=e[i]+1),1&e[i+5]){var r;r=3+((15&e[i+1])<<8|e[i+2])-4;for(var s=12+((15&e[i+10])<<8|e[i+11]);s<r;){var a=i+s;t[(31&e[a+1])<<8|e[a+2]]=e[a],s+=5+((15&e[a+3])<<8|e[a+4])}return t}},parsePayloadUnitStartIndicator:ii,parsePesType:function(e,t){switch(t[ni(e)]){case ti.H264_STREAM_TYPE:return"video";case ti.ADTS_STREAM_TYPE:return"audio";case ti.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},parsePesTime:function(e){if(!ii(e))return null;var t=4+ri(e);if(t>=e.byteLength)return null;var n,i=null;return 192&(n=e[t+7])&&((i={}).pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,i.pts*=4,i.pts+=(6&e[t+13])>>>1,i.dts=i.pts,64&n&&(i.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,i.dts*=4,i.dts+=(6&e[t+18])>>>1)),i},videoPacketContainsKeyFrame:function(e){for(var t=4+ri(e),n=e.subarray(t),i=0,r=0,s=!1;r<n.byteLength-3;r++)if(1===n[r+2]){i=r+5;break}for(;i<n.byteLength;)switch(n[i]){case 0:if(0!==n[i-1]){i+=2;break}if(0!==n[i-2]){i++;break}r+3!==i-2&&"slice_layer_without_partitioning_rbsp_idr"===si(31&n[r+3])&&(s=!0);do{i++}while(1!==n[i]&&i<n.length);r=i-2,i+=3;break;case 1:if(0!==n[i-1]||0!==n[i-2]){i+=3;break}"slice_layer_without_partitioning_rbsp_idr"===si(31&n[r+3])&&(s=!0),r=i-2,i+=3;break;default:i+=3}return n=n.subarray(r),i-=r,r=0,n&&n.byteLength>3&&"slice_layer_without_partitioning_rbsp_idr"===si(31&n[r+3])&&(s=!0),s}},oi=we,li=Ie.handleRollover,ci={};ci.ts=ai,ci.aac=ft;var di=re.ONE_SECOND_IN_TS,ui=188,hi=71,pi=function(e,t,n){for(var i,r,s,a,o=0,l=ui,c=!1;l<=e.byteLength;)if(e[o]!==hi||e[l]!==hi&&l!==e.byteLength)o++,l++;else{if(i=e.subarray(o,l),"pes"===ci.ts.parseType(i,t.pid))r=ci.ts.parsePesType(i,t.table),s=ci.ts.parsePayloadUnitStartIndicator(i),"audio"===r&&s&&(a=ci.ts.parsePesTime(i))&&(a.type="audio",n.audio.push(a),c=!0);if(c)break;o+=ui,l+=ui}for(o=(l=e.byteLength)-ui,c=!1;o>=0;)if(e[o]!==hi||e[l]!==hi&&l!==e.byteLength)o--,l--;else{if(i=e.subarray(o,l),"pes"===ci.ts.parseType(i,t.pid))r=ci.ts.parsePesType(i,t.table),s=ci.ts.parsePayloadUnitStartIndicator(i),"audio"===r&&s&&(a=ci.ts.parsePesTime(i))&&(a.type="audio",n.audio.push(a),c=!0);if(c)break;o-=ui,l-=ui}},gi=function(e,t,n){for(var i,r,s,a,o,l,c,d=0,u=ui,h=!1,p={data:[],size:0};u<e.byteLength;)if(e[d]!==hi||e[u]!==hi)d++,u++;else{if(i=e.subarray(d,u),"pes"===ci.ts.parseType(i,t.pid))if(r=ci.ts.parsePesType(i,t.table),s=ci.ts.parsePayloadUnitStartIndicator(i),"video"===r&&(s&&!h&&(a=ci.ts.parsePesTime(i))&&(a.type="video",n.video.push(a),h=!0),!n.firstKeyFrame)){if(s&&0!==p.size){for(o=new Uint8Array(p.size),l=0;p.data.length;)c=p.data.shift(),o.set(c,l),l+=c.byteLength;if(ci.ts.videoPacketContainsKeyFrame(o)){var g=ci.ts.parsePesTime(o);g?(n.firstKeyFrame=g,n.firstKeyFrame.type="video"):console.warn("Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.")}p.size=0}p.data.push(i),p.size+=i.byteLength}if(h&&n.firstKeyFrame)break;
vendor: 6,718 bytes, line 2
2d+=ui,u+=ui}for(d=(u=e.byteLength)-ui,h=!1;d>=0;)if(e[d]!==hi||e[u]!==hi)d--,u--;else{if(i=e.subarray(d,u),"pes"===ci.ts.parseType(i,t.pid))r=ci.ts.parsePesType(i,t.table),s=ci.ts.parsePayloadUnitStartIndicator(i),"video"===r&&s&&(a=ci.ts.parsePesTime(i))&&(a.type="video",n.video.push(a),h=!0);if(h)break;d-=ui,u-=ui}},mi=function(e){var t={pid:null,table:null},n={};for(var i in function(e,t){for(var n,i=0,r=ui;r<e.byteLength;)if(e[i]!==hi||e[r]!==hi)i++,r++;else{switch(n=e.subarray(i,r),ci.ts.parseType(n,t.pid)){case"pat":t.pid=ci.ts.parsePat(n);break;case"pmt":var s=ci.ts.parsePmt(n);t.table=t.table||{},Object.keys(s).forEach((function(e){t.table[e]=s[e]}))}i+=ui,r+=ui}}(e,t),t.table){if(t.table.hasOwnProperty(i))switch(t.table[i]){case oi.H264_STREAM_TYPE:n.video=[],gi(e,t,n),0===n.video.length&&delete n.video;break;case oi.ADTS_STREAM_TYPE:n.audio=[],pi(e,t,n),0===n.audio.length&&delete n.audio}}return n},fi=function(e,t){var n;return n=ci.aac.isLikelyAacData(e)?function(e){for(var t,n=!1,i=0,r=null,s=null,a=0,o=0;e.length-o>=3;){switch(ci.aac.parseType(e,o)){case"timed-metadata":if(e.length-o<10){n=!0;break}if((a=ci.aac.parseId3TagSize(e,o))>e.length){n=!0;break}null===s&&(t=e.subarray(o,o+a),s=ci.aac.parseAacTimestamp(t)),o+=a;break;case"audio":if(e.length-o<7){n=!0;break}if((a=ci.aac.parseAdtsSize(e,o))>e.length){n=!0;break}null===r&&(t=e.subarray(o,o+a),r=ci.aac.parseSampleRate(t)),i++,o+=a;break;default:o++}if(n)return null}if(null===r||null===s)return null;var l=di/r;return{audio:[{type:"audio",dts:s,pts:s},{type:"audio",dts:s+1024*i*l,pts:s+1024*i*l}]}}(e):mi(e),n&&(n.audio||n.video)?(function(e,t){if(e.audio&&e.audio.length){var n=t;("undefined"===typeof n||isNaN(n))&&(n=e.audio[0].dts),e.audio.forEach((function(e){e.dts=li(e.dts,n),e.pts=li(e.pts,n),e.dtsTime=e.dts/di,e.ptsTime=e.pts/di}))}if(e.video&&e.video.length){var i=t;if(("undefined"===typeof i||isNaN(i))&&(i=e.video[0].dts),e.video.forEach((function(e){e.dts=li(e.dts,i),e.pts=li(e.pts,i),e.dtsTime=e.dts/di,e.ptsTime=e.pts/di})),e.firstKeyFrame){var r=e.firstKeyFrame;r.dts=li(r.dts,i),r.pts=li(r.pts,i),r.dtsTime=r.dts/di,r.ptsTime=r.pts/di}}}(n,t),n):null};class yi{constructor(e,t){this.options=t||{},this.self=e,this.init()}init(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new zt.Transmuxer(this.options),function(e,t){t.on("data",(function(t){const n=t.initSegment;t.initSegment={data:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength};const i=t.data;t.data=i.buffer,e.postMessage({action:"data",segment:t,byteOffset:i.byteOffset,byteLength:i.byteLength},[t.data])})),t.on("done",(function(t){e.postMessage({action:"done"})})),t.on("gopInfo",(function(t){e.postMessage({action:"gopInfo",gopInfo:t})})),t.on("videoSegmentTimingInfo",(function(t){const n={start:{decode:re.videoTsToSeconds(t.start.dts),presentation:re.videoTsToSeconds(t.start.pts)},end:{decode:re.videoTsToSeconds(t.end.dts),presentation:re.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:re.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(n.prependedContentDuration=re.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:n})})),t.on("audioSegmentTimingInfo",(function(t){const n={start:{decode:re.videoTsToSeconds(t.start.dts),presentation:re.videoTsToSeconds(t.start.pts)},end:{decode:re.videoTsToSeconds(t.end.dts),presentation:re.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:re.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(n.prependedContentDuration=re.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:n})})),t.on("id3Frame",(function(t){e.postMessage({action:"id3Frame",id3Frame:t})})),t.on("caption",(function(t){e.postMessage({action:"caption",caption:t})})),t.on("trackinfo",(function(t){e.postMessage({action:"trackinfo",trackInfo:t})})),t.on("audioTimingInfo",(function(t){e.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:re.videoTsToSeconds(t.start),end:re.videoTsToSeconds(t.end)}})})),t.on("videoTimingInfo",(function(t){e.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:re.videoTsToSeconds(t.start),end:re.videoTsToSeconds(t.end)}})})),t.on("log",(function(t){e.postMessage({action:"log",log:t})}))}(this.self,this.transmuxer)}pushMp4Captions(e){this.captionParser||(this.captionParser=new Yn,this.captionParser.init());const t=new Uint8Array(e.data,e.byteOffset,e.byteLength),n=this.captionParser.parse(t,e.trackIds,e.timescales);this.self.postMessage({action:"mp4Captions",captions:n&&n.captions||[],logs:n&&n.logs||[],data:t.buffer},[t.buffer])}initMp4WebVttParser(e){this.webVttParser||(this.webVttParser=new ei);const t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.webVttParser.init(t)}getMp4WebVttText(e){this.webVttParser||(this.webVttParser=new ei);const t=new Uint8Array(e.data,e.byteOffset,e.byteLength),n=this.webVttParser.parseSegment(t);this.self.postMessage({action:"getMp4WebVttText",mp4VttCues:n||[],data:t.buffer},[t.buffer])}probeMp4StartTime(e){let{timescales:t,data:n}=e;const i=Dn.startTime(t,n);this.self.postMessage({action:"probeMp4StartTime",startTime:i,data:n},[n.buffer])}probeMp4Tracks(e){let{data:t}=e;const n=Dn.tracks(t);this.self.postMessage({action:"probeMp4Tracks",tracks:n,data:t},[t.buffer])}probeEmsgID3(e){let{data:t,offset:n}=e;const i=Dn.getEmsgID3(t,n);this.self.postMessage({action:"probeEmsgID3",id3Frames:i,emsgData:t},[t.buffer])}probeTs(e){let{data:t,baseStartTime:n}=e;const i="number"!==typeof n||isNaN(n)?void 0:n*re.ONE_SECOND_IN_TS,r=fi(t,i);let s=null;r&&(s={hasVideo:r.video&&2===r.video.length||!1,hasAudio:r.audio&&2===r.audio.length||!1},s.hasVideo&&(s.videoStart=r.video[0].ptsTime),s.hasAudio&&(s.audioStart=r.audio[0].ptsTime)),this.self.postMessage({action:"probeTs",result:s,data:t},[t.buffer])}clearAllMp4Captions(){this.captionParser&&this.captionParser.clearAllCaptions()}clearParsedMp4Captions(){this.captionParser&&this.captionParser.clearParsedCaptions()}push(e){const t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(t)}reset(){this.transmuxer.reset()}setTimestampOffset(e){const t=e.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(re.secondsToVideoTs(t)))}setAudioAppendStart(e){this.transmuxer.setAudioAppendStart(Math.ceil(re.secondsToVideoTs(e.appendStart)))}setRemux(e){this.transmuxer.setRemux(e.remux)}flush(e){this.transmuxer.flush(),self.postMessage({action:"done",type:"transmuxed"})}endTimeline(){this.transmuxer.endTimeline(),self.postMessage({action:"endedtimeline",type:"transmuxed"})}alignGopsWith(e){this.transmuxer.alignGopsWith(e.gopsToAlignWith.slice())}}
2self.onmessage=function(e){"init"===e.data.action&&e.data.options?this.messageHandlers=new yi(self,e.data.options):(this.messageHandlers||(this.messageHandlers=new yi(self)),e.data&&e.data.action&&"init"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}})));var Ta=ya(_a);const xa=e=>{const{transmuxer:t,bytes:n,audioAppendStart:i,gopsToAlignWith:r,remux:s,onData:a,onTrackInfo:o,onAudioTimingInfo:l,onVideoTimingInfo:c,onVideoSegmentTimingInfo:d,onAudioSegmentTimingInfo:u,onId3:h,onCaptions:p,onDone:g,onEndedTimeline:m,onTransmuxerLog:f,isEndOfTimeline:y,segment:b,triggerSegmentEventFn:v}=e,_={buffer:[]};let T=y;if(t.onmessage=n=>{t.currentTransmux===e&&("data"===n.data.action&&((e,t,n)=>{const{type:i,initSegment:r,captions:s,captionStreams:a,metadata:o,videoFrameDtsTime:l,videoFramePtsTime:c}=e.data.segment;t.buffer.push({captions:s,captionStreams:a,metadata:o});const d=e.data.segment.boxes||{data:e.data.segment.data},u={type:i,data:new Uint8Array(d.data,d.data.byteOffset,d.data.byteLength),initSegment:new Uint8Array(r.data,r.byteOffset,r.byteLength)};"undefined"!==typeof l&&(u.videoFrameDtsTime=l),"undefined"!==typeof c&&(u.videoFramePtsTime=c),n(u)})(n,_,a),"trackinfo"===n.data.action&&o(n.data.trackInfo),"gopInfo"===n.data.action&&((e,t)=>{t.gopInfo=e.data.gopInfo})(n,_),"audioTimingInfo"===n.data.action&&l(n.data.audioTimingInfo),"videoTimingInfo"===n.data.action&&c(n.data.videoTimingInfo),"videoSegmentTimingInfo"===n.data.action&&d(n.data.videoSegmentTimingInfo),"audioSegmentTimingInfo"===n.data.action&&u(n.data.audioSegmentTimingInfo),"id3Frame"===n.data.action&&h([n.data.id3Frame],n.data.id3Frame.dispatchType),"caption"===n.data.action&&p(n.data.caption),"endedtimeline"===n.data.action&&(T=!1,m()),"log"===n.data.action&&f(n.data.log),"transmuxed"===n.data.type&&(T||(t.onmessage=null,(e=>{let{transmuxedData:t,callback:n}=e;t.buffer=[],n(t)})({transmuxedData:_,callback:g}),Sa(t))))},t.onerror=()=>{const e={message:"Received an error message from the transmuxer worker",metadata:{errorType:Vr.Error.StreamingFailedToTransmuxSegment,segmentInfo:po({segment:b})}};g(null,e)},i&&t.postMessage({action:"setAudioAppendStart",appendStart:i}),Array.isArray(r)&&t.postMessage({action:"alignGopsWith",gopsToAlignWith:r}),"undefined"!==typeof s&&t.postMessage({action:"setRemux",remux:s}),n.byteLength){const e=n instanceof ArrayBuffer?n:n.buffer,i=n instanceof ArrayBuffer?0:n.byteOffset;v({type:"segmenttransmuxingstart",segment:b}),t.postMessage({action:"push",data:e,byteOffset:i,byteLength:n.byteLength},[e])}y&&t.postMessage({action:"endTimeline"}),t.postMessage({action:"flush"})},Sa=e=>{e.currentTransmux=null,e.transmuxQueue.length&&(e.currentTransmux=e.transmuxQueue.shift(),"function"===typeof e.currentTransmux?e.currentTransmux():xa(e.currentTransmux))},Aa=(e,t)=>{e.postMessage({action:t}),Sa(e)},wa=(e,t)=>{if(!t.currentTransmux)return t.currentTransmux=e,void Aa(t,e);t.transmuxQueue.push(Aa.bind(null,t,e))},ja=e=>{if(!e.transmuxer.currentTransmux)return e.transmuxer.currentTransmux=e,void xa(e);e.transmuxer.transmuxQueue.push(e)};var ka=e=>{wa("reset",e)},Ca=e=>{const t=new Ta;t.currentTransmux=null,t.transmuxQueue=[];const n=t.terminate;return t.terminate=()=>(t.currentTransmux=null,t.transmuxQueue.length=0,n.call(t)),t.postMessage({action:"init",options:e}),t};const Oa=function(e){const t=e.transmuxer,n=e.endAction||e.action,i=e.callback,r=h()({},e,{endAction:null,transmuxer:null,callback:null}),s=r=>{r.data.action===n&&(t.removeEventListener("message",s),r.data.data&&(r.data.data=new Uint8Array(r.data.data,e.byteOffset||0,e.byteLength||r.data.data.byteLength),e.data&&(e.data=r.data.data)),i(r.data))};if(t.addEventListener("message",s),e.data){const n=e.data instanceof ArrayBuffer;r.byteOffset=n?0:e.data.byteOffset,r.byteLength=e.data.byteLength;const i=[n?e.data:e.data.buffer];t.postMessage(r,i)}else t.postMessage(r)},Ea=2,Ia=-101,Pa=-102,Ra="wvtt",Da=e=>{e.forEach((e=>{e.abort()}))},La=(e,t)=>{const{requestType:n}=t,i=Rs({requestType:n,request:t,error:e});return t.timedout?{status:t.status,message:"HLS request timed-out at URL: "+t.uri,code:Ia,xhr:t,metadata:i}:t.aborted?{status:t.status,message:"HLS request aborted at URL: "+t.uri,code:Pa,xhr:t,metadata:i}:e?{status:t.status,message:"HLS request errored at URL: "+t.uri,code:Ea,xhr:t,metadata:i}:"arraybuffer"===t.responseType&&0===t.response.byteLength?{status:t.status,message:"Empty HLS response at URL: "+t.uri,code:Ea,xhr:t,metadata:i}:null},Ma=(e,t,n,i)=>(r,s)=>{const a=s.response,o=La(r,s);if(o)return n(o,e);if(16!==a.byteLength)return n({status:s.status,message:"Invalid HLS key at URL: "+s.uri,code:Ea,xhr:s},e);const l=new DataView(a),c=new Uint32Array([l.getUint32(0),l.getUint32(4),l.getUint32(8),l.getUint32(12)]);for(let e=0;e<t.length;e++)t[e].bytes=c;const d={uri:s.uri};return i({type:"segmentkeyloadcomplete",segment:e,keyInfo:d}),n(null,e)},Na=(e,t)=>{const n=Object(x.a)(e.map.bytes);if("mp4"!==n){const i=e.map.resolvedUri||e.map.uri,r=n||"unknown";return t({internal:!0,message:"Found unsupported ".concat(r," container for initialization segment at URL: ").concat(i),code:Ea,metadata:{mediaType:r}})}Oa({action:"probeMp4Tracks",data:e.map.bytes,transmuxer:e.transmuxer,callback:n=>{let{tracks:i,data:r}=n;
2return e.map.bytes=r,i.forEach((function(t){e.map.tracks=e.map.tracks||{},e.map.tracks[t.type]||(e.map.tracks[t.type]=t,"number"===typeof t.id&&t.timescale&&(e.map.timescales=e.map.timescales||{},e.map.timescales[t.id]=t.timescale),"text"===t.type&&((e,t)=>{t===Ra&&e.transmuxer.postMessage({action:"initMp4WebVttParser",data:e.map.bytes})})(e,t.codec))})),t(null)}})},Ba=e=>{let{segment:t,finishProcessingFn:n,responseType:i,triggerSegmentEventFn:r}=e;return(e,s)=>{const a=La(e,s);if(a)return n(a,t);r({type:"segmentloaded",segment:t});const o="arraybuffer"!==i&&s.responseText?(e=>{const t=new Uint8Array(new ArrayBuffer(e.length));for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t.buffer})(s.responseText.substring(t.lastReachedChar||0)):s.response;return t.stats=(e=>({bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}))(s),t.key?t.encryptedBytes=new Uint8Array(o):t.bytes=new Uint8Array(o),n(null,t)}},Ua=e=>{let{segment:t,bytes:n,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:u,doneFn:h,onTransmuxerLog:p,triggerSegmentEventFn:g}=e;const m=t.map&&t.map.tracks||{},f=Boolean(m.audio&&m.video);let y=r.bind(null,t,"audio","start");const b=r.bind(null,t,"audio","end");let v=r.bind(null,t,"video","start");const _=r.bind(null,t,"video","end");Oa({action:"probeTs",transmuxer:t.transmuxer,data:n,baseStartTime:t.baseStartTime,callback:e=>{t.bytes=n=e.data;const r=e.result;r&&(i(t,{hasAudio:r.hasAudio,hasVideo:r.hasVideo,isMuxed:f}),i=null),ja({bytes:n,transmuxer:t.transmuxer,audioAppendStart:t.audioAppendStart,gopsToAlignWith:t.gopsToAlignWith,remux:f,onData:e=>{e.type="combined"===e.type?"video":e.type,u(t,e)},onTrackInfo:e=>{i&&(f&&(e.isMuxed=!0),i(t,e))},onAudioTimingInfo:e=>{y&&"undefined"!==typeof e.start&&(y(e.start),y=null),b&&"undefined"!==typeof e.end&&b(e.end)},onVideoTimingInfo:e=>{v&&"undefined"!==typeof e.start&&(v(e.start),v=null),_&&"undefined"!==typeof e.end&&_(e.end)},onVideoSegmentTimingInfo:e=>{const n={pts:{start:e.start.presentation,end:e.end.presentation},dts:{start:e.start.decode,end:e.end.decode}};g({type:"segmenttransmuxingtiminginfoavailable",segment:t,timingInfo:n}),s(e)},onAudioSegmentTimingInfo:e=>{const n={pts:{start:e.start.pts,end:e.end.pts},dts:{start:e.start.dts,end:e.end.dts}};g({type:"segmenttransmuxingtiminginfoavailable",segment:t,timingInfo:n}),a(e)},onId3:(e,n)=>{o(t,e,n)},onCaptions:e=>{l(t,[e])},isEndOfTimeline:c,onEndedTimeline:()=>{d()},onTransmuxerLog:p,onDone:(e,n)=>{h&&(e.type="combined"===e.type?"video":e.type,g({type:"segmenttransmuxingcomplete",segment:t}),h(n,t,e))},segment:t,triggerSegmentEventFn:g})}})},Fa=e=>{let{segment:t,bytes:n,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:u,doneFn:h,onTransmuxerLog:p,triggerSegmentEventFn:g}=e,m=new Uint8Array(n);if(Object(x.b)(m)){t.isFmp4=!0;const{tracks:e}=t.map;if(e.text&&(!e.audio||!e.video))return u(t,{data:m,type:"text"}),void((e,t,n)=>{t===Ra&&Oa({action:"getMp4WebVttText",data:e.bytes,transmuxer:e.transmuxer,callback:t=>{let{data:i,mp4VttCues:r}=t;e.bytes=i,n(null,e,{mp4VttCues:r})}})})(t,e.text.codec,h);const s={isFmp4:!0,hasVideo:!!e.video,hasAudio:!!e.audio};e.audio&&e.audio.codec&&"enca"!==e.audio.codec&&(s.audioCodec=e.audio.codec),e.video&&e.video.codec&&"encv"!==e.video.codec&&(s.videoCodec=e.video.codec),e.video&&e.audio&&(s.isMuxed=!0),i(t,s);const a=(e,n)=>{u(t,{data:m,type:s.hasAudio&&!s.isMuxed?"audio":"video"}),n&&n.length&&o(t,n),e&&e.length&&l(t,e),h(null,t,{})};Oa({action:"probeMp4StartTime",timescales:t.map.timescales,data:m,transmuxer:t.transmuxer,callback:i=>{let{data:o,startTime:l}=i;n=o.buffer,t.bytes=m=o,s.hasAudio&&!s.isMuxed&&r(t,"audio","start",l),s.hasVideo&&r(t,"video","start",l),Oa({action:"probeEmsgID3",data:m,transmuxer:t.transmuxer,offset:l,callback:i=>{let{emsgData:r,id3Frames:s}=i;n=r.buffer,t.bytes=m=r,e.video&&r.byteLength&&t.transmuxer?Oa({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:t.transmuxer,data:m,timescales:t.map.timescales,trackIds:[e.video.id],callback:e=>
2{n=e.data.buffer,t.bytes=m=e.data,e.logs.forEach((function(e){p(Zr(e,{stream:"mp4CaptionParser"}))})),a(e.captions,s)}}):a(void 0,s)}})}})}else if(t.transmuxer){if("undefined"===typeof t.container&&(t.container=Object(x.a)(m)),"ts"!==t.container&&"aac"!==t.container)return i(t,{hasAudio:!1,hasVideo:!1}),void h(null,t,{});Ua({segment:t,bytes:n,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:u,doneFn:h,onTransmuxerLog:p,triggerSegmentEventFn:g})}else h(null,t,{})},qa=function(e,t){let{id:n,key:i,encryptedBytes:r,decryptionWorker:s,segment:a,doneFn:o}=e;const l=e=>{if(e.data.source===n){s.removeEventListener("message",l);const n=e.data.decrypted;t(new Uint8Array(n.bytes,n.byteOffset,n.byteLength))}};let c;s.onerror=()=>{const e="An error occurred in the decryption worker",t=po({segment:a}),n={message:e,metadata:{error:new Error(e),errorType:Vr.Error.StreamingFailedToDecryptSegment,segmentInfo:t,keyInfo:{uri:a.key.resolvedUri||a.map.key.resolvedUri}}};o(n,a)},s.addEventListener("message",l),c=i.bytes.slice?i.bytes.slice():new Uint32Array(Array.prototype.slice.call(i.bytes)),s.postMessage(ta({source:n,encrypted:r,key:c,iv:i.iv}),[r.buffer,c.buffer])},za=e=>{let{activeXhrs:t,decryptionWorker:n,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:u,doneFn:h,onTransmuxerLog:p,triggerSegmentEventFn:g}=e,m=0,f=!1;return(e,y)=>{if(!f){if(e)return f=!0,Da(t),h(e,y);if(m+=1,m===t.length){const e=function(){if(y.encryptedBytes)return(e=>{let{decryptionWorker:t,segment:n,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:u,doneFn:h,onTransmuxerLog:p,triggerSegmentEventFn:g}=e;g({type:"segmentdecryptionstart"}),qa({id:n.requestId,key:n.key,encryptedBytes:n.encryptedBytes,decryptionWorker:t,segment:n,doneFn:h},(e=>{n.bytes=e,g({type:"segmentdecryptioncomplete",segment:n}),Fa({segment:n,bytes:n.bytes,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:u,doneFn:h,onTransmuxerLog:p,triggerSegmentEventFn:g})}))})({decryptionWorker:n,segment:y,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:u,doneFn:h,onTransmuxerLog:p,triggerSegmentEventFn:g});Fa({segment:y,bytes:y.bytes,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:u,doneFn:h,onTransmuxerLog:p,triggerSegmentEventFn:g})};if(y.endOfAllRequests=Date.now(),y.map&&y.map.encryptedBytes&&!y.map.bytes)return g({type:"segmentdecryptionstart",segment:y}),qa({decryptionWorker:n,id:y.requestId+"-init",encryptedBytes:y.map.encryptedBytes,key:y.map.key,segment:y,doneFn:h},(n=>{y.map.bytes=n,g({type:"segmentdecryptioncomplete",segment:y}),Na(y,(n=>{if(n)return Da(t),h(n,y);e()}))}));e()}}}},Va=e=>{let{segment:t,progressFn:n,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:u}=e;return e=>{if(!e.target.aborted)return t.stats=Zr(t.stats,(e=>{const t=e.target,n={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-t.requestTime||0};return n.bytesReceived=e.loaded,n.bandwidth=Math.floor(n.bytesReceived/n.roundTripTime*8*1e3),n})(e)),!t.stats.firstBytesReceivedAt&&t.stats.bytesReceived&&(t.stats.firstBytesReceivedAt=Date.now()),n(e,t)}},Ha=e=>{let{xhr:t,xhrOptions:n,decryptionWorker:i,segment:r,abortFn:s,progressFn:a,trackInfoFn:o,timingInfoFn:l,videoSegmentTimingInfoFn:c,audioSegmentTimingInfoFn:d,id3Fn:u,captionsFn:h,isEndOfTimeline:p,endedTimelineFn:g,dataFn:m,doneFn:f,onTransmuxerLog:y,triggerSegmentEventFn:b}=e;const v=[],_=za({activeXhrs:v,decryptionWorker:i,trackInfoFn:o,timingInfoFn:l,videoSegmentTimingInfoFn:c,audioSegmentTimingInfoFn:d,id3Fn:u,captionsFn:h,isEndOfTimeline:p,endedTimelineFn:g,dataFn:m,doneFn:f,onTransmuxerLog:y,triggerSegmentEventFn:b});if(r.key&&!r.key.bytes){const e=[r.key];r.map&&!r.map.bytes&&r.map.key&&r.map.key.resolvedUri===r.key.resolvedUri&&e.push(r.map.key);const i=Zr(n,{uri:r.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),s=Ma(r,e,_,b);b({type:"segmentkeyloadstart",segment:r,keyInfo:{uri:r.key.resolvedUri}});const a=t(i,s);v.push(a)}if(r.map&&!r.map.bytes){if(r.map.key&&(!r.key||r.key.resolvedUri!==r.map.key.resolvedUri)){const e=Zr(n,{uri:r.map.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),i=Ma(r,[r.map.key],_,b);b({type:"segmentkeyloadstart",segment:r,keyInfo:{uri:r.map.key.resolvedUri}});const s=t(e,i);v.push(s)}const e=Zr(n,{uri:r.map.resolvedUri,responseType:"arraybuffer",headers:Zs(r.map),requestType:"segment-media-initialization"}),i=(e=>{let{segment:t,finishProcessingFn:n,triggerSegmentEventFn:i}=e;return(e,r)=>{const s=La(e,r);if(s)return n(s,t);const a=new Uint8Array(r.response);if(i({type:"segmentloaded",segment:t}),t.map.key)return t.map.encryptedBytes=a,n(null,t);t.map.bytes=a,Na(t,(function(e){if(e)return e.xhr=r,e.status=r.status,n(e,t);n(null,t)}))}})({segment:r,finishProcessingFn:_,triggerSegmentEventFn:b});b({type:"segmentloadstart",segment:r});const s=t(e,i);v.push(s)}const T=Zr(n,{uri:r.part&&r.part.resolvedUri||r.resolvedUri,responseType:"arraybuffer",headers:Zs(r),requestType:"segment"}),x=Ba({segment:r,finishProcessingFn:_,responseType:T.responseType,triggerSegmentEventFn:b});b({type:"segmentloadstart",segment:r});const S=t(T,x);S.addEventListener("progress",Va({segment:r,progressFn:a,trackInfoFn:o,timingInfoFn:l,videoSegmentTimingInfoFn:c,audioSegmentTimingInfoFn:d,id3Fn:u,captionsFn:h,isEndOfTimeline:p,endedTimelineFn:g,dataFn:m})),v.push(S);const A={};return v.forEach((e=>{e.addEventListener("loadend",(e=>{let{loadendState:t,abortFn:n}=e;return e=>{e.target.aborted&&n&&!t.calledAbortFn&&(n(),t.calledAbortFn=!0)}})({loadendState:A,abortFn:s}))})),()=>Da(v)},Wa=Kr("PlaylistSelector"),Ga=function(e){if(!e||!e.playlist)return;const t=e.playlist;return JSON.stringify({id:t.id,bandwidth:e.bandwidth,width:e.width,height:e.height,codecs:t.attributes&&t.attributes.CODECS||""})},Xa=function(e,t){if(!e)return"";const n=r.a.getComputedStyle(e);return n?n[t]:""},Ya=function(e,t){const n=e.slice();e.sort((function(e,i){const r=t(e,i);return 0===r?n.indexOf(e)-n.indexOf(i):r}))},Qa=function(e,t){let n,i;return e.attributes.BANDWIDTH&&(n=e.attributes.BANDWIDTH),n=n||r.a.Number.MAX_VALUE,t.attributes.BANDWIDTH&&(i=t.attributes.BANDWIDTH),i=i||r.a.Number.MAX_VALUE,n-i};let Ka=function(e){const{main:t,bandwidth:n,playerWidth:i,playerHe
vendor: 2,368 bytes, line 2
2ight:s,playerObjectFit:a,limitRenditionByPlayerDimensions:o,playlistController:l}=e;if(!t)return;const c={bandwidth:n,width:i,height:s,limitRenditionByPlayerDimensions:o};let d=t.playlists;ws.isAudioOnly(t)&&(d=l.getAudioTrackPlaylists_(),c.audioOnly=!0);let u=d.map((e=>{let t;const n=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,i=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height;return t=e.attributes&&e.attributes.BANDWIDTH,t=t||r.a.Number.MAX_VALUE,{bandwidth:t,width:n,height:i,playlist:e}}));Ya(u,((e,t)=>e.bandwidth-t.bandwidth)),u=u.filter((e=>!ws.isIncompatible(e.playlist)));let h=u.filter((e=>ws.isEnabled(e.playlist)));h.length||(h=u.filter((e=>!ws.isDisabled(e.playlist))));const p=h.filter((e=>e.bandwidth*ma.BANDWIDTH_VARIANCE<n));let g=p[p.length-1];const m=p.filter((e=>e.bandwidth===g.bandwidth))[0];if(!1===o){const e=m||h[0]||u[0];if(e&&e.playlist){let t="sortedPlaylistReps";return m&&(t="bandwidthBestRep"),h[0]&&(t="enabledPlaylistReps"),Wa("choosing ".concat(Ga(e)," using ").concat(t," with options"),c),e.playlist}return Wa("could not choose a playlist with options",c),null}const f=p.filter((e=>e.width&&e.height));Ya(f,((e,t)=>e.width-t.width));const y=f.filter((e=>e.width===i&&e.height===s));g=y[y.length-1];const b=y.filter((e=>e.bandwidth===g.bandwidth))[0];let v,_,T,x;if(b||(v=f.filter((e=>"cover"===a?e.width>i&&e.height>s:e.width>i||e.height>s)),_=v.filter((e=>e.width===v[0].width&&e.height===v[0].height)),g=_[_.length-1],T=_.filter((e=>e.bandwidth===g.bandwidth))[0]),l.leastPixelDiffSelector){const e=f.map((e=>(e.pixelDiff=Math.abs(e.width-i)+Math.abs(e.height-s),e)));Ya(e,((e,t)=>e.pixelDiff===t.pixelDiff?t.bandwidth-e.bandwidth:e.pixelDiff-t.pixelDiff)),x=e[0]}const S=x||T||b||m||h[0]||u[0];if(S&&S.playlist){let e="sortedPlaylistReps";return x?e="leastPixelDiffRep":T?e="resolutionPlusOneRep":b?e="resolutionBestRep":m?e="bandwidthBestRep":h[0]&&(e="enabledPlaylistReps"),Wa("choosing ".concat(Ga(S)," using ").concat(e," with options"),c),S.playlist}return Wa("could not choose a playlist with options",c),null};const Za=function(){let e=this.useDevicePixelRatio&&r.a.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(e=this.customPixelRatio),Ka({main:this.playlists.main,bandwidth:this.systemBandwidth,playerWidth:parseInt(Xa(this.tech_.el(),"width"),10)*e,playerHe
2ight:parseInt(Xa(this.tech_.el(),"height"),10)*e,playerObjectFit:this.usePlayerObjectFit?Xa(this.tech_.el(),"objectFit"):"",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})};function Ja(e){try{return new URL(e).pathname.split("/").slice(-2).join("/")}catch(t){return""}}const $a=e=>{let{inbandTextTracks:t,metadataArray:n,timestampOffset:i,videoDuration:s}=e;if(!n)return;const a=r.a.WebKitDataCue||r.a.VTTCue,o=t.metadataTrack_;if(!o)return;if(n.forEach((e=>{const t=e.cueTime+i;!("number"!==typeof t||r.a.isNaN(t)||t<0)&&t<1/0&&e.frames&&e.frames.length&&e.frames.forEach((e=>{const n=new a(t,t,e.value||e.url||e.data||"");n.frame=e,n.value=e,function(e){Object.defineProperties(e.frame,{id:{get:()=>(Vr.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),e.value.key)},value:{get:()=>(Vr.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),e.value.data)},privateData:{get:()=>(Vr.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),e.value.data)}})}(n),o.addCue(n)}))})),!o.cues||!o.cues.length)return;const l=o.cues,c=[];for(let r=0;r<l.length;r++)l[r]&&c.push(l[r]);const d=c.reduce(((e,t)=>{const n=e[t.startTime]||[];return n.push(t),e[t.startTime]=n,e}),{}),u=Object.keys(d).sort(((e,t)=>Number(e)-Number(t)));u.forEach(((e,t)=>{const n=d[e],i=isFinite(s)?s:e,r=Number(u[t+1])||i;n.forEach((e=>{e.endTime=r}))}))},eo={id:"ID",class:"CLASS",startDate:"START-DATE",duration:"DURATION",endDate:"END-DATE",endOnNext:"END-ON-NEXT",plannedDuration:"PLANNED-DURATION",scte35Out:"SCTE35-OUT",scte35In:"SCTE35-IN"},to=new Set(["id","class","startDate","duration","endDate","endOnNext","startTime","endTime","processDateRange"]),no=(e,t,n)=>{e.metadataTrack_||(e.metadataTrack_=n.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,Vr.browser.IS_ANY_SAFARI||(e.metadataTrack_.inBandMetadataTrackDispatchType=t))},io=function(e,t,n){let i,r;if(n&&n.cues)for(i=n.cues.length;i--;)r=n.cues[i],r.startTime>=e&&r.endTime<=t&&n.removeCue(r)},ro=e=>"number"===typeof e&&isFinite(e),so=1/60,ao=e=>{const{startOfSegment:t,duration:n,segment:i,part:r,playlist:{mediaSequence:s,id:a,segments:o=[]},mediaIndex:l,partIndex:c,timeline:d}=e,u=o.length-1;let h="mediaIndex/partIndex increment";e.getMediaInfoForTime?h="getMediaInfoForTime (".concat(e.getMediaInfoForTime,")"):e.isSyncRequest&&(h="getSyncSegmentCandidate (isSyncRequest)"),e.independent&&(h+=" with independent ".concat(e.independent));const p="number"===typeof c,g=e.segment.uri?"segment":"pre-segment",m=p?us({preloadSegment:i})-1:0;return"".concat(g," [").concat(s+l,"/").concat(s+u,"]")+(p?" part [".concat(c,"/").concat(m,"]"):"")+" segment start/end [".concat(i.start," => ").concat(i.end,"]")+(p?" part start/end [".concat(r.start," => ").concat(r.end,"]"):"")+" startOfSegment [".concat(t,"]")+" duration [".concat(n,"]")+" timeline [".concat(d,"]")+" selected by [".concat(h,"]")+" playlist [".concat(a,"]")},oo=e=>"".concat(e,"TimingInfo"),lo=e=>{let{timelineChangeController:t,currentTimeline:n,segmentTimeline:i,loaderType:r,audioDisabled:s}=e;if(n===i)return!1;if("audio"===r){const e=t.lastTimelineChange({type:"main"});return!e||e.to!==i}if("main"===r&&s){const e=t.pendingTimelineChange({type:"audio"});return!e||e.to!==i}return!1},co=e=>{const t=e.pendingSegment_;if(!t)return;if(lo({timelineChangeController:e.timelineChangeController_,currentTimeline:e.currentTimeline_,segmentTimeline:t.timeline,loaderType:e.loaderType_,audioDisabled:e.audioDisabled_})&&(e=>{if(!e)return!1;const t=e.pendingTimelineChange({type:"audio"}),n=e.pendingTimelineChange({type:"main"}),i=t&&n,r=i&&t.to!==n.to;return!(!i||-1===t.from||-1===n.from||!r)})(e.timelineChangeController_)){if((e=>{const t=e.timelineChangeController_.pendingTimelineChange({type:"audio"}),n=e.timelineChangeController_.pendingTimelineChange({type:"main"});return t&&n&&t.to<n.to})(e))return void e.timelineChangeController_.trigger("audioTimelineBehind");e.timelineChangeController_.trigger("fixBadTimelineChange")}},uo=e=>{let{segmentDuration:t,maxDuration:n}=e;return!!t&&Math.round(t)>n+$r},ho=(e,t)=>{if("hls"!==t)return null;const n=(e=>{let t=0;return["video","audio"].forEach((function(n){const i=e["".concat(n,"TimingInfo")];if(!i)return;const{start:s,end:a}=i;let o;"bigint"===typeof s||"bigint"===typeof a?o=r.a.BigInt(a)-r.a.BigInt(s):"number"===typeof s&&"number"===typeof a&&(o=a-s),"undefined"!==typeof o&&o>t&&(t=o)})),"bigint"===typeof t&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),t})({audioTimingInfo:e.audioTimingInfo,videoTimingInfo:e.videoTimingInfo});if(!n)return null;const i=e.playlist.targetDuration,s=uo({segmentDuration:n,maxDuration:2*i}),a=uo({segmentDuration:n,maxDuration:i}),o="Segment with index ".concat(e.mediaIndex," ")+"from playlist ".concat(e.playlist.id," ")+"has a duration of ".concat(n," ")+"when the reported duration is ".concat(e.duration," ")+"and the target duration is ".concat(i,". ")+"For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1";return s||a?{severity:s?"warn":"info",message:o}:null},po=e=>{let{type:t,segment:n}=e;if(!n)return;const i=Boolean(n.key||n.map&&n.map.ke),r=Boolean(n.map&&!n.map.bytes),s=void 0===n.startOfSegment?n.start:n.startOfSegment;return{type:t||n.type,uri:n.resolvedUri||n.uri,start:s,duration:n.duration,isEncrypted:i,isMediaInitialization:r}};class go extends Vr.EventTarget{constructor(e){if(super(),!e)throw new TypeError("Initialization settings are required");if("function"!==typeof e.currentTime)throw new TypeError("No currentTime getter specified");if(!e.mediaSource)throw new TypeError("No MediaSource specified");this.bandwidth=e.bandwidth,this.throughput={rate:0,count:0},this.roundTrip=NaN,this.resetStats_(),this.mediaIndex=null,this.partIndex=null,this.hasPlayed_=e.hasPlayed,this.currentTime_=e.currentTime,this.seekable_=e.seekable,this.seeking_=e.seeking,this.duration_=e.duration,this.mediaSource_=e.mediaSource,this.vhs_=e.vhs,this.loaderType_=e.loaderType,this.currentMediaInfo_=void 0,this.startingMediaInfo_=void 0,this.segmentMetadataTrack_=e.segmentMetadataTrack,this.goalBufferLength_=e.goalBufferLength,this.sourceType_=e.sourceType,this.sourceUpdater_=e.sourceUpdater,this.inbandTextTracks_=e.inbandTextTracks,this.state_="INIT",this.timelineChangeController_=e.timelineChangeController,this.shouldSaveSegmentTimingInfo_=!0,this.parse708captions_=e.parse708captions,this.useDtsForTimestampOffset_=e.useDtsForTimestampOffset,this.captionServices_=e.captionServices,this.exactManifestTimings=e.exactManifestTimings,this.addMetadataToTextTrack=e.addMetadataToTextTrack,this.checkBufferTimeout_=null,this.error_=void 0,this.currentTimeline_=-1,this.shouldForceTimestampOffsetAfterResync_=!1,this.pendingSegment_=null,this.xhrOptions_=null,this.pendingSegments_=[],this.audioDisabled_=!1,this.isPendingTimestampOffset_=!1,this.gopBuffer_=[],this.timeMapping_=0,this.safeAppend_=!1,this.appendInitSegment_={audio:!0,video:!0},this.playlistOfLastInitSegment_={audio:null,video:null},this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_={id3:[],caption:[]},this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=null,this.activeInitSegmentId_=null,this.initSegments_={}
2,this.cacheEncryptionKeys_=e.cacheEncryptionKeys,this.keyCache_={},this.decrypter_=e.decrypter,this.syncController_=e.syncController,this.syncPoint_={segmentIndex:0,time:0},this.transmuxer_=this.createTransmuxer_(),this.triggerSyncInfoUpdate_=()=>this.trigger("syncinfoupdate"),this.syncController_.on("syncinfoupdate",this.triggerSyncInfoUpdate_),this.mediaSource_.addEventListener("sourceopen",(()=>{this.isEndOfStream_()||(this.ended_=!1)})),this.fetchAtBuffer_=!1,this.logger_=Kr("SegmentLoader[".concat(this.loaderType_,"]")),Object.defineProperty(this,"state",{get(){return this.state_},set(e){e!==this.state_&&(this.logger_("".concat(this.state_," -> ").concat(e)),this.state_=e,this.trigger("statechange"))}}),this.sourceUpdater_.on("ready",(()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():co(this)})),this.sourceUpdater_.on("codecschange",(e=>{this.trigger(h()({type:"codecschange"},e))})),"main"===this.loaderType_&&this.timelineChangeController_.on("pendingtimelinechange",(()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():co(this)})),"audio"===this.loaderType_&&this.timelineChangeController_.on("timelinechange",(e=>{this.trigger(h()({type:"timelinechange"},e)),this.hasEnoughInfoToLoad_()?this.processLoadQueue_():co(this),this.hasEnoughInfoToAppend_()?this.processCallQueue_():co(this)}))}get mediaSequenceSync_(){return this.syncController_.getMediaSequenceSync(this.loaderType_)}createTransmuxer_(){return Ca({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})}resetStats_(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0}dispose(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&r.a.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()}setAudio(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())}abort(){if("WAITING"!==this.state)return this.pendingSegment_&&(this.pendingSegment_=null),void this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_);this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()}abort_(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,r.a.
2clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null}checkForAbort_(e){return"APPENDING"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==e:(this.state="READY",!0)}error(e){return"undefined"!==typeof e&&(this.logger_("error occurred:",e),this.error_=e),this.pendingSegment_=null,this.error_}endOfStream(){this.ended_=!0,this.transmuxer_&&ka(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")}buffered_(){const e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return Jr();if("main"===this.loaderType_){const{hasAudio:t,hasVideo:n,isMuxed:i}=e;if(n&&t&&!this.audioDisabled_&&!i)return this.sourceUpdater_.buffered();if(n)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()}initSegmentForMap(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e)return null;const n=na(e);let i=this.initSegments_[n];return t&&!i&&e.bytes&&(this.initSegments_[n]=i={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),i||e}segmentKey(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e)return null;const n=ia(e);let i=this.keyCache_[n];this.cacheEncryptionKeys_&&t&&!i&&e.bytes&&(this.keyCache_[n]=i={resolvedUri:e.resolvedUri,bytes:e.bytes});const r={resolvedUri:(i||e).resolvedUri};return i&&(r.bytes=i.bytes),r}couldBeginLoading_(){return this.playlist_&&!this.paused()}load(){if(this.monitorBuffer_(),this.playlist_)return"INIT"===this.state&&this.couldBeginLoading_()?this.init_():void(!this.couldBeginLoading_()||"READY"!==this.state&&"INIT"!==this.state||(this.state="READY"))}init_(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}playlist(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return;if(this.playlist_&&this.playlist_.endList&&e.endList&&this.playlist_.uri===e.uri)return;const n=this.playlist_,i=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,"INIT"===this.state&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},"main"===this.loaderType_&&this.syncController_.setDateTimeMappingForStart(e));let r=null;if(n&&(n.id?r=n.id:n.uri&&(r=n.uri)),this.logger_("playlist update [".concat(r," => ").concat(e.id||e.uri,"]")),this.mediaSequenceSync_&&(this.mediaSequenceSync_.update(e,this.currentTime_()),this.logger_("Playlist update:\ncurrentTime: ".concat(this.currentTime_(),"\nbufferedEnd: ").concat(as(this.buffered_()),"\n"),this.mediaSequenceSync_.diagnostics)),this.trigger("syncinfoupdate"),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();if(!n||n.uri!==e.uri){if(null!==this.mediaIndex){!e.endList&&"number"===typeof e.partTargetDuration?this.resetLoader():this.resyncLoader()}return this.currentMediaInfo_=void 0,void this.trigger("playlistupdate")}const s=e.mediaSequence-n.mediaSequence;if(this.logger_("live window shift [".concat(s,"]")),null!==this.mediaIndex)if(this.mediaIndex-=s,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{const e=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!e.parts||!e.parts.length||!e.parts[this.partIndex])){const e=this.mediaIndex;this.logger_("currently processing part (index ".concat(this.partIndex,") no longer exists.")),this.resetLoader(),this.mediaIndex=e}}i&&(i.mediaIndex-=s,i.mediaIndex<0?(i.mediaIndex=null,i.partIndex=null):(i.mediaIndex>=0&&(i.segment=e.segments[i.mediaIndex]),i.partIndex>=0&&i.segment.parts&&(i.part=i.segment.parts[i.partIndex]))),this.syncController_.saveExpiredSegmentInfo(n,e)}pause(){this.checkBufferTimeout_&&(r.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}paused(){return null===this.checkBufferTimeout_}resetEverything(e){this.ended_=!1,this.activeInitSegmentId_=null,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.transmuxer_.postMessage({action:"reset"}))}resetLoader(){this.fetchAtBuffer_=!1,this.mediaSequenceSync_&&this.mediaSequenceSync_.resetAppendedStatus(),this.resyncLoader()}resyncLoader(){this.transmuxer_&&ka(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1;const e=this.currentMediaInfo_&&this.currentMediaInfo_.isFmp4;"hls"===this.sourceType_&&!e&&(this.shouldForceTimestampOffsetAfterResync_=!0),this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}remove(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>{},i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(t===1/0&&(t=this.duration_()),t<=e)return void this.logger_("skipping remove because end ${end} is <= start ${start}");if(!this.sourceUpdater_||!this.getMediaInfo_())return void this.logger_("skipping remove because no source updater or starting media info");let r=1;const s=()=>{r--,0===r&&n()};!i&&this.audioDisabled_||(r++,this.sourceUpdater_.removeAudio(e,t,s)),(i||"main"===this.loaderType_)&&(this.gopBuffer_=((e,t,n,i)=>{const r=Math.ceil((t-i)*S.ONE_SECOND_IN_TS),s=Math.ceil((n-i)*S.ONE_SECOND_IN_TS),a=e.slice();let o=e.length;for(;o--&&!(e[o].pts<=s););if(-1===o)return a;let l=o+1;for(;l--&&!(e[l].pts<=r););return l=Math.max(l,0),a.splice(l,o-l+1),a})(this.gopBuffer_,e,t,this.timeMapping_),r++,this.sourceUpdater_.removeVideo(e,t,s));for(const a in this.inbandTextTracks_)io(e,t,this.inbandTextTracks_[a]);io(e,t,this.segmentMetadataTrack_),s()}monitorBuffer_(){this.checkBufferTimeout_&&r.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=r.a.setTimeout(this.monitorBufferTick_.bind(this),1)}monitorBufferTick_(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&r.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=r.a.setTimeout(this.monitorBufferTick_.bind(this),500)}fillBuffer_(){if(this.sourceUpdater_.updating())return;const e=this.chooseNextRequest_();if(!e)return;const t={segmentInfo:po({type:this.loaderType_,segment:e})};this.trigger({type:"segmentselected",metadata:t}),"number"===typeof e.timestampOffset&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e)}
2isEndOfStream_(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.mediaIndex,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.playlist_,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.partIndex;if(!t||!this.mediaSource_)return!1;const i="number"===typeof e&&t.segments[e],r=e+1===t.segments.length,s=!i||!i.parts||n+1===i.parts.length;return t.endList&&"open"===this.mediaSource_.readyState&&r&&s}chooseNextRequest_(){const e=this.buffered_(),t=as(e)||0,n=os(e,this.currentTime_()),i=!this.hasPlayed_()&&n>=1,r=n>=this.goalBufferLength_(),s=this.playlist_.segments;if(!s.length||i||r)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_(),this.loaderType_);const a={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:Boolean(!this.syncPoint_)};if(a.isSyncRequest)a.mediaIndex=function(e,t,n){t=t||[];const i=[];let r=0;for(let s=0;s<t.length;s++){const a=t[s];if(e===a.timeline&&(i.push(s),r+=a.duration,r>n))return s}return 0===i.length?0:i[i.length-1]}(this.currentTimeline_,s,t),this.logger_("choose next request. Can not find sync point. Fallback to media Index: ".concat(a.mediaIndex));else if(null!==this.mediaIndex){const e=s[this.mediaIndex],n="number"===typeof this.partIndex?this.partIndex:-1;a.startOfSegment=e.end?e.end:t,e.parts&&e.parts[n+1]?(a.mediaIndex=this.mediaIndex,a.partIndex=n+1):a.mediaIndex=this.mediaIndex+1}else{let e,n,i;const r=this.fetchAtBuffer_?t:this.currentTime_();if(this.mediaSequenceSync_&&this.logger_("chooseNextRequest_ request after Quality Switch:\nFor TargetTime: ".concat(r,".\nCurrentTime: ").concat(this.currentTime_(),"\nBufferedEnd: ").concat(t,"\nFetch At Buffer: ").concat(this.fetchAtBuffer_,"\n"),this.mediaSequenceSync_.diagnostics),this.mediaSequenceSync_&&this.mediaSequenceSync_.isReliable){const t=this.getSyncInfoFromMediaSequenceSync_(r);if(!t){const e="No sync info found while using media sequence sync";return this.error({message:e,metadata:{errorType:Vr.Error.StreamingFailedToSelectNextSegment,error:new Error(e)}}),this.logger_("chooseNextRequest_ - no sync info found using media sequence sync"),null}this.logger_("chooseNextRequest_ mediaSequence syncInfo (".concat(t.start," --\x3e ").concat(t.end,")")),e=t.segmentIndex,n=t.partIndex,i=t.start}else{this.logger_("chooseNextRequest_ - fallback to a regular segment selection algorithm, based on a syncPoint.");const t=ws.getMediaInfoForTime({exactManifestTimings:this.exactManifestTimings,playlist:this.playlist_,currentTime:r,startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time});e=t.segmentIndex,n=t.partIndex,i=t.startTime}a.getMediaInfoForTime=this.fetchAtBuffer_?"bufferedEnd ".concat(r):"currentTime ".concat(r),a.mediaIndex=e,a.startOfSegment=i,a.partIndex=n,this.logger_("choose next request. Playlist switched and we have a sync point. Media Index: ".concat(a.mediaIndex," "))}const o=s[a.mediaIndex];let l=o&&"number"===typeof a.partIndex&&o.parts&&o.parts[a.partIndex];if(!o||"number"===typeof a.partIndex&&!l)return null;"number"!==typeof a.partIndex&&o.parts&&(a.partIndex=0,l=o.parts[0]);const c=this.vhs_.playlists&&this.vhs_.playlists.main&&this.vhs_.playlists.main.independentSegments||this.playlist_.independentSegments;if(!n&&l&&!c&&!l.independent)if(0===a.partIndex){const e=s[a.mediaIndex-1],t=e.parts&&e.parts.length&&e.parts[e.parts.length-1];t&&t.independent&&(a.mediaIndex-=1,a.partIndex=e.parts.length-1,a.independent="previous segment")}else o.parts[a.partIndex-1].independent&&(a.partIndex-=1,a.independent="previous part");const d=this.mediaSource_&&"ended"===this.mediaSource_.readyState;return a.mediaIndex>=s.length-1&&d&&!this.seeking_()?null:(this.shouldForceTimestampOffsetAfterResync_&&(this.shouldForceTimestampOffsetAfterResync_=!1,a.forceTimestampOffset=!0,this.logger_("choose next request. Force timestamp offset after loader resync")),this.generateSegmentInfo_(a))}getSyncInfoFromMediaSequenceSync_(e){if(!this.mediaSequenceSync_)return null;const t=Math.max(e,this.mediaSequenceSync_.start);e!==t&&this.logger_("getSyncInfoFromMediaSequenceSync_. Pulled target time from ".concat(e," to ").concat(t));const n=this.mediaSequenceSync_.getSyncInfoForTime(t);if(!n)return null;if(!n.isAppended)return n;const i=this.mediaSequenceSync_.getSyncInfoForTime(n.end);return i?(i.isAppended&&this.logger_("getSyncInfoFromMediaSequenceSync_: We encounter unexpected scenario where next media sequence sync info is also appended!"),i):null}generateSegmentInfo_(e){const{independent:t,playlist:n,mediaIndex:i,startOfSegment:r,isSyncRequest:s,partIndex:a,forceTimestampOffset:o,getMediaInfoForTime:l}=e,c=n.segments[i],d="number"===typeof a&&c.parts[a],u={requestId:"segment-loader-"+Math.random(),uri:d&&d.resolvedUri||c.resolvedUri,mediaIndex:i,partIndex:d?a:null,isSyncRequest:s,startOfSegment:r,playlist:n,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:c.timeline,duration:d&&d.duration||c.duration,segment:c,part:d,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:l,independent:t},h="undefined"!==typeof o?o:this.isPendingTimestampOffset_;u.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:c.timeline,currentTimeline:this.currentTimeline_,startOfSegment:r,buffered:this.buffered_(),overrideCheck:h});
2const p=as(this.sourceUpdater_.audioBuffered());return"number"===typeof p&&(u.audioAppendStart=p-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(u.gopsToAlignWith=((e,t,n)=>{if("undefined"===typeof t||null===t||!e.length)return[];const i=Math.ceil((t-n+3)*S.ONE_SECOND_IN_TS);let r;for(r=0;r<e.length&&!(e[r].pts>i);r++);return e.slice(r)})(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),u}timestampOffsetForSegment_(e){return(e=>{let{segmentTimeline:t,currentTimeline:n,startOfSegment:i,buffered:r,overrideCheck:s}=e;return s||t!==n?t<n?i:r.length?r.end(r.length-1):i:null})(e)}earlyAbortWhenNeeded_(e){if(this.vhs_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH)return;if(Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)return;const t=this.currentTime_(),n=e.bandwidth,i=this.pendingSegment_.duration,r=ws.estimateSegmentRequestTime(i,n,this.playlist_,e.bytesReceived),s=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return((e.length?e.end(e.length-1):0)-t)/n}(this.buffered_(),t,this.vhs_.tech_.playbackRate())-1;if(r<=s)return;const a=function(e){const{main:t,currentTime:n,bandwidth:i,duration:r,segmentDuration:s,timeUntilRebuffer:a,currentTimeline:o,syncController:l}=e,c=t.playlists.filter((e=>!ws.isIncompatible(e)));let d=c.filter(ws.isEnabled);d.length||(d=c.filter((e=>!ws.isDisabled(e))));const u=d.filter(ws.hasAttribute.bind(null,"BANDWIDTH")).map((e=>{const t=l.getSyncPoint(e,r,o,n)?1:2;return{playlist:e,rebufferingImpact:ws.estimateSegmentRequestTime(s,i,e)*t-a}})),h=u.filter((e=>e.rebufferingImpact<=0));return Ya(h,((e,t)=>Qa(t.playlist,e.playlist))),h.length?h[0]:(Ya(u,((e,t)=>e.rebufferingImpact-t.rebufferingImpact)),u[0]||null)}({main:this.vhs_.playlists.main,currentTime:t,bandwidth:n,duration:this.duration_(),segmentDuration:i,timeUntilRebuffer:s,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(!a)return;const o=r-s-a.rebufferingImpact;let l=.5;s<=$r&&(l=1),!a.playlist||a.playlist.uri===this.playlist_.uri||o<l||(this.bandwidth=a.playlist.attributes.BANDWIDTH*ma.BANDWIDTH_VARIANCE+1,this.trigger("earlyabort"))}handleAbort_(e){this.logger_("Aborting ".concat(ao(e))),this.mediaRequestsAborted+=1}handleProgress_(e,t){this.earlyAbortWhenNeeded_(t.stats),this.checkForAbort_(t.requestId)||this.trigger("progress")}handleTrackInfo_(e,t){const{hasAudio:n,hasVideo:i}=t,r={segmentInfo:po({type:this.loaderType_,segment:e}),trackInfo:{hasAudio:n,hasVideo:i}};this.trigger({type:"segmenttransmuxingtrackinfoavailable",metadata:r}),this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId)||this.checkForIllegalMediaSwitch(t)||(t=t||{},function(e,t){if(!e&&!t||!e&&t||e&&!t)return!1;if(e===t)return!0;const n=Object.keys(e).sort(),i=Object.keys(t).sort();if(n.length!==i.length)return!1;for(let r=0;r<n.length;r++){const s=n[r];if(s!==i[r])return!1;if(e[s]!==t[s])return!1}return!0}(this.currentMediaInfo_,t)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=t,this.currentMediaInfo_=t,this.logger_("trackinfo update",t),this.trigger("trackinfo")),this.checkForAbort_(e.requestId)||(this.pendingSegment_.trackInfo=t,this.hasEnoughInfoToAppend_()?this.processCallQueue_():co(this)))}handleTimingInfo_(e,t,n,i){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;const r=this.pendingSegment_,s=oo(t);r[s]=r[s]||{},r[s][n]=i,this.logger_("timinginfo: ".concat(t," - ").concat(n," - ").concat(i)),this.hasEnoughInfoToAppend_()?this.processCallQueue_():co(this)}handleCaptions_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(0===t.length)return void this.logger_("SegmentLoader received no captions from a caption event");if(!this.pendingSegment_.hasAppendedData_)return void this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,t));const n=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),i={};t.forEach((e=>{i[e.stream]=i[e.stream]||{startTime:1/0,captions:[],endTime:0};const t=i[e.stream];t.startTime=Math.min(t.startTime,e.startTime+n),t.endTime=Math.max(t.endTime,e.endTime+n),t.captions.push(e)}
2)),Object.keys(i).forEach((e=>{const{startTime:t,endTime:s,captions:a}=i[e],o=this.inbandTextTracks_;this.logger_("adding cues from ".concat(t," -> ").concat(s," for ").concat(e)),function(e,t,n){if(!e[n]){t.trigger({type:"usage",name:"vhs-608"});let i=n;/^cc708_/.test(n)&&(i="SERVICE"+n.split("_")[1]);const r=t.textTracks().getTrackById(i);if(r)e[n]=r;else{let r=n,s=n,a=!1;const o=(t.options_.vhs&&t.options_.vhs.captionServices||{})[i];o&&(r=o.label,s=o.language,a=o.default),e[n]=t.addRemoteTextTrack({kind:"captions",id:i,default:a,label:r,language:s},!1).track}}}(o,this.vhs_.tech_,e),io(t,s,o[e]),function(e){let{inbandTextTracks:t,captionArray:n,timestampOffset:i}=e;if(!n)return;const s=r.a.WebKitDataCue||r.a.VTTCue;n.forEach((e=>{const n=e.stream;e.content?e.content.forEach((r=>{const a=new s(e.startTime+i,e.endTime+i,r.text);a.line=r.line,a.align="left",a.position=r.position,a.positionAlign="line-left",t[n].addCue(a)})):t[n].addCue(new s(e.startTime+i,e.endTime+i,e.text))}))}({captionArray:a,inbandTextTracks:o,timestampOffset:n})})),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}handleId3_(e,t,n){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;this.pendingSegment_.hasAppendedData_?this.addMetadataToTextTrack(n,t,this.duration_()):this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,n))}processMetadataQueue_(){this.metadataQueue_.id3.forEach((e=>e())),this.metadataQueue_.caption.forEach((e=>e())),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]}processCallQueue_(){const e=this.callQueue_;this.callQueue_=[],e.forEach((e=>e()))}processLoadQueue_(){const e=this.loadQueue_;this.loadQueue_=[],e.forEach((e=>e()))}hasEnoughInfoToLoad_(){if("audio"!==this.loaderType_)return!0;const e=this.pendingSegment_;return!!e&&(!this.getCurrentMediaInfo_()||!lo({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}getCurrentMediaInfo_(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.pendingSegment_;return e&&e.trackInfo||this.currentMediaInfo_}getMediaInfo_(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.pendingSegment_;return this.getCurrentMediaInfo_(e)||this.startingMediaInfo_}getPendingSegmentPlaylist(){return this.pendingSegment_?this.pendingSegment_.playlist:null}hasEnoughInfoToAppend_(){if(!this.sourceUpdater_.ready())return!1;if(this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;const e=this.pendingSegment_,t=this.getCurrentMediaInfo_();if(!e||!t)return!1;const{hasAudio:n,hasVideo:i,isMuxed:r}=t;return!(i&&!e.videoTimingInfo)&&(!(n&&!this.audioDisabled_&&!r&&!e.audioTimingInfo)&&!lo({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}handleData_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(this.callQueue_.length||!this.hasEnoughInfoToAppend_())return co(this),void this.callQueue_.push(this.handleData_.bind(this,e,t));const n=this.pendingSegment_;if(this.setTimeMapping_(n.timeline),this.updateMediaSecondsLoaded_(n.part||n.segment),"closed"!==this.mediaSource_.readyState){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),n.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),n.isFmp4=e.isFmp4,n.timingInfo=n.timingInfo||{},n.isFmp4)this.trigger("fmp4"),n.timingInfo.start=n[oo(t.type)].start;else{const e=this.getCurrentMediaInfo_(),t="main"===this.loaderType_&&e&&e.hasVideo;let i;t&&(i=n.videoTimingInfo.start),n.timingInfo.start=this.trueSegmentStart_({currentStart:n.timingInfo.start,playlist:n.playlist,mediaIndex:n.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:t,firstVideoFrameTimeForData:i,videoTimingInfo:n.videoTimingInfo,audioTimingInfo:n.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(n,t.type),this.updateSourceBufferTimestampOffset_(n),n.isSyncRequest){this.updateTimingInfoEnd_(n),this.syncController_.saveSegmentTimingInfo({segmentInfo:n,shouldSaveTimelineMapping:"main"===this.loaderType_});const e=this.chooseNextRequest_();if(e.mediaIndex!==n.mediaIndex||e.partIndex!==n.partIndex)return void this.logger_("sync segment was incorrect, not appending");this.logger_("sync segment was correct, appending")}n.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(n,t)}}updateAppendInitSegmentStatus(e,t){"main"!==this.loaderType_||"number"!==typeof e.timestampOffset||e.changedTimestampOffset||(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[t]!==e.playlist&&(this.appendInitSegment_[t]=!0)}getInitSegmentAndUpdateState_(e){let{type:t,initSegment:n,map:i,playlist:r}=e;if(i){const e=na(i);if(this.activeInitSegmentId_===e)return null;n=this.initSegmentForMap(i,!0).bytes,this.activeInitSegmentId_=e}return n&&this.appendInitSegment_[t]?(this.playlistOfLastInitSegment_[t]=r,this.appendInitSegment_[t]=!1,this.activeInitSegmentId_=null,n):null}handleQuotaExceededError_(e,t){let{segmentInfo:n,type:i,bytes:s}=e;
2const a=this.sourceUpdater_.audioBuffered(),o=this.sourceUpdater_.videoBuffered();a.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: "+ss(a).join(", ")),o.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+ss(o).join(", "));const l=a.length?a.start(0):0,c=a.length?a.end(a.length-1):0,d=o.length?o.start(0):0,u=o.length?o.end(o.length-1):0;if(c-l<=1&&u-d<=1)return this.logger_("On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. "+"Appended byte length: ".concat(s.byteLength,", ")+"audio buffer: ".concat(ss(a).join(", "),", ")+"video buffer: ".concat(ss(o).join(", "),", ")),this.error({message:"Quota exceeded error with append of a single segment of content",excludeUntil:1/0}),void this.trigger("error");this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:n,type:i,bytes:s}));const h=this.currentTime_()-1;this.logger_("On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ".concat(h)),this.remove(0,h,(()=>{this.logger_("On QUOTA_EXCEEDED_ERR, retrying append in ".concat(1,"s")),this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=r.a.setTimeout((()=>{this.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),this.quotaExceededErrorRetryTimeout_=null,this.processCallQueue_()}),1e3)}),!0)}handleAppendError_(e,t){let{segmentInfo:n,type:i,bytes:r}=e;t&&(22!==t.code?(this.logger_("Received non QUOTA_EXCEEDED_ERR on append",t),this.error({message:"".concat(i," append of ").concat(r.length,"b failed for segment ")+"#".concat(n.mediaIndex," in playlist ").concat(n.playlist.id),metadata:{errorType:Vr.Error.StreamingFailedToAppendSegment}}),this.trigger("appenderror")):this.handleQuotaExceededError_({segmentInfo:n,type:i,bytes:r}))}appendToSourceBuffer_(e){let{segmentInfo:t,type:n,initSegment:i,data:r,bytes:s}=e;if(!s){const e=[r];let t=r.byteLength;i&&(e.unshift(i),t+=i.byteLength),s=(e=>{let t,n=0;return e.bytes&&(t=new Uint8Array(e.bytes),e.segments.forEach((e=>{t.set(e,n),n+=e.byteLength}))),t})({bytes:t,segments:e})}const a={segmentInfo:po({type:this.loaderType_,segment:t})};this.trigger({type:"segmentappendstart",metadata:a}),this.sourceUpdater_.appendBuffer({segmentInfo:t,type:n,bytes:s},this.handleAppendError_.bind(this,{segmentInfo:t,type:n,bytes:s}))}handleSegmentTimingInfo_(e,t,n){if(!this.pendingSegment_||t!==this.pendingSegment_.requestId)return;const i=this.pendingSegment_.segment,r="".concat(e,"TimingInfo");i[r]||(i[r]={}),i[r].transmuxerPrependedSeconds=n.prependedContentDuration||0,i[r].transmuxedPresentationStart=n.start.presentation,i[r].transmuxedDecodeStart=n.start.decode,i[r].transmuxedPresentationEnd=n.end.presentation,i[r].transmuxedDecodeEnd=n.end.decode,i[r].baseMediaDecodeTime=n.baseMediaDecodeTime}appendData_(e,t){const{type:n,data:i}=t;if(!i||!i.byteLength)return;if("audio"===n&&this.audioDisabled_)return;const r=this.getInitSegmentAndUpdateState_({type:n,initSegment:t.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:n,initSegment:r,data:i})}loadSegment_(e){if(this.state="WAITING",this.pendingSegment_=e,this.trimBackBuffer_(e),"number"===typeof e.timestampOffset&&this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),!this.hasEnoughInfoToLoad_())return co(this),void this.loadQueue_.push((()=>{const t=h()({},e,{forceTimestampOffset:!0});h()(e,this.generateSegmentInfo_(t)),this.isPendingTimestampOffset_=!1,this.updateTransmuxerAndRequestSegment_(e)}));this.updateTransmuxerAndRequestSegment_(e)}updateTransmuxerAndRequestSegment_(e){this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:"reset"}),this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:e.timestampOffset}));const t=this.createSimplifiedSegmentObj_(e),n=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),i=null!==this.mediaIndex,r=e.timeline!==this.currentTimeline_&&e.timeline>0,s=n||i&&r;this.logger_("Requesting\n".concat(Ja(e.uri),"\n").concat(ao(e))),t.map&&!t.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=Ha({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:t,abortFn:this.handleAbort_.bind(this,e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.b
2ind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"video",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"audio",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:s,endedTimelineFn:()=>{this.logger_("received endedtimeline callback")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:t=>{let{message:n,level:i,stream:r}=t;this.logger_("".concat(ao(e)," logged from transmuxer stream ").concat(r," as a ").concat(i,": ").concat(n))},triggerSegmentEventFn:e=>{let{type:t,segment:n,keyInfo:i,trackInfo:r,timingInfo:s}=e;const a={segmentInfo:po({segment:n})};i&&(a.keyInfo=i),r&&(a.trackInfo=r),s&&(a.timingInfo=s),this.trigger({type:t,metadata:a})}})}trimBackBuffer_(e){const t=((e,t,n)=>{let i=t-ma.BACK_BUFFER_LENGTH;e.length&&(i=Math.max(i,e.start(0)));const r=t-n;return Math.min(r,i)})(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)}createSimplifiedSegmentObj_(e){const t=e.segment,n=e.part,i=e.segment.key||e.segment.map&&e.segment.map.key,r=e.segment.map&&!e.segment.map.bytes,s={resolvedUri:n?n.resolvedUri:t.resolvedUri,byterange:n?n.byterange:t.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part,type:this.loaderType_,start:e.startOfSegment,duration:e.duration,isEncrypted:i,isMediaInitialization:r},a=e.playlist.segments[e.mediaIndex-1];if(a&&a.timeline===t.timeline&&(a.videoTimingInfo?s.baseStartTime=a.videoTimingInfo.transmuxedDecodeEnd:a.audioTimingInfo&&(s.baseStartTime=a.audioTimingInfo.transmuxedDecodeEnd)),t.key){const n=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);s.key=this.segmentKey(t.key),s.key.iv=n}return t.map&&(s.map=this.initSegmentForMap(t.map)),s}saveTransferStats_(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)}saveBandwidthRelatedStats_(e,t){if(this.pendingSegment_.byteLength=t.bytesReceived,e<so)return void this.logger_("Ignoring segment's bandwidth because its duration of ".concat(e)+" is less than the min to record ".concat(so));const n={bandwidthInfo:{from:this.bandwidth,to:t.bandwidth}};this.trigger({type:"bandwidthupdated",metadata:n}),this.bandwidth=t.bandwidth,this.roundTrip=t.roundTripTime}handleTimeout_(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger("bandwidthupdate"),this.trigger("timeout")}segmentRequestFinished_(e,t,n){if(this.callQueue_.length)return void this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,t,n));if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return;if(t.requestId!==this.pendingSegment_.requestId)return;if(e){if(this.pendingSegment_=null,this.state="READY",e.code===Pa)return;return this.pause(),e.code===Ia?void this.handleTimeout_():(this.mediaRequestsErrored+=1,this.error(e),void this.trigger("error"))}const i=this.pendingSegment_;this.saveBandwidthRelatedStats_(i.duration,t.stats),i.endOfAllRequests=t.endOfAllRequests,n.gopInfo&&(this.gopBuffer_=((e,t,n)=>{if(!t.length)return e;if(n)return t.slice();const i=t[0].pts;let r=0;for(;r<e.length&&!(e[r].pts>=i);r++);return e.slice(0,r).concat(t)})(this.gopBuffer_,n.gopInfo,this.safeAppend_)),this.state="APPENDING",this.trigger("appending"),this.waitForAppendsToComplete_(i)}setTimeMapping_(e){const t=this.syncController_.mappingForTimeline(e);null!==t&&(this.timeMapping_=t)}updateMediaSecondsLoaded_(e){"number"===typeof e.start&&"number"===typeof e.end?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration}shouldUpdateTransmuxerTimestampOffset_(e){return null!==e&&("main"===this.loaderType_&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset())}trueSegmentStart_(e){let{currentStart:t,playlist:n,mediaIndex:i,firstVideoFrameTimeForData:r,currentVideoTimestampOffset:s,useVideoTimingInfo:a,videoTimingInfo:o,audioTimingInfo:l}=e;if("undefined"!==typeof t)return t;if(!a)return l.start;const c=n.segments[i-1];return 0!==i&&c&&"undefined"!==typeof c.start&&c.end===r+s?o.start:r}waitForAppendsToComplete_(e){const t=this.getCurrentMediaInfo_(e);if(!t)return this.error({message:"No starting media returned, likely due to an unsupported media format.",playlistExclusionDuration:1/0}),void this.trigger("error");const{hasAudio:n,hasVideo:i,isMuxed:r}=t,s="main"===this.loaderType_&&i,a=!this.audioDisabled_&&n&&!r;if(e.waitingOnAppends=0,!e.hasAppendedData_)return e.timingInfo||"number"!==typeof e.timestampOffset||(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),void this.checkAppendsDone_(e);s&&e.waitingOnAppends++,a&&e.waitingOnAppends++,s&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),a&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))}
2checkAppendsDone_(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,0===e.waitingOnAppends&&this.handleAppendsDone_())}checkForIllegalMediaSwitch(e){const t=((e,t,n)=>"main"===e&&t&&n?n.hasAudio||n.hasVideo?t.hasVideo&&!n.hasVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!t.hasVideo&&n.hasVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null:"Neither audio nor video found in segment.":null)(this.loaderType_,this.getCurrentMediaInfo_(),e);return!!t&&(this.error({message:t,playlistExclusionDuration:1/0}),this.trigger("error"),!0)}updateSourceBufferTimestampOffset_(e){if(null===e.timestampOffset||"number"!==typeof e.timingInfo.start||e.changedTimestampOffset||"main"!==this.loaderType_)return;let t=!1;e.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e.segment.videoTimingInfo,audioTimingInfo:e.segment.audioTimingInfo,timingInfo:e.timingInfo}),e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),t=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),t=!0),t&&this.trigger("timestampoffset")}getSegmentStartTimeForTimestampOffsetCalculation_(e){let{videoTimingInfo:t,audioTimingInfo:n,timingInfo:i}=e;return this.useDtsForTimestampOffset_?t&&"number"===typeof t.transmuxedDecodeStart?t.transmuxedDecodeStart:n&&"number"===typeof n.transmuxedDecodeStart?n.transmuxedDecodeStart:i.start:i.start}updateTimingInfoEnd_(e){e.timingInfo=e.timingInfo||{};const t=this.getMediaInfo_(),n="main"===this.loaderType_&&t&&t.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;n&&(e.timingInfo.end="number"===typeof n.end?n.end:n.start+e.duration)}handleAppendsDone_(){if(this.pendingSegment_){const e={segmentInfo:po({type:this.loaderType_,segment:this.pendingSegment_})};this.trigger({type:"appendsdone",metadata:e})}if(!this.pendingSegment_)return this.state="READY",void(this.paused()||this.monitorBuffer_());const e=this.pendingSegment_;e.part&&e.part.syncInfo?e.part.syncInfo.markAppended():e.segment.syncInfo&&e.segment.syncInfo.markAppended(),this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:"main"===this.loaderType_});const t=ho(e,this.sourceType_);if(t&&("warn"===t.severity?Vr.log.warn(t.message):this.logger_(t.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state="READY",e.isSyncRequest&&(this.trigger("syncinfoupdate"),!e.hasAppendedData_))return void this.logger_("Throwing away un-appended sync request ".concat(ao(e)));this.logger_("Appended ".concat(ao(e))),this.addSegmentMetadataCue_(e),this.fetchAtBuffer_=!0,this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),"main"!==this.loaderType_||this.audioDisabled_||this.timelineChangeController_.lastTimelineChange({type:"audio",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger("syncinfoupdate");const n=e.segment,i=e.part,r=n.end&&this.currentTime_()-n.end>3*e.playlist.targetDuration,s=i&&i.end&&this.currentTime_()-i.end>3*e.playlist.partTargetDuration;if(r||s)return this.logger_("bad ".concat(r?"segment":"part"," ").concat(ao(e))),void this.resetEverything();null!==this.mediaIndex&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger("appended"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}recordThroughput_(e){if(e.duration<so)return void this.logger_("Ignoring segment's throughput because its duration of ".concat(e.duration)+" is less than the min to record ".concat(so));const t=this.throughput.rate,n=Date.now()-e.endOfAllRequests+1,i=Math.floor(e.byteLength/n*8*1e3);this.throughput.rate+=(i-t)/++this.throughput.count}addSegmentMetadataCue_(e){if(!this.segmentMetadataTrack_)return;const t=e.segment,n=t.start,i=t.end;if(!ro(n)||!ro(i))return;io(n,i,this.segmentMetadataTrack_);const s=r.a.WebKitDataCue||r.a.VTTCue,a={custom:t.custom,dateTimeObject:t.dateTimeObject,dateTimeString:t.dateTimeString,programDateTime:t.programDateTime,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.ur
2i,timeline:e.timeline,playlist:e.playlist.id,start:n,end:i},o=new s(n,i,JSON.stringify(a));o.value=a,this.segmentMetadataTrack_.addCue(o)}}function mo(){}const fo=function(e){return"string"!==typeof e?e:e.replace(/./,(e=>e.toUpperCase()))},yo=["video","audio"],bo=(e,t)=>{const n=t["".concat(e,"Buffer")];return n&&n.updating||t.queuePending[e]},vo=(e,t)=>{if(0===t.queue.length)return;let n=0,i=t.queue[n];if("mediaSource"!==i.type){if("mediaSource"!==e&&t.ready()&&"closed"!==t.mediaSource.readyState&&!bo(e,t)){if(i.type!==e){if(n=((e,t)=>{for(let n=0;n<t.length;n++){const i=t[n];if("mediaSource"===i.type)return null;if(i.type===e)return n}return null})(e,t.queue),null===n)return;i=t.queue[n]}return t.queue.splice(n,1),t.queuePending[e]=i,i.action(e,t),i.doneFn?void 0:(t.queuePending[e]=null,void vo(e,t))}}else t.updating()||"closed"===t.mediaSource.readyState||(t.queue.shift(),i.action(t),i.doneFn&&i.doneFn(),vo("audio",t),vo("video",t))},_o=(e,t)=>{const n=t["".concat(e,"Buffer")],i=fo(e);n&&(n.removeEventListener("updateend",t["on".concat(i,"UpdateEnd_")]),n.removeEventListener("error",t["on".concat(i,"Error_")]),t.codecs[e]=null,t["".concat(e,"Buffer")]=null)},To=(e,t)=>e&&t&&-1!==Array.prototype.indexOf.call(e.sourceBuffers,t),xo=(e,t,n)=>(i,r)=>{const s=r["".concat(i,"Buffer")];if(To(r.mediaSource,s)){r.logger_("Appending segment ".concat(t.mediaIndex,"'s ").concat(e.length," bytes to ").concat(i,"Buffer"));try{s.appendBuffer(e)}catch(a){r.logger_("Error with code ".concat(a.code," ")+(22===a.code?"(QUOTA_EXCEEDED_ERR) ":"")+"when appending segment ".concat(t.mediaIndex," to ").concat(i,"Buffer")),r.queuePending[i]=null,n(a)}}},So=(e,t)=>(n,i)=>{const r=i["".concat(n,"Buffer")];if(To(i.mediaSource,r)){i.logger_("Removing ".concat(e," to ").concat(t," from ").concat(n,"Buffer"));try{r.remove(e,t)}catch(s){i.logger_("Remove ".concat(e," to ").concat(t," from ").concat(n,"Buffer failed"))}}},Ao=e=>(t,n)=>{const i=n["".concat(t,"Buffer")];To(n.mediaSource,i)&&(n.logger_("Setting ".concat(t,"timestampOffset to ").concat(e)),i.timestampOffset=e)},wo=e=>(t,n)=>{e()},jo=e=>t=>{if("open"===t.mediaSource.readyState){t.logger_("Calling mediaSource endOfStream(".concat(e||"",")"));try{t.mediaSource.endOfStream(e)}catch(n){Vr.log.warn("Failed to call media source endOfStream",n)}}},ko=e=>t=>{t.logger_("Setting mediaSource duration to ".concat(e));try{t.mediaSource.duration=e}catch(n){Vr.log.warn("Failed to set media source duration",n)}},Co=()=>(e,t)=>{if("open"!==t.mediaSource.readyState)return;const n=t["".concat(e,"Buffer")];if(To(t.mediaSource,n)){t.logger_("calling abort on ".concat(e,"Buffer"));try{n.abort()}catch(i){Vr.log.warn("Failed to abort on ".concat(e,"Buffer"),i)}}},Oo=(e,t)=>n=>{const i=fo(e),r=Object(m.e)(t);n.logger_("Adding ".concat(e,"Buffer with codec ").concat(t," to mediaSource"));const s=n.mediaSource.addSourceBuffer(r);s.addEventListener("updateend",n["on".concat(i,"UpdateEnd_")]),s.addEventListener("error",n["on".concat(i,"Error_")]),n.codecs[e]=t,n["".concat(e,"Buffer")]=s},Eo=e=>t=>{const n=t["".concat(e,"Buffer")];if(_o(e,t),To(t.mediaSource,n)){t.logger_("Removing ".concat(e,"Buffer with codec ").concat(t.codecs[e]," from mediaSource"));try{t.mediaSource.removeSourceBuffer(n)}catch(i){Vr.log.warn("Failed to removeSourceBuffer ".concat(e,"Buffer"),i)}}},Io=e=>(t,n)=>{const i=n["".concat(t,"Buffer")],r=Object(m.e)(e);if(!To(n.mediaSource,i))return;const s=e.substring(0,e.indexOf(".")),a=n.codecs[t];if(a.substring(0,a.indexOf("."))===s)return;const o={codecsChangeInfo:{from:a,to:e}};n.trigger({type:"codecschange",metadata:o}),n.logger_("changing ".concat(t,"Buffer codec from ").concat(a," to ").concat(e));try{i.changeType(r),n.codecs[t]=e}catch(l){o.errorType=Vr.Error.StreamingCodecsChangeError,o.error=l,l.metadata=o,n.error_=l,n.trigger("error"),Vr.log.warn("Failed to changeType on ".concat(t,"Buffer"),l)}},Po=e=>{let{type:t,sourceUpdater:n,action:i,doneFn:r,name:s}=e;n.queue.push({type:t,action:i,doneFn:r,name:s}),vo(t,n)},Ro=(e,t)=>n=>{const i=function(e){if(0===e.length)return"Buffered Ranges are empty";let t="Buffered Ranges: \n";for(let n=0;n<e.length;n++){const i=e.start(n),r=e.end(n);t+="".concat(i," --\x3e ").concat(r,". Duration (").concat(r-i,")\n")}return t}(t["".concat(e,"Buffered")]());if(t.logger_('received "updateend" event for '.concat(e," Source Buffer: "),i),t.queuePending[e]){const n=t.queuePending[e].doneFn;t.queuePending[e]=null,n&&n(t["".concat(e,"Error_")])}vo(e,t)};class Do extends Vr.EventTarget{constructor(e){super(),this.mediaSource=e,this.sourceopenListener_=()=>vo("mediaSource",this),this.mediaSource.addEventListener("sourceopen",this.sourceopenListener_),this.logger_=Kr("SourceUpdater"),this.audioTimestampOffset_=0,this.videoTimestampOffset_=0,this.queue=[],this.queuePending={audio:null,video:null},this.delayedAudioAppendQueue_=[],this.videoAppendQueued_=!1,this.codecs={},this.onVideoUpdateEnd_=Ro("video",this),this.onAudioUpdateEnd_=Ro("audio",this),this.onVideoError_=e=>{this.videoError_=e},this.onAudioError_=e=>{this.audioError_=e},this.createdSourceBuffers_=!1,this.initializedEme_=!1,this.triggeredReady_=!1}initializedEme(){this.initializedEme_=!0,this.triggerReady()}hasCreatedSourceBuffers(){return this.createdSourceBuffers_}hasInitializedAnyEme(){return this.initializedEme_}ready(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()}createSourceBuffers(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger("createdsourcebuffers"),this.triggerReady())}
2triggerReady(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger("ready"))}addSourceBuffer(e,t){Po({type:"mediaSource",sourceUpdater:this,action:Oo(e,t),name:"addSourceBuffer"})}abort(e){Po({type:e,sourceUpdater:this,action:Co(e),name:"abort"})}removeSourceBuffer(e){this.canRemoveSourceBuffer()?Po({type:"mediaSource",sourceUpdater:this,action:Eo(e),name:"removeSourceBuffer"}):Vr.log.error("removeSourceBuffer is not supported!")}canRemoveSourceBuffer(){return!Vr.browser.IS_FIREFOX&&r.a.MediaSource&&r.a.MediaSource.prototype&&"function"===typeof r.a.MediaSource.prototype.removeSourceBuffer}static canChangeType(){return r.a.SourceBuffer&&r.a.SourceBuffer.prototype&&"function"===typeof r.a.SourceBuffer.prototype.changeType}canChangeType(){return this.constructor.canChangeType()}changeType(e,t){this.canChangeType()?Po({type:e,sourceUpdater:this,action:Io(t),name:"changeType"}):Vr.log.error("changeType is not supported!")}addOrChangeSourceBuffers(e){if(!e||"object"!==typeof e||0===Object.keys(e).length)throw new Error("Cannot addOrChangeSourceBuffers to undefined codecs");Object.keys(e).forEach((t=>{const n=e[t];if(!this.hasCreatedSourceBuffers())return this.addSourceBuffer(t,n);this.canChangeType()&&this.changeType(t,n)}))}appendBuffer(e,t){const{segmentInfo:n,type:i,bytes:r}=e;if(this.processedAppend_=!0,"audio"===i&&this.videoBuffer&&!this.videoAppendQueued_)return this.delayedAudioAppendQueue_.push([e,t]),void this.logger_("delayed audio append of ".concat(r.length," until video append"));if(Po({type:i,sourceUpdater:this,action:xo(r,n||{mediaIndex:-1},t),doneFn:t,name:"appendBuffer"}),"video"===i){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;const e=this.delayedAudioAppendQueue_.slice();this.logger_("queuing delayed audio ".concat(e.length," appendBuffers")),this.delayedAudioAppendQueue_.length=0,e.forEach((e=>{this.appendBuffer.apply(this,e)}))}}audioBuffered(){return To(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:Jr()}videoBuffered(){return To(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:Jr()}buffered(){const e=To(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=To(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():function(e,t){let n=null,i=null,r=0;const s=[],a=[];if(!e||!e.length||!t||!t.length)return Jr();let o=e.length;for(;o--;)s.push({time:e.start(o),type:"start"}),s.push({time:e.end(o),type:"end"});for(o=t.length;o--;)s.push({time:t.start(o),type:"start"}),s.push({time:t.end(o),type:"end"});for(s.sort((function(e,t){return e.time-t.time})),o=0;o<s.length;o++)"start"===s[o].type?(r++,2===r&&(n=s[o].time)):"end"===s[o].type&&(r--,1===r&&(i=s[o].time)),null!==n&&null!==i&&(a.push([n,i]),n=null,i=null);return Jr(a)}(this.audioBuffered(),this.videoBuffered())}setDuration(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:mo;Po({type:"mediaSource",sourceUpdater:this,action:ko(e),name:"duration",doneFn:t})}endOfStream(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:mo;"string"!==typeof e&&(e=void 0),Po({type:"mediaSource",sourceUpdater:this,action:jo(e),name:"endOfStream",doneFn:t})}removeAudio(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:mo;this.audioBuffered().length&&0!==this.audioBuffered().end(0)?Po({type:"audio",sourceUpdater:this,action:So(e,t),doneFn:n,name:"remove"}):n()}removeVideo(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:mo;this.videoBuffered().length&&0!==this.videoBuffered().end(0)?Po({type:"video",sourceUpdater:this,action:So(e,t),doneFn:n,name:"remove"}):n()}updating(){return!(!bo("audio",this)&&!bo("video",this))}audioTimestampOffset(e){return"undefined"!==typeof e&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(Po({type:"audio",sourceUpdater:this,action:Ao(e),name:"timestampOffset"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_}videoTimestampOffset(e){return"undefined"!==typeof e&&this.videoBuffer&&this.videoTimestampOffset_!==e&&(Po({type:"video",sourceUpdater:this,action:Ao(e),name:"timestampOffset"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_}audioQueueCallback(e){this.audioBuffer&&Po({type:"audio",sourceUpdater:this,action:wo(e),name:"callback"})}videoQueueCallback(e){this.videoBuffer&&Po({type:"video",sourceUpdater:this,action:wo(e),name:"callback"})}
2dispose(){this.trigger("dispose"),yo.forEach((e=>{this.abort(e),this.canRemoveSourceBuffer()?this.removeSourceBuffer(e):this["".concat(e,"QueueCallback")]((()=>_o(e,this)))})),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()}}const Lo=e=>decodeURIComponent(escape(String.fromCharCode.apply(null,e))),Mo=new Uint8Array("\n\n".split("").map((e=>e.charCodeAt(0))));class No extends Error{constructor(){super("Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.")}}class Bo extends go{constructor(e){super(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}),this.mediaSource_=null,this.subtitlesTrack_=null,this.featuresNativeTextTracks_=e.featuresNativeTextTracks,this.loadVttJs=e.loadVttJs,this.shouldSaveSegmentTimingInfo_=!1}buffered_(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return Jr();const e=this.subtitlesTrack_.cues;return Jr([[e[0].startTime,e[e.length-1].startTime]])}initSegmentForMap(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e)return null;const n=na(e);let i=this.initSegments_[n];if(t&&!i&&e.bytes){const t=Mo.byteLength+e.bytes.byteLength,r=new Uint8Array(t);r.set(e.bytes),r.set(Mo,e.bytes.byteLength),this.initSegments_[n]=i={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:r}}return i||e}couldBeginLoading_(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}init_(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}track(e){return"undefined"===typeof e||(this.subtitlesTrack_=e,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_}remove(e,t){io(e,t,this.subtitlesTrack_)}fillBuffer_(){const e=this.chooseNextRequest_();if(e){if(null===this.syncController_.timestampOffsetForTimeline(e.timeline)){const e=()=>{this.state="READY",this.paused()||this.monitorBuffer_()};return this.syncController_.one("timestampoffset",e),void(this.state="WAITING_ON_TIMELINE")}this.loadSegment_(e)}}timestampOffsetForSegment_(){return null}chooseNextRequest_(){return this.skipEmptySegments_(super.chooseNextRequest_())}skipEmptySegments_(e){for(;e&&e.segment.empty;){if(e.mediaIndex+1>=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e}stopForError(e){this.error(e),this.state="READY",this.pause(),this.trigger("error")}segmentRequestFinished_(e,t,n){if(!this.subtitlesTrack_)return void(this.state="READY");if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return this.state="READY",void(this.mediaRequestsAborted+=1);if(e)return e.code===Ia&&this.handleTimeout_(),e.code===Pa?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(e);const i=this.pendingSegment_,s=n.mp4VttCues&&n.mp4VttCues.length;s&&(i.mp4VttCues=n.mp4VttCues),this.saveBandwidthRelatedStats_(i.duration,t.stats),t.key&&this.segmentKey(t.key,!0),this.state="APPENDING",this.trigger("appending");const a=i.segment;if(a.map&&(a.map.bytes=t.map.bytes),i.bytes=t.bytes,"function"!==typeof r.a.WebVTT&&"function"===typeof this.loadVttJs)return this.state="WAITING_ON_VTTJS",void this.loadVttJs().then((()=>this.segmentRequestFinished_(e,t,n)),(()=>this.stopForError({message:"Error loading vtt.js"})));a.requested=!0;try{this.parseVTTCues_(i)}catch(o){return void this.stopForError({message:o.message,metadata:{errorType:Vr.Error.StreamingVttParserError,error:o}})}if(s||this.updateTimeMapping_(i,this.syncController_.timelines[i.timeline],this.playlist_),i.cues.length?i.timingInfo={start:i.cues[0].startTime,end:i.cues[i.cues.length-1].endTime}:i.timingInfo={start:i.startOfSegment,end:i.startOfSegment+i.duration},i.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");i.byteLength=i.bytes.byteLength,this.mediaSecondsLoaded+=a.duration,i.cues.forEach((e=>{this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_?new r.a.VTTCue(e.startTime,e.endTime,e.text):e)})),function(e){const t=e.cues;if(!t)return;const n={};for(let i=t.length-1;i>=0;i--){const r=t[i],s="".concat(r.startTime,"-").concat(r.endTime,"-").concat(r.text);n[s]?e.removeCue(r):n[s]=r}}(this.subtitlesTrack_),this.handleAppendsDone_()}
2handleData_(e,t){const n=e&&"vtt"===e.type,i=t&&"text"===t.type;n&&i&&super.handleData_(e,t)}updateTimingInfoEnd_(){}parseMp4VttCues_(e){const t=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();e.mp4VttCues.forEach((n=>{const i=n.start+t,s=n.end+t,a=new r.a.VTTCue(i,s,n.cueText);n.settings&&n.settings.split(" ").forEach((e=>{const t=e.split(":"),n=t[0],i=t[1];a[n]=isNaN(i)?i:Number(i)})),e.cues.push(a)}))}parseVTTCues_(e){let t,n=!1;if("function"!==typeof r.a.WebVTT)throw new No;if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},e.mp4VttCues)return void this.parseMp4VttCues_(e);"function"===typeof r.a.TextDecoder?t=new r.a.TextDecoder("utf8"):(t=r.a.WebVTT.StringDecoder(),n=!0);const i=new r.a.WebVTT.Parser(r.a,r.a.vttjs,t);if(i.oncue=e.cues.push.bind(e.cues),i.ontimestampmap=t=>{e.timestampmap=t},i.onparsingerror=e=>{Vr.log.warn("Error encountered when parsing cues: "+e.message)},e.segment.map){let t=e.segment.map.bytes;n&&(t=Lo(t)),i.parse(t)}let s=e.bytes;n&&(s=Lo(s)),i.parse(s),i.flush()}updateTimeMapping_(e,t,n){const i=e.segment;if(!t)return;if(!e.cues.length)return void(i.empty=!0);const{MPEGTS:r,LOCAL:s}=e.timestampmap,a=r/S.ONE_SECOND_IN_TS-s+t.mapping;if(e.cues.forEach((e=>{const n=e.endTime-e.startTime,i=this.handleRollover_(e.startTime+a,t.time);e.startTime=Math.max(i,0),e.endTime=Math.max(i+n,0)})),!n.syncInfo){const t=e.cues[0].startTime,r=e.cues[e.cues.length-1].startTime;n.syncInfo={mediaSequence:n.mediaSequence+e.mediaIndex,time:Math.min(t,r-i.duration)}}}handleRollover_(e,t){if(null===t)return e;let n=e*S.ONE_SECOND_IN_TS;const i=t*S.ONE_SECOND_IN_TS;let r;for(r=i<n?-8589934592:8589934592;Math.abs(n-i)>4294967296;)n+=r;return n/S.ONE_SECOND_IN_TS}}const Uo=function(e,t){const n=e.cues;for(let i=0;i<n.length;i++){const e=n[i];if(t>=e.adStartTime&&t<=e.adEndTime)return e}return null};class Fo{constructor(e){let{start:t,end:n,segmentIndex:i,partIndex:r=null,appended:s=!1}=e;this.start_=t,this.end_=n,this.segmentIndex_=i,this.partIndex_=r,this.appended_=s}isInRange(e){return e>=this.start&&e<this.end}markAppended(){this.appended_=!0}resetAppendedStatus(){this.appended_=!1}get isAppended(){return this.appended_}get start(){return this.start_}get end(){return this.end_}get segmentIndex(){return this.segmentIndex_}get partIndex(){return this.partIndex_}}class qo{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this.segmentSyncInfo_=e,this.partsSyncInfo_=t}get segmentSyncInfo(){return this.segmentSyncInfo_}get partsSyncInfo(){return this.partsSyncInfo_}get hasPartsSyncInfo(){return this.partsSyncInfo_.length>0}resetAppendStatus(){this.segmentSyncInfo_.resetAppendedStatus(),this.partsSyncInfo_.forEach((e=>e.resetAppendedStatus()))}}class zo{constructor(){this.storage_=new Map,this.diagnostics_="",this.isReliable_=!1,this.start_=-1/0,this.end_=1/0}get start(){return this.start_}get end(){return this.end_}get diagnostics(){return this.diagnostics_}get isReliable(){return this.isReliable_}resetAppendedStatus(){this.storage_.forEach((e=>e.resetAppendStatus()))}update(e,t){const{mediaSequence:n,segments:i}=e;if(this.isReliable_=this.isReliablePlaylist_(n,i),this.isReliable_)return this.updateStorage_(i,n,this.calculateBaseTime_(n,i,t))}getSyncInfoForTime(e){for(const{segmentSyncInfo:t,partsSyncInfo:n}of this.storage_.values())if(n.length){for(const i of n)if(i.isInRange(e))return i}else if(t.isInRange(e))return t;return null}getSyncInfoForMediaSequence(e){return this.storage_.get(e)}updateStorage_(e,t,n){const i=new Map;let r="\n",s=n,a=t;this.start_=s,e.forEach(((e,t)=>{const n=this.storage_.get(a),o=s,l=o+e.duration,c=Boolean(n&&n.segmentSyncInfo&&n.segmentSyncInfo.isAppended),d=new Fo({start:o,end:l,appended:c,segmentIndex:t});e.syncInfo=d;let u=s;const h=(e.parts||[]).map(((e,i)=>{const s=u,o=u+e.duration,l=Boolean(n&&n.partsSyncInfo&&n.partsSyncInfo[i]&&n.partsSyncInfo[i].isAppended),c=new Fo({start:s,end:o,appended:l,segmentIndex:t,partIndex:i});return u=o,r+="Media Sequence: ".concat(a,".").concat(i," | Range: ").concat(s," --\x3e ").concat(o," | Appended: ").concat(l,"\n"),e.syncInfo=c,
2c}));i.set(a,new qo(d,h)),r+="".concat(Ja(e.resolvedUri)," | Media Sequence: ").concat(a," | Range: ").concat(o," --\x3e ").concat(l," | Appended: ").concat(c,"\n"),a++,s=l})),this.end_=s,this.storage_=i,this.diagnostics_=r}calculateBaseTime_(e,t,n){if(!this.storage_.size)return 0;if(this.storage_.has(e))return this.storage_.get(e).segmentSyncInfo.start;const i=Math.min(...this.storage_.keys());if(e<i){const n=i-e;let r=this.storage_.get(i).segmentSyncInfo.start;for(let e=0;e<n;e++){r-=t[e].duration}return r}return n}isReliablePlaylist_(e,t){return void 0!==e&&null!==e&&Array.isArray(t)&&t.length}}class Vo extends zo{constructor(e){super(),this.parent_=e}calculateBaseTime_(e,t,n){if(!this.storage_.size){const t=this.parent_.getSyncInfoForMediaSequence(e);return t?t.segmentSyncInfo.start:0}return super.calculateBaseTime_(e,t,n)}}const Ho=[{name:"VOD",run:(e,t,n,i,r)=>{if(n!==1/0){return{time:0,segmentIndex:0,partIndex:null}}return null}},{name:"MediaSequence",run:(e,t,n,i,r,s)=>{const a=e.getMediaSequenceSync(s);if(!a)return null;if(!a.isReliable)return null;const o=a.getSyncInfoForTime(r);return o?{time:o.start,partIndex:o.partIndex,segmentIndex:o.segmentIndex}:null}},{name:"ProgramDateTime",run:(e,t,n,i,r)=>{if(!Object.keys(e.timelineToDatetimeMappings).length)return null;let s=null,a=null;const o=cs(t);r=r||0;for(let l=0;l<o.length;l++){const n=o[t.endList||0===r?l:o.length-(l+1)],i=n.segment,c=e.timelineToDatetimeMappings[i.timeline];if(!c||!i.dateTimeObject)continue;let d=i.dateTimeObject.getTime()/1e3+c;if(i.parts&&"number"===typeof n.partIndex)for(let e=0;e<n.partIndex;e++)d+=i.parts[e].duration;const u=Math.abs(r-d);if(null!==a&&(0===u||a<u))break;a=u,s={time:d,segmentIndex:n.segmentIndex,partIndex:n.partIndex}}return s}},{name:"Segment",run:(e,t,n,i,r)=>{let s=null,a=null;r=r||0;const o=cs(t);for(let l=0;l<o.length;l++){const e=o[t.endList||0===r?l:o.length-(l+1)],n=e.segment,c=e.part&&e.part.start||n&&n.start;if(n.timeline===i&&"undefined"!==typeof c){const t=Math.abs(r-c);if(null!==a&&a<t)break;(!s||null===a||a>=t)&&(a=t,s={time:c,segmentIndex:e.segmentIndex,partIndex:e.partIndex})}}return s}},{name:"Discontinuity",run:(e,t,n,i,r)=>{let s=null;if(r=r||0,t.discontinuityStarts&&t.discontinuityStarts.length){let n=null;for(let i=0;i<t.discontinuityStarts.length;i++){const a=t.discontinuityStarts[i],o=t.discontinuitySequence+i+1,l=e.discontinuities[o];if(l){const e=Math.abs(r-l.time);if(null!==n&&n<e)break;(!s||null===n||n>=e)&&(n=e,s={time:l.time,segmentIndex:a,partIndex:null})}}}return s}},{name:"Playlist",run:(e,t,n,i,r)=>{if(t.syncInfo){return{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence,partIndex:null}}return null}}];class Wo extends Vr.EventTarget{constructor(){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={};const e=new zo,t=new Vo(e),n=new Vo(e);this.mediaSequenceStorage_={main:e,audio:t,vtt:n},this.logger_=Kr("SyncController")}getMediaSequenceSync(e){return this.mediaSequenceStorage_[e]||null}getSyncPoint(e,t,n,i,r){if(t!==1/0){return Ho.find((e=>{let{name:t}=e;return"VOD"===t})).run(this,e,t)}const s=this.runStrategies_(e,t,n,i,r);if(!s.length)return null;for(const a of s){const{syncPoint:t,strategy:n}=a,{segmentIndex:r,time:s}=t;if(r<0)continue;const o=s,l=o+e.segments[r].duration;if(this.logger_("Strategy: ".concat(n,". Current time: ").concat(i,". selected segment: ").concat(r,". Time: [").concat(o," -> ").concat(l,"]}")),i>=o&&i<l)return this.logger_("Found sync point with exact match: ",t),t}return this.selectSyncPoint_(s,{key:"time",value:i})}getExpiredTime(e,t){if(!e||!e.segments)return null;const n=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!n.length)return null;const i=this.selectSyncPoint_(n,{key:"segmentIndex",value:0});return i.segmentIndex>0&&(i.time*=-1),Math.abs(i.time+ms({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:i.segmentIndex,endIndex:0}))}runStrategies_(e,t,n,i,r){const s=[];for(let a=0;a<Ho.length;a++){const o=Ho[a],l=o.run(this,e,t,n,i,r);l&&(l.strategy=o.name,s.push({strategy:o.name,syncPoint:l}))}return s}selectSyncPoint_(e,t){let n=e[0].syncPoint,i=Math.abs(e[0].syncPoint[t.key]-t.value),r=e[0].strategy;for(let s=1;s<e.length;s++){const a=Math.abs(e[s].syncPoint[t.key]-t.value);a<i&&(i=a,n=e[s].syncPoint,r=e[s].strategy)}return this.logger_("syncPoint for [".concat(t.key,": ").concat(t.value,"] chosen with strategy")+" [".concat(r,"]: [time:").concat(n.time,",")+" segmentIndex:".concat(n.segmentIndex)+("number"===typeof n.partIndex?",partIndex:".concat(n.partIndex):"")+"]"),n}saveExpiredSegmentInfo(e,t){const n=t.mediaSequence-e.mediaSequence;if(n>86400)Vr.log.warn("Not saving expired segment info. Media sequence gap ".concat(n," is too large."));else for(let i=n-1;i>=0;i--){const n=e.segments[i];if(n&&"undefined"!==typeof n.start){t.syncInfo={mediaSequence:e.mediaSequence+i,time:n.start}
2,this.logger_("playlist refresh sync: [time:".concat(t.syncInfo.time,",")+" mediaSequence: ".concat(t.syncInfo.mediaSequence,"]")),this.trigger("syncinfoupdate");break}}}setDateTimeMappingForStart(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){const t=e.segments[0],n=t.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[t.timeline]=-n}}saveSegmentTimingInfo(e){let{segmentInfo:t,shouldSaveTimelineMapping:n}=e;const i=this.calculateSegmentTimeMapping_(t,t.timingInfo,n),r=t.segment;i&&(this.saveDiscontinuitySyncInfo_(t),t.playlist.syncInfo||(t.playlist.syncInfo={mediaSequence:t.playlist.mediaSequence+t.mediaIndex,time:r.start}));const s=r.dateTimeObject;r.discontinuity&&n&&s&&(this.timelineToDatetimeMappings[r.timeline]=-s.getTime()/1e3)}timestampOffsetForTimeline(e){return"undefined"===typeof this.timelines[e]?null:this.timelines[e].time}mappingForTimeline(e){return"undefined"===typeof this.timelines[e]?null:this.timelines[e].mapping}calculateSegmentTimeMapping_(e,t,n){const i=e.segment,r=e.part;let s,a,o=this.timelines[e.timeline];if("number"===typeof e.timestampOffset)o={time:e.startOfSegment,mapping:e.startOfSegment-t.start},n&&(this.timelines[e.timeline]=o,this.trigger("timestampoffset"),this.logger_("time mapping for timeline ".concat(e.timeline,": ")+"[time: ".concat(o.time,"] [mapping: ").concat(o.mapping,"]"))),s=e.startOfSegment,a=t.end+o.mapping;else{if(!o)return!1;s=t.start+o.mapping,a=t.end+o.mapping}return r&&(r.start=s,r.end=a),(!i.start||s<i.start)&&(i.start=s),i.end=a,!0}saveDiscontinuitySyncInfo_(e){const t=e.playlist,n=e.segment;if(n.discontinuity)this.discontinuities[n.timeline]={time:n.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(let i=0;i<t.discontinuityStarts.length;i++){const r=t.discontinuityStarts[i],s=t.discontinuitySequence+i+1,a=r-e.mediaIndex,o=Math.abs(a);if(!this.discontinuities[s]||this.discontinuities[s].accuracy>o){let i;i=a<0?n.start-ms({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex,endIndex:r}):n.end+ms({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex+1,endIndex:r}),this.discontinuities[s]={time:i,accuracy:o}}}}dispose(){this.trigger("dispose"),this.off()}}class Go extends Vr.EventTarget{constructor(){super(),this.pendingTimelineChanges_={},this.lastTimelineChanges_={}}clearPendingTimelineChange(e){this.pendingTimelineChanges_[e]=null,this.trigger("pendingtimelinechange")}pendingTimelineChange(e){let{type:t,from:n,to:i}=e;return"number"===typeof n&&"number"===typeof i&&(this.pendingTimelineChanges_[t]={type:t,from:n,to:i},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[t]}lastTimelineChange(e){let{type:t,from:n,to:i}=e;if("number"===typeof n&&"number"===typeof i){this.lastTimelineChanges_[t]={type:t,from:n,to:i},delete this.pendingTimelineChanges_[t];const e={timelineChangeInfo:{from:n,to:i}};this.trigger({type:"timelinechange",metadata:e})}return this.lastTimelineChanges_[t]}dispose(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()}}const Xo=ba(va((function(){var t=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var n=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(n,1),n>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var n=t.length,i=0;i<n;++i)t[i].call(this,arguments[1]);else for(var r=Array.prototype.slice.call(arguments,1),s=t.length,a=0;a<s;++a)t[a].apply(this,r)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on("data",(function(t){e.push(t)}))},e}();let n=null;class i{constructor(e){let t,i,r;n||(n=function(){const e=[[[],[],[],[],[]],[[],[],[],[],[]]],t=e[0],n=e[1],i=t[4],r=n[4];let s,a,o;const l=[],c=[];let d,u,h,p,g,m;for(s=0;s<256;s++)c[(l[s]=s<<1^283*(s>>7))^s]=s;for(a=o=0;!i[a];a^=d||1,o=c[o]||1)for(p=o^o<<1^o<<2^o<<3^o<<4,p=p>>
vendor: 4,291 bytes, line 2
28^255&p^99,i[a]=p,r[p]=a,h=l[u=l[d=l[a]]],m=16843009*h^65537*u^257*d^16843008*a,g=257*l[p]^16843008*p,s=0;s<4;s++)t[s][a]=g=g<<24^g>>>8,n[s][p]=m=m<<24^m>>>8;for(s=0;s<5;s++)t[s]=t[s].slice(0),n[s]=n[s].slice(0);return e}()),this._tables=[[n[0][0].slice(),n[0][1].slice(),n[0][2].slice(),n[0][3].slice(),n[0][4].slice()],[n[1][0].slice(),n[1][1].slice(),n[1][2].slice(),n[1][3].slice(),n[1][4].slice()]];const s=this._tables[0][4],a=this._tables[1],o=e.length;let l=1;if(4!==o&&6!==o&&8!==o)throw new Error("Invalid aes key size");const c=e.slice(0),d=[];for(this._key=[c,d],t=o;t<4*o+28;t++)r=c[t-1],(t%o===0||8===o&&t%o===4)&&(r=s[r>>>24]<<24^s[r>>16&255]<<16^s[r>>8&255]<<8^s[255&r],t%o===0&&(r=r<<8^r>>>24^l<<24,l=l<<1^283*(l>>7))),c[t]=c[t-o]^r;for(i=0;t;i++,t--)r=c[3&i?t:t-4],d[i]=t<=4||i<4?r:a[0][s[r>>>24]]^a[1][s[r>>16&255]]^a[2][s[r>>8&255]]^a[3][s[255&r]]}decrypt(e,t,n,i,r,s){const a=this._key[1];let o,l,c,d=e^a[0],u=i^a[1],h=n^a[2],p=t^a[3];const g=a.length/4-2;let m,f=4;const y=this._tables[1],b=y[0],v=y[1],_=y[2],T=y[3],x=y[4];for(m=0;m<g;m++)o=b[d>>>24]^v[u>>16&255]^_[h>>8&255]^T[255&p]^a[f],l=b[u>>>24]^v[h>>16&255]^_[p>>8&255]^T[255&d]^a[f+1],c=b[h>>>24]^v[p>>16&255]^_[d>>8&255]^T[255&u]^a[f+2],p=b[p>>>24]^v[d>>16&255]^_[u>>8&255]^T[255&h]^a[f+3],f+=4,d=o,u=l,h=c;for(m=0;m<4;m++)r[(3&-m)+s]=x[d>>>24]<<24^x[u>>16&255]<<16^x[h>>8&255]<<8^x[255&p]^a[f++],o=d,d=u,u=h,h=p,p=o}}class r extends t{constructor(){super(t),this.jobs=[],this.delay=1,this.timeout_=null}processJob_(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null}push(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}const s=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24};class a{constructor(e,t,n,i){const o=a.STEP,l=new Int32Array(e.buffer),c=new Uint8Array(e.byteLength);let d=0;for(this.asyncStream_=new r,this.asyncStream_.push(this.decryptChunk_(l.subarray(d,d+o),t,n,c)),d=o;d<l.length;d+=o)n=new Uint32Array([s(l[d-4]),s(l[d-3]),s(l[d-2]),s(l[d-1])]),this.asyncStream_.push(this.decryptChunk_(l.subarray(d,d+o),t,n,c));this.asyncStream_.push((function(){var e;i(null,(e=c).subarray(0,e.byteLength-e[e.byteLength-1]))}))}static get STEP(){return 32e3}decryptChunk_(e,t,n,r){return function(){const a=function(e,t,n){const r=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),a=new i(Array.prototype.slice.call(t)),o=new Uint8Array(e.byteLength),l=new Int32Array(o.buffer);let c,d,u,h,p,g,m,f,y;for(c=n[0],d=n[1],u=n[2],h=n[3],y=0;y<r.length;y+=4)p=s(r[y]),g=s(r[y+1]),m=s(r[y+2]),f=s(r[y+3]),a.decrypt(p,g,m,f,l,y),l[y]=s(l[y]^c),l[y+1]=s(l[y+1]^d),l[y+2]=s(l[y+2]^u),l[y+3]=s(l[y+3]^h),c=p,d=g,u=m,h=f;return o}(e,t,n);r.set(a,e.byteOffset)}}}var o,l="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof e?e:"undefined"!==typeof self?self:{};o="undefined"!==typeof window?window:"undefined"!==typeof l?l:"undefined"!==typeof self?self:{};var c=o.BigInt||Number;c("0x1"),c("0x100"),c("0x10000"),c("0x1000000"),c("0x100000000"),c("0x10000000000"),c("0x1000000000000"),c("0x100000000000000"),c("0x10000000000000000"),function(){var e=new Uint16Array([65484]),t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);255===t[0]||t[0]}();const d=function(e){const t={};return Object.keys(e).forEach((n=>{const i=e[n];var r;r=i,("function"===ArrayBuffer.isView?ArrayBuffer.isView(r):r&&r.buffer instanceof ArrayBuffer)?t[n]={bytes:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength}:t[n]=i})),t};self.onmessage=function(e){const t=e.data,n=new Uint8Array(t.encrypted.bytes,t.encrypted.byteOffset,t.encrypted.byteLength),i=new Uint32Array(t.key.bytes,t.key.byteOffset,t.key.byteLength/4),r=new Uint32Array(t.iv.bytes,t.iv.byteOffset,t.iv.byteLength/4);new a(n,i,r,(function(e,n){self.postMessage(d({source:t.source,decrypted:n}),[n.buffer])}))}})));var Yo=ya(Xo);const Qo=e=>{let t=e.default?"main":"alternative";return e.characteristics&&e.characteristics.indexOf("public.accessibility.describes-video")>=0&&(t="main-desc"),t},Ko=(e,t)=>{e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},Zo=(e,t)=>{t.activePlaylistLoader=e,e.load()},Jo={AUDIO:(e,t)=>
vendor: 3,533 bytes, line 2
2()=>{const{mediaTypes:{[e]:n},excludePlaylist:i}=t,r=n.activeTrack(),s=n.activeGroup(),a=(s.filter((e=>e.default))[0]||s[0]).id,o=n.tracks[a];if(r!==o){Vr.log.warn("Problem encountered loading the alternate audio track.Switching back to default.");for(const e in n.tracks)n.tracks[e].enabled=n.tracks[e]===o;n.onTrackChanged()}else i({error:{message:"Problem encountered loading the default audio track."}})},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:n}}=t;Vr.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track.");const i=n.activeTrack();i&&(i.mode="disabled"),n.onTrackChanged()}},$o={AUDIO:(e,t,n)=>{if(!t)return;const{tech:i,requestOptions:r,segmentLoaders:{[e]:s}}=n;t.on("loadedmetadata",(()=>{const e=t.media();s.playlist(e,r),(!i.paused()||e.endList&&"none"!==i.preload())&&s.load()})),t.on("loadedplaylist",(()=>{s.playlist(t.media(),r),i.paused()||s.load()})),t.on("error",Jo[e](e,n))},SUBTITLES:(e,t,n)=>{const{tech:i,requestOptions:r,segmentLoaders:{[e]:s},mediaTypes:{[e]:a}}=n;t.on("loadedmetadata",(()=>{const e=t.media();s.playlist(e,r),s.track(a.activeTrack()),(!i.paused()||e.endList&&"none"!==i.preload())&&s.load()})),t.on("loadedplaylist",(()=>{s.playlist(t.media(),r),i.paused()||s.load()})),t.on("error",Jo[e](e,n))}},el={AUDIO:(e,t)=>{const{vhs:n,sourceType:i,segmentLoaders:{[e]:r},requestOptions:s,main:{mediaGroups:a},mediaTypes:{[e]:{groups:o,tracks:l,logger_:c}},mainPlaylistLoader:d}=t,u=As(d.main);a[e]&&0!==Object.keys(a[e]).length||(a[e]={main:{default:{default:!0}}},u&&(a[e].main.default.playlists=d.main.playlists));for(const h in a[e]){o[h]||(o[h]=[]);for(const r in a[e][h]){let p,g=a[e][h][r];if(u?(c("AUDIO group '".concat(h,"' label '").concat(r,"' is a main playlist")),g.isMainPlaylist=!0,p=null):p="vhs-json"===i&&g.playlists?new Ys(g.playlists[0],n,s):g.resolvedUri?new Ys(g.resolvedUri,n,s):g.playlists&&"dash"===i?new ga(g.playlists[0],n,s,d):null,g=Zr({id:r,playlistLoader:p},g),$o[e](e,g.playlistLoader,t),o[h].push(g),"undefined"===typeof l[r]){const e=new Vr.AudioTrack({id:r,kind:Qo(g),enabled:!1,language:g.language,default:g.default,label:r});l[r]=e}}}r.on("error",Jo[e](e,t))},SUBTITLES:(e,t)=>{const{tech:n,vhs:i,sourceType:r,segmentLoaders:{[e]:s},requestOptions:a,main:{mediaGroups:o},mediaTypes:{[e]:{groups:l,tracks:c}},mainPlaylistLoader:d}=t;for(const u in o[e]){l[u]||(l[u]=[]);for(const s in o[e][u]){if(!i.options_.useForcedSubtitles&&o[e][u][s].forced)continue;let h,p=o[e][u][s];if("hls"===r)h=new Ys(p.resolvedUri,i,a);else if("dash"===r){if(!p.playlists.filter((e=>e.excludeUntil!==1/0)).length)return;h=new ga(p.playlists[0],i,a,d)}else"vhs-json"===r&&(h=new Ys(p.playlists?p.playlists[0]:p.resolvedUri,i,a));if(p=Zr({id:s,playlistLoader:h},p),$o[e](e,p.playlistLoader,t),l[u].push(p),"undefined"===typeof c[s]){const e=n.addRemoteTextTrack({id:s,kind:"subtitles",default:p.default&&p.autoselect,language:p.language,label:s},!1).track;c[s]=e}}}s.on("error",Jo[e](e,t))},"CLOSED-CAPTIONS":(e,t)=>{const{tech:n,main:{mediaGroups:i},mediaTypes:{[e]:{groups:r,tracks:s}}}=t;for(const a in i[e]){r[a]||(r[a]=[]);for(const t in i[e][a]){const o=i[e][a][t];if(!/^(?:CC|SERVICE)/.test(o.instreamId))continue;const l=n.options_.vhs&&n.options_.vhs.captionServices||{};let c={label:t,language:o.language,instreamId:o.instreamId,default:o.default&&o.autoselect};if(l[c.instreamId]&&(c=Zr(c,l[c.instreamId])),void 0===c.default&&delete c.default,r[a].push(Zr({id:t},o)),"undefined"===typeof s[t]){const e=n.addRemoteTextTrack({id:c.instreamId,
2kind:"captions",default:c.default,language:c.language,label:c.label},!1).track;s[t]=e}}}}},tl=(e,t)=>{for(let n=0;n<e.length;n++){if(xs(t,e[n]))return!0;if(e[n].playlists&&tl(e[n].playlists,t))return!0}return!1},nl={AUDIO:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:n}}}=t;for(const e in n)if(n[e].enabled)return n[e];return null},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:n}}}=t;for(const e in n)if("showing"===n[e].mode||"hidden"===n[e].mode)return n[e];return null}},il=e=>{["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((t=>{el[t](t,e)}));const{mediaTypes:t,mainPlaylistLoader:n,tech:i,vhs:r,segmentLoaders:{AUDIO:s,main:a}}=e;["AUDIO","SUBTITLES"].forEach((n=>{t[n].activeGroup=((e,t)=>n=>{const{mainPlaylistLoader:i,mediaTypes:{[e]:{groups:r}}}=t,s=i.media();if(!s)return null;let a=null;s.attributes[e]&&(a=r[s.attributes[e]]);const o=Object.keys(r);if(!a)if("AUDIO"===e&&o.length>1&&As(t.main))for(let e=0;e<o.length;e++){const t=r[o[e]];if(tl(t,s)){a=t;break}}else r.main?a=r.main:1===o.length&&(a=r[o[0]]);return"undefined"===typeof n?a:null!==n&&a&&a.filter((e=>e.id===n.id))[0]||null})(n,e),t[n].activeTrack=nl[n](n,e),t[n].onGroupChanged=((e,t)=>()=>{const{segmentLoaders:{[e]:n,main:i},mediaTypes:{[e]:r}}=t,s=r.activeTrack(),a=r.getActiveGroup(),o=r.activePlaylistLoader,l=r.lastGroup_;a&&l&&a.id===l.id||(r.lastGroup_=a,r.lastTrack_=s,Ko(n,r),a&&!a.isMainPlaylist&&(a.playlistLoader?(n.resyncLoader(),Zo(a.playlistLoader,r)):o&&i.resetEverything()))})(n,e),t[n].onGroupChanging=((e,t)=>()=>{const{segmentLoaders:{[e]:n},mediaTypes:{[e]:i}}=t;i.lastGroup_=null,n.abort(),n.pause()})(n,e),t[n].onTrackChanged=((e,t)=>()=>{const{mainPlaylistLoader:n,segmentLoaders:{[e]:i,main:r},mediaTypes:{[e]:s}}=t,a=s.activeTrack(),o=s.getActiveGroup(),l=s.activePlaylistLoader,c=s.lastTrack_;if((!c||!a||c.id!==a.id)&&(s.lastGroup_=o,s.lastTrack_=a,Ko(i,s),o)){if(o.isMainPlaylist){if(!a||!c||a.id===c.id)return;const e=t.vhs.playlistController_,i=e.selectPlaylist();if(e.media()===i)return;return s.logger_("track change. Switching main audio from ".concat(c.id," to ").concat(a.id)),n.pause(),r.resetEverything(),void e.fastQualityChange_(i)}if("AUDIO"===e){if(!o.playlistLoader)return r.setAudio(!0),void r.resetEverything();i.setAudio(!0),r.setAudio(!1)}l!==o.playlistLoader?(i.track&&i.track(a),i.resetEverything(),Zo(o.playlistLoader,s)):Zo(o.playlistLoader,s)}})(n,e),t[n].getActiveGroup=((e,t)=>{let{mediaTypes:n}=t;return()=>{const t=n[e].activeTrack();return t?n[e].activeGroup(t):null}})(n,e)}));const o=t.AUDIO.activeGroup();if(o){const e=(o.filter((e=>e.default))[0]||o[0]).id;t.AUDIO.tracks[e].enabled=!0,t.AUDIO.onGroupChanged(),t.AUDIO.onTrackChanged();t.AUDIO.getActiveGroup().playlistLoader?(a.setAudio(!1),s.setAudio(!0)):a.setAudio(!0)}n.on("mediachange",(()=>{["AUDIO","SUBTITLES"].forEach((e=>t[e].onGroupChanged()))})),n.on("mediachanging",(()=>{["AUDIO","SUBTITLES"].forEach((e=>t[e].onGroupChanging()))}));const l=()=>{t.AUDIO.onTrackChanged(),i.trigger({type:"usage",name:"vhs-audio-change"})};i.audioTracks().addEventListener("change",l),i.remoteTextTracks().addEventListener("change",t.SUBTITLES.onTrackChanged),r.on("dispose",(()=>{i.audioTracks().removeEventListener("change",l),i.remoteTextTracks().removeEventListener("change",t.SUBTITLES.onTrackChanged)})),i.clearTracks("audio");for(const c in t.AUDIO.tracks)i.audioTracks().addTrack(t.AUDIO.tracks[c])};class rl{constructor(){this.priority_=[],this.pathwayClones_=new Map}set version(e){1===e&&(this.version_=e)}set ttl(e){this.ttl_=e||300}set reloadUri(e){e&&(this.reloadUri_=Yr(this.reloadUri_,e))}set priority(e){e&&e.length&&(this.priority_=e)}set pathwayClones(e){e&&e.length&&(this.pathwayClones_=new Map(e.map((e=>[e.ID,e]))))}get version(){return this.version_}get ttl(){return this.ttl_}get reloadUri(){return this.reloadUri_}get priority(){return this.priority_}get pathwayClones(){return this.pathwayClones_}}class sl extends Vr.EventTarget{constructor(e,t){super(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=!1,this.availablePathways_=new Set,this.steeringManifest=new rl,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.currentPathwayClones=new Map,this.nextPathwayClones=new Map,this.excludedSteeringManifestURLs=new Set,this.logger_=Kr("Content Steering"),this.xhr_=e,this.getBandwidth_=t}assignTagProperties(e,t){this.manifestType_=t.serverUri?"HLS":"DASH";const n=t.serverUri||t.serverURL;if(!n)return this.logger_("steering manifest URL is ".concat(n,", cannot request steering manifest.")),void this.trigger("error");n.startsWith("data:")?this.decodeDataUriManifest_(n.substring(n.indexOf(",")+1)):(this.steeringManifest.reloadUri=Yr(e,n),this.defaultPathway=t.pathwayId||t.defaultServiceLocation,this.queryBeforeStart=t.queryBeforeStart,this.proxyServerUrl_=t.proxyServerURL,this.defaultPathway&&!this.queryBeforeStart&&this.trigger("content-steering"))}requestSteeringManifest(e){const t=this.steeringManifest.reloadUri;if(!t)return;const n=e?t:this.getRequestURI(t);if(!n)return this.logger_("No valid content steering manifest URIs. Stopping content steering."),this.trigger("error"),void this.dispose();const i={contentSteeringInfo:{uri:n}};this.trigger({type:"contentsteeringloadstart",metadata:i}),this.request_=this.xhr_({uri:n,requestType:"content-steering-manifest"},((e,t)=>{if(e){if(410===t.status)return this.logger_("manifest request 410 ".concat(e,".")),this.logger_("There will be no more content steering requests to ".concat(n," this session.")),void this.excludedSteeringManifestURLs.add(n);if(429===t.status){const n=t.responseHeaders["retry-after"];return this.logger_("manifest request 429 ".concat(e,".")),this.logger_("content steering will retry in ".concat(n," seconds.")),void this.startTTLTimeout_(parseInt(n,10))}return this.logger_("manifest failed to load ".concat(e,".")),void this.startTTLTimeout_()}let r;this.trigger({type:"contentsteeringloadcomplete",metadata:i});try{r=JSON.parse(this.request_.responseText)}catch(a){const e={errorType:Vr.Error.StreamingContentSteeringParserError,error:a};this.trigger({type:"error",metadata:e})}this.assignSteeringProperties_(r);const s={contentSteeringInfo:i.contentSteeringInfo,contentSteeringManifest:{version:this.steeringManifest.version,reloadUri:this.steeringManifest.reloadUri,priority:this.steeringManifest.priority}};this.trigger({type:"contentsteeringparsed",metadata:s}),this.startTTLTimeout_()}))}setProxyServerUrl_(e){const t=new r.a.URL(e),n=new r.a.URL(this.proxyServerUrl_);return n.searchParams.set("url",encodeURI(t.toString())),this.setSteeringParams_(n.toString())}decodeDataUriManifest_(e){const t=JSON.parse(r.a.atob(e));this.assignSteeringProperties_(t)}setSteeringParams_(e){const t=new r.a.URL(e),n=this.getPathway(),i=this.getBandwidth_();if(n){const e="_".concat(this.manifestType_,"_pathway");t.searchParams.set(e,n)}if(i){const e="_".concat(this.manifestType_,"_throughput");t.searchParams.set(e,i)}return t.toString()}assignSteeringProperties_(e){if(this.steeringManifest.version=e.VERSION,!this.steeringManifest.version)return this.logger_("manifest version is ".concat(e.VERSION,", which is not supported.")),void this.trigger("error");this.steeringManifest.ttl=e.TTL,this.steeringManifest.reloadUri=e["RELOAD-URI"],this.steeringManifest.priority=e["PATHWAY-PRIORITY"]||e["SERVICE-LOCATION-PRIORITY"],this.steeringManifest.pathwayClones=e["PATHWAY-CLONES"],this.nextPathwayClones=this.steeringManifest.pathwayClones,this.availablePathways_.size||(this.logger_("There are no available pathways for c
2ontent steering. Ending content steering."),this.trigger("error"),this.dispose());const t=(e=>{for(const t of e)if(this.availablePathways_.has(t))return t;return[...this.availablePathways_][0]})(this.steeringManifest.priority);this.currentPathway!==t&&(this.currentPathway=t,this.trigger("content-steering"))}getPathway(){return this.currentPathway||this.defaultPathway}getRequestURI(e){if(!e)return null;const t=e=>this.excludedSteeringManifestURLs.has(e);if(this.proxyServerUrl_){const n=this.setProxyServerUrl_(e);if(!t(n))return n}const n=this.setSteeringParams_(e);return t(n)?null:n}startTTLTimeout_(){const e=1e3*(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.steeringManifest.ttl);this.ttlTimeout_=r.a.setTimeout((()=>{this.requestSteeringManifest()}),e)}clearTTLTimeout_(){r.a.clearTimeout(this.ttlTimeout_),this.ttlTimeout_=null}abort(){this.request_&&this.request_.abort(),this.request_=null}dispose(){this.off("content-steering"),this.off("error"),this.abort(),this.clearTTLTimeout_(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=null,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.excludedSteeringManifestURLs=new Set,this.availablePathways_=new Set,this.steeringManifest=new rl}addAvailablePathway(e){e&&this.availablePathways_.add(e)}clearAvailablePathways(){this.availablePathways_.clear()}excludePathway(e){return this.availablePathways_.delete(e)}didDASHTagChange(e,t){return!t&&this.steeringManifest.reloadUri||t&&(Yr(e,t.serverURL)!==this.steeringManifest.reloadUri||t.defaultServiceLocation!==this.defaultPathway||t.queryBeforeStart!==this.queryBeforeStart||t.proxyServerURL!==this.proxyServerUrl_)}getAvailablePathways(){return this.availablePathways_}}let al;const ol=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"],ll=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]};class cl extends Vr.EventTarget{constructor(e){super(),this.fastQualityChange_=((e,t)=>{let n=null;return function(){for(var i=arguments.length,r=new Array(i),s=0;s<i;s++)r[s]=arguments[s];clearTimeout(n),n=setTimeout((()=>{e.apply(null,r)}),t)}})(this.fastQualityChange_.bind(this),100);const{src:t,withCredentials:n,tech:i,bandwidth:s,externVhs:a,useCueTags:o,playlistExclusionDuration:l,enableLowInitialPlaylist:c,sourceType:d,cacheEncryptionKeys:u,bufferBasedABR:h,leastPixelDiffSelector:p,captionServices:g,experimentalUseMMS:m}=e;if(!t)throw new Error("A non-empty playlist URL or JSON manifest string is required");let{maxPlaylistRetries:f}=e;null!==f&&"undefined"!==typeof f||(f=1/0),al=a,this.bufferBasedABR=Boolean(h),this.leastPixelDiffSelector=Boolean(p),this.withCredentials=n,this.tech_=i,this.vhs_=i.vhs,this.player_=e.player_,this.sourceType_=d,this.useCueTags_=o,this.playlistExclusionDuration=l,this.maxPlaylistRetries=f,this.enableLowInitialPlaylist=c,this.usingManagedMediaSource_=!1,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack("metadata","ad-cues"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=""),this.requestOptions_={withCredentials:n,maxPlaylistRetries:f,timeout:null},this.on("error",this.pauseLoading),this.mediaTypes_=(()=>{const e={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((t=>{e[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:mo,activeTrack:mo,getActiveGroup:mo,onGroupChanged:mo,onTrackChanged:mo,lastTrack_:null,logger_:Kr("MediaGroups[".concat(t,"]"))}})),e})(),m&&r.a.ManagedMediaSource?(this.tech_.el_.disableRemotePlayback=!0,this.mediaSource=new r.a.ManagedMediaSource,this.usingManagedMediaSource_=!0,Vr.log("Using ManagedMediaSource")):r.a.MediaSource&&(this.mediaSource=new r.a.MediaSource),this.handleDurationChange_=this.handleDurationChange_.bind(this),this.handleSourceOpen_=this.handleSourceOpen_.bind(this),this.handleSourceEnded_=this.handleSourceEnded_.bind(this),this.load=this.load.bind(this),this.pause=this.pause.bind(this),this.mediaSource.addEventListener("durationchange",this.handleDurationChange_),this.mediaSource.addEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.addEventListener("sourceended",this.handleSourceEnded_),this.mediaSource.addEventListener("startstreaming",this.load),this.mediaSource.addEventListener("endstreaming",this.pause),this.seekable_=Jr(),this.hasPlayed_=!1,this.syncController_=new Wo(e),this.segmentMetadataTrack_=i.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,this.segmentMetadataTrack_.mode="hidden",this.decrypter_=new Yo,this.sourceUpdater_=new Do(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new Go,this.keyStatusMap_=new Map;const y={vhs:this.vhs_,parse708captions:e.parse708captions,useDtsForTimestampOffset:e.useDtsForTimestampOffset,captionServices:g,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:()=>this.seekable(),seeking:()=>this.tech_.seeking(),duration:()=>this.duration(),hasPlayed:()=>this.hasPlayed_,goalBufferLength:()=>this.goalBufferLength(),bandwidth:s,syncController:this.syncController_,decrypter:this.decrypter_,sourceType:this.sourceType_,inbandTextTracks:this.inbandTextTracks_,cacheEncryptionKeys:u,sourceUpdater:this.sourceUpdater_,timelineChangeController:this.timelineChangeController_,exactManifestTimings:e.exactManifestTimings,addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)};this.mainPlaylistLoader_="dash"===this.sourceType_?new ga(t,this.vhs_,Zr(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new Ys(t,this.vhs_,Zr(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new go(Zr(y,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:"main"}),e),this.audioSegmentLoader_=new go(Zr(y,{loaderType:"audio"}),e),this.subtitleSegmentLoader_=new Bo(Zr(y,{loaderType:"vtt",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise(((e,t)=>{function n(){i.off("vttjserror",r),e()}function r(){i.off("vttjsloaded",n),t()}i.one("vttjsloaded",n),i.one("vttjserror",r),i.addWebVttScript_()}))}),e);this.contentSteeringController_=new sl(this.vhs_.xhr,(()=>this.mainSegmentLoader_.bandwidth)),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one("loadedplaylist",(()=>this.startABRTimer_())),this.tech_.on("pause",(()=>this.stopABRTimer_())),this.tech_.on("play",(()=>this.startABRTimer_()))),ol.forEach((e=>{this[e+"_"]=ll.bind(this,e)})),this.logger_=Kr("pc"),this.triggeredFmp4Usage=!1,"none"===this.tech_.preload()?(this.loadOnPlay_=()=>{this.loadOnPlay_=null,this.mainPlaylistLoader_.load()},this.tech_.one("play",this.loadOnPlay_)):this.mainPlaylistLoader_.load(),this.timeToLoadedData__=-1,this.mainAppendsToLoadedData__=-1,this.audioAppendsToLoadedData__=-1;const b="none"===this.tech_.preload()?"play":"loadstart";this.tech_.one(b,(()=>{const e=Date.now();this.tech_.one("loadeddata",(()=>{this.timeToLoadedData__=Date.now()-e,this.mainAppendsToLoadedData__=this.mainSegmentLoader_.mediaAppends,this.audioAppendsToLoadedData__=this.audioSegmentLoader_.mediaAppends}))}
2))}mainAppendsToLoadedData_(){return this.mainAppendsToLoadedData__}audioAppendsToLoadedData_(){return this.audioAppendsToLoadedData__}appendsToLoadedData_(){const e=this.mainAppendsToLoadedData_(),t=this.audioAppendsToLoadedData_();return-1===e||-1===t?-1:e+t}timeToLoadedData_(){return this.timeToLoadedData__}checkABR_(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"abr";const t=this.selectPlaylist();t&&this.shouldSwitchToMedia_(t)&&this.switchMedia_(t,e)}switchMedia_(e,t,n){const i=this.media(),r=i&&(i.id||i.uri),s=e&&(e.id||e.uri);if(r&&r!==s){this.logger_("switch media ".concat(r," -> ").concat(s," from ").concat(t));const n={renditionInfo:{id:s,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS},cause:t};this.trigger({type:"renditionselected",metadata:n}),this.tech_.trigger({type:"usage",name:"vhs-rendition-change-".concat(t)})}this.mainPlaylistLoader_.media(e,n)}switchMediaForDASHContentSteering_(){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((e=>{const t=this.mediaTypes_[e],n=t?t.activeGroup():null,i=this.contentSteeringController_.getPathway();if(n&&i){const t=(n.length?n[0].playlists:n.playlists).filter((e=>e.attributes.serviceLocation===i));t.length&&this.mediaTypes_[e].activePlaylistLoader.media(t[0])}}))}startABRTimer_(){this.stopABRTimer_(),this.abrTimer_=r.a.setInterval((()=>this.checkABR_()),250)}stopABRTimer_(){this.tech_.scrubbing&&this.tech_.scrubbing()||(r.a.clearInterval(this.abrTimer_),this.abrTimer_=null)}getAudioTrackPlaylists_(){const e=this.main(),t=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return t;const n=e.mediaGroups.AUDIO,i=Object.keys(n);let r;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)r=this.mediaTypes_.AUDIO.activeTrack();else{const e=n.main||i.length&&n[i[0]];for(const t in e)if(e[t].default){r={label:t};break}}if(!r)return t;const s=[];for(const a in n)if(n[a][r.label]){const t=n[a][r.label];if(t.playlists&&t.playlists.length)s.push.apply(s,t.playlists);else if(t.uri)s.push(t);else if(e.playlists.length)for(let n=0;n<e.playlists.length;n++){const t=e.playlists[n];t.attributes&&t.attributes.AUDIO&&t.attributes.AUDIO===a&&s.push(t)}}return s.length?s:t}setupMainPlaylistLoaderListeners_(){this.mainPlaylistLoader_.on("loadedmetadata",(()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;Ts(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,e.endList&&"none"!==this.tech_.preload()&&(this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.mainSegmentLoader_.load()),il({sourceType:this.sourceType_,segmentLoaders:{AUDIO:this.audioSegmentLoader_,SUBTITLES:this.subtitleSegmentLoader_,main:this.mainSegmentLoader_},tech:this.tech_,requestOptions:this.requestOptions_,mainPlaylistLoader:this.mainPlaylistLoader_,vhs:this.vhs_,main:this.main(),mediaTypes:this.mediaTypes_,excludePlaylist:this.excludePlaylist.bind(this)}),this.triggerPresenceUsage_(this.main(),e),this.setupFirstPlay(),!this.mediaTypes_.AUDIO.activePlaylistLoader||this.mediaTypes_.AUDIO.activePlaylistLoader.media()?this.trigger("selectedinitialmedia"):this.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",(()=>{this.trigger("selectedinitialmedia")}))})),this.mainPlaylistLoader_.on("loadedplaylist",(()=>{this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_);let e=this.mainPlaylistLoader_.media();if(!e){let t;if(this.attachContentSteeringListeners_(),this.initContentSteeringController_(),this.excludeUnsupportedVariants_(),this.enableLowInitialPlaylist&&(t=this.selectInitialPlaylist()),t||(t=this.selectPlaylist()),!t||!this.shouldSwitchToMedia_(t))return;this.initialMedia_=t,this.switchMedia_(this.initialMedia_,"initial");if(!("vhs-json"===this.sourceType_&&this.initialMedia_.segments))return;e=this.initialMedia_}this.handleUpdatedMediaPlaylist(e)})),this.mainPlaylistLoader_.on("error",(()=>{const e=this.mainPlaylistLoader_.error;this.excludePlaylist({playlistToExclude:e.playlist,error:e})})),this.mainPlaylistLoader_.on("mediachanging",(()=>{this.mainSegmentLoader_.abort(),this.mainSegmentLoader_.pause()})),this.mainPlaylistLoader_.on("mediachange",(()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;Ts(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,"dash"===this.sourceType_&&this.mainPlaylistLoader_.isPaused&&this.mainPlaylistLoader_.load(),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_?this.runFastQualitySwitch_():this.mainSegmentLoader_.load(),this.tech_.trigger({type:"mediachange",bubbles:!0})})),this.mainPlaylistLoader_.on("playlistunchanged",(()=>{const e=this.mainPlaylistLoader_.media();if("playlist-unchanged"===e.lastExcludeReason_)return;this.stuckAtPlaylistEnd_(e)&&(this.excludePlaylist({error:{message:"Playlist no longer updating.",reason:"playlist-unchanged"}}),this.tech_.trigger("playliststuck"))})),this.mainPlaylistLoader_.on("renditiondisabled",(()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"})})),this.mainPlaylistLoader_.on("renditionenabled",(()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"})}));["manifestrequeststart","manifestrequestcomplete","manifestparsestart","manifestparsecomplete","playlistrequeststart","playlistrequestcomplete","playlistparsestart","playlistparsecomplete","renditiondisabled","renditionenabled"].forEach((e=>{this.mainPlaylistLoader_.on(e,(e=>{this.player_.trigger(h()({},e))}))}))}handleUpdatedMediaPlaylist(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_&&this.runFastQualitySwitch_(),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())}triggerPresenceUsage_(e,t){const n=e.mediaGroups||{};let i=!0;const r=Object.keys(n.AUDIO);for(const s in n.AUDIO)for(const e in n.AUDIO[s]){n.AUDIO[s][e].uri||(i=!1)}i&&this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),Object.keys(n.SUBTITLES).length&&this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),al.Playlist.isAes(t)&&this.tech_.trigger({type:"usage",name:"vhs-aes"}),r.length&&Object.keys(n.AUDIO[r[0]]).length>1&&this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.useCueTags_&&this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"})}shouldSwitchToMedia_(e){const t=this.mainPlaylistLoader_.media()||this.mainPlaylistLoader_.pen
2dingMedia_,n=this.tech_.currentTime(),i=this.bufferLowWaterLine(),r=this.bufferHighWaterLine();return function(e){let{currentPlaylist:t,buffered:n,currentTime:i,nextPlaylist:r,bufferLowWaterLine:s,bufferHighWaterLine:a,duration:o,bufferBasedABR:l,log:c}=e;if(!r)return Vr.log.warn("We received no playlist to switch to. Please check your stream."),!1;const d="allowing switch ".concat(t&&t.id||"null"," -> ").concat(r.id);if(!t)return c("".concat(d," as current playlist is not set")),!0;if(r.id===t.id)return!1;const u=Boolean(ns(n,i).length);if(!t.endList)return u||"number"!==typeof t.partTargetDuration?(c("".concat(d," as current playlist is live")),!0):(c("not ".concat(d," as current playlist is live llhls, but currentTime isn't in buffered.")),!1);const h=os(n,i),p=l?ma.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:ma.MAX_BUFFER_LOW_WATER_LINE;if(o<p)return c("".concat(d," as duration < max low water line (").concat(o," < ").concat(p,")")),!0;const g=r.attributes.BANDWIDTH,m=t.attributes.BANDWIDTH;if(g<m&&(!l||h<a)){let e="".concat(d," as next bandwidth < current bandwidth (").concat(g," < ").concat(m,")");return l&&(e+=" and forwardBuffer < bufferHighWaterLine (".concat(h," < ").concat(a,")")),c(e),!0}if((!l||g>m)&&h>=s){let e="".concat(d," as forwardBuffer >= bufferLowWaterLine (").concat(h," >= ").concat(s,")");return l&&(e+=" and next bandwidth > current bandwidth (".concat(g," > ").concat(m,")")),c(e),!0}return c("not ".concat(d," as no switching criteria met")),!1}({buffered:this.tech_.buffered(),currentTime:n,currentPlaylist:t,nextPlaylist:e,bufferLowWaterLine:i,bufferHighWaterLine:r
vendor: 2,845 bytes, line 2
2,duration:this.duration(),bufferBasedABR:this.bufferBasedABR,log:this.logger_})}setupSegmentLoaderListeners_(){this.mainSegmentLoader_.on("bandwidthupdate",(()=>{this.checkABR_("bandwidthupdate"),this.tech_.trigger("bandwidthupdate")})),this.mainSegmentLoader_.on("timeout",(()=>{this.bufferBasedABR&&this.mainSegmentLoader_.load()})),this.bufferBasedABR||this.mainSegmentLoader_.on("progress",(()=>{this.trigger("progress")})),this.mainSegmentLoader_.on("error",(()=>{const e=this.mainSegmentLoader_.error();this.excludePlaylist({playlistToExclude:e.playlist,error:e})})),this.mainSegmentLoader_.on("appenderror",(()=>{this.error=this.mainSegmentLoader_.error_,this.trigger("error")})),this.mainSegmentLoader_.on("syncinfoupdate",(()=>{this.onSyncInfoUpdate_()})),this.mainSegmentLoader_.on("timestampoffset",(()=>{this.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"})})),this.audioSegmentLoader_.on("syncinfoupdate",(()=>{this.onSyncInfoUpdate_()})),this.audioSegmentLoader_.on("appenderror",(()=>{this.error=this.audioSegmentLoader_.error_,this.trigger("error")})),this.mainSegmentLoader_.on("ended",(()=>{this.logger_("main segment loader ended"),this.onEndOfStream()})),this.timelineChangeController_.on("audioTimelineBehind",(()=>{const e=this.audioSegmentLoader_.pendingSegment_;if(!e||!e.segment||!e.segment.syncInfo)return;const t=e.segment.syncInfo.end+.01;this.tech_.setCurrentTime(t)})),this.timelineChangeController_.on("fixBadTimelineChange",(()=>{this.logger_("Fix bad timeline change. Restarting al segment loaders..."),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()})),this.mainSegmentLoader_.on("earlyabort",(e=>{this.bufferBasedABR||(this.delegateLoaders_("all",["abort"]),this.excludePlaylist({error:{message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},playlistExclusionDuration:10}))}));const e=()=>{if(!this.sourceUpdater_.hasCreatedSourceBuffers())return this.tryToCreateSourceBuffers_();const e=this.getCodecsOrExclude_();e&&this.sourceUpdater_.addOrChangeSourceBuffers(e)};this.mainSegmentLoader_.on("trackinfo",e),this.audioSegmentLoader_.on("trackinfo",e),this.mainSegmentLoader_.on("fmp4",(()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on("fmp4",(()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on("ended",(()=>{this.logger_("audioSegmentLoader ended"),this.onEndOfStream()}))
2;["segmentselected","segmentloadstart","segmentloaded","segmentkeyloadstart","segmentkeyloadcomplete","segmentdecryptionstart","segmentdecryptioncomplete","segmenttransmuxingstart","segmenttransmuxingcomplete","segmenttransmuxingtrackinfoavailable","segmenttransmuxingtiminginfoavailable","segmentappendstart","appendsdone","bandwidthupdated","timelinechange","codecschange"].forEach((e=>{this.mainSegmentLoader_.on(e,(e=>{this.player_.trigger(h()({},e))})),this.audioSegmentLoader_.on(e,(e=>{this.player_.trigger(h()({},e))})),this.subtitleSegmentLoader_.on(e,(e=>{this.player_.trigger(h()({},e))}))}))}mediaSecondsLoaded_(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}load(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}pause(){this.mainSegmentLoader_.pause(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.pause(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.pause()}fastQualityChange_(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.selectPlaylist();e&&e===this.mainPlaylistLoader_.media()?this.logger_("skipping fastQualityChange because new media is same as old"):(this.switchMedia_(e,"fast-quality"),this.waitingForFastQualityPlaylistReceived_=!0)}runFastQualitySwitch_(){this.waitingForFastQualityPlaylistReceived_=!1,this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}play(){if(this.setupFirstPlay())return;this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();const e=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0)?this.tech_.setCurrentTime(e.end(e.length-1)):void 0}setupFirstPlay(){const e=this.mainPlaylistLoader_.media();if(!e||this.tech_.paused()||this.hasPlayed_)return!1;if(!e.endList||e.start){const t=this.seekable();if(!t.length)return!1;const n=t.end(0);let i=n;if(e.start){const r=e.start.timeOffset;i=r<0?Math.max(n+r,t.start(0)):Math.min(n,r)}this.trigger("firstplay"),this.tech_.setCurrentTime(i)}return this.hasPlayed_=!0,this.load(),!0}handleSourceOpen_(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){const e=this.tech_.play();"undefined"!==typeof e&&"function"===typeof e.then&&e.then(null,(e=>{}))}this.trigger("sourceopen")}handleSourceEnded_(){if(!this.inbandTextTracks_.metadataTrack_)return;const e=this.inbandTextTracks_.metadataTrack_.cues;if(!e||!e.length)return;const t=this.duration();e[e.length-1].endTime=isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t}handleDurationChange_(){this.tech_.trigger("durationchange")}onEndOfStream(){let e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){const t=this.mainSegmentLoader_.getCurrentMediaInfo_();e=!t||t.hasVideo?e&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_}e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())}stuckAtPlaylistEnd_(e){if(!this.seekable().length)return!1;const t=this.syncController_.getExpiredTime(e,this.duration());if(null===t)return!1;const n=al.Playlist.playlistEnd(e,t),i=this.tech_.currentTime(),r=this.tech_.buffered();if(!r.length)return n-i<=es;const s=r.end(r.length-1);return s-i<=es&&n-s<=es}excludePlaylist(e){let{playlistToExclude:t=this.mainPlaylistLoader_.media(),error:n={},playlistExclusionDuration:i}=e;if(t=t||this.mainPlaylistLoader_.media(),i=i||n.playlistExclusionDuration||this.playlistExclusionDuration,!t)return this.error=n,void("open"!==this.mediaSource.readyState?this.trigger("error"):this.sourceUpdater_.endOfStream("network"));t.playlistErrors_++;const r=this.mainPlaylistLoader_.main.playlists,s=r.filter(vs),a=1===s.length&&s[0]===t;if(1===r.length&&i!==1/0)return Vr.log.warn("Problem encountered with playlist ".concat(t.id,". ")+"Trying again since it is the only playlist."),this.tech_.trigger("retryplaylist"),this.mainPlaylistLoader_.load(a);if(a){if(this.main().contentSteering){const e=this.pathwayAttribute_(t),n=1e3*this.contentSteeringController_.steeringManifest.ttl;return this.contentSteeringController_.excludePathway(e),this.excludeThenChangePathway_(),void setTimeout((()=>{this.contentSteeringController_.addAvailablePathway(e)}),n)}let e=!1;r.forEach((n=>{if(n===t)return;const i=n.excludeUntil;"undefined"!==typeof i&&i!==1/0&&(e=!0,delete n.excludeUntil)})),e&&(Vr.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}let o;o=t.playlistErrors_>this.maxPlaylistRetries?1/0:Date.now()+1e3*i,t.excludeUntil=o,n.reason&&(t.lastExcludeReason_=n.reason),this.tech_.trigger("excludeplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-excluded"});const l=this.selectPlaylist();if(!l)return this.error="Playback cannot continue. No available working or supported playlists.",void this.trigger("error");const c=n.internal?this.logger_:Vr.log.warn,d=n.message?" "+n.message:"";c("".concat(n.internal?"Internal problem":"Problem"," encountered with playlist ").concat(t.id,".")+"".concat(d," Switching to playlist ").concat(l.id,".")),l.attributes.AUDIO!==t.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),l.attributes.SUBTITLES!==t.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);const u=l.targetDuration/2*1e3||5e3,h="number"===typeof l.lastRequest&&Date.now()-l.lastRequest<=u;return this.switchMedia_(l,"exclude",a||h)}pauseLoading(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()}delegateLoaders_(e,t){const n=[],i="all"===e;(i||"main"===e)&&n.push(this.mainPlaylistLoader_);const r=[];(i||"audio"===e)&&r.push("AUDIO"),(i||"subtitle"===e)&&(r.push("CLOSED-CAPTIONS"),r.push("SUBTITLES")),r.forEach((e=>{const t=this.mediaTypes_[e]&&this.mediaTypes_[e].activePlaylistLoader;t&&n.push(t)})),["main","audio","subtitle"].forEach((t=>{const i=this["".concat(t,"SegmentLoader_")];!i||e!==t&&"all"!==e||n.push(i)}
vendor: 5,215 bytes, line 2
2)),n.forEach((e=>t.forEach((t=>{"function"===typeof e[t]&&e[t]()}))))}setCurrentTime(e){const t=ns(this.tech_.buffered(),e);return this.mainPlaylistLoader_&&this.mainPlaylistLoader_.media()&&this.mainPlaylistLoader_.media().segments?t&&t.length?e:(this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),void this.load()):0}duration(){if(!this.mainPlaylistLoader_)return 0;const e=this.mainPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:al.Playlist.duration(e):1/0:0}seekable(){return this.seekable_}getSeekableRange_(e,t){const n=e.media();if(!n)return null;const i=this.syncController_.getMediaSequenceSync(t);if(i&&i.isReliable){const e=i.start,t=i.end;if(!isFinite(e)||!isFinite(t))return null;const r=al.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,n);return Jr([[e,Math.max(e,t-r)]])}const r=this.syncController_.getExpiredTime(n,this.duration());if(null===r)return null;const s=al.Playlist.seekable(n,r,al.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,n));return s.length?s:null}computeFinalSeekable_(e,t){if(!t)return e;const n=e.start(0),i=e.end(0),r=t.start(0),s=t.end(0);return r>i||n>s?e:Jr([[Math.max(n,r),Math.min(i,s)]])}onSyncInfoUpdate_(){if(!this.mainPlaylistLoader_)return;const e=this.getSeekableRange_(this.mainPlaylistLoader_,"main");if(!e)return;let t;if(this.mediaTypes_.AUDIO.activePlaylistLoader&&(t=this.getSeekableRange_(this.mediaTypes_.AUDIO.activePlaylistLoader,"audio"),!t))return;const n=this.seekable_;if(this.seekable_=this.computeFinalSeekable_(e,t),!this.seekable_)return;if(n&&n.length&&this.seekable_.length&&n.start(0)===this.seekable_.start(0)&&n.end(0)===this.seekable_.end(0))return;this.logger_("seekable updated [".concat(rs(this.seekable_),"]"));const i={seekableRanges:this.seekable_};this.trigger({type:"seekablerangeschanged",metadata:i}),this.tech_.trigger("seekablechanged")}updateDuration(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.updateDuration_=null),"open"!==this.mediaSource.readyState)return this.updateDuration_=this.updateDuration.bind(this,e),void this.mediaSource.addEventListener("sourceopen",this.updateDuration_);if(e){const e=this.seekable();if(!e.length)return;return void((isNaN(this.mediaSource.duration)||this.mediaSource.duration<e.end(e.length-1))&&this.sourceUpdater_.setDuration(e.end(e.length-1)))}const t=this.tech_.buffered();let n=al.Playlist.duration(this.mainPlaylistLoader_.media());t.length>0&&(n=Math.max(n,t.end(t.length-1))),this.mediaSource.duration!==n&&this.sourceUpdater_.setDuration(n)}dispose(){this.trigger("dispose"),this.decrypter_.terminate(),this.mainPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.contentSteeringController_.dispose(),this.keyStatusMap_.clear(),this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_),["AUDIO","SUBTITLES"].forEach((e=>{const t=this.mediaTypes_[e].groups;for(const n in t)t[n].forEach((e=>{e.playlistLoader&&e.playlistLoader.dispose()}))})),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.mediaSource.removeEventListener("durationchange",this.handleDurationChange_),this.mediaSource.removeEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_),this.off()}main(){return this.mainPlaylistLoader_.main}media(){return this.mainPlaylistLoader_.media()||this.initialMedia_}areMediaTypesKnown_(){const e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,t=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),n=!e||!!this.audioSegmentLoader_.getCurrentMediaInfo_();return!(!t||!n)}getCodecsOrExclude_(){const e={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},t=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();e.video=e.main;const n=Us(this.main(),t),i={},r=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(e.main.hasVideo&&(i.video=n.video||e.main.videoCodec||m.b),e.main.isMuxed&&(i.video+=",".concat(n.audio||e.main.audioCodec||m.a)),(e.main.hasAudio&&!e.main.isMuxed||e.audio.hasAudio||r)&&(i.audio=n.audio||e.main.audioCodec||e.audio.audioCodec||m.a,e.audio.isFmp4=e.main.hasAudio&&!e.main.isMuxed?e.main.isFmp4:e.audio.isFmp4),!i.audio&&!i.video)return void this.excludePlaylist({playlistToExclude:t,error:{message:"Could not determine codecs for playlist."},playlistExclusionDuration:1/0});const s=(e,t)=>e?Object(m.c)(t,this.usingManagedMediaSource_):Object(m.g)(t),a={};let o;if(["video","audio"].forEach((function(t){if(i.hasOwnProperty(t)&&!s(e[t].isFmp4,i[t])){const n=e[t].isFmp4?"browser":"muxer";a[n]=a[n]||[],a[n].push(i[t]),"audio"===t&&(o=n)}})),r&&o&&t.attributes.AUDIO){const e=t.attributes.AUDIO;
2this.main().playlists.forEach((n=>{(n.attributes&&n.attributes.AUDIO)===e&&n!==t&&(n.excludeUntil=1/0)})),this.logger_("excluding audio group ".concat(e," as ").concat(o,' does not support codec(s): "').concat(i.audio,'"'))}if(!Object.keys(a).length){if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){const e=[];if(["video","audio"].forEach((t=>{const n=(Object(m.h)(this.sourceUpdater_.codecs[t]||"")[0]||{}).type,r=(Object(m.h)(i[t]||"")[0]||{}).type;n&&r&&n.toLowerCase()!==r.toLowerCase()&&e.push('"'.concat(this.sourceUpdater_.codecs[t],'" -> "').concat(i[t],'"'))})),e.length)return void this.excludePlaylist({playlistToExclude:t,error:{message:"Codec switching not supported: ".concat(e.join(", "),"."),internal:!0},playlistExclusionDuration:1/0})}return i}{const e=Object.keys(a).reduce(((e,t)=>(e&&(e+=", "),e+="".concat(t,' does not support codec(s): "').concat(a[t].join(","),'"'))),"")+".";this.excludePlaylist({playlistToExclude:t,error:{internal:!0,message:e},playlistExclusionDuration:1/0})}}tryToCreateSourceBuffers_(){if("open"!==this.mediaSource.readyState||this.sourceUpdater_.hasCreatedSourceBuffers())return;if(!this.areMediaTypesKnown_())return;const e=this.getCodecsOrExclude_();if(!e)return;this.sourceUpdater_.createSourceBuffers(e);const t=[e.video,e.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(t)}excludeUnsupportedVariants_(){const e=this.main().playlists,t=[];Object.keys(e).forEach((n=>{const i=e[n];if(-1!==t.indexOf(i.id))return;t.push(i.id);const r=Us(this.main,i),s=[];!r.audio||Object(m.g)(r.audio)||Object(m.c)(r.audio,this.usingManagedMediaSource_)||s.push("audio codec ".concat(r.audio)),!r.video||Object(m.g)(r.video)||Object(m.c)(r.video,this.usingManagedMediaSource_)||s.push("video codec ".concat(r.video)),r.text&&"stpp.ttml.im1t"===r.text&&s.push("text codec ".concat(r.text)),s.length&&(i.excludeUntil=1/0,this.logger_("excluding ".concat(i.id," for unsupported: ").concat(s.join(", "))))}))}excludeIncompatibleVariants_(e){const t=[],n=this.main().playlists,i=Ns(Object(m.h)(e)),r=Bs(i),s=i.video&&Object(m.h)(i.video)[0]||null,a=i.audio&&Object(m.h)(i.audio)[0]||null;Object.keys(n).forEach((e=>{const i=n[e];if(-1!==t.indexOf(i.id)||i.excludeUntil===1/0)return;t.push(i.id);const o=[],l=Us(this.mainPlaylistLoader_.main,i),c=Bs(l);if(l.audio||l.video){if(c!==r&&o.push('codec count "'.concat(c,'" !== "').concat(r,'"')),!this.sourceUpdater_.canChangeType()){const e=l.video&&Object(m.h)(l.video)[0]||null,t=l.audio&&Object(m.h)(l.audio)[0]||null;e&&s&&e.type.toLowerCase()!==s.type.toLowerCase()&&o.push('video codec "'.concat(e.type,'" !== "').concat(s.type,'"')),t&&a&&t.type.toLowerCase()!==a.type.toLowerCase()&&o.push('audio codec "'.concat(t.type,'" !== "').concat(a.type,'"'))}o.length&&(i.excludeUntil=1/0,this.logger_("excluding ".concat(i.id,": ").concat(o.join(" && "))))}}))}updateAdCues_(e){let t=0;const n=this.seekable();n.length&&(t=n.start(0)),function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!e.segments)return;let i,s=n;for(let a=0;a<e.segments.length;a++){const n=e.segments[a];if(i||(i=Uo(t,s+n.duration/2)),i){if("cueIn"in n){i.endTime=s,i.adEndTime=s,s+=n.duration,i=null;continue}if(s<i.endTime){s+=n.duration;continue}i.endTime+=n.duration}else if("cueOut"in n&&(i=new r.a.VTTCue(s,s+n.duration,n.cueOut),i.adStartTime=s,i.adEndTime=s+parseFloat(n.cueOut),t.addCue(i)),"cueOutCont"in n){const[e,a]=n.cueOutCont.split("/").map(parseFloat);i=new r.a.VTTCue(s,s+n.duration,""),i.adStartTime=s-e,i.adEndTime=i.adStartTime+a,t.addCue(i)}s+=n.duration}}(e,this.cueTagsTrack_,t)}goalBufferLength(){const e=this.tech_.currentTime(),t=ma.GOAL_BUFFER_LENGTH,n=ma.GOAL_BUFFER_LENGTH_RATE,i=Math.max(t,ma.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*n,i)}bufferLowWaterLine(){const e=this.tech_.currentTime(),t=ma.BUFFER_LOW_WATER_LINE,n=ma.BUFFER_LOW_WATER_LINE_RATE,i=Math.max(t,ma.MAX_BUFFER_LOW_WATER_LINE),r=Math.max(t,ma.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*n,this.bufferBasedABR?r:i)}bufferHighWaterLine(){return ma.BUFFER_HIGH_WATER_LINE}addDateRangesToTextTrack_(e){no(this.inbandTextTracks_,"com.apple.streaming",this.tech_),(e=>{let{inbandTextTracks:t,dateRanges:n}=e;const i=t.metadataTrack_;if(!i)return;const s=r.a.WebKitDataCue||r.a.VTTCue;
2n.forEach((e=>{for(const t of Object.keys(e)){if(to.has(t))continue;const n=new s(e.startTime,e.endTime,"");n.id=e.id,n.type="com.apple.quicktime.HLS",n.value={key:eo[t],data:e[t]},"scte35Out"!==t&&"scte35In"!==t||(n.value.data=new Uint8Array(n.value.data.match(/[\da-f]{2}/gi)).buffer),i.addCue(n)}e.processDateRange()}))})({inbandTextTracks:this.inbandTextTracks_,dateRanges:e})}addMetadataToTextTrack(e,t,n){const i=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();no(this.inbandTextTracks_,e,this.tech_),$a({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:i,videoDuration:n})}pathwayAttribute_(e){return e.attributes["PATHWAY-ID"]||e.attributes.serviceLocation}initContentSteeringController_(){const e=this.main();if(e.contentSteering){for(const t of e.playlists)this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(t));this.contentSteeringController_.assignTagProperties(e.uri,e.contentSteering),this.contentSteeringController_.queryBeforeStart?this.contentSteeringController_.requestSteeringManifest(!0):this.tech_.one("canplay",(()=>{this.contentSteeringController_.requestSteeringManifest()}))}}resetContentSteeringController_(){this.contentSteeringController_.clearAvailablePathways(),this.contentSteeringController_.dispose(),this.initContentSteeringController_()}attachContentSteeringListeners_(){this.contentSteeringController_.on("content-steering",this.excludeThenChangePathway_.bind(this));["contentsteeringloadstart","contentsteeringloadcomplete","contentsteeringparsed"].forEach((e=>{this.contentSteeringController_.on(e,(e=>{this.trigger(h()({},e))}))})),"dash"===this.sourceType_&&this.mainPlaylistLoader_.on("loadedplaylist",(()=>{const e=this.main();(this.contentSteeringController_.didDASHTagChange(e.uri,e.contentSteering)||(()=>{const t=this.contentSteeringController_.getAvailablePathways(),n=[];for(const i of e.playlists){const e=i.attributes.serviceLocation;if(e&&(n.push(e),!t.has(e)))return!0}return!(n.length||!t.size)})())&&this.resetContentSteeringController_()}))}excludeThenChangePathway_(){const e=this.contentSteeringController_.getPathway();if(!e)return;this.handlePathwayClones_();const t=this.main().playlists,n=new Set;let i=!1;Object.keys(t).forEach((r=>{const s=t[r],a=this.pathwayAttribute_(s),o=a&&e!==a;s.excludeUntil===1/0&&"content-steering"===s.lastExcludeReason_&&!o&&(delete s.excludeUntil,delete s.lastExcludeReason_,i=!0);const l=!s.excludeUntil&&s.excludeUntil!==1/0;!n.has(s.id)&&o&&l&&(n.add(s.id),s.excludeUntil=1/0,s.lastExcludeReason_="content-steering",this.logger_("excluding ".concat(s.id," for ").concat(s.lastExcludeReason_)))})),"DASH"===this.contentSteeringController_.manifestType_&&Object.keys(this.mediaTypes_).forEach((t=>{const n=this.mediaTypes_[t];if(n.activePlaylistLoader){const t=n.activePlaylistLoader.media_;t&&t.attributes.serviceLocation!==e&&(i=!0)}})),i&&this.changeSegmentPathway_()}handlePathwayClones_(){const e=this.main().playlists,t=this.contentSteeringController_.currentPathwayClones,n=this.contentSteeringController_.nextPathwayClones;if(t&&t.size||n&&n.size){for(const[e,i]of t.entries()){n.get(e)||(this.mainPlaylistLoader_.updateOrDeleteClone(i),this.contentSteeringController_.excludePathway(e))}for(const[i,r]of n.entries()){const n=t.get(i);if(n)this.equalPathwayClones_(n,r)||(this.mainPlaylistLoader_.updateOrDeleteClone(r,!0),this.contentSteeringController_.addAvailablePathway(i));else{e.filter((e=>e.attributes["PATHWAY-ID"]===r["BASE-ID"])).forEach((e=>{this.mainPlaylistLoader_.addClonePathway(r,e)})),this.contentSteeringController_.addAvailablePathway(i)}}this.contentSteeringController_.currentPathwayClones=new Map(JSON.parse(JSON.stringify([...n])))}}equalPathwayClones_(e,t){if(e["BASE-ID"]!==t["BASE-ID"]||e.ID!==t.ID||e["URI-REPLACEMENT"].HOST!==t["URI-REPLACEMENT"].HOST)return!1;const n=e["URI-REPLACEMENT"].PARAMS,i=t["URI-REPLACEMENT"].PARAMS;for(const r in n)if(n[r]!==i[r])return!1;for(const r in i)if(n[r]!==i[r])return!1;return!0}changeSegmentPathway_(){const e=this.selectPlaylist();this.pauseLoading(),"DASH"===this.contentSteeringController_.manifestType_&&this.switchMediaForDASHContentSteering_(),this.switchMedia_(e,"content-steering")}excludeNonUsablePlaylistsByKeyId_(){if(!this.mainPlaylistLoader_||!this.mainPlaylistLoader_.main)return;let e=0;const t="non-usable";
2this.mainPlaylistLoader_.main.playlists.forEach((n=>{const i=this.mainPlaylistLoader_.getKeyIdSet(n);i&&i.size&&i.forEach((i=>{const r="usable",s=this.keyStatusMap_.has(i)&&this.keyStatusMap_.get(i)===r,a=n.lastExcludeReason_===t&&n.excludeUntil===1/0;s?s&&a&&(delete n.excludeUntil,delete n.lastExcludeReason_,this.logger_("enabling playlist ".concat(n.id," because key ID ").concat(i," is ").concat(r))):(n.excludeUntil!==1/0&&n.lastExcludeReason_!==t&&(n.excludeUntil=1/0,n.lastExcludeReason_=t,this.logger_("excluding playlist ".concat(n.id," because the key ID ").concat(i," doesn't exist in the keyStatusMap or is not ").concat(r))),e++)}))})),e>=this.mainPlaylistLoader_.main.playlists.length&&this.mainPlaylistLoader_.main.playlists.forEach((e=>{const n=e&&e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height<720,i=e.excludeUntil===1/0&&e.lastExcludeReason_===t;n&&i&&(delete e.excludeUntil,Vr.log.warn("enabling non-HD playlist ".concat(e.id," because all playlists were excluded due to ").concat(t," key IDs")))}))}addKeyStatus_(e,t){const n=("string"===typeof e?e:(e=>{const t=new Uint8Array(e);return Array.from(t).map((e=>e.toString(16).padStart(2,"0"))).join("")})(e)).slice(0,32).toLowerCase();this.logger_("KeyStatus '".concat(t,"' with key ID ").concat(n," added to the keyStatusMap")),this.keyStatusMap_.set(n,t)}updatePlaylistByKeyStatus(e,t){this.addKeyStatus_(e,t),this.waitingForFastQualityPlaylistReceived_||this.excludeNonUsableThenChangePlaylist_(),this.mainPlaylistLoader_.off("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this)),this.mainPlaylistLoader_.on("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this))}excludeNonUsableThenChangePlaylist_(){this.excludeNonUsablePlaylistsByKeyId_(),this.fastQualityChange_()}}class dl{constructor(e,t,n){const{playlistController_:i}=e,r=i.fastQualityChange_.bind(i);if(t.attributes){const e=t.attributes.RESOLUTION;this.width=e&&e.width,this.height=e&&e.height,this.bandwidth=t.attributes.BANDWIDTH,this.frameRate=t.attributes["FRAME-RATE"]}var s,a,o;this.codecs=Us(i.main(),t),this.playlist=t,this.id=n,this.enabled=(s=e.playlists,a=t.id,o=r,e=>{const t=s.main.playlists[a],n=bs(t),i=vs(t);if("undefined"===typeof e)return i;e?delete t.disabled:t.disabled=!0;const r={renditionInfo:{id:a,bandwidth:t.attributes.BANDWIDTH,resolution:t.attributes.RESOLUTION,codecs:t.attributes.CODECS},cause:"fast-quality"};return e===i||n||(e?(o(t),s.trigger({type:"renditionenabled",metadata:r})):s.trigger({type:"renditiondisabled",metadata:r})),e})}}const ul=["seeking","seeked","pause","playing","error"];class hl extends Vr.EventTarget{constructor(e){super(),this.playlistController_=e.playlistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.playedRanges_=[],this.consecutiveUpdates=0,this.lastRecordedTime=null,this.checkCurrentTimeTimeout_=null,this.logger_=Kr("PlaybackWatcher"),this.logger_("initialize");const t=()=>this.monitorCurrentTime_(),n=()=>this.monitorCurrentTime_(),i=()=>this.techWaiting_(),s=()=>this.resetTimeUpdate_(),a=this.playlistController_,o=["main","subtitle","audio"],l={};o.forEach((e=>{l[e]={reset:()=>this.resetSegmentDownloads_(e),updateend:()=>this.checkSegmentDownloads_(e)},a["".concat(e,"SegmentLoader_")].on("appendsdone",l[e].updateend),a["".concat(e,"SegmentLoader_")].on("playlistupdate",l[e].reset),this.tech_.on(["seeked","seeking"],l[e].reset)}));const c=e=>{["main","audio"].forEach((t=>{a["".concat(t,"SegmentLoader_")][e]("appended",this.seekingAppendCheck_)}))};this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),c("off"))},this.clearSeekingAppendCheck_=()=>c("off"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),c("on")},this.tech_.on("seeked",this.clearSeekingAppendCheck_),this.tech_.on("seeking",this.watchForBadSeeking_),this.tech_.on("waiting",i),this.tech_.on(ul,s),this.tech_.on("canplay",n),this.tech_.one("play",t),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_("dispose"),this.tech_.off("waiting",i),this.tech_.off(ul,s),this.tech_.off("canplay",n),this.tech_.off("play",t),this.tech_.off("seeking",this.watchForBadSeeking_),this.tech_.off("seeked",this.clearSeekingAppendCheck_),o.forEach((e=>{a["".concat(e,"SegmentLoader_")].off("appendsdone",l[e].updateend),a["".concat(e,"SegmentLoader_")].off("playlistupdate",l[e].reset),this.tech_.off(["seeked","seeking"],l[e].reset)})),this.checkCurrentTimeTimeout_&&r.a.clearTimeout(this.checkCurrentTimeTimeout_),this.resetTimeUpdate_()}}monitorCurrentTime_(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&r.a.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=r.a.setTimeout(this.monitorCurrentTime_.bind(this),250)}resetSegmentDownloads_(e){const t=this.playlistController_["".concat(e,"SegmentLoader_")];this["".concat(e,"StalledDownloads_")]>0&&this.logger_("resetting possible stalled download count for ".concat(e," loader")),this["".concat(e,"StalledDownloads_")]=0,this["".concat(e,"Buffered_")]=t.buffered_()}checkSegmentDownloads_(e){const t=this.playlistController_,n=t["".concat(e,"SegmentLoader_")],i=n.buffered_(),r=function(e,t){if(e===t)return!1;if(!e&&t||!t&&e)return!0;
2if(e.length!==t.length)return!0;for(let n=0;n<e.length;n++)if(e.start(n)!==t.start(n)||e.end(n)!==t.end(n))return!0;return!1}(this["".concat(e,"Buffered_")],i);if(this["".concat(e,"Buffered_")]=i,r){const n={bufferedRanges:i};return t.trigger({type:"bufferedrangeschanged",metadata:n}),void this.resetSegmentDownloads_(e)}this["".concat(e,"StalledDownloads_")]++,this.logger_("found #".concat(this["".concat(e,"StalledDownloads_")]," ").concat(e," appends that did not increase buffer (possible stalled download)"),{playlistId:n.playlist_&&n.playlist_.id,buffered:ss(i)}),this["".concat(e,"StalledDownloads_")]<10||(this.logger_("".concat(e," loader stalled download exclusion")),this.resetSegmentDownloads_(e),this.tech_.trigger({type:"usage",name:"vhs-".concat(e,"-download-exclusion")}),"subtitle"!==e&&t.excludePlaylist({error:{message:"Excessive ".concat(e," segment downloading detected.")},playlistExclusionDuration:1/0}))}checkCurrentTime_(){if(this.tech_.paused()||this.tech_.seeking())return;const e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+es>=t.end(t.length-1)))return this.techWaiting_();if(this.consecutiveUpdates>=5&&e===this.lastRecordedTime)this.consecutiveUpdates++,this.waiting_();else if(e===this.lastRecordedTime)this.consecutiveUpdates++;else{this.playedRanges_.push(Jr([this.lastRecordedTime,e]));const t={playedRanges:this.playedRanges_};this.playlistController_.trigger({type:"playedrangeschanged",metadata:t}),this.consecutiveUpdates=0,this.lastRecordedTime=e}}resetTimeUpdate_(){this.consecutiveUpdates=0}fixesBadSeeks_(){if(!this.tech_.seeking())return!1;const e=this.seekable(),t=this.tech_.currentTime();let n;if(this.afterSeekableWindow_(e,t,this.media(),this.allowSeeksWithinUnsafeLiveWindow)){n=e.end(e.length-1)}if(this.beforeSeekableWindow_(e,t)){const t=e.start(0);n=t+(t===e.end(0)?0:es)}if("undefined"!==typeof n)return this.logger_("Trying to seek outside of seekable at time ".concat(t," with ")+"seekable range ".concat(rs(e),". Seeking to ")+"".concat(n,".")),this.tech_.setCurrentTime(n),!0;const i=this.playlistController_.sourceUpdater_,r=this.tech_.buffered(),s=i.audioBuffer?i.audioBuffered():null,a=i.videoBuffer?i.videoBuffered():null,o=this.media(),l=o.partTargetDuration?o.partTargetDuration:2*(o.targetDuration-$r),c=[s,a];for(let u=0;u<c.length;u++){if(!c[u])continue;if(os(c[u],t)<l)return!1}const d=is(r,t);return 0!==d.length&&(n=d.start(0)+es,this.logger_("Buffered region starts (".concat(d.start(0),") ")+" just beyond seek point (".concat(t,"). Seeking to ").concat(n,".")),this.tech_.setCurrentTime(n),!0)}waiting_(){if(this.techWaiting_())return;const e=this.tech_.currentTime(),t=this.tech_.buffered(),n=ns(t,e);return n.length&&e+3<=n.end(0)?(this.resetTimeUpdate_(),this.tech_.setCurrentTime(e),this.logger_("Stopped at ".concat(e," while inside a buffered region ")+"[".concat(n.start(0)," -> ").concat(n.end(0),"]. Attempting to resume ")+"playback by seeking to the current time."),void this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"})):void 0}techWaiting_(){const e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking())return!0;if(this.beforeSeekableWindow_(e,t)){const n=e.end(e.length-1);return this.logger_("Fell out of live window at time ".concat(t,". Seeking to ")+"live point (seekable end) ".concat(n)),this.resetTimeUpdate_(),this.tech_.setCurrentTime(n),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),!0}const n=this.tech_.vhs.playlistController_.sourceUpdater_,i=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:n.audioBuffered(),videoBuffered:n.videoBuffered(),currentTime:t}))return this.resetTimeUpdate_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),!0;const r=is(i,t);return r.length>0&&(this.logger_("Stopped at ".concat(t," and seeking to ").concat(r.start(0))),this.resetTimeUpdate_(),this.skipTheGap_(t),!0)}afterSeekableWindow_(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!e.length)return!1;let r=e.end(e.length-1)+es;const s=!n.endList,a="number"===typeof n.partTargetDuration;return s&&(a||i)&&(r=e.end(e.length-1)+3*n.targetDuration),t>r}beforeSeekableWindow_(e,t){return!!(e.length&&e.start(0)>0&&t<e.start(0)-this.liveRangeSafeTimeDelta)}videoUnderflow_(e){let t,{videoBuffered:n,audioBuffered:i,currentTime:r}=e;if(n){if(n.length&&i.length){const e=ns(n,r-3),s=ns(n,r),a=ns(i,r);a.length&&!s.length&&e.length&&(t={start:e.end(0),end:a.end(0)})}else{is(n,r).length||(t=this.gapFromVideoUnderflow_(n,r))}return!!t&&(this.logger_("Encountered a gap in video from ".concat(t.start," to ").concat(t.end,". ")+"Seeking to current time ".concat(r)),!0)}}skipTheGap_(e){const t=this.tech_.buffered(),n=this.tech_.currentTime(),i=is(t,n);if(this.resetTimeUpdate_(),0===i.length||n!==e)return;this.logger_("skipTheGap_:","currentTime:",n,"scheduled currentTime:",e,"nextRange start:",i.start(0)),this.tech_.setCurrentTime(i.start(0)+$r);const r={gapInfo:{from:n,to:i.start(0)}};this.playlistController_.trigger({type:"gapjumped",metadata:r}),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"})}gapFromVideoUnderflow_(e,t){const n=function(e){if(e.length<2)return Jr();const t=[];for(let n=1;n<e.length;n++){const i=e.end(n-1),r=e.start(n);t.push([i,r])}return Jr(t)}(e);for(let i=0;i<n.length;i++){const e=n.start(i),r=n.end(i);if(t-e<4&&t-e>2)return{start:e,end:r}}return null}}const pl={errorInterval:30,getSource(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},gl=function(e,t){let n=0,i=0;const r=Zr(pl,t);e.ready((()=>{e.trigger({type:"usage",name:"vhs-error-reload-initialized"})}));const s=function(){i&&e.currentTime(i)},a=function(t){null!==t&&void 0!==t&&(i=e.duration()!==1/0&&e.currentTime()||0,e.one("loadedmetadata",s),e.src(t),e.trigger({type:"usage",name:"vhs-error-reload"}),e.play())},o=function(){if(Date.now()-n<1e3*r.errorInterval)e.trigger({type:"usage",name:"vhs-error-reload-canceled"});else{if(r.getSource&&"function"===typeof r.getSource)return n=Date.now(),r.getSource.call(e,a);Vr.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")}},l=function(){e.off("loadedmetadata",s),e.off("error",o),e.off("dispose",l)};e.on("error",o),e.on("dispose",l),e.reloadSourceOnError=function(t){l(),gl(e,t)}},ml=function(e){gl(this,e)};var fl="3.17.2";const yl={PlaylistLoader:Ys,Playlist:ws,utils:sa,STANDARD_PLAYLIST_SELECTOR:Za,INITIAL_PLAYLIST_SELECTOR:function(){const e=this.playlists.main.playlists.filter(ws.isEnabled);Ya(e,((e,t)=>
2Qa(e,t)));return e.filter((e=>!!Us(this.playlists.main,e).video))[0]||null},lastBandwidthSelector:Za,movingAverageBandwidthSelector:function(e){let t=-1,n=-1;if(e<0||e>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){let i=this.useDevicePixelRatio&&r.a.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(i=this.customPixelRatio),t<0&&(t=this.systemBandwidth,n=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==n&&(t=e*this.systemBandwidth+(1-e)*t,n=this.systemBandwidth),Ka({main:this.playlists.main,bandwidth:t,playerWidth:parseInt(Xa(this.tech_.el(),"width"),10)*i,playerHeight:parseInt(Xa(this.tech_.el(),"height"),10)*i,playerObjectFit:this.usePlayerObjectFit?Xa(this.tech_.el(),"objectFit"):"",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})}},comparePlaylistBandwidth:Qa,comparePlaylistResolution:function(e,t){let n,i;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(n=e.attributes.RESOLUTION.width),n=n||r.a.Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(i=t.attributes.RESOLUTION.width),i=i||r.a.Number.MAX_VALUE,n===i&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:n-i},xhr:Ks()};Object.keys(ma).forEach((e=>{Object.defineProperty(yl,e,{get:()=>(Vr.log.warn("using Vhs.".concat(e," is UNSAFE be sure you know what you are doing")),ma[e]),set(t){Vr.log.warn("using Vhs.".concat(e," is UNSAFE be sure you know what you are doing")),"number"!==typeof t||t<0?Vr.log.warn("value of Vhs.".concat(e," must be greater than or equal to 0")):ma[e]=t}})}));const bl="videojs-vhs",vl=function(e,t){const n=t.media();let i=-1;for(let r=0;r<e.length;r++)if(e[r].id===n.id){i=r;break}e.selectedIndex_=i,e.trigger({selectedIndex:i,type:"change"})};yl.canPlaySource=function(){return Vr.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")};const _l=e=>{let{player:t,sourceKeySystems:n,audioMedia:i,mainPlaylists:r}=e;if(!t.eme.initializeMediaKeys)return Promise.resolve();const s=((e,t)=>e.reduce(((e,n)=>{if(!n.contentProtection)return e;const i=t.reduce(((e,t)=>{const i=n.contentProtection[t];return i&&i.pssh&&(e[t]={pssh:i.pssh}),e}),{});return Object.keys(i).length&&e.push(i),e}),[]))(i?r.concat([i]):r,Object.keys(n)),a=[],o=[];return s.forEach((e=>{o.push(new Promise(((e,n)=>{t.tech_.one("keysessioncreated",e)}))),a.push(new Promise(((n,i)=>{t.eme.initializeMediaKeys({keySystems:e},(e=>{e?i(e):n()}))})))})),Promise.race([Promise.all(a),Promise.race(o)])},Tl=e=>{let{player:t,sourceKeySystems:n,media:i,audioMedia:r}=e;const s=((e,t,n)=>{if(!e)return e;let i={};t&&t.attributes&&t.attributes.CODECS&&(i=Ns(Object(m.h)(t.attributes.CODECS))),n&&n.attributes&&n.attributes.CODECS&&(i.audio=n.attributes.CODECS);const r=Object(m.e)(i.video),s=Object(m.e)(i.audio),a={};for(const o in e)a[o]={},s&&(a[o].audioContentType=s),r&&(a[o].videoContentType=r),t.contentProtection&&t.contentProtection[o]&&t.contentProtection[o].pssh&&(a[o].pssh=t.contentProtection[o].pssh),"string"===typeof e[o]&&(a[o].url=e[o]);return Zr(e,a)})(n,i,r);return!!s&&(t.currentSource().keySystems=s,!(s&&!t.eme)||(Vr.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1))},xl=()=>{if(!r.a.localStorage)return null;const e=r.a.localStorage.getItem(bl);if(!e)return null;try{return JSON.parse(e)}catch(t){return null}},Sl=(e,t)=>{e._requestCallbackSet||(e._requestCallbackSet=new Set),e._requestCallbackSet.add(t)},Al=(e,t)=>
2{e._responseCallbackSet||(e._responseCallbackSet=new Set),e._responseCallbackSet.add(t)},wl=(e,t)=>{e._requestCallbackSet&&(e._requestCallbackSet.delete(t),e._requestCallbackSet.size||delete e._requestCallbackSet)},jl=(e,t)=>{e._responseCallbackSet&&(e._responseCallbackSet.delete(t),e._responseCallbackSet.size||delete e._responseCallbackSet)};yl.supportsNativeHls=function(){if(!a.a||!a.a.createElement)return!1;const e=a.a.createElement("video");if(!Vr.getTech("Html5").isSupported())return!1;return["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"].some((function(t){return/maybe|probably/i.test(e.canPlayType(t))}))}(),yl.supportsNativeDash=!!(a.a&&a.a.createElement&&Vr.getTech("Html5").isSupported())&&/maybe|probably/i.test(a.a.createElement("video").canPlayType("application/dash+xml")),yl.supportsTypeNatively=e=>"hls"===e?yl.supportsNativeHls:"dash"===e&&yl.supportsNativeDash,yl.isSupported=function(){return Vr.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")},yl.xhr.onRequest=function(e){Sl(yl.xhr,e)},yl.xhr.onResponse=function(e){Al(yl.xhr,e)},yl.xhr.offRequest=function(e){wl(yl.xhr,e)},yl.xhr.offResponse=function(e){jl(yl.xhr,e)};const kl=Vr.getComponent("Component");class Cl extends kl{constructor(e,t,n){if(super(t,n.vhs),"number"===typeof n.initialBandwidth&&(this.options_.bandwidth=n.initialBandwidth),this.logger_=Kr("VhsHandler"),t.options_&&t.options_.playerId){const e=Vr.getPlayer(t.options_.playerId);this.player_=e}if(this.tech_=t,this.source_=e,this.stats={},this.ignoreNextSeekingEvent_=!1,this.setOptions_(),this.options_.overrideNative&&t.overrideNativeAudioTracks&&t.overrideNativeVideoTracks)t.overrideNativeAudioTracks(!0),t.overrideNativeVideoTracks(!0);else if(this.options_.overrideNative&&(t.featuresNativeVideoTracks||t.featuresNativeAudioTracks))throw new Error("Overriding native VHS requires emulated tracks. See https://git.io/vMpjB");this.on(a.a,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],(e=>{const t=a.a.fullscreenElement||a.a.webkitFullscreenElement||a.a.mozFullScreenElement||a.a.msFullscreenElement;t&&t.contains(this.tech_.el())?this.playlistController_.fastQualityChange_():this.playlistController_.checkABR_()})),this.on(this.tech_,"seeking",(function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())})),this.on(this.tech_,"error",(function(){this.tech_.error()&&this.playlistController_&&this.playlistController_.pauseLoading()})),this.on(this.tech_,"play",this.play)}setOptions_(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.options_=Zr(this.options_,e),this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.usePlayerObjectFit=this.options_.usePlayerObjectFit||!1,this.options_.useBandwidthFromLocalStorage="undefined"!==typeof this.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useForcedSubtitles=this.options_.useForcedSubtitles||!1,this.options_.useNetworkInformationApi="undefined"===typeof this.options_.useNetworkInformationApi||this.options_.useNetworkInformationApi,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.llhls=!1!==this.options_.llhls,this.options_.bufferBasedABR=this.options_.bufferBasedABR||!1,"number"!==typeof this.options_.playlistExclusionDuration&&(this.options_.playlistExclusionDuration=60),"number"!==typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage){const e=xl();e&&e.bandwidth&&(this.options_.bandwidth=e.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"})),e&&e.throughput&&(this.options_.throughput=e.throughput,this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"}))}"number"!==typeof this.options_.bandwidth&&(this.options_.bandwidth=ma.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===ma.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","usePlayerObjectFit","customPixelRatio","limitRenditionByPlayerDimensions","bandwidth","customTagParsers","customTagMappers","cacheEncryptionKeys","playlistSelector","initialPlaylistSelector","bufferBasedABR","liveRangeSafeTimeDelta","llhls","useForcedSubtitles","useNetworkInformationApi","useDtsForTimestampOffset","exactManifestTimings","leastPixelDiffSelector"].forEach((e=>{"undefined"!==typeof this.source_[e]&&(this.options_[e]=this.source_[e])})),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio,this.usePlayerObjectFit=this.options_.usePlayerObjectFit;const t=this.options_.customPixelRatio;"number"===typeof t&&t>=0&&(this.customPixelRatio=t)}setOptions(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.setOptions_(e)}src(e,t){if(!e)return;var n;this.setOptions_(),this.options_.src=0===(n=this.source_.src).toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")?JSON.parse(n.substring(n.indexOf(",")+1)):n,this.options_.tech=this.tech_,this.options_.externVhs=yl,this.options_.sourceType=Object(f.a)(t),this.options_.seekTo=e=>{this.tech_.setCurrentTime(e)},this.options_.player_=this.player_,this.playlistController_=new cl(this.options_);const i=Zr({liveRangeSafeTimeDelta:es},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new hl(i),this.attachStreamingEventListeners_(),this.playlistController_.on("error",(()=>{const e=Vr.players[this.tech_.options_.playerId];let t=this.playlistController_.error;"object"!==typeof t||t.code?"string"===typeof t&&(t={message:t,code:3}):t.code=3,e.error(t)}));const s=this.options_.bufferBasedABR?yl.movingAverageBandwidthSelector(.55):yl.STANDARD_PLAYLIST_SELECTOR;this.playlistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):s.bind(this),this.playlistController_.selectInitialPlaylist=yl.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.playlistController_.mainPlaylistLoader_,this.mediaSource=this.playlistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get(){return this.playlistController_.selectPlaylist},set(e){this.playlistController_.selectPlaylist=e.bind(this)}},throughput:{get(){return this.playlistController_.mainSegmentLoader_.throughput.rate},set(e){this.playlistController_.mainSegmentLoader_.throughput.rate=e,this.playlistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get(){let e=this.playlistController_.mainSegmentLoader_.bandwidth;const t=r.a.navigator.connection||r.a.navigator.mozConnection||r.a.navigator.webkitConnection,n=1e7;if(this.options_.useNetworkInformationApi&&t){const i=1e3*t.downlink*1e3;e=i>=n&&e>=n?Math.max(e,i):i}return e},set(e){this.playlistController_.mainSegmentLoader_.bandwidth=e,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get(){const e=1/(this.bandwidth||1);let t;t=this.throughput>0?1/this.throughput:0;return Math.floor(1/(e+t))},set(){Vr.log.error('The "systemBandwidth" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:()=>this.bandwidth||0,enumerable:!0},mediaRequests:{get:()=>this.playlistController_.mediaRequests_()||0,enumerable:!0},mediaRequestsAborted:{get:()=>this.playlistController_.mediaRequestsAborted_()||0,enumerable:!0},mediaRequestsTimedout:{get:()=>this.playlistController_.mediaRequestsTimedout_()||0,enumerable:!0},mediaRequestsErrored:{get:()=>this.playlistController_.mediaRequestsErrored_()||0,enumerable:!0},mediaTransferDuration:{get:()=>this.playlistController_.mediaTransferDuration_()||0,enumerable:!0},mediaBytesTransferred:{get:()=>this.playlistController_.mediaBytesTransferred_()||0,enumerable:!0},mediaSecondsLoaded:{get:()=>this.playlistController_.mediaSecondsLoaded_()||0,enumerable:!0},mediaAppends:{get:()=>this.playlistController_.mediaAppends_()||0,enumerable:!0},mainAppendsToLoadedData:{get:()=>this.playlistController_.mainAppendsToLoadedData_()||0,enumerable:!0},audioAppendsToLoadedData:{get:()=>this.playlistController_.audioAppendsToLoadedData_()||0,enumerable:!0},appendsToLoadedData:{get:()=>this.playlistController_.appendsToLoadedData_()||0,enumerable:!0},timeToLoadedData:{get:()=>this.playlistController_.timeToLoadedData_()||0,enumerable:!0},buffered:{get:()=>ss(this.tech_.buffered()),enumerable:!0},currentTime:{get:()=>this.tech_.currentTime(),enumerable:!0},currentSource:{get:()=>this.tech_.currentSource_,enumerable:!0},currentTech:{get:()=>this.tech_.name_,enumerable:!0},duration:{get:()=>this.tech_.duration(),enumerable:!0},main:{get:()=>this.playlists.main,enumerable:!0},playerDimensions:{get:()=>this.tech_.currentDimensions(),enumerable:!0},seekable:{get:()=>ss(this.tech_.seekable()),enumerable:!0},timestamp:{get:()=>Date.now(),enumerable:!0},videoPlaybackQuality:{get:()=>this.tech_.getVideoPlaybackQuality(),enumerable:!0}}),this.tech_.one("canplay",this.playlistController_.setupFirstPlay.bind(this.playlistController_)),this.tech_.on("bandwidthupdate",(()=>{this.options_.useBandwidthFromLocalStorage&&(e=>{if(!r.a.localStorage)return!1;let t=xl();t=t?Zr(t,e):e;try{r.a.localStorage.setItem(bl,JSON.stringify(t))}catch(n){return!1}})({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)})})),this.playlistController_.on("selectedinitialmedia",(()=>{var e;(e=this).representations=()=>{const t=e.playlistController_.main(),n=As(t)?e.playlistController_.getAudioTrackPlaylists_():t.playlists;return n?n.filter((e=>!bs(e))).map(((t,n)=>new dl(e,t,t.id))):[]}})),this.playlistController_.sourceUpdater_.on("createdsourcebuffers",(()=>{this.setupEme_()})),this.on(this.playlistController_,"progress",(function(){this.tech_.trigger("progress")})),this.on(this.playlistController_,"firstplay",(function(){this.ignoreNextSeekingEvent_=!0})),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=r.a.URL.createObjectURL(this.playlistController_.mediaSource),(Vr.browser.IS_ANY_SAFARI||Vr.browser.IS_IOS)&&this.options_.overrideNative&&"hls"===this.options_.sourceType&&"function"===typeof this.tech_.addSourceElement?(this.tech_.addSourceElement(this.mediaSourceUrl_),this.tech_.addSourceElement(this.source_.src)):this.tech_.src(this.mediaSourceUrl_))}createKeySessions_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation"),_l({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:e&&e.media(),mainPlaylists:this.playlists.main.playlists}).then((()=>{this.logger_("created EME key session"),this.playlistController_.sourceUpdater_.initializedEme()})).catch((e=>{this.logger_("error while creating EME key session",e),this.player_.error({message:"Failed to initialize media ke
2ys for EME",code:3})}))}handleWaitingForKey_(){this.logger_("waitingforkey fired, attempting to create any new key sessions"),this.createKeySessions_()}setupEme_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader,t=Tl({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:e&&e.media()});this.player_.tech_.on("keystatuschange",(e=>{this.playlistController_.updatePlaylistByKeyStatus(e.keyId,e.status)})),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on("waitingforkey",this.handleWaitingForKey_),t?this.createKeySessions_():this.playlistController_.sourceUpdater_.initializedEme()}setupQualityLevels_(){const e=Vr.players[this.tech_.options_.playerId];e&&e.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=e.qualityLevels(),this.playlistController_.on("selectedinitialmedia",(()=>{!function(e,t){t.representations().forEach((t=>{e.addQualityLevel(t)})),vl(e,t.playlists)}(this.qualityLevels_,this)})),this.playlists.on("mediachange",(()=>
2{vl(this.qualityLevels_,this.playlists)})))}static version(){return{"@videojs/http-streaming":fl,"mux.js":"7.1.0","mpd-parser":"1.3.1","m3u8-parser":"7.2.0","aes-decrypter":"4.0.2"}}version(){return this.constructor.version()}canChangeType(){return Do.canChangeType()}play(){this.playlistController_.play()}setCurrentTime(e){this.playlistController_.setCurrentTime(e)}duration(){return this.playlistController_.duration()}seekable(){return this.playlistController_.seekable()}dispose(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.playlistController_&&this.playlistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.mediaSourceUrl_&&r.a.URL.revokeObjectURL&&(r.a.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),super.dispose()}convertToProgramTime(e,t){return aa({playlist:this.playlistController_.media(),time:e,callback:t})}seekToProgramTime(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2;return oa({programTime:e,playlist:this.playlistController_.media(),retryCount:i,pauseAfterSeek:n,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})}setupXhrHooks_(){this.xhr.onRequest=e=>{Sl(this.xhr,e)},this.xhr.onResponse=e=>{Al(this.xhr,e)},this.xhr.offRequest=e=>{wl(this.xhr,e)},this.xhr.offResponse=e=>{jl(this.xhr,e)},this.player_.trigger("xhr-hooks-ready")}attachStreamingEventListeners_(){["seekablerangeschanged","bufferedrangeschanged","contentsteeringloadstart","contentsteeringloadcomplete","contentsteeringparsed"].forEach((e=>{this.playlistController_.on(e,(e=>{this.player_.trigger(h()({},e))}))})),["gapjumped","playedrangeschanged"].forEach((e=>{this.playbackWatcher_.on(e,(e=>{this.player_.trigger(h()({},e))}))}))}}const Ol={name:"videojs-http-streaming",VERSION:fl,canHandleSource(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=Zr(Vr.options,t);return!(!n.vhs.experimentalUseMMS&&!Object(m.c)("avc1.4d400d,mp4a.40.2",!1))&&Ol.canPlayType(e.type,n)},handleSource(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=Zr(Vr.options,n);return t.vhs=new Cl(e,t,i),t.vhs.xhr=Ks(),t.vhs.setupXhrHooks_(),t.vhs.src(e.src,e.type),t.vhs},canPlayType(e,t){const n=Object(f.a)(e);if(!n)return"";const i=Ol.getOverrideNative(t);return!yl.supportsTypeNatively(n)||i?"maybe":""},getOverrideNative(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{vhs:t={}}=e,n=!(Vr.browser.IS_ANY_SAFARI||Vr.browser.IS_IOS),{overrideNative:i=n}=t;return i}};Object(m.c)("avc1.4d400d,mp4a.40.2",!0)&&Vr.getTech("Html5").registerSourceHandler(Ol,0),Vr.VhsHandler=Cl,Vr.VhsSourceHandler=Ol,Vr.Vhs=yl,Vr.use||Vr.registerComponent("Vhs",yl),Vr.options.vhs=Vr.options.vhs||{},Vr.getPlugin&&Vr.getPlugin("reloadSourceOnError")||Vr.registerPlugin("reloadSourceOnError",ml)}).call(this,n(112))},194:function(e,t,n){(function(t){var n;n="undefined"!==typeof window?window:"undefined"!==typeof t?t:"undefined"!==typeof self?self:{},e.exports=n}).call(this,n(112))},195:function(e,t,n){"use strict";var i=n(0),r=n.n(i),s=n(5),a=n(79);n(63);t.a=()=>{const{t:e,i18n:t}=Object(a.a)(),{pathname:n}=Object(s.i)(),[i,o]=r.a.useState(!1),[l,c]=r.a.useState(!1),[d,u]=r.a.useState(!1),[h,p]=r.a.useState(!1);return r.a.useEffect((()=>{o(Boolean(Object(s.g)(n,{path:["/".concat(t.language,"/").concat(e("scuola")),"/".concat(t.language,"/").concat(e("scuola"),"/:classSlug"),"/".concat(t.language,"/").concat(e("scuola"),"/:classSlug/").concat(e("moduli")),"/".concat(t.language,"/").concat(e("scuola"),"/:classSlug/").concat(e("moduli"),"/:moduleSlug"),"/".concat(t.language,"/").concat(e("scuola"),"/:classSlug/").concat(e("moduli"),"/:moduleSlug/").concat(e("lezioni"),"/:chapterSlug"),"/".concat(t.language,"/").concat(e("scuola"),"/:classSlug/").concat(e("moduli"),"/:moduleSlug/").concat(e("lezioni"),"/:chapterSlug/:test")]})))}),[n]),r.a.useEffect((()=>{c(Boolean(Object(s.g)(n,{path:["/".concat(t.language,"/").concat(e("scopri"),"/").concat(e("benessere")),"/".concat(t.language,"/").concat(e("benessere")),"/".concat(t.language,"/").concat(e("benessere"),"/:classSlug"),"/".concat(t.language,"/").concat(e("benessere"),"/:classSlug/").concat(e("moduli")),"/".concat(t.language,"/").concat(e("benessere"),"/:classSlug/").concat(e("moduli"),"/:moduleSlug"),"/".concat(t.language,"/").concat(e("benessere"),"/:classSlug/").concat(e("moduli"),"/:moduleSlug/").concat(e("lezioni"),"/:chapterSlug"),"/".concat(t.language,"/").concat(e("benessere"),"/:classSlug/").concat(e("moduli"),"/:moduleSlug/").concat(e("lezioni"),"/:chapterSlug/:test")]})))}),[n]),r.a.useEffect((()=>{u(Boolean(Object(s.g)(n,{path:["/".concat(t.language,"/").concat(e("horeca")),"/".concat(t.language,"/").concat(e("horeca-brand"),"/:brandSlug"),"/".concat(t.language,"/").concat(e("horeca"),"/:courseSlug"),"/".concat(t.language,"/").concat(e("horeca"),"/:courseSlug/").concat(e("lezioni"),"/:lessonSlug"),"/".concat(t.language,"/").concat(e("horeca"),"/:courseSlug/").concat(e("lezioni"),"/:lessonSlug/:test")]})))}),[n]),r.a.useEffect((()=>{p((()=>l?{key:"wellness",translation:e("benessere"),fullTranslation:e("benessere"),layoutColor:"#F3F1EB"}:i?{key:"basics",translation:e("scuola"),fullTranslation:e("La Scuola"),layoutColor:"#121416"}:!!d&&{key:"horeca",translation:e("horeca"),fullTranslation:e("Horeca"),layoutColor:"#121416"}))}),[l,i,d]),{isBasic:i,isWellness:l,isHoreca:d,packageType:h}}},196:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var i=n(0),r=n.n(i),s=n(714),a=n(725),o=n(726),l=n(727),c=n(111),d=n(720),u=n(717),h=n(202),p=n.n(h),g=n(656),m=n(1);const f=Object(s.a)({root:{"& .MuiDialog-paper":{backgroundColor:"#26292D",borderRadius:10},"&.wellness":{"& .MuiDialog-paper":{backgroundColor:"#fff"}}}})(a.a),y=Object(s.a)({root:{padding:0}})(o.a),b=Object(s.a)((e=>({root:{padding:0},truncate:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",paddingRight:"30px"},closeButton:{position:"absolute",right:e.spacing(1),top:e.spacing(1),color:e.palette.grey[500]}})))((e=>{const{children:t,classes:n,onClose:i,...r}=e;return Object(m.jsxs)(l.a,{sx:{minHeight:"60px",p:0},...r,children:[t&&Object(m.jsx)(c.a,{p:2.5,pr:6,children:Object(m.jsx)(d.a,{component:"div",className:n.truncate,variant:"body1",children:Object(m.jsx)("b",{children:t})})}),Boolean(i)&&Object(m.jsx)(u.a,{"aria-label":"close",className:n.closeButton,onClick:()=>{i()},size:"large",children:Object(m.jsx)(p.a,{})})]})})),v=r.a.forwardRef((function(e,t){return Object(m.jsx)(g.a,{direction:"up",ref:t,...e})}));function _(e){const{children:t,open:n,title:i,fullScreen:r,handleClose:s,hideTitle:a,...o}=e;return Object(m.jsxs)(f,{fullScreen:r||!1,open:n,onClose:()=>s(),TransitionComponent:v,...o,children:[!a&&Object(m.jsx)(b,{onClose:()=>s(),children:i}),Object(m.jsx)(y,{children:t})]})}},197:function(e,t,n){"use strict";n.d(t,"g",(function(){return r})),n.d(t,"e",(function(){return s})),n.d(t,"k",(function(){return a})),n.d(t,"j",(function(){return o}
2)),n.d(t,"i",(function(){return l})),n.d(t,"b",(function(){return u})),n.d(t,"f",(function(){return h})),n.d(t,"c",(function(){return p})),n.d(t,"h",(function(){return g})),n.d(t,"d",(function(){return m})),n.d(t,"a",(function(){return f}));var i=n(194),r=function(e,t,n){return void 0===n&&(n=" "),(function(e,t){for(var n="";t--;)n+=e;return n}(n,t)+e.toString()).slice(-t)},s=function(e){return"function"===ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},a=function(e){return e instanceof Uint8Array?e:(Array.isArray(e)||s(e)||e instanceof ArrayBuffer||(e="number"!==typeof e||"number"===typeof e&&e!==e?0:[e]),new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0))},o=function(e){e=a(e);for(var t="",n=0;n<e.length;n++)t+=r(e[n].toString(16),2,"0");return t},l=function(e){e=a(e);for(var t="",n=0;n<e.length;n++)t+=r(e[n].toString(2),8,"0");return t},c=n.n(i).a.BigInt||Number,d=[c("0x1"),c("0x100"),c("0x10000"),c("0x1000000"),c("0x100000000"),c("0x10000000000"),c("0x1000000000000"),c("0x100000000000000"),c("0x10000000000000000")],u=(function(){var e=new Uint16Array([65484]),t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);255===t[0]||t[0]}(),function(e,t){var n=void 0===t?{}:t,i=n.signed,r=void 0!==i&&i,s=n.le,o=void 0!==s&&s;e=a(e);var l=o?"reduce":"reduceRight",u=(e[l]?e[l]:Array.prototype[l]).call(e,(function(t,n,i){var r=o?i:Math.abs(i+1-e.length);return t+c(n)*d[r]}),c(0));if(r){var h=d[e.length]/c(2)-c(1);(u=c(u))>h&&(u-=h,u-=h,u-=c(2))}return Number(u)}),h=function(e,t){var n=(void 0===t?{}:t).le,i=void 0!==n&&n;("bigint"!==typeof e&&"number"!==typeof e||"number"===typeof e&&e!==e)&&(e=0),e=c(e);for(var r,s=(r=e,Math.ceil(function(e){return e.toString(2).length}(r)/8)),a=new Uint8Array(new ArrayBuffer(s)),o=0;o<s;o++){var l=i?o:Math.abs(o+1-a.length);a[l]=Number(e/d[o]&c(255)),e<0&&(a[l]=Math.abs(~a[l]),a[l]-=0===o?1:2)}return a},p=function(e){if(!e)return"";e=Array.prototype.slice.call(e);var t=String.fromCharCode.apply(null,a(e));try{return decodeURIComponent(escape(t))}catch(n){}return t},g=function(e,t){if("string"!==typeof e&&e&&"function"===typeof e.toString&&(e=e.toString()),"string"!==typeof e)return new Uint8Array;t||(e=unescape(encodeURIComponent(e)));for(var n=new Uint8Array(e.length),i=0;i<e.length;i++)n[i]=e.charCodeAt(i);return n},m=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if((t=t.filter((function(e){return e&&(e.byteLength||e.length)&&"string"!==typeof e}))).length<=1)return a(t[0]);var i=t.reduce((function(e,t,n){return e+(t.byteLength||t.length)}),0),r=new Uint8Array(i),s=0;return t.forEach((function(e){e=a(e),r.set(e,s),s+=e.byteLength})),r},f=function(e,t,n){var i=void 0===n?{}:n,r=i.offset,s=void 0===r?0:r,o=i.mask,l=void 0===o?[]:o;e=a(e);var c=(t=a(t)).every?t.every:Array.prototype.every;return t.length&&e.length-s>=t.length&&c.call(t,(function(t,n){return t===(l[n]?l[n]&e[s+n]:e[s+n])}))}},198:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));n(0);var i=n(645),r=n(701),s=n(463),a=n(734),o=n(688),l=n(1);const c=Object(i.a)(r.a)((e=>{let{theme:t}=e;return{fontSize:18,color:"#B1B8BE",fontWeight:"bold","&.Mui-focused":{color:"#B1B8BE"}}})),d=Object(i.a)(s.c)((e=>{let{theme:t}=e;return{borderRadius:10,backgroundColor:"#2F3337",border:"1px solid #42474d",fontSize:16,padding:"10px 12px",color:"#fff",fontFamily:"Raleway",boxSizing:"border-box",height:43,"label + &":{marginTop:t.spacing(3)},"&.MuiAutocomplete-inputRoot":{padding:0,paddingLeft:12},"& .MuiAutocomplete-popupIndicator":{color:"#B1B8BE"},"& .MuiInputBase-input":{position:"relative","&.Mui-disabled":{WebkitTextFillColor:"gray"}},"& .MuiButton-contained":{}}}));function u(e){const{fullWidth:t,label:n,InputProps:i,inputProps:r,InputLabelProps:s,...o}=e;return Object(l.jsxs)(a.a,{fullWidth:t,variant:"standard",children:[Boolean(n)&&Object(l.jsx)(c,{...s,shrink:!0,children:n}),Object(l.jsx)(d,{...o,...i,inputProps:r})]})}const h=Object(i.a)(o.a)((e=>{let{theme:t}=e;return{"& label, & label.Mui-focused, ":{color:"#b1b8be",fontSize:"0.9rem"},"& .MuiOutlinedInput-root .MuiOutlinedInput-notchedOutline":{borderColor:"#42474d",borderWidth:"1.2px"},"& .MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"#b1b8be",borderWidth:"1.2px"},"&.light":{"& label, & label.Mui-focused, ":{color:"#B2B8BD"},"& .MuiOutlinedInput-root .MuiOutlinedInput-notchedOutline":{borderColor:"#B2B8BD",borderWidth:"1.5px"},"& .MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"#B2B8BD",borderWidth:"1.5px"},"& .MuiOutlinedInput-root":{backgroundColor:"#FFF"},"& .MuiOutlinedInput-input":{color:t.palette.dark.main}},"& .MuiOutlinedInput-root":{borderRadius:"10px",backgroundColor:"#26292D"},"& .MuiOutlinedInput-input":{"&.MuiInputBase-inputSizeSmall":{padding:"10px"},padding:"15px",color:"#fff"},"& .MuiInputLabel-outlined":{transform:"translate(14px, 17px) scale(1)"},"& .MuiInputLabel-outlined.MuiInputLabel-shrink":{transform:"translate(14px, -6px) scale(0.75)"}}}));t.b=h},201:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var i,r,s=n(0);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},a.apply(null,arguments)}function o(e,t){let{title:n,titleId:o,...l}=e;return s.createElement("svg",a({id:"Livello_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 346.1 61.3",style:{enableBackgroun
2d:"new 0 0 346.1 61.3"},xmlSpace:"preserve",ref:t,"aria-labelledby":o},l),n?s.createElement("title",{id:o},n):null,i||(i=s.createElement("style",{type:"text/css"},"\n\t.st0{fill:currentColor;}\n")),r||(r=s.createElement("g",null,s.createElement("path",{className:"st0",d:"M42.9,53.5c-4.3-4.7-6.7-10.9-6.7-17.9c0-6.9,2.6-13.2,6.9-17.9s10.1-7.4,16.6-7.4c1.6,0,3.1,0.1,4.7,0.5h0.1 l-1.6,7.9h-0.1c-1-0.3-2.1-0.4-3.2-0.4c-4.3,0-8.4,1.8-11.3,5c-3.1,3.4-4.7,7.4-4.7,12.2c0,9.6,7,17,15.9,17c1.2,0,2.2-0.1,3.2-0.4 h0.1l1.6,7.9h-0.1c-1.7,0.4-3.2,0.5-4.8,0.5C53,60.8,47,58.2,42.9,53.5z"}),s.createElement("path",{className:"st0",d:"M83.3,10.8h3.6V11l15.8,49.5h-8v-0.1l-2.1-6.9H77.7l-2.1,7h-7.9v-0.3L83.3,10.8z M85.1,29.2l-5,15.9h10.1 L85.1,29.2z"}),s.createElement("path",{className:"st0",d:"M16.2,10.8h3.6V11l15.8,49.5h-8v-0.1l-2.1-6.9H10.6l-2.1,7H0.7v-0.3L16.2,10.8z M18,29.2l-4.9,15.9h10.1 L18,29.2z"}),s.createElement("path",{className:"st0",d:"M107.9,10.8h7c6.6,0.1,12.6,2.7,16.8,7.2c4.3,4.4,6.7,10.6,6.7,17.5S136,48.5,131.7,53 c-4.3,4.5-10.1,7.2-16.7,7.4h-7.2V10.8H107.9z M130.9,35.5c0-9.2-6.5-16.1-15.5-16.4v33C124.3,51.7,130.9,44.6,130.9,35.5z"}),s.createElement("path",{className:"st0",d:"M142.8,10.8h23.9v8.3h-16.3v15.8h13.9v8.3h-13.9v8.9h16.4v8.3h-23.9V10.8H142.8z M150.2,0.6h6.3l2.1,7.2h-4.7 L150.2,0.6z"}),s.createElement("path",{className:"st0",d:"M207.7,10.8h3v49.6h-7.5V36.3l-11,19.2l-0.1-0.3l-11-18.9v24.1h-7.5V10.8h3V11L192,39.3L207.7,10.8z"}),s.createElement("path",{className:"st0",d:"M218,60.4V10.8h7.5v49.6H218z"}),s.createElement("path",{className:"st0",d:"M246,10.8h3.6V11l15.8,49.5h-8v-0.1l-2.1-6.9h-14.9l-2.1,7h-7.9v-0.3L246,10.8z M247.9,29.2l-5,15.9H253 L247.9,29.2z"}),s.createElement("polygon",{className:"st0",points:"289.9,60.4 289.9,19.9 281.5,19.9 281.5,10.8 305.7,10.8 305.7,19.9 297.4,19.9 297.4,60.4 "}),s.createElement("polygon",{className:"st0",points:"325.7,60.4 312.1,11 320,11 328.5,41.9 336.7,11 344.6,11 331.4,60.4 "}),s.createElement("rect",{x:274,y:52.9,className:"st0",width:7.5,height:7.5}))))}const l=s.forwardRef(o);n.p},204:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));n(0);var i=n(645),r=n(736),s=n(690),a=n(1);const o=Object(i.a)("span")((e=>{let{theme:t}=e;return{borderRadius:11,width:28,height:28,backgroundColor:"#555C64",display:"flex",justifyContent:"center",alignItems:"center"}})),l=Object(i.a)(o)({"&:before":{display:"block",width:"45%",height:"45%",backgroundColor:"#fff",borderRadius:"30%",content:'""'}}),c=Object(i.a)(s.a)({"&.small":{"& span:not(.MuiTouchRipple-root)":{width:20,height:20,borderRadius:5}},"&.MuiCheckbox-colorSecondary":{"& span:not(.MuiTouchRipple-root)":{backgroundColor:"#fff",border:"1.2px solid #41474E"},"&.Mui-checked":{"& span:not(.MuiTouchRipple-root)":{"&:before":{backgroundColor:"#41474E"}}}},"&.wellness":{"& .unchecked":{backgroundColor:"#E6E4DC"},"& .checked":{backgroundColor:"#E6E4DC","&:before":{backgroundColor:"#26292D"}}}}),d=Object(i.a)(r.a)((e=>{let{theme:t}=e;return{}}));function u(e){return Object(a.jsx)(d,{control:Object(a.jsx)(c,{color:"default",icon:Object(a.jsx)(o,{className:"unchecked"}),checkedIcon:Object(a.jsx)(l,{className:"checked"}),...e}),label:e.label||"",variant:"default"})}},205:function(e,t,n){"use strict";t.a={it:"https://www.iubenda.com/termini-e-condizioni/39756041",en:"https://www.iubenda.com/terms-and-conditions/70243759",es:"https://www.iubenda.com/condiciones-de-uso/56970618"}},206:function(e,t,n){"use strict";t.a={it:"https://www.iubenda.com/privacy-policy/39756041",en:"https://www.iubenda.com/privacy-policy/70243759",es:"https://www.iubenda.com/privacy-policy/56970618"}},207:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i,r=n(0);function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},s.apply(null,arguments)}function a(e,t){let{title:n,titleId:a,...o}=e;return r.createElement("svg",s({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",ref:t,"aria-labelledby":a},o),n?r.createElement("title",{id:a},n):null,i||(i=r.createElement("g",{id:"Raggruppa_5054","data-name":"Raggruppa 5054",transform:"translate(-89 -677)"},r.createElement("rect",{id:"Rettangolo_2144","data-name":"Rettangolo 2144",width:24,height:24,transform:"translate(89 677)",fill:"none"}),r.createElement("g",{id:"Raggruppa_5038","data-name":"Raggruppa 5038",transform:"translate(89.641 679)"},r.createElement("path",{id:"Tracciato_9014","data-name":"Tracciato 9014",d:"M72.65,20.281a.714.714,0,0,1-.682-.5c-.585-1.829-1.4-5.312-2.437-10.361q-.808.745-1.608,1.5a.717.717,0,0,1-.984-1.042c2.109-1.989,4.27-3.923,6.361-5.793C74.547,2.97,75.8,1.854,77.04.719h0a.618.618,0,0,1,.075-.074A1.434,1.434,0,0,1,79.1.74c1.133,1.025,2.265,2.034,3.4,3.042,2.206,1.966,4.488,4,6.708,6.1a.716.716,0,1,1-.984,1.042q-.87-.822-1.752-1.632c-.05.253-.1.519-.155.8-.616,3.161-1.46,7.489-2.166,9.7a.755.755,0,0,1-.686.5s-2.315-.014-3.592-.016a.716.716,0,0,1-.715-.712l-.026-4.088H76.913l.047,4.075a.717.717,0,0,1-.716.725c-1.547,0-3.2.009-3.577.017H72.65m7.935-1.448c.818,0,1.772.008,2.352.011.65-2.249,1.408-6.138,1.973-9.035.119-.61.228-1.17.324-1.652C84,7.037,82.76,5.934,81.546,4.851Q79.833,3.326,78.117,1.78a.709.709,0,0,1-.057-.057c-.016.016-.038.04-.055.055-1.249,1.138-2.5,2.257-3.75,3.375-1.149,1.028-2.321,2.076-3.491,3.14,1.012,5,1.823,8.545,2.413,10.548.561-.005,1.433-.009,2.342-.011l-.047-4.075a.717.717,0,0,1,.716-.725h3.653a.717.717,0,0,1,.716.712Z",transform:"translate(-66.715 -0.29)",fill:"currentColor"})))))}const o=r.forwardRef(a);n.p},208:function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var i=n(0),r=n.n(i),s=n(645),a=n(111),o=n(649),l=n(720),c=n(188),d=n(14),u=n.n(d),h=n(1);const p=Object(s.a)(a.a)((e=>{let{theme:t}=e;return{backgroundColor:"rgba(234, 0, 51, 0.55)",borderRadius:6,width:64,padding:t.spacing(1,0),textAlign:"center"}}));function g(e){const{end:t,onEnded:n,type:i,variantProps:s,...d}=e,g=r.a.useRef(),m="22:00",[f,y]=r.a.useState(u()(m,"HH:mm").diff(u()(),"seconds")<=0?u()(m,"HH:mm").add(1,"days"):u()(m,"HH:mm")),[b,v]=r.a.useState(f.diff(u()(),"seconds"));return r.a.useEffect((()=>{b<=0&&(n&&t===u()().format("DD-MM-YYYY")&&n(),y(u()(m,"HH:mm").add(1,"days")))}),[b]),r.a.useEffect((()=>{v(f.diff(u()(),"seconds"))}),[f]),r.a.useEffect((()=>(g.current=setInterval((()=>
2{v((e=>e-1))}),1e3),()=>{clearInterval(g.current)})),[]),i&&"variant"===i?Object(h.jsx)(o.a,{direction:"row",spacing:3,children:Object(c.l)(b,!0,!0).map((e=>Object(h.jsxs)(a.a,{children:[Object(h.jsx)(p,{...!!s&&{...s.timeContainerProps},children:Object(h.jsx)(l.a,{variant:"h6",color:"text.primary",...!!s&&{...s.valueProps},children:Object(h.jsx)("b",{children:e.value})})}),Object(h.jsx)(l.a,{align:"center",color:"text.primary",sx:{fontSize:10,mt:1},...!!s&&{...s.labelProps},children:e.label})]},e.value+e.label)))}):Object(h.jsx)(l.a,{...d,children:Object(c.l)(b,!0)})}},209:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i,r=n(0);function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},s.apply(null,arguments)}function a(e,t){let{title:n,titleId:a,...o}=e;return r.createElement("svg",s({xmlns:"http://www.w3.org/2000/svg",width:24,height:22.4,viewBox:"0 0 24 22.4",ref:t,"aria-labelledby":a},o),n?r.createElement("title",{id:a},n):null,i||(i=r.createElement("g",{id:"Raggruppa_6481","data-name":"Raggruppa 6481",transform:"translate(-0.813 -0.758)"},r.createElement("path",{id:"Poligono_5","data-name":"Poligono 5",d:"M9.315.854a.3.3,0,0,1,.569,0l2.068,6.2a.3.3,0,0,0,.19.19l6.2,2.068a.3.3,0,0,1,0,.569l-6.2,2.068a.3.3,0,0,0-.19.19l-2.068,6.2a.3.3,0,0,1-.569,0l-2.068-6.2a.3.3,0,0,0-.19-.19L.854,9.885a.3.3,0,0,1,0-.569l6.2-2.068a.3.3,0,0,0,.19-.19Z",transform:"translate(0.813 0.758)",fill:"currentColor"}),r.createElement("path",{id:"Poligono_6","data-name":"Poligono 6",d:"M5.315.854a.3.3,0,0,1,.569,0l1.068,3.2a.3.3,0,0,0,.19.19l3.2,1.068a.3.3,0,0,1,0,.569l-3.2,1.068a.3.3,0,0,0-.19.19l-1.068,3.2a.3.3,0,0,1-.569,0l-1.068-3.2a.3.3,0,0,0-.19-.19L.854,5.885a.3.3,0,0,1,0-.569l3.2-1.068a.3.3,0,0,0,.19-.19Z",transform:"translate(13.613 11.958)",fill:"currentColor"}))))}const o=r.forwardRef(a);n.p},210:function(e,t,n){"use strict";function i(e,t){return void 0===t&&(t=Object),t&&"function"===typeof t.freeze?t.freeze(e):e}var r=i({HTML:"text/html",isHTML:function(e){return e===r.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),s=i({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(e){return e===s.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});t.assign=function(e,t){if(null===e||"object"!==typeof e)throw new TypeError("target is not an object");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},t.find=function(e,t,n){if(void 0===n&&(n=Array.prototype),e&&"function"===typeof n.find)return n.find.call(e,t);for(var i=0;i<e.length;i++)if(Object.prototype.hasOwnProperty.call(e,i)){var r=e[i];if(t.call(void 0,r,i,e))return r}},t.freeze=i,t.MIME_TYPE=r,t.NAMESPACE=s},211:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var i,r,s=n(0);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},a.apply(null,arguments)}function o(e,t){let{title:n,titleId:o,...l}=e;return s.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:24,height:24,viewBox:"0 0 24 24",ref:t,"aria-labelledby":o},l),n?s.createElement("title",{id:o},n):null,i||(i=s.createElement("defs",null,s.createElement("clipPath",{id:"clip-path"},s.createElement("rect",{id:"Rettangolo_2483","data-name":"Rettangolo 2483",width:24,height:20.877})))),r||(r=s.createElement("g",{id:"Raggruppa_6039","data-name":"Raggruppa 6039",transform:"translate(-528 -2795)"},s.createElement("rect",{id:"Rettangolo_2484","data-name":"Rettangolo 2484",width:24,height:24,transform:"translate(528 2795)",fill:"none"}),s.createElement("g",{id:"Raggruppa_6037","data-name":"Raggruppa 6037",transform:"translate(528 2796.562)"},s.createElement("g",{id:"Raggruppa_6037-2","data-name":"Raggruppa 6037",transform:"translate(0 0)",clipPath:"url(#clip-path)"},s.createElement("path",{id:"Tracciato_9180","data-name":"Tracciato 9180",d:"M17.815,4.589A2.553,2.553,0,1,0,13.8,3.213,10.48,10.48,0,0,0,2.571,10.208c-.246.721-.48,1.4,9.935,4.975,5.453,1.871,7.818,2.439,8.9,2.439.779,0,.881-.3.99-.614A10.5,10.5,0,0,0,17.815,4.589m-6.1,2.991a4.376,4.376,0,0,0-3.387,2.664A.783.783,0,1,1,6.9,9.586a5.918,5.918,0,0,1,4.7-3.569.783.783,0,0,1,.107,1.562m3.625-5.343h0a.977.977,0,0,1,.5-.568.99.99,0,1,1-.5.568",transform:"translate(0.111 0)"}),s.createElement("path",{id:"Tracciato_9181","data-name":"Tracciato 9181",d:"M12,20.082A109.064,109.064,0,0,1,.7,19.5a.783.783,0,0,1-.7-.859.8.8,0,0,1,.861-.7,107.533,107.533,0,0,0,22.27,0,.791.791,0,0,1,.861.7.783.783,0,0,1-.7.859,109.064,109.064,0,0,1-11.3.586",transform:"translate(0 0.796)"}))))))}const l=s.forwardRef(o);n.p},212:function(e,t,n){"use strict";n.d(t,"a",(function(){return Ke}));var i=n(0),r=n.n(i),s=n(79),a=n(5),o=n(275),l=n(20),c=n(35),d=n(55),u=n(269),h=n(699),p=n(692),g=n(718),m=n(111),f=n(37),y=n(1);const b=r.a.forwardRef((function(e,t){return Object(y.jsx)(p.a,{elevation:6,ref:t,variant:"filled",...e})}));function v(){const{config:e}=r.a.useContext(f.a),{t:t}=Object(s.a)(),{layoutState:n,showError:i}=r.a.useContext(d.a),a={"NOT-AUTHORIZED":t("Sessione utente non valida o scaduta"),"UPGRADE-NEEDED":t("Per utilizzare questa funzionalit\xe0 devi comprare il corso o un abbonamento"),"DUPLICATED[QUIZ]":t("Il quiz per la lezione \xe8 gi\xe0 stato sostenuto"),"DUPLICATED[EMAIL]":t("L'indirizzo email r
2isulta gi\xe0 utilizzato"),"DUPLICATED[EXT_PROFILES]":t("Utente gi\xe0 registrato"),"INVALID[CREDENTIALS]":t("Utente non trovato"),"INVALID[TOKEN]":t("Credenziali non valide"),"INVALID[USERNAME]":t("Campo 'username' non valido"),"INVALID[PASSWORD]":e.password_policy_txt,"INVALID[EMAIL]":t("Email non valida"),"INVALID-GC[SENDER]":t("Campo 'email' mittente non valido"),"INVALID-GC[RECIPIENT]":t("Campo 'email' destinatario non valido"),"INVALID-GC[TOKEN]":t("Codice non valido"),"MISSING[EMAIL]":t("Campo 'email' mancante"),"MISSING[FIRST_NAME]":t("Campo 'nome' mancante"),"MISSING[LAST_NAME]":t("Campo 'cognome' mancante"),"MISSING[SENDER]":t("Campo 'email' mancante"),"NOT-FOUND[TOKEN]":t("Il codice fornito non \xe8 stato trovato"),"NOT-FOUND[REFERRAL_ID]":t("L'utente che ti ha invitato non \xe8 stato trovato"),"Devi accettare le Privacy Policy per proseguire!":t("Devi accettare le Privacy Policy per proseguire!"),"activate-account":t("E-mail da verificare. Ti abbiamo inviato una mail per attivare il tuo account: controlla la tua casella e clicca sul pulsante \u201cAttiva\u201d"),"Si \xe8 verificato un errore durante il caricamento, si prega di riprovare.":t("Si \xe8 verificato un errore durante il caricamento, si prega di riprovare.")};return Object(y.jsx)(h.a,{open:!1!==n.error,autoHideDuration:6e3,onClose:()=>i(!1),children:Object(y.jsxs)(b,{onClose:()=>i(!1),severity:"error",children:[n.error&&n.error.error_message in a?a[n.error.error_message]:t("Ops! Qualcosa \xe8 andato storto..."),n.error&&n.error.action&&Object(y.jsx)(m.a,{mt:1,children:Object(y.jsx)(g.a,{onClick:n.error.action.onClick,sx:{mt:1},color:"secondary",variant:"contained",size:"small",children:Object(y.jsx)("b",{children:n.error.action.label})})})]})})}const _=r.a.forwardRef((function(e,t){return Object(y.jsx)(p.a,{elevation:6,ref:t,variant:"filled",...e})}));function T(){const{layoutState:e,showSuccess:t}=r.a.useContext(d.a);return Object(y.jsx)(h.a,{open:!1!==e.success,autoHideDuration:6e3,onClose:()=>t(!1),children:Object(y.jsx)(_,{onClose:()=>t(!1),severity:"success",children:e.success?e.success.message:""})})}var x=n(645),S=n(28),A=n(205),w=n(206),j=n(719),k=n(705),C=n(716),O=n(720),E=n(721),I=n(700),P=n(646),R=n(647),D=n(648),L=n(201),M=n.p+"static/media/youtube.deabf4eb.svg",
2N=n.p+"static/media/instagram.41f1ea4c.svg",B=n.p+"static/media/facebook.7aec6fb2.svg",U=n.p+"static/media/linkedin.4fbd71db.svg",F=n.p+"static/media/telegram.39b6a7f2.svg",q=n(218),z=n(219),V=n(14),H=n.n(V);const W=Object(x.a)(m.a)((e=>{let{theme:t}=e;return{backgroundColor:"#26292D",color:"#B1B8BE"}}));function G(e){const{t:t,i18n:n}=Object(s.a)(),i=r.a.useRef();return r.a.useEffect((()=>{window.Trustpilot&&i.current&&window.Trustpilot.loadFromElement(i.current,!0)}),[i]),Object(y.jsx)(W,{children:Object(y.jsx)(j.a,{maxWidth:!1,sx:{maxWidth:1700},children:Object(y.jsx)(k.a,{container:!0,justifyContent:"center",children:Object(y.jsx)(k.a,{item:!0,xs:10,sx:{py:5},children:Object(y.jsxs)(k.a,{container:!0,spacing:5,justifyContent:"space-between",children:[Object(y.jsxs)(k.a,{item:!0,xs:12,md:3,children:[Object(y.jsx)(m.a,{sx:{color:e=>e.palette.text.primary},children:Object(y.jsx)(C.a,{component:L.a,color:"inherit",viewBox:"0 0 346.1 61.3",sx:{fontSize:{xs:"1.6rem"},width:"auto"}})}),Object(y.jsxs)(O.a,{component:"h6",variant:"caption",sx:{mt:2},children:[Object(y.jsxs)(m.a,{componet:"span",sx:{display:{xs:"none",sm:"block"}},children:["Acad\xe8mia.tv s.r.l.",Object(y.jsx)("br",{}),"Via Riva di Trento, 11A",Object(y.jsx)("br",{}),"20139 - Milano (MI) - Italy",Object(y.jsx)("br",{}),"P.IVA: 11454950962",Object(y.jsx)("br",{}),Object(y.jsx)("br",{}),"\xa9 ",H()().year()," Copyright"]}),Object(y.jsxs)(m.a,{componet:"span",sx:{display:{sm:"none"}},children:["Acad\xe8mia.tv s.r.l. Via Riva di Trento, 11A",Object(y.jsx)("br",{}),"20139 - Milano (MI) - Italy P.IVA: 11454950962",Object(y.jsx)("br",{}),Object(y.jsx)("br",{}),"\xa9 ",H()().year()," Copyright"]})]})]}),Object(y.jsxs)(k.a,{item:!0,xs:6,md:3,children:[Object(y.jsx)(O.a,{variant:"h6",color:"textPrimary",sx:{mb:2},children:Object(y.jsx)("b",{children:"About"})}),Object(y.jsxs)(E.a,{children:[Object(y.jsx)(I.a,{disablePadding:!0,children:Object(y.jsx)(P.a,{sx:{px:0},onClick:()=>{Object(S.e)({event:"footer_nav",event_id:"09",event_trigger:"GAevent",event_detail:"terms"}),window.open(A.a[n.language.split("-")[0]],"_blank")},children:Object(y.jsx)(R.a,{children:Object(y.jsx)(O.a,{variant:"subtitle2",children:t("Termini e condizioni")})})})}),Object(y.jsx)(I.a,{disablePadding:!0,children:Object(y.jsx)(P.a,{sx:{px:0},onClick:()=>{Object(S.e)({event:"footer_nav",event_id:"09",event_trigger:"GAevent",event_detail:"privacy"}),window.open(w.a[n.language.split("-")[0]],"_blank")},children:Object(y.jsx)(R.a,{children:Object(y.jsx)(O.a,{variant:"subtitle2",children:t("Privacy policy")})})})}),Object(y.jsx)(I.a,{disablePadding:!0,children:Object(y.jsx)(P.a,{sx:{px:0},onClick:()=>{Object(S.e)({event:"footer_nav",event_id:"09",event_trigger:"GAevent",event_detail:"support"}),window.location="mailto:[email protected]"},children:Object(y.jsx)(R.a,{children:Object(y.jsx)(O.a,{variant:"subtitle2",children:t("Assistenza e supporto")})})})}),"it"===n.language&&Object(y.jsx)(I.a,{disablePadding:!0,children:Object(y.jsx)(P.a,{sx:{px:0},onClick:()=>{Object(S.e)({event:"footer_nav",event_id:"09",event_trigger:"GAevent",event_detail:"partnership"}),window.open("https://ac.academia.tv/business","_blank")},children:Object(y.jsx)(R.a,{children:Object(y.jsx)(O.a,{variant:"subtitle2",children:t("Partnership")})})})})]})]}),Object(y.jsxs)(k.a,{item:!0,xs:6,md:3,children:[Object(y.jsx)(O.a,{variant:"h6",color:"textPrimary",sx:{mb:2},children:Object(y.jsx)("b",{children:"Social"})}),Object(y.jsxs)(E.a,{children:[Object(y.jsx)(I.a,{disablePadding:!0,children:Object(y.jsxs)(P.a,{sx:{px:0},onClick:()=>{Object(S.e)({event:"footer_nav",event_id:"09",event_trigger:"GAevent",event_detail:"telegram"}),window.open("https://t.me/+0atHlu9OHyA4NGM0","_blank")},children:[Object(y.jsx)(D.a,{children:Object(y.jsx)("img",{src:F,width:"20"})}),Object(y.jsx)(R.a,{children:Object(y.jsx)(O.a,{variant:"subtitle2",children:"Telegram"})})]})}),Object(y.jsx)(I.a,{disablePadding:!0,children:Object(y.jsxs)(P.a,{sx:{px:0},onClick:()=>{Object(S.e)({event:"footer_nav",event_id:"09",event_trigger:"GAevent",event_detail:"instagram"}),window.open("https://www.instagram.com/academia_ita/","_blank")},children:[Object(y.jsx)(D.a,{children:Object(y.jsx)("img",{src:N})}),Object(y.jsx)(R.a,{children:Object(y.jsx)(O.a,{variant:"subtitle2",children:"Instagram"})})]})}),Object(y.jsx)(I.a,{disablePadding:!0,children:Object(y.jsxs)(P.a,{sx:{px:0},onClick:()=>{Object(S.e)({event:"footer_nav",event_id:"09",event_trigger:"GAevent",event_detail:"facebook"}),"it"===n.language&&window.open("https://www.facebook.com/IT.academia.tv","_blank"),"en"===n.language&&window.open("https://www.facebook.com/EN.academia.tv","_blank"),"es"===n.language&&window.open("https://www.facebook.com/ES.academia.tv","_blank")},children:[Object(y.jsx)(D.a,{children:Object(y.jsx)("img",{src:B})}),Object(y.jsx)(R.a,{children:Object(y.jsx)(O.a,{variant:"subtitle2",children:"Facebook"})})]})}),Object(y.jsx)(I.a,{disablePadding:!0,children:Object(y.jsxs)(P.a,{sx:{px:0},onClick:()=>{Object(S.e)({event:"footer_nav",event_id:"09",event_trigger:"GAevent",event_detail:"linkedin"}),window.open("https://www.linkedin.com/company/academiachefincamicia/","_blank")},children:[Object(y.jsx)(D.a,{children:Object(y.jsx)("img",{src:U})}),Object(y.jsx)(R.a,{children:Object(y.jsx)(O.a,{variant:"subtitle2",children:"Linkedin"})})]})}),Object(y.jsx)(I.a,{disablePadding:!0,children:Object(y.jsxs)(P.a,{sx:{px:0},onClick:()=>{Object(S.e)({event:"footer_nav",event_id:"09",event_trigger:"GAevent",event_detail:"youtube"}),window.open("https://www.youtube.com/channel/UCGHXbVQuk8T4N7O-_HKCf-g","_blank")},children:[Object(y.jsx)(D.a,{children:Object(y.jsx)("img",{src:M})}),Object(y.jsx)(R.a,{children:Object(y.jsx)(O.a,{variant:"subtitle2",children:"Youtube"})})]})})]})]}),Object(y.jsxs)(k.a,{item:!0,xs:12,md:3,children:[Object(y.jsx)(O.a,{variant:"h6",color:"textPrimary",sx:{mb:4},children:Object(y.jsx)("b",{children:"App"})}),Object(y.jsx)(m.a,{mb:2,children:Object(y.jsx)("img",{src:q.a,width:"150",style:{cursor:"pointer"},onClick:()=>{Object(S.e)({event:"footer_nav",event_id:"09",event_trigger:"GAevent",event_detail:"app_android"}),window.open("https://apps.apple.com/it/app/acad%C3%A8mia/id1502080183","_blank")}})}),Object(y.jsx)("img",{src:z.a,width:"160",style:{cursor:"pointer"},onClick:()=>{Object(S.e)({event:"footer_nav",event_id:"09",event_trigger:"GAevent",event_detail:"app_ios"}),window.open("https://play.google.com/store/apps/details?id=com.chefincamicia.academia","_blank")}})]})]})})})})})}var X=n(27),Y=n(724),Q=n(717),K=n(191),Z=n(208),J=n(202),$=n.n(J);const ee=Object(x.a)(m.a)((e=>{let{theme:t}=e;return{backgroundColor:"#E90133",color:"#fff"}}));function te(e){const{bannerType:t}=e,n=Object(a.i)(),{auth:i}=r.a.useContext(l.a),[o,d]=r.a.useState([]),{request:u,cancelToken:h}=r.a.useContext(c.a),[p,g]=r.a.useState({}),{t:f,i18n:b}=Object(s.a)(),v=new URLSearchParams(n.search).get("nodefcpn")||localStorage.getItem("nodefcpn");return r.a.useEffect((()=>{g(o.reduce(((e,t)=>({...e,[t.title]:!Boolean(sessionStorage.getItem(t.title))})),{}))}),[o]),r.a.useEffect((()=>{t&&(async()=>{const e=h.source(),n=await u("get","/v2/banners/".concat(t,"/top"),e.token);n&&d(n)})()}),[t,i]),Object(y.jsx)(r.a.Fragment,{children:o.map((e=>!Boolean(v)&&Object(y.jsx)(Y.a,{in:p[e.title],children:Object(y.jsx)(ee,{sx:{py:1,px:{xs:1,md:3},...Boolean(e.bg_color)&&{backgroundColor:e.bg_color},...Boolean(e.text_color)&&{color:e.text_color}},children:Object(y.jsxs)(k.a,{container:!0,spacing:1,children:[Object(y.jsx)(k.a,{item:!0,xs:9,md:7,sx:{display:"flex",alignItems:"center"},children:Object(y.jsxs)(m.a,{children:[Object(y.jsx)(O.a,{variant:"h6",component:"span",sx:{textShadow:"0 2px 3px rgba(0, 0, 0, 0.2)",textTransform:"uppercase",mr:2,display:{xs:"block",md:"inline"}},children:Object(y.jsx)("b",{children:e.title})}),Object(y.jsx)(O.a,{component:"span",sx:{textShadow:"0 0 2px rgba(0, 0, 0, 0.1)",fontSize:{xs:"0.8rem",md:"1rem"}},children:e.description}),Boolean(e.countdown_enabled)&&Object(y.jsx)(Z.a,{end:e.countdown_enabled,onEnded:()=>g((t=>(sessionStorage.setItem(e.title,1),{...t,[e.title]:!1}))),sx:{fontSize:{xs:"0.8rem",md:"1rem"},display:{fontWeight:"bold",xs:"block",md:"none"}}})]})}),Object(y.jsxs)(k.a,{item:!0,xs:5,sx:{textAlign:"right",display:{xs:"none",md:"block"}},children:[Boolean(e.countdown_enabled)&&Object(y.jsx)(Z.a,{component:"span",end:e.countdown_enabled,onEnded:()=>g((t=>(sessionStorage.setItem(e.title,1),{...t,[e.title]:!1}))),sx:{fontWeight:"bold"}}),Object(y.jsx)(K.a,{color:"secondary",component:X.b,target:e.cta_target,to:{pathname:e.cta_url.split("?")[0],search:e.cta_url.split("?")[1]?e.cta_url.split("?")[1]:"",state:{from:n.pathname}},sx:{mx:2,...Boolean(e.button_bg_color)&&{backgroundColor:e.button_bg_color},...Boolean(e.button_text_color)&&{color:e.button_text_color}},children:e.cta_label}),Object(y.jsx)(Q.a,{sx:{color:"#fff"},onClick:()=>{g((t=>(sessionStorage.setItem(e.title,1),{...t,[e.title]:!1})))},children:Object(y.jsx)($.a,{fontSize:"large"})})]}),Object(y.jsxs)(k.a,{item:!0,xs:3,sx:{textAlign:"right",display:{xs:"block",md:"none"}},children:[Object(y.jsx)(Q.a,{sx:{color:"#fff",p:0},onClick:()=>{g((t=>(sessionStorage.setItem(e.title,1),{...t,[e.title]:!1})))},children:Object(y.jsx)($.a,{fontSize:"large"})}),Object(y.jsx)("br",{}),Object(y.jsx)("br",{}),Object(y.jsx)(K.a,{color:"secondary",component:X.b,target:e.cta_target,to:{pathname:e.cta_url.split("?")[0],search:e.cta_url.split("?")[1]?e.cta_url.split("?")[1]:"",state:{from:n.pathname}},sx:{fontSize:10,padding:"8px 16px",...Boolean(e.button_bg_color)&&{backgroundColor:e.button_bg_color},...Boolean(e.button_text_color)&&{color:e.button_text_color}},children:Object(y.jsx)("b",{children:e.cta_label})})]})]})})},e.id)))})}var ne=n(223),ie=n(714),re=n(262),se=n.n(re),ae=n(195),oe=n(81),le=n(732),ce=n(733),de=n(707),ue=n(222),he=n(260),pe=n.n(he),ge=n(226),me=n(207);var fe=Object(ie.a)({appBar:{backgroundColor:"transparent",boxShadow:"none",transition:"background-color .5s ease, color .5s ease",color:"#fff",marginBottom:"-75px",position:"relative","& .MuiToolbar-regular":{justifyContent:"space-between",alignItems:"center",minHeight:"75px"}},appBarScrolled:{position:"fixed",backgroundColor:"#27292D",boxShadow:"0px 2px 4px -1px rgb(0 0 0 / 20%), 0px 4px 5px 0px rgb(0 0 0 / 14%), 0px 1px 10px 0px rgb(0 0 0 / 12%)","&.wellness":{backgroundColor:"#EFEDE5",color:"#27292D","& .variant":{color:"#27292D !important"}}},logo:{maxWidth:"221px",width:"100%"}})((function(e){const t=Object(a.h)(),{t:n,i18n:i}=Object(s.a)(),{currentCategory:o}=Object(oe.a)(),c=Object(a.i)(),{packageType:d,isWellness:u}=Object(ae.a)(),{classes:h,headerBg:p}=e,{auth:b}=r.a.useContext(l.a),{config:v}=r.a.useContext(f.a),_=Object(a.g)(c.pathname,{path:"/".concat(i.language,"/").concat(n("cerca"),"/:section?"),exact:!0}
2),[T,x]=r.a.useState(!1),[A,w]=r.a.useState(!1),j=r.a.useRef(),k=e=>{j.current&&document.documentElement.scrollTop>j.current.offsetTop?x(!0):x(!1)};return r.a.useEffect((()=>(window.addEventListener("scroll",k),()=>{window.removeEventListener("scroll",k)})),[]),Object(y.jsxs)(le.a,{ref:j,className:se()(h.appBar,{[d.key]:!0,[h.appBarScrolled]:T}),style:{backgroundColor:p||""},children:[Object(y.jsxs)(ce.a,{children:[Object(y.jsx)(Q.a,{className:se()(h.menu),color:"inherit",size:"large",component:X.b,to:"/".concat(i.language,"/").concat(n("cerca")),sx:{display:{md:"none"}},children:Object(y.jsx)(C.a,{component:ge.a,color:"inherit"})}),Object(y.jsxs)(m.a,{sx:{display:"flex",alignItems:"center",flexDirection:{xs:"column",md:"row"},"& img":{width:"100%",mr:{xs:0,md:2},maxWidth:{xs:171,md:221}},"& .MuiChip-root":{mt:1}},children:[Object(y.jsx)(C.a,{onClick:()=>t.push("/"+i.language),component:L.a,color:"inherit",viewBox:"0 0 346.1 61.3",sx:{fontSize:{md:"2.4rem",xs:"1.5rem"},width:"auto",cursor:"pointer"}}),Boolean(d)&&Object(y.jsx)(de.a,{color:d.key,size:"small",label:Object(y.jsx)("b",{children:d.fullTranslation}),component:X.b,to:"/".concat(i.language,"/").concat(d.translation),clickable:!0,sx:{textTransform:"uppercase",ml:1}}),!!_&&Object(y.jsx)(Q.a,{component:X.b,to:"/".concat(i.language),color:"light",sx:{background:"#333639",ml:3,display:{xs:"none",md:"inline-flex"}},children:Object(y.jsx)(C.a,{component:me.a})})]}),Object(y.jsxs)(m.a,{sx:{display:{xs:"none",md:"inline-flex"}},children:[!Boolean(e.hideSubButton)&&(!b.isAuthenticated||b.isAuthenticated&&b.user&&b.user.data&&!b.user.data.flag_active_subscription&&!u||b.isAuthenticated&&b.user&&b.user.data&&!b.user.data.flag_active_wellness_subscription&&u||b.isAuthenticated&&b.user&&b.user.data&&b.user.data.flag_active_wellness_subscription&&b.user.data.flag_active_subscription&&!b.user.data.flag_active_pro)&&Object(y.jsx)(g.a,{component:X.b,variant:"contained",color:"primary",size:"large",to:{pathname:"/".concat(i.language,"/paywall"),...!b.isAuthenticated||b.isAuthenticated&&b.user&&b.user.data&&(!b.user.data.flag_active_subscription||!b.user.data.flag_active_wellness_subscription)?{search:"from=".concat(d&&"horeca"!==d.key?d.key:"masterclass")}:{},state:{from:c.pathname}},onClick:e=>{Object(S.e)({event:"cta_click",event_id:"03",event_trigger:"GAevent",event_detail:"buy_".concat(d&&"horeca"!==d.key?d.key:"masterclass"),event_subdetail:e.target.innerText})},style:{color:"white !important"},children:b.user&&b.user.data&&b.user.data.flag_active_wellness_subscription&&b.user.data.flag_active_subscription&&!b.user.data.flag_active_pro?n("Scopri il piano PRO"):n("Inizia ora")}),!Boolean(e.hideSubButton)&&!u&&(!b.isAuthenticated||b.isAuthenticated&&b.user&&b.user.data&&!b.user.data.flag_active_subscription)&&Object(y.jsx)(g.a,{component:X.b,variant:"contained",size:"large",to:{pathname:Object(a.f)("/:lang/:courses/:courseSlug/:lessons/:lessonSlug",{lang:i.language,courses:n("corsi"),courseSlug:v.free_lesson_course_slug,lessons:n("lezioni"),lessonSlug:v.free_lesson_slug}),state:{from:c.pathname}},onClick:()=>{Object(S.e)({event:"free_lesson",event_id:"03",event_trigger:"GAevent",event_detail:"".concat(o," header")})},color:"secondary",sx:{ml:2},children:n("Guarda lezione gratuita")}),!Boolean(e.hideSubButton)&&u&&d&&(!b.isAuthenticated||b.isAuthenticated&&b.user&&b.user.data&&!b.user.data.flag_active_wellness_subscription)&&Object(y.jsx)(g.a,{component:X.b,variant:"contained",to:{pathname:Object(a.f)("/:lang/:package/:classSlug/:modules/:moduleSlug/:lessons/:chapterSlug",{lang:i.language,package:d.translation,classSlug:v.wellness_free_lesson_course_pkg_slug,modules:n("moduli"),moduleSlug:v.wellness_free_lesson_course_slug,lessons:n("lezioni"),chapterSlug:v.wellness_free_lesson_slug}),state:{from:c.pathname}},className:se()(h.button,"variant"),onClick:()=>{Object(S.e)({event:"free_lesson",event_id:"03",event_trigger:"GAevent",event_detail:"".concat(o," header")})},color:"secondary",sx:{ml:2},children:n("Guarda lezione gratuita")})]}),Object(y.jsx)(Q.a,{color:"inherit",size:"large",className:"variant",onClick:()=>w(!0),sx:{display:{md:"none"}},children:Object(y.jsx)(pe.a,{})}),Object(y.jsxs)(m.a,{sx:{display:{xs:"none",md:"inline-flex"}},children:[Object(y.jsx)(g.a,{variant:"text",color:"white",component:X.b,to:"/".concat(i.language,"/").concat(n("cerca"),"/").concat(n("corsi"),"?p=1"),sx:{mr:2,textTransform:"capitalize"},activeStyle:{textDecoration:"underline"},className:"variant",children:n("corsi")}),v.recipes_enabled&&Object(y.jsx)(g.a,{variant:"text",color:"white",component:X.b,to:"/".concat(i.language,"/").concat(n("cerca"),"/").concat(n("ricette"),"?p=1"),sx:{mr:2,textTransform:"capitalize"},activeStyle:{textDecoration:"underline"},className:"variant",children:n("ricette")}),Object(y.jsx)(g.a,{variant:"text",color:"white",component:X.b,to:"/".concat(i.language,"/").concat(n("cerca"),"/").concat(n("tecniche"),"?p=1"),sx:{mr:2,textTransform:"capitalize"},activeStyle:{textDecoration:"underline"},className:"variant",children:n("tecniche")}),Object(y.jsx)(g.a,{variant:"text",color:"white",component:X.b,to:"/".concat(i.language,"/").concat(n("cerca")),activeStyle:{textDecoration:"underline"},sx:{mr:2,textTransform:"capitalize"},endIcon:Object(y.jsx)(C.a,{component:ge.a,color:"inherit",sx:{fontSize:"1rem"}}),className:"variant",children:n("cerca")}),Object(y.jsx)(g.a,{variant:"text",color:"white",onClick:()=>w(!0),endIcon:Object(y.jsx)(pe.a,{}),className:"variant",children:n("Menu")})]})]}),Object(y.jsx)(ue.a,{open:A,setOpen:w}
2)]})})),ye=n(64),be=n(196),ve=n(200),_e=n(231);var Te=()=>{const{layoutState:e,toggleAuthDialog:t}=r.a.useContext(d.a);return Object(y.jsx)(be.a,{maxWidth:"md",scroll:"body",fullScreen:ve.isMobileOnly,open:e.openAuthDialog,handleClose:()=>{t(!1)},children:Object(y.jsx)(m.a,{sx:{minWidth:{lg:850}},children:Object(y.jsx)(_e.b,{})})})},xe=n(709),Se=n(188),Ae=n(204),we=n(192),je=n(659),ke=n(739),Ce=n(697),Oe=n(688),Ee=n(740),Ie=n(649),Pe=n(729),Re=n(555),De=n(556),Le=n(29),Me=n(229),Ne=n.n(Me),Be=n(241),Ue=n.n(Be),Fe=n(242),qe=n.n(Fe),ze=n(281),Ve=n.n(ze);Object(Le.a)(je.a)((e=>{let{theme:t}=e;return{["&.".concat(Re.a.alternativeLabel)]:{top:10,left:"calc(-50% + 16px)",right:"calc(50% + 16px)"},["&.".concat(Re.a.active)]:{["& .".concat(Re.a.line)]:{borderColor:"#e90134"}},["&.".concat(Re.a.completed)]:{["& .".concat(Re.a.line)]:{borderColor:"#e90134"}},["& .".concat(Re.a.line)]:{borderColor:"#42474d",borderTopWidth:3,borderRadius:1}}}));const He=Object(Le.a)("div")((e=>{let{theme:t,ownerState:n}=e;return{color:"currentColor",width:"100%","& .QontoStepIcon-completedIcon":{color:"#fff !important",zIndex:1,fontSize:18},"& .QontoStepIcon-circle":{borderRadius:1.5,height:3,backgroundColor:"currentColor"},["& .".concat(De.a.iconContainer)]:{paddingRight:0}}})),We=Object(Le.a)(ke.a)((e=>{let{theme:t}=e;return{flexGrow:1,"&:first-of-type":{paddingLeft:0},"&:last-of-type":{paddingRight:0}}})),Ge=Object(Le.a)(Ce.a)((e=>{let{theme:t}=e;return{width:"100%",color:"#535860","&.error":{color:t.palette.primary.main},"&.active":{color:"#fff","&.wellness":{color:"#E5E4DC"}},["& .".concat(De.a.iconContainer)]:{width:"100%",paddingRight:0}}}));function Xe(e){const{active:t,completed:n,className:i}=e;return Object(y.jsx)(He,{ownerState:{active:t},className:i,children:Object(y.jsx)("div",{className:"QontoStepIcon-circle "+(n||t?"completed":"")})})}const Ye=e=>{const{t:t}=Object(s.a)(),{auth:n,login:i}=r.a.useContext(l.a),{request:a,cancelToken:o}=r.a.useContext(c.a),{packageType:d,isHoreca:u}=Object(ae.a)(),[h,p]=r.a.useState({first_name:"",last_name:"",register_step:"user-data"});return Object(y.jsx)(k.a,{container:!0,justifyContent:"center",children:Object(y.jsx)(k.a,{item:!0,xs:12,sm:8,lg:6,sx:{textAlign:"center"},children:Object(y.jsxs)(m.a,{textAlign:"center",p:4,children:[Object(y.jsx)(O.a,{variant:"h5",color:"text.primary_".concat(d.key),gutterBottom:!0,children:Object(y.jsx)("b",{children:t("Certificato")})}),Object(y.jsxs)(O.a,{color:"text.secondary_".concat(d.key),children:[t("Per rilasciare il certificato di fine corso \xe8 necessario inserire o confermare il tuo nome e cognome"),"."]}),Object(y.jsx)(m.a,{mt:4,children:Object(y.jsx)(Oe.a,{fullWidth:!0,label:t("Nome"),value:h.first_name,InputProps:{sx:{color:e=>d&&!u?e.palette.text["primary_".concat(d.key)]:e.palette.text.primary}},onChange:e=>p({...h,first_name:e.target.value})})}),Object(y.jsx)(m.a,{mt:2,mb:4,children:Object(y.jsx)(Oe.a,{fullWidth:!0,label:t("Cognome"),value:h.last_name,InputProps:{sx:{color:e=>d&&!u?e.palette.text["primary_".concat(d.key)]:e.palette.text.primary}},onChange:e=>p({...h,last_name:e.target.value})})}),Object(y.jsx)(g.a,{variant:"contained",color:"primary",onClick:()=>{(async()=>
2{const t=o.source(),r=await a("put","/v2/user",t.token,h);r&&(i({token:n.user.token,data:r}),e.getTest())})()},children:t("Conferma")})]})})})};var Qe=()=>{const{t:e,i18n:t}=Object(s.a)(),n=Object(a.h)(),{packageType:i,isHoreca:o}=Object(ae.a)(),{courseSlug:l,lessonSlug:u,classSlug:h,moduleSlug:p,chapterSlug:f}=Object(a.j)(),{layoutState:b,toggleTest:v}=r.a.useContext(d.a),{request:_,cancelToken:T}=r.a.useContext(c.a),[x,A]=r.a.useState({}),[w,j]=r.a.useState(null),[C,L]=r.a.useState(0),[M,N]=r.a.useState(!1),[B,U]=r.a.useState(!1),[F,q]=r.a.useState(!1),z=i&&!o?{course_id:b.openTest.moduleId}:{lesson_id:b.openTest},V=async()=>{const e=T.source();let t=null;t=i&&!o?await _("get","/v2/course-packages/"+i.key+"/"+b.openTest.classId+"/items/"+b.openTest.moduleId+"/quiz",e.token):await _("get","/v2/lessons/"+b.openTest+"/quiz",e.token),t?(Object(S.a)("lesson_test_question",{...z,question_index:1}),U(!1),j(t)):U(!0)};return r.a.useEffect((()=>{Boolean(b.openTest)&&(Object(S.a)("lesson_test_start",{...z}),V())}),[b.openTest,i]),Object(y.jsxs)(be.a,{maxWidth:"md",scroll:"body",fullScreen:ve.isMobileOnly,open:Boolean(b.openTest),className:i&&!o?i.key:"",...F&&{hideTitle:!0},handleClose:()=>{v(!1),w&&(i&&!o?n.push(Object(a.f)("/:lang/:package/:classSlug/:modules/:moduleSlug/:lessons/:chapterSlug",{lang:t.language,package:i.translation,classSlug:h,modules:e("moduli"),moduleSlug:p,lessons:e("lezioni"),chapterSlug:f})):n.push(Object(a.f)("/:lang/:courses/:courseSlug/:lessons/:lessonSlug",{lang:t.language,courses:e(o?"horeca":"corsi"),courseSlug:l,lessons:e("lezioni"),lessonSlug:u})))},children:[F&&Object(y.jsx)(m.a,{sx:{p:1},children:Object(y.jsx)(Q.a,{"aria-label":"close",onClick:()=>{q(!1)},size:"large",color:"light",children:Object(y.jsx)(Ve.a,{})})}),B&&Object(y.jsx)(Ye,{getTest:V}),w&&Object(y.jsx)(r.a.Fragment,{children:Object(y.jsxs)(m.a,{pb:{xs:3,sm:5},px:{xs:3,sm:5,md:10,lg:12},sx:{color:e=>i&&!o?e.palette.text["primary_".concat(i.key)]:e.palette.text.primary},children:[F?Object(y.jsx)(y.Fragment,{children:Object(y.jsx)(O.a,{variant:"caption",gutterBottom:!0,color:"text.primary_".concat(i.key),children:Object(y.jsxs)(xe.a,{t:e,children:["Risposte corrette ",{c:F.user_points},"/",{d:F.total_points}]})})}):Object(y.jsx)(y.Fragment,{children:i&&!o?Object(y.jsxs)(r.a.Fragment,{children:[Object(y.jsxs)(O.a,{variant:"caption",gutterBottom:!0,color:"text.primary_".concat(i.key),children:["TEST - ",e("Classe")+" "+w.quiz.course.package.title]}),Object(y.jsx)(O.a,{color:"text.secondary_".concat(i.key),gutterBottom:!0,children:Object(y.jsx)("b",{children:w.quiz.course.title})})]}):Object(y.jsxs)(r.a.Fragment,{children:[Object(y.jsxs)(O.a,{variant:"caption",gutterBottom:!0,sx:{color:"#555C64"},children:["TEST - ",e("Lezione")+" "+w.quiz.lesson.lesson_num]}),Object(y.jsx)(O.a,{color:"textSecondary",gutterBottom:!0,children:Object(y.jsx)("b",{children:w.quiz.lesson.title})})]})}),!Boolean(M)||F?Object(y.jsxs)(r.a.Fragment,{children:[Object(y.jsx)(m.a,{my:2,sx:{maxWidth:{xs:"100%",sm:"70%",lg:"60%"}},children:Object(y.jsx)(Ee.a,{activeStep:C,connector:Object(y.jsx)(r.a.Fragment,{}),children:w.quiz.questions.map(((e,t)=>{const n=e.answers.reduce(((e,t)=>e||!(!t.correct||!t.selected)),!1);return Object(y.jsx)(y.Fragment,{children:Object(y.jsxs)(We,{children:[F&&Object(y.jsx)(O.a,{variant:"caption",component:"div",align:"center",color:"primary",children:n||t>C?Object(y.jsx)(Ue.a,{fontSize:"inherit",sx:{color:"transparent"}}):Object(y.jsx)(Ue.a,{fontSize:"inherit"})}),Object(y.jsx)(Ge,{StepIconComponent:Xe,className:!n&&F&&t<=C?"error":C===t||t<=C?"active ".concat(i?i.key:""):""})]},"step"+e.id)})}))})}),Object(y.jsx)(Ne.a,{enableMouseEvents:!0,index:C,onChangeIndex:e=>{Object(S.a)("lesson_test_question",{...z,question_index:e+1}),L(e)},children:w.quiz.questions.map(((t,n)=>Object(y.jsxs)(m.a,{children:[Object(y.jsx)(O.a,{gutterBottom:!0,color:i&&!o?"text.secondary_".concat(i.key):"text.secondary",children:Object(y.jsx)("b",{children:e("DOMANDA")+" "+(n+1)})}),Object(y.jsx)(O.a,{variant:"h5",gutterBottom:!0,children:Object(y.jsx)("b",{children:t.text})}),Object(y.jsx)(E.a,{sx:{width:"100%"},children:t.answers.map((e=>{const t="checkbox-list-label-".concat(e.id);return Object(y.jsx)(y.Fragment,{children:Object(y.jsx)(I.a,{disablePadding:!0,children:Object(y.jsxs)(P.a,{role:void 0,onClick:()=>{var t,i;F||(t=e.id,i=n,A({...x,[i]:t}))},dense:!0,...F&&{sx:{pl:0}},children:[Object(y.jsx)(D.a,{children:Object(y.jsxs)(Ie.a,{direction:"row",alignItems:"center",spacing:1,sx:{},children:[F&&!e.correct&&e.selected&&Object(y.jsx)(Ue.a,{color:"primary"}),F&&(e.correct&&!e.selected||e.correct&&e.selected)&&Object(y.jsx)(qe.a,{sx:{color:e=>i&&"wellness"===i.key?"#289D00":e.palette.lightGreen.main}}),F&&!e.correct&&!e.selected&&Object(y.jsx)(m.a,{sx:{width:24}}),Object(y.jsx)(Ae.a,{edge:"start",className:i&&!o?i.key:"",checked:Boolean(x[n])&&x[n]===e.id,tabIndex:-1,disableRipple:!0,inputProps:{"aria-labelledby":t},...!F&&{sx:{ml:0}}})]})}),Object(y.jsx)(R.a,{id:t,primaryTypographyProps:{variant:"body1"},children:e.text})]})},e.id)})}))})]},"question"+t.id)))}),Object(y.jsxs)(Ie.a,{direction:"row",justifyContent:"space-between",sx:{mt:3},children:[Object(y.jsx)("div",{children:C>0&&Object(y.jsx)(g.a,{variant:"contained",color:"darkGray",onClick:()=>{L(C-1)},children:e("Indietro")})}),Object(y.jsx)("div",{children:Object(y.jsx)(g.a,{variant:"contained",color:"primary",onClick:()=>{(async()=>{const e=C+1;if(e!==w.quiz.questions.length||M||M.test_passed)Object(S.a)("lesson_test_question",{...z,question_index:e+1}),e===w.quiz.questions.length?q(!1):L(e);else{const e=T.source(),t=await _("post",i&&!o?"/v2/course-packages/"+i.key+"/"+b.openTest.classId+"/items/"+b.openTest.moduleId+"/quiz":"/v2/quiz/"+w.quiz.id,e.token,{quiz_id:w.quiz.id,answers:w.quiz.questions.reduce(((e,t,n)=>
2(e.push({question_id:t.id,answer_id:x[n]}),e)),[])});t&&(j({...w,quiz:{...t.quiz}}),t.test_passed?Object(S.a)("lesson_test_completed_success",z):Object(S.a)("lesson_test_completed_failure",z),N(t),q(!1))}})()},disabled:!w.quiz.questions.reduce(((e,t,n)=>!(!e||!Boolean(x[n]))),!0)&&C===w.quiz.questions.length-1,children:e(F?"Avanti":"Conferma")})})]})]}):Object(y.jsx)(m.a,{mt:4,sx:{minWidth:{xs:"auto",sm:"400px",lg:"500px",xl:"650px"},color:e=>i&&!o?e.palette.text["primary_".concat(i.key)]:e.palette.text.primary},children:Object(y.jsx)(k.a,{container:!0,justifyContent:"center",children:Object(y.jsxs)(k.a,{item:!0,xs:12,sm:8,lg:6,sx:{textAlign:"center"},children:[!!M.certificate&&Object(y.jsx)(we.a,{src:M.certificate.image_url,useSet:!0,sx:{width:76}}),Object(y.jsx)(O.a,{variant:"h4",color:"inherit",gutterBottom:!0,children:Object(y.jsxs)("b",{children:[M.test_passed?e("Complimenti"):e("Che peccato"),"!"]})}),!!M.certificate&&Object(y.jsxs)(y.Fragment,{children:[Object(y.jsxs)(O.a,{color:i&&!o?"text.secondary_".concat(i.key):"#F5F5F5",gutterBottom:!0,children:[e("Hai ottenuto il certificato del corso:"),Object(y.jsx)("br",{}),Object(y.jsx)("b",{children:M.quiz.course.title})]}),Object(y.jsx)(m.a,{sx:{my:2},children:Object(y.jsx)(g.a,{variant:"contained",component:Pe.a,href:M.certificate.pdf_url,onClick:()=>Object(S.a)("certificate_download",{course_id:M.course.id}),target:"_blank",rel:"noopener noreferrer",download:!0,color:"primary",children:e("Scarica il certificato")})})]}),Object(y.jsx)(O.a,{color:i&&!o?"text.secondary_".concat(i.key):"#F5F5F5",gutterBottom:!0,children:e("Hai risposto correttamente a")}),Object(y.jsx)(O.a,{variant:"h3",color:i&&!o?"text.secondary_".concat(i.key):"#F5F5F5",gutterBottom:!0,children:Object(y.jsxs)("b",{children:[M.user_points,"/",M.total_points]})}),!M.test_passed&&Object(y.jsxs)(Ie.a,{direction:"row",justifyContent:"center",spacing:2,sx:{mt:3},children:[Object(y.jsx)("div",{children:Object(y.jsx)(g.a,{variant:"contained",color:"darkGray",onClick:()=>{L(0),q({total_points:M.total_points,user_points:M.user_points})},sx:{p:"8px 17px",minWidth:135},children:e("Vedi risutalti")})}),Object(y.jsx)("div",{children:Object(y.jsx)(g.a,{variant:"contained",size:"small",color:"secondary",onClick:()=>{L(0),A({}),N(!1),q(!1)},sx:{p:"8px 17px",minWidth:130},children:e("Ripeti il test")})})]}),M.test_passed&&Object(y.jsx)(g.a,{variant:"contained",color:"darkGray",onClick:()=>{L(0),q({total_points:M.total_points,user_points:M.user_points})},sx:{p:"8px 17px",minWidth:130},children:e("Vedi risutalti")}),Boolean(w.lesson_next)&&Object(y.jsxs)(m.a,{my:5,sx:{backgroundColor:"#2F3337",borderRadius:"10px",padding:"13px"},children:[Object(y.jsxs)(k.a,{container:!0,justifyContent:"center",sx:{mb:2},children:[Object(y.jsx)(k.a,{item:!0,xs:5,children:Object(y.jsx)(we.a,{src:Object(Se.m)(w.lesson_next.img_cover),sx:{width:"100%",borderRadius:"10px"},useSet:{sizes:[["down","md","100vw"],["150px"]]}})}),Object(y.jsxs)(k.a,{item:!0,xs:7,sx:{pl:1},children:[Object(y.jsxs)(O.a,{component:"h6",align:"left",variant:"caption",color:"textSecondary",gutterBottom:!0,children:[e("Lezione")," ",w.lesson_next.lesson_num]}),Object(y.jsx)(O.a,{component:"h6",align:"left",variant:"caption",color:"textPrimary",gutterBottom:!0,children:Object(y.jsx)("b",{children:w.lesson_next.title})})]})]}),Object(y.jsx)(g.a,{variant:"contained",component:Pe.a,href:Object(a.f)("/:lang/:courses/:courseSlug/:lessons/:lessonSlug",{lang:t.language,courses:e(o?"horeca":"corsi"),courseSlug:l,lessons:e("lezioni"),lessonSlug:w.lesson_next.slug}),color:"primary",children:e("Prossima lezione")})]})]})})})]})})]})};function Ke(e){let{title:t,bg:n,color:i,lesson:h,homeSlogged:p,headerBg:g,hideSubButton:f,disableMaxWidth:b,loading:_,bannerType:x,children:S}=e;const{auth:A}=r.a.useContext(l.a),{t:w,i18n:k}=Object(s.a)(),C=Object(a.i)(),{request:O,cancelToken:E}=r.a.useContext(c.a),{showSuccess:I}=r.a.useContext(d.a),[P,R]=r.a.useState([]),D=new URLSearchParams(C.search),L="en"===k.language.split("-")[0]?"en-GB":k.language.split("-")[0];return r.a.useEffect((()=>
2{if(D.has("sconto")){(async e=>{const t=E.source();await O("post","/v2/renewal-campaigns/"+e,t.token)&&I({message:w("Credito applicato correttamente al tuo prossimo rinnovo! Puoi verificarlo dal men\xf9 > Profilo > Dati account > Pagamenti")})})(D.get("sconto"))}}),[A.isAuthenticated]),r.a.useEffect((()=>{Boolean(window.Android)||(async()=>{const e=E.source(),t=await O("get","/v2/metas",e.token,{path:C.pathname,query:C.search});t&&R(t.metas)})()}),[C]),Object(y.jsxs)(m.a,{bgcolor:n||"",color:i||"",overflow:"hidden",children:[!Boolean(window.Android)&&Object(y.jsxs)(u.a,{titleTemplate:"%s - Acad\xe8mia.tv",title:t,htmlAttributes:{lang:k.language.split("-")[0]},children:[P.map(((e,t)=>r.a.cloneElement(Object(o.a)(e,{replace:e=>{let{attribs:t,children:n}=e;if(t)return"application/ld+json"===t.type&&n&&n.length?Object(y.jsx)("script",{type:"application/ld+json",children:n[0].data}):void 0}}),{key:"meta-"+t}))),Object(y.jsx)("script",{type:"text/javascript",children:'\n var _iub = _iub || [];\n _iub.csConfiguration = {"siteId":1819621,"cookiePolicyId":'.concat({it:39756041,"en-GB":70243759,es:56970618}[L],',"lang":"').concat(L,'"}\n ')}),Object(y.jsx)("script",{type:"text/javascript",src:"https://embeds.iubenda.com/widgets/93c3b528-6db6-11ee-8bfc-5ad8d8c564c0.js"}),Object(y.jsx)("script",{type:"text/javascript",src:"//cdn.iubenda.com/cs/iubenda_cs.js",charset:"UTF-8",async:!0})]}),!Boolean(window.Android)&&Object(y.jsx)(te,{bannerType:x}),!Boolean(window.Android)&&!Boolean(h)&&!Boolean(p)&&Object(y.jsx)(fe,{hideSubButton:f,headerBg:g}),Object(y.jsxs)(j.a,{maxWidth:!1,sx:{pb:10,maxWidth:b?"100%":1700,minHeight:"100vh"},children:[S,(_||A.isAuthenticated&&A.user.data&&!A.user.data)&&Object(y.jsx)(ye.a,{}),Object(y.jsx)(v,{}),Object(y.jsx)(T,{}),Object(y.jsx)(Te,{}),Object(y.jsx)(Qe,{}),Object(y.jsx)(ne.b,{})]}),!Boolean(window.Android)&&!Boolean(h)&&Object(y.jsx)(G,{})]})}},215:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var i,r,s=n(0);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},a.apply(null,arguments)}function o(e,t){let{title:n,titleId:o,...l}=e;return s.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",width:29.044,height:29.043,viewBox:"0 0 29.044 29.043",ref:t,"aria-labelledby":o},l),n?s.createElement("title",{id:o},n):null,i||(i=s.createElement("defs",null,s.createElement("style",null,"\n .cls-1{fill:currentColor}\n "))),r||(r=s.createElement("g",{id:"Icon_feather-gift","data-name":"Icon feather-gift",transform:"translate(1 1)"},s.createElement("path",{id:"Tracciato_86","data-name":"Tracciato 86",className:"cls-1",d:"M27.635 32.521H6a1 1 0 0 1-1-1V18a1 1 0 0 1 2 0v12.521h19.635V18a1 1 0 0 1 2 0v13.521a1 1 0 0 1-1 1z",transform:"translate(-3.296 -4.479)"}),s.createElement("path",{id:"Tracciato_87","data-name":"Tracciato 87",className:"cls-1",d:"M3 9.5h27.044a1 1 0 0 1 1 1v6.761a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V10.5a1 1 0 0 1 1-1zm26.044 2H4v4.761h25.044z",transform:"translate(-3 -3.739)"}),s.createElement("path",{id:"Tracciato_88","data-name":"Tracciato 88",className:"cls-1",d:"M18 31.782a1 1 0 0 1-1-1V10.5a1 1 0 0 1 2 0v20.282a1 1 0 0 1-1 1z",transform:"translate(-4.478 -3.739)"}),s.createElement("path",{id:"Tracciato_89","data-name":"Tracciato 89",className:"cls-1",d:"M16.965 10.761H10.88a4.38 4.38 0 1 1 0-8.761c2.322 0 4.291 1.348 5.693 3.9a14.258 14.258 0 0 1 1.372 3.666 1 1 0 0 1-.981 1.2zM10.88 4a2.38 2.38 0 1 0 0 4.761h4.764C15.056 7.021 13.636 4 10.88 4z",transform:"translate(-3.443 -3)"}),s.createElement("path",{id:"Tracciato_90","data-name":"Tracciato 90",className:"cls-1",d:"M24.085 10.761H18a1 1 0 0 1-.981-1.2A14.258 14.258 0 0 1 18.391 5.9c1.4-2.55 3.372-3.9 5.693-3.9a4.38 4.38 0 1 1 0 8.761zm-4.764-2h4.764a2.38 2.38 0 1 0 0-4.761c-2.756 0-4.175 3.021-4.764 4.761z",transform:"translate(-4.478 -3)"}))))}const l=s.forwardRef(o);n.p},216:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}
2));var i,r=n(0);function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},s.apply(null,arguments)}function a(e,t){let{title:n,titleId:a,...o}=e;return r.createElement("svg",s({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",ref:t,"aria-labelledby":a},o),n?r.createElement("title",{id:a},n):null,i||(i=r.createElement("g",{id:"Raggruppa_5055","data-name":"Raggruppa 5055",transform:"translate(-41 -717)"},r.createElement("rect",{id:"Rettangolo_2145","data-name":"Rettangolo 2145",width:24,height:24,transform:"translate(41 717)",fill:"none"}),r.createElement("g",{id:"Raggruppa_5023","data-name":"Raggruppa 5023",transform:"translate(41 720)"},r.createElement("path",{id:"Tracciato_9012","data-name":"Tracciato 9012",d:"M20.161,85.737H9.6a.716.716,0,0,1,0-1.433H20.161a.716.716,0,0,1,0,1.433",transform:"translate(-2.519 -66.718)",fill:"currentColor"}),r.createElement("path",{id:"Tracciato_9013","data-name":"Tracciato 9013",d:"M19.952,59.755H3.964A3.968,3.968,0,0,0,0,63.719V71.36a3.968,3.968,0,0,0,3.964,3.964H19.952a3.942,3.942,0,0,0,2.1-.61,2.137,2.137,0,0,0,1.561-1.85,3.955,3.955,0,0,0,.3-1.5V63.719a3.969,3.969,0,0,0-3.964-3.964M14.061,67.87a.737.737,0,0,1-.092.1l-3.084,2.67a.716.716,0,1,1-.969-1.055l.032-.027,2.43-2.1-2.405-1.9a.716.716,0,0,1,.888-1.123l3.085,2.44a.716.716,0,0,1,.117,1",transform:"translate(0 -59.755)",fill:"currentColor"})))))}const o=r.forwardRef(a);n.p},217:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var i,r,s,a=n(0);function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},o.apply(null,arguments)}function l(e,t){let{title:n,titleId:l,...c}=e;return a.createElement("svg",o({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:24,height:24,viewBox:"0 0 24 24",ref:t,"aria-labelledby":l},c),n?a.createElement("title",{id:l},n):null,i||(i=a.createElement("defs",null,a.createElement("clipPath",{id:"clip-path"},a.createElement("rect",{id:"Rettangolo_1948","data-name":"Rettangolo 1948",width:16.794,height:24,fill:"currentColor"})))),a.createElement("g",{id:"Raggruppa_4961","data-name":"Raggruppa 4961",transform:"translate(-146 -330)",style:{mixBlendMode:"normal",isolation:"isolate"}},r||(r=a.createElement("g",{id:"Raggruppa_4432","data-name":"Raggruppa 4432",transform:"translate(150 330)"},a.createElement("g",{id:"Raggruppa_4432-2","data-name":"Raggruppa 4432",transform:"translate(0 0)",clipPath:"url(#clip-path)"},a.createElement("path",{id:"Tracciato_8964","data-name":"Tracciato 8964",d:"M16.48.136A.74.74,0,0,0,15.789.05C6.357,3.661,1.095,7.552.148,11.614A4.95,4.95,0,0,0,1.106,16l1.512,1.594A20.909,20.909,0,0,0,1.151,23.2a.74.74,0,0,0,.677.8l.062,0a.741.741,0,0,0,.737-.679,19.813,19.813,0,0,1,1.261-4.915,8.79,8.79,0,0,0,3.311.729,6.17,6.17,0,0,0,3.275-.92c5.938-3.63,6.307-16.895,6.32-17.457A.742.742,0,0,0,16.48.136M9.775,10.527a16.845,16.845,0,0,0-5.123,6.155.74.74,0,1,1-1.323-.665A18.285,18.285,0,0,1,8.9,9.33a.74.74,0,1,1,.871,1.2",transform:"translate(0 0)",fill:"currentColor"})))),s||(s=a.createElement("rect",{id:"Rettangolo_2108","data-name":"Rettangolo 2108",width:24,height:24,transform:"translate(146 330)",fill:"none"}))))}const c=a.forwardRef(l);n.p},218:function(e,t,n){"use strict";t.a="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAbYAAACQCAMAAABTVb7dAAAAV1BMVEVHcEz///+mpqacnJyjo6OlpaUAAACmpqafn5+lpaUgICAmJiahoaEICAj6+voyMjK7u7sSEhJQUFDo6OhBQUHMzMzy8vLb29uOjo5/f39wcHBeXl5nZ2frYYj4AAAACnRSTlMA////K27/zA6hvBmzCQAAEjxJREFUeNrsnYt2pCgQQKclk0lQEFBA1P//zgUERdGOkmw6puXs2Z3Z+ORaT4rKnz/z8fL3/V92jZ80/r3/fftzd7y8T0cX13j0mGC8v30MrVE9q+uyzK/xwFGWZV2zXgEnci8b1P4OQtbnr36g12s8dFgApRqkaZXbmxG1QjF6TdaPG5A1htuKiXsxjgioL/n6oWLHjKF7j2TNUFPwmp8fy82qyoVnYql1l6j95EFVJG/vF7UTCFyrFeXfhQ95Ufvx2Gg78ydfjF27qJ3Ao9Qx3L+3QEUWlzdyhpGDSU0aYWPXlJxCT/aa1dsobJeKPIuazLy4vV3CdqLReuum3UhwZbRO400Wzpk0OvKaj9MMNWhJkyApr9k4zWBaSw5+ZHFNxnlGqbXkgK25JuNcoduL9UjaazLOM+gQcWuPpLsm40Sj8diuqO1kruT7nz/akayvuTjR6B224sJ2ptHZCKDIiitsO1/gll3Yzoft7ZK2s43aYvst0obQk2EDvwEb5VX/FNTQ/4WN5ocrHGjdNw1oujz5pvJ2q+AlbZ+wmLI6uhBUc3EzA1epS0jInJ1f2NIG7LmZ/oO56RZbZvbfINFENQJn9MKWJmncTv3tkMygUosazjpWq0r/IdVClfWTLNF/NTYKbm4cy01rAZXDI0Dzx6sa6VuxUYI9tkNGBmoR80tHpZa3KbGNYJ6jhbeTRzJFIVrxihZukb4U3PgeKIT0ebFR7qEdFJhaY/NZUaSKovO6MzN+StWM3wBsjQ4WvHOzrDhXiOnbEv2XjnNvFmlndfV4nPaZi8pcqiijB6Od+dgw74djIeHcnVVyTp4AWzHK2i07hK3UZ8QGDTXCfwSOaS3d/8BkmFmtk4EyR3Hj1mh61M039sfBxaVEu6khhpNzjdedVONb9fux9bdpHFstp3rmqqUcoMLGA1IYWbDPB43jUnFpEGQeG69uWAgy3H+YeWjoiqoyh4PRURWSV+Y/c/WNtKhiWRQSDyIbYHt9CmylmKjhg2FvYyWjYeGUdvp6pKaIsspJLzByh8z2BU05d9g0mbosy0DaEDFClSOUaxnDbIjEcaNtJKqdPg1mQB9i
2dhqhTl+qfkJpA4GwHQ2ZR6sop+2sk0tZYksJ9Uq55xTOFoLwXl7a2BQ2kkF9IqXaQX1qtLeZVPfYHmF+NFz9yaQNVRM1ftiDH5wPa3wyZs/OsRYD91MFGicAYx5rkCKjJEfOXtqySROWANi9DePzGKR0gU3MXv7JpC2wbCKlMgUq72+I3l2v2ogiEA2wTc6Pw4aciK2e2S2xaSV5E0XQZ+DJpE1Ohi01qwi7hhihE85SyaWFRLUiXFbWSYmxOSVpFC6ILw2IrOyZc2yvjXUkBfF9PZ5L2uBErflEkoOWxsqRARuHS1998nruSBuPM6JMTrHJAhvqnHYXvHw+aatHDdl8LuFgsltCo1CRtFkPkTSq7dg9JWmkLVtcU6OQtiGVirCZhh8NsUGFtYjPJW2do1al7Nsv6zoPPVJB7QWr+VPlxp2nS5ckUpKGroycXD7kyNgKNpv4qjPnlD6XtLXDYhlIWae0ToSffaTnrzLBGZ6CdtUYT5KNrgYVd6TNci9ddqxpjCdZjWFCJG1orGTQQlqgARsbL/jrsWEhAUtcpdSTOTr7tZ62wsVcTtw6bJetmZciBO7ZNquvM2cMBztZeWtn48MZNkVIP8Z4wClUgryV+4XYUFhygygK/qzHkXocm7VSkOoTjYMgoHfNZa2vpKlZOFpJ3hp9XaruepKvryYrluWUQoCHsNxkVWp9Zs4jl6Qxl0L6kZnLi9psVwMpZSYV9suw5cw0OSxWSj8oUxnhnJPsQF0Is5l+Tojx+FwAgSwdySV2Ymd06U2aYzi/J21WyPTVuFlybbxLIvTVK0yW2Mw6kSAgM07qkPk3X8lNSH1bIH4VNuSXsG1GJOxjiMoiyEzeMNnbL68T4xXFlK3yiRfnUkIXG3JI7mKbsvrY/bRzhSqgjlySUo6rBe5KrTtYlb8JG20DaHZSG0eubMn8J2Yu2D5wUGknXIiKqOBRShNdSzLmKan+OyctfG3B8MQdANOCTw1Ai/yHpaNrybPx5jXQCqBgrzkAy1IV2GZccgLGYxEr9F2zDsEGNL8FW86XaIwqa+qy5+IWD4z3vrk2WjCyiAjNLOjr4q93De/8yHsn2mNXbvNTiyOOY2vX2Nwf5Dmq4H4ytgbfjg9+9Tx5KDbU3JIGv7qwPRJbL9KwHSwtucaXYitxIjV57eh/HDYbxaYMcunIB2JjicJ2eSSPxIZkoqxd1B6JrU2jVl37ix+JDfEkavjyRh6KLa/SXP9zTYipQjIZyqajvwNbn0RNHO5Tk3NpB//2UI92RVAphCVgvyAnmaV5kYfffDSh392YaFbd5cjVp8eWpiMPNzycTOj3rpnAYlVZNPTc2GCaQ3L4revHhHtldaZ06n5sLE1HHn6iaQMI/kYNlQduMhZCBCYuDDtrpVSrVH4ebGlRGzisq+QnTk4eaEzbCdKabVdMjYvBOHgMtwDCzoMtbcnm8G4AFqwxiO/Skkj51EBh9mO5XwfqCyyCjSjnwwaSsPVpOlKKtLNT3RHp9xWEfi9t8TL0PB+27FuwoYFXNygt8k1xk8uRR/u7HLfJr3oWbEf9/yGmr5zWkt9k+5uNtVy/x7V9NiV5NPbizhepU3rSJA++8Y2hduEPP4tLcrCtxxA9YeYXiT6KH2i+0ltmeQzUx6A9mQS2FayKXdgQ1C7oR49j2uPQ46d9cwAgknRkPmZAl1rSFKn6pjFU2WwU5u38nWt7zLDH8JUN/mB19wXFJo2+7Vv9j7mQuabjK+0N2sVMVr5kdPnQfDwcmZZis1Y7ZeFOW77FF2Hr0lbbjukTMoqo28DfrMZXJgLOwRQqzKGwMaVJ+2BnMtneeFftMMT9PQOQqzCfiUk/QzAe3sl5hyTYhothItv9m+r3YyvTkluHtCTEk0XL1hJcEzY2ryETagUbnNdP403HlO9Ie9/DFhW0YVmuYFN43tiqXJYLYPDl2FBaIcmhtW3g/MhpmhbrPiO2LpqoJsIGo3Vdnt+32/d+9eA2tqkxVPjeLMJWV7N+ZKgTycVSB1YAEhe3D/iStApyWq6nULOKjcVvPLVncNhY/MB4Q55q/0ny8jg2lK1+0KJbYiPzNnJsdcfEvsKbA9jSIoBFr5YdUa8PeuVKpzyHTQ4OpySETNtFMJtjc74I18dM2f1ildskl5iwHG3NVJb5jVrmz1k/i8n1rQhommx8oKmpSvg8phOYfSff6grLrGnbZuwB0XwxtkSfJG4u8kGM4Y/vV3wahw0P++rM/hxYjm31eLxWIVRpdp/m40a5jUY3fWiWiFpzDewOHh8ABNt5fK2G7ellVEZNlivEt7GfsBzy1EEkj5U9DdGaL76+L8JWphaS725TImcZQJfnIuuZ+qArsu8r4glP2KbF6XFhZsNFAnNFJ0hfrsV6cdzmV3UDnUiLRYpo8jgmDdgNN6wm2+23Uu5RkwewwcQyyRsu9nFjizkZfMlZH8ER26xlDXPcKjrHFnogvqIar78onWcTbBtDEq+rxdhcOnPW3hll83Xe0fqi5Sc6E3532p7qmyN1kqml5Pc9tKXPU6H5Bzkr2BuxcbrmCbIZtrm68X7c1i9hbVeWt3G26HEZYwNr9Wm5nH0iK2W+bM2QuS0Wzddia5OxYbLjCyqXb+KsRraGbZ6spDI8l63qQwRmIhnbrhKsgBPzX2wXY5OrEgJm77LyzINgydWotPpabBTf0sF9XEqjokoEEpWjeGzV+hdFUIBtqQ5dLH+n1AE21cr+5vYeNrhe9lLPHjNu9eW+M7BuJsovxZa4drOzoMcRCSpuUBetkHtsSz2Si+DrZes39F7ovSVA05xjWXYXfnERtn69fMK5Uy6lGn1qyBUcLR8F7V2kPISt/oS4fVidTEVketzLVyjCtnxa9/UObWjYxuqZ2lknAftFvwe1jS3bWGAi4YGxhhhCbdzDxdhr3I7tb+OfwNbt0pHzMK1YuhZe+y9dPO8n5pvm/s7/jwVfB18q6IE4ObMRNr5RiavCECDG1n2y/v7YblKVTq36IAjwLXsLEIxIJfosCdz4uusAT7uhLIp9QSSCUyy3vUzqnhpu5CbUBrb2k4uUx7DlIhnbR/qa7Sq23MLmI6UQW3RH51/v30Y+5jvGZb8IG15rLGoa0oQfXIxNfSu2xCXu2NU9mPEsU6RtE9uBhSS50PARNnFf2pofIW225dj/UlNy32xme7GVAbb/2rvWdVVZINzCau0QRNE8YPd/nZ8imMDg6Wu3s4fpZ5mH1xnm8A7TeIzkFtKsdsKaBSMZe5Kc80YySaMa+ETi1bDtVbcSr3w+HolN2MoYRj3Bc65Hu4OVZK2uq12SeqrxPpck2U0l2grbvtVteSCbWptyW0rTvaApTHVQ1iyfxm1OLbv2aCFlUuKZ19QLW+1xfww4vQHA22DTmeuN/K0lLwCrrQALZkljWkkNG4GXrfsUNmc5rTxNySxPernPwOY1khx22XVCCXtgU+G2eBtsexLKy60z4nn31PiovKROJGrYrP4ravBTOcg+ooWvbKtUFRzLk5ra5MCmqBr2YtsaLrALW1b9vwbp7bDtKLstriY09fWP6m9aK5XcgKa7MWIJU910RO4OltMlM8AmYIuK56aS75AK63hE+GCDilL9NT6k4L8A2/Ye7mV/VtkMaFSfspKVBVsOVuGYGQI2LuMBym2N/Tat17RgL2zm9emnWhqOGABbAXLFiCeceAVsV/LypnvhL4XFyVQRn9XtSQmU6s0S71bknrduuQ2q22idyh/UwtNuuXHTmtr4kMn/aiKdVl+oagHlxPlqJvce2DYGbyvW3ftMJsW4vydsPyMTMdPMKT1ze4QtebK5RnJbNJe0M+c/x2ODWwYWiIw8QULsIulTKSHYdFV8UvlXb9aajVx2bXFdbMAtWZECVAVSeFSfUYbRxRe5d3jEWcwKUdlBuTqiHPjBRRwX7ciJg2mbT75F3v1pv689Znysmk4mLenGclJgrGj7z8lzPf0kw3IEtfmGQLCN287dW8kBythoM7K/BBtM8dtXZnu+sDCBmSry5FD01FkSdUSZl0CeXsE2bJGelGU+6cR+LEb73Z/KgDGBbmHcUqf/UWMsZPrI0uVkgqXdbHwr8r6loCq3dKzvnAPgbpjcX3OZ7NpnQDvgxayXGRnJLWcH9AkNWFcAgIv0JrZ4bjGAYMIpTYEy3COHjpzQyeGKPAMpVfmq3rCdsNlE6KrmfaRciLRcxd6G/K5q3l8psylsDlG8dEJgMXLuV1CRqNfwI+wrVNQw5i4rHIaNsvs8B/31sPV9Q+NOAtWUJoObJ084X8eQjOajO+1LtkYqObPGRLCrC9tVGC90NZtiyyAGUHK3X/4Jweu55GFUWp0bBnXmx8PscU6Zo5XNUvtn3GAhSRdl+rBjRl7Lb6p6Xd+PKpB6E3TaMPUpkEkFgPLRUCapsa/ZpHAT1+ODqRZ3E2FNZRPOWuyqJXJp35QWEwSSuzBP9eMlZBmnzGv2+kYp6KSce06UMYbXXkLWDuJ90eLhe07twk0sUJqmkZ1VMKrbWRt1v0HNqleIFnVaVdIlqe7Id0VZIeq6bqzT0kKO9kmJYPbUB3X98CnZcBiSw0beAtuVvnsshQkbhe/TISVsmW11zbAsB+CFe6Pw49j3PDYf9tIp9++Gzbfs7ttb40jyxbCJAFuA7TNhI8FIHkho0LZDCv9ebft+I/kbjOTxtO3Uw1YEbTuQtAo2FGA7kjwQup1ON4T4Ma634G33md+fH3P5o2+erNlo2L5qpMnXz/irEbqcTheExDXIYSSLJGxnhJrwMI4juIPtLGEj4WEcRxhB6HQ6/elcyTBl7Whhm4wAwuJ2KEfy0sPW+SRRGEV5GI+EyKVNLm4HCbiDXK9CZiR76SK3Jkw0P4gfiZSN7NSNBHU7irQdbIOySXUjYaj5ESSORmUbVjcRzOQBTGQ9rmzKmURtwO3ThQo0UbbBTCIecPt01IiJmkyVBH378IitC7T7ks1Uzj1uIvglnytMovbnBOAWhTjgU4UTV9eknezXN9IUIc/1gfaR1wjSNYlb708iEj2CqfwsT4SJCHW6Rs4nWM43NCAnWl6wOI5xkH8m3eNnrOBtE0lQ0M2HWqdwCrgeO2LspRrkHwghvZYtgTZo3OX3FwX5JPm9XRzQ/gOG4dSpShwzawAAAABJRU5ErkJggg=="},219:function(e,t,n){"use strict";t.a="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeMAAACQCAMAAAAMaPPRAAABHVBMVEVHcEyVlZWampqfn5+LioWKioqfn5+ioqKdnZ2RkZGXl5eenp6Xl5f///8AAACmpqYEBAQA8HYICAiLi4t7e3sA4P8Ay/8AxP8A1f8A0P8PDw7x8fH7N0UA2//yMUoVFRX6+vrp6ena2tqUlJTnKk//yQD/zwAgICA/Pz9PT0+dnZ0uLi5lZWXi4uI0NDT/1wB2dnbJycn/xAC+vr4G53eysrIAOkXT09NWVlYoKChvb29GRkaIiIhdXV0R2HcA1/Y8PDz+vgB+fn44ODjRL1KDg4MAxvaRkZEA1r4BzdMpBw0KLB5DKQ2lHzMbf0wfs2hyFiI8r9D+hxvPrQ9Wm71uiKySjXycgxQSTzCM1TRpVwuIcwR+1ToagpSc1SsHDiYxAAAADXRSTlMAJHy28hLJ2/HxQJtWDeRqhAAAGAlJREFUeNrsnQtzm9YSxxNnEnfSAEdItR1IykNjI/GQjTEXCSFfWRrX7bgTzzRzJ3HT5vt/jHtewEFC6FFJBQ2bdiwBArQ//rt7HqAXL1J7/fLo1bEp1FZxO3519PL1izx7ffTmh9o/h2JvjnIovz1Gq8x2s7aqWxvH4uN3M5Rf/4gW33ctQxJrq7ZJhtWdIJw/ZiC/fgMXNXt8bYdiVoSk/DJF/BIiNrtS7ZkDMnFoZiAjxFbtlgOzAYT8JkYMc3G7RnyAkB9gTqYVNWwy1YgPVclv40jdr/1xkNal0fqdIDzU5dZhmgSr63eQ8StBGNbeOFDrCMIr2G46FkxQO+NADbRR++mtIIxqXxysjVDVdSQIvdoVh1taC8IRTMemUbviYM0wYUI+FtpK7YqDNeUBtp5+qBkfdOupKRzXjGvGtdWMa6sZ11Yzrq1mnG9AXKn7FYCSnljNeNDBNrbYE1PgAjo8NpgIvt/uirSVT7buTGe6cqzQFATzqpc6HW1psO+m6O+ULFTobjq95Kh0cwn+VeZPj1jmoMYVPDFzJCUfH7Af6pWcMXh8fFTEPZ2XyVFTg8kgRmRznIy9JEUqWesRD7bTrUfJGKk49uhWnDuMz/sKfShB3oQ7RH8djmvBP914N5zsExoAvo4QK/i3n3d6yFrpcjGkhwym+CDwlQCYD+nlZvz4dAvt6SvYL2NommBkGUu+mqzrZhhDyh7dWBFkZqmgpIzVyVLGcMfhBoxBOzkxuV89xtLft8SeHsGeGMvIsNN0K8P4Hq0MBN9BgpEo42RrDytZ8bCnnSBwMGvHSBhz3HQxYzXejTwsZow3xHaVLLbxifm+A3egKZVj/PfpbxTy7afHvTB2ptA6IxMhCgyGsRhADw6h64wHqiLI2OnC3De0deh8pEARSV2+nyqiqPRaGkIvpox9sIixHKIMO0SXmFfMOJjPx5KH9AuPo1zBo/tVYyz+cppCvv0k7oFx7A/DhQ5zpZSxAj1nk3We7I0JY518AwPi1KBXo1T9qPZyYmcTxlx3IeMOBEvjiFHI2EWXAP6XRGp08CZ5Lchuv2qMHyFjAvkG/tt9Wmb9YUB5qN2UsQU9R6cmTXsin2GMIVr8AFLTp0yBjfTdoavha80oYIxrYBlfCEsYzzYG4IdC8rLXESuXj/+DGEPINxgytKfHvTHmDRr5Yh2jt5lIAhkH9BsMVXQBhNC5maktKFO2KWP0v7mEsSFjqOsxNhwacBKrIGOkZIQYUd5tWs76A7JQlTQfu/CtPxQzjGMdI5g9HmZsNxNpUA7XKeMBSpvTYsYteAhjXcaSj+r6rlhtxkjJRMc3N43bT/tibKnYxZQxCEmjtwvmdQxQUBZRxg6zjXubJFjE2BBh3nTEIsb28porhzEgja+gL1aaMYac2O7SctYfqJi5T9tOYkSavvpDL9WxZUDrehgKRKKOZ+IoqbQwYx71VLRyGat6AE1XUVlfzFiLb+W2meWhhk/MaXeqzPj0t4Rw46bR2FVazvgDKDrOpkk/Fz/UaN9GBGb6QHDU7sMNZ27tkVQsbcJYhFA1qbAPRB6s2gciZHpPdbrUrGTNdZKF3MCMGztKyzM6nmXMS7bgEA+LM4xdKOBljPmpjMu2AsacPtyEMS/2BYLZl6qr41TJCWWw51hNxC2NMOVmhrGK7+lBsXqaTZWZWI0VDAvvnHw8GUGzBaTk4ppL831fQP+Fcz4dBhhy9RifnGQgNyhhZE9fxd0ynqoYUIYx6q+cyKT8baP+Zdu2R0PyPRR1tuZCcFUjZYyumkCJ5hhr9NLoanjsYr2aKxWz7eDyfo5xUHrGJxnIGDOx7beWs4yjTNuJsQeiTqZ9TFTrzroTZeC47YT7P/qowXy/kDEQcEfJhowBanuhvjiVZSwUf6gMjE8zSmZkjClvOS1nGFsy2wcCeq0gvgOvT1zJtI9pfZt2d6YLHljGvI+aRwsZ8xOc0tdjbIVuvNEU9bXwvBv3kyNzybcou44ZJTdmbLutZZaxgvo8hglj1AXVnmOc0THucXIYyaO+TdyaShn3yDDgIsYo4w7WYwwcNYFIGaNAEZ/YYD6BlI8xskTJv2Z1TNIy2AFjsePFVSqN1RC5TPs/2qTrek7HSIZcMKbnAzp63H2ZMsZl10LGaBRDl9bUMaq2QzE5fp90iQqkdxMPSlnlZ1ys5G2mZTS2OB6PO/3IxWOLCs/EajRs2IL8FBO9knJ0jPMpJ5u4kWvh2QLp2CJljLpE5+tqe4wOe+8QHbKMJ2NqBimfxsx7emFotLCX4mIQZwQ8xcEQ5nrZy6pjNic35m1raTkz0YJzM3MEwAOeqOFh+ni+xbyOecXHTSnd8xwclN0BP8OY78pcQfsYDzKzjBN7WDQPBLT
2w5ALXQz00Kp460MMvAy9Aa7QeX4lYzSo5B3JjS2PLrBPlaHauTzqlhpuAfMa80lSZuT4mM/RI9wZEoYgxnjO0HmNevEqOSXvgwNhJtnM6PF8NHbM5OQ/ydlrLD2QajabpbjOZ2TiSZVpI2YFMtEwK7EiW3fnnmXQ8Dbtc1bx+XCmEcKfpvA0d7hC9CMiEnWE8e0dz3JAggm/Q7K+xzFiUnN7sXB94meDgwslJgc1bHul31bx/R8XrMH5/sqKSt5KWDYvYwGDYKXABvX6UTti8H1lSsvUgp94Dg2HYbF51B2JmFyBzFFzyWniOr2TFlhzVImtEizElPb34fXpIaWpHUXJieJHVnzRbfUvky8/4/cpKhmm5LE8JAjvYB9j9If81xqsreUed2LXtnjGr5JNiJUPKX8XavRVk/H5eyAuV3Lh9eqz9W0HGa+TkUqXlmvEajNfJydtrLde2J8ZnGygZUn6si6/KMKaIc5VcEK4bN3Varg7jsw2V3GjUabkyjDdTMrTnz3/WabkijDdU8vfz8/PPv9e+rkas3kjJz+fX5+cX519+r4uvKug4R8mny5T8/RoihnZx/aUO2JWI1TNKPj1ZpuTn62sM+eL84uLzn5sXX8DojMJJFE3CUad+SO9uGP/37CxXyafFSv5+TWWMIV9smpYl25VVOv6uqrI7quP+7hjP5+RCJf91TWVMEF9cXn5ZnzIYNx1uxpz73t4xDx1s6/2AjudkTQ/8Zp8d7AY2WWGVSMezSj4tyMnf7xLGGDGifP5lzYBt+DKXY3J735DpVCB7rQ/pOaeuaj5DtEUW9koVq1fOyX8RxFTHRMhQymulZYne7pljeneviMHWGKMrtJkUFVclYvxxkZIX5eTnu7vruzkdQ8iXq6dlxVe5haa1qqljjpkoWi7GZzHlwpz8y6+piu8YHVPIGDG0FQO25WZCnB4EusZCv6+qjlEY6pVax6vk5Oe7WMZMzZUwvvy8CuQe4yE37BkKNKMXpuCj6uqY44JB2Rh//Hj2caGST+eUjFSco+OU8rcVqq0gicp+PDcZPccWdEgZpgpiVXTcTcw2gzgSkVsay8Q4K+QlOfn5jjCeyceJjC8vL5YKWXHTZwPM1NDiGK3bc2X9TxizZ6qM4idd9Eun40IlZ3MyUfFdXl2dUF5Wd4Fmcp/EPEugCLKw375RsC3G6VND8MM+Sxqrl+Xk6A9Wxtm6+nJVxt24X8sW812+7+7v7THGT4rj6J09JdPxijn5fx8+/HGXn48vk3B9sQSRoseIS9IluEUdkwcg0H2VNlYX5eTo5w8x5DQfX8wKeVnNZVMZt0szWrVNxj3Sd2eWUcfLcjIEDVX8gUJmY/V5VsbL2k6A1tR6aRBvVccK+XpeuWN1fk6GgfrnDwzkBfn44tuyqnpE660S/fb2NhmTG9zxg2lKqONiJccqppDZWJ3W1SsMMQLabvI2kjFY9mswSzfIuTNtoY4L97UpYyBu7edl/kmszlNyomICOU/HK00VsGgTcv3f3pY6YdMUzGY4XnQUy45MQWi3uou+tNGftM2Hq6G0XMfK8KpptqNwCtaM1XpBrIZfoS34ghnZFlh+NYNlF+wajH9aQcmMihnImbr6+tsq0uyTiktb91pWJhozZJHzrcS+zvySiJEjVysZBtFCiR+6ruu5fi5joLSTYU+9L26p5pLCdLRcjX/RxtKxeTPfqK9h87bE+KcE8mIlZ1ScQmbq6usV5whEtKhek3Dk/L+9q/9NHDnDXKJsqt2FGZlUutpXbAMrgwMIFyFjCCpHQKg5RUrb7U/V/f//Rj2eD8+XiQ0mZX1+c3e6zRow88zzfvsdqZNA+l5wHQh1LAtEMsn542SawRD7Ba4OY/vAlz1jOApg7GfFTnAUirVmMiphhv801Dmmzr4sjDke65kcs1jG+Jd/iTzOXVSc429YrOciUgsAgfDFjLlarxdXbSBVqx2QibHyac46fw6kmZUDeVJLzStOsQmMhQPubcri8VEmYxZ3NCATiL8VaA4IM27e1AnRkitdjafLDVqx57oiNDcXDY6sjEq1ivGz+mnCZJBjGA+IugnkXCZsa8rlzgji0b/o//kVgUQbzFul8fgdJiMWKzxOQMYY//rfAsaVzPqOZFupRQAf5TPR4+Oyhgsjo863VNKnOTCOxromnkUejCGb/jOUahJwrW8aidLMGFAdN8crEeNjTP7L9z5CWAsygvjXYs16ZNC8fPd6jANEZDNghtF/WD74oayu4YGZabBfTg8zuifY2CzqzDeteXu6bM+sbIwhVQnWbL9eLH2CuPuYgfGClhYX6z1zCTBeHMYG/Q5dsF1O0xtApwd66pKQLfneEM5iPD7C5P9
20Or/QHxnkb9/+9u+CT0k4WowzeBwaqd7Ch2ih9aIVPDo/65Eu7ZOZ3IsxodsgxPfGdskMu9vwMczEeEm3C6l6UjPgZ2DspJLetidjDJe4Lt7GNg16s2bql/SUaDLIdgPO0NV/FpjM0fh7n8KrY3LxZ9rIpo1y8RjlO6mmnqXbgjYKYW1tEsDGqZNl0FluSz5eoyuMXuNnYGwT3s6FM9qaymj0Y30gIVEfgs9lLoDb3LbkG0DWaIP3bDqn85ncm10uj/8qMDklcuxudTCRNTB33oo/HtHVqj6YjTHxR8c884mfgiOwRVN11c055/sQWgidB5TaMsZkO3DD/QxS7Z7lxTjM6Nkzor2h5sPiDzLILtpItat3e9qK6mreJmMuI5RjFncSfBOLLELceX05YWQV+T6DXDyOdTXEa2kNdEnvsZ1GpL4u3ZTMo900NfbBc7UY++KnGc97iqU82jYDYzddcV0uE9oRGQSHy29ulO5SelgkUUyuWTrGnE3+mSrs2BZ3KMiyTX59OSntShCRghFob0UJqc+10ae3AxZhGvjSsXgBOSoqGXHbU04zTsMTGeMx/2mQDFDUlru1GDs+96SEivGkF7oumug4GxkbbKEf04yHSxTAwKHTO0vHmLfJGOSExUxZCzTevZ1YGiRrH+Sie+x27uUwSCDyCB8xoRziwsz4jKlly9a9g4Sxl2pJGPGJKXe+NrQYd5mEAVgKboasqxczhz/7Gd/gIC2p012E7YyzugDGvE3+Gf2LIRZRxkj3305+TnGAv5oTHb9sTPUvcUDlyyP8Nm02uVbeBOaYTir3ulp7GukwXrDw9hlw/d7uNjIy/GrPpj+2KSo2KGIcBdoYfcX5FwEfJoTGJTAW4+QUYh5l9E8/NsQnC+30Od56+cjUK8kGyF+YrAqgfFSTFISEJj4/Vw1+DB3GBJbFmqOcNRuZ+fPVWTzeZNjvFW/BVmnS08nxPNBJGPNxMg+xwOPX8+YGHDR+siKA8gmO04MDNFsFUOWvLglRADaeJq7pync0GG/JzXEI957NInWnDB5Psh7uwhhHDvO6iGkJ4aUwTm3y952IMMV593ZmhZukdeiZ0fprSEBrMx5nYzzKwDigPCbLe8iD8VTKNYZ7Lyt2KMRjlj1zA386Gm1BaAkYk02NvC585IkzbV2Mx9QmIxb3O32Zyf23l9aZQt1c50jpaZ+mBAlUMusjlwbIK30ThzGmm4MkoOeyJ6/T1WuxNDWwC/eB6HlMzqpp+hM6pvsZODzG2E1xljzaF9PVmMf/3In4YiafZYhlj1fNdcmxa+KX9fS1yNTTIpzv6TdBwLroxtoqoITxJAV47Ec5kjk5eeyrVfOhgDHR0AH09GFCuRgjmBNFndCYR/r1pZRWSkrkZuAdrxajhD1dfyD5rIBpaFJ0kg/DWzvUIlA9OdQ1K0gYQ4sW8NfvzSYpxGNXrSM9CbqaxvMr/GvLuyzGiMUUXw5iZIjLaTYzWMlAO0bBC/jkpGHpdNdzmrCmEIrKmqQKk/zgiM9rsvUJtTmQuS4SM+wzeWyq6VAS21GMWwbeBmGYn8bn8Pg7grgvmuPd20urNFlRh6OreRqGtWWRM5N84U9CnQBn/5aangm4b6Z5Z9vSJKqeHC3GIyVfjTgWrs/jsYqxAUSfi06WcHIHTmdhjFlMmIyBLscQczucxSZzMbkAPZ/+VZfQbkXdFZMrKzW53gkCId/9A4mmJs70E+2tgWlfSEbdibgC+Pg4ci3aksA7yx6ncQLdNo6MMd+b0LUvizFmMYM5Qbj0SXoPLA9szZcsxeutgSs2O6F2ZMJZZ06JuqGBiC+YXqdLHTPvYAlBOF0+a0uQs9tWVv14Sz+N2hFzn1wbjowz7DG5Y3J6XytiOznFGAJdA8tFMI5ZzADGP7u3VukCn/jEHmqOWO5Bl/udtVEC6qbjP5umvQGsg5bAwILPZrCwTTPau3Lb3pY1iiw90/S4Hli11ydgw1si0zC9Eb1WbkErxOMV6zGLPz96suQcCBcqFGhMPhHjmMXYGFODXKoh5kAeuc0jYvEGac2WxLHcdHksFk9NUswsl0szs6fmDJ+bPSLMHVExTs9fc9zu2MoqOxXjMev1caTP5zCmmbn8w1BOwzhhcSKYxGUbYj4lfWSghmSPHnTZfItbdE/bZ8fFW+Ysd88erZpIb7Y8L1+9UL6C68gYk5riex23Z2LMIE7w7V/AEPOJpqcMKlu+7OBoSD/mpy7CQaii0uYNqAfkRQ4z+6uHXU0fr3Fevho+SDunS7QTh7Fd9FGwUzCmEHfwf85OTb8Dsr4tmo0+EmJmGcNQbvrzZVQGYjSf9sUSf+3IcxIK63W3VLDuJKZJY29womBMc3q5T+g8AeNUUSO5kCGWFPbDTNjfTthbaVfNXHODFy2lYI+o7Lvc4ytTJdaBj73U0s4WXI8AXOGHi9Ig2Fxwn+YES13lKcAvOoLxEl9BHfSJz97T9aPYViV/u+F4HOZqnzgHYxHi1w9AGOeQ1mBMT0GdRtlqyvCmQWzD4quWnnZhYYwMeicrfNIfcwntUbKjXDAwKK+6+JWJCO3w8adZSUB2yDgz08AvOqaopCugvUTv6YT75Asoryf2eHQ5jAWIXz92trxpe56H1hi+tyFs86ixgqZtH7sAGp6HLyAJ4uCIKTHRTZW+pe2stySJANe7GMY8xBc2xLoF/cAPJB91yPUowgfKKqNZvzSMOYg/xBB/tMDJVFwJODvlGdlL6jJQoOJ0CsYIYozy7qSu6WuXVWyIRThJ9mx0NbdInsnyW+Vj/NvfeRbvXqt4yMs6UKbM0Cz449Xc5EH3rEA5GJv/SCBGP/3dyV3T1y20Ey8FlNYew6vZ0aR6FpoXwLj1O2NxJQ1xEgfRB0zXeDVgRJ55Ux5U+/9J+4T5Ubkxbv2OWbw78eGWH0FGaYplsRpOZ26zWaDd4iOE9IsXG0yXH+OX110sr5U+U8/XPqPgXg+NSc1i2roMxjHKsbQqLSbQQTy4nhsMM6YVlIZxq/IHZ0HDVyqG4+H13J/0dOolMP4DCD+iDa/n4xXdHInkNq0a4/P09b7Luobc2fCadJc3nyHxWzXGZ8egz6M2mIPedBhVIg9QY1x956PG+A9gfWqMa4xrqQbG9zXGlfYhD+BT4xb49fHv1RWvB24bNwBM6qWorEQA3DQ+A7Cul6KysgDgc+On2CDXS1FZ6YH7nxqxQQarei0qKhsAbu8aja8AtM16NSopxh6Ar41YPgEwrJejkrICceSEJPa6/KhejyoGTj7yuBL5AkCvBrmCELcB+IIhbtx9qkGuIsSHWFPfEYxR/AT8lVEvS4UEPvdAEjcxkGMm+/vHemWqQ+KH2BZ/4iCO1XVskwF4WHm2AWv5scWwvcEUwfnlriHI3dd79Gu/vd8+1PJDy77dQ1Def5UgRijfJCjXUgX50/2NinCC8ueb2xrnH178+9ubzzzC/wNYI8lvyZkL+AAAAABJRU5ErkJggg=="},220:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n(0),r=n.n(i),s=n(111),a=n(1);function o(e){const{children:t,value:n,index:i,...o}=e;return Object(a.jsx)(s.a,{role:"tabpanel",hidden:n!==i,id:"simple-tabpanel-".concat(i),"aria-labelledby":"simple-tab-".concat(i),...o,children:n===i&&Object(a.jsx)(r.a.Fragment,{children:t})})}},221:function(e,t,n){"use strict";var i=n(0),r=n.n(i),s=n(645),a=n(199),o=n.n(a),l=n(214),c=n.n(l),d=n(111),u=n(717),h=n(1);const p=Object(s.a)(d.a)((e=>{let{theme:t}=e;return{width:"100%",display:"flex",flexWrap:"wrap",backgroundColor:"transparent",position:"relative",[t.breakpoints.down("md")]:{overflow:"hidden"}}})),g=Object(s.a)(d.a)((e=>{let{theme:t}=e;return{width:"100%",flexWrap:"nowrap",alignContent:"flex-start",transform:"translateZ(0)",display:"flex",padding:"2px 2px 10px 2px",overflowY:"hidden",overflowX:"auto",scrollBehavior:"smooth",WebkitOverflowScrolling:"touch","& > div":{marginLeft:t.spacing(1),marginRight:t.spacing(1),[t.breakpoints.up("md")]:{marginRight:t.spacing(2)}},"&.dontScroll":{flexWrap:"wrap"},"& > div:first-child":{marginLeft:0},"& > div:last-child":{marginRight:0}}})),m=Object(s.a)(d.a)((e=>{let{theme:t}=e;return{position:"absolute",top:0,left:t.spacing(-5),color:"#c8ccd0",height:"100%",padding:"0 5px",zIndex:1,display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column",[t.breakpoints.down("md")]:{dis
2play:"none"}}}));t.a=e=>{const{dontScroll:t,children:n,onScrollEnd:i,sliderContainerProps:s,sliderContentProps:a}=e,l=r.a.useRef(null),[d,f]=r.a.useState({right:!1,left:!1}),y=e=>{if(!l.current)return;const t=l.current.getBoundingClientRect();Math.round(t.bottom)-window.innerHeight<=0&&i&&i()};return r.a.useEffect((()=>{if(t)return window.removeEventListener("scroll",y),window.addEventListener("scroll",y),()=>{window.removeEventListener("scroll",y)}}),[n]),r.a.useEffect((()=>{!t&&l.current&&l.current.scrollWidth>l.current.offsetWidth&&(0===l.current.scrollLeft&&f({left:!1,right:!0}),l.current.scrollLeft>0&&f({left:!0,right:!0}))}),[t,n,l.current]),Object(h.jsxs)(p,{...s,children:[d.left&&Boolean(l.current)&&Object(h.jsx)(m,{sx:{left:e=>e.spacing(-7),right:"auto"},children:Object(h.jsx)(u.a,{color:"inherit",onClick:()=>l.current.scrollLeft-=Math.round(l.current.offsetWidth),children:Object(h.jsx)(c.a,{fontSize:"large",color:"inherit"})})}),d.right&&Boolean(l.current)&&Object(h.jsx)(m,{sx:{left:"auto",right:e=>e.spacing(-7)},children:Object(h.jsx)(u.a,{color:"inherit",onClick:()=>l.current.scrollLeft+=Math.round(l.current.offsetWidth),children:Object(h.jsx)(o.a,{fontSize:"large",color:"inherit"})})}),Object(h.jsx)(g,{className:t&&"dontScroll",ref:l,onScroll:e=>{const t=Math.round(e.target.scrollLeft),n=e.target.scrollWidth-e.target.offsetWidth;0===t&&f({left:!1,right:!0}),!(t>0&&t<n-10)||d.left&&d.right||f({left:!0,right:!0}),t>=n-10&&d.right&&(f({left:!0,right:!1}),i&&i())},...a,children:n})]})}},222:function(e,t,n){"use strict";n.d(t,"a",(function(){return Ye}));var i=n(0),r=n.n(i),s=n(5),a=n(27),o=n(79),l=n(685),c=n(195),d=n(81),u=n(28),h=n(645),p=n(20),g=n(37),m=n(725),f=n(700),y=n(656),b=n(111),v=n(689),_=n(648),T=n(706),x=n(647),S=n(649),A=n(720),w=n(716),j=n(724),k=n(721),C=n(707),O=n(729),E=n(731),I=n(191),P=n(199),R=n.n(P),D=n(277),L=n.n(D),M=n(717),N=n(202),B=n.n(N),U=n(1);function F(e){return Object(U.jsx)(b.a,{sx:{textAlign:"right",pt:{md:2},mb:{xs:1,md:3}},children:Object(U.jsx)(M.a,{edge:"start","aria-label":"menu",onClick:()=>e.handleBack(),size:"large",sx:{color:"#6B7074"},children:Object(U.jsx)(B.a,{fontSize:"inherit"})})})}var q,z=n.p+"static/media/profile.5d267387.svg",V=n.p+"static/media/login.0472535a.svg",H=n.p+"static/media/blog.6cf6497f.svg";function W(){return W=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},W.apply(null,arguments)}function G(e,t){let{title:n,titleId:r,...s}=e;return i.createElement("svg",W({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",ref:t,"aria-labelledby":r},s),n?i.createElement("title",{id:r},n):null,q||(q=i.createElement("g",{id:"Raggruppa_5056","data-name":"Raggruppa 5056",transform:"translate(-89 -717)"},i.createElement("rect",{id:"Rettangolo_2146","data-name":"Rettangolo 2146",
2width:24,height:24,transform:"translate(89 717)",fill:"none"}),i.createElement("g",{id:"Raggruppa_5039","data-name":"Raggruppa 5039",transform:"translate(89 720)"},i.createElement("path",{id:"Tracciato_9015","data-name":"Tracciato 9015",d:"M69.674,59.288H85.662a3.968,3.968,0,0,1,3.964,3.964v7.641a3.968,3.968,0,0,1-3.964,3.964H69.674a3.968,3.968,0,0,1-3.964-3.964V63.252a3.968,3.968,0,0,1,3.964-3.964M85.662,73.427a2.535,2.535,0,0,0,2.532-2.534V63.252a2.534,2.534,0,0,0-2.532-2.532H69.674a2.534,2.534,0,0,0-2.532,2.532v7.641a2.534,2.534,0,0,0,2.532,2.532Z",transform:"translate(-65.71 -59.288)",fill:"currentColor"}),i.createElement("path",{id:"Tracciato_9016","data-name":"Tracciato 9016",d:"M85.871,85.27H75.308a.716.716,0,1,1,0-1.433H85.871a.716.716,0,1,1,0,1.433",transform:"translate(-68.23 -66.251)",fill:"currentColor"}),i.createElement("path",{id:"Tracciato_9017","data-name":"Tracciato 9017",d:"M79.967,72.135a.717.717,0,0,1-.469-1.258l2.43-2.1-2.405-1.9a.716.716,0,0,1,.889-1.123l3.084,2.44a.716.716,0,0,1,.117,1.006.694.694,0,0,1-.092.1l-3.084,2.67a.713.713,0,0,1-.468.175",transform:"translate(-69.551 -61.078)",fill:"currentColor"})))))}const X=i.forwardRef(G);var Y,Q;n.p;function K(){return K=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},K.apply(null,arguments)}function Z(e,t){let{title:n,titleId:r,...s}=e;return i.createElement("svg",K({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:24,height:23.997,viewBox:"0 0 24 23.997",ref:t,"aria-labelledby":r},s),n?i.createElement("title",{id:r},n):null,Y||(Y=i.createElement("defs",null,i.createElement("clipPath",{id:"clip-path"},i.createElement("rect",{id:"Rettangolo_3480","data-name":"Rettangolo 3480",width:24,height:23.997,fill:"currentColor"})))),Q||(Q=i.createElement("g",{id:"Raggruppa_9702","data-name":"Raggruppa 9702",clipPath:"url(#clip-path)"},i.createElement("path",{id:"Tracciato_9720","data-name":"Tracciato 9720",d:"M23.98,9.227a.911.911,0,0,0-.249-.791l-.17-.17L18.45,3.156,15.562.268a.918.918,0,0,0-.744-.26C14.806.008,14.8,0,14.784,0H5.525A5.53,5.53,0,0,0,0,5.522V18.475A5.53,5.53,0,0,0,5.525,24H18.476A5.529,5.529,0,0,0,24,18.475V9.324c0-.034-.018-.064-.019-.1M15.829,3.118,20.88,8.169H16.062a.233.233,0,0,1-.233-.234Zm2.647,19.053H5.525a3.7,3.7,0,0,1-3.7-3.7V5.522a3.7,3.7,0,0,1,3.7-3.7H14V7.935A2.063,2.063,0,0,0,16.062,10h6.109v8.479a3.7,3.7,0,0,1-3.7,3.7",transform:"translate(0 0)",fill:"currentColor"}),i.createElement("path",{id:"Tracciato_9721","data-name":"Tracciato 9721",d:"M11.825,11.25a3.942,3.942,0,0,0-.562-4.87L9.227,4.344A.913.913,0,0,0,7.934,5.634L9.971,7.671a2.1,2.1,0,0,1,.493,2.218L7.033,6.458A.913.913,0,0,0,5.74,7.748l3.421,3.421a2.186,2.186,0,0,1-2.206-.482L4.919,8.652A.913.913,0,0,0,3.627,9.942l2.036,2.036a3.944,3.944,0,0,0,4.87.563l4.826,4.825a.913.913,0,0,0,1.292-1.291Z",transform:"translate(0.843 1.023)",fill:"currentColor"}))))}const J=i.forwardRef(Z);var $;n.p;function ee(){return ee=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},ee.apply(null,arguments)}function te(e,t){let{title:n,titleId:r,...s}=e;return i.createElement("svg",ee({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",ref:t,"aria-labelledby":r},s),n?i.createElement("title",{id:r},n):null,$||($=i.createElement("g",{id:"Raggruppa_5064","data-name":"Raggruppa 5064",transform:"translate(-90 -895)"},i.createElement("rect",{id:"Rettangolo_2153","data-name":"Rettangolo 2153",width:24,height:24,transform:"translate(90 895)",fill:"none"}),i.createElement("g",{id:"Raggruppa_5045","data-name":"Raggruppa 5045",transform:"translate(92.504 895.737)"},i.createElement("path",{id:"Tracciato_9020","data-name":"Tracciato 9020",d:"M77.2,329.335a9.494,9.494,0,0,1-7.583-15.2.667.667,0,1,1,1.067.8,8.16,8.16,0,1,0,13.067.034.667.667,0,0,1,1.067-.8,9.493,9.493,0,0,1-7.613,15.165Z",transform:"translate(-67.711 -306.811)",fill:"currentColor"}),i.createElement("path",{id:"Tracciato_9021","data-name":"Tracciato 9021",d:"M82.807,319.359a1.1,1.1,0,0,1,1.086.917c.009.057.02.116.031.175a3.765,3.765,0,0,1,.081.652,4.108,4.108,0,0,1-4.1,4.1,4.185,4.185,0,0,1-.467-.026,4.14,4.14,0,0,1-3.037-2.03,3.851,3.851,0,0,1-.516-2.823,1.206,1.206,0,0,1,1.177-.957,1.178,1.178,0,0,1,.193.016,16.8,16.8,0,0,0,2.652.16,14.04,14.04,0,0,0,2.608-.151,1.247,1.247,0,0,1,.294-.037M79.9,320.88a19.1,19.1,0,0,1-2.739-.157,2.541,2.541,0,0,0,.377,1.745,2.8,2.8,0,0,0,2.041,1.389,2.865,2.865,0,0,0,.321.018,2.773,2.773,0,0,0,2.77-2.77,2.661,2.661,0,0,0-.052-.37,17.149,17.149,0,0,1-2.717.146",transform:"translate(-70.409 -308.642)",fill:"currentColor"}),i.createElement("path",{id:"Tracciato_9022","data-name":"Tracciato 9022",d:"M78.732,303.287h.076a2.775,2.775,0,0,1,2.523,1.562,3.07,3.07,0,0,1,1.141-.222,2.667,2.667,0,0,1,2.583,1.816,2.4,2.4,0,0,1,.1.637c0,.049.005.095.009.133v.064a2.667,2.667,0,0,1-2.529,2.8l-.071,0c0,.255-.009.5-.021.747-.01.216-.019.419-.019.621v.009c-.007.525-.432.906-1.262,1.133a9.921,9.921,0,0,1-2.476.257,10.848,10.848,0,0,1-2.511-.245c-.327-.081-1.321-.329-1.321-1.119,0-.208-.009-.418-.019-.639-.011-.25-.
2023-.507-.02-.77a2.712,2.712,0,0,1-2.1-1.1,2.812,2.812,0,0,1-.382-2.538,2.652,2.652,0,0,1,2.575-1.815,2.951,2.951,0,0,1,1.133.228l.014.006a2.7,2.7,0,0,1,2.576-1.568m2.417,2.987a1.09,1.09,0,0,1-.966-.738,1.439,1.439,0,0,0-1.4-.915h-.049a1.383,1.383,0,0,0-1.379.828,1.191,1.191,0,0,1-1.047.8,1.743,1.743,0,0,1-.673-.167,1.618,1.618,0,0,0-.624-.127,1.327,1.327,0,0,0-1.3.881,1.5,1.5,0,0,0,.186,1.35,1.387,1.387,0,0,0,1.155.555h.006a1.074,1.074,0,0,1,1.2,1.234c-.007.261,0,.527.017.807.006.14.013.283.017.429a7.509,7.509,0,0,0,2.5.3,6.779,6.779,0,0,0,2.407-.3c0-.151.011-.3.018-.444.013-.285.026-.555.016-.819a1.182,1.182,0,0,1,.283-.879,1.218,1.218,0,0,1,.9-.316,1.333,1.333,0,0,0,1.422-1.238,1.251,1.251,0,0,0,0-.212c0-.051-.007-.1-.009-.149a1.314,1.314,0,0,0-.037-.3v0a1.32,1.32,0,0,0-1.312-.886,1.762,1.762,0,0,0-.726.161A1.48,1.48,0,0,1,81.149,306.273Z",transform:"translate(-69.236 -303.284)",fill:"currentColor"}),i.createElement("path",{id:"Tracciato_9023","data-name":"Tracciato 9023",d:"M73.4,332.707a.667.667,0,0,1-.374-1.219,10.457,10.457,0,0,1,11.694,0,.667.667,0,1,1-.747,1.1,9.123,9.123,0,0,0-10.2,0,.665.665,0,0,1-.373.115",transform:"translate(-69.386 -312.089)",fill:"currentColor"})))))}const ne=i.forwardRef(te);n.p;var ie=n(207);n.p;n.p;var re=n(215);var se,ae;n.p;function oe(){return oe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},oe.apply(null,arguments)}function le(e,t){let{title:n,titleId:r,...s}=e;return i.createElement("svg",oe({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:24,height:24,viewBox:"0 0 24 24",ref:t,"aria-labelledby":r},s),n?i.createElement("title",{id:r},n):null,se||(se=i.createElement("defs",null,i.createElement("clipPath",{id:"clip-path"},i.createElement("rect",{id:"Rettangolo_2159","data-name":"Rettangolo 2159",width:18.442,height:18.442,fill:"currentColor"})))),ae||(ae=i.createElement("g",{id:"Raggruppa_5078","data-name":"Raggruppa 5078",transform:"translate(-90 -1033)"},i.createElement("g",{id:"Raggruppa_5075","data-name":"Raggruppa 5075",transform:"translate(49 -3)"},i.createElement("rect",{id:"Rettangolo_2160","data-name":"Rettangolo 2160",width:24,height:24,transform:"translate(41 1036)",fill:"none"}),i.createElement("g",{id:"Raggruppa_5072","data-name":"Raggruppa 5072",transform:"translate(43.779 1038.999)"},i.createElement("g",{id:"Raggruppa_5071","data-name":"Raggruppa 5071",transform:"translate(0 0.001)",clipPath:"url(#clip-path)"},i.createElement("path",{id:"Tracciato_9061","data-name":"Tracciato 9061",d:"M16.6,1.383a.436.436,0,0,1,.461.461V16.6a.436.436,0,0,1-.461.461H1.844a.436.436,0,0,1-.461-.461V1.844a.436.436,0,0,1,.461-.461ZM16.6,0H1.844A1.85,1.85,0,0,0,0,1.844V16.6a1.85,1.85,0,0,0,1.844,1.844H16.6A1.85,1.85,0,0,0,18.443,16.6V1.844A1.85,1.85,0,0,0,16.6,0",transform:"translate(0 0)",fill:"currentColor"}),i.createElement("path",{id:"Tracciato_9062","data-name":"Tracciato 9062",d:"M12.954,16.864a.727.727,0,0,1-.737-.737V10.87a.712.712,0,0,1,.737-.645.727.727,0,0,1,.737.737v5.256a.782.782,0,0,1-.737.646",transform:"translate(-3.734 -3.125)",fill:"currentColor"}),i.createElement("path",{id:"Tracciato_9063","data-name":"Tracciato 9063",d:"M12.914,6.507a.83.83,0,1,1-.83.83.83.83,0,0,1,.83-.83",transform:"translate(-3.693 -1.989)",fill:"currentColor"})))))))}const ce=i.forwardRef(le);n.p;var de,ue=n(216);n(211);function he(){return he=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},he.apply(null,arguments)}function pe(e,t){let{title:n,titleId:r,...s}=e;return i.createElement("svg",he({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",ref:t,"aria-labelledby":r},s),n?i.createElement("title",{id:r},n):null,de||(de=i.createElement("g",{id:"Raggruppa_5063","data-name":"Raggruppa 5063",transform:"translate(-41 -895)"},i.createElement("rect",{id:"Rettangolo_2154","data-name":"Rettangolo 2154",width:24,height:24,transform:"translate(41 895)",fill:"none"}),i.createElement("g",{id:"Raggruppa_5048","data-name":"Raggruppa 5048",transform:"translate(43.503 895.735)"},i.createElement("path",{id:"Tracciato_9047","data-name":"Tracciato 9047",d:"M18.922,315.035a.667.667,0,0,0-1.067.8A8.168,8.168,0,0,1,16.722,326.8a10.4,10.4,0,0,0-10.833,0,8.161,8.161,0,0,1-1.1-11.007A.667.667,0,0,0,3.72,315a9.5,9.5,0,1,0,15.2.042",transform:"translate(-1.809 -307.672)",fill:"currentColor"}),i.createElement("path",{id:"Tracciato_9048","data-name":"Tracciato 9048",d:"M16.732,320.234c-.035.006-.071.013-.106.023a13.407,13.407,0,0,1-2.63.155,16.515,16.515,0,0,1-2.654-.163,1.207,1.207,0,0,0-1.353.933v.009a3.79,3.79,0,0,0,.509,2.813,4.177,4.177,0,0,0,3.041,2.039,4.1,4.1,0,0,0,4.545-3.608,3.868,3.868,0,0,0,.025-.519,5.649,5.649,0,0,0-.111-.776,1.1,1.1,0,0,0-1.267-.908",transform:"translate(-4.508 -309.5)",fill:"currentColor"}),i.createElement("path",{id:"Tracciato_9049","data-name":"Tracciato 9049",d:"M9.017,310.942c0,.257.009.513.02.769.009.213.019.425.019.637,0,1.128,2.084,1.365,3.833,1.365,1.7,0,3.72-.241,3.739-1.4,0-.207.01-.414.019-.621.012-.247.023-.5.021-.743.039,0,.078,0,.117-.006a2.667,2.667,0,0,0,2.484-2.811,3.42,3.42,0,0,0-.1-.781l-.021-.076a2.773,2.773,0,0,0-3.564-1.635c-.051.019-.1.039-.151.061a2.757,2.757,0,0,0-2.491-1.554h-.026a2.729,2.729,0,0,0-2.657,1.57q-.1-.046-.2-.082a2.743,2.743,0,0,0-3.51,1.633,2.7,2.7,0,0,0-.17,1.007,2.734,2.734,0,0,0,2.637,2.667",transform:"translate(-3.333 -304.142)",fill:"currentColor"})))))}const ge=i.forwardRef(pe);var me;n.p;function fe(){return fe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},fe.apply(null,arguments)}function ye(e,t){let{title:n,titleId:r,...s}=e;return i.createElement("svg",fe({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",ref:t,"aria-labelledby":r},s),n?i.createElement("title",{id:r},n):null,me||(me=i.createElement("g",{id:"Raggruppa_5053","data-name":"Raggruppa 5053",transform:"translate(-41 -677)"},i.createElement("rect",{id:"Rettangolo_2142","data-name":"Rettangolo 2142",width:24,height:24,transform:"translate(41 677)",fill:"none"}),i.createElement("g",{id:"Raggruppa_5022","data-name":"Raggruppa 5022",transform:"translate(41.641 679)"},i.createElement("path",{id:"Tracciato_9010","data-name":"Tracciato 9010",d:"M6.777,19.99a.71
25.715,0,0,1-.683-.5c-.585-1.832-1.4-5.316-2.437-10.361q-.807.744-1.607,1.5a.716.716,0,1,1-.984-1.042c2.116-2,4.285-3.937,6.383-5.814,1.232-1.1,2.464-2.2,3.693-3.322a1.134,1.134,0,0,1,.094-.092,1.435,1.435,0,0,1,1.994.09c1.135,1.027,2.271,2.038,3.4,3.048,2.2,1.964,4.484,4,6.7,6.09a.716.716,0,0,1-.984,1.042Q21.48,9.807,20.6,9c-.049.253-.1.519-.155.8-.616,3.161-1.459,7.49-2.167,9.7a.717.717,0,0,1-.682.5h0s-2.315-.014-3.592-.016a.717.717,0,0,1-.715-.711l-.027-4.088H11.04l.047,4.075a.718.718,0,0,1-.716.725c-1.547,0-3.2.008-3.577.018H6.777",transform:"translate(-0.841 0.001)",fill:"currentColor"})))))}const be=i.forwardRef(ye);var ve;n.p,n(217);function _e(){return _e=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},_e.apply(null,arguments)}function Te(e,t){let{title:n,titleId:r,...s}=e;return i.createElement("svg",_e({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",ref:t,"aria-labelledby":r},s),n?i.createElement("title",{id:r},n):null,ve||(ve=i.createElement("g",{id:"Raggruppa_5065","data-name":"Raggruppa 5065",transform:"translate(-41 -941)"},i.createElement("rect",{id:"Rettangolo_2155","data-name":"Rettangolo 2155",width:24,height:24,transform:"translate(41 941)",fill:"none"}),i.createElement("g",{id:"Raggruppa_5034","data-name":"Raggruppa 5034",transform:"translate(44 943)"},i.createElement("path",{id:"Tracciato_9050","data-name":"Tracciato 9050",d:"M13.52,377.051H9.161a3.138,3.138,0,0,1,0-6.276c3.933,0,5.014,5.2,5.061,5.419a.717.717,0,0,1-.559.845.745.745,0,0,1-.143.014m-4.359-4.846a1.706,1.706,0,0,0,0,3.411h3.413c-.422-1.246-1.439-3.411-3.413-3.411",transform:"translate(-4.544 -370.775)",fill:"currentColor"}),i.createElement("path",{id:"Tracciato_9051","data-name":"Tracciato 9051",d:"M20.563,377.051H16.2a.716.716,0,0,1-.717-.716.7.7,0,0,1,.014-.144c.044-.218,1.129-5.416,5.062-5.416a3.138,3.138,0,1,1,0,6.276m-3.413-1.433h3.413a1.706,1.706,0,0,0,.07-3.411h-.07c-1.974,0-2.991,2.164-3.413,3.411",transform:"translate(-7.229 -370.775)",fill:"currentColor"}),i.createElement("path",{id:"Tracciato_9052","data-name":"Tracciato 9052",d:"M12.054,381.129H4.19a.232.232,0,0,0-.231.231v1.807a.232.232,0,0,0,.231.231h7.863a.232.232,0,0,0,.231-.231V381.36a.232.232,0,0,0-.231-.231",transform:"translate(-3.959 -373.712)",fill:"currentColor"}),i.createElement("path",{id:"Tracciato_9053","data-name":"Tracciato 9053",d:"M25.3,381.129H17.626a.232.232,0,0,0-.231.231v1.807a.231.231,0,0,0,.23.231H25.3a.232.232,0,0,0,.233-.23h0V381.36a.232.232,0,0,0-.231-.231",transform:"translate(-7.77 -373.712)",fill:"currentColor"}),i.createElement("path",{id:"Tracciato_9054","data-name":"Tracciato 9054",d:"M12.32,386.3H5.367a.232.232,0,0,0-.231.231v7.79a.232.232,0,0,0,.231.231h6.954a.232.232,0,0,0,.231-.231v-7.79a.232.232,0,0,0-.231-.231",transform:"translate(-4.293 -375.178)",fill:"currentColor"}),i.createElement("path",{id:"Tracciato_9055","data-name":"Tracciato 9055",d:"M24.673,394.549H17.719a.232.232,0,0,1-.231-.231v-7.79a.232.232,0,0,1,.231-.231h6.954a.232.232,0,0,1,.231.231v7.79a.232.232,0,0,1-.231.231",transform:"translate(-7.796 -375.178)",fill:"currentColor"})))))}const xe=i.forwardRef(Te);var Se,Ae;n.p,n(225);function we(){return we=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},we.apply(null,arguments)}function je(e,t){let{title:n,titleId:r,...s}=e;return i.createElement("svg",we({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:24,height:24,viewBox:"0 0 24 24",ref:t,"aria-labelledby":r},s),n?i.createElement("title",{id:r},n):null,Se||(Se=i.createElement("defs",null,i.createElement("clipPath",{id:"clip-path"},i.createElement("rect",{id:"Rettangolo_2159","data-name":"Rettangolo 2159",width:18.442,height:18.442,fill:"currentColor"})))),Ae||(Ae=i.createElement("g",{id:"Raggruppa_5077","data-name":"Raggruppa 5077",transform:"translate(-41 -1033)"},i.createElement("rect",{id:"Rettangolo_2160","data-name":"Rettangolo 2160",width:24,height:24,transform:"translate(41 1033)",fill:"none"}),i.createElement("g",{id:"Raggruppa_5076","data-name":"Raggruppa 5076",transform:"translate(-0.579)"},i.createElement("rect",{id:"Rettangolo_2161","data-name":"Rettangolo 2161",width:17,height:17,rx:1,transform:"translate(45 1037)",fill:"currentColor"}),i.createElement("g",{id:"Raggruppa_5072","data-name":"Raggruppa 5072",transform:"translate(44.358 1035.999)"},i.createElement("g",{id:"Raggruppa_5071","data-name":"Raggruppa 5071",transform:"translate(0 0.001)",clipPath:"url(#clip-path)"},i.createElement("path",{id:"Tracciato_9061","data-name":"Tracciato 9061",d:"M16.6,1.383a.436.436,0,0,1,.461.461V16.6a.43
26.436,0,0,1-.461.461H1.844a.436.436,0,0,1-.461-.461V1.844a.436.436,0,0,1,.461-.461ZM16.6,0H1.844A1.85,1.85,0,0,0,0,1.844V16.6a1.85,1.85,0,0,0,1.844,1.844H16.6A1.85,1.85,0,0,0,18.443,16.6V1.844A1.85,1.85,0,0,0,16.6,0",transform:"translate(0 0)",fill:"currentColor"}),i.createElement("path",{id:"Tracciato_9062","data-name":"Tracciato 9062",d:"M12.954,16.864a.727.727,0,0,1-.737-.737V10.87a.712.712,0,0,1,.737-.645.727.727,0,0,1,.737.737v5.256a.782.782,0,0,1-.737.646",transform:"translate(-3.734 -3.125)",fill:"#27292d"}),i.createElement("path",{id:"Tracciato_9063","data-name":"Tracciato 9063",d:"M12.914,6.507a.83.83,0,1,1-.83.83.83.83,0,0,1,.83-.83",transform:"translate(-3.693 -1.989)",fill:"#27292d"})))))))}const ke=i.forwardRef(je);n.p;var Ce,Oe,Ee,Ie,Pe,Re=n(230),De=n(228);function Le(){return Le=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Le.apply(null,arguments)}function Me(e,t){let{title:n,titleId:r,...s}=e;return i.createElement("svg",Le({id:"Raggruppa_6522","data-name":"Raggruppa 6522",xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",ref:t,"aria-labelledby":r},s),n?i.createElement("title",{id:r},n):null,Ce||(Ce=i.createElement("path",{id:"Tracciato_9186","data-name":"Tracciato 9186",d:"M5.816,21.124a2.658,2.658,0,1,1-2.659-2.659A2.659,2.659,0,0,1,5.816,21.124Z",transform:"translate(0.424 -0.707)",fill:"currentColor"})),Oe||(Oe=i.createElement("path",{id:"Tracciato_9186_-_Contorno","data-name":"Tracciato 9186 - Contorno",d:"M3.082,17.465A3.583,3.583,0,1,1-.5,21.048,3.587,3.587,0,0,1,3.082,17.465Zm0,5.317a1.734,1.734,0,1,0-1.733-1.734A1.736,1.736,0,0,0,3.082,22.782Z",transform:"translate(0.5 -0.631)",fill:"currentColor"})),Ee||(Ee=i.createElement("path",{id:"Tracciato_9187","data-name":"Tracciato 9187",d:"M23.611,3.159A2.658,2.658,0,1,1,20.953.5,2.659,2.659,0,0,1,23.611,3.159Z",transform:"translate(-0.536 0.424)",fill:"currentColor"})),Ie||(Ie=i.createElement("path",{id:"Tracciato_9187_-_Contorno","data-name":"Tracciato 9187 - Contorno",d:"M20.877-.5A3.583,3.583,0,1,1,17.3,3.083,3.587,3.587,0,0,1,20.877-.5Zm0,5.317a1.734,1.734,0,1,0-1.733-1.734A1.736,1.736,0,0,0,20.877,4.817Z",transform:"translate(-0.46 0.5)",fill:"currentColor"})),Pe||(Pe=i.createElement("path",{id:"Tracciato_9188","data-name":"Tracciato 9188",d:"M15.966,23.5a5.07,5.07,0,0,1-5.093-5.036V4.536A3.191,3.191,0,0,0,7.667,1.366h-.2A3.191,3.191,0,0,0,4.264,4.536v8.135a.944.944,0,0,1-1.888,0V4.536A5.07,5.07,0,0,1,7.469-.5h.2A5.07,5.07,0,0,1,12.76,4.536V18.463a3.206,3.206,0,0,0,6.412,0V10.328a.944.944,0,0,1,1.888,0v8.135A5.071,5.071,0,0,1,15.966,23.5Z",transform:"translate(0.283 0.5)",fill:"currentColor"})))}const Ne=i.forwardRef(Me);n.p;var Be=n.p+"static/media/comingsoon.2fdcc24c.svg",Ue=n(254),Fe=n.n(Ue),qe=n(255),ze=n.n(qe);const Ve=Object(l.a)((e=>({menuIcon:{color:"#fff",minWidth:"40px",justifyContent:"center",marginRight:"20px"}}))),He=Object(h.a)(m.a)((e=>{let{theme:t}=e;return{"& .MuiPaper-root":{backgroundColor:"#2F3337",color:"#fff"}}})),We=Object(h.a)(f.a)((e=>{let{theme:t}=e;return{"&.active":{"& .icon":{"&.active":{display:"inline"},"&.inactive":{display:"none"}}},"& .icon":{"&.active":{display:"none"},"&.inactive":{display:"inline"}}}})),Ge=r.a.forwardRef((function(e,t){return Object(U.jsx)(y.a,{direction:"left",ref:t,...e})})),Xe=e=>{const{i18n:t,t:n}=Object(o.a)(),{currentCategory:i}=Object(d.a)(),{packageType:l,isWellness:h}=Object(c.a)(),m=Object(s.i)(),f=Object(s.h)(),{handleMenuClose:y}=e,E=Ve(),{auth:P,logout:D}=r.a.useContext(p.a),{config:M}=r.a.useContext(g.a),[N,B]=r.a.useState({courses:!1,recipes:!1}),[q,W]=r.a.useState(!1);return Object(U.jsxs)(b.a,{p:1,sx:{pb:{xs:10,sm:1}},children:[Object(U.jsx)(F,{handleBack:()=>y()}),Object(U.jsxs)(b.a,{sx:{borderRadius:"14px",backgroundColor:"#555C64",mb:{xs:1,md:3}},children:[Object(U.jsxs)(v.a,{sx:{p:2,display:"flex",width:"100%",textAlign:"left"},onClick:()=>{P.isAuthenticated?W(!q):f.push("/".concat(t.language,"/auth/login"),{from:m.pathname+m.search})},children:[Object(U.jsx)(_.a,{className:E.menuIcon,children:P.isAuthenticated&&P.user&&P.user.data&&P.user.data.img_avatar?Object(U.jsx)(T.a,{src:P.user.data.img_avatar}):Object(U.jsx)("img",{src:P.isAuthenticated?z:V})}),Object(U.jsx)(x.a,{children:Object(U.jsxs)(S.a,{direction:"row",alignItems:"center",spacing:3,children:[Object(U.jsx)(A.a,{fontSize:"inherit",color:"inherit",children:Object(U.jsx)("b",{children:P.isAuthenticated?P.user.data.first_name||n("Profilo"):n("Accedi")})}),P.isAuthenticated&&P.user&&P.user.data&&Object(U.jsxs)(b.a,{sx:{borderRadius:"5px",background:"#41474E",padding:"1px 10px"},children:[Object(U.jsx)(w.a,{component:Re.a,color:"gold",sx:{fontSize:16,verticalAlign:"middle"}}),"\xa0",Object(U.jsx)("b",{children:P.user.data.achievements_count||"0"})]})]})}),P.isAuthenticated&&Object(U.jsx)(r.a.Fragment,{children:q?Object(U.jsx)(L.a,{fontSize:"large"}):Object(U.jsx)(R.a,{fontSize:"large"})})]}),Object(U.jsx)(j.a,{in:q,children:Object(U.jsxs)(k.a,{children:[Object(U.jsxs)(We,{button:!0,component:a.b,activeStyle:{textDecoration:"underline"},to:"/".concat(t.language,"/user/progress"),children:[Object(U.jsx)(_.a,{className:E.menuIcon}),Object(U.jsx)(x.a,{children:n("I miei progressi")})]}),Object(U.jsxs)(We,{button:!0,component:a.b,activeStyle:{textDecoration:"underline"},to:"/".concat(t.language,"/user/profile"),children:[Object(U.jsx)(_.a,{className:E.menuIcon}),Object(U.jsx)(x.a,{children:n("Dati account")}
2)]}),Object(U.jsxs)(We,{component:a.b,activeStyle:{textDecoration:"underline"},to:"/".concat(t.language,"/user/referral"),button:!0,children:[Object(U.jsx)(_.a,{className:E.menuIcon}),Object(U.jsx)(x.a,{children:n("Invita un amico")})]}),Object(U.jsxs)(We,{activeStyle:{textDecoration:"underline"},onClick:()=>D(),button:!0,sx:{mb:2},children:[Object(U.jsx)(_.a,{className:E.menuIcon}),Object(U.jsx)(x.a,{children:n("Logout")})]})]})})]}),Object(U.jsxs)(k.a,{children:[Object(U.jsxs)(We,{button:!0,exact:!0,component:a.b,activeStyle:{textDecoration:"underline"},to:"/".concat(t.language),onClick:()=>{Object(u.e)({event:"menu_nav",event_id:"08",event_trigger:"GAevent",event_detail:"home"})},sx:{mb:1},children:[Object(U.jsxs)(_.a,{className:E.menuIcon,children:[Object(U.jsx)(w.a,{className:"icon inactive",component:ie.a,sx:{color:e=>e.palette.text.primary,fontSize:"2rem"}}),Object(U.jsx)(w.a,{className:"icon active",component:be,sx:{color:e=>e.palette.text.primary,fontSize:"2rem"}})]}),Object(U.jsx)(x.a,{children:Object(U.jsx)("b",{children:n("Home")})})]}),Object(U.jsxs)(We,{button:!0,onClick:()=>{B({...N,courses:!N.courses})},sx:{mb:1},children:[Object(U.jsxs)(_.a,{className:E.menuIcon,children:[Object(U.jsx)(w.a,{className:"icon inactive",component:X,sx:{color:e=>e.palette.text.primary,fontSize:"2rem"}}),Object(U.jsx)(w.a,{className:"icon active",component:ue.a,sx:{color:e=>e.palette.text.primary,fontSize:"2rem"}})]}),Object(U.jsx)(x.a,{children:Object(U.jsx)("b",{children:n("Corsi di cucina")})}),N.courses?Object(U.jsx)(Fe.a,{}):Object(U.jsx)(ze.a,{})]}),Object(U.jsxs)(j.a,{in:N.courses,children:[Object(U.jsxs)(We,{button:!0,component:a.b,activeStyle:{textDecoration:"underline"},to:"/".concat(t.language,"/").concat(n("corsi")),onClick:()=>{Object(u.e)({event:"menu_nav",event_id:"08",event_trigger:"GAevent",event_detail:"masterclass"})},sx:{mb:1},children:[Object(U.jsx)(_.a,{className:E.menuIcon}),Object(U.jsx)(x.a,{children:n("MasterClass")})]}),M.basics_enabled&&Object(U.jsxs)(We,{button:!0,component:a.b,to:"/".concat(t.language,"/").concat(n("scuola")),onClick:()=>{Object(u.e)({event:"menu_nav",event_id:"08",event_trigger:"GAevent",event_detail:"basics"})},sx:{mb:1,"&.active":{"& .text":{textDecoration:"underline"}}},children:[Object(U.jsx)(_.a,{className:E.menuIcon}),Object(U.jsx)(x.a,{children:n("La scuola")})]}),M.horeca_enabled&&Object(U.jsxs)(We,{button:!0,component:a.b,to:"/".concat(t.language,"/").concat(n("horeca")),onClick:()=>{Object(u.e)({event:"menu_nav",event_id:"08",event_trigger:"GAevent",event_detail:"horeca"})},sx:{mb:1,"&.active":{"& .text":{textDecoration:"underline"}}},children:[Object(U.jsx)(_.a,{className:E.menuIcon}),Object(U.jsx)(x.a,{children:n("HoReCa")})]}),M.wellness_enabled&&Object(U.jsxs)(We,{button:!0,component:a.b,to:"/".concat(t.language,"/").concat(n("benessere")),onClick:()=>{Object(u.e)({event:"menu_nav",event_id:"08",event_trigger:"GAevent",event_detail:"wellness"})},sx:{mb:1,"&.active":{borderRadius:"14px",py:1.5,background:"#444E43","& .text":{textDecoration:"underline"}}},children:[Object(U.jsx)(_.a,{className:E.menuIcon}),Object(U.jsx)(x.a,{children:n("Benessere")})]})]}),M.recipes_enabled&&Object(U.jsxs)(U.Fragment,{children:[Object(U.jsxs)(We,{button:!0,onClick:()=>{B({...N,recipes:!N.recipes})},sx:{mb:1},children:[Object(U.jsx)(_.a,{className:E.menuIcon,children:Object(U.jsx)(w.a,{className:"icon inactive",component:J,sx:{color:e=>e.palette.text.primary,fontSize:"2rem"}})}),Object(U.jsx)(x.a,{children:Object(U.jsx)("b",{children:n("Ricette")})}),Object(U.jsx)(C.a,{color:"white",size:"small",label:Object(U.jsx)("b",{children:n("Novit\xe0")}),sx:{mr:1}}),N.recipes?Object(U.jsx)(Fe.a,{}):Object(U.jsx)(ze.a,{})]}),Object(U.jsxs)(j.a,{in:N.recipes,children:[Object(U.jsxs)(We,{button:!0,component:a.b,activeStyle:{textDecoration:"underline"},to:"/".concat(t.language,"/").concat(n("ricette")),onClick:()=>{Object(u.e)({event:"menu_nav",event_id:"08",event_trigger:"GAevent",event_detail:"recipes"})},sx:{mb:1},children:[Object(U.jsx)(_.a,{className:E.menuIcon}
2),Object(U.jsx)(x.a,{children:n("Sezione Ricette")})]}),Object(U.jsxs)(We,{button:!0,component:a.b,activeStyle:{textDecoration:"underline"},to:"/".concat(t.language,"/").concat(n("pasti")),onClick:()=>{Object(u.e)({event:"menu_nav",event_id:"08",event_trigger:"GAevent",event_detail:"meals"})},sx:{mb:1},children:[Object(U.jsx)(_.a,{className:E.menuIcon}),Object(U.jsx)(x.a,{children:n("Pasti")})]}),Object(U.jsxs)(We,{button:!0,component:a.b,activeStyle:{textDecoration:"underline"},to:"/".concat(t.language,"/user/recipes"),onClick:()=>{Object(u.e)({event:"menu_nav",event_id:"08",event_trigger:"GAevent",event_detail:"favorites_recipes"})},sx:{mb:1},children:[Object(U.jsx)(_.a,{className:E.menuIcon}),Object(U.jsx)(x.a,{children:n("Ricette preferite")})]}),Object(U.jsxs)(We,{button:!0,component:a.b,activeStyle:{textDecoration:"underline"},to:"/".concat(t.language,"/user/shopping-list"),onClick:()=>{Object(u.e)({event:"menu_nav",event_id:"08",event_trigger:"GAevent",event_detail:"shopping_list"})},sx:{mb:1},children:[Object(U.jsx)(_.a,{className:E.menuIcon}),Object(U.jsx)(x.a,{children:n("Lista della spesa")})]})]})]}),M.learning_paths_enabled&&Object(U.jsxs)(We,{button:!0,component:a.b,activeStyle:{textDecoration:"underline"},to:"/".concat(t.language,"/").concat(n("percorsi")),onClick:()=>{Object(u.e)({event:"menu_nav",event_id:"08",event_trigger:"GAevent",event_detail:"learning_paths"})},sx:{mb:1},children:[Object(U.jsxs)(_.a,{className:E.menuIcon,children:[Object(U.jsx)(w.a,{className:"icon inactive",component:De.a,sx:{color:e=>e.palette.text.primary,fontSize:"2rem"}}),Object(U.jsx)(w.a,{className:"icon active",component:Ne,sx:{color:e=>e.palette.text.primary,fontSize:"2rem"}})]}),Object(U.jsx)(x.a,{children:Object(U.jsx)("b",{children:n("Percorsi")})})]}),"it"===t.language&&Object(U.jsxs)(We,{button:!0,component:O.a,activeStyle:{textDecoration:"underline"},href:"https://ac.academia.tv/comingsoon",onClick:()=>{Object(u.e)({event:"menu_nav",event_id:"08",event_trigger:"GAevent",event_detail:"coming_soon"})},sx:{mb:1},children:[Object(U.jsx)(_.a,{className:E.menuIcon,children:Object(U.jsx)("img",{src:Be,width:"30"})}),Object(U.jsx)(x.a,{children:Object(U.jsx)("b",{children:n("Corsi in arrivo")})})]}),Object(U.jsxs)(We,{button:!0,component:a.b,activeStyle:{textDecoration:"underline"},to:{pathname:"/".concat(t.language,"/giftcard"),search:"from=".concat(l?l.key:"masterclass")},onClick:()=>{Object(u.e)({event:"menu_nav",event_id:"08",event_trigger:"GAevent",event_detail:"giftcard"})},sx:{mb:1},children:[Object(U.jsxs)(_.a,{className:E.menuIcon,children:[Object(U.jsx)(w.a,{className:"icon inactive",viewBox:"0 0 29.044 29.043",component:re.a,sx:{color:e=>e.palette.text.primary,fontSize:"2rem"}}),Object(U.jsx)(w.a,{className:"icon active",component:xe,sx:{color:e=>e.palette.text.primary,fontSize:"2rem"}})]}),Object(U.jsx)(x.a,{children:Object(U.jsx)("b",{children:n("Giftcard - Regalo")})})]}),Object(U.jsxs)(We,{button:!0,component:a.b,activeStyle:{textDecoration:"underline"},to:"/".concat(t.language,"/").concat(n("maestri")),onClick:()=>{Object(u.e)({event:"menu_nav",event_id:"08",event_trigger:"GAevent",event_detail:"masters"})},sx:{mb:1},children:[Object(U.jsxs)(_.a,{className:E.menuIcon,children:[Object(U.jsx)(w.a,{className:"icon inactive",component:ne,sx:{color:e=>e.palette.text.primary,fontSize:"2.2rem"}}),Object(U.jsx)(w.a,{className:"icon active",component:ge,sx:{color:e=>e.palette.text.primary,fontSize:"2.2rem"}})]}),Object(U.jsx)(x.a,{children:Object(U.jsx)("b",{children:n("I maestri")})})]}),Object(U.jsxs)(We,{button:!0,component:a.b,activeStyle:{textDecoration:"underline"},to:"/".concat(t.language,"/user/faq"),onClick:()=>{Object(u.e)({event:"menu_nav",event_id:"08",event_trigger:"GAevent",event_detail:"faq"})},sx:{mb:1},children:[Object(U.jsxs)(_.a,{className:E.menuIcon,children:[Object(U.jsx)(w.a,{className:"icon inactive",component:ce,sx:{color:e=>e.palette.text.primary,fontSize:"2.2rem"}}),Object(U.jsx)(w.a,{className:"icon active",component:ke,sx:{color:e=>e.palette.text.primary,fontSize:"2.2rem"}})]}),Object(U.jsx)(x.a,{children:Object(U.jsx)("b",{children:n("Domande frequenti")})})]}),"it"===t.language&&Object(U.jsxs)(We,{button:!0,component:O.a,activeStyle:{textDecoration:"underline"},href:"https://blog.academia.tv/",onClick:()=>{Object(u.e)({event:"menu_nav",event_id:"08",event_trigger:"GAevent",event_detail:"blog"})}
2,sx:{mb:1},children:[Object(U.jsx)(_.a,{className:E.menuIcon,children:Object(U.jsx)("img",{src:H,width:"30"})}),Object(U.jsx)(x.a,{children:Object(U.jsx)("b",{children:n("Blog")})})]}),(!P.isAuthenticated||P.isAuthenticated&&P.user&&P.user.data&&!P.user.data.flag_active_subscription&&!h||P.isAuthenticated&&P.user&&P.user.data&&!P.user.data.flag_active_wellness_subscription&&h)&&Object(U.jsx)(We,{children:Object(U.jsx)(x.a,{children:Object(U.jsx)(I.a,{fullWidth:!0,component:a.b,to:{pathname:"/".concat(t.language,"/paywall"),search:"from=".concat(l&&"horeca"!==l.key?l.key:"masterclass"),state:{from:m.pathname}},onClick:()=>{Object(u.e)({event:"cta_click",event_id:"03",event_trigger:"GAevent",event_detail:"buy_".concat(l&&"horeca"!==l.key?l.key:"masterclass"),event_subdetail:n("Attiva l'abbonamento")})},color:"primary",children:n("Attiva l'abbonamento")})})}),!h&&(!P.isAuthenticated||P.isAuthenticated&&P.user&&P.user.data&&!P.user.data.flag_active_subscription)&&Object(U.jsx)(We,{children:Object(U.jsx)(x.a,{children:Object(U.jsx)(I.a,{fullWidth:!0,component:a.b,to:{pathname:Object(s.f)("/:lang/:courses/:courseSlug/:lessons/:lessonSlug",{lang:t.language,courses:n("corsi"),courseSlug:M.free_lesson_course_slug,lessons:n("lezioni"),lessonSlug:M.free_lesson_slug}),state:{from:m.pathname}},color:"secondary",onClick:()=>{Object(u.e)({event:"free_lesson",event_id:"03",event_trigger:"GAevent",event_detail:"".concat(i," menu")})},children:n("Guarda lezione gratuita")})})}),h&&l&&(!P.isAuthenticated||P.isAuthenticated&&P.user&&P.user.data&&!P.user.data.flag_active_wellness_subscription)&&Object(U.jsx)(We,{children:Object(U.jsx)(x.a,{children:Object(U.jsx)(I.a,{fullWidth:!0,component:a.b,to:{pathname:Object(s.f)("/:lang/:package/:classSlug/:modules/:moduleSlug/:lessons/:chapterSlug",{lang:t.language,package:l.translation,classSlug:M.wellness_free_lesson_course_pkg_slug,modules:n("moduli"),moduleSlug:M.wellness_free_lesson_course_slug,lessons:n("lezioni"),chapterSlug:M.wellness_free_lesson_slug}),state:{from:m.pathname}},onClick:()=>{Object(u.e)({event:"free_lesson",event_id:"03",event_trigger:"GAevent",event_detail:"".concat(i," menu")})},color:"secondary",children:n("Guarda lezione gratuita")})})})]})]})};function Ye(e){const t=Object(s.i)(),{open:n,setOpen:i}=e,{auth:a}=r.a.useContext(p.a),[o,l]=r.a.useState(!1),c=()=>{i(!1)};return r.a.useEffect((()=>{o?c():l(!0)}),[a,t.pathname]),Object(U.jsxs)(r.a.Fragment,{children:[Object(U.jsx)(He,{fullScreen:!0,open:n,onClose:c,TransitionComponent:Ge,sx:{display:{xs:"block",sm:"none"}},children:Object(U.jsx)(Xe,{handleMenuClose:c})}),Object(U.jsx)(E.a,{anchor:"right",open:n,onClose:c,sx:{"& .MuiPaper-root":{minWidth:375},display:{xs:"none",sm:"block","& .MuiDrawer-paper":{backgroundColor:"#26292D",color:"#fff"}}},children:Object(U.jsx)(Xe,{handleMenuClose:c})})]})}},223:function(e,t,n){"use strict";n.d(t,"b",(function(){return U})),n.d(t,"a",(function(){return F}));var i,r=n(0),s=n.n(r),a=n(5),o=n(27),l=n(35),c=n(79),d=n(20),u=n(37),h=n(728),p=n(729),g=n(111),m=n(730),f=n(720),y=n(705),b=n(649),v=n(706),_=n(716),T=n(718),x=n(717),S=n(196),A=n(56),w=n(657),j=n(192),k=n(259),C=n.n(k),O=n(209),E=n(227);function I(){return I=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},I.apply(null,arguments)}function P(e,t){let{title:n,titleId:s,...a}=e;return r.createElement("svg",I({xmlns:"http://www.w3.org/2000/svg",width:23.999,height:23.999,viewBox:"0 0 23.999 23.999",ref:t,"aria-labelledby":s},a),n?r.createElement("title",{id:s},n):null,i||(i=r.createElement("g",{id:"Raggruppa_6485","data-name":"Raggruppa 6485",transform:"translate(-1065.517 -221.088)"},r.createElement("path",{id:"My_path_4_","data-name":"My path (4)",d:"M23.6,2H4.4A2.4,2.4,0,0,0,2.012,4.4L2,26l4.8-4.8H23.6A2.407,2.407,0,0,0,26,18.8V4.4A2.407,2.407,0,0,0,23.6,2Zm0,16.8H5.8L4.4,20.2V4.4H23.6Z",transform:"translate(1063.517 219.088)",fill:"currentColor"}),r.createElement("g",{id:"Raggruppa_6115","data-name":"Raggruppa 6115",transform:"translate(1071.824 225.528)"},r.createElement("path",{id:"Poligono_5","data-name":"Poligono 5",d:"M4.269.854a.3.3,0,0,1,.569,0l.806,2.419a.3.3,0,0,0,.19.19l2.419.806a.3.3,0,0,1,0,.569l-2.419.806a.3.3,0,0,0-.19.19L4.838,8.254a.3.3,0,0,1-.569,0L3.463,5.834a.3.3,0,0,0-.19-.19L.854,4.838a.3.3,0,0,1,0-.569l2.419-.806a.3.3,0,0,0,.19-.19Z",transform:"translate(0 0)",fill:"currentColor"}),r.createElement("path",{id:"Poligono_6","data-name":"Poligono 6",d:"M2.372.854a.3.3,0,0,1,.569,0l.332,1a.3.3,0,0,0,.19.19l1,.332a.3.3,0,0,1,0,.569l-1,.332a.3.3,0,0,0-.19.19l-.332,1a.3.3,0,0,1-.569,0l-.332-1a.3.3,0,0,0-.19-.19l-1-.332a.3.3,0,0,1,0-.569l1-.332a.3.3,0,0,0,.19-.19Z",transform:"translate(6.072 5.313)",fill:"currentColor"})))))}const R=r.forwardRef(P);n.p;var D=n.p+"static/media/whatsapp.39072750.svg",L=n(276),M=n.n(L),N=n(1);const B="microphone",U=e=>{const{auth:t}=s.a.useContext(d.a),{config:n}=s.a.useContext(u.a),[i,r]=s.a.useState(null);return Object(N.jsx)(N.Fragment,{children:!Boolean(window.Android)&&!!n&&n.tutor_help_enabled&&!t.isAuthenticated&&Object(N.jsx)(N.Fragment,{children:Object(N.jsx)(h.a,{component:p.a,href:n.tutor_help_url,target:"_blank",color:"white",sx:{position:"fixed",zIndex:1,bottom:16,right:16},children:Object(N.jsx)(j.a,{src:D,sx:{width:40,height:40}})})})})},F=e=>{const{sx:t,buttonProps:n,iconProps:i,variant:r}=e,{t:h,i18n:p}=Object(c.a)(),j=Object(A.a)(),k=Object(a.i)(),I=Object(w.a)(j.breakpoints.down("md")),{auth:P}=s.a.useContext(d.a),{config:D}=s.a.useContext(u.a),[L,U]=s.a.useState(null),{request:F,cancelToken:q}=s.a.useContext(l.a),[z,V]=s.a.useState(!1);return Object(N.jsx)(g.a,{...t,children:!!D&&D.tutor_ai_enabled&&Object(N.jsxs)(N.Fragment,{children:[Object(N.jsx)(m.a,{open:z&&!I&&!!P.user&&!!P.user.data&&P.user.data.flag_active_pro,onClose:()=>{V(!1)},anchorReference:"none",PaperProps:{sx:{position:"fixed",right:24,bottom:24,margin:10,width:400}},children:Object(N.jsx)(g.a,{sx:{width:400,height:"75vh",overflow:"hidden"},children:Object(N.jsx)("iframe",{title:"chatbot",src:D.tutor_ai_url,allow:B,width:"100%",height:"100%",style:{border:"none"}})})}),Object(N.jsx)(S.a,{fullWidth:!0,maxWidth:"lg",scroll:"body",fullScreen:!0,open:z&&I&&!!P.user&&!!P.user.data&&P.user.data.flag_active_pro,handleClose:()=>{V(!1)},children:Object(N.jsx)(g.a,{sx:{width:"100%",height:"100vh",overflow:"hidden"},children:Object(N.jsx)("iframe",{title:"chatbot",src:D.tutor_ai_url,allow:B,width:"100%",height:"100%",style:{border:"none"}})})}),Object(N.jsx)(S.a,{fullWidth:!0,maxWidth:"lg",scroll:"body",fullScreen:I,open:z&&(!!P.user&&!!P.user.data&&!P.user.data.flag_active_pro||!P.isAuthenticated),handleClose:()=>{V(!1)},children:Object(N.jsxs)(g.a,{sx:{px:3,pb:3,textAlign:"center"},children:[Object(N.jsx)(f.a,{variant:"h6",color:"textPrimary",sx:{mb:4},children:Object(N.jsx)("b",{children:h("Che cos\u2019\xe8 il Tutor AI? Come pu\xf2 migliorarmi?")})}),Object(N.jsxs)(y.a,{container:!0,spacing:4,justify:!0,children:[Object(N.jsx)(y.a,{item:!0,xs:12,md:4,children:Object(N.jsxs)(b.a,{alignItems:"center",justifyContent:"center",children:[Object(N.jsx)(v.a,{variant:"rounded",sx:{width:98,height:98,background:"#42474E",borderRadius:"20px",mb:3},children:Object(N.jsx)(_.a,{component:E.a,sx:{color:"#b1b8be",fontSize:45}})}),Object(N.jsx)(f.a,{variant:"h6",color:"textPrimary",sx:{mb:3},children:Object(N.jsx)("b",{children:h("Assistente AI \u2013 Formato dai nostri Maestri")})}),Object(N.jsx)(f.a,{color:"textSecondary",children:h("Il sapere dei pi\xf9 grandi chef del mondo racchiuso in un unico assistente digitale di cucina, creato da Acad\xe8mia.tv.")})]})}),Object(N.jsx)(y.a,{item:!0,xs:12,md:4,children:Object(N.jsxs)(b.a,{alignItems:"center",justifyContent:"center",children:[Object(N.jsx)(v.a,{variant:"rounded",sx:{width:98,height:98,background:"#42474E",borderRadius:"20px",mb:3},children:Object(N.jsx)(M.a,{sx:{color:"#b1b8be",fontSize:45}})}),Object(N.jsx)(f.a,{variant:"h6",color:"textPrimary",sx:{mb:3},children:Object(N.jsx)("b",{children:h("Supporto in tempo reale, e pi\xf9 sicurezza ai fornelli")})}),Object(N.jsx)(f.a,{color:"textSecondary",children:h("Disponibile 24 ore su 24: risponde ai tuoi dubbi, ti guida passo dopo passo nelle ricette e ti aiuta a perfezionarle.")})]})}),Object(N.jsx)(y.a,{item:!0,xs:12,md:4,children:Object(N.jsxs)(b.a,{alignItems:"center",justifyContent:"center",children:[Object(N.jsx)(v.a,{variant:"rounded",sx:{width:98,height:98,background:"#42474E",borderRadius:"20px",mb:3},children:Object(N.jsx)(_.a,{component:R,sx:{color:"#b1b8be",fontSize:45}})}),Object(N.jsx)(f.a,{variant:"h6",color:"textPrimary",sx:{mb:3},children:Object(N.jsx)("b",{children:h("Un\u2019esperienza Premium, su misura per te")})}),Object(N.jsx)(f.a,{color:"textSecondary",children:h("Selezione di ricette, menu personalizzati, planning settimanale: tutto adattato ai tuoi gusti e alle tue esigenze.")})]})})]}),Object(N.jsxs)(b.a,{sx:{mt:4},justifyContent:"center",alignItems:"center",children:[Object(N.jsx)(f.a,{color:"textPrimary",sx:{mb:2,maxWidth:"400px"},children:h("Tutor \xe8 incluso nel piano PRO, insieme a video in 4k, Live e Libri di cucina digitali esclusivi")}),Object(N.jsx)(T.a,{size:"large",variant:"contained",color:"primary",component:o.b,to:{pathname:"/".concat(p.language,"/paywall"),search:"from=masterclass",state:{from:k.pathname}},children:Object(N.jsx)("b",{children:h("Scopri il piano PRO")})})]})]})}),r&&"icon"===r?Object(N.jsx)(x.a,{size:"large",sx:{backgroundColor:"#F7F7F7","&:hover":{backgroundColor:"#E1E1E1"}},onClick:()=>{V(!0)},children:Object(N.jsx)(_.a,{component:O.a,color:"darkVariant",fontSize:"large"})}):Object(N.jsx)(T.a,{fullWidth:!0,variant:"contained",color:"white",size:"large",endIcon:Object(N.jsx)(C.a,{color:"inherit"}),sx:{justifyContent:"space-between"},onClick:()=>{V(!0)},...n,children:Object(N.jsxs)("span",{children:[Object(N.jsx)(_.a,{component:O.a,color:"primary",sx:{verticalAlign:"bottom",mr:1},...i})," ",h("Chiedi al Tutor")]})})]})})}},225:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}
2));var i,r=n(0);function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},s.apply(null,arguments)}function a(e,t){let{title:n,titleId:a,...o}=e;return r.createElement("svg",s({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",ref:t,"aria-labelledby":a},o),n?r.createElement("title",{id:a},n):null,i||(i=r.createElement("g",{id:"Raggruppa_5057","data-name":"Raggruppa 5057",transform:"translate(-41 -761)"},r.createElement("rect",{id:"Rettangolo_2147","data-name":"Rettangolo 2147",width:24,height:24,transform:"translate(41 761)",fill:"none"}),r.createElement("g",{id:"Raggruppa_5027","data-name":"Raggruppa 5027",transform:"translate(45 762.37)"},r.createElement("path",{id:"Tracciato_9011","data-name":"Tracciato 9011",d:"M21.459,123.174a.534.534,0,0,0-.208-.042,1.827,1.827,0,0,1,0-3.653.537.537,0,0,0,0-1.075H8.262a2.989,2.989,0,0,0-2.984,2.943V137a2.663,2.663,0,0,0,2.661,2.661H21.168a1.056,1.056,0,0,0,1.054-1.054V124.182a1.048,1.048,0,0,0-.763-1.008m-8.7,7.085a.28.28,0,0,1-.458.21l-.951-.779a.286.286,0,0,0-.358,0l-.963.775a.28.28,0,0,1-.457-.211v-6.047l3.186-.006Zm-4.5-10.78H19a2.9,2.9,0,0,0,0,3.656H8.123a1.771,1.771,0,0,1-1.77-1.758,1.912,1.912,0,0,1,1.91-1.9",transform:"translate(-5.278 -118.404)",fill:"currentColor"})))))}const o=r.forwardRef(a);n.p},226:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var i=n(0);function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},r.apply(null,arguments)}function s(e,t){let{title:n,titleId:s,...a}=e;return i.createElement("svg",r({xmlns:"http://www.w3.org/2000/svg",width:22,height:21.999,viewBox:"0 0 22 21.999",ref:t,"aria-labelledby":s},a),n?i.createElement("title",{id:s},n):null,i.createElement("g",{"data-name":"Raggruppa 3943"},i.createElement("g",{"data-name":"Raggruppa 1954"},i.createElement("path",{"data-name":"Unione 52",d:"m19.683 21.6-3.972-3.974A9.8 9.8 0 0 1 2.872 2.87a9.8 9.8 0 0 1 14.757 12.839l3.971 3.974a1.357 1.357 0 1 1-1.92 1.918zM2.714 9.8A7.089 7.089 0 1 0 9.8 2.715 7.1 7.1 0 0 0 2.714 9.8z",style:{fill:"currentColor"}}))))}const a=i.forwardRef(s);n.p},227:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i,r=n(0);function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},s.apply(null,arguments)}function a(e,t){let{title:n,titleId:a,...o}=e;return r.createElement("svg",s({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:"24px",height:"25px",viewBox:"0 0 24 25",ref:t,"aria-labelledby":a},o),n?r.createElement("title",{id:a},n):null,i||(i=r.createElement("defs",null,r.createElement("clipPath",{id:"clip1"},r.createElement("path",{d:"M 10 19 L 23.910156 19 L 23.910156 25 L 10 25 Z M 10 19 "})))),r.createElement("g",{id:"surface1"},r.createElement("path",{style:{stroke:"none",fillRule:"nonzero",fill:"currentColor",fillOpacity:1},d:"M 0 23.320312 L 0 25.109375 L 8.367188 25.109375 L 8.367188 23.320312 C 8.371094 23.121094 8.390625 22.921875 8.425781 22.726562 L 3.3125 22.726562 C 4.894531 21.976562 6.617188 21.570312 8.367188 21.535156 C 8.5 21.535156 8.644531 21.546875 8.773438 21.546875 C 9.21875 20.660156 9.898438 19.914062 10.734375 19.386719 C 9.953125 19.242188 9.164062 19.160156 8.367188 19.148438 C 5.570312 19.148438 0 20.546875 0 23.320312 "}),r.createElement("g",{clipPath:"url(#clip1)",clipRule:"nonzero"},r.createElement("path",{style:{stroke:"none",fillRule:"nonzero",fill:"currentColor",fillOpacity:1},d:"M 17.332031 19.746094 C 15.132812 19.746094 10.757812 20.949219 10.757812 23.324219 L 10.757812 25.109375 L 23.910156 25.109375 L 23.910156 23.324219 C 23.910156 20.949219 19.535156 19.746094 17.335938 19.746094 "})),r.createElement("path",{style:{stroke:"none",fillRule:"nonzero",fill:"currentColor",fillOpacity:1},d:"M 14.71875 16.410156 C 14.992188 16.902344 15.394531 17.304688 15.886719
217.578125 C 16.785156 18.085938 17.882812 18.085938 18.78125 17.578125 C 20.222656 16.78125 20.746094 14.96875 19.945312 13.527344 C 19.148438 12.089844 17.332031 11.570312 15.886719 12.363281 C 14.445312 13.160156 13.921875 14.972656 14.71875 16.410156 "}),r.createElement("path",{style:{stroke:"none",fillRule:"nonzero",fill:"currentColor",fillOpacity:1},d:"M 4.222656 11.585938 C 4.199219 11.765625 4.183594 12.40625 4.183594 12.59375 C 4.183594 14.898438 6.058594 16.765625 8.367188 16.765625 C 10.679688 16.765625 12.550781 14.898438 12.550781 12.59375 C 12.550781 12.402344 12.535156 11.757812 12.511719 11.578125 C 11.734375 11.769531 10.945312 11.910156 10.148438 11.992188 C 10.152344 12.039062 10.160156 12.542969 10.160156 12.59375 C 10.160156 13.582031 9.359375 14.378906 8.367188 14.378906 C 7.378906 14.378906 6.574219 13.582031 6.574219 12.59375 C 6.574219 12.546875 6.585938 12.046875 6.585938 12 C 5.789062 11.925781 5 11.785156 4.222656 11.585938 "}),r.createElement("path",{style:{stroke:"none",fillRule:"nonzero",fill:"currentColor",fillOpacity:1},d:"M 4.296875 7.03125 L 4.296875 9.484375 C 5.609375 9.890625 6.976562 10.085938 8.351562 10.070312 C 9.761719 10.078125 11.167969 9.882812 12.523438 9.484375 L 12.523438 7.007812 C 13.460938 6.785156 14.191406 6.050781 14.402344 5.113281 C 14.617188 4.175781 14.277344 3.195312 13.53125 2.589844 C 12.78125 1.984375 11.753906 1.851562 10.878906 2.253906 C 10.742188 0.972656 9.660156 0 8.367188 0 C 7.078125 0 5.996094 0.972656 5.859375 2.253906 C 4.972656 1.855469 3.9375 1.996094 3.191406 2.617188 C 2.445312 3.238281 2.121094 4.230469 2.355469 5.171875 C 2.59375 6.109375 3.347656 6.832031 4.296875 7.03125 "})))}const o=r.forwardRef(a);n.p},228:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var i,r,s,a=n(0);function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},o.apply(null,arguments)}function l(e,t){let{title:n,titleId:l,...c}=e;return a.createElement("svg",o({id:"Raggruppa_6521","data-name":"Raggruppa 6521",xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",ref:t,"aria-labelledby":l},c),n?a.createElement("title",{id:l},n):null,i||(i=a.createElement("path",{id:"Tracciato_9186","data-name":"Tracciato 9186",d:"M3.082,17.465A3.583,3.583,0,1,1-.5,21.048,3.587,3.587,0,0,1,3.082,17.465Zm0,5.317a1.734,1.734,0,1,0-1.733-1.734A1.736,1.736,0,0,0,3.082,22.782Z",transform:"translate(0.5 -0.631)",fill:"currentColor"})),r||(r=a.createElement("path",{id:"Tracciato_9187","data-name":"Tracciato 9187",d:"M20.877-.5A3.583,3.583,0,1,1,17.3,3.083,3.587,3.587,0,0,1,20.877-.5Zm0,5.317a1.734,1.734,0,1,0-1.733-1.734A1.736,1.736,0,0,0,20.877,4.817Z",transform:"translate(-0.46 0.5)",fill:"currentColor"})),s||(s=a.createElement("path",{id:"Tracciato_9188","data-name":"Tracciato 9188",d:"M15.966,23.5a5.07,5.07,0,0,1-5.093-5.036V4.536A3.191,3.191,0,0,0,7.667,1.366h-.2A3.191,3.191,0,0,0,4.264,4.536v8.135a.944.944,0,0,1-1.888,0V4.536A5.07,5.07,0,0,1,7.469-.5h.2A5.07,5.07,0,0,1,12.76,4.536V18.463a3.206,3.206,0,0,0,6.412,0V10.328a.944.944,0,0,1,1.888,0v8.135A5.071,5.071,0,0,1,15.966,23.5Z",transform:"translate(0.283 0.5)",fill:"currentColor"})))}const c=a.forwardRef(l);n.p},230:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var i,r,s=n(0);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},a.apply(null,arguments)}function o(e,t){let{title:n,titleId:o,...l}=e;return s.createElement("svg",a({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":o},l),n?s.createElement("title",{id:o},n):null,i||(i=s.createElement("defs",null,s.createElement("clipPath",{id:"clip-path"},s.createElement("rect",{transform:"translate(0)",width:24,height:20.326,fill:"currentColor","data-name":"Rettangolo 2256"})))),r||(r=s.createElement("g",{transform:"translate(-443 -449)","data-name":"Raggruppa 5701"},s.createElement("rect",{transform:"translate(443 449)",width:24,height:24,fill:"none","data-name":"Rettangolo 2479"}),s.createElement("g",{transform:"translate(443 451)","data-name":"Raggruppa 5691"},s.createElement("g",{transform:"translate(0)",clipPath:"url(#clip-path)","data-name":"Raggruppa 5159"},s.createElement("path",{transform:"translate(0)",d:"M23.752,1.247a.816.816,0,0,0-.577-.24H20.728c.005-.22.01-.445.01-.673A.333.333,0,0,0,20.4,0H3.588a.333.333,0,0,0-.334.334c0,.23.005.453.01.673H.814A.816.816,0,0,0,0,1.823c0,.162.028,4.005,2.276,6.125a15.017,15.017,0,0,0,4.458,2.711.792.792,0,0,0,.286.051.924.924,0,0,0,.187-.023,29.339,29.339,0,0,0,3.414,2.564.37.37,0,0,0,.033.023V15.2a22.048,22.048,0,0,0-1.98,1.874l-.2,1.039-1.262.786c-.185.137-.253,1.431-.253,1.431h10.09s-.073-1.285-.263-1.431l-1.2-.786-.2-1.037c-1.017-.923-1.593-1.53-2.033-1.861V13.286A27.864,27.864,0,0,0,16.829,10.7a.772.772,0,0,0,.152.015.862.862,0,0,0,.286-.051,15.017,15.017,0,0,0,4.458-2.711C23.972,5.834,24,1.99,24,1.826a.86.86,0,0,0-.248-.579M3.394,6.762a6.952,6.952,0,0,1-1.7-4.122H3.368a13.042,13.042,0,0,0,1.6,5.31A9.959,9.959,0,0,1,3.394,6.762m17.2,0a10.053,10.053,0,0,1-1.535,1.163A13.234,13.234,0,0,0,20.622,2.64H22.3a7.039,7.039,0,0,1-1.709,4.122",fill:"
2currentColor","data-name":"Tracciato 9053"}))))))}const l=s.forwardRef(o);n.p},231:function(e,t,n){"use strict";n.d(t,"a",(function(){return ee})),n.d(t,"b",(function(){return ne}));var i=n(0),r=n.n(i),s=n(79),a=n(709),o=n(28),l=n(36),c=n(205),d=n(206),u=n(220),h=n(192),p=n(163),g=n(188),m=n(200),f=n(685),y=n(645),b=n(5),v=n(27),_=n(20),T=n(35),x=n(37),S=n(55),A=n(198),w=n(204),j=n(232),k=n(191),C=n(111),O=n(705),E=n(720),I=n(717),P=n(738),R=n(729),D=n(229),L=n.n(D),M=n(246),N=n(270),B=n.n(N),U=n(271),F=n.n(U),q=n(266),z=n.n(q),V=n(263),H=n.n(V),W=n(199),G=n.n(W),X=n(214),Y=n.n(X),Q=n(1);const K=e=>{const{t:t}=Object(s.a)(),{setTab:n}=e,{toggleAuthDialog:i}=r.a.useContext(S.a),{request:a,cancelToken:o}=r.a.useContext(T.a),{auth:l,login:c}=r.a.useContext(_.a),[d,u]=r.a.useState({register_step:"user-profile",first_name:"",last_name:"",mobile_phone:"",location:"",location_id:"",birthday:"",flag_horeca:null});return Object(Q.jsxs)(C.a,{px:4,pb:7,children:[Object(Q.jsx)(O.a,{container:!0,children:Object(Q.jsx)(O.a,{item:!0,xs:!0,children:Object(Q.jsxs)(C.a,{mb:6,children:[Object(Q.jsx)(E.a,{variant:"subtitle1",children:"1/2"}),Object(Q.jsx)(E.a,{variant:"h4",children:Object(Q.jsx)("b",{children:t("Dicci qualcosa di te!")})}),Object(Q.jsx)(E.a,{variant:"h6",children:t("Ci aiuter\xe0 a migliorare la tua esperienza in piattaforma.")})]})})}),Object(Q.jsxs)(O.a,{container:!0,spacing:4,sx:{mb:2},children:[Object(Q.jsx)(O.a,{item:!0,xs:12,sm:6,children:Object(Q.jsx)(A.b,{fullWidth:!0,label:t("Nome"),value:d.first_name,onChange:e=>u({...d,first_name:e.target.value})})}),Object(Q.jsx)(O.a,{item:!0,xs:12,sm:6,children:Object(Q.jsx)(A.b,{fullWidth:!0,label:t("Cognome"),value:d.last_name,onChange:e=>u({...d,last_name:e.target.value})})})]}),Object(Q.jsxs)(O.a,{container:!0,spacing:4,sx:{mb:2},children:[Object(Q.jsx)(O.a,{item:!0,xs:12,sm:6,children:Object(Q.jsx)(A.b,{fullWidth:!0,label:t("Data di nascita"),type:"date",value:d.birthday,onChange:e=>u({...d,birthday:e.target.value}),InputLabelProps:{shrink:!0}})}),Object(Q.jsx)(O.a,{item:!0,xs:12,sm:6,children:Object(Q.jsx)(j.a,{initialValue:d.location,formParams:d,handleAddressSelect:e=>{u((t=>({...t,location_id:e.place_id,location:e.formatted_address})))},renderInput:e=>Object(Q.jsx)(A.b,{...e,label:t("Citt\xe0"),fullWidth:!0})})})]}),Object(Q.jsxs)(O.a,{container:!0,spacing:4,sx:{mb:2},children:[Object(Q.jsx)(O.a,{item:!0,xs:12,sm:6,children:Object(Q.jsx)(A.b,{fullWidth:!0,label:t("Numero cellulare"),value:d.mobile_phone,onChange:e=>u({...d,mobile_phone:e.target.value})})}),Object(Q.jsxs)(O.a,{item:!0,xs:12,sm:6,children:[Object(Q.jsx)(E.a,{children:t("Lavori nel mondo Food & Beverage?")}),Object(Q.jsx)(w.a,{label:t("Si"),checked:d.flag_horeca,onChange:e=>u({...d,flag_horeca:!0})}),Object(Q.jsx)(w.a,{label:t("No"),checked:!1===d.flag_horeca,onChange:e=>u({...d,flag_horeca:!1})})]})]}),Object(Q.jsx)(O.a,{container:!0,spacing:4,children:Object(Q.jsx)(O.a,{item:!0,xs:12,sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:Object(Q.jsxs)(C.a,{textAlign:"center",children:[Object(Q.jsx)(k.a,{fullWidth:m.isMobileOnly,color:"primary",onClick:()=>(async()=>{const e=o.source();await a("put","/v2/user",e.token,d)&&(c({...l.user,data:{...l.user.data,...d}}),n("user-interests"))})(),sx:{mb:2,fontSize:"1.2rem",px:{sm:10}},children:t("Conferma i dati")}),Object(Q.jsx)(E.a,{color:"textSecondary",onClick:()=>i(!1),children:t("Non adesso")})]})})})]})},Z=Object(y.a)(C.a)((e=>{let{theme:t}=e;return{position:"absolute",top:"10px",right:"10px"}})),J=Object(f.a)((e=>({imageList:{width:"100%",height:"auto",transform:"translateZ(0)"},image:{borderRadius:"15px",width:"100%"},titleBar:{background:"transparent"},icon:{color:"white",fontSize:"2rem"},imageListItem:{},imageListItemItem:{overflow:"visible"},imageListItemSelected:{position:"relative","&:after":{border:"4px solid white",borderRadius:"15px",position:"absolute",content:'""',top:0,left:0,width:"100%",height:"100%",boxSizing:"border-box"}},forward:{position:"absolute",top:"50%",right:"-10px",color:"#c8ccd0"},backward:{position:"absolute",top:"50%",left:"-10px",color:"#c8ccd0"}}))),$=e=>{const{t:t}=Object(s.a)(),n=J(),{login:i,auth:a}=r.a.useContext(_.a),{request:c,cancelToken:d}=r.a.useContext(T.a),{toggleAuthDialog:u}=r.a.useContext(S.a),[p,f]=r.a.useState(!1),[y,b]=r.a.useState([]),[v,x]=r.a.useState([]),[A,w]=r.a.useState(0),j=Object(g.n)(y,m.isMobileOnly?6:24),P=async e=>{f(!0),e.preventDefault();const t=d.source();await c("put","/v2/user",t.token,{register_step:"user-interests",interests:v})?(async()=>{const e=d.source(),t=await c("get","/v2/me",e.token);t?(i({token:a.user.token,data:t}),Object(o.e)(Object(o.g)({event:"signup_completed"},t)),Object(o.a)("signup_preferences"),u(!1)):f(!1)})():f(!1)};return r.a.useEffect((()=>{(async()=>{const e=d.source(),t=await c("get","/v2/tags/user-interests",e.token);t&&b(t.tags)})()}),[]),Object(Q.jsxs)(C.a,{px:4,pb:4,children:[Object(Q.jsx)(O.a,{container:!0,children:Object(Q.jsx)(O.a,{item:!0,xs:!0,children:Object(Q.jsxs)(C.a,{mb:2,children:[Object(Q.jsx)(E.a,{variant:"subtitle1",children:"2/2"}),Object(Q.jsx)(E.a,{variant:"h4",children:Object(Q.jsx)("b",{children:t("Dicci qualcosa di te!")})}),Object(Q.jsx)(E.a,{variant:"h6",children:t("Quali sono i tuoi interessi in cucina?")})]})})}),Object(Q.jsxs)(C.a,{position:"relative",px:{xs:0,md:6},mt:3,children:[A>0&&Object(Q.jsx)(I.a,{className:n.backward,onClick:()=>w(A-1),size:"large",children:Object(Q.jsx)(Y.a,{})}),A<j.length-1&&Object(Q.jsx)(I.a,{className:n.forward,onClick:()=>w(A+1),size:"large",children:Object(Q.jsx)(G.a,{})}),Object(Q.jsx)(L.a,{index:A,onChangeIndex:e=>{w({index:e})},enableMouseEvents:!0,children:j.map(((e,t)=>Object(Q.jsx)(O.a,{container:!0,spacing:1,children:e.map((e=>{const t=v.indexOf(e.id)>-1;return Object(Q.jsxs)(O.a,{item:!0,xs:6,sm:3,md:2,children:[Object(Q.jsxs)(C.a,{position:"relative",className:Object(l.a)(n.imageListItem,{[n.imageListItemSelected]:t}),onClick:()=>{return t=e.id,void x((e=>{const n=[...e],i=e.indexOf(t);return i>-1?n.splice(i,1):n.push(t),n}));var t},children:[t&&Object(Q.jsx)(Z,{children:Object(Q.jsx)(H.a,{className:n.icon})}),Object(Q.jsx)(h.a,{className:n.image,src:e.img_cover,alt:e.title,useSet:{sizes:[["down","md","50vw"],["150px"]]}})]}),Object(Q.jsx)(C.a,{mt:1,children:Object(Q.jsx)(E.a,{children:e.title})})]},e.id)}))},"chunk"+t)))})]}),Object(Q.jsx)(O.a,{container:!0,children:Object(Q.jsxs)(O.a,{item:!0,xs:!0,children:[Object(Q.jsx)(C.a,{mt:4,textAlign:"center",children:Object(Q.jsx)(k.a,{fullWidth:m.isMobileOnly,color:"primary",onClick:e=>P(e),sx:{mb:2,fontSize:"1.2rem",px:{sm:15}},loading:p,children:t("Prosegui")})}),Object(Q.jsx)(C.a,{textAlign:"center",children:Object(Q.jsx)(E.a,{color:"textSecondary",onClick:()=>u(!1),children:t("Non adesso")})})]})})]})},ee=e=>{const{t:t,i18n:n}=Object(s.a)(),i=Object(b.i)(),l=Object(b.h)(),{buy:u,courseId:h}=Object(b.j)(),{auth:g,login:m}=r.a.useContext(_.a),{config:f}=r.a.useContext(x.a),{request:y,cancelToken:j}=r.a.useContext(T.a),{showError:D}=r.a.useContext(S.a),[L,N]=r.a.useState(!1),[U,q]=r.a.useState(!1),[V,H]=r.a.useState(!1),[W,G]=r.a.useState({email:sessionStorage.getItem("register-email")||"",password:"",flag_updates:!1}),X=new URLSearchParams(i.search),Y=new URLSearchParams(i.hash.substring(1)),K=JSON.parse(Y.get("state")),[Z,J,$]=Object(p.a)(["referrals"]),ee=X.has("to")?X.get("to"):!(!K||!K.to)&&K.to;ee&&localStorage.setItem("redirectTo",ee);return r.a.useEffect((()=>
2{if(Boolean(g.user)&&Boolean(g.user.data)){Object(o.e)({event:"register",event_id:"05",event_trigger:"GAevent",lead_email:g.user.data.email,event_detail:u?"buy_"+o.f[u]:null});const e=localStorage.getItem("redirectTo");e&&!Boolean(u)?l.push(e):(i.state&&i.state.from&&!Boolean(u)&&l.push(i.state.from),i.state&&i.state.from||Boolean(u)||l.push("/"))}}),[g.user]),Object(Q.jsx)(C.a,{children:Object(Q.jsx)(O.a,{container:!0,children:Object(Q.jsxs)(O.a,{item:!0,xs:!0,children:[Object(Q.jsx)(C.a,{mb:2,children:Object(Q.jsx)(E.a,{variant:"h5",color:"dark.main",children:Object(Q.jsx)("b",{children:Boolean(u)?t("Registrati e vai al pagamento"):t("Iscriviti ad Acad\xe8mia.tv")})})}),Object(Q.jsxs)("form",{onSubmit:e=>(async e=>{if(e.preventDefault(),!W.flag_updates)return void D({error_message:t("Devi accettare le Privacy Policy per proseguire!")});N(!0);const n=j.source();let i={...W};const r=Z.referrals||null,s=sessionStorage.getItem("x-cic-referral-code"),a=sessionStorage.getItem("x-cic-campaign");s&&(i.referrals={friend_invite:s}),a&&(i.referrals={campaign_id:a}),r&&(i.referrals={...i.referrals,...r},$("referrals",{path:"/"}));const l=await y("post","/v2/register",n.token,i);l?(Object(o.a)("signup_data"),m({token:l.token.token,data:{id:l.token.user_id,email:W.email,profile_status:l.profile_status}})):N(!1)})(e),autoComplete:"new-password",children:[Object(Q.jsx)(C.a,{my:2,children:Object(Q.jsx)(A.b,{fullWidth:!0,className:"light",label:t("Email"),value:W.email,autoComplete:"new-password",onChange:e=>G({...W,email:e.target.value})})}),Object(Q.jsx)(C.a,{mb:2,children:Object(Q.jsx)(A.b,{fullWidth:!0,className:"light",type:U?"text":"password",label:t("Password"),autoComplete:"new-password",value:W.password,onChange:e=>G({...W,password:e.target.value}),InputProps:{endAdornment:Object(Q.jsx)(P.a,{position:"end",children:Object(Q.jsx)(I.a,{"aria-label":t("toggle password visibility"),onClick:()=>q(!U),onMouseDown:e=>e.preventDefault(),edge:"end",style:{color:"#B2B8BD"},size:"large",children:U?Object(Q.jsx)(B.a,{}):Object(Q.jsx)(F.a,{})})})}})}),Object(Q.jsxs)(C.a,{pl:1,mb:2,children:[Object(Q.jsx)(E.a,{variant:"caption",children:t("La password deve avere almeno:")}),Object(Q.jsxs)(C.a,{children:[Object(Q.jsx)(E.a,{component:"span",color:"textSecondary",style:/^(.*[a-zA-Z].*)$/.test(W.password)?{color:"#46c455"}:{},children:Object(Q.jsx)(z.a,{style:{fontSize:"0.75rem",verticalAlign:"middle",marginRight:"10px"}})}),Object(Q.jsx)(E.a,{variant:"caption",children:t("una lettera")})]}),Object(Q.jsxs)(C.a,{children:[Object(Q.jsx)(E.a,{component:"span",color:"textSecondary",style:/^(.*\d.*)$/.test(W.password)?{color:"#46c455"}:{},children:Object(Q.jsx)(z.a,{style:{fontSize:"0.75rem",verticalAlign:"middle",marginRight:"10px"}})}),Object(Q.jsx)(E.a,{variant:"caption",children:t("un numero")})]}),Object(Q.jsxs)(C.a,{children:[Object(Q.jsx)(E.a,{color:"textSecondary",component:"span",style:/^(?=.*[@#.\u20ac_&-,+()*:;!?])/.test(W.password)?{color:"#46c455"}:{},children:Object(Q.jsx)(z.a,{style:{fontSize:"0.75rem",verticalAlign:"middle",marginRight:"10px"}})}),Object(Q.jsxs)(E.a,{variant:"caption",children:[t("un simbolo")," @#.\u20ac_&-,+()*:;!?"]})]}),Object(Q.jsxs)(C.a,{children:[Object(Q.jsx)(E.a,{color:"textSecondary",component:"span",style:/^.{8,}$/.test(W.password)?{color:"#46c455"}:{},children:Object(Q.jsx)(z.a,{style:{fontSize:"0.75rem",verticalAlign:"middle",marginRight:"10px"}})}),Object(Q.jsx)(E.a,{variant:"caption",children:t("8 caratteri")})]})]}),Object(Q.jsx)(C.a,{children:Object(Q.jsx)(w.a,{label:Object(Q.jsxs)(Q.Fragment,{children:[Object(Q.jsx)(E.a,{variant:"caption",component:"div",gutterBottom:!0,children:Object(Q.jsxs)(a.a,{t:t,children:["Compilando il form accetto la ",Object(Q.jsx)(R.a,{color:"inherit",onClick:()=>window.open(d.a[n.language.split("-")[0]],"_blank"),children:"Privacy e Policy"})]})}),Object(Q.jsx)(E.a,{variant:"caption",component:"div",gutterBottom:!0,children:Object(Q.jsxs)(a.a,{t:t,children:["Procedendo acconsenti ai nostri ",Object(Q.jsx)(R.a,{color:"inherit",onClick:()=>window.open(c.a[n.language.split("-")[0]],"_blank"),sx:{cursor:"pointer"},children:"T&Cs"}),"."]})}),Object(Q.jsx)(E.a,{variant:"caption",component:"div",children:t("Sono consapevole che gli abbonamenti sono soggetti a rinnovo automatico a prezzo pieno")})]}),checked:W.flag_updates,onChange:e=>G({...W,flag_updates:!W.flag_updates}),sx:{"& .checked":{backgroundColor:"#fff",border:"1px solid #B3B8BD","&:before":{backgroundColor:"#41474E"}},"& .unchecked":{backgroundColor:"#fff",border:"1px solid #B3B8BD"}}})}),V&&Object(Q.jsx)(C.a,{sx:{mt:1},children:Object(Q.jsx)(E.a,{color:"primary",variant:"caption",children:t("Per iscriversi \xe8 necessario accettare i termini e condizioni")})}),Object(Q.jsx)(C.a,{mt:2,children:Object(Q.jsx)(k.a,{disabled:!Boolean(W.email)||!W.flag_updates||!new RegExp(f.password_policy).test(W.password),fullWidth:!0,size:"large",type:"submit",color:"primary",loading:L,children:t("Registrati")})}),Object(Q.jsx)(C.a,{my:2,textAlign:"center",children:Object(Q.jsx)(k.c,{fullWidth:!0,size:"large",variant:"contained",color:"dark",disabled:L,setLoading:N,provider:"google",...W.flag_updates||Y.has("id_token")?{socialCallBack:e=>{(async(e,t)=>{const n=j.source();let i={provider:e,token:t};const r=Z.referrals||null,s=sessionStorage.getItem("x-cic-referral-code"),a=sessionStorage.getItem("x-cic-campaign");s&&(i.referrals={friend_invite:s}),a&&(i.referrals={campaign_id:a}),r&&(i.referrals={...i.referrals,...r},$("referrals",{path:"/"}));
2const l=await y("post","/v2/login",n.token,i);l?("fb"===e&&Object(o.a)("signup_facebook"),"ggl"===e&&Object(o.a)("signup_google"),"app"===e&&Object(o.a)("signup_apple"),m({token:l.token.token,data:{profile_status:l.profile_status}})):N(!1)})("ggl",e)}}:{onClick:()=>{H(!0)}},startIcon:Object(Q.jsx)(M.c,{}),children:t("Accedi con Google")})}),Object(Q.jsxs)(C.a,{mt:4,textAlign:"center",children:[Object(Q.jsx)(E.a,{color:"dark.main",variant:"body2",children:t("Hai gi\xe0 un account?")}),Object(Q.jsx)(E.a,{children:Object(Q.jsx)(R.a,{component:v.b,color:"dark.main",to:{pathname:"/"+n.language+"/auth/login"+(u?"/"+u+"/"+(h||""):""),search:i.search,state:{...i.state}},underline:"hover",children:Object(Q.jsx)("b",{children:t("Accedi")})})})]})]})]})})})},te=(Object(f.a)((e=>({social:{margin:e.spacing(1)}}))),e=>{const{setTab:t}=e,{t:n}=Object(s.a)(),{auth:i}=r.a.useContext(_.a),{request:a,cancelToken:o}=r.a.useContext(T.a),{toggleAuthDialog:l}=r.a.useContext(S.a),[c,d]=r.a.useState(!1),[u,h]=r.a.useState(""),p=sessionStorage.getItem("checkout-purchase-id");return Object(Q.jsxs)(C.a,{px:4,pb:4,children:[Object(Q.jsx)(O.a,{container:!0,children:Object(Q.jsx)(O.a,{item:!0,xs:!0,children:Object(Q.jsxs)(C.a,{mb:2,children:[Object(Q.jsx)(E.a,{variant:"subtitle1",children:"1/3"}),Object(Q.jsx)(E.a,{variant:"h4",children:Object(Q.jsx)("b",{children:n("Inserisci il numero della tua tessera Volare")})}),Object(Q.jsx)(E.a,{variant:"h6",children:n("Guadagna 10 punti per ogni \u20ac speso")})]})})}),Object(Q.jsx)(C.a,{sx:{py:3,textAlign:"center"},children:Object(Q.jsx)(A.b,{sx:{width:343},label:n("N\xb0Tessera Volare"),value:u,onChange:e=>h(e.target.value)})}),Object(Q.jsx)(O.a,{container:!0,children:Object(Q.jsxs)(O.a,{item:!0,xs:!0,children:[Object(Q.jsx)(C.a,{mt:4,textAlign:"center",children:Object(Q.jsx)(k.a,{fullWidth:m.isMobileOnly,color:"primary",onClick:e=>(async e=>{d(!0),e.preventDefault();const n=o.source();await a("post","/v2/purchases/"+p+"/referral/volare",n.token,{referral_code:u})&&(localStorage.setItem("saved-volare-card",1),sessionStorage.removeItem("checkout-purchase-id"),i.user.data.profile_status.completed?l(!1):t(i.user.data.profile_status.next_step)),d(!1)})(e),sx:{mb:2,fontSize:"1.2rem",px:{sm:15}},loading:c,children:n("Conferma dati")})}),Object(Q.jsx)(C.a,{textAlign:"center",children:Object(Q.jsx)(E.a,{color:"textSecondary",onClick:()=>l(!1),children:n("Non adesso")})})]})})]})}),ne=()=>{const{auth:e}=r.a.useContext(_.a),t=sessionStorage.getItem("checkout-purchase-id"),[n,i]=r.a.useState(Boolean(t)?"volare-card":e.user.data.profile_status.next_step);return Object(Q.jsxs)(C.a,{children:[Object(Q.jsx)(u.a,{value:n,index:"volare-card",children:Object(Q.jsx)(te,{setTab:i})}),Object(Q.jsx)(u.a,{value:n,index:"user-interests",children:Object(Q.jsx)($,{setTab:i})}),Object(Q.jsx)(u.a,{value:n,index:"user-profile",children:Object(Q.jsx)(K,{setTab:i})})]})}},232:function(e,t,n){"use strict";var i=n(0),r=n.n(i),s=n(79),a=n(188),o=n(198),l=n(708),c=n(280),d=n.n(c),u=n(705),h=n(720),p=n(111),g=n(685),m=n(278),f=n.n(m),y=n(279),b=n.n(y),v=n(1);const _={current:null},T={current:null},x=Object(g.a)((e=>({icon:{color:e.palette.text.secondary,marginRight:e.spacing(2)}})));t.a=e=>{const{i18n:t}=Object(s.a)(),[n,i]=(x(),r.a.useState(null)),[c,g]=r.a.useState(""),[m,y]=r.a.useState([]),S=r.a.useRef(!1);"undefined"===typeof window||S.current||(document.querySelector("#google-maps")||Object(a.g)("https://maps.googleapis.com/maps/api/js?key=AIzaSyBu2G_lY5DD9AxeU70GbKkmS6DAFtnq0ws&libraries=places",document.querySelector("head"),"google-maps"),S.current=!0);const A=r.a.useMemo((()=>b()(((e,n)=>{_.current.getPlacePredictions({...e,types:["(cities)"],componentRestrictions:{country:t.language}},n)}),200)),[]),w=r.a.useMemo((()=>b()((t=>{T.current.getDetails({placeId:t},(t=>{e.handleAddressSelect(t,e.formParams)}))}),200)),[e.formParams]);return r.a.useEffect((()=>{let e=!0;if(!_.current&&window.google&&window.google.maps&&(_.current=new window.google.maps.places.AutocompleteService,T.current=new window.google.maps.places.PlacesService(document.createElement("div"))),_.current){if(""!==c)return A({input:c},(t=>
2{if(e){let e=[];n&&(e=[n]),t&&(e=[...e,...t]),y(e)}})),()=>{e=!1};y(n?[n]:[])}}),[n,c,A]),r.a.useEffect((()=>{e.initialValue&&(y([{description:e.initialValue}]),i({description:e.initialValue}))}),[e.initialValue]),Object(v.jsx)(l.a,{id:"google-autocomplete",getOptionLabel:e=>"string"===typeof e?e:e.description,filterOptions:e=>e,options:m,autoComplete:!0,includeInputInList:!0,filterSelectedOptions:!0,disableClearable:!0,value:n,onChange:(e,t)=>{t&&w(t.place_id),y(t?[t,...m]:m),i(t)},onInputChange:(e,t)=>{g(t)},renderInput:Boolean(e.renderInput)?e.renderInput:t=>Object(v.jsx)(o.b,{...t,label:e.label,fullWidth:!0}),renderOption:(e,t)=>{if(Boolean(t.structured_formatting)){const n=t.structured_formatting.main_text_matched_substrings,i=f()(t.structured_formatting.main_text,n.map((e=>[e.offset,e.offset+e.length])));return Object(v.jsx)("li",{...e,children:Object(v.jsxs)(u.a,{container:!0,alignItems:"center",children:[Object(v.jsx)(u.a,{item:!0,children:Object(v.jsx)(p.a,{component:d.a,sx:{color:"text.secondary",mr:2}})}),Object(v.jsxs)(u.a,{item:!0,xs:!0,children:[i.map(((e,t)=>Object(v.jsx)(h.a,{component:"span",variant:"body1",sx:{fontWeight:e.highlight?700:400,color:"#000"},children:e.text},t))),Object(v.jsx)(h.a,{variant:"body2",color:"textSecondary",children:t.structured_formatting.secondary_text})]})]})})}return Object(v.jsx)("li",{...e,children:Object(v.jsxs)(u.a,{container:!0,alignItems:"center",children:[Object(v.jsx)(u.a,{item:!0,children:Object(v.jsx)(p.a,{component:d.a,sx:{color:"text.secondary",mr:2}})}),Object(v.jsx)(u.a,{item:!0,xs:!0,children:Object(v.jsx)(h.a,{component:"span",variant:"body1",sx:{fontWeight:700,color:"#000"},children:t.description})})]})})}})}},236:function(e,t,n){"use strict";var i=n(0),r=n.n(i),s=n(188);t.a=e=>{const{img:t}=e,n=r.a.useRef(),[i,a]=r.a.useState(0),[o,l]=r.a.useState();return r.a.useEffect((()=>{if(!n.current)return;const e=n.current,t=()=>{a(e.clientWidth||0)};t();const i=new ResizeObserver((()=>{t()}));return i.observe(e),()=>i.disconnect()}),[]),r.a.useEffect((()=>{if(t&&n.current){let e=i||n.current.clientWidth;e=e>200?e:200,l("\n image-set(\n ".concat(["url(".concat(Object(s.m)(t,e),") 1x"),"url(".concat(Object(s.m)(t,Math.round(1.5*e)),") 1.5x"),"url(".concat(Object(s.m)(t,Math.round(2*e)),") 2x")].join(", "),"\n )"))}}),[t,i]),{imageSet:o,ref:n}}},237:function(e,t,n){(function(t){var i,r="undefined"!==typeof t?t:"undefined"!==typeof window?window:{},s=n(291);"undefined"!==typeof document?i=document:(i=r["__GLOBAL_DOCUMENT_CACHE@4"])||(i=r["__GLOBAL_DOCUMENT_CACHE@4"]=s),e.exports=i}).call(this,n(112))},243:function(e,t,n){"use strict";t.a=n.p+"static/media/icona-play.74a9d070.png"},244:function(e,t,n){"use strict";var i=n(0),r=n.n(i);var s=(e,t)=>{const[n,i]=r.a.useState(!1);return r.a.useEffect((()=>{const n=new IntersectionObserver(((e,t)=>{e[0].isIntersecting&&(i(!0),t.unobserve(e[0].target),t.disconnect())}),t);return e.current&&n.observe(e.current),()=>n.disconnect()}),[e]),n},a=n(111),o=n(333),l=n(221),c=n(1);const d=e=>{const{smallerImage:t,cols:n,width:i,sx:r,sliderProps:s}=e;return Object(c.jsx)(l.a,{...s,children:Array.from({length:n},((e,s)=>Object(c.jsx)(a.a,{sx:{borderRadius:"10px",overflow:"hidden",width:i||100/n+"%",minWidth:i||346},children:Object(c.jsx)(o.a,{variant:"rect",sx:{height:{xs:t?160:220,lg:n&&2===n?300:t?160:220},...r}})},s)))})};t.a=e=>{const{children:t,loadingProps:n,loadContent:o,LoadingComponent:l}=e,u=Object(i.useRef)(null),h=s(u),[p,g]=r.a.useState(!!o);return r.a.useEffect((()=>{h&&o&&(g(!0),o().then((()=>{setTimeout((()=>{g(!1)}),100)})))}),[h]),Object(c.jsx)(a.a,{ref:u,children:h&&!p?Object(c.jsx)(c.Fragment,{children:t}):Object(c.jsx)(c.Fragment,{children:l?Object(c.jsx)(l,{}):Object(c.jsx)(d,{...n})})})}},247:function(e,t,n){"use strict";var i=n(189);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(190)),s=n(1),a=(0,r.default)((0,s.jsx)("path",{d:"M17 3H7c-1.1 0-1.99.9-1.99 2L5 21l7-3 7 3V5c0-1.1-.9-2-2-2z"}),"Bookmark");t.default=a},248:function(e,t,n){"use strict";var i=n(189);
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(190)),s=n(1),a=(0,r.default)((0,s.jsx)("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check");t.default=a},249:function(e,t,n){"use strict";var i=n(189);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(190)),s=n(1),a=(0,r.default)((0,s.jsx)("path",{d:"M17 3H7c-1.1 0-1.99.9-1.99 2L5 21l7-3 7 3V5c0-1.1-.9-2-2-2zm0 15-5-2.18L7 18V5h10v13z"}),"BookmarkBorder");t.default=a},251:function(e,t,n){"use strict";(function(e){var i=n(303),r=n(304),s=n(305);function a(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return l.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=l.prototype:(null===e&&(e=new l(t)),e.length=t),e}function l(e,t,n){if(!l.TYPED_ARRAY_SUPPORT&&!(this instanceof l))return new l(e,t,n);if("number"===typeof e){if("string"===typeof t)throw new Error("If encoding is specified then the first argument must be a string");return u(this,e)}return c(this,e,t,n)}function c(e,t,n,i){if("number"===typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!==typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,i){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(i||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===i?new Uint8Array(t):void 0===i?new Uint8Array(t,n):new Uint8Array(t,n,i);l.TYPED_ARRAY_SUPPORT?(e=t).__proto__=l.prototype:e=h(e,t);return e}(e,t,n,i):"string"===typeof t?function(e,t,n){"string"===typeof n&&""!==n||(n="utf8");if(!l.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var i=0|g(t,n);e=o(e,i);var r=e.write(t,n);r!==i&&(e=e.slice(0,r));return e}(e,t,n):function(e,t){if(l.isBuffer(t)){var n=0|p(t.length);return 0===(e=o(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!==typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!==typeof t.length||(i=t.length)!==i?o(e,0):h(e,t);if("Buffer"===t.type&&s(t.data))return h(e,t.data)}var i;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function d(e){if("number"!==typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function u(e,t){if(d(t),e=o(e,t<0?0:0|p(t)),!l.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function h(e,t){var n=t.length<0?0:0|p(t.length);e=o(e,n);for(var i=0;i<n;i+=1)e[i]=255&t[i];return e}function p(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function g(e,t){if(l.isBuffer(e))return e.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!==typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(e).length;default:if(i)return q(e).length;t=(""+t).toLowerCase(),i=!0}}function m(e,t,n){var i=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return E(this,t,n);case"utf8":case"utf-8":return j(this,t,n);case"ascii":return C(this,t,n);case"latin1":case"binary":return O(this,t,n);case"base64":return w(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,n);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function f(e,t,n){var i=e[t];e[t]=e[n],e[n]=i}function y(e,t,n,i,r){if(0===e.length)return-1;if("string"===typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=r?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(r)return-1;n=e.length-1}else if(n<0){if(!r)return-1;n=0}
vendor: 7,070 bytes, line 2
2if("string"===typeof t&&(t=l.from(t,i)),l.isBuffer(t))return 0===t.length?-1:b(e,t,n,i,r);if("number"===typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):b(e,[t],n,i,r);throw new TypeError("val must be string, number or Buffer")}function b(e,t,n,i,r){var s,a=1,o=e.length,l=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return-1;a=2,o/=2,l/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(r){var d=-1;for(s=n;s<o;s++)if(c(e,s)===c(t,-1===d?0:s-d)){if(-1===d&&(d=s),s-d+1===l)return d*a}else-1!==d&&(s-=s-d),d=-1}else for(n+l>o&&(n=o-l),s=n;s>=0;s--){for(var u=!0,h=0;h<l;h++)if(c(e,s+h)!==c(t,h)){u=!1;break}if(u)return s}return-1}function v(e,t,n,i){n=Number(n)||0;var r=e.length-n;i?(i=Number(i))>r&&(i=r):i=r;var s=t.length;if(s%2!==0)throw new TypeError("Invalid hex string");i>s/2&&(i=s/2);for(var a=0;a<i;++a){var o=parseInt(t.substr(2*a,2),16);if(isNaN(o))return a;e[n+a]=o}return a}function _(e,t,n,i){return V(q(t,e.length-n),e,n,i)}function T(e,t,n,i){return V(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,i)}function x(e,t,n,i){return T(e,t,n,i)}function S(e,t,n,i){return V(z(t),e,n,i)}function A(e,t,n,i){return V(function(e,t){for(var n,i,r,s=[],a=0;a<e.length&&!((t-=2)<0);++a)i=(n=e.charCodeAt(a))>>8,r=n%256,s.push(r),s.push(i);return s}(t,e.length-n),e,n,i)}function w(e,t,n){return 0===t&&n===e.length?i.fromByteArray(e):i.fromByteArray(e.slice(t,n))}function j(e,t,n){n=Math.min(e.length,n);for(var i=[],r=t;r<n;){var s,a,o,l,c=e[r],d=null,u=c>239?4:c>223?3:c>191?2:1;if(r+u<=n)switch(u){case 1:c<128&&(d=c);break;case 2:128===(192&(s=e[r+1]))&&(l=(31&c)<<6|63&s)>127&&(d=l);break;case 3:s=e[r+1],a=e[r+2],128===(192&s)&&128===(192&a)&&(l=(15&c)<<12|(63&s)<<6|63&a)>2047&&(l<55296||l>57343)&&(d=l);break;case 4:s=e[r+1],a=e[r+2],o=e[r+3],128===(192&s)&&128===(192&a)&&128===(192&o)&&(l=(15&c)<<18|(63&s)<<12|(63&a)<<6|63&o)>65535&&l<1114112&&(d=l)}null===d?(d=65533,u=1):d>65535&&(d-=65536,i.push(d>>>10&1023|55296),d=56320|1023&d),i.push(d),r+=u}return function(e){var t=e.length;if(t<=k)return String.fromCharCode.apply(String,e);var n="",i=0;for(;i<t;)n+=String.fromCharCode.apply(String,e.slice(i,i+=k));return n}(i)}t.Buffer=l,t.SlowBuffer=function(e){+e!=e&&(e=0);return l.alloc(+e)},t.INSPECT_MAX_BYTES=50,l.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"===typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(t){return!1}}(),t.kMaxLength=a(),l.poolSize=8192,l._augment=function(e){return e.__proto__=l.prototype,e},l.from=function(e,t,n){return c(null,e,t,n)},l.TYPED_ARRAY_SUPPORT&&(l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,"undefined"!==typeof Symbol&&Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0})),l.alloc=function(e,t,n){return function(e,t,n,i){return d(t),t<=0?o(e,t):void 0!==n?"string"===typeof i?o(e,t).fill(n,i):o(e,t).fill(n):o(e,t)}(null,e,t,n)},l.allocUnsafe=function(e){return u(null,e)},l.allocUnsafeSlow=function(e){return u(null,e)},l.isBuffer=function(e){return!(null==e||!e._isBuffer)},l.compare=function(e,t){if(!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,i=t.length,r=0,s=Math.min(n,i);r<s;++r)if(e[r]!==t[r]){n=e[r],i=t[r];break}return n<i?-1:i<n?1:0},l.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(e,t){if(!s(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return l.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var i=l.allocUnsafe(t),r=0;for(n=0;n<e.length;++n){var a=e[n];if(!l.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(i,r),r+=a.length}return i},l.byteLength=g,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)f(this,t,t+1);return this},l.prototype.swap32=function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)f(this,t,t+3),f(this,t+1,t+2);return this},l.prototype.swap64=function(){var e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)f(this,t,t+7),f(this,t+1,t+6),f(this,t+2,t+5),f(this,t+3,t+4);return this},l.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?j(this,0,e):m.apply(this,arguments)},l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===l.compare(this,e)},l.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},l.prototype.compare=function(e,t,n,i,r){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===i&&(i=0),void 0===r&&(r=this.length),t<0||n>e.length||i<0||r>this.length)throw new RangeError("out of range index");if(i>=r&&t>=n)return 0;if(i>=r)return-1;if(t>=n)return 1;if(this===e)return 0;for(var s=(r>>>=0)-(i>>>=0),a=(n>>>=0)-(t>>>=0),o=Math.min(s,a),c=this.slice(i,r),d=e.slice(t,n),u=0;u<o;++u)if(c[u]!==d[u]){s=c[u],a=d[u];break}return s<a?-1:a<s?1:0},l.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},l.prototype.indexOf=function(e,t,n){return y(this,e,t,n,!0)},l.prototype.lastIndexOf=function(e,t,n){return y(this,e,t,n,!1)},l.prototype.write=function(e,t,n,i){if(void 0===t)i="utf8",n=this.length,t=0;else if(void 0===n&&"string"===typeof t)i=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===i&&(i="utf8")):(i=n,n=void 0)}var r=this.length-t;if((void 0===n||n>r)&&(n=r),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var s=!1;;)switch(i){case"hex":return v(this,e,t,n);case"utf8":case"utf-8":return _(this,e,t,n);case"ascii":return T(this,e,t,n);case"latin1":case"binary":return x(this,e,t,n);case"base64":return S(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,n);default:if(s)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),s=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var k=4096;
vendor: 8,139 bytes, line 2
2function C(e,t,n){var i="";n=Math.min(e.length,n);for(var r=t;r<n;++r)i+=String.fromCharCode(127&e[r]);return i}function O(e,t,n){var i="";n=Math.min(e.length,n);for(var r=t;r<n;++r)i+=String.fromCharCode(e[r]);return i}function E(e,t,n){var i=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>i)&&(n=i);for(var r="",s=t;s<n;++s)r+=F(e[s]);return r}function I(e,t,n){for(var i=e.slice(t,n),r="",s=0;s<i.length;s+=2)r+=String.fromCharCode(i[s]+256*i[s+1]);return r}function P(e,t,n){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,n,i,r,s){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>r||t<s)throw new RangeError('"value" argument is out of bounds');if(n+i>e.length)throw new RangeError("Index out of range")}function D(e,t,n,i){t<0&&(t=65535+t+1);for(var r=0,s=Math.min(e.length-n,2);r<s;++r)e[n+r]=(t&255<<8*(i?r:1-r))>>>8*(i?r:1-r)}function L(e,t,n,i){t<0&&(t=4294967295+t+1);for(var r=0,s=Math.min(e.length-n,4);r<s;++r)e[n+r]=t>>>8*(i?r:3-r)&255}function M(e,t,n,i,r,s){if(n+i>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function N(e,t,n,i,s){return s||M(e,0,n,4),r.write(e,t,n,i,23,4),n+4}function B(e,t,n,i,s){return s||M(e,0,n,8),r.write(e,t,n,i,52,8),n+8}l.prototype.slice=function(e,t){var n,i=this.length;if((e=~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),(t=void 0===t?i:~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),t<e&&(t=e),l.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=l.prototype;else{var r=t-e;n=new l(r,void 0);for(var s=0;s<r;++s)n[s]=this[s+e]}return n},l.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var i=this[e],r=1,s=0;++s<t&&(r*=256);)i+=this[e+s]*r;return i},l.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var i=this[e+--t],r=1;t>0&&(r*=256);)i+=this[e+--t]*r;return i},l.prototype.readUInt8=function(e,t){return t||P(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||P(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||P(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var i=this[e],r=1,s=0;++s<t&&(r*=256);)i+=this[e+s]*r;return i>=(r*=128)&&(i-=Math.pow(2,8*t)),i},l.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var i=t,r=1,s=this[e+--i];i>0&&(r*=256);)s+=this[e+--i]*r;return s>=(r*=128)&&(s-=Math.pow(2,8*t)),s},l.prototype.readInt8=function(e,t){return t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){t||P(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(e,t){t||P(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(e,t){return t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return t||P(e,4,this.length),r.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||P(e,4,this.length),r.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||P(e,8,this.length),r.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||P(e,8,this.length),r.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,n,i){(e=+e,t|=0,n|=0,i)||R(this,e,t,n,Math.pow(2,8*n)-1,0);var r=1,s=0;for(this[t]=255&e;++s<n&&(r*=256);)this[t+s]=e/r&255;return t+n},l.prototype.writeUIntBE=function(e,t,n,i){(e=+e,t|=0,n|=0,i)||R(this,e,t,n,Math.pow(2,8*n)-1,0);var r=n-1,s=1;for(this[t+r]=255&e;--r>=0&&(s*=256);)this[t+r]=e/s&255;return t+n},l.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):D(this,e,t,!0),t+2},l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):D(this,e,t,!1),t+2},l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):L(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},l.prototype.writeIntLE=function(e,t,n,i){if(e=+e,t|=0,!i){var r=Math.pow(2,8*n-1);R(this,e,t,n,r-1,-r)}var s=0,a=1,o=0;for(this[t]=255&e;++s<n&&(a*=256);)e<0&&0===o&&0!==this[t+s-1]&&(o=1),this[t+s]=(e/a|0)-o&255;return t+n},l.prototype.writeIntBE=function(e,t,n,i){if(e=+e,t|=0,!i){var r=Math.pow(2,8*n-1);R(this,e,t,n,r-1,-r)}var s=n-1,a=1,o=0;for(this[t+s]=255&e;--s>=0&&(a*=256);)e<0&&0===o&&0!==this[t+s+1]&&(o=1),this[t+s]=(e/a|0)-o&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):D(this,e,t,!0),t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):D(this,e,t,!1),t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):L(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,n){return N(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return N(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return B(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return B(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,i){if(n||(n=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<n&&(i=n),i===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t<i-n&&(i=e.length-t+n);var r,s=i-n;if(this===e&&n<t&&t<i)for(r=s-1;r>=0;--r)e[r+t]=this[r+n];else if(s<1e3||!l.TYPED_ARRAY_SUPPORT)for(r=0;r<s;++r)e[r+t]=this[r+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+s),t);return s},l.prototype.fill=function(e,t,n,i){if("string"===typeof e){if("string"===typeof t?(i=t,t=0,n=this.length):"string"===typeof n&&(i=n,n=this.length),1===e.length){var r=e.charCodeAt(0);r<256&&(e=r)}if(void 0!==i&&"string"!==typeof i)throw new TypeError("encoding must be a string");if("string"===typeof i&&!l.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else"number"===typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var s;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"===typeof e)for(s=t;s<n;++s)this[s]=e;else{var a=l.isBuffer(e)?e:q(new l(e,i).toString()),o=a.length;for(s=0;s<n-t;++s)this[s+t]=a[s%o]}return this};var U=/[^+\/0-9A-Za-z-_]/g;function F(e){return e<16?"0"+e.toString(16):e.toString(16)}function q(e,t){var n;t=t||1/0;for(var i=e.length,r=null,s=[],a=0;a<i;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!r){if(n>56319){(t-=3)>
vendor: 4,185 bytes, line 2
2-1&&s.push(239,191,189);continue}if(a+1===i){(t-=3)>-1&&s.push(239,191,189);continue}r=n;continue}if(n<56320){(t-=3)>-1&&s.push(239,191,189),r=n;continue}n=65536+(r-55296<<10|n-56320)}else r&&(t-=3)>-1&&s.push(239,191,189);if(r=null,n<128){if((t-=1)<0)break;s.push(n)}else if(n<2048){if((t-=2)<0)break;s.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;s.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return s}function z(e){return i.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(U,"")).length<2)return"";for(;e.length%4!==0;)e+="=";return e}(e))}function V(e,t,n,i){for(var r=0;r<i&&!(r+n>=t.length||r>=e.length);++r)t[r+n]=e[r];return r}}).call(this,n(112))},252:function(e,t,n){var i=n(210),r=i.find,s=i.NAMESPACE;function a(e){return""!==e}function o(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function l(e){if(!e)return[];var t=function(e){return e?e.split(/[\t\n\f\r ]+/).filter(a):[]}(e);return Object.keys(t.reduce(o,{}))}function c(e,t){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}function d(e,t){var n=e.prototype;if(!(n instanceof t)){function i(){}i.prototype=t.prototype,c(n,i=new i),e.prototype=n=i}n.constructor!=e&&("function"!=typeof e&&console.error("unknown Class:"+e),n.constructor=e)}var u={},h=u.ELEMENT_NODE=1,p=u.ATTRIBUTE_NODE=2,g=u.TEXT_NODE=3,m=u.CDATA_SECTION_NODE=4,f=u.ENTITY_REFERENCE_NODE=5,y=u.ENTITY_NODE=6,b=u.PROCESSING_INSTRUCTION_NODE=7,v=u.COMMENT_NODE=8,_=u.DOCUMENT_NODE=9,T=u.DOCUMENT_TYPE_NODE=10,x=u.DOCUMENT_FRAGMENT_NODE=11,S=u.NOTATION_NODE=12,A={},w={},j=(A.INDEX_SIZE_ERR=(w[1]="Index size error",1),A.DOMSTRING_SIZE_ERR=(w[2]="DOMString size error",2),A.HIERARCHY_REQUEST_ERR=(w[3]="Hierarchy request error",3)),k=(A.WRONG_DOCUMENT_ERR=(w[4]="Wrong document",4),A.INVALID_CHARACTER_ERR=(w[5]="Invalid character",5),A.NO_DATA_ALLOWED_ERR=(w[6]="No data allowed",6),A.NO_MODIFICATION_ALLOWED_ERR=(w[7]="No modification allowed",7),A.NOT_FOUND_ERR=(w[8]="Not found",8)),C=(A.NOT_SUPPORTED_ERR=(w[9]="Not supported",9),A.INUSE_ATTRIBUTE_ERR=(w[10]="Attribute in use",10));A.INVALID_STATE_ERR=(w[11]="Invalid state",11),A.SYNTAX_ERR=(w[12]="Syntax error",12),A.INVALID_MODIFICATION_ERR=(w[13]="Invalid modification",13),A.NAMESPACE_ERR=(w[14]="Invalid namespace",14),A.INVALID_ACCESS_ERR=(w[15]="Invalid access",15);function O(e,t){if(t instanceof Error)var n=t;else n=this,Error.call(this,w[e]),this.message=w[e],Error.captureStackTrace&&Error.captureStackTrace(this,O);return n.code=e,t&&(this.message=this.message+": "+t),n}function E(){}function I(e,t){this._node=e,this._refresh=t,P(this)}function P(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!==t){var n=e._refresh(e._node);if(ve(e,"length",n.length),!e.$$length||n.length<e.$$length)for(var i=n.length;i in e;i++)Object.prototype.hasOwnProperty.call(e,i)&&delete e[i];c(n,e),e._inc=t}}function R(){}function D(e,t){for(var n=e.length;n--;)if(e[n]===t)return n}function L(e,t,n,i){if(i?t[D(t,i)]=n:t[t.length++]=n,e){n.ownerElement=e;var r=e.ownerDocument;r&&(i&&z(r,e,i),function(e,t,n){e&&e._inc++;var i=n.namespaceURI;i===s.XMLNS&&(t._nsMap[n.prefix?n.localName:""]=n.value)}(r,e,n))}}function M(e,t,n){var i=D(t,n);if(!(i>=0))throw new O(k,new Error(e.tagName+"@"+n));for(var r=t.length-1;i<r;)t[i]=t[++i];if(t.length=r,e){var s=e.ownerDocument;s&&(z(s,e,n),n.ownerElement=null)}}function N(){}function B(){}function U(e){return("<"==e?"<":">"==e&&">")||"&"==e&&"&"||'"'==e&&"""||"&#"+e.charCodeAt()+";"}function F(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(F(e,t))return!0}while(e=e.nextSibling)}function q(){this.ownerDocument=this}function z(e,t,n,i){e&&e._inc++,n.namespaceURI===s.XMLNS&&delete t._nsMap[n.prefix?n.localName:""]}function V(e,t,n){if(e&&e._inc){e._inc++;var i=t.childNodes;if(n)i[i.length++]=n;else{for(var r=t.firstChild,s=0;r;)i[s++]=r,r=r.nextSibling;i.length=s,delete i[i.length]}}}function H(e,t){var n=t.previousSibling,i=t.nextSibling;return n?n.nextSibling=i:e.firstChild=i,i?i.previousSibling=n:e.last
vendor: 1,119 bytes, line 2
2Child=n,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,V(e.ownerDocument,e),t}function W(e){return e&&e.nodeType===B.DOCUMENT_TYPE_NODE}function G(e){return e&&e.nodeType===B.ELEMENT_NODE}function X(e){return e&&e.nodeType===B.TEXT_NODE}function Y(e,t){var n=e.childNodes||[];if(r(n,G)||W(t))return!1;var i=r(n,W);return!(t&&i&&n.indexOf(i)>n.indexOf(t))}function Q(e,t){var n=e.childNodes||[];if(r(n,(function(e){return G(e)&&e!==t})))return!1;var i=r(n,W);return!(t&&i&&n.indexOf(i)>n.indexOf(t))}function K(e,t,n){if(!function(e){return e&&(e.nodeType===B.DOCUMENT_NODE||e.nodeType===B.DOCUMENT_FRAGMENT_NODE||e.nodeType===B.ELEMENT_NODE)}(e))throw new O(j,"Unexpected parent node type "+e.nodeType);if(n&&n.parentNode!==e)throw new O(k,"child not in parent");if(!function(e){return e&&(G(e)||X(e)||W(e)||e.nodeType===B.DOCUMENT_FRAGMENT_NODE||e.nodeType===B.COMMENT_NODE||e.nodeType===B.PROCESSING_INSTRUCTION_NODE)}(t)||W(t)&&e.nodeType!==B.DOCUMENT_NODE)throw new O(j,"Unexpected node type "+t.nodeType+" for parent node type "+e.nodeType)}function Z(e,t,n){var i=e.childNodes||[],s=t.childNodes||[];
vendor: 6,286 bytes, line 2
2if(t.nodeType===B.DOCUMENT_FRAGMENT_NODE){var a=s.filter(G);if(a.length>1||r(s,X))throw new O(j,"More than one element or text in fragment");if(1===a.length&&!Y(e,n))throw new O(j,"Element in fragment can not be inserted before doctype")}if(G(t)&&!Y(e,n))throw new O(j,"Only one element can be added and only after doctype");if(W(t)){if(r(i,W))throw new O(j,"Only one doctype is allowed");var o=r(i,G);if(n&&i.indexOf(o)<i.indexOf(n))throw new O(j,"Doctype can only be inserted before an element");if(!n&&o)throw new O(j,"Doctype can not be appended since element is present")}}function J(e,t,n){var i=e.childNodes||[],s=t.childNodes||[];if(t.nodeType===B.DOCUMENT_FRAGMENT_NODE){var a=s.filter(G);if(a.length>1||r(s,X))throw new O(j,"More than one element or text in fragment");if(1===a.length&&!Q(e,n))throw new O(j,"Element in fragment can not be inserted before doctype")}if(G(t)&&!Q(e,n))throw new O(j,"Only one element can be added and only after doctype");if(W(t)){if(r(i,(function(e){return W(e)&&e!==n})))throw new O(j,"Only one doctype is allowed");var o=r(i,G);if(n&&i.indexOf(o)<i.indexOf(n))throw new O(j,"Doctype can only be inserted before an element")}}function $(e,t,n,i){K(e,t,n),e.nodeType===B.DOCUMENT_NODE&&(i||Z)(e,t,n);var r=t.parentNode;if(r&&r.removeChild(t),t.nodeType===x){var s=t.firstChild;if(null==s)return t;var a=t.lastChild}else s=a=t;var o=n?n.previousSibling:e.lastChild;s.previousSibling=o,a.nextSibling=n,o?o.nextSibling=s:e.firstChild=s,null==n?e.lastChild=a:n.previousSibling=a;do{s.parentNode=e}while(s!==a&&(s=s.nextSibling));return V(e.ownerDocument||e,e),t.nodeType==x&&(t.firstChild=t.lastChild=null),t}function ee(){this._nsMap={}}function te(){}function ne(){}function ie(){}function re(){}function se(){}function ae(){}function oe(){}function le(){}function ce(){}function de(){}function ue(){}function he(){}function pe(e,t){var n=[],i=9==this.nodeType&&this.documentElement||this,r=i.prefix,s=i.namespaceURI;if(s&&null==r&&null==(r=i.lookupPrefix(s)))var a=[{namespace:s,prefix:null}];return fe(this,n,e,t,a),n.join("")}function ge(e,t,n){var i=e.prefix||"",r=e.namespaceURI;if(!r)return!1;if("xml"===i&&r===s.XML||r===s.XMLNS)return!1;for(var a=n.length;a--;){var o=n[a];if(o.prefix===i)return o.namespace!==r}return!0}function me(e,t,n){e.push(" ",t,'="',n.replace(/[<>&"\t\n\r]/g,U),'"')}function fe(e,t,n,i,r){if(r||(r=[]),i){if(!(e=i(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case h:var a=e.attributes,o=a.length,l=e.firstChild,c=e.tagName,d=c;if(!(n=s.isHTML(e.namespaceURI)||n)&&!e.prefix&&e.namespaceURI){for(var u,y=0;y<a.length;y++)if("xmlns"===a.item(y).name){u=a.item(y).value;break}if(!u)for(var S=r.length-1;S>=0;S--){if(""===(A=r[S]).prefix&&A.namespace===e.namespaceURI){u=A.namespace;break}}if(u!==e.namespaceURI)for(S=r.length-1;S>=0;S--){var A;if((A=r[S]).namespace===e.namespaceURI){A.prefix&&(d=A.prefix+":"+c);break}}}t.push("<",d);for(var w=0;w<o;w++){"xmlns"==(j=a.item(w)).prefix?r.push({prefix:j.localName,namespace:j.value}):"xmlns"==j.nodeName&&r.push({prefix:"",namespace:j.value})}for(w=0;w<o;w++){var j,k,C;if(ge(j=a.item(w),0,r))me(t,(k=j.prefix||"")?"xmlns:"+k:"xmlns",C=j.namespaceURI),r.push({prefix:k,namespace:C});fe(j,t,n,i,r)}if(c===d&&ge(e,0,r))me(t,(k=e.prefix||"")?"xmlns:"+k:"xmlns",C=e.namespaceURI),r.push({prefix:k,namespace:C});if(l||n&&!/^(?:meta|link|img|br|hr|input)$/i.test(c)){if(t.push(">"),n&&/^script$/i.test(c))for(;l;)l.data?t.push(l.data):fe(l,t,n,i,r.slice()),l=l.nextSibling;else for(;l;)fe(l,t,n,i,r.slice()),l=l.nextSibling;t.push("</",d,">")}else t.push("/>");return;case _:case x:for(l=e.firstChild;l;)fe(l,t,n,i,r.slice()),l=l.nextSibling;return;case p:return me(t,e.name,e.value);case g:return t.push(e.data.replace(/[<&>]/g,U));case m:return t.push("<![CDATA[",e.data,"]]>");case v:return t.push("\x3c!--",e.data,"--\x3e");case T:var O=e.publicId,E=e.systemId;if(t.push("<!DOCTYPE ",e.name),O)t.push(" PUBLIC ",O),E&&"."!=E&&t.push(" ",E),t.push(">");else if(E&&"."!=E)t.push(" SYSTEM ",E,">");else{var I=e.internalSubset;I&&t.push(" [",I,"]"),t.push(">")}return;case b:return t.push("<?",e.target," ",e.data,"?>");case f:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function ye(e,t,n){var i;switch(t.nodeType){case h:(i=t.cloneNode(!1)).ownerDocument=e;case x:break;case p:n=!0}if(i||(i=t.cloneNode(!1)),i.ownerDocument=e,i.parentNode=null,n)for(var r=t.firstChild;r;)i.appendChild(ye(e,r,n)),r=r.nextSibling;return i}function be(e,t,n){var i=new t.constructor;for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var s=t[r];"object"!=typeof s&&s!=i[r]&&(i[r]=s)}switch(t.childNodes&&(i.childNodes=new E),i.ownerDocument=e,i.nodeType){case h:var a=t.attributes,o=i.attributes=new R,l=a.length;o._ownerElement=i;for(var c=0;c<l;c++)i.setAttributeNode(be(e,a.item(c),!0));break;case p:n=!0}if(n)for(var d=t.firstChild;d;)i.appendChild(be(e,d,n)),d=d.nextSibling;return i}function ve(e,t,n){e[t]=n}O.prototype=Error.prototype,c(A,O),E.prototype={length:0,item:function(e){return e>=0&&e<this.length?this[e]:null},toString:function(e,t){for(var n=[],i=0;i<this.length;i++)fe(this[i],n,e,t);return n.join("")},filter:function(e){return Array.prototype.filter.call(this,e)},indexOf:function(e){return Array.prototype.indexOf.call(this,e)}},I.prototype.item=function(e){return P(this),this[e]||null},d(I,E),R.prototype={length:0,item:E.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var n=this[t];if(n.nodeName==e)return n}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new O(C);var n=this.getNamedItem(e.nodeName);return L(this._ownerElement,this,e,n),n},setNamedItemNS:function(e){var t,n=e.ownerElement;if(n&&n!=this._ownerElement)throw new O(C);return t=this.getNamedItemNS(e.namespaceURI,e.localName),L(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return M(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var n=this.getNamedItemNS(e,t);return M(this._ownerElement,this,n),n},getNamedItemNS:function(e,t){for(var n=this.length;n--;){var i=this[n];if(i.localName==t&&i.namespaceURI==e)return i}return null}},N.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,n){var i=new q;
vendor: 4,416 bytes, line 2
2if(i.implementation=this,i.childNodes=new E,i.doctype=n||null,n&&i.appendChild(n),t){var r=i.createElementNS(e,t);i.appendChild(r)}return i},createDocumentType:function(e,t,n){var i=new ae;return i.name=e,i.nodeName=e,i.publicId=t||"",i.systemId=n||"",i}},B.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return $(this,e,t)},replaceChild:function(e,t){$(this,e,t,J),t&&this.removeChild(t)},removeChild:function(e){return H(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return be(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==g&&e.nodeType==g?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var n=t._nsMap;if(n)for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&n[i]===e)return i;t=t.nodeType==p?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var n=t._nsMap;if(n&&Object.prototype.hasOwnProperty.call(n,e))return n[e];t=t.nodeType==p?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},c(u,B),c(u,B.prototype),q.prototype={nodeName:"#document",nodeType:_,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==x){for(var n=e.firstChild;n;){var i=n.nextSibling;this.insertBefore(n,t),n=i}return e}return $(this,e,t),e.ownerDocument=this,null===this.documentElement&&e.nodeType===h&&(this.documentElement=e),e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),H(this,e)},replaceChild:function(e,t){$(this,e,t,J),e.ownerDocument=this,t&&this.removeChild(t),G(e)&&(this.documentElement=e)},importNode:function(e,t){return ye(this,e,t)},getElementById:function(e){var t=null;return F(this.documentElement,(function(n){if(n.nodeType==h&&n.getAttribute("id")==e)return t=n,!0})),t},getElementsByClassName:function(e){var t=l(e);return new I(this,(function(n){var i=[];return t.length>0&&F(n.documentElement,(function(r){if(r!==n&&r.nodeType===h){var s=r.getAttribute("class");if(s){var a=e===s;if(!a){var o=l(s);a=t.every((c=o,function(e){return c&&-1!==c.indexOf(e)}))}a&&i.push(r)}}var c})),i}))},createElement:function(e){var t=new ee;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new E,(t.attributes=new R)._ownerElement=t,t},createDocumentFragment:function(){var e=new de;return e.ownerDocument=this,e.childNodes=new E,e},createTextNode:function(e){var t=new ie;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new re;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new se;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var n=new ue;return n.ownerDocument=this,n.tagName=n.nodeName=n.target=e,n.nodeValue=n.data=t,n},createAttribute:function(e){var t=new te;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new ce;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var n=new ee,i=t.split(":"),r=n.attributes=new R;return n.childNodes=new E,n.ownerDocument=this,n.nodeName=t,n.tagName=t,n.namespaceURI=e,2==i.length?(n.prefix=i[0],n.localName=i[1]):n.localName=t,r._ownerElement=n,n},createAttributeNS:function(e,t){var n=new te,i=t.split(":");return n.ownerDocument=this,n.nodeName=t,n.name=t,n.namespaceURI=e,n.specified=!0,2==i.length?(n.prefix=i[0],n.localName=i[1]):n.localName=t,n}},d(q,B),ee.prototype={nodeType:h,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var n=this.ownerDocument.createAttribute(e);n.value=n.nodeValue=""+t,this.setAttributeNode(n)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)}
2,appendChild:function(e){return e.nodeType===x?this.insertBefore(e,null):function(e,t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=e,t.previousSibling=e.lastChild,t.nextSibling=null,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,e.lastChild=t,V(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);n&&this.removeAttributeNode(n)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);return n&&n.value||""},setAttributeNS:function(e,t,n){var i=this.ownerDocument.createAttributeNS(e,t);i.value=i.nodeValue=""+n,this.setAttributeNode(i)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new I(this,(function(t){var n=[];return F(t,(function(i){i===t||i.nodeType!=h||"*"!==e&&i.tagName!=e||n.push(i)})),n}))},getElementsByTagNameNS:function(e,t){return new I(this,(function(n){var i=[];return F(n,(function(r){r===n||r.nodeType!==h||"*"!==e&&r.namespaceURI!==e||"*"!==t&&r.localName!=t||i.push(r)})),i}))}},q.prototype.getElementsByTagName=ee.prototype.getElementsByTagName,q.prototype.getElementsByTagNameNS=ee.prototype.getElementsByTagNameNS,d(ee,B),te.prototype.nodeType=p,d(te,B),ne.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(w[j])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,n){n=this.data.substring(0,e)+n+this.data.substring(e+t),this.nodeValue=this.data=n,this.length=n.length}},d(ne,B),ie.prototype={nodeName:"#text",nodeType:g,splitText:function(e){var t=this.data,n=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var i=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(i,this.nextSibling),i}},d(ie,ne),re.prototype={nodeName:"#comment",nodeType:v},d(re,ne),se.prototype={nodeName:"#cdata-section",nodeType:m},d(se,ne),ae.prototype.nodeType=T,d(ae,B),oe.prototype.nodeType=S,d(oe,B),le.prototype.nodeType=y,d(le,B),ce.prototype.nodeType=f,d(ce,B),de.prototype.nodeName="#document-fragment",de.prototype.nodeType=x,d(de,B),ue.prototype.nodeType=b,d(ue,B),he.prototype.serializeToString=function(e,t,n){return pe.call(e,t,n)},B.prototype.toString=pe;try{if(Object.defineProperty){function _e(e){switch(e.nodeType){case h:case x:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(_e(e)),e=e.nextSibling;return t.join("");default:return e.nodeValue}}Object.defineProperty(I.prototype,"length",{get:function(){return P(this),this.$$length}}),Object.defineProperty(B.prototype,"textContent",{get:function(){return _e(this)},set:function(e){switch(this.nodeType){case h:case x:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),ve=function(e,t,n){e["$$"+t]=n}}}catch(Te){}t.DocumentType=ae,t.DOMException=O,t.DOMImplementation=N,t.Element=ee,t.Node=B,t.NodeList=E,t.XMLSerializer=he},253:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n(197),r=Object(i.k)([73,68,51]),s=function e(t,n){return void 0===n&&(n=0),(t=Object(i.k)(t)).length-n<10||!Object(i.a)(t,r,{offset:n})?n:(n+=function(e,t){void 0===t&&(t=0);var n=(e=Object(i.k)(e))[t+5],r=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&n)>>4?r+20:r+10}(t,n),e(t,n))}},256:function(e,t,n){"use strict";var i=n(0),r=n.n(i),s=n(193),a=(n(195),n(79)),o=n(28),l=n(188),c=n(5),d=n(35),u=n(30),h=n.n(u),p=n(689),g=n.p+"static/media/backward.ad7fa589.svg",m=n(1);const f=e=>{const t=e.vjsComponent.player();return Object(m.jsx)(p.a,{onClick:()=>{var e=t.currentTime()-10;e<0&&(e=0),t.currentTime(e)},sx:{background:"url("+g+") center center no-repeat !important",width:40,height:22}})},y=s.a.getComponent("Component");class b extends y{constructor(e,t){super(e,t),this.mount=this.mount.bind(this),e.ready((()=>{this.mount()})),this.addClass("vjs-control"),this.on("dispose",(()=>{h.a.unmountComponentAtNode(this.el())}))}mount(){h.a.render(Object(m.jsx)(f,{vjsComponent:this}),this.el())}}y.registerComponent("vjsBackward",b);var v=n.p+"static/media/forward.f8b7ed68.svg";const _=e=>{const t=e.vjsComponent.player();return Object(m.jsx)(p.a,{onClick:()=>{var e=t.currentTime()+10;e<0&&(e=0),t.currentTime(e)},sx:{background:"url("+v+") center center no-repeat !important",width:40,height:22}})},T=s.a.getComponent("Component");class x extends T{constructor(e,t){super(e,t),this.mount=this.mount.bind(this),e.ready((()=>{this.mount()})),this.addClass("vjs-control"),this.on("dispose",(()=>{h.a.unmountComponentAtNode(this.el())}))}mount(){h.a.render(Object(m.jsx)(_,{vjsComponent:this}),this.el())}}T.registerComponent("vjsForward",x);var S=n(82),A=n(730),w=n(111),j=n(720),k=n(717),C=n.p+"static/media/next.7cd4e204.svg",O=n(187),E=n(192),I=n(243);const P=e=>{const{t:t}=Object(a.a)(),n=e.vjsComponent.options(),i=(e.vjsComponent.player(),n.video?n.video.lesson_next:null),[s,o]=r.a.useState(null);return Object(m.jsxs)(O.a,{theme:S.a,children:[Object(m.jsx)(p.a,{onClick:e=>{o(e.currentTarget)},children:Object(m.jsx)("img",{src:C})}),i&&Object(m.jsxs)(A.a,{anchorEl:s,keepMounted:!0,open:Boolean(s),onClose:()=>{o(null)},sx:{"& .MuiPopover-paper":{background:"rgba(0, 0, 0, 0.8)",overflow:"hidden",color:"#fff",width:{xs:"250px",md:"340px"}}},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"right"},container:n.anchorRef.current,children:[Object(m.jsx)(w.a,{p:1,children:Object(m.jsxs)(j.a,{variant:"subtitle1",children:[Object(m.jsx)("b",{children:t("Episodio successivo:")}),Object(m.jsx)("br",{}),Object(m.jsxs)("b",{children:[i.lesson_num," -"]})," ",i.title]})}),Object(m.jsxs)(w.a,{sx:{height:150,position:"relative",display:"flex",justifyContent:"center",alignItems:"center"},children:[Object(m.jsx)(E.a,{alt:i.title,src:i.img_cover,sx:{width:"100%",position:"absolute",top:0,left:0}
2,useSet:{sizes:[["down","md","100vw"],["300px"]]}}),Object(m.jsx)(k.a,{onClick:()=>n.handleClickLesson(i),children:Object(m.jsx)("img",{alt:"",src:I.a,width:150})})]})]})]})},R=s.a.getComponent("Component");class D extends R{constructor(e,t){super(e,t),this.mount=this.mount.bind(this),e.ready((()=>{this.mount()})),this.addClass("vjs-control"),this.on("dispose",(()=>{h.a.unmountComponentAtNode(this.el())}))}mount(){h.a.render(Object(m.jsx)(P,{vjsComponent:this}),this.el())}}R.registerComponent("vjsNextLesson",D);var L=n(645),M=n(737),N=n(595),B=n(4),U=n(2),F=n(36),q=n(183),z=n(181),V=n(29),H=n(54),W=n(325),G=n(328),X=n(65),Y=n(345),Q=n(522),K=n(521),Z=n(158),J=n(179);function $(e){return Object(Z.a)("MuiMenuItem",e)}var ee=Object(J.a)("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]);const te=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex"],ne=Object(V.a)(p.a,{shouldForwardProp:e=>Object(V.b)(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})((e=>{let{theme:t,ownerState:n}=e;return Object(U.a)({},t.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!n.disableGutters&&{paddingLeft:16,paddingRight:16},n.divider&&{borderBottom:"1px solid ".concat(t.palette.divider),backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:t.palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat(ee.selected)]:{backgroundColor:Object(z.a)(t.palette.primary.main,t.palette.action.selectedOpacity),["&.".concat(ee.focusVisible)]:{backgroundColor:Object(z.a)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},["&.".concat(ee.selected,":hover")]:{backgroundColor:Object(z.a)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:Object(z.a)(t.palette.primary.main,t.palette.action.selectedOpacity)}},["&.".concat(ee.focusVisible)]:{backgroundColor:t.palette.action.focus},["&.".concat(ee.disabled)]:{opacity:t.palette.action.disabledOpacity},["& + .".concat(Y.a.root)]:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},["& + .".concat(Y.a.inset)]:{marginLeft:52},["& .".concat(K.a.root)]:{marginTop:0,marginBottom:0},["& .".concat(K.a.inset)]:{paddingLeft:36},["& .".concat(Q.a.root)]:{minWidth:36}},!n.dense&&{[t.breakpoints.up("sm")]:{minHeight:"auto"}},n.dense&&Object(U.a)({minHeight:36},t.typography.body2,{["& .".concat(Q.a.root," svg")]:{fontSize:"1.25rem"}}))}));var ie=i.forwardRef((function(e,t){const n=Object(H.a)({props:e,name:"MuiMenuItem"}),{autoFocus:r=!1,component:s="li",dense:a=!1,divider:o=!1,disableGutters:l=!1,focusVisibleClassName:c,role:d="menuitem",tabIndex:u}=n,h=Object(B.a)(n,te),p=i.useContext(W.a),g={dense:a||p.dense||!1,disableGutters:l},f=i.useRef(null);Object(G.a)((()=>{r&&f.current&&f.current.focus()}),[r]);const y=Object(U.a)({},n,{dense:g.dense,divider:o,disableGutters:l}),b=(e=>{const{disabled:t,dense:n,divider:i,disableGutters:r,selected:s,classes:a}=e,o={root:["root",n&&"dense",t&&"disabled",!r&&"gutters",i&&"divider",s&&"selected"]},l=Object(q.a)(o,$,a);return Object(U.a)({},a,l)})(n),v=Object(X.a)(f,t);let _;return n.disabled||(_=void 0!==u?u:-1),Object(m.jsx)(W.a.Provider,{value:g,children:Object(m.jsx)(ne,Object(U.a)({ref:v,role:d,tabIndex:_,component:s,focusVisibleClassName:Object(F.a)(b.focusVisible,c)},h,{ownerState:y,classes:b}))})})),re=n(648),se=n(647),ae=n(248),oe=n.n(ae),le=n.p+"static/media/local.69183764.svg";const ce=Object(L.a)(M.a)((e=>{let{theme:t}=e;return{color:"#fff",fontWeight:"bold",fontSize:"0.875rem",lineHeight:"30px",backgroundColor:"transparent"}})),de=e=>{const t=r.a.useRef(),n=r.a.useRef(),[i,s]=r.a.useState(null),[a,l]=r.a.useState(null),c=r.a.useRef(),d=e.vjsComponent.options(),u=e.vjsComponent.player(),h=u.audioTracks(),g=u.textTracks(),f=()=>{s(null)};return r.a.useEffect((()=>{u.on("loadedmetadata",(()=>{if(!t.current){for(var e=0;e<h.length;e++){(i=h[e]).language===localStorage.getItem("inv_audio")&&(i.enabled=!0)}t.current=!0}if(!n.current){for(e=0;e<g.length;e++){var i;"subtitles"===(i=g[e]).kind&&(i.language===localStorage.getItem("inv_sub")?i.mode="showing":i.mode="disabled")}n.current=!0}})),d.video&&(c.current&&"off"!==c.current?Object(o.a)("subtitle_on",{video_id:d.video.lesson.id}):c.current&&"off"===c.current&&Object(o.a)("subtitle_off",{video_id:d.video.lesson.id}))}),[c.current]),Object(m.jsxs)(r.a.Fragment,{children:[Object(m.jsx)(p.a,{onClick:e=>{s(e.currentTarget)},children:Object(m.jsx)("img",{alt:"",src:le})}
2),Object(m.jsxs)(N.a,{anchorEl:i,keepMounted:!0,open:Boolean(i),onClose:f,MenuListProps:{dense:!0,disablePadding:!0},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"right"},container:d.anchorRef.current,children:[Object(m.jsx)(ce,{children:"Audio"}),h.tracks_.map((e=>Object(m.jsxs)(ie,{selected:e.enabled,onClick:t=>{e.enabled=!0,localStorage.setItem("inv_audio",e.language),Object(o.a)("audio_language",{video_id:d.video.lesson.id,lang:e.language}),l(e.language),f();const n=e.id;let i=null;for(let e=0;e<g.length;e++)if("showing"===g[e].mode){i=g[e].id;break}d.handleSyncChromecastTracks(n,i)},children:[Object(m.jsx)(re.a,{style:{minWidth:"30px",color:"#fff"},children:e.enabled&&Object(m.jsx)(oe.a,{fontSize:"inherit",color:"inherit"})}),Object(m.jsx)(se.a,{primary:e.label,style:{paddingRight:"20px",margin:0}})]},"audio"+e.id))),Object(m.jsx)(ce,{children:"Sottotitoli"}),g.tracks_.map(((e,t)=>"hidden"!==e.mode&&"subtitles"===e.kind&&Object(m.jsxs)(ie,{selected:"showing"===e.mode,onClick:n=>{for(let e=0;e<g.length;e++)g[e].mode="disabled";if("subtitles"===g[t].kind){c.current!==e.language?(g[t].mode="showing",c.current=e.language,localStorage.setItem("inv_sub",e.language)):(c.current="off",localStorage.removeItem("inv_sub")),f();let n=null;for(let e=0;e<h.length;e++)if(h[e].enabled){n=h[e].id;break}let i=null;"showing"===g[t].mode&&(i=g[t].id),d.handleSyncChromecastTracks(n,i)}},children:[Object(m.jsx)(re.a,{style:{minWidth:"30px",color:"#fff"},children:(c.current===e.language||"showing"===e.mode)&&Object(m.jsx)(oe.a,{fontSize:"inherit",color:"inherit"})}),Object(m.jsx)(se.a,{primary:e.label,style:{paddingRight:"20px",margin:0}})]},"text"+e.id)))]})]})},ue=s.a.getComponent("Component");class he extends ue{constructor(e,t){super(e,t),this.mount=this.mount.bind(this),e.ready((()=>{this.mount()})),this.addClass("vjs-control"),this.on("dispose",(()=>{h.a.unmountComponentAtNode(this.el())}))}mount(){h.a.render(Object(m.jsx)(de,{vjsComponent:this}),this.el())}}ue.registerComponent("vjsLocalization",he);n(63);var pe=n.p+"static/media/speed.49d22ce7.svg";const ge=Object(L.a)(M.a)((e=>{let{theme:t}=e;return{color:"#fff",fontWeight:"bold",fontSize:"0.875rem",lineHeight:"30px",backgroundColor:"transparent"}})),me=e=>{const{t:t}=Object(a.a)(),n=e.vjsComponent.options(),i=e.vjsComponent.player(),s=i.playbackRate(),[o,l]=r.a.useState(null),[c,d]=r.a.useState(s),u=i.playbackRates(),h=()=>{l(null)};return Object(m.jsxs)(r.a.Fragment,{children:[Object(m.jsx)(p.a,{onClick:e=>{l(e.currentTarget)},children:Object(m.jsx)("img",{alt:"",src:pe})}),Object(m.jsxs)(N.a,{anchorEl:o,keepMounted:!0,open:Boolean(o),onClose:h,MenuListProps:{dense:!0,disablePadding:!0},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"right"},container:n.anchorRef.current,children:[Object(m.jsx)(ge,{children:t("Velocit\xe0 di riproduzione")}),u.map((e=>Object(m.jsxs)(ie,{selected:c===e,onClick:t=>{d(e),i.playbackRate(e),h()},children:[Object(m.jsx)(re.a,{style:{minWidth:"30px",color:"#fff"},children:c===e&&Object(m.jsx)(oe.a,{fontSize:"inherit",color:"inherit"})}),Object(m.jsx)(se.a,{primary:"x "+e,style:{paddingRight:"20px",margin:0}})]},e)))]})]})},fe=s.a.getComponent("Component");class ye extends fe{constructor(e,t){super(e,t),this.mount=this.mount.bind(this),e.ready((()=>{this.mount()})),this.addClass("vjs-control"),this.on("dispose",(()=>{h.a.unmountComponentAtNode(this.el())}))}mount(){h.a.render(Object(m.jsx)(me,{vjsComponent:this}),this.el())}}fe.registerComponent("vjsPlaybackRate",ye);var be=n(725),ve=n(729),_e=n(191);const Te={basics:{dialogBg:"#26292D",innerBoxBg:"#191b1d"},wellness:{dialogBg:"#fff",innerBoxBg:"#EFEDE5"}},xe=e=>{const{t:t,i18n:n}=Object(a.a)(),i=e.vjsComponent.options(),s=e.vjsComponent.player(),o=i.video?i.video.lesson_next:null,d=i.video?i.video.lesson:null,[u,h]=r.a.useState(!1),[g,f]=r.a.useState(!1),y=r.a.useRef();return r.a.useEffect((()=>(s.on("ended",(async()=>{f(!0);const e=await i.handleEvent("lw",Math.round(s.duration()));e&&e.is_progress_completed&&d.test_id&&h(!0),Boolean(o)&&(y.current=setTimeout((()=>{i.handleClickLesson(o)}),5e3))})),()=>{y.current&&(clearTimeout(y.current),y.current=null)})),[]),Object(m.jsx)(O.a,{theme:S.a,children:Object(m.jsxs)(be.a,{container:s.el(),maxWidth:"xs",onClose:()=>f(!1),open:g,sx:{"& .MuiPaper-root":{background:i.package?Te[i.package.key].dialogBg:"#26292D",color:e=>i.package?e.palette.text["primary_".concat(i.package.key)]:"#fff",p:3}},children:[Object(m.jsxs)(w.a,{textAlign:"center",sx:{mb:2},children:[i.package?Object(m.jsx)(j.a,{color:"inherit",gutterBottom:!0,children:Object(m.jsx)("b",{children:Boolean(o)?t("Continua con il prossimo capitolo"):t("Hai concluso questo modulo")})}):Object(m.jsx)(j.a,{variant:"h6",color:"inherit",gutterBottom:!0,children:Object(m.jsx)("b",{children:t("Hai terminato questa lezione!")})}),Boolean(d)&&Boolean(d.test_id)&&!d.test_passed&&u?Object(m.jsx)(_e.a,{component:ve.a,href:i.package?Object(c.f)("/:lang/:package/:classSlug/:modules/:moduleSlug/:lessons/:chapterSlug/test",{lang:n.language,package:i.package.translation,classSlug:d.course.package.slug,modules:t("moduli"),moduleSlug:d.course.slug,lessons:t("lezioni"),chapterSlug:d.slug}):Object(c.f)("/:lang/:courses/:courseSlug/:lessons/:lessonSlug/test",{lang:n.language,courses:i.isHoreca?t("horeca"):t("corsi"),courseSlug:d.course_slug,lessons:t("lezioni"),lessonSlug:d.slug}),color:"secondary",children:t("Fai il test")}):i.package&&Boolean(o)&&o.can_watch?Object(m.jsx)(_e.a,{fullWidth:!0,component:ve.a,size:"small",onClick:()=>i.handleClickLesson(o),variant:"contained",color:i.package.key,children:t("Prossimo capitolo")}):i.package&&Boolean(o)&&!o.can_watch?Object(m.jsx)(_e.a,{fullWidth:!0,size:"small",component:ve.a,href:"/".concat(n.language,"/paywall/").concat(d.course.id),variant:"contained",color:"primary",children:t("Attiva l'abbonamento")}):Object(m.jsx)(r.a.Fragment,{})]}),Boolean(o)&&!i.package&&Object(m.jsxs)(w.a,{sx:{background:"#2F3337",borderRadius:"10px",p:2},children:[Object(m.jsx)(j.a,{component:"h6",variant:"caption",sx:{textTransform:"uppercase"},gutterBottom:!0,children:t("Prossima lezione")}),Object(m.jsxs)(p.a,{onClick:()=>i.handleClickLesson(o),sx:{display:"flex !important",width:"100%"},children:[Object(m.jsx)("img",{alt:o.title,src:Object(l.m)(o.img_cover,200),style:{width:"95px",borderRadius:"10px",marginRight:"10px"}}),Object(m.jsxs)(w.a,{textAlign:"left",children:[Object(m.jsxs)(j.a,{color:"textPrimary",variant:"subtitle2",children:[t("LEZIONE")," ",o.lesson_num]}
2),Object(m.jsx)(j.a,{color:"textPrimary",sx:{display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:Object(m.jsx)("b",{children:o.title})})]})]})]}),Boolean(o)&&i.package&&Object(m.jsx)(w.a,{sx:{background:i.package?Te[i.package.key].innerBoxBg:"#191b1d",borderRadius:"10px",p:2},children:Object(m.jsxs)(p.a,{onClick:()=>i.handleClickLesson(o),sx:{display:"flex !important",width:"100%"},children:[Object(m.jsx)("img",{src:Object(l.m)(o.img_cover,200),style:{width:"95px",borderRadius:"10px",marginRight:"10px"}}),Object(m.jsxs)(w.a,{textAlign:"left",children:[Object(m.jsx)(j.a,{component:"h6",variant:"caption",children:t("Prossimo capitolo")}),Object(m.jsx)(j.a,{color:"inherit",variant:"subtitle2",children:o.course.title}),Object(m.jsx)(j.a,{color:"inherit",sx:{display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:Object(m.jsx)("b",{children:o.title})})]})]})})]})})},Se=s.a.getComponent("Component");class Ae extends Se{constructor(e,t){super(e,t),this.mount=this.mount.bind(this),e.ready((()=>{this.mount()})),this.addClass("vjs-endlesson-dialog"),this.on("dispose",(()=>{h.a.unmountComponentAtNode(this.el())}))}mount(){h.a.render(Object(m.jsx)(xe,{vjsComponent:this}),this.el())}}Se.registerComponent("vjsEndLesson",Ae);const we=Object(L.a)(j.a)((e=>{let{theme:t}=e;return{color:"#fff",textShadow:"0 3px 6px rgba(0, 0, 0, 0.16)",marginTop:"7px",fontFamily:"Raleway",paddingLeft:"20px"}})),je=e=>{const{t:t}=Object(a.a)(),n=e.vjsComponent.options(),i=e.vjsComponent.player(),s=n.video?n.video.lesson:{},[l,c]=r.a.useState(null);return r.a.useEffect((()=>{i.on("statechanged",(()=>{void 0!==typeof i.state.currentAd&&c(i.state.currentAd)}))}),[]),Object(m.jsx)(O.a,{theme:S.a,children:Object(m.jsx)(w.a,{children:l?Object(m.jsxs)(we,{variant:"caption",color:"textPrimary",children:[l.label_A.text,"\xa0\u2022\xa0",!!l.label_B&&"text"===l.label_B.type&&l.label_B.text,!!l.label_B&&"link"===l.label_B.type&&Object(m.jsx)(ve.a,{href:l.label_B.url,target:"_blank",underline:"always",color:"inherit",onClick:()=>{Object(o.a)("video_adv_clicked",{video_id:s.id,video_adv_id:l.adv_campaign_id,video_adv_name:l.title,video_adv_type:i.state.typeAd,video_adv_link:l.label_B.url}),n.handleEvent("click",l.session_id,{adv_campaign_id:l.adv_campaign_id,lesson_id:s.id,elapsed:Math.round(i.currentTime())})},children:l.label_B.text})]}):Object(m.jsxs)(m.Fragment,{children:[Object(m.jsxs)(we,{className:"title",variant:"caption",color:"textPrimary",children:[t("LEZIONE")," ",s.lesson_num||""]}),Object(m.jsx)(we,{className:"subtitle",color:"textPrimary",gutterBottom:!0,sx:{mt:0},children:Object(m.jsx)("b",{children:s.title||""})})]})})})},ke=s.a.getComponent("Component");class Ce extends ke{constructor(e,t){super(e,t),this.mount=this.mount.bind(this),e.ready((()=>{this.mount()})),this.addClass("vjs-title-bar"),this.on("dispose",(()=>{h.a.unmountComponentAtNode(this.el())}))}mount(){h.a.render(Object(m.jsx)(je,{vjsComponent:this}),this.el())}}ke.registerComponent("vjsTitle",Ce);var Oe=n(246);const Ee=Object(L.a)(k.a)((e=>{let{theme:t}=e;return{color:"#fff",fontFamily:"Raleway",textShadow:"0 3px 6px rgba(0, 0, 0, 0.16)",fontWeight:"bold"}})),Ie=e=>{const t=e.vjsComponent.player(),[n,i]=r.a.useState(!0),s=r.a.useRef(),a=e=>{const t=document.body.scrollTop||document.documentElement.scrollTop;s.current.offsetParent&&t>s.current.offsetParent.offsetTop&&i(!0)};return r.a.useEffect((()=>(window.addEventListener("scroll",a),()=>{window.removeEventListener("scroll",a)})),[]),r.a.useEffect((()=>{t.muted(n)}),[n]),Object(m.jsx)(Ee,{ref:s,onClick:()=>{i(!n)},children:n?Object(m.jsx)(Oe.e,{style:{fontSize:30}}):Object(m.jsx)(Oe.d,{style:{fontSize:30}})})},Pe=s.a.getComponent("Component");class Re extends Pe{constructor(e,t){super(e,t),this.mount=this.mount.bind(this),e.ready((()=>{this.mount()})),this.addClass("vjs-mute-button"),this.on("dispose",(()=>{h.a.unmountComponentAtNode(this.el())}))}mount(){h.a.render(Object(m.jsx)(Ie,{vjsComponent:this}),this.el())}}Pe.registerComponent("vjsMute",Re);var De=n(718),Le=n(317),Me=n.n(Le);const Ne=Object(L.a)(De.a)((e=>{let{theme:t}=e;return{color:"#D0D0D0",backgroundColor:"rgba(0, 0, 0, 0.7)",fontSize:12,"&:hover":{backgroundColor:"rgba(0, 0, 0, 0.7)"}}})),Be=e=>{const{t:t}=Object(a.a)(),n=e.vjsComponent.options(),i=e.vjsComponent.player(),s=n.video?n.video.lesson:{},[l,c]=r.a.useState(null),[d,u]=r.a.useState(null),[h,p]=r.a.useState(null);return r.a.useEffect((()=>{i.on("statechanged",(()=>{void 0!==typeof i.state.currentAd&&c(i.state.currentAd)}))}),[]),r.a.useEffect((()=>{l&&(i.on("aca-timeupdate",(()=>{u(i.remainingTimeDisplay())})),i.on("loadeddata",(()=>{p(i.duration())})))}),[l]),Object(m.jsxs)(O.a,{theme:S.a,children:[!!l&&"countdown"===l.button.type&&Object(m.jsxs)(Ne,{component:"div",children:[t("Inizia tra")," ",0===d?h:d]}),!!l&&"skip"===l.button.type&&Object(m.jsx)(Ne,{component:"div",endIcon:Object(m.jsx)(Me.a,{}),onClick:()=>{Object(o.a)("video_adv_skipped",{video_id:s.id,video_adv_id:l.adv_campaign_id,video_adv_name:l.title,video_adv_type:i.state.typeAd,video_adv_skipped_after:Math.round(i.currentTime())}),n.handleEvent("view",l.session_id,{adv_campaign_id:l.adv_campaign_id,lesson_id:s.id,skipped:!0,elapsed:Math.round(i.currentTime())}),i.trigger("ads-ad-ended")},children:t("Salta")})]})},Ue=s.a.getComponent("Component");class Fe extends Ue{constructor(e,t){super(e,t),this.mount=this.mount.bind(this),e.ready((()=>{this.mount()})),this.addClass("vjs-skip-ad"),this.on("dispose",(()=>{h.a.unmountComponentAtNode(this.el())}))}mount(){h.a.render(Object(m.jsx)(Be,{vjsComponent:this}),this.el())}}Ue.registerComponent("vjsSkipAd",Fe);var qe=n(318),ze=n.n(qe);const Ve=e=>{const t=e.vjsComponent.options();return Object(m.jsx)(k.a,{onClick:()=>{t.handleChromeCast()},children:Object(m.jsx)(ze.a,{})})},He=s.a.getComponent("Component");class We extends He{constructor(e,t){super(e,t),this.mount=this.mount.bind(this),e.ready((()=>{this.mount()})),this.addClass("vjs-control"),this.on("dispose",(()=>{h.a.unmountComponentAtNode(this.el())}))}mount(){h.a.render(Object(m.jsx)(Ve,{vjsComponent:this}),this.el())}}if(!s.a.getComponent("vjsChromecast"))try{He.registerComponent("vjsChromecast",We)}catch(Wt){console.warn("vjsChromecast: impossibile registrare il componente (probabilmente gi\xe0 registrato)",Wt)}n(319),n(320);var Ge=n(84),Xe=(n(321),n(194)),Ye=n.n(Xe),Qe=n(237),Ke=n.n(Qe),Ze="7.5.2";var Je=function(e,t){t.isImmediatePropagationStopped=function(){return!0},t.cancelBubble=!0,t.isPropagationStopped=function(){return!0}},$e=function(e,t,n){Je(0,n),e.trigger({type:t+n.type,originalEvent:n})};function et(e){"playing"===e.type?function(e,t){e.ads.isInAdMode()&&(e.ads.isContentResuming()?e.ads._contentEnding&&$e(e,"content",t):$e(e,"ad",t))}(this,e):"ended"===e.type?function(e,t){e.ads.isInAdMode()?e.ads.isContentResuming()?(Je(0,t),e.trigger("resumeended")):$e(e,"ad",t):e.ads._contentHasEnded||e.ads.stitchedAds()||($e(e,"content",t),e.trigger("readyforpostroll"))}(this,e):"loadstart"===e.type||"loadeddata"===e.type||"loadedmetadata"===e.type?function(e,t){if(!("loadstart"===t.type&&!e.ads._hasThereBeenALoadStartDuringPlayerLife||"loadeddata"===t.type&&!e.ads._hasThereBeenALoadedData||"loadedmetadata"===t.type&&!e.ads._hasThereBeenALoadedMetaData))if(e.ads.inAdBreak())$e(e,"ad",t);else{if(e.currentSrc()!==e.ads.contentSrc)return;$e(e,"content",t)}}(this,e):"play"===e.type?function(e,t){e.ads.inAdBreak()?$e(e,"ad",t):e.ads.isContentResuming()&&$e(e,"content",t)}(this,e):this.ads.isInAdMode()&&(this.ads.isContentResuming()?$e(this,"content",e):$e(this,"ad",e))}function tt(){return tt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},tt.apply(this,arguments)}function nt(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,it(e,t)}function it(e,t){return it=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},it(e,t)}var rt={},st=function(){!function(e){if(s.a.dom.isInFrame()&&"function"!==typeof Ye.a.__tcfapi){for(var t,n=Ye.a,i={};n;){try{if(n.frames.__tcfapiLocator){t=n;break}}catch(r){}if(n===Ye.a.top)break;n=n.parent}if(!t)return;
2Ye.a.__tcfapi=function(e,n,r,s){var a=Math.random()+"",o={__tcfapiCall:{command:e,parameter:s,version:n,callId:a}};i[a]=r,t.postMessage(o,"*")},Ye.a.addEventListener("message",(function(e){var t={};try{t="string"===typeof e.data?JSON.parse(e.data):e.data}catch(r){}var n=t.__tcfapiReturn;n&&"function"===typeof i[n.callId]&&(i[n.callId](n.returnValue,n.success),i[n.callId]=null)}),!1)}}(),"function"===typeof Ye.a.__tcfapi&&Ye.a.__tcfapi("addEventListener",2,(function(e,t){t&&(rt=e)}))},at="",ot=function(e,t){if(void 0===t&&(t=Ye.a),t.__uspapi)t.__uspapi("getUSPData",1,(function(t,n){var i=n?t.uspString:null;at=i,e(i)}));else{var n=function(e){for(var t=e.parent;t!==e.top;){try{if(t.frames&&t.frames.__uspapiLocator)return t}catch(n){}t=t.parent}try{if(e.top.frames&&e.top.frames.__uspapiLocator)return e.top}catch(n){}return null}(t);if(!n)return void e(null);var i=Math.random().toString(36).substring(2),r={__uspapiCall:{command:"getUSPData",version:1,callId:i}};t.addEventListener("message",(function n(r){if(r&&r.data&&r.data.__uspapiReturn&&r.data.__uspapiReturn.callId===i){t.removeEventListener("message",n,!1);var s=r.data.__uspapiReturn,a=s.returnValue,o=s.success?a.uspString:null;at=o,e(o)}}),!1),n.postMessage(r,"*")}},lt={AdsBeforePrerollError:"ads-before-preroll-error",AdsPrerollError:"ads-preroll-error",AdsMidrollError:"ads-midroll-error",AdsPostrollError:"ads-postroll-error",AdsMacroReplacementFailed:"ads-macro-replacement-failed",AdsResumeContentFailed:"ads-resume-content-failed"},ct=function(e,t){return t?encodeURIComponent(e):e},dt=function(e,t){var n={};return["description","tags","reference_id","ad_keys"].forEach((function(i){e&&e[i]?n["{mediainfo."+i+"}"]=e[i]:t["{mediainfo."+i+"}"]?n["{mediainfo."+i+"}"]=t["{mediainfo."+i+"}"]:n["{mediainfo."+i+"}"]=""})),["custom_fields","customFields"].forEach((function(t){!function(e,t,n){if(e&&e[n])for(var i=e[n],r=Object.keys(i),s=0;s<r.length;s++)t["{mediainfo."+n+"."+r[s]+"}"]=i[r[s]]}(e,n,t)})),n},ut=function(e,t,n,i,r){for(var a in void 0===i&&(i={}),t){var o=i.hasOwnProperty(a)?i[a]:a;if(o.startsWith("r:"))try{var l=new RegExp(o.slice(2),"g");e=e.replace(l,ct(t[a],n))}catch(c){r.ads.error({errorType:lt.AdsMacroReplacementFailed,macro:a,error:c}),s.a.log.warn('Unable to replace macro with regex "'+o+'". The provided regex may be invalid.')}else e=e.split(o).join(ct(t[a],n))}return e};function ht(e,t,n){void 0===t&&(t=!1),void 0===n&&(n={});var i=n.disableDefaultMacros||!1,r=n.macroNameOverrides||{};delete n.disableDefaultMacros,delete n.macroNameOverrides;var a=n;if(i)return ut(e,a,t,r);var o,l=function(e){var t={},n=e.replace(/{([^}=]+)=([^}]*)}/g,(function(e,n,i){return t["{"+n+"}"]=i,"{"+n+"}"}));return{defaults:t,modifiedString:n}}(e),c=l.defaults,d=l.modifiedString;for(var u in e=d,tt(a,{"{player.id}":(o=this).options_["data-player"]||o.id_,"{player.height}":o.currentHeight(),"{player.width}":o.currentWidth(),"{player.heightInt}":Math.round(o.currentHeight()),"{player.widthInt}":Math.round(o.currentWidth()),"{player.autoplay}":o.autoplay()?1:0,"{player.muted}":o.muted()?1:0,"{player.language}":o.language()||"","{mediainfo.id}":o.mediainfo?o.mediainfo.id:"","{mediainfo.name}":o.mediainfo?o.mediainfo.name:"","{mediainfo.duration}":o.mediainfo?o.mediainfo.duration:"","{player.duration}":o.duration(),"{player.durationInt}":Math.round(o.duration()),"{player.live}":o.duration()===1/0?1:0,"{player.pageUrl}":s.a.dom.isInFrame()?Ke.a.referrer:Ye.a.location.href,"{playlistinfo.id}":o.playlistinfo?o.playlistinfo.id:"","{playlistinfo.name}":o.playlistinfo?o.playlistinfo.name:"","{timestamp}":(new Date).getTime(),"{document.referrer}":Ke.a.referrer,"{window.location.href}":Ye.a.location.href,"{random}":Math.floor(1e12*Math.random())},dt(this.mediainfo,c),function(e){var t={};return Object.keys(e).forEach((function(n){t["{tcf."+n+"}"]=e[n]})),t["{tcf.gdprAppliesInt}"]=e.gdprApplies?1:0,t}(rt),{"{usp.uspString}":at},function(e,t,n){var i=new RegExp("{pageVariable\\.([^}]+)}","g"),r={},a=(e.match(i)||[]).concat(Object.keys(n).filter((function(t){return i.test(t)&&e.includes(n[t])})));if(a)return a.forEach((function(e){for(var n,i=e,a=e.slice(14,-1),o=a.split("."),l=Ye.a,c=0;c<o.length;c++)if(c===o.length-1)n=l[o[c]];else if("undefined"===typeof(l=l[o[c]]))break;var d=typeof n;null===n?r[i]="null":void 0===n?t[i]?r[i]=t[i]:(s.a.log.warn('Page variable "'+a+'" not found'),r[i]=""):"str
2ing"!==d&&"number"!==d&&"boolean"!==d?(s.a.log.warn('Page variable "'+a+'" is not a supported type'),r[i]=""):r[i]=n})),r}(e,c,r)),e=ut(e,a,t,r,this),c)e=e.replace(u,c[u]);return e}var pt={processMetadataTracks:function(e,t){for(var n=e.textTracks(),i=function(n){"metadata"===n.kind&&(e.ads.cueTextTracks.setMetadataTrackMode(n),t(e,n))},r=0;r<n.length;r++)i(n[r]);n.addEventListener("addtrack",(function(e){i(e.track)}))},setMetadataTrackMode:function(e){},getSupportedAdCue:function(e,t){return t},isSupportedAdCue:function(e,t){return!0},getCueId:function(e,t){return t.id}},gt=function(e,t){return void 0!==t&&e.ads.includedCues[t]},mt=function(e,t){void 0!==t&&""!==t&&(e.ads.includedCues[t]=!0)};function ft(){!1!==this.ads._shouldBlockPlay&&(this.paused()||(this.ads.debug("Playback was canceled by cancelContentPlay"),this.pause()),this.ads._cancelledPlay=!0)}pt.processAdTrack=function(e,t,n,i){e.ads.includedCues={};for(var r=0;r<t.length;r++){var a=t[r],o=this.getSupportedAdCue(e,a);if(!this.isSupportedAdCue(e,a))return void s.a.log.warn("Skipping as this is not a supported ad cue.",a);var l=this.getCueId(e,a),c=a.startTime;if(gt(e,l))return void s.a.log("Skipping ad already seen with ID "+l);i&&i(e,o,l,c),n(e,o,l,c),mt(e,l)}};var yt={},bt=s.a;yt.isMiddlewareMediatorSupported=function(){return!bt.browser.IS_IOS&&!bt.browser.IS_ANDROID&&!!(bt.use&&bt.middleware&&bt.middleware.TERMINATOR)},yt.playMiddleware=function(e){return{setSource:function(e,t){t(null,e)},callPlay:function(){if(e.ads&&!0===e.ads._shouldBlockPlay)return e.ads.debug("Using playMiddleware to block content playback"),e.ads._playBlocked=!0,bt.middleware.TERMINATOR},play:function(t,n){e.ads&&e.ads._playBlocked&&t?(e.ads.debug("Play call to Tech was terminated."),e.trigger("play"),e.addClass("vjs-has-started"),e.ads._playBlocked=!1):n&&n.catch&&n.catch((function(t){"NotAllowedError"!==t.name||s.a.browser.IS_SAFARI||e.trigger("pause")}))}}},yt.testHook=function(e){bt=e};var vt=yt.playMiddleware,_t=yt.isMiddlewareMediatorSupported;var Tt={src:"data:video/mp4;base64,AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAAAxJtZGF03ABMYXZjNjEuMy4xMDAAQiAIwRg4AAACrgYF//+q3EXpvebZSLeWLNgg2SPu73gyNjQgLSBjb3JlIDE2NCByMzEwOCAzMWUxOWY5IC0gSC4yNjQvTVBFRy00IEFWQyBjb2RlYyAtIENvcHlsZWZ0IDIwMDMtMjAyMyAtIGh0dHA6Ly93d3cudmlkZW9sYW4ub3JnL3gyNjQuaHRtbCAtIG9wdGlvbnM6IGNhYmFjPTEgcmVmPTMgZGVibG9jaz0xOjA6MCBhbmFseXNlPTB4MzoweDExMyBtZT1oZXggc3VibWU9NyBwc3k9MSBwc3lfcmQ9MS4wMDowLjAwIG1peGVkX3JlZj0xIG1lX3JhbmdlPTE2IGNocm9tYV9tZT0xIHRyZWxsaXM9MSA4eDhkY3Q9MSBjcW09MCBkZWFkem9uZT0yMSwxMSBmYXN0X3Bza2lwPTEgY2hyb21hX3FwX29mZnNldD0tMiB0aHJlYWRzPTcgbG9va2FoZWFkX3RocmVhZHM9MSBzbGljZWRfdGhyZWFkcz0wIG5yPTAgZGVjaW1hdGU9MSBpbnRlcmxhY2VkPTAgYmx1cmF5X2NvbXBhdD0wIGNvbnN0cmFpbmVkX2ludHJhPTAgYmZyYW1lcz0zIGJfcHlyYW1pZD0yIGJfYWRhcHQ9MSBiX2JpYXM9MCBkaXJlY3Q9MSB3ZWlnaHRiPTEgb3Blbl9nb3A9MCB3ZWlnaHRwPTIga2V5aW50PTI1MCBrZXlpbnRfbWluPTI1IHNjZW5lY3V0PTQwIGludHJhX3JlZnJlc2g9MCByY19sb29rYWhlYWQ9NDAgcmM9Y3JmIG1idHJlZT0xIGNyZj0yMy4wIHFjb21wPTAuNjAgcXBtaW49MCBxcG1heD02OSBxcHN0ZXA9NCBpcF9yYXRpbz0xLjQwIGFxPTE6MS4wMACAAAAAOWWIhAAn//71sXwKaunqigzoMi7hlyTJrrYi4m0AwABFxzcqWKGahTaoBcQAAMWK4AlcFlIICBeldSEQBGCMHAAABVNtb292AAAAbG12aGQAAAAAAAAAAAAAAAAAAAPoAAAAIgABAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAACQXRyYWsAAABcdGtoZAAAAAMAAAAAAAAAAAAAAAEAAAAAAAAAIgAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAABQAAAAPAAAAAAACRlZHRzAAAAHGVsc3QAAAAAAAAAAQAAACIAAAAAAAEAAAAAAbltZGlhAAAAIG1kaGQAAAAAAAAAAAAAAAAAADwAAAACAFXEAAAAAAAtaGRscgAAAAAAAAAAdmlkZQAAAAAAAAAAAAAAAFZpZGVvSGFuZGxlcgAAAAFkbWluZgAAABR2bWhkAAAAAQAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAABJHN0YmwAAADAc3RzZAAAAAAAAAABAAAAsGF2YzEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAABQADwAEgAAABIAAAAAAAAAAEUTGF2YzYxLjMuMTAwIGxpYngyNjQAAAAAAAAAAAAAAAAY//8AAAA2YXZjQwFkAA3/4QAZZ2QADazZQUH7ARAAAAMAEAAAAwPA8UKZYAEABmjr48siwP34+AAAAAAQcGFzcAAAAAEAAAABAAAAFGJ0cnQAAAAAAALAEAACwBAAAAAYc3R0cwAAAAAAAAABAAAAAQAAAgAAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAEAAAABAAAAFHN0c3oAAAAAAAAC7wAAAAEAAAAUc3RjbwAAAAAAAAABAAAARQAAAj10cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAACAAAAAAAAABgAAAAAAAAAAAAAAAEBAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAAAXAAAEAAABAAAAAAG1bWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAACsRAAACABVxAAAAAAALWhkbHIAAAAAAAAAAHNvdW4AAAAAAAAAAAAAAABTb3VuZEhhbmRsZXIAAAABYG1pbmYAAAAQc21oZAAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAABJHN0YmwAAAB+c3RzZAAAAAAAAAABAAAAbm1wNGEAAAAAAAAAAQAAAAAAAAAAAAIAEAAAAACsRAAAAAAANmVzZHMAAAAAA4CAgCUAAgAEgICAF0AVAAAAAAH0AAAAEisFgICABRIQVuUABoCAgAECAAAAFGJ0cnQAAAAAAAH0AAAAEisAAAAYc3R0cwAAAAAAAAABAAAAAgAABAAAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAEAAAABAAAAHHN0c3oAAAAAAAAAAAAAAAIAAAAVAAAABgAAABhzdGNvAAAAAAAAAAIAAAAwAAADNAAAABpzZ3BkAQAAAHJvbGwAAAACAAAAAf//AAAAHHNiZ3AAAAAAcm9sbAAAAAEAAAACAAAAAQAAAGF1ZHRhAAAAWW1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALGlsc3QAAAAkqXRvbwAAABxkYXRhAAAAAQAAAABMYXZmNjEuMS4xMDA=",type:"video/mp4"},xt=function(){function e(){}return e.getState=function(t){if(t)return e.states_&&e.states_[t]?e.states_[t]:void 0},e.registerState=function(t,n){if("string"!==typeof t||!t)throw new Error('Illegal state name, "'+t+'"; must be a non-empty string.');return e.states_||(e.states_={}),e.states_[t]=n,n},e}(),St=function(){function e(e){this.player=e}e._getName=function(){return"Anonymous State"};var t=e.prototype;return t.transitionTo=function(e){var t=this.player;this.cleanup(t);var n=new e(t);t.ads._state=n,t.ads.debug(this.constructor._getName()+" -> "+n.constructor._getName());for(var i=arguments.length,r=new Array(i>1?i-1:0),s=1;s<i;s++)r[s-1]=arguments[s];n.init.apply(n,[t].concat(r))},t.init=function(){},t.cleanup=function(){},t.onPlay=function(){},t.onPlaying=function(){},t.onEnded=function(){},t.onAdEnded=function(){},t.onAdsReady=function(){s.a.log.warn("Unexpected adsready event")},t.onAdsError=function(){},t.onAdsCanceled=function(){},t.onAdTimeout=function(){},t.onAdStarted=function(){},t.onAdSkipped=function(){},t.onContentChanged=function(){},t.onContentResumed=function(){},t.onReadyForPostroll=function(){s.a.log.warn("Unexpected readyforpostroll event")},t.onNoPreroll=function(){},t.onNoPostroll=function(){},t.startLinearAdMode=function(){s.a.log.warn("Unexpected startLinearAdMode invocation (State via "+this.constructor._getName()+")")},t.endLinearAdMode=function(){s.a.log.warn("Unexpected endLinearAdMode invocation (State via "+this.constructor._getName()+")")},t.skipLinearAdMode=function(){s.a.log.warn("Unexpected skipLinearAdMode invocation (State via "+this.constructor._getName()+")")},t.isAdState=function(){throw new Error("isAdState unimplemented for "+this.constructor._getName())},t.isWaitingForAdBreak=function(){return!1},t.isContentResuming=function(){return!1},t.inAdBreak=function(){return!1},t.handleEvent=function(e){var t=this.player;"play"===e?this.onPlay(t):"adsready"===e?this.onAdsReady(t):"adserror"===e?this.onAdsError(t):"adscanceled"===e?this.onAdsCanceled(t):"adtimeout"===e?this.onAdTimeout(t):"ads-ad-started"===e?this.onAdStarted(t):"ads-ad-skipped"===e?this.onAdSkipped(t):"contentchanged"===e?this.onContentChanged(t):"contentresumed"===e?this.onContentResumed(t):"readyforpostroll"===e?this.onReadyForPostroll(t):"playing"===e?this.onPlaying(t):"ended"===e?this.onEnded(t):"nopreroll"===e?this.onNoPreroll(t):"nopostroll"===e?this.onNoPostroll(t):"adended"===e&&this.onAdEnded(t)},e}();xt.registerState("State",St);var At=function(e){function t(t){var n;return(n=e.call(this,t)||this).contentResuming=!1,n.waitingForAdBreak=!1,n}nt(t,e);var n=t.prototype;return n.isAdState=function(){return!0},n.onPlaying=function(){var e=xt.getState("ContentPlayback");this.contentResuming&&this.transitionTo(e)},n.onContentResumed=function(){var e=xt.getState("ContentPlayback");this.contentResuming&&this.transitionTo(e)},n.isWaitingForAdBreak=function(){return this.waitingForAdBreak},n.isContentResuming=function(){return this.contentResuming},n.inAdBreak=function(){return!0===this.player.ads._inLinearAdMode},t}(St);xt.registerState("AdState",At);var wt=function(e){function t(){return e.apply(this,arguments)||this}nt(t,e);var n=t.prototype;return n.isAdState=function(){return!1},n.onContentChanged=function(e){var t=xt.getState("BeforePreroll"),n=xt.getState("Preroll");e.ads.debug("Received contentchanged event (ContentState)"),e.paused()?this.transitionTo(t):(this.transitionTo(n,!1),e.pause(),e.ads._pausedOnContentupdate=!0)},t}(St);xt.registerState("ContentState",wt);var jt,kt=function(e){function t(){return e.apply(this,arguments)||this}nt(t,e),t._getName=function(){return"AdsDone"};var n=t.prototype;return n.init=function(e){e.ads._contentHasEnded=!0,e.trigger("ended")},n.startLinearAdMode=function(){s.a.log.warn("Unexpected startLinearAdMode invocation (AdsDone)")},t}(xt.getState("ContentState"));xt.registerState("AdsDone",kt);var Ct={start:function(e){e.ads.debug("Starting ad break"),e.ads._inLinearAdMode=!0,e.trigger("adstart"),e.ads.shouldTakeSnapshots()&&(e.ads.snapshot=function(e){var t;t=s.a.browser.IS_IOS&&e.ads.isLive(e)&&e.seekable().length>0?e.currentTime()-e.seekable().end(0):e.currentTime();var n=e.$(".vjs-tech"),i=e.textTracks?e.textTracks():[],r=[],a={ended:e.ended(),currentSrc:e.currentSrc(),sources:e.currentSources(),src:e.tech_.src(),currentTime:t,type:e.currentType()};n&&(a.style=n.getAttribute("style"));for(var o=0;o<i.length;o++){var l=i[o];r.push({track:l,mode:l.mode}),l.mode="disabled"}return a.suppressedTracks=r,a}(e)),e.ads.shouldPlayContentBehindAd(e)&&!e.ads.settings.stitchedAds&&(e.ads.preAdVolume_=e.volume(),e.volume(0)),e.addClass("vjs-ad-playing"),e.hasClass("vjs-live")&&e.removeClass("vjs-live"),e.ads.removeNativePoster(),e.ads.preAdPlaybackRate_=e.playbackRate(),e.playbackRate(1),e.controlBar&&e.controlBar.playbackRateMenuButton&&e.controlBar.playbackRateMenuButton.playbackRateSupported&&!e.controlBar.playbackRateMenuButton.hasClass("vjs-hidden")?(e.controlBar.playbackRateMenuButton.hide(),e.ads.showPlaybackMenuOnAdEnd_=!0):e.ads.showPlaybackMenuOnAdEnd_=!1},end:function(e,t){e.ads.debug("Ending ad break"),void 0===t&&(t=function(){}),e.ads.adType=null,e.ads._inLinearAdMode=!1,e.trigger("adend"),e.removeClass("vjs-ad-playing"),e.ads.isLive(e)&&e.addClass("vjs-live"),e.ads.shouldTakeSnapshots()?function(e,t){var n=e.ads.snapshot;if(void 0===t&&(t=function(){}),!0===e.ads.disableNextSnapshotRestore)return e.ads.disableNextSnapshotRestore=!1,delete e.ads.snapshot,void t();var i,r=e.$(".vjs-tech"),a=20,o=n.suppressedTracks,l=function(){for(var e=0;e<o.length;e++)(i=o[e]).track.mode=i.mode},c=function(){var t;if(s.a.browser.IS_IOS&&e.ads.isLive(e)){if(n.currentTime<0&&(t=e.seekable().length>0?e.seekable().end(0)+n.currentTime:e.currentTime(),e.currentTime(t)),e.paused()){var i=e.play();i&&i.catch&&i.catch((function(e){s.a.log.warn("Play promise rejected in IOS snapshot resume",e)}))}}else if(n.ended)e.currentTime(e.duration());else{e.currentTime(n.currentTime);var r=e.play();r&&r.catch&&r.catch((function(e){s.a.log.warn("Play promise rejected in snapshot resume",e)}))}e.ads.shouldRemoveAutoplay_&&(e.autoplay(!1),e.ads.shouldRemoveAutoplay_=!1)},d=function t(){if(e.off("contentcanplay",t),jt&&e.clearTimeout(jt),(r=e.el().querySelector(".vjs-tech")).readyState>1)return c();if(void 0===r.seekable)return c();if(r.seekable.length>0)return c();if(a--)e.setTimeout(t,50);else try{c()}catch(n){e.ads.error({errorType:lt.AdsResumeContentFailed,error:n}),s.a.log.warn("Failed to resume the content after an advertisement",n)}};if("style"in n&&r.setAttribute("style",n.style||""),e.ads.videoElementRecycled())e.one("resumeended",(function(){delete e.ads.snapshot,t()})),e.one("contentloadedmetadata",l),s.a.browser.IS_IOS&&!e.autoplay()&&"function"===typeof e.techCall_&&(e.techCall_("setAutoplay",!0),e.ads.shouldRemoveAutoplay_=!0),e.src(n.sources),e.one("contentcanplay",d),jt=e.setTimeout(d,2e3);else{if(l(),!e.ended()){var u=e.play();u&&u.catch&&u.catch((function(e){s.a.log.warn("Play promise rejected in snapshot restore",e)}))}delete e.ads.snapshot,t()}}(e,t):(e.ads.preAdVolume_&&e.volume(e.ads.preAdVolume_),t()),e.playbackRate(e.ads.preAdPlaybackRate_),e.ads.showPlaybackMenuOnAdEnd_&&e.controlBar.playbackRateMenuButton.show()}},Ot=function(e){function t(){return e.apply(this,arguments)||this}nt(t,e),t._getName=function(){return"Preroll"};var n=t.prototype;return n.init=function(e,t,n){if(this.waitingForAdBreak=!0,e.addClass("vjs-ad-loading"),n||e.ads.nopreroll_)return this.resumeAfterNoPreroll(e);var i=e.ads.settings.timeout;"number"===typeof e.ads.settings.prerollTimeout&&(i=e.ads.settings.prerollTimeout),this._timeout=e.setTimeout((function(){e.trigger("adtimeout")}),i),t?this.handleAdsReady():this.adsReady=!1},n.onAdsReady=function(e){e.ads.inAdBreak()?s.a.log.warn("Unexpected adsready event (Preroll)"):(e.ads.debug("Received adsready event (Preroll)"),this.handleAdsReady())},n.handleAdsReady=function(){this.adsReady=!0,this.readyForPreroll()},n.afterLoadStart=function(e){var t=this.player;t.ads._hasThereBeenALoadStartDuringPlayerLife?e():(t.ads.debug("Waiting for loadstart..."),t.one("loadstart",(function(){t.ads.debug("Received loadstart event"),e()})))},n.noPreroll=function(){var e=this;this.afterLoadStart((function(){e.player.ads.debug("Skipping prerolls due to nopreroll event (Preroll)"),e.resumeAfterNoPreroll(e.player)}))},n.readyForPreroll=function(){var e=this.player;this.afterLoadStart((function(){e.ads.debug("Triggered readyforpreroll event (Preroll)"),e.trigger("readyforpreroll")}))},n.onAdsCanceled=function(e){var t=this;e.ads.debug("adscanceled (Preroll)"),this.afterLoadStart((function(){t.resumeAfterNoPreroll(e)}))},n.onAdsError=function(e){var t=this;s.a.log("adserror (Preroll)"),e.ads.error({errorType:lt.AdsPrerollError}),this.inAdBreak()?e.ads.endLinearAdMode():this.afterLoadStart((function(){t.resumeAfterNoPreroll(e)}))},n.startLinearAdMode=function(){var e=this.player;!this.adsReady||e.ads.inAdBreak()||this.isContentResuming()?s.a.log.warn("Unexpected startLinearAdMode invocation (Preroll)"):(this.clearTimeout(e),e.ads.adType="preroll",this.waitingForAdBreak=!1,Ct.start(e),e.ads._shouldBlockPlay=!1)},n.onAdStarted=function(e){e.removeClass("vjs-ad-loading")},n.endLinearAdMode=function(){var e=this.player;this.inAdBreak()&&(e.removeClass("vjs-ad-loading"),e.addClass("vjs-ad-content-resuming"),this.contentResuming=!0,Ct.end(e))},n.skipLinearAdMode=function(){var e=this,t=this.player;t.ads.inAdBreak()||this.isContentResuming()?s.a.log.warn("Unexpected skipLinearAdMode invocation"):this.afterLoadStart((function(){t.trigger("adskip"),t.ads.debug("skipLinearAdMode (Preroll)"),e.resumeAfterNoPreroll(t)}))},n.onAdTimeout=function(e){var t=this;this.afterLoadStart((function(){e.ads.debug("adtimeout (Preroll)"),t.resumeAfterNoPreroll(e)}))},n.onNoPreroll=function(e){e.ads.inAdBreak()||this.isContentResuming()?s.a.log.warn("Unexpected nopreroll event (Preroll)"):this.noPreroll()},n.resumeAfterNoPreroll=function(e){if(this.contentResuming=!0,e.ads._shouldBlockPlay=!1,this.cleanupPartial(e),e.ads._playRequested||e.ads._pausedOnContentupdate)if(e.paused()){e.ads.debug("resumeAfterNoPreroll: attempting to resume playback (Preroll)");var t=e.play();t&&t.then&&t.then(null,(function(e){}))}else e.ads.debug("resumeAfterNoPreroll: already playing (Preroll)"),e.trigger("play"),e.trigger("playing")},n.cleanup=function(e){e.ads._hasThereBeenALoadStartDuringPlayerLife||s.a.log.warn("Leaving Preroll state before loadstart event can cause issues."),this.cleanupPartial(e)},n.cleanupPartial=function(e){e.removeClass("vjs-ad-loading"),e.removeClass("vjs-ad-content-resuming"),this.clearTimeout(e)},n.clearTimeout=function(e){e.clearTimeout(this._timeout),this._timeout=null},t}(xt.getState("AdState"));xt.registerState("Preroll",Ot);var Et=function(e){function t(){return e.apply(this,arguments)||this}nt(t,e),t._getName=function(){return"BeforePreroll"};var n=t.prototype;return n.init=function(e){this.adsReady=!1,this.shouldResumeToContent=!1,e.ads._shouldBlockPlay=!e.ads.settings.allowVjsAutoplay||!e.autoplay()},n.onAdsReady=function(e){e.ads.debug("Received adsready event (BeforePreroll)"),this.adsReady=!0},n.onPlay=function(e){var t=xt.getState("Preroll");e.ads.debug("Received play event (BeforePreroll)"),this.transitionTo(t,this.adsReady,this.shouldResu
2meToContent)},n.onAdsCanceled=function(e){e.ads.debug("adscanceled (BeforePreroll)"),this.shouldResumeToContent=!0},n.onAdsError=function(){this.player.ads.debug("adserror (BeforePreroll)"),this.player.ads.error({errorType:lt.AdsBeforePrerollError}),this.shouldResumeToContent=!0},n.onNoPreroll=function(){this.player.ads.debug("Skipping prerolls due to nopreroll event (BeforePreroll)"),this.shouldResumeToContent=!0},n.skipLinearAdMode=function(){var e=this.player;e.trigger("adskip"),e.ads.debug("skipLinearAdMode (BeforePreroll)"),this.shouldResumeToContent=!0},n.onContentChanged=function(){this.init(this.player)},t}(xt.getState("ContentState"));xt.registerState("BeforePreroll",Et);var It=function(e){function t(){return e.apply(this,arguments)||this}nt(t,e),t._getName=function(){return"Midroll"};var n=t.prototype;return n.init=function(e){e.ads.adType="midroll",Ct.start(e),e.addClass("vjs-ad-loading")},n.onAdStarted=function(e){e.removeClass("vjs-ad-loading")},n.endLinearAdMode=function(){var e=this.player;this.inAdBreak()&&(this.contentResuming=!0,e.addClass("vjs-ad-content-resuming"),e.removeClass("vjs-ad-loading"),Ct.end(e))},n.onAdsError=function(e){e.ads.error({errorType:lt.AdsMidrollError}),this.inAdBreak()&&e.ads.endLinearAdMode()},n.cleanup=function(e){e.removeClass("vjs-ad-loading"),e.removeClass("vjs-ad-content-resuming")},t}(xt.getState("AdState"));xt.registerState("Midroll",It);var Pt=function(e){function t(){return e.apply(this,arguments)||this}nt(t,e),t._getName=function(){return"Postroll"};var n=t.prototype;return n.init=function(e){if(this.waitingForAdBreak=!0,e.ads._contentEnding=!0,e.ads.nopostroll_){this.resumeContent(e);var t=xt.getState("AdsDone");this.transitionTo(t)}else{e.addClass("vjs-ad-loading");var n=e.ads.settings.timeout;"number"===typeof e.ads.settings.postrollTimeout&&(n=e.ads.settings.postrollTimeout),this._postrollTimeout=e.setTimeout((function(){e.trigger("adtimeout")}),n)}},n.startLinearAdMode=function(){var e=this.player;e.ads.inAdBreak()||this.isContentResuming()?s.a.log.warn("Unexpected startLinearAdMode invocation (Postroll)"):(e.ads.adType="postroll",e.clearTimeout(this._postrollTimeout),this.waitingForAdBreak=!1,Ct.start(e))},n.onAdStarted=function(e){e.removeClass("vjs-ad-loading")},n.endLinearAdMode=function(){var e=this,t=this.player,n=xt.getState("AdsDone");this.inAdBreak()&&(t.removeClass("vjs-ad-loading"),this.resumeContent(t),Ct.end(t,(function(){e.transitionTo(n)})))},n.skipLinearAdMode=function(){var e=this.player;e.ads.inAdBreak()||this.isContentResuming()?s.a.log.warn("Unexpected skipLinearAdMode invocation"):(e.ads.debug("Postroll abort (skipLinearAdMode)"),e.trigger("adskip"),this.abort(e))},n.onAdTimeout=function(e){e.ads.debug("Postroll abort (adtimeout)"),this.abort(e)},n.onAdsError=function(e){e.ads.debug("Postroll abort (adserror)"),e.ads.error({errorType:lt.AdsPostrollError}),e.ads.inAdBreak()?e.ads.endLinearAdMode():this.abort(e)},n.onContentChanged=function(e){if(this.isContentResuming()){var t=xt.getState("BeforePreroll");this.transitionTo(t)}else if(!this.inAdBreak()){var n=xt.getState("Preroll");this.transitionTo(n)}},n.onNoPostroll=function(e){this.isContentResuming()||this.inAdBreak()?s.a.log.warn("Unexpected nopostroll event (Postroll)"):this.abort(e)},n.resumeContent=function(e){this.contentResuming=!0,e.addClass("vjs-ad-content-resuming")},n.abort=function(e){var t=xt.getState("AdsDone");this.resumeContent(e),e.removeClass("vjs-ad-loading"),this.transitionTo(t)},n.cleanup=function(e){e.removeClass("vjs-ad-content-resuming"),e.clearTimeout(this._postrollTimeout),e.ads._contentEnding=!1},t}(xt.getState("AdState"));xt.registerState("Postroll",Pt);var Rt=function(e){function t(){return e.apply(this,arguments)||this}nt(t,e),t._getName=function(){return"ContentPlayback"};var n=t.prototype;return n.init=function(e){e.ads._shouldBlockPlay=!1},n.onAdsReady=function(e){e.ads.debug("Received adsready event (ContentPlayback)"),e.ads.nopreroll_||(e.ads.debug("Triggered readyforpreroll event (ContentPlayback)"),e.trigger("readyforpreroll"))},n.onReadyForPostroll=function(e){var t=xt.getState("Postroll");e.ads.debug("Received readyforpostroll event"),this.transitionTo(t)},n.startLinearAdMode=function(){var e=xt.getState("Midroll");this.transitionTo(e)},t}(xt.getState("ContentState"));xt.registerState("ContentPlayback",Rt);var Dt=function(e){function t(){return e.apply(this,arguments)||this}nt(t,e),t._getName=function(){return"StitchedContentPlayback"};var n=t.prototype;return n.init=function(){this.player.ads._shouldBlockPlay=!1}
2,n.onContentChanged=function(){this.player.ads.debug("Received contentchanged event ("+this.constructor._getName()+")")},n.startLinearAdMode=function(){var e=xt.getState("StitchedAdRoll");this.transitionTo(e)},t}(xt.getState("ContentState"));xt.registerState("StitchedContentPlayback",Dt);var Lt=function(e){function t(){return e.apply(this,arguments)||this}nt(t,e),t._getName=function(){return"StitchedAdRoll"};var n=t.prototype;return n.init=function(){this.waitingForAdBreak=!1,this.contentResuming=!1,this.player.ads.adType="stitched",Ct.start(this.player)},n.onPlaying=function(){},n.onContentResumed=function(){},n.onAdEnded=function(){this.endLinearAdMode(),this.player.trigger("ended")},n.endLinearAdMode=function(){var e=xt.getState("StitchedContentPlayback");Ct.end(this.player),this.transitionTo(e)},t}(xt.getState("AdState"));xt.registerState("StitchedAdRoll",Lt);var Mt=function(e){function t(){return e.apply(this,arguments)||this}nt(t,e),t._getName=function(){return"OutstreamPending"};var n=t.prototype;return n.init=function(e){this.adsReady=!1},n.onPlay=function(e){var t=xt.getState("OutstreamPlayback");e.ads.debug("Received play event (OutstreamPending)"),this.transitionTo(t,this.adsReady)},n.onAdsReady=function(e){e.ads.debug("Received adsready event (OutstreamPending)"),this.adsReady=!0},n.onAdsError=function(){this.player.ads.debug("adserror (OutstreamPending)"),this.adsReady=!1},t}(xt.getState("AdState"));xt.registerState("OutstreamPending",Mt);var Nt=function(e){function t(){return e.apply(this,arguments)||this}nt(t,e),t._getName=function(){return"OutstreamPlayback"};var n=t.prototype;return n.init=function(e,t){e.addClass("vjs-ad-loading"),t?this.handleAdsReady():this.abort(e)},n.onAdsReady=function(e){e.ads.inAdBreak()?s.a.log.warn("Unexpected adsready event (Preroll)"):(e.ads.debug("Received adsready event (Preroll)"),this.handleAdsReady())},n.abort=function(e){var t=xt.getState("OutstreamDone");e.removeClass("vjs-ad-loading"),this.transitionTo(t)},n.onAdStarted=function(e){e.removeClass("vjs-ad-loading")},n.handleAdsReady=function(){this.adsReady=!0,this.readyForOutstreamPlayback()},n.readyForOutstreamPlayback=function(){var e=this.player;this.afterLoadStart((function(){e.trigger("readyforoutstream")}))},n.startLinearAdMode=function(){var e=this.player;this.adsReady&&!e.ads.inAdBreak()&&Ct.start(e)},n.cleanup=function(e){e.ads._hasThereBeenALoadStartDuringPlayerLife||s.a.log.warn("Leaving OutstreamPlayback state before loadstart event can cause issues."),this.cleanupPartial(e)},n.cleanupPartial=function(e){e.removeClass("vjs-ad-loading"),e.removeClass("vjs-ad-content-resuming"),this.clearTimeout(e)},n.clearTimeout=function(e){e.clearTimeout(this._timeout),this._timeout=null},n.onAdStarted=function(e){e.removeClass("vjs-ad-loading")},n.onAdsError=function(e){var t=this;s.a.log("adserror (OutstreamPlayback)"),this.inAdBreak()?e.ads.endLinearAdMode():this.afterLoadStart((function(){t.abort(e)}))},n.onAdTimeout=function(e){var t=this;this.afterLoadStart((function(){e.ads.debug("adtimeout (OutstreamPlayback)"),t.abort(e)}))},n.onAdsCanceled=function(e){var t=this;e.ads.debug("adscanceled (OutstreamPlaybac)"),this.afterLoadStart((function(){t.abort(e)}))},n.endLinearAdMode=function(){var e=this;if(this.inAdBreak()){this.player.removeClass("vjs-ad-loading");var t=xt.getState("OutstreamDone");Ct.end(this.player,(function(){e.transitionTo(t)}))}},n.afterLoadStart=function(e){var t=this.player;t.ads._hasThereBeenALoadStartDuringPlayerLife?e():(t.ads.debug("Waiting for loadstart..."),t.one("loadstart",(function(){t.ads.debug("Received loadstart event"),e()})))},n.skipLinearAdMode=function(){var e=this,t=this.player,n=xt.getState("OutstreamDone");this.inAdBreak()?s.a.log.warn("Unexpected skipLinearAdMode invocation"):this.afterLoadStart((function(){t.trigger("adskip"),t.ads.debug("skipLinearAdMode (OutstreamPlayback)"),e.transitionTo(n)}))},t}(xt.getState("AdState"));xt.registerState("OutstreamPlayback",Nt);var Bt=function(e){function t(){return e.apply(this,arguments)||this}nt(t,e),t._getName=function(){return"OutstreamDone"};var n=t.prototype;return n.init=function(e){e.trigger("ended")},n.startLinearAdMode=function(){s.a.log.warn("Unexpected startLinearAdMode invocation (OutstreamDone)")},t}(xt.getState("AdState"));xt.registerState("OutstreamDone",Bt);var Ut,Ft=yt.isMiddlewareMediatorSupported,qt=s.a.getTech("Html5").Events,zt={timeout:5e3,prerollTimeout:void 0,postrollTimeout:void 0,debug:!1,stitchedAds:!1,contentIsLive:void 0,liveCuePoints:!0,allowVjsAutoplay:s.a.options.normalizeAutoplay||!1},Vt=function(e){var t=this,n=s.a.obj.merge(zt,e),i=[];
2qt.concat(["firstplay","loadedalldata"]).forEach((function(e){-1===i.indexOf(e)&&i.push(e)})),t.on(i,et),Ft()||function(e,t){t&&s.a.log("Using cancelContentPlay to block content playback"),e.on("play",ft)}(t,n.debug),t.setTimeout((function(){t.ads._hasThereBeenALoadStartDuringPlayerLife||""===t.src()||s.a.log.error("videojs-contrib-ads has not seen a loadstart event 5 seconds after being initialized, but a source is present. This indicates that videojs-contrib-ads was initialized too late. It must be initialized immediately after video.js in the same tick. As a result, some ads will not play and some media events will be incorrect. For more information, see http://videojs.github.io/videojs-contrib-ads/integrator/getting-started.html")}),5e3),t.on("ended",(function(){t.hasClass("vjs-has-started")||t.addClass("vjs-has-started")})),t.on("contenttimeupdate",(function(){t.removeClass("vjs-waiting")})),t.on(["addurationchange","adcanplay"],(function(){if(!t.ads.settings.stitchedAds&&!t.hasStarted()&&(!t.ads.snapshot||t.currentSrc()!==t.ads.snapshot.currentSrc)&&t.ads.inAdBreak()){var e=t.play();e&&e.catch&&e.catch((function(e){s.a.log.warn("Play promise rejected when playing ad",e)}))}})),t.on("nopreroll",(function(){t.ads.debug("Received nopreroll event"),t.ads.nopreroll_=!0})),t.on("nopostroll",(function(){t.ads.debug("Received nopostroll event"),t.ads.nopostroll_=!0})),t.on("playing",(function(){t.ads._cancelledPlay=!1,t.ads._pausedOnContentupdate=!1})),t.on("play",(function(){t.ads._playRequested=!0})),t.one("loadstart",(function(){t.ads._hasThereBeenALoadStartDuringPlayerLife=!0})),t.on("loadeddata",(function(){t.ads._hasThereBeenALoadedData=!0})),t.on("loadedmetadata",(function(){t.ads._hasThereBeenALoadedMetaData=!0})),t.ads=function(e){return{disableNextSnapshotRestore:!1,_contentEnding:!1,_contentHasEnded:!1,_hasThereBeenALoadStartDuringPlayerLife:!1,_hasThereBeenALoadedData:!1,_hasThereBeenALoadedMetaData:!1,_inLinearAdMode:!1,_shouldBlockPlay:!1,_playBlocked:!1,_playRequested:!1,_error:null,adType:null,VERSION:Ze,reset:function(){e.ads.disableNextSnapshotRestore=!1,e.ads._contentEnding=!1,e.ads._contentHasEnded=!1,e.ads.snapshot=null,e.ads.adType=null,e.ads._hasThereBeenALoadedData=!1,e.ads._hasThereBeenALoadedMetaData=!1,e.ads._cancelledPlay=!1,e.ads._shouldBlockPlay=!1,e.ads._playBlocked=!1,e.ads.nopreroll_=!1,e.ads.nopostroll_=!1,e.ads._playRequested=!1,e.ads._error=null},startLinearAdMode:function(){e.ads._state.startLinearAdMode()},endLinearAdMode:function(){e.ads._state.endLinearAdMode()},skipLinearAdMode:function(){e.ads._state.skipLinearAdMode()},stitchedAds:function(e){return void 0!==e&&(s.a.log.warn("Using player.ads.stitchedAds() as a setter is deprecated, it should be set as an option upon initialization of contrib-ads."),this.settings.stitchedAds=!!e),this.settings.stitchedAds},videoElementRecycled:function(){if(e.ads.shouldPlayContentBehindAd(e))return!1;if(!this.snapshot)throw new Error("You cannot use videoElementRecycled while there is no snapshot.");var t=e.tech_.src()!==this.snapshot.src,n=e.currentSrc()!==this.snapshot.currentSrc;return t||n},isLive:function(t){return void 0===t&&(t=e),"boolean"===typeof t.ads.settings.contentIsLive?t.ads.settings.contentIsLive:t.duration()===1/0||"8"===s.a.browser.IOS_VERSION&&0===t.duration()},shouldPlayContentBehindAd:function(t){if(void 0===t&&(t=e),t)return!!t.ads.settings.liveCuePoints&&!s.a.browser.IS_IOS&&!s.a.browser.IS_ANDROID&&t.duration()===1/0;throw new Error("shouldPlayContentBehindAd requires a player as a param")},shouldTakeSnapshots:function(t){return void 0===t&&(t=e),!this.shouldPlayContentBehindAd(t)&&!this.stitchedAds()},isInAdMode:function(){return this._state.isAdState()},isWaitingForAdBreak:function(){return this._state.isWaitingForAdBreak()},isContentResuming:function(){return this._state.isContentResuming()},isAdPlaying:function(){return this._state.inAdBreak()},inAdBreak:function(){return this._state.inAdBreak()},removeNativePoster:function(){var t=e.$(".vjs-tech");t&&t.removeAttribute("poster")},debug:function(){if(this.settings.debug){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];1===t.length&&"string"===typeof t[0]?s.a.log("ADS: "+t[0]):s.a.log.a
2pply(s.a,["ADS:"].concat(t))}},error:function(t){if(void 0===t)return this._error||null;null!==t&&t.errorType?(this._error=t,s.a.log.error("An error with Ads occured. Type: "+t.errorType+"."),e.trigger({type:"vjsadserror",error:this._error})):this._error=null}}}(t),t.ads.settings=n,n.stitchedAds=!!n.stitchedAds,"outstream"===n.playerMode?(t.src(Tt),t.ads._state=new(xt.getState("OutstreamPending"))(t)):n.stitchedAds?t.ads._state=new(xt.getState("StitchedContentPlayback"))(t):t.ads._state=new(xt.getState("BeforePreroll"))(t),t.ads._state.init(t),t.ads.cueTextTracks=pt,t.ads.adMacroReplacement=ht.bind(t),function(e){e.ads.contentSrc=e.currentSrc(),e.ads._seenInitialLoadstart=!1,e.on("loadstart",(function(){if(!e.ads.inAdBreak()){var t=e.currentSrc();t!==e.ads.contentSrc&&(e.ads._seenInitialLoadstart&&e.trigger({type:"contentchanged"}),e.trigger({type:"contentupdate",oldValue:e.ads.contentSrc,newValue:t}),e.ads.contentSrc=t),e.ads._seenInitialLoadstart=!0}}))}(t),t.on("contentchanged",t.ads.reset);var r=function(){var e=t.textTracks();if(!t.ads.shouldPlayContentBehindAd(t)&&t.ads.inAdBreak()&&t.tech_.featuresNativeTextTracks&&s.a.browser.IS_IOS&&!Array.isArray(t.textTracks()))for(var n=0;n<e.length;n++){var i=e[n];"showing"===i.mode&&(i.mode="disabled")}};t.ready((function(){t.textTracks().addEventListener("change",r)})),t.on(["play","playing","ended","adsready","adscanceled","adskip","adserror","adtimeout","adended","ads-ad-started","ads-ad-skipped","contentchanged","dispose","contentresumed","readyforpostroll","nopreroll","nopostroll"],(function(e){t.ads._state.handleEvent(e.type)})),t.on("dispose",(function(){t.ads.reset(),t.textTracks().removeEventListener("change",r)})),st(),ot((function(){})),t.ads.listenToTcf=st,t.ads.updateUsPrivacyString=function(e){return ot(e)}};Vt.Error=lt,Vt.VERSION=Ze,Ut=Vt,!function(){if(s.a.getPlugin)return Boolean(s.a.getPlugin("ads"));var e=s.a.getComponent("Player");return Boolean(e&&e.prototype.ads)}(s.a)&&((s.a.registerPlugin||s.a.plugin)("ads",Ut),_t()&&!s.a.usingContribAdsMiddleware_&&(s.a.use("*",vt),s.a.usingContribAdsMiddleware_=!0,s.a.log.debug("Play middleware has been registered with videojs")));!function(e,t,n,i){(n.registerPlugin||n.plugin)("academiaAds",(function(e){var t=this,n={},r=e.progress,a=e&&e.pre_roll!==i,o=(e&&e.mid_roll,e&&e.post_roll,function(){n={},t.trigger("adsready")}),l=function(e){t.controlBar.childNameIndex_.VjsBackward.el_.classList[e]("disabled"),t.controlBar.childNameIndex_.VjsForward.el_.classList[e]("disabled"),t.controlBar.childNameIndex_.VjsLocalization.el_.classList[e]("disabled"),t.controlBar.childNameIndex_.VjsNextLesson&&t.controlBar.childNameIndex_.VjsNextLesson.el_.classList[e]("disabled"),t.controlBar.childNameIndex_.VjsPlaybackRate.el_.classList[e]("disabled"),t.controlBar.childNameIndex_.vjsChromecast&&t.controlBar.childNameIndex_.vjsChromecast.el_.classList[e]("vjs-hidden")},c=function(e,i){if(e&&0!==e.length){var r,a;n[i]||(n[i]=0),n.video||(n.video={},n.video.title=(r="vjsTitle",a="title",t.getChild(r).el_.getElementsByClassName(a)[0]).innerHTML),t.setState({...t.state,currentAd:e[n[i]],typeAd:i}),t.ads.startLinearAdMode(),n.adPlaying=!0,l("add");var o=e[n[i]].url;t.src(o),t.trigger("ads-ad-started"),t.one("adended",(function(){t.trigger("ads-ad-ended-no-skip"),n[i]++,n[i]<e.length?c(e,i):t.trigger("ads-ad-ended")}))}else s.a.log("No inventory to play.")};t.ads(e),e.enabled&&o(),t.on("adsready",(function(){a||t.trigger("nopreroll")})),t.on("contentchanged",(function(){o()})),t.on("ads-ad-ended",(function(){console.log("[ACA ADS] ads-ad-ended, progress:",r),t.setState({...t.state,currentAd:null,typeAd:null}),t.ads.endLinearAdMode(),n.adPlaying=!1,l("remove");const e=Number(r)||0;if(e<=0)return;const i=()=>{t.currentTime(e),t.off("contentresumed",i),t.off("loadedmetadata",i)};t.readyState()>=1?setTimeout((()=>{i()}),1500):(t.one("contentresumed",i),t.one("loadedmetadata",i))})),t.on("readyforpreroll",(function(){!n.prerollPlayed&&a&&(n.prerollPlayed=!0,c(e.pre_roll,"preroll"))}))}))}(window,document,s.a);const Ht=r.a.memo((e=>{let t;const{t:n,i18n:i}=Object(a.a)(),u=new URLSearchParams(window.location.search).get("lesson_progress"),h=r.a.useRef(null),p=r.a.useRef(!1),g=Object(c.h)(),f=r.a.useRef(null),y=r.a.useRef(null),b=r.a.useRef({}),[v,_]=r.a.useState(!1),{request:T,cancelToken:x}=r.a.useContext(d.a),S=e.video?u||(e.video.lesson.progress>=e.video.lesson.duration?0:e.video.lesson.progress):0,A=e.video?e.video.lesson.id:null,w=e.trailer?{course_id:e.video.course.id}:{video_id:A},j=()=>Object(m.jsx)("div",{ref:y,"data-vjs-player":!0,...e.containerProps,children:Object(m.jsx)("video",{ref:f,playsInl
2ine:!0,className:e.className?e.className+" video-js vjs-big-play-centered":"video-js vjs-big-play-centered"})}),k=t=>{e.packageType?g.push(Object(c.f)("/:lang/:package/:classSlug/:modules/:moduleSlug/:lessons/:chapterSlug",{lang:i.language,package:e.packageType.translation,classSlug:t.course.package.slug,modules:n("moduli"),moduleSlug:t.course.slug,lessons:n("lezioni"),chapterSlug:t.slug})):g.push(Object(c.f)("/:lang/:courses/:courseSlug/:lessons/:lessonSlug",{lang:i.language,courses:e.isHoreca?n("horeca"):n("corsi"),courseSlug:t.course_slug,lessons:n("lezioni"),lessonSlug:t.slug}))},C=()=>{if(window.__CAST_READY__&&t&&t.hasClass("vjs-casting")){const a=window.cast.framework.CastContext.getInstance().getCurrentSession();if(a){const o=a.getMediaSession();if(o){const a=t.currentTime();var e,n,i,r,s;if(Math.abs(o.getEstimatedTime()-a)>1)p.current=!0,E(),o.seek({currentTime:a,resumeState:null===(e=window)||void 0===e||null===(n=e.chrome)||void 0===n||null===(i=n.cast)||void 0===i||null===(r=i.media)||void 0===r||null===(s=r.SeekResumeState)||void 0===s?void 0:s.PLAYBACK_START}),setTimeout((()=>{p.current=!1,O()}),1e3)}}}},O=()=>{h.current||(h.current=setInterval((()=>{if(!p.current&&window.__CAST_READY__&&t&&t.hasClass("vjs-casting")){const e=window.cast.framework.CastContext.getInstance().getCurrentSession();if(e){const n=e.getMediaSession();if(n){const e=n.getEstimatedTime();t.currentTime(e),t.trigger("timeupdate");const i=t.controlBar&&t.controlBar.playToggle;i&&i.el_&&i.el_.classList&&(i.el_.classList.remove("vjs-playing"),i.el_.classList.remove("vjs-paused"),"PLAYING"===n.playerState?i.el_.classList.add("vjs-playing"):"PAUSED"!==n.playerState&&"IDLE"!==n.playerState||i.el_.classList.add("vjs-paused"))}}}}),500))},E=()=>{h.current&&(clearInterval(h.current),h.current=null)},I=(e,t)=>{if(window.__CAST_READY__){const n=window.cast.framework.CastContext.getInstance().getCurrentSession();if(n){const i=n.getMediaSession();if(i&&i.media&&i.media.tracks){const n=i.media.tracks;let r=[];if(e){const t=((e,t)=>{console.log(e,t);const n=t.find((t=>"AUDIO"===t.type&&t.name===e));return n?n.trackId:null})(e,n);null!==t&&r.push(t)}if(t){const e=((e,t)=>{console.log(e,t);const n=t.find((t=>"SUBTITLE"===t.subtype&&t.name===e));return n?n.trackId:null})(t,n);null!==e&&r.push(e)}const s=new window.chrome.cast.media.EditTracksInfoRequest(r);i.editTracksInfo(s)}}}},P=()=>{if(window.__CAST_READY__&&t&&t.play){const n=window.cast.framework.CastContext.getInstance();E(),n.addEventListener(window.cast.framework.CastContextEventType.SESSION_STATE_CHANGED,(function(e){switch(e.sessionState){case window.cast.framework.SessionState.SESSION_STARTED:t.addClass("vjs-casting"),t.pause(),O();break;case window.cast.framework.SessionState.SESSION_RESUMED:break;case window.cast.framework.SessionState.SESSION_ENDED:t.removeClass("vjs-casting"),E(),t.play()}})),n.requestSession().then((async()=>{const i=new window.chrome.cast.media.MediaInfo(e.options.sources[0].src,e.options.sources[0].type);i.customData={maxVideoHeight:e.maxHeight};const r=new window.chrome.cast.media.LoadRequest(i);r.currentTime=t.currentTime();const s=n.getCurrentSession();s&&(await s.loadMedia(r),O())}))}else alert("Chromecast non disponibile o SDK non caricata!")},R=()=>{if(window.__CAST_READY__&&t.hasClass("vjs-casting")){const e=window.cast.framework.CastContext.getInstance().getCurrentSession();if(e){const n=e.getMediaSession();n&&"PLAYING"!==n.playerState?n.play():n&&"PLAYING"===n.playerState&&n.pause(),t.pause()}}},D=async(e,t)=>{const n=x.source(),i=await T("get",e,n.token);i&&t&&t(i)},L=async(e,t)=>{const n=x.source();return await T("post","/v2/events/lesson",n.token,{l:A,e:e,t:t},!0)},M=async(e,t,n)=>{const i=x.source();return await T("post","/v2/events/adv-campaign/"+t+"/"+e,i.token,n,!0)},N=async(n,i)=>{const r=Math.round(i/n*100);25!==r||Boolean(b.current.firstQuarter)?50!==r||Boolean(b.current.midPoint)?75!==r||Boolean(b.current.thirdQuarter)||(b.current.thirdQuarter=!0,t.state.currentAd?Object(o.a)("video_adv_third_quartile",{video_id:A,video_adv_id:t.state.currentAd.adv_campaign_id,video_adv_name:t.state.currentAd.title,video_adv_type:t.state.typeAd}):Object(o.a)(e.trailer?"trailer_third_quartile":"video_third_quartile",w)):(b.current.midPoint=!0,t.state.currentAd?Object(o.a)("video_adv_mid_point",{video_id:A,video_adv_id:t.state.currentAd.adv_campaign_id,video_adv_name:t.state.currentAd.title,video_adv_type:t.state.typeAd}):Object(o.a)(e.trailer?"trailer_mid_point":"video_mid_point",w)):(b.current.firstQuarter=!0,t.state.currentAd?Object(o.a)("video_adv_first_quartile",{video_id:A,video_adv_id:t.state.currentAd.adv_campaign_id,video_adv_name:t.state.currentAd.title,video_adv_type:t.state.typeAd}):Object(o.a)(e.trailer?"trailer_first_quartile":"video_first_quartile",w))};return r.a.useEffect((()=>()=>{h.current&&(clearInterval(h.current),h.current=null)}),[]),r.a.useEffect((()=>{const n={playsinline:!0,poster:!!e.poster&&Object(l.m)(e.poster,Math.round(2*y.current.clientWidth)),responsive:!0,fluid:!0,controls:!0,muted:!1,preload:"auto",techOrder:["html5"],playbackRates:[.75,1,1.25],withCredentials:!0,html5:{enableSourceset:!1,vhs:{overrideNative:!s.a.browser.IS_SAFARI,withCredentials:!0},nativeVideoTracks:s.a.browser.IS_SAFARI||s.a.browser.IS_CHROME,nativeAudioTracks:s.a.browser.IS_SAFARI||s.a.browser.IS_CHROME,nativeTextTracks:s.a.browser.IS_SAFARI||s.a.browser.IS_CHROME}
2,controlBar:{children:["playToggle","remainingTimeDisplay","progressControl","volumePanel","fullscreenToggle"]},sources:[{type:"application/x-mpegURL"}]},i=f.current;if(!i)return;t=Object(s.a)(i,{...n,...e.options});const r=e.video&&!!e.video.video_ads&&e.video.video_ads.enabled&&!!e.video.video_ads.pre_roll.length;return r&&t.academiaAds({...e.video.video_ads,progress:S}),t.ready((()=>{window.bodymovin.loadAnimation({wrapper:t.getChild("loadingSpinner").el(),animType:"svg",loop:!0,animationData:Ge,rendererSettings:{preserveAspectRatio:"xMidYMid slice"},renderConfig:{viewBoxOnly:!0}}),r||t.currentTime(S),e.disableAutoplay||(t.play(),e.fireEvents&&e.trailer&&Object(o.a)("watch_trailer",w))})),(t=>{t.getChild("controlBar").addChild("vjsBackward",{package:e.packageType,isHoreca:e.isHoreca,video:e.video,anchorRef:y},1),t.getChild("controlBar").addChild("vjsForward",{package:e.packageType,isHoreca:e.isHoreca,video:e.video,anchorRef:y},2),t.getChild("controlBar").addChild("vjsPlaybackRate",{package:e.packageType,isHoreca:e.isHoreca,video:e.video,anchorRef:y},6),e.video&&e.video.lesson_next&&t.getChild("controlBar").addChild("vjsNextLesson",{package:e.packageType,isHoreca:e.isHoreca,video:e.video,handleClickLesson:k,anchorRef:y},7),(e.title||e.video&&e.video.video_ads)&&t.addChild("vjsTitle",{package:e.packageType,isHoreca:e.isHoreca,video:e.video,handleEvent:M}),t.addChild("vjsSkipAd",{package:e.packageType,isHoreca:e.isHoreca,video:e.video,handleEvent:M}),e.mute&&t.addChild("vjsMute",{package:e.packageType,isHoreca:e.isHoreca,video:e.video}),t.getChild("controlBar").addChild("vjsLocalization",{package:e.packageType,isHoreca:e.isHoreca,handleSyncChromecastTracks:I,video:e.video,anchorRef:y},6),window.__CAST_READY__&&!t.getChild("controlBar").getChild("vjsChromecast")&&t.getChild("controlBar").addChild("vjsChromecast",{package:e.packageType,isHoreca:e.isHoreca,handleChromeCast:()=>P(),video:e.video,anchorRef:y}),e.disableEndLesson||t.addChild("vjsEndLesson",{package:e.packageType,isHoreca:e.isHoreca,video:e.video,handleClickLesson:k,handleRequest:D,handleEvent:L})})(t),e.fireEvents&&(t=>{t.on("ads-ad-started",(function(){Object(o.a)("video_adv_start",{video_id:A,video_adv_id:t.state.currentAd.adv_campaign_id,video_adv_name:t.state.currentAd.title,video_adv_type:t.state.typeAd})})),t.on("play",(t=>{Object(o.a)(e.trailer?"trailer_start":"video_start",w)})),t.on("pause",(n=>{t.state.currentAd||(e.trailer||L("lw",Math.round(t.currentTime())),Object(o.a)(e.trailer?"trailer_stop":"video_stop",w))})),t.on("timeupdate",(e=>{t.state.currentAd&&t.trigger("aca-timeupdate"),N(t.duration(),Math.round(t.currentTime()))})),t.on("ended",(t=>{Object(o.a)(e.trailer?"trailer_completed":"video_completed",w)})),t.on("ads-ad-ended-no-skip",(()=>{Object(o.a)("video_adv_completed",{video_id:A,video_adv_id:t.state.currentAd.adv_campaign_id,video_adv_name:t.state.currentAd.title,video_adv_type:t.state.typeAd}),M("view",t.state.currentAd.session_id,{adv_campaign_id:t.state.currentAd.adv_campaign_id,lesson_id:e.video.lesson.id,skipped:!1,elapsed:t.duration()})}))})(t),window.__CAST_READY__&&(t.on("seeked",C),t.on("seeking",C),t.on("play",R),t.on("pause",R)),()=>{t&&t.el()&&(A&&L("lw",Math.round(t.currentTime())),window.__CAST_READY__&&(t.off("seeked",C),t.off("seeking",C)),t.dispose())}}),[e.options]),Object(m.jsx)(j,{})}));t.a=Ht},291:function(e,t){},292:function(e,t,n){"use strict";var i=n(194),r=n(83),s=n(293),a=n(294),o=n(295);d.httpHandler=n(296),d.requestInterceptorsStorage=new a,d.responseInterceptorsStorage=new a,d.retryManager=new o;var l=function(e){var t={};return e?(e.trim().split("\n").forEach((function(e){var n=e.indexOf(":"),i=e.slice(0,n).trim().toLowerCase(),r=e.slice(n+1).trim();"undefined"===typeof t[i]?t[i]=r:Array.isArray(t[i])?t[i].push(r):t[i]=[t[i],r]})),t):t};function c(e,t,n){var i=e;return s(t)?(n=t,"string"===typeof e&&(i={uri:e})):i=r({},t,{uri:e}),i.callback=n,i}function d(e,t,n){return u(t=c(e,t,n))}function u(e){if("undefined"===typeof e.callback)throw new Error("callback argument missing");if(e.requestType&&d.requestInterceptorsStorage.getIsEnabled()){var t={uri:e.ur
2i||e.url,headers:e.headers||{},body:e.body,metadata:e.metadata||{},retry:e.retry,timeout:e.timeout},n=d.requestInterceptorsStorage.execute(e.requestType,t);e.uri=n.uri,e.headers=n.headers,e.body=n.body,e.metadata=n.metadata,e.retry=n.retry,e.timeout=n.timeout}var i=!1,r=function(t,n,r){i||(i=!0,e.callback(t,n,r))};function s(){var e=void 0;if(e=p.response?p.response:p.responseText||function(e){try{if("document"===e.responseType)return e.responseXML;var t=e.responseXML&&"parsererror"===e.responseXML.documentElement.nodeName;if(""===e.responseType&&!t)return e.responseXML}catch(n){}return null}(p),_)try{e=JSON.parse(e)}catch(t){}return e}function a(t){if(clearTimeout(g),clearTimeout(e.retryTimeout),t instanceof Error||(t=new Error(""+(t||"Unknown XMLHttpRequest Error"))),t.statusCode=0,h||!d.retryManager.getIsEnabled()||!e.retry||!e.retry.shouldRetry()){if(e.requestType&&d.responseInterceptorsStorage.getIsEnabled()){var n={headers:T.headers||{},body:T.body,responseUrl:p.responseURL,responseType:p.responseType},i=d.responseInterceptorsStorage.execute(e.requestType,n);T.body=i.body,T.headers=i.headers}return r(t,T)}e.retryTimeout=setTimeout((function(){e.retry.moveToNextAttempt(),e.xhr=p,u(e)}),e.retry.getCurrentFuzzedDelay())}function o(){if(!h){var t;clearTimeout(g),clearTimeout(e.retryTimeout),t=e.useXDR&&void 0===p.status?200:1223===p.status?204:p.status;var n=T,i=null;if(0!==t?(n={body:s(),statusCode:t,method:f,headers:{},url:m,rawRequest:p},p.getAllResponseHeaders&&(n.headers=l(p.getAllResponseHeaders()))):i=new Error("Internal XMLHttpRequest Error"),e.requestType&&d.responseInterceptorsStorage.getIsEnabled()){var a={headers:n.headers||{},body:n.body,responseUrl:p.responseURL,responseType:p.responseType},o=d.responseInterceptorsStorage.execute(e.requestType,a);n.body=o.body,n.headers=o.headers}return r(i,n,n.body)}}var c,h,p=e.xhr||null;p||(p=e.cors||e.useXDR?new d.XDomainRequest:new d.XMLHttpRequest);var g,m=p.url=e.uri||e.url,f=p.method=e.method||"GET",y=e.body||e.data,b=p.headers=e.headers||{},v=!!e.sync,_=!1,T={body:void 0,headers:{},statusCode:0,method:f,url:m,rawRequest:p};if("json"in e&&!1!==e.json&&(_=!0,b.accept||b.Accept||(b.Accept="application/json"),"GET"!==f&&"HEAD"!==f&&(b["content-type"]||b["Content-Type"]||(b["Content-Type"]="application/json"),y=JSON.stringify(!0===e.json?y:e.json))),p.onreadystatechange=function(){4!==p.readyState||d.responseInterceptorsStorage.getIsEnabled()||setTimeout(o,0)},p.onload=o,p.onerror=a,p.onprogress=function(){},p.onabort=function(){h=!0,clearTimeout(e.retryTimeout)},p.ontimeout=a,p.open(f,m,!v,e.username,e.password),v||(p.withCredentials=!!e.withCredentials),!v&&e.timeout>0&&(g=setTimeout((function(){if(!h){h=!0,p.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",a(e)}}),e.timeout)),p.setRequestHeader)for(c in b)b.hasOwnProperty(c)&&p.setRequestHeader(c,b[c]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(p.responseType=e.responseType),"beforeSend"in e&&"function"===typeof e.beforeSend&&e.beforeSend(p),p.send(y||null),p}e.exports=d,e.exports.default=d,d.XMLHttpRequest=i.XMLHttpRequest||function(){},d.XDomainRequest="withCredentials"in new d.XMLHttpRequest?d.XMLHttpRequest:i.XDomainRequest,function(e,t){for(var n=0;n<e.length;n++)t(e[n])}(["get","put","post","patch","head","delete"],(function(e){d["delete"===e?"del":e]=function(t,n,i){return(n=c(t,n,i)).method=e.toUpperCase(),u(n)}}))},293:function(e,t){e.exports=function(e){if(!e)return!1;var t=n.call(e);return"[object Function]"===t||"function"===typeof e&&"[object RegExp]"!==t||"undefined"!==typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)};var n=Object.prototype.toString},294:function(e,t,n){"use strict";function i(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var i=0;return function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var s=function(){function e(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1}var t=e.prototype;return t.getIsEnabled=function(){return this.enabled_},t.enable=function(){this.enabled_=!0},t.disable=function(){this.enabled_=!1},t.reset=function(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1},t.addInterceptor=function(e,t){this.typeToInterceptorsMap_.has(e)||this.typeToInterceptorsMap_.set(e,new Set);var n=this.typeToInterceptorsMap_.get(e);return!n.has(t)&&(n.add(t),!0)},t.removeInterceptor=function(e,t){var n=this.typeToInterceptorsMap_.get(e);return!(!n||!n.has(t))&&(n.delete(t),!0)},t.clearInterceptorsByType=function(e){return!!this.typeToInterceptorsMap_.get(e)&&(this.t
vendor: 6,522 bytes, line 2
2ypeToInterceptorsMap_.delete(e),this.typeToInterceptorsMap_.set(e,new Set),!0)},t.clear=function(){return!!this.typeToInterceptorsMap_.size&&(this.typeToInterceptorsMap_=new Map,!0)},t.getForType=function(e){return this.typeToInterceptorsMap_.get(e)||new Set},t.execute=function(e,t){for(var n,r=i(this.getForType(e));!(n=r()).done;){var s=n.value;try{t=s(t)}catch(a){}}return t},e}();e.exports=s},295:function(e,t,n){"use strict";var i=function(){function e(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1}var t=e.prototype;return t.getIsEnabled=function(){return this.enabled_},t.enable=function(){this.enabled_=!0},t.disable=function(){this.enabled_=!1},t.reset=function(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1},t.getMaxAttempts=function(){return this.maxAttempts_},t.setMaxAttempts=function(e){this.maxAttempts_=e},t.getDelayFactor=function(){return this.delayFactor_},t.setDelayFactor=function(e){this.delayFactor_=e},t.getFuzzFactor=function(){return this.fuzzFactor_},t.setFuzzFactor=function(e){this.fuzzFactor_=e},t.getInitialDelay=function(){return this.initialDelay_},t.setInitialDelay=function(e){this.initialDelay_=e},t.createRetry=function(e){var t=void 0===e?{}:e,n=t.maxAttempts,i=t.delayFactor,s=t.fuzzFactor,a=t.initialDelay;return new r({maxAttempts:n||this.maxAttempts_,delayFactor:i||this.delayFactor_,fuzzFactor:s||this.fuzzFactor_,initialDelay:a||this.initialDelay_})},e}(),r=function(){function e(e){this.maxAttempts_=e.maxAttempts,this.delayFactor_=e.delayFactor,this.fuzzFactor_=e.fuzzFactor,this.currentDelay_=e.initialDelay,this.currentAttempt_=1}var t=e.prototype;return t.moveToNextAttempt=function(){this.currentAttempt_++;var e=this.currentDelay_*this.delayFactor_;this.currentDelay_=this.currentDelay_+e},t.shouldRetry=function(){return this.currentAttempt_<this.maxAttempts_},t.getCurrentDelay=function(){return this.currentDelay_},t.getCurrentMinPossibleDelay=function(){return(1-this.fuzzFactor_)*this.currentDelay_},t.getCurrentMaxPossibleDelay=function(){return(1+this.fuzzFactor_)*this.currentDelay_},t.getCurrentFuzzedDelay=function(){var e=this.getCurrentMinPossibleDelay(),t=this.getCurrentMaxPossibleDelay();return e+Math.random()*(t-e)},e}();e.exports=i},296:function(e,t,n){"use strict";var i=n(194);e.exports=function(e,t){return void 0===t&&(t=!1),function(n,r,s){if(n)e(n);else if(r.statusCode>=400&&r.statusCode<=599){var a=s;if(t)if(i.TextDecoder){var o=function(e){void 0===e&&(e="");return e.toLowerCase().split(";").reduce((function(e,t){var n=t.split("="),i=n[0],r=n[1];return"charset"===i.trim()?r.trim():e}),"utf-8")}(r.headers&&r.headers["content-type"]);try{a=new TextDecoder(o).decode(s)}catch(l){}}else a=String.fromCharCode.apply(null,new Uint8Array(s));e({cause:a})}else e(null,s)}}},297:function(e,t,n){var i=n(194),r=e.exports={WebVTT:n(298),VTTCue:n(299),VTTRegion:n(300)};i.vttjs=r,i.WebVTT=r.WebVTT;var s=r.VTTCue,a=r.VTTRegion,o=i.VTTCue,l=i.VTTRegion;r.shim=function(){i.VTTCue=s,i.VTTRegion=a},r.restore=function(){i.VTTCue=o,i.VTTRegion=l},i.VTTCue||r.shim()},298:function(e,t,n){var i=n(237),r=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return e.prototype=t,new e}}();function s(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}function a(e){function t(e,t,n,i){return 3600*(0|e)+60*(0|t)+(0|n)+(0|i)/1e3}var n=e.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return n?n[3]?t(n[1],n[2],n[3].replace(":",""),n[4]):n[1]>59?t(n[1],n[2],0,n[4]):t(0,n[1],n[2],n[4]):null}function o(){this.values=r(null)}function l(e,t,n,i){var r=i?e.split(i):[e];for(var s in r)if("string"===typeof r[s]){var a=r[s].split(n);if(2===a.length)t(a[0].trim(),a[1].trim())}}function c(e,t,n){var i=e;function r(){var t=a(e);if(null===t)throw new s(s.Errors.BadTimeStamp,"Malformed timestamp: "+i);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function c(){e=e.replace(/^\s+/,"")}if(c(),t.startTime=r(),c(),"--\x3e"!==e.substr(0,3))throw new s(s.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+i);e=e.substr(3),c(),t.endTime=r(),c(),function(e,t){var i=new o;l(e,(function(e,t){switch(e){case"region":for(var r=n.length-1;r>=0;r--)if(n[r].id===t){i.set(e,n[r].region);break}break;case"vertical":i.alt(e,t,["rl","lr"]);break;case"line":var s=t.split(","),a=s[0];i.integer(e,a),i.percent(e,a)&&i.set("snapToLines",!1),i.alt(e,a,["auto"]),2===s.length&&i.alt("lineAlign",s[1],["start","center","end"]);break;case"position":s=t.split(","),i.percent(e,s[0]),2===s.length&&i.alt("positionAlign",s[1],["start","center","end"]);break;case"size":i.percent(e,t);break;case"align":i.alt(e,t,["start","center","end","left","right"])}}),/:/,/\s/),t.region=i.get("region",null),t.vertical=i.get("vertical","");try{t.line=i.get("line","auto")}catch(r){}t.lineAlign=i.get("lineAlign","start"),t.snapToLines=i.get("snapToLines",!0),t.size=i.get("size",100);try{t.align=i.get("align","center")}catch(r){t.align=i.get("align","middle")}try{t.position=i.get("position","auto")}catch(r){t.position=i.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},t.align)}t.positionAlign=i.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},t.align)}(e,t)}s.prototype=r(Error.prototype),s.prototype.constructor=s,s.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},o.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,n){for(var i=0;i<n.length;++i)if(t===n[i]){this.set(e,t);break}},integer:function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var d=i.createElement&&i.createElement("textarea"),u={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},h={white:"rgba(255,255,255,1)",lime:"rgba(0,255,0,1)",cyan:"rgba(0,255,255,1)",red:"rgba(255,0,0,1)",yellow:"rgba(255,255,0,1)",magenta:"rgba(255,0,255,1)",blue:"rgba(0,0,255,1)",black:"rgba(0,0,0,1)"},p={v:"title",lang:"lang"},g={rt:"ruby"};function m(e,t){function n(){if(!t)return null;var e,n=t.match(/^([^<]*)(<[^>
2]*>?)?/);return e=n[1]?n[1]:n[2],t=t.substr(e.length),e}function i(e,t){return!g[t.localName]||g[t.localName]===e.localName}function r(t,n){var i=u[t];if(!i)return null;var r=e.document.createElement(i),s=p[t];return s&&n&&(r[s]=n.trim()),r}for(var s,o,l=e.document.createElement("div"),c=l,m=[];null!==(s=n());)if("<"!==s[0])c.appendChild(e.document.createTextNode((o=s,d.innerHTML=o,o=d.textContent,d.textContent="",o)));else{if("/"===s[1]){m.length&&m[m.length-1]===s.substr(2).replace(">","")&&(m.pop(),c=c.parentNode);continue}var f,y=a(s.substr(1,s.length-2));if(y){f=e.document.createProcessingInstruction("timestamp",y),c.appendChild(f);continue}var b=s.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!b)continue;if(!(f=r(b[1],b[3])))continue;if(!i(c,f))continue;if(b[2]){var v=b[2].split(".");v.forEach((function(e){var t=/^bg_/.test(e),n=t?e.slice(3):e;if(h.hasOwnProperty(n)){var i=t?"background-color":"color",r=h[n];f.style[i]=r}})),f.className=v.join(" ")}m.push(b[1]),c.appendChild(f),c=f}return l}var f=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function y(e){for(var t=0;t<f.length;t++){var n=f[t];if(e>=n[0]&&e<=n[1])return!0}return!1}function b(e){var t=[],n="";if(!e||!e.childNodes)return"ltr";function i(e,t){for(var n=t.childNodes.length-1;n>=0;n--)e.push(t.childNodes[n])}function r(e){if(!e||!e.length)return null;var t=e.pop(),n=t.textContent||t.innerText;if(n){var s=n.match(/^.*(\n|\r)/);return s?(e.length=0,s[0]):n}return"ruby"===t.tagName?r(e):t.childNodes?(i(e,t),r(e)):void 0}for(i(t,e);n=r(t);)for(var s=0;s<n.length;s++)if(y(n.charCodeAt(s)))return"rtl";return"ltr"}function v(){}function _(e,t,n){v.call(this),this.cue=t,this.cueDiv=m(e,t.text);var i={color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(i,this.cueDiv),this.div=e.document.createElement("div"),i={direction:b(this.cueDiv),writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:"middle"===t.align?"center":t.align,font:n.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(i),this.div.appendChild(this.cueDiv);var r=0;switch(t.positionAlign){case"start":case"line-left":r=t.position;break;case"center":r=t.position-t.size/2;break;case"end":case"line-right":r=t.position-t.size}""===t.vertical?this.applyStyles({left:this.formatStyle(r,"%"),width:this.formatStyle(t.size,"%")}):this.applyStyles({top:this.formatStyle(r,"%"),height:this.formatStyle(t.size,"%")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,"px"),bottom:this.formatStyle(e.bottom,"px"),left:this.formatStyle(e.left,"px"),right:this.formatStyle(e.right,"px"),height:this.formatStyle(e.height,"px"),width:this.formatStyle(e.width,"px")}
vendor: 11,136 bytes, line 2
2)}}function T(e){var t,n,i,r;if(e.div){n=e.div.offsetHeight,i=e.div.offsetWidth,r=e.div.offsetTop;var s=(s=e.div.childNodes)&&(s=s[0])&&s.getClientRects&&s.getClientRects();e=e.div.getBoundingClientRect(),t=s?Math.max(s[0]&&s[0].height||0,e.height/s.length):0}this.left=e.left,this.right=e.right,this.top=e.top||r,this.height=e.height||n,this.bottom=e.bottom||r+(e.height||n),this.width=e.width||i,this.lineHeight=void 0!==t?t:e.lineHeight}function x(e,t,n,i){var r=new T(t),s=t.cue,a=function(e){if("number"===typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,n=t.textTrackList,i=0,r=0;r<n.length&&n[r]!==t;r++)"showing"===n[r].mode&&i++;return-1*++i}(s),o=[];if(s.snapToLines){var l;switch(s.vertical){case"":o=["+y","-y"],l="height";break;case"rl":o=["+x","-x"],l="width";break;case"lr":o=["-x","+x"],l="width"}var c=r.lineHeight,d=c*Math.round(a),u=n[l]+c,h=o[0];Math.abs(d)>u&&(d=d<0?-1:1,d*=Math.ceil(u/c)*c),a<0&&(d+=""===s.vertical?n.height:n.width,o=o.reverse()),r.move(h,d)}else{var p=r.lineHeight/n.height*100;switch(s.lineAlign){case"center":a-=p/2;break;case"end":a-=p}switch(s.vertical){case"":t.applyStyles({top:t.formatStyle(a,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(a,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(a,"%")})}o=["+y","-x","+x","-y"],r=new T(t)}var g=function(e,t){for(var r,s=new T(e),a=1,o=0;o<t.length;o++){for(;e.overlapsOppositeAxis(n,t[o])||e.within(n)&&e.overlapsAny(i);)e.move(t[o]);if(e.within(n))return e;var l=e.intersectPercentage(n);a>l&&(r=new T(e),a=l),e=new T(s)}return r||s}(r,o);t.move(g.toCSSCompatValues(n))}function S(){}v.prototype.applyStyles=function(e,t){for(var n in t=t||this.div,e)e.hasOwnProperty(n)&&(t.style[n]=e[n])},v.prototype.formatStyle=function(e,t){return 0===e?0:e+t},_.prototype=r(v.prototype),_.prototype.constructor=_,T.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case"+x":this.left+=t,this.right+=t;break;case"-x":this.left-=t,this.right-=t;break;case"+y":this.top+=t,this.bottom+=t;break;case"-y":this.top-=t,this.bottom-=t}},T.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},T.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},T.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},T.prototype.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.left<e.left;case"-x":return this.right>e.right;case"+y":return this.top<e.top;case"-y":return this.bottom>e.bottom}},T.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},T.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},T.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,n=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,i=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||i,height:e.height||t,bottom:e.bottom||i+(e.height||t),width:e.width||n}},S.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!==typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},S.convertCueToDOMTree=function(e,t){return e&&t?m(e,t):null};S.processCues=function(e,t,n){if(!e||!t||!n)return null;for(;n.firstChild;)n.removeChild(n.firstChild);var i=e.document.createElement("div");if(i.style.position="absolute",i.style.left="0",i.style.right="0",i.style.top="0",i.style.bottom="0",i.style.margin="1.5%",n.appendChild(i),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(t)){var r=[],s=T.getSimpleBoxPosition(i),a={font:Math.round(.05*s.height*100)/100+"px sans-serif"};!function(){for(var n,o,l=0;l<t.length;l++)o=t[l],n=new _(e,o,a),i.appendChild(n.div),x(0,n,s,r),o.displayState=n.div,r.push(T.getSimpleBoxPosition(n))}()}else for(var o=0;o<t.length;o++)i.appendChild(t[o].displayState)},S.Parser=function(e,t,n){n||(n=t,t={}),t||(t={}),this.window=e,this.vttjs=t,this.state="INITIAL",this.buffer="",this.decoder=n||new TextDecoder("utf8"),this.regionList=[]},S.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof s))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t=this;function n(){for(var e=t.buffer,n=0;n<e.length&&"\r"!==e[n]&&"\n"!==e[n];)++n;var i=e.substr(0,n);return"\r"===e[n]&&++n,"\n"===e[n]&&++n,t.buffer=e.substr(n),i}function i(e){e.match(/X-TIMESTAMP-MAP/)?l(e,(function(e,n){if("X-TIMESTAMP-MAP"===e)!function(e){var n=new o;l(e,(function(e,t){switch(e){case"MPEGT":n.integer(e+"S",t);break;case"LOCA":n.set(e+"L",a(t))}}),/[^\d]:/,/,/),t.ontimestampmap&&t.ontimestampmap({MPEGTS:n.get("MPEGTS"),LOCAL:n.get("LOCAL")})}(n)}),/=/):l(e,(function(e,n){if("Region"===e)!function(e){var n=new o;if(l(e,(function(e,t){switch(e){case"id":n.set(e,t);break;case"width":n.percent(e,t);break;case"lines":n.integer(e,t);break;case"regionanchor":case"viewportanchor":var i=t.split(",");if(2!==i.length)break;var r=new o;if(r.percent("x",i[0]),r.percent("y",i[1]),!r.has("x")||!r.has("y"))break;n.set(e+"X",r.get("x")),n.set(e+"Y",r.get("y"));break;case"scroll":n.alt(e,t,["up"])}}),/=/,/\s/),n.has("id")){var i=new(t.vttjs.VTTRegion||t.window.VTTRegion);i.width=n.get("width",100),i.lines=n.get("lines",3),i.regionAnchorX=n.get("regionanchorX",0),i.regionAnchorY=n.get("regionanchorY",100),i.viewportAnchorX=n.get("viewportanchorX",0),i.viewportAnchorY=n.get("viewportanchorY",100),i.scroll=n.get("scroll",""),t.onregion&&t.onregion(i),t.regionList.push({id:n.get("id"),region:i})}}(n)}),/:/)}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var r;if("INITIAL"===t.state){if(!/\r\n|\n/.test(t.buffer))return this;var d=(r=n()).match(/^WEBVTT([ \t].*)?$/);if(!d||!d[0])throw new s(s.Errors.BadSignature);t.state="HEADER"}for(var u=!1;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(u?u=!1:r=n(),t.state){case"HEADER":/:/.test(r)?i(r):r||(t.state="ID");continue;case"NOTE":r||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(r)){t.state="NOTE";break}if(!r)continue;t.cue=new(t.vttjs.VTTCue||t.window.VTTCue)(0,0,"");try{t.cue.align="center"}catch(p){t.cue.align="middle"}if(t.state="CUE",-1===r.indexOf("--\x3e")){t.cue.id=r;continue}case"CUE":try{c(r,t.cue,t.regionList)}catch(p){t.reportOrThrowError(p),t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":var h=-1!==r.indexOf("--\x3e");if(!r||h&&(u=!0)){t.oncue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}t.cue.text&&(t.cue.text+="\n"),t.cue.text+=r.replace(/\u2028/g,"\n").replace(/u2029/g,"\n");continue;case"BADCUE":r||(t.state="ID");continue}}}catch(p){t.reportOrThrowError(p),"CUETEXT"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state="INITIAL"===t.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var e=this;try{if(e.buffer+=e.decoder.decode(),(e.cue||"HEADER"===e.state)&&(e.buffer+="\n\n",e.parse()),"INITIAL"===e.state)throw new s(s.Errors.BadSignature)}catch(t){e.reportOrThrowError(t)}return e.onflush&&e.onflush(),this}},e.exports=S},299:function(e,t){var n={"":1,lr:1,rl:1},i={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function r(e){return"string"===typeof e&&(!!i[e.toLowerCase()]&&e.toLowerCase())}function s(e,t,i){this.hasBeenReset=!1;var s="",a=!1,o=e,l=t,c=i,d=null,u="",h=!0,p="auto",g="start",m="auto",f="auto",y=100,b="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return s},set:function(e){s=""+e}},pauseOnExit:{enumerable:!0,get:function(){return a},set:function(e){a=!!e}},startTime:{enumerable:!0,get:function(){return o},set:function(e){if("number"!==typeof e)throw new TypeError("Start time must be set to a number.");o=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return l},set:function(e){if("number"!==typeof e)throw new TypeError("End time must be set to a number.");l=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return c},set:function(e){c=""+e,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return d},set:function(e){d=e,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return u},set:function(e){var t=function(e){return"string"===typeof e&&!!n[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===t)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");u=t,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return h},set:function(e){h=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return p},set:function(e){if("number"!==typeof e&&"auto"!==e)throw new SyntaxError("Line: an invalid number or illegal string was specified.");p=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return g},set:function(e){var t=r(e);t?(g=t,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return m},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");m=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return f},set:function(e){var t=r(e);t?(f=t,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return y},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");y=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return b},set:function(e){var t=r(e);if(!t)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");b=t,this.hasBeenReset=!0}}}),this.displayState=void 0}s.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},e.exports=s},300:function(e,t){var n={"":!0,up:!0};function i(e){return"number"===typeof e&&e>=0&&e<=100}e.exports=function(){var e=100,t=3,r=0,s=100,a=0,o=100,l="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!i(t))throw new Error("Width must be between 0 and 100.");e=t}},lines:{enumerable:!0,get:function(){return t},set:function(e){if("number"!==typeof e)throw new TypeError("Lines must be set to a number.");t=e}},regionAnchorY:{enumerable:!0,get:function(){return s},set:function(e){if(!i(e))throw new Error("RegionAnchorX must be between 0 and 100.");s=e}},regionAnchorX:{enumerable:!0,get:function(){return r},set:function(e){if(!i(e))throw new Error("RegionAnchorY must be between 0 and 100.");r=e}},viewportAnchorY:{enumerable:!0,get:function(){return o},set:function(e){if(!i(e))throw new Error("ViewportAnchorY must be between 0 and 100.");o=e}},viewportAnchorX:{enumerable:!0,get:function(){return a}
2,set:function(e){if(!i(e))throw new Error("ViewportAnchorX must be between 0 and 100.");a=e}},scroll:{enumerable:!0,get:function(){return l},set:function(e){var t=function(e){return"string"===typeof e&&!!n[e.toLowerCase()]&&e.toLowerCase()}(e);!1===t?console.warn("Scroll: an invalid or illegal string was specified."):l=t}}})}},301:function(e,t,n){"use strict";var i=n(194),r=n.n(i),s="https://example.com";t.a=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=r.a.location&&r.a.location.href||"");var n=/^\/\//.test(e),i=!r.a.location&&!/\/\//i.test(e);e=new r.a.URL(e,r.a.location||s);var a=new URL(t,e);return i?a.href.slice(19):n?a.href.slice(a.protocol.length):a.href}},302:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return a}));var i=n(194),r=n.n(i),s=function(t){return r.a.atob?r.a.atob(t):e.from(t,"base64").toString("binary")};function a(e){for(var t=s(e),n=new Uint8Array(t.length),i=0;i<t.length;i++)n[i]=t.charCodeAt(i);return n}}).call(this,n(251).Buffer)},303:function(e,t,n){"use strict";t.byteLength=function(e){var t=l(e),n=t[0],i=t[1];return 3*(n+i)/4-i},t.toByteArray=function(e){var t,n,i=l(e),a=i[0],o=i[1],c=new s(function(e,t,n){return 3*(t+n)/4-n}(0,a,o)),d=0,u=o>0?a-4:a;for(n=0;n<u;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],c[d++]=t>>16&255,c[d++]=t>>8&255,c[d++]=255&t;2===o&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,c[d++]=255&t);1===o&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,c[d++]=t>>8&255,c[d++]=255&t);return c},t.fromByteArray=function(e){for(var t,n=e.length,r=n%3,s=[],a=16383,o=0,l=n-r;o<l;o+=a)s.push(c(e,o,o+a>l?l:o+a));1===r?(t=e[n-1],s.push(i[t>>2]+i[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],s.push(i[t>>10]+i[t>>4&63]+i[t<<2&63]+"="));return s.join("")};for(var i=[],r=[],s="undefined"!==typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)i[o]=a[o],r[a.charCodeAt(o)]=o;function l(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e,t,n){for(var r,s,a=[],o=t;o<n;o+=3)r=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),a.push(i[(s=r)>>18&63]+i[s>>12&63]+i[s>>6&63]+i[63&s]);return a.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},304:function(e,t){t.read=function(e,t,n,i,r){var s,a,o=8*r-i-1,l=(1<<o)-1,c=l>>1,d=-7,u=n?r-1:0,h=n?-1:1,p=e[t+u];for(u+=h,s=p&(1<<-d)-1,p>>=-d,d+=o;d>0;s=256*s+e[t+u],u+=h,d-=8);for(a=s&(1<<-d)-1,s>>=-d,d+=i;d>0;a=256*a+e[t+u],u+=h,d-=8);if(0===s)s=1-c;else{if(s===l)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,i),s-=c}return(p?-1:1)*a*Math.pow(2,s-i)},t.write=function(e,t,n,i,r,s){var a,o,l,c=8*s-r-1,d=(1<<c)-1,u=d>>1,h=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,p=i?0:s-1,g=i?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,a=d):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+u>=1?h/l:h*Math.pow(2,1-u))*l>=2&&(a++,l/=2),a+u>=d?(o=0,a=d):a+u>=1?(o=(t*l-1)*Math.pow(2,r),a+=u):(o=t*Math.pow(2,u-1)*Math.pow(2,r),a=0));r>=8;e[n+p]=255&o,p+=g,o/=256,r-=8);for(a=a<<r|o,c+=r;c>0;e[n+p]=255&a,p+=g,a/=256,c-=8);e[n+p-g]|=128*m}},305:function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},306:function(e,t,n){"use strict";n.d(t,"i",(function(){return l})),n.d(t,"h",(function(){return c})),n.d(t,"d",(function(){return d})),n.d(t,"f",(function(){return u})),n.d(t,"e",(function(){return h})),n.d(t,"c",(function(){return p})),n.d(t,"g",(function(){return g})),n.d(t,"a",(function(){return m})),n.d(t,"b",(function(){return f}));var i=n(194),r=n.n(i),s={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},a=["video","audio","text"],o=["Video","Audio","Text"],l=function(e){return e?e.replace(/avc1\.(\d+)\.(\d+)/i,(function(e,t,n){return"avc1."+("00"+Number(t).toString(16)).slice(-2)+"00"+("00"+Number(n).toString(16)).slice(-2)})):e},c=function(e){void 0===e&&(e="");var t=e.split(","),n=[];return t.forEach((function(e){var t;e=e.trim(),a.forEach((function(i){var r=s[i].exec(e.toLowerCase());if(r&&!(r.length<=1)){t=i;var a=e.substring(0,r[1].length),o=e.replace(a,"");
2n.push({type:a,details:o,mediaType:i})}})),t||n.push({type:e,details:"",mediaType:"unknown"})})),n},d=function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var n=e.mediaGroups.AUDIO[t];if(!n)return null;for(var i in n){var r=n[i];if(r.default&&r.playlists)return c(r.playlists[0].attributes.CODECS)}return null},u=function(e){return void 0===e&&(e=""),s.audio.test(e.trim().toLowerCase())},h=function(e){if(e&&"string"===typeof e){var t,n=e.toLowerCase().split(",").map((function(e){return l(e.trim())})),i="video";1===n.length&&u(n[0])?i="audio":1===n.length&&(void 0===(t=n[0])&&(t=""),s.text.test(t.trim().toLowerCase()))&&(i="application");var r="mp4";return n.every((function(e){return s.mp4.test(e)}))?r="mp4":n.every((function(e){return s.webm.test(e)}))?r="webm":n.every((function(e){return s.ogg.test(e)}))&&(r="ogg"),i+"/"+r+';codecs="'+e+'"'}},p=function(e,t){return void 0===e&&(e=""),void 0===t&&(t=!1),r.a.MediaSource&&r.a.MediaSource.isTypeSupported&&r.a.MediaSource.isTypeSupported(h(e))||t&&r.a.ManagedMediaSource&&r.a.ManagedMediaSource.isTypeSupported&&r.a.ManagedMediaSource.isTypeSupported(h(e))||!1},g=function(e){return void 0===e&&(e=""),e.toLowerCase().split(",").every((function(e){e=e.trim();for(var t=0;t<o.length;t++){if(s["muxer"+o[t]].test(e))return!0}return!1}))},m="mp4a.40.2",f="avc1.4d400d"},307:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,r=/^application\/dash\+xml/i,s=function(e){return i.test(e)?"hls":r.test(e)?"dash":"application/vnd.videojs.vhs+json"===e?"vhs-json":null}},308:function(e,t,n){!function(t){var n=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,i=/^(?=([^\/?#]*))\1([^]*)$/,r=/(?:\/|^)\.(?=\/)/g,s=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,a={buildAbsoluteURL:function(e,t,n){if(n=n||{},e=e.trim(),!(t=t.trim())){if(!n.alwaysNormalize)return e;var r=a.parseURL(e);if(!r)throw new Error("Error trying to parse base URL.");return r.path=a.normalizePath(r.path),a.buildURLFromParts(r)}var s=a.parseURL(t);if(!s)throw new Error("Error trying to parse relative URL.");if(s.scheme)return n.alwaysNormalize?(s.path=a.normalizePath(s.path),a.buildURLFromParts(s)):t;var o=a.parseURL(e);if(!o)throw new Error("Error trying to parse base URL.");if(!o.netLoc&&o.path&&"/"!==o.path[0]){var l=i.exec(o.path);o.netLoc=l[1],o.path=l[2]}o.netLoc&&!o.path&&(o.path="/");var c={scheme:o.scheme,netLoc:s.netLoc,path:null,params:s.params,query:s.query,fragment:s.fragment};if(!s.netLoc&&(c.netLoc=o.netLoc,"/"!==s.path[0]))if(s.path){var d=o.path,u=d.substring(0,d.lastIndexOf("/")+1)+s.path;c.path=a.normalizePath(u)}else c.path=o.path,s.params||(c.params=o.params,s.query||(c.query=o.query));return null===c.path&&(c.path=n.alwaysNormalize?a.normalizePath(s.path):s.path),a.buildURLFromParts(c)},parseURL:function(e){var t=n.exec(e);return t?{scheme:t[1]||"",netLoc:t[2]||"",path:t[3]||"",params:t[4]||"",query:t[5]||"",fragment:t[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(r,"");e.length!==(e=e.replace(s,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}};e.exports=a}()},309:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return a}));var i=n(194),r=n.n(i),s=function(t){return r.a.atob?r.a.atob(t):e.from(t,"base64").toString("binary")};function a(e){for(var t=s(e),n=new Uint8Array(t.length),i=0;i<t.length;i++)n[i]=t.charCodeAt(i);return n}}).call(this,n(251).Buffer)},310:function(e,t,n){var i=n(252);t.DOMImplementation=i.DOMImplementation,t.XMLSerializer=i.XMLSerializer,t.DOMParser=n(311).DOMParser},311:function(e,t,n){var i=n(210),r=n(252),s=n(312),a=n(313),o=r.DOMImplementation,l=i.NAMESPACE,c=a.ParseError,d=a.XMLReader;function u(e){return e.replace(/\r[\n\u0085]/g,"\n").replace(/[\r\u0085\u2028]/g,"\n")}function h(e){this.options=e||{locator:{}}}function p(){this.cdata=!1}function g(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function m(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function f(e,t,n){return"string"==typeof e?e.substr(t,n):e.length>
vendor: 6,610 bytes, line 2
2=t+n||t?new java.lang.String(e,t,n)+"":e}function y(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}h.prototype.parseFromString=function(e,t){var n=this.options,i=new d,r=n.domBuilder||new p,a=n.errorHandler,o=n.locator,c=n.xmlns||{},h=/\/x?html?$/.test(t),g=h?s.HTML_ENTITIES:s.XML_ENTITIES;o&&r.setDocumentLocator(o),i.errorHandler=function(e,t,n){if(!e){if(t instanceof p)return t;e=t}var i={},r=e instanceof Function;function s(t){var s=e[t];!s&&r&&(s=2==e.length?function(n){e(t,n)}:e),i[t]=s&&function(e){s("[xmldom "+t+"]\t"+e+m(n))}||function(){}}return n=n||{},s("warning"),s("error"),s("fatalError"),i}(a,r,o),i.domBuilder=n.domBuilder||r,h&&(c[""]=l.HTML),c.xml=c.xml||l.XML;var f=n.normalizeLineEndings||u;return e&&"string"===typeof e?i.parse(f(e),c,g):i.errorHandler.error("invalid doc source"),r.doc},p.prototype={startDocument:function(){this.doc=(new o).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,n,i){var r=this.doc,s=r.createElementNS(e,n||t),a=i.length;y(this,s),this.currentElement=s,this.locator&&g(this.locator,s);for(var o=0;o<a;o++){e=i.getURI(o);var l=i.getValue(o),c=(n=i.getQName(o),r.createAttributeNS(e,n));this.locator&&g(i.getLocator(o),c),c.value=c.nodeValue=l,s.setAttributeNode(c)}},endElement:function(e,t,n){var i=this.currentElement;i.tagName;this.currentElement=i.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var n=this.doc.createProcessingInstruction(e,t);this.locator&&g(this.locator,n),y(this,n)},ignorableWhitespace:function(e,t,n){},characters:function(e,t,n){if(e=f.apply(this,arguments)){if(this.cdata)var i=this.doc.createCDATASection(e);else i=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(i):/^\s*$/.test(e)&&this.doc.appendChild(i),this.locator&&g(this.locator,i)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,n){e=f.apply(this,arguments);var i=this.doc.createComment(e);this.locator&&g(this.locator,i),y(this,i)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,n){var i=this.doc.implementation;if(i&&i.createDocumentType){var r=i.createDocumentType(e,t,n);this.locator&&g(this.locator,r),y(this,r),this.doc.doctype=r}},warning:function(e){console.warn("[xmldom warning]\t"+e,m(this.locator))},error:function(e){console.error("[xmldom error]\t"+e,m(this.locator))},fatalError:function(e){throw new c(e,this.locator)}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(e){p.prototype[e]=function(){return null}})),t.__DOMHandler=p,t.normalizeLineEndings=u,t.DOMParser=h},312:function(e,t,n){"use strict";var i=n(210).freeze;t.XML_ENTITIES=i({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),t.HTML_ENTITIES=i({Aacute:"\xc1",aacute:"\xe1",Abreve:"\u0102",abreve:"\u0103",ac:"\u223e",acd:"\u223f",acE:"\u223e\u0333",Acirc:"\xc2",acirc:"\xe2",acute:"\xb4",Acy:"\u0410",acy:"\u0430",AElig:"\xc6",aelig:"\xe6",af:"\u2061",Afr:"\ud835\udd04",afr:"\ud835\udd1e",Agrave:"\xc0",agrave:"\xe0",alefsym:"\u2135",aleph:"\u2135",Alpha:"\u0391",alpha:"\u03b1",Amacr:"\u0100",amacr:"\u0101",amalg:"\u2a3f",AMP:"&",amp:"&",And:"\u2a53",and:"\u2227",andand:"\u2a55",andd:"\u2a5c",andslope:"\u2a58",andv:"\u2a5a",ang:"\u2220",ange:"\u29a4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29a8",angmsdab:"\u29a9",angmsdac:"\u29aa",angmsdad:"\u29ab",angmsdae:"\u29ac",angmsdaf:"\u29ad",angmsdag:"\u29ae",angmsdah:"\u29af",angrt:"\u221f",angrtvb:"\u22be",angrtvbd:"\u299d",angsph:"\u2222",angst:"\xc5",angzarr:"\u237c",Aogon:"\u0104",aogon:"\u0105",Aopf:"\ud835\udd38",aopf:"\ud835\udd52",ap:"\u2248",apacir:"\u2a6f",apE:"\u2a70",ape:"\u224a",apid:"\u224b",apos:"'",ApplyFunction:"\u2061",approx:"\u2248",approxeq:"\u224a",Aring:"\xc5",aring:"\xe5",Ascr:"\ud835\udc9c",ascr:"\ud835\udcb6",Assign:"\u2254",ast:"*",asymp:"\u2248",asympeq:"\u224d",Atilde:"\xc3",atilde:"\xe3",Auml:"\xc4",auml:"\xe4",awconint:"\u2233",awint:"\u2a11",backcong:"\u224c",backepsilon:"\u03f6",backprime:"\u2035",backsim:"\u223d",backsimeq:"\u22cd",Backslash:"\u2216",Barv:"\u2ae7",barvee:"\u22bd",Barwed:"\u2306",barwed:"\u2305",barwedge:"\u2305",bbrk:"\u23b5",bbrktbrk:"\u23b6",bcong:"\u224c",Bcy:"\u0411",bcy:"\u0431",bdquo:"\u201e",becaus:"\u2235",Because:"\u2235",because:"\u2235",bemptyv:"\u29b0",bepsi:"\u03f6",bernou:"\u212c",Bernoullis:"\u212c",Beta:"\u0392",beta:"\u03b2",beth:"\u2136",between:"\u226c",Bfr:"\ud835\udd05",bfr:"\ud835\udd1f",bigcap:"\u22c2",bigcirc:"\u25ef",bigcup:"\u22c3",bigodot:"\u2a00",bigoplus:"\u2a01",bigotimes:"\u2a02",bigsqcup:"\u2a06",bigstar:"\u2605",bigtriangledown:"\u25bd",bigtriangleup:"\u25b3",biguplus:"\u2a04",bigvee:"\u22c1",bigwedge:"\u22c0",bkarow:"\u290d",blacklozenge:"\u29eb",blacksquare:"\u25aa",blacktriangle:"\u25b4",blacktriangledown:"\u25be",blacktriangleleft:"\u25c2",blacktriangleright:"\u25b8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20e5",bnequiv:"\u2261\u20e5",bNot:"\u2aed",bnot:"\u2310",Bopf:"\ud835\udd39",bopf:"\ud835\udd53",bot:"\u22a5",bottom:"\u22a5",bowtie:"\u22c8",boxbox:"\u29c9",boxDL:"\u2557",boxDl:"\u2556",boxdL:"\u2555",boxdl:"\u2510",boxDR:"\u2554",boxDr:"\u2553",boxdR:"\u2552",boxdr:"\u250c",boxH:"\u2550",boxh:"\u2500",boxHD:"\u2566",boxHd:"\u2564",boxhD:"\u2565",boxhd:"\u252c",boxHU:"\u2569",boxHu:"\u2567",boxhU:"\u2568",boxhu:"\u2534",boxminus:"\u229f",boxplus:"\u229e",boxtimes:"\u22a0",boxUL:"\u255d",boxUl:"\u255c",boxuL:"\u255b",boxul:"\u2518",boxUR:"\u255a",boxUr:"\u2559",boxuR:"\u2558",boxur:"\u2514",boxV:"\u2551",boxv:"\u2502",boxVH:"\u256c",boxVh:"\u256b",boxvH:"\u256a",boxvh:"\u253c",boxVL:"\u2563",boxVl:"\u2562",boxvL:"\u2561",boxvl:"\u2524",boxVR:"\u2560",boxVr:"\u255f",boxvR:"\u255e",boxvr:"\u251c",bprime:"\u2035",Breve:"\u02d8",breve:"\u02d8",brvbar:"\xa6",Bscr:"\u212c",bscr:"\ud835\udcb7",bsemi:"\u204f",bsim:"\u223d",bsime:"\u22cd",bsol:"\\",bsolb:"\u29c5",bsolhsub:"\u27c8",bull:"\u2022",bullet:"\u2022",bump:"\u224e",bumpE:"\u2aae",bumpe:"\u224f",Bumpeq:"\u224e",bumpeq:"\u224f",Cacute:"\u0106",cacute:"\u0107",Cap:"\u22d2",cap:"\u2229",capand:"\u2a44",capbrcup:"\u2a49",capcap:"\u2a4b",capcup:"\u2a47",capdot:"\u2a40",CapitalDifferentialD:"\u2145",caps:"\u2229\ufe00",caret:"\u2041",caron:"\u02c7",Cayleys:"\u212d",ccaps:"\u2a4d",Ccaron:"\u010c",ccaron:"\u010d",Ccedil
2:"\xc7",ccedil:"\xe7",Ccirc:"\u0108",ccirc:"\u0109",Cconint:"\u2230",ccups:"\u2a4c",ccupssm:"\u2a50",Cdot:"\u010a",cdot:"\u010b",cedil:"\xb8",Cedilla:"\xb8",cemptyv:"\u29b2",cent:"\xa2",CenterDot:"\xb7",centerdot:"\xb7",Cfr:"\u212d",cfr:"\ud835\udd20",CHcy:"\u0427",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",Chi:"\u03a7",chi:"\u03c7",cir:"\u25cb",circ:"\u02c6",circeq:"\u2257",circlearrowleft:"\u21ba",circlearrowright:"\u21bb",circledast:"\u229b",circledcirc:"\u229a",circleddash:"\u229d",CircleDot:"\u2299",circledR:"\xae",circledS:"\u24c8",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",cirE:"\u29c3",cire:"\u2257",cirfnint:"\u2a10",cirmid:"\u2aef",cirscir:"\u29c2",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201d",CloseCurlyQuote:"\u2019",clubs:"\u2663",clubsuit:"\u2663",Colon:"\u2237",colon:":",Colone:"\u2a74",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2a6d",Congruent:"\u2261",Conint:"\u222f",conint:"\u222e",ContourIntegral:"\u222e",Copf:"\u2102",copf:"\ud835\udd54",coprod:"\u2210",Coproduct:"\u2210",COPY:"\xa9",copy:"\xa9",copysr:"\u2117",CounterClockwiseContourIntegral:"\u2233",crarr:"\u21b5",Cross:"\u2a2f",cross:"\u2717",Cscr:"\ud835\udc9e",cscr:"\ud835\udcb8",csub:"\u2acf",csube:"\u2ad1",csup:"\u2ad0",csupe:"\u2ad2",ctdot:"\u22ef",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22de",cuesc:"\u22df",cularr:"\u21b6",cularrp:"\u293d",Cup:"\u22d3",cup:"\u222a",cupbrcap:"\u2a48",CupCap:"\u224d",cupcap:"\u2a46",cupcup:"\u2a4a",cupdot:"\u228d",cupor:"\u2a45",cups:"\u222a\ufe00",curarr:"\u21b7",curarrm:"\u293c",curlyeqprec:"\u22de",curlyeqsucc:"\u22df",curlyvee:"\u22ce",curlywedge:"\u22cf",curren:"\xa4",curvearrowleft:"\u21b6",curvearrowright:"\u21b7",cuvee:"\u22ce",cuwed:"\u22cf",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232d",Dagger:"\u2021",dagger:"\u2020",daleth:"\u2138",Darr:"\u21a1",dArr:"\u21d3",darr:"\u2193",dash:"\u2010",Dashv:"\u2ae4",dashv:"\u22a3",dbkarow:"\u290f",dblac:"\u02dd",Dcaron:"\u010e",dcaron:"\u010f",Dcy:"\u0414",dcy:"\u0434",DD:"\u2145",dd:"\u2146",ddagger:"\u2021",ddarr:"\u21ca",DDotrahd:"\u2911",ddotseq:"\u2a77",deg:"\xb0",Del:"\u2207",Delta:"\u0394",delta:"\u03b4",demptyv:"\u29b1",dfisht:"\u297f",Dfr:"\ud835\udd07",dfr:"\ud835\udd21",dHar:"\u2965",dharl:"\u21c3",dharr:"\u21c2",DiacriticalAcute:"\xb4",DiacriticalDot:"\u02d9",DiacriticalDoubleAcute:"\u02dd",DiacriticalGrave:"`",DiacriticalTilde:"\u02dc",diam:"\u22c4",Diamond:"\u22c4",diamond:"\u22c4",diamondsuit:"\u2666",diams:"\u2666",die:"\xa8",DifferentialD:"\u2146",digamma:"\u03dd",disin:"\u22f2",div:"\xf7",divide:"\xf7",divideontimes:"\u22c7",divonx:"\u22c7",DJcy:"\u0402",djcy:"\u0452",dlcorn:"\u231e",dlcrop:"\u230d",dollar:"$",Dopf:"\ud835\udd3b",dopf:"\ud835\udd55",Dot:"\xa8",dot:"\u02d9",DotDot:"\u20dc",doteq:"\u2250",doteqdot:"\u2251",DotEqual:"\u2250",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22a1",doublebarwedge:"\u2306",DoubleContourIntegral:"\u222f",DoubleDot:"\xa8",DoubleDownArrow:"\u21d3",DoubleLeftArrow:"\u21d0",DoubleLeftRightArrow:"\u21d4",DoubleLeftTee:"\u2ae4",DoubleLongLeftArrow:"\u27f8",DoubleLongLeftRightArrow:"\u27fa",DoubleLongRightArrow:"\u27f9",DoubleRightArrow:"\u21d2",DoubleRightTee:"\u22a8",DoubleUpArrow:"\u21d1",DoubleUpDownArrow:"\u21d5",DoubleVerticalBar:"\u2225",DownArrow:"\u2193",Downarrow:"\u21d3",downarrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21f5",DownBreve:"\u0311",downdownarrows:"\u21ca",downharpoonleft:"\u21c3",downharpoonright:"\u21c2",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295e",DownLeftVector:"\u21bd",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295f",DownRightVector:"\u21c1",DownRightVectorBar:"\u2957",DownTee:"\u22a4",DownTeeArrow:"\u21a7",drbkarow:"\u2910",drcorn:"\u231f",drcrop:"\u230c",Dscr:"\ud835\udc9f",dscr:"\ud835\udcb9",DScy:"\u0405",dscy:"\u0455",dsol:"\u29f6",Dstrok:"\u0110",dstrok:"\u0111",dtdot:"\u22f1",dtri:"\u25bf",dtrif:"\u25be",duarr:"\u21f5",duhar:"\u296f",dwangle:"\u29a6",DZcy:"\u040f",dzcy:"\u045f",dzigrarr:"\u27ff",Eacute:"\xc9",eacute:"\xe9",easter:"\u2a6e",Ecaron:"\u011a",ecaron:"\u011b",ecir:"\u2256",Ecirc:"\xca",ecirc:"\xea",ecolon:"\u2255",Ecy:"\u042d",ecy:"\u044d",eDDot:"\u2a77",
2Edot:"\u0116",eDot:"\u2251",edot:"\u0117",ee:"\u2147",efDot:"\u2252",Efr:"\ud835\udd08",efr:"\ud835\udd22",eg:"\u2a9a",Egrave:"\xc8",egrave:"\xe8",egs:"\u2a96",egsdot:"\u2a98",el:"\u2a99",Element:"\u2208",elinters:"\u23e7",ell:"\u2113",els:"\u2a95",elsdot:"\u2a97",Emacr:"\u0112",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",EmptySmallSquare:"\u25fb",emptyv:"\u2205",EmptyVerySmallSquare:"\u25ab",emsp:"\u2003",emsp13:"\u2004",emsp14:"\u2005",ENG:"\u014a",eng:"\u014b",ensp:"\u2002",Eogon:"\u0118",eogon:"\u0119",Eopf:"\ud835\udd3c",eopf:"\ud835\udd56",epar:"\u22d5",eparsl:"\u29e3",eplus:"\u2a71",epsi:"\u03b5",Epsilon:"\u0395",epsilon:"\u03b5",epsiv:"\u03f5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2a96",eqslantless:"\u2a95",Equal:"\u2a75",equals:"=",EqualTilde:"\u2242",equest:"\u225f",Equilibrium:"\u21cc",equiv:"\u2261",equivDD:"\u2a78",eqvparsl:"\u29e5",erarr:"\u2971",erDot:"\u2253",Escr:"\u2130",escr:"\u212f",esdot:"\u2250",Esim:"\u2a73",esim:"\u2242",Eta:"\u0397",eta:"\u03b7",ETH:"\xd0",eth:"\xf0",Euml:"\xcb",euml:"\xeb",euro:"\u20ac",excl:"!",exist:"\u2203",Exists:"\u2203",expectation:"\u2130",ExponentialE:"\u2147",exponentiale:"\u2147",fallingdotseq:"\u2252",Fcy:"\u0424",fcy:"\u0444",female:"\u2640",ffilig:"\ufb03",fflig:"\ufb00",ffllig:"\ufb04",Ffr:"\ud835\udd09",ffr:"\ud835\udd23",filig:"\ufb01",FilledSmallSquare:"\u25fc",FilledVerySmallSquare:"\u25aa",fjlig:"fj",flat:"\u266d",fllig:"\ufb02",fltns:"\u25b1",fnof:"\u0192",Fopf:"\ud835\udd3d",fopf:"\ud835\udd57",ForAll:"\u2200",forall:"\u2200",fork:"\u22d4",forkv:"\u2ad9",Fouriertrf:"\u2131",fpartint:"\u2a0d",frac12:"\xbd",frac13:"\u2153",frac14:"\xbc",frac15:"\u2155",frac16:"\u2159",frac18:"\u215b",frac23:"\u2154",frac25:"\u2156",frac34:"\xbe",frac35:"\u2157",frac38:"\u215c",frac45:"\u2158",frac56:"\u215a",frac58:"\u215d",frac78:"\u215e",frasl:"\u2044",frown:"\u2322",Fscr:"\u2131",fscr:"\ud835\udcbb",gacute:"\u01f5",Gamma:"\u0393",gamma:"\u03b3",Gammad:"\u03dc",gammad:"\u03dd",gap:"\u2a86",Gbreve:"\u011e",gbreve:"\u011f",Gcedil:"\u0122",Gcirc:"\u011c",gcirc:"\u011d",Gcy:"\u0413",gcy:"\u0433",Gdot:"\u0120",gdot:"\u0121",gE:"\u2267",ge:"\u2265",gEl:"\u2a8c",gel:"\u22db",geq:"\u2265",geqq:"\u2267",geqslant:"\u2a7e",ges:"\u2a7e",gescc:"\u2aa9",gesdot:"\u2a80",gesdoto:"\u2a82",gesdotol:"\u2a84",gesl:"\u22db\ufe00",gesles:"\u2a94",Gfr:"\ud835\udd0a",gfr:"\ud835\udd24",Gg:"\u22d9",gg:"\u226b",ggg:"\u22d9",gimel:"\u2137",GJcy:"\u0403",gjcy:"\u0453",gl:"\u2277",gla:"\u2aa5",glE:"\u2a92",glj:"\u2aa4",gnap:"\u2a8a",gnapprox:"\u2a8a",gnE:"\u2269",gne:"\u2a88",gneq:"\u2a88",gneqq:"\u2269",gnsim:"\u22e7",Gopf:"\ud835\udd3e",gopf:"\ud835\udd58",grave:"`",GreaterEqual:"\u2265",GreaterEqualLess:"\u22db",GreaterFullEqual:"\u2267",GreaterGreater:"\u2aa2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2a7e",GreaterTilde:"\u2273",Gscr:"\ud835\udca2",gscr:"\u210a",gsim:"\u2273",gsime:"\u2a8e",gsiml:"\u2a90",Gt:"\u226b",GT:">",gt:">",gtcc:"\u2aa7",gtcir:"\u2a7a",gtdot:"\u22d7",gtlPar:"\u2995",gtquest:"\u2a7c",gtrapprox:"\u2a86",gtrarr:"\u2978",gtrdot:"\u22d7",gtreqless:"\u22db",gtreqqless:"\u2a8c",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\ufe00",gvnE:"\u2269\ufe00",Hacek:"\u02c7",hairsp:"\u200a",half:"\xbd",hamilt:"\u210b",HARDcy:"\u042a",hardcy:"\u044a",hArr:"\u21d4",harr:"\u2194",harrcir:"\u2948",harrw:"\u21ad",Hat:"^",hbar:"\u210f",Hcirc:"\u0124",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22b9",Hfr:"\u210c",hfr:"\ud835\udd25",HilbertSpace:"\u210b",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21ff",homtht:"\u223b",hookleftarrow:"\u21a9",hookrightarrow:"\u21aa",Hopf:"\u210d",hopf:"\ud835\udd59",horbar:"\u2015",HorizontalLine:"\u2500",Hscr:"\u210b",hscr:"\ud835\udcbd",hslash:"\u210f",Hstrok:"\u0126",hstrok:"\u0127",HumpDownHump:"\u224e",HumpEqual:"\u224f",hybull:"\u2043",hyphen:"\u2010",Iacute:"\xcd",iacute:"\xed",ic:"\u2063",Icirc:"\xce",icirc:"\xee",Icy:"\u0418",icy:"\u0438",Idot:"\u0130",IEcy:"\u0415",iecy:"\u0435",iexcl:"\xa1",iff:"\u21d4",Ifr:"\u2111",ifr:"\ud835\udd26",Igrave:"\xcc",igrave:"\xec",ii:"\u2148",iiiint:"\u2a0c",iiint:"\u222d",iinfin:"\u29dc",iiota:"\u2129",IJlig:"\u0132",ijlig:"\u0133",Im:"\u2111",Imacr:"\u012a",imacr:"\u012b",image:"\u2111",ImaginaryI:"\u2148",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22b7",imped:"\u01b5",Implies:"\u21d2",in:"\u2208",incare:"\u2105",infin:"\u221e",infintie:"\u29dd",inodot:"\u0131",Int:"\u222c",int:"\u222b",intcal:"\u22ba",integers:"\u2124",Integral:"\u222b",intercal:"\u22ba",Intersection:"\u22c2",intlarhk:"\u2a17",intprod:"\u2a3c",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",IOcy:"\u0401",iocy:"\u0451",Iogon:"\u012e",iogon:"\u012f",Iopf:"\ud835\udd40",iopf:"\ud835\udd5a",Iota:"\u0399",iota:"\u03b9",iprod:"\u2a3c",iquest:"\xbf",Iscr:"\u2110",iscr:"\ud835\udcbe",isin:"\u2208",isindot:"\u22f5",isinE:"\u22f9",isins:"\u22f4",isinsv:"\u22f3",isinv:"\u2208",it:"\u2062",Itilde:"\u0128",itilde:"\u0129",Iukcy:"\u0406",iukcy:"\u0456",Iuml:"\xcf",iuml:"\xef",Jcirc:"\u0134",jcirc:"\u0135",Jcy:"\u0419",jcy:"\u0439",Jfr:"\ud835\udd0d",jfr:"\ud835\udd27",jmath:"\u0237",Jopf:"\ud835\udd41",jopf:"\ud835\udd5b",Jscr:"\ud835\udca5",jscr:"\ud835\udcbf",Jsercy:"\u0408",jsercy:"\u0458",Jukcy:"\u0404",jukcy:"\u0454",Kappa:"\u039a",kappa:"\u03ba",kappav:"\u03f0",Kcedil:"\u0136",kcedil
2:"\u0137",Kcy:"\u041a",kcy:"\u043a",Kfr:"\ud835\udd0e",kfr:"\ud835\udd28",kgreen:"\u0138",KHcy:"\u0425",khcy:"\u0445",KJcy:"\u040c",kjcy:"\u045c",Kopf:"\ud835\udd42",kopf:"\ud835\udd5c",Kscr:"\ud835\udca6",kscr:"\ud835\udcc0",lAarr:"\u21da",Lacute:"\u0139",lacute:"\u013a",laemptyv:"\u29b4",lagran:"\u2112",Lambda:"\u039b",lambda:"\u03bb",Lang:"\u27ea",lang:"\u27e8",langd:"\u2991",langle:"\u27e8",lap:"\u2a85",Laplacetrf:"\u2112",laquo:"\xab",Larr:"\u219e",lArr:"\u21d0",larr:"\u2190",larrb:"\u21e4",larrbfs:"\u291f",larrfs:"\u291d",larrhk:"\u21a9",larrlp:"\u21ab",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21a2",lat:"\u2aab",lAtail:"\u291b",latail:"\u2919",late:"\u2aad",lates:"\u2aad\ufe00",lBarr:"\u290e",lbarr:"\u290c",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298b",lbrksld:"\u298f",lbrkslu:"\u298d",Lcaron:"\u013d",lcaron:"\u013e",Lcedil:"\u013b",lcedil:"\u013c",lceil:"\u2308",lcub:"{",Lcy:"\u041b",lcy:"\u043b",ldca:"\u2936",ldquo:"\u201c",ldquor:"\u201e",ldrdhar:"\u2967",ldrushar:"\u294b",ldsh:"\u21b2",lE:"\u2266",le:"\u2264",LeftAngleBracket:"\u27e8",LeftArrow:"\u2190",Leftarrow:"\u21d0",leftarrow:"\u2190",LeftArrowBar:"\u21e4",LeftArrowRightArrow:"\u21c6",leftarrowtail:"\u21a2",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27e6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21c3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230a",leftharpoondown:"\u21bd",leftharpoonup:"\u21bc",leftleftarrows:"\u21c7",LeftRightArrow:"\u2194",Leftrightarrow:"\u21d4",leftrightarrow:"\u2194",leftrightarrows:"\u21c6",leftrightharpoons:"\u21cb",leftrightsquigarrow:"\u21ad",LeftRightVector:"\u294e",LeftTee:"\u22a3",LeftTeeArrow:"\u21a4",LeftTeeVector:"\u295a",leftthreetimes:"\u22cb",LeftTriangle:"\u22b2",LeftTriangleBar:"\u29cf",LeftTriangleEqual:"\u22b4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21bf",LeftUpVectorBar:"\u2958",LeftVector:"\u21bc",LeftVectorBar:"\u2952",lEg:"\u2a8b",leg:"\u22da",leq:"\u2264",leqq:"\u2266",leqslant:"\u2a7d",les:"\u2a7d",lescc:"\u2aa8",lesdot:"\u2a7f",lesdoto:"\u2a81",lesdotor:"\u2a83",lesg:"\u22da\ufe00",lesges:"\u2a93",lessapprox:"\u2a85",lessdot:"\u22d6",lesseqgtr:"\u22da",lesseqqgtr:"\u2a8b",LessEqualGreater:"\u22da",LessFullEqual:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",LessLess:"\u2aa1",lesssim:"\u2272",LessSlantEqual:"\u2a7d",LessTilde:"\u2272",lfisht:"\u297c",lfloor:"\u230a",Lfr:"\ud835\udd0f",lfr:"\ud835\udd29",lg:"\u2276",lgE:"\u2a91",lHar:"\u2962",lhard:"\u21bd",lharu:"\u21bc",lharul:"\u296a",lhblk:"\u2584",LJcy:"\u0409",ljcy:"\u0459",Ll:"\u22d8",ll:"\u226a",llarr:"\u21c7",llc
2orner:"\u231e",Lleftarrow:"\u21da",llhard:"\u296b",lltri:"\u25fa",Lmidot:"\u013f",lmidot:"\u0140",lmoust:"\u23b0",lmoustache:"\u23b0",lnap:"\u2a89",lnapprox:"\u2a89",lnE:"\u2268",lne:"\u2a87",lneq:"\u2a87",lneqq:"\u2268",lnsim:"\u22e6",loang:"\u27ec",loarr:"\u21fd",lobrk:"\u27e6",LongLeftArrow:"\u27f5",Longleftarrow:"\u27f8",longleftarrow:"\u27f5",LongLeftRightArrow:"\u27f7",Longleftrightarrow:"\u27fa",longleftrightarrow:"\u27f7",longmapsto:"\u27fc",LongRightArrow:"\u27f6",Longrightarrow:"\u27f9",longrightarrow:"\u27f6",looparrowleft:"\u21ab",looparrowright:"\u21ac",lopar:"\u2985",Lopf:"\ud835\udd43",lopf:"\ud835\udd5d",loplus:"\u2a2d",lotimes:"\u2a34",lowast:"\u2217",lowbar:"_",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",loz:"\u25ca",lozenge:"\u25ca",lozf:"\u29eb",lpar:"(",lparlt:"\u2993",lrarr:"\u21c6",lrcorner:"\u231f",lrhar:"\u21cb",lrhard:"\u296d",lrm:"\u200e",lrtri:"\u22bf",lsaquo:"\u2039",Lscr:"\u2112",lscr:"\ud835\udcc1",Lsh:"\u21b0",lsh:"\u21b0",lsim:"\u2272",lsime:"\u2a8d",lsimg:"\u2a8f",lsqb:"[",lsquo:"\u2018",lsquor:"\u201a",Lstrok:"\u0141",lstrok:"\u0142",Lt:"\u226a",LT:"<",lt:"<",ltcc:"\u2aa6",ltcir:"\u2a79",ltdot:"\u22d6",lthree:"\u22cb",ltimes:"\u22c9",ltlarr:"\u2976",ltquest:"\u2a7b",ltri:"\u25c3",ltrie:"\u22b4",ltrif:"\u25c2",ltrPar:"\u2996",lurdshar:"\u294a",luruhar:"\u2966",lvertneqq:"\u2268\ufe00",lvnE:"\u2268\ufe00",macr:"\xaf",male:"\u2642",malt:"\u2720",maltese:"\u2720",Map:"\u2905",map:"\u21a6",mapsto:"\u21a6",mapstodown:"\u21a7",mapstoleft:"\u21a4",mapstoup:"\u21a5",marker:"\u25ae",mcomma:"\u2a29",Mcy:"\u041c",mcy:"\u043c",mdash:"\u2014",mDDot:"\u223a",measuredangle:"\u2221",MediumSpace:"\u205f",Mellintrf:"\u2133",Mfr:"\ud835\udd10",mfr:"\ud835\udd2a",mho:"\u2127",micro:"\xb5",mid:"\u2223",midast:"*",midcir:"\u2af0",middot:"\xb7",minus:"\u2212",minusb:"\u229f",minusd:"\u2238",minusdu:"\u2a2a",MinusPlus:"\u2213",mlcp:"\u2adb",mldr:"\u2026",mnplus:"\u2213",models:"\u22a7",Mopf:"\ud835\udd44",mopf:"\ud835\udd5e",mp:"\u2213",Mscr:"\u2133",mscr:"\ud835\udcc2",mstpos:"\u223e",Mu:"\u039c",mu:"\u03bc",multimap:"\u22b8",mumap:"\u22b8",nabla:"\u2207",Nacute:"\u0143",nacute:"\u0144",nang:"\u2220\u20d2",nap:"\u2249",napE:"\u2a70\u0338",napid:"\u224b\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266e",natural:"\u266e",naturals:"\u2115",nbsp:"\xa0",nbump:"\u224e\u0338",nbumpe:"\u224f\u0338",ncap:"\u2a43",Ncaron:"\u0147",ncaron:"\u0148",Ncedil:"\u0145",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2a6d\u0338",ncup:"\u2a42",Ncy:"\u041d",ncy:"\u043d",ndash:"\u2013",ne:"\u2260",nearhk:"\u2924",neArr:"\u21d7",nearr:"\u2197",nearrow:"\u2197",nedot:"\u2250\u0338",NegativeMediumSpace:"\u200b",NegativeThickSpace:"\u200b",NegativeThinSpace:"\u200b",NegativeVeryThinSpace:"\u200b",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",NestedGreaterGreater:"\u226b",NestedLessLess:"\u226a",NewLine:"\n",nexist:"\u2204",nexists:"\u2204",Nfr:"\ud835\udd11",nfr:"\ud835\udd2b",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2a7e\u0338",nges:"\u2a7e\u0338",nGg:"\u22d9\u0338",ngsim:"\u2275",nGt:"\u226b\u20d2",ngt:"\u226f",ngtr:"\u226f",nGtv:"\u226b\u0338",nhArr:"\u21ce",nharr:"\u21ae",nhpar:"\u2af2",ni:"\u220b",nis:"\u22fc",nisd:"\u22fa",niv:"\u220b",NJcy:"\u040a",njcy:"\u045a",nlArr:"\u21cd",nlarr:"\u219a",nldr:"\u2025",nlE:"\u2266\u0338",nle:"\u2270",nLeftarrow:"\u21cd",nleftarrow:"\u219a",nLeftrightarrow:"\u21ce",nleftrightarrow:"\u21ae",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2a7d\u0338",nles:"\u2a7d\u0338",nless:"\u226e",nLl:"\u22d8\u0338",nlsim:"\u2274",nLt:"\u226a\u20d2",nlt:"\u226e",nltri:"\u22ea",nltrie:"\u22ec",nLtv:"\u226a\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xa0",Nopf:"\u2115",nopf:"\ud835\udd5f",Not:"\u2aec",not:"\xac",NotCongruent:"\u2262",NotCupCap:"\u226d",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226f",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226b\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2a7e\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224e\u0338",NotHumpEqual:"\u224f\u0338",notin:"\u2209",notindot:"\u22f5\u0338",notinE:"\u22f9\u0338",notinva:"\u2209",notinvb:"\u22f7",notinvc:"\u22f6",NotLeftTriangle:"\u22ea",NotLeftTriangleBar:"\u29cf\u
20338",NotLeftTriangleEqual:"\u22ec",NotLess:"\u226e",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226a\u0338",NotLessSlantEqual:"\u2a7d\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2aa2\u0338",NotNestedLessLess:"\u2aa1\u0338",notni:"\u220c",notniva:"\u220c",notnivb:"\u22fe",notnivc:"\u22fd",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2aaf\u0338",NotPrecedesSlantEqual:"\u22e0",NotReverseElement:"\u220c",NotRightTriangle:"\u22eb",NotRightTriangleBar:"\u29d0\u0338",NotRightTriangleEqual:"\u22ed",NotSquareSubset:"\u228f\u0338",NotSquareSubsetEqual:"\u22e2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22e3",NotSubset:"\u2282\u20d2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2ab0\u0338",NotSucceedsSlantEqual:"\u22e1",NotSucceedsTilde:"\u227f\u0338",NotSuperset:"\u2283\u20d2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2afd\u20e5",npart:"\u2202\u0338",npolint:"\u2a14",npr:"\u2280",nprcue:"\u22e0",npre:"\u2aaf\u0338",nprec:"\u2280",npreceq:"\u2aaf\u0338",nrArr:"\u21cf",nrarr:"\u219b",nrarrc:"\u2933\u0338",nrarrw:"\u219d\u0338",nRightarrow:"\u21cf",nrightarrow:"\u219b",nrtri:"\u22eb",nrtrie:"\u22ed",nsc:"\u2281",nsccue:"\u22e1",nsce:"\u2ab0\u0338",Nscr:"\ud835\udca9",nscr:"\ud835\udcc3",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22e2",nsqsupe:"\u22e3",nsub:"\u2284",nsubE:"\u2ac5\u0338",nsube:"\u2288",nsubset:"\u2282\u20d2",nsubseteq:"\u2288",nsubseteqq:"\u2ac5\u0338",nsucc:"\u2281",nsucceq:"\u2ab0\u0338",nsup:"\u2285",nsupE:"\u2ac6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20d2",nsupseteq:"\u2289",nsupseteqq:"\u2ac6\u0338",ntgl:"\u2279",Ntilde:"\xd1",ntilde:"\xf1",ntlg:"\u2278",ntriangleleft:"\u22ea",ntrianglelefteq:"\u22ec",ntriangleright:"\u22eb",ntrianglerighteq:"\u22ed",Nu:"\u039d",nu:"\u
203bd",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224d\u20d2",nVDash:"\u22af",nVdash:"\u22ae",nvDash:"\u22ad",nvdash:"\u22ac",nvge:"\u2265\u20d2",nvgt:">\u20d2",nvHarr:"\u2904",nvinfin:"\u29de",nvlArr:"\u2902",nvle:"\u2264\u20d2",nvlt:"<\u20d2",nvltrie:"\u22b4\u20d2",nvrArr:"\u2903",nvrtrie:"\u22b5\u20d2",nvsim:"\u223c\u20d2",nwarhk:"\u2923",nwArr:"\u21d6",nwarr:"\u2196",nwarrow:"\u2196",nwnear:"\u2927",Oacute:"\xd3",oacute:"\xf3",oast:"\u229b",ocir:"\u229a",Ocirc:"\xd4",ocirc:"\xf4",Ocy:"\u041e",ocy:"\u043e",odash:"\u229d",Odblac:"\u0150",odblac:"\u0151",odiv:"\u2a38",odot:"\u2299",odsold:"\u29bc",OElig:"\u0152",oelig:"\u0153",ofcir:"\u29bf",Ofr:"\ud835\udd12",ofr:"\ud835\udd2c",ogon:"\u02db",Ograve:"\xd2",ograve:"\xf2",ogt:"\u29c1",ohbar:"\u29b5",ohm:"\u03a9",oint:"\u222e",olarr:"\u21ba",olcir:"\u29be",olcross:"\u29bb",oline:"\u203e",olt:"\u29c0",Omacr:"\u014c",omacr:"\u014d",Omega:"\u03a9",omega:"\u03c9",Omicron:"\u039f",omicron:"\u03bf",omid:"\u29b6",ominus:"\u2296",Oopf:"\ud835\udd46",oopf:"\ud835\udd60",opar:"\u29b7",OpenCurlyDoubleQuote:"\u201c",OpenCurlyQuote:"\u2018",operp:"\u29b9",oplus:"\u2295",Or:"\u2a54",or:"\u2228",orarr:"\u21bb",ord:"\u2a5d",order:"\u2134",orderof:"\u2134",ordf:"\xaa",ordm:"\xba",origof:"\u22b6",oror:"\u2a56",orslope:"\u2a57",orv:"\u2a5b",oS:"\u24c8",Oscr:"\ud835\udcaa",oscr:"\u2134",Oslash:"\xd8",oslash:"\xf8",osol:"\u2298",Otilde:"\xd5",otilde:"\xf5",Otimes:"\u2a37",otimes:"\u2297",otimesas:"\u2a36",Ouml:"\xd6",ouml:"\xf6",ovbar:"\u233d",OverBar:"\u203e",OverBrace:"\u23de",OverBracket:"\u23b4",OverParenthesis:"\u23dc",par:"\u2225",para:"\xb6",parallel:"\u2225",parsim:"\u2af3",parsl:"\u2afd",part:"\u2202",PartialD:"\u2202",Pcy:"\u041f",pcy:"\u043f",percnt:"%",period:".",permil:"\u2030",perp:"\u22a5",pertenk:"\u2031",Pfr:"\ud835\udd13",pfr:"\ud835\udd2d",Phi:"\u03a6",phi:"\u03c6",phiv:"\u03d5",phmmat:"\u2133",phone:"\u260e",Pi:"\u03a0",pi:"\u03c0",pitchfork:"\u22d4",piv:"\u03d6",planck:"\u210f",planckh:"\u210e",plankv:"\u210f",plus:"+",plusacir:"\u2a23",plusb:"\u229e",pluscir:"\u2a22",plusdo:"\u2214",plusdu:"\u2a25",pluse:"\u2a72",PlusMinus:"\xb1",plusmn:"\xb1",plussim:"\u2a26",plustwo:"\u2a27",pm:"\xb1",Poincareplane:"\u210c",pointint:"\u2a15",Popf:"\u2119",popf:"\ud835\udd61",pound:"\xa3",Pr:"\u2abb",pr:"\u227a",prap:"\u2ab7",prcue:"\u227c",prE:"\u2ab3",pre:"\u2aaf",prec:"\u227a",precapprox:"\u2ab7",preccurlyeq:"\u227c",Precedes:"\u227a",PrecedesEqual:"\u2aaf",PrecedesSlantEqual:"\u227c",PrecedesTilde:"\u227e",preceq:"\u2aaf",precnapprox:"\u2ab9",precneqq:"\u2ab5",precnsim:"\u22e8",precsim:"\u227e",Prime:"\u2033",prime:"\u2032",primes:"\u2119",prnap:"\u2ab9",prnE:"\u2ab5",prnsim:"\u22e8",prod:"\u220f",Product:"\u220f",profalar:"\u232e",profline:"\u2312",profsurf:"\u2313",prop:"\u221d",Proportion:"\u2237",Proportional:"\u221d",propto:"\u221d",prsim:"\u227e",prurel:"\u22b0",Pscr:"\ud835\udcab",pscr:"\ud835\udcc5",Psi:"\u03a8",psi:"\u03c8",puncsp:"\u2008",Qfr:"\ud835\udd14",qfr:"\ud835\udd2e",qint:"\u2a0c",Qopf:"\u211a",qopf:"\ud835\udd62",qprime:"\u2057",Qscr:"\ud835\udcac",qscr:"\ud835\udcc6",quaternions:"\u210d",quatint:"\u2a16",quest:"?",questeq:"\u225f",QUOT:'"',quot:'"',rAarr:"\u21db",race:"\u223d\u0331",Racute:"\u0154",racute:"\u0155",radic:"\u221a",raemptyv:"\u29b3",Rang:"\u27eb",rang:"\u27e9",rangd:"\u2992",range:"\u29a5",rangle:"\u27e9",raquo:"\xbb",Rarr:"\u21a0",rArr:"\u21d2",rarr:"\u2192",rarrap:"\u2975",rarrb:"\u21e5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291e",rarrhk:"\u21aa",rarrlp:"\u21ac",rarrpl:"\u2945",rarrsim:"\u2974",Rarrtl:"\u2916",rarrtl:"\u21a3",rarrw:"\u219d",rAtail:"\u291c",ratail:"\u291a",ratio:"\u2236",rationals:"\u211a",RBarr:"\u2910",rBarr:"\u290f",rbarr:"\u290d",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298c",rbrksld:"\u298e",rbrkslu:"\u2990",Rcaron:"\u0158",rcaron:"\u0159",Rcedil:"\u0156",rcedil:"\u0157",rceil:"\u2309",rcub:"}",Rcy:"\u0420",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201d",rdquor:"\u201d",rdsh:"\u21b3",Re:"\u211c",real:"\u211c",realine:"\u211b",realpart:"\u211c",reals:"\u211d",rect:"\u25ad",REG:"\xae",reg:"\xae",ReverseElement:"\u220b",ReverseEquilibrium:"\u21cb",ReverseUpEquilibrium:"\u296f",rfisht:"\u297d",rfloor:"\u230b",Rfr:"\u211c",rfr:"\ud835\udd2f",rHar:"\u2964",rhard:"\u21c1",rharu:"\u21c0",rharul:"\u296c",Rho:"\u03a1",rho:"\u03c1",rhov:"\u
203f1",RightAngleBracket:"\u27e9",RightArrow:"\u2192",Rightarrow:"\u21d2",rightarrow:"\u2192",RightArrowBar:"\u21e5",RightArrowLeftArrow:"\u21c4",rightarrowtail:"\u21a3",RightCeiling:"\u2309",RightDoubleBracket:"\u27e7",RightDownTeeVector:"\u295d",RightDownVector:"\u21c2",RightDownVectorBar:"\u2955",RightFloor:"\u230b",rightharpoondown:"\u21c1",rightharpoonup:"\u21c0",rightleftarrows:"\u21c4",rightleftharpoons:"\u21cc",rightrightarrows:"\u21c9",rightsquigarrow:"\u219d",RightTee:"\u22a2",RightTeeArrow:"\u21a6",RightTeeVector:"\u295b",rightthreetimes:"\u22cc",RightTriangle:"\u22b3",RightTriangleBar:"\u29d0",RightTriangleEqual:"\u22b5",RightUpDownVector:"\u294f",RightUpTeeVector:"\u295c",RightUpVector:"\u21be",RightUpVectorBar:"\u2954",RightVector:"\u21c0",RightVectorBar:"\u2953",ring:"\u02da",risingdotseq:"\u2253",rlarr:"\u21c4",rlhar:"\u21cc",rlm:"\u200f",rmoust:"\u23b1",rmoustache:"\u23b1",rnmid:"\u2aee",roang:"\u27ed",roarr:"\u21fe",robrk:"\u27e7",ropar:"\u2986",Ropf:"\u211d",ropf:"\ud835\udd63",roplus:"\u2a2e",rotimes:"\u2a35",RoundImplies:"\u2970",rpar:")",rpargt:"\u2994",rppolint:"\u2a12",rrarr:"\u21c9",Rrightarrow:"\u21db",rsaquo:"\u203a",Rscr:"\u211b",rscr:"\ud835\udcc7",Rsh:"\u21b1",rsh:"\u21b1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22cc",rtimes:"\u22ca",rtri:"\u25b9",rtrie:"\u22b5",rtrif:"\u25b8",rtriltri:"\u29ce",RuleDelayed:"\u29f4",ruluhar:"\u2968",rx:"\u211e",Sacute:"\u015a",sacute:"\u015b",sbquo:"\u201a",Sc:"\u2abc",sc:"\u227b",scap:"\u2ab8",Scaron:"\u0160",scaron:"\u0161",sccue:"\u227d",scE:"\u2ab4",sce:"\u2ab0",Scedil:"\u015e",scedil:"\u015f",Scirc:"\u015c",scirc:"\u015d",scnap:"\u2aba",scnE:"\u2ab6",scnsim:"\u22e9",scpolint:"\u2a13",scsim:"\u227f",Scy:"\u0421",scy:"\u0441",sdot:"\u22c5",sdotb:"\u22a1",sdote:"\u2a66",searhk:"\u2925",seArr:"\u21d8",searr:"\u2198",searrow:"\u2198",sect:"\xa7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",Sfr:"\ud835\udd16",sfr:"\ud835\udd30",sfrown:"\u2322",sharp:"\u266f",SHCHcy:"\u0429",shchcy:"\u0449",SHcy:"\u0428",shcy:"\u0448",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",shortmid:"\u2223",shortparallel:"\u2225",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",shy:"\xad",Sigma:"\u03a3",sigma:"\u03c3",sigmaf:"\u03c2",sigmav:"\u03c2",sim:"\u223c",simdot:"\u2a6a",sime:"\u2243",simeq:"\u2243",simg:"\u2a9e",simgE:"\u2aa0",siml:"\u2a9d",simlE:"\u2a9f",simne:"\u2246",simplus:"\u2a24",simrarr:"\u2972",slarr:"\u2190",SmallCircle:"\u2218",smallsetminus:"\u2216",smashp:"\u2a33",smeparsl:"\u29e4",smid:"\u2223",smile:"\u2323",smt:"\u2aaa",smte:"\u2aac",smtes:"\u2aac\ufe00",SOFTcy:"\u042c",softcy:"\u044c",sol:"/",solb:"\u29c4",solbar:"\u233f",Sopf:"\ud835\udd4a",sopf:"\ud835\udd64",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\ufe00",sqcup:"\u2294",sqcups:"\u2294\ufe00",Sqrt:"\u221a",sqsub:"\u228f",sqsube:"\u2291",sqsubset:"\u228f",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25a1",Square:"\u25a1",square:"\u25a1",SquareIntersection:"\u2293",SquareSubset:"\u228f",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",squarf:"\u25aa",squf:"\u25aa",srarr:"\u2192",Sscr:"\ud835\udcae",sscr:"\ud835\udcc8",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22c6",Star:"\u22c6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03f5",straightphi:"\u03d5",strns:"\xaf",Sub:"\u22d0",sub:"\u2282",subdot:"\u2abd",subE:"\u2ac5",sube:"\u2286",subedot:"\u2ac3",submult:"\u2ac1",subnE:"\u2acb",subne:"\u228a",subplus:"\u2abf",subrarr:"\u2979",Subset:"\u22d0",subset:"\u2282",subseteq:"\u2286",subseteqq:"\u2ac5",SubsetEqual:"\u2286",subsetneq:"\u228a",subsetneqq:"\u2acb",subsim:"\u2ac7",subsub:"\u2ad5",subsup:"\u2ad3",succ:"\u227b",succapprox:"\u2ab8",succcurlyeq:"\u227d",Succeeds:"\u227b",SucceedsEqual:"\u2ab0",SucceedsSlantEqual:"\u227d",SucceedsTilde:"\u227f",succeq:"\u2ab0",succnapprox:"\u2aba",succneqq:"\u2ab6",succnsim:"\u22e9",succsim:"\u227f",SuchThat:"\u220b",Sum:"\u2211",sum:"\u2211",sung:"\u266a",Sup:"\u22d1",sup:"\u2283",sup1:"\xb9",sup2:"\xb2",sup3:"\xb3",supdot:"\u2abe",supdsub:"\u2ad8",supE:"\u2ac6",supe:"\u2287",supedot:"\u2ac4",Superset:"\u2283",SupersetEqual:"\u2287",suphsol:"\u27c9",suphsub
2:"\u2ad7",suplarr:"\u297b",supmult:"\u2ac2",supnE:"\u2acc",supne:"\u228b",supplus:"\u2ac0",Supset:"\u22d1",supset:"\u2283",supseteq:"\u2287",supseteqq:"\u2ac6",supsetneq:"\u228b",supsetneqq:"\u2acc",supsim:"\u2ac8",supsub:"\u2ad4",supsup:"\u2ad6",swarhk:"\u2926",swArr:"\u21d9",swarr:"\u2199",swarrow:"\u2199",swnwar:"\u292a",szlig:"\xdf",Tab:"\t",target:"\u2316",Tau:"\u03a4",tau:"\u03c4",tbrk:"\u23b4",Tcaron:"\u0164",tcaron:"\u0165",Tcedil:"\u0162",tcedil:"\u0163",Tcy:"\u0422",tcy:"\u0442",tdot:"\u20db",telrec:"\u2315",Tfr:"\ud835\udd17",tfr:"\ud835\udd31",there4:"\u2234",Therefore:"\u2234",therefore:"\u2234",Theta:"\u0398",theta:"\u03b8",thetasym:"\u03d1",thetav:"\u03d1",thickapprox:"\u2248",thicksim:"\u223c",ThickSpace:"\u205f\u200a",thinsp:"\u2009",ThinSpace:"\u2009",thkap:"\u2248",thksim:"\u223c",THORN:"\xde",thorn:"\xfe",Tilde:"\u223c",tilde:"\u02dc",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",times:"\xd7",timesb:"\u22a0",timesbar:"\u2a31",timesd:"\u2a30",tint:"\u222d",toea:"\u2928",top:"\u22a4",topbot:"\u2336",topcir:"\u2af1",Topf:"\ud835\udd4b",topf:"\ud835\udd65",topfork:"\u2ada",tosa:"\u2929",tprime:"\u2034",TRADE:"\u2122",trade:"\u2122",triangle:"\u25b5",triangledown:"\u25bf",triangleleft:"\u25c3",trianglelefteq:"\u22b4",triangleq:"\u225c",triangleright:"\u25b9",trianglerighteq:"\u22b5",tridot:"\u25ec",trie:"\u225c",triminus:"\u2a3a",TripleDot:"\u20db",triplus:"\u2a39",trisb:"\u29cd",tritime:"\u2a3b",trpezium:"\u23e2",Tscr:"\ud835\udcaf",tscr:"\ud835\udcc9",TScy:"\u0426",tscy:"\u0446",TSHcy:"\u040b",tshcy:"\u045b",Tstrok:"\u0166",tstrok:"\u0167",twixt:"\u226c",twoheadleftarrow:"\u219e",twoheadrightarrow:"\u21a0",Uacute:"\xda",uacute:"\xfa",Uarr:"\u219f",uArr:"\u21d1",uarr:"\u2191",Uarrocir:"\u2949",Ubrcy:"\u040e",ubrcy:"\u045e",Ubreve:"\u016c",ubreve:"\u016d",Ucirc:"\xdb",ucirc:"\xfb",Ucy:"\u0423",ucy:"\u0443",udarr:"\u21c5",Udblac:"\u0170",udblac:"\u0171",udhar:"\u296e",ufisht:"\u297e",Ufr:"\ud835\udd18",ufr:"\ud835\udd32",Ugrave:"\xd9",ugrave:"\xf9",uHar:"\u2963",uharl:"\u21bf",uharr:"\u21be",uhblk:"\u2580",ulcorn:"\u231c",ulcorner:"\u231c",ulcrop:"\u230f",ultri:"\u25f8",Umacr:"\u016a",umacr:"\u016b",uml:"\xa8",UnderBar:"_",UnderBrace:"\u23df",UnderBracket:"\u23b5",UnderParenthesis:"\u23dd",Union:"\u22c3",UnionPlus:"\u228e",Uogon:"\u0172",uogon:"\u0173",Uopf:"\ud835\udd4c",uopf:"\ud835\udd66",UpArrow:"\u2191",Uparrow:"\u21d1",uparrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21c5",UpDownArrow:"\u2195",Updownarrow:"\u21d5",updownarrow:"\u2195",UpEquilibrium:"\u296e",upharpoonleft:"\u21bf",upharpoonright:"\u21be",uplus:"\u228e",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",Upsi:"\u03d2",upsi:"\u03c5",upsih:"\u03d2",Upsilon:"\u03a5",upsilon:"\u03c5",UpTee:"\u22a5",UpTeeArrow:"\u21a5",upuparrows:"\u21c8",urcorn:"\u231d",urcorner:"\u231d",urcrop:"\u230e",Uring:"\u016e",uring:"\u016f",urtri:"\u25f9",Uscr:"\ud835\udcb0",uscr:"\ud835\udcca",utdot:"\u22f0",Utilde:"\u0168",utilde:"\u0169",utri:"\u25b5",utrif:"\u25b4",uuarr:"\u21c8",Uuml:"\xdc",uuml:"\xfc",uwangle:"\u29a7",vangrt:"\u299c",varepsilon:"\u03f5",varkappa:"\u03f0",varnothing:"\u2205",varphi:"\u03d5",varpi:"\u03d6",varpropto:"\u221d",vArr:"\u21d5",varr:"\u2195",varrho:"\u03f1",varsigma:"\u03c2",varsubsetneq:"\u228a\ufe00",varsubsetneqq:"\u2acb\ufe00",varsupsetneq:"\u228b\ufe00",varsupsetneqq:"\u2acc\ufe00",vartheta:"\u03d1",vartriangleleft:"\u22b2",vartriangleright:"\u22b3",Vbar:"\u2aeb",vBar:"\u2ae8",vBarv:"\u2ae9",Vcy:"\u0412",vcy:"\u0432",VDash:"\u22ab",Vdash:"\u22a9",vDash:"\u22a8",vdash:"\u22a2",Vdashl:"\u2ae6",Vee:"\u22c1",vee:"\u2228",veebar:"\u22bb",veeeq:"\u225a",vellip:"\u22ee",Verbar:"\u2016",verbar:"|",Vert:"\u2016",vert:"|",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200a",Vfr:"\ud835\udd19",vfr:"\ud835\udd33",vltri:"\u22b2",vnsub:"\u2282\u20d2",vnsup:"\u2283\u20d2",Vopf:"\ud835\udd4d",vopf:"\ud835\udd67",vprop:"\u221d",vrtri:"\u22b3",Vscr:"\ud835\udcb1",vscr:"\ud835\udccb",vsubnE:"\u2acb\ufe00",vsubne:"\u228a\ufe00",vsupnE:"\u2acc\ufe00",vsupne:"\u228b\ufe00",Vvdash:"\u22aa",vzigzag:"\u299a",Wcirc:"\u0174",wcirc:"\u0175",wedbar:"\u2a5f",Wedge:"\u22c0",wedge:"\u2227",wedgeq:"\u2259",weierp:"\u2118",Wfr:"\ud835\udd1a",wfr:"\ud835\udd34",Wopf:"\ud835\udd4e",wopf:"\ud835\udd68",wp:"\u2118",wr:"\u2240",wreath:"\u2240",Wscr:"\ud835\udcb2",wscr:"\ud835\udccc",xcap:"\u22c2",xcirc:"\u25ef",xcup:"\u22c3",xdtri:"\u25bd",Xfr:"\ud835\udd1b",xfr:"\ud835\udd35",xhArr:"\u27fa",xharr:"\u27f7",Xi:"\u039e",xi:"\u03be",xlArr:"\u27f8",xlarr:"\u27f5",xmap:"\u27fc",xnis:"\u22fb",xod
vendor: 5,203 bytes, line 2
2ot:"\u2a00",Xopf:"\ud835\udd4f",xopf:"\ud835\udd69",xoplus:"\u2a01",xotime:"\u2a02",xrArr:"\u27f9",xrarr:"\u27f6",Xscr:"\ud835\udcb3",xscr:"\ud835\udccd",xsqcup:"\u2a06",xuplus:"\u2a04",xutri:"\u25b3",xvee:"\u22c1",xwedge:"\u22c0",Yacute:"\xdd",yacute:"\xfd",YAcy:"\u042f",yacy:"\u044f",Ycirc:"\u0176",ycirc:"\u0177",Ycy:"\u042b",ycy:"\u044b",yen:"\xa5",Yfr:"\ud835\udd1c",yfr:"\ud835\udd36",YIcy:"\u0407",yicy:"\u0457",Yopf:"\ud835\udd50",yopf:"\ud835\udd6a",Yscr:"\ud835\udcb4",yscr:"\ud835\udcce",YUcy:"\u042e",yucy:"\u044e",Yuml:"\u0178",yuml:"\xff",Zacute:"\u0179",zacute:"\u017a",Zcaron:"\u017d",zcaron:"\u017e",Zcy:"\u0417",zcy:"\u0437",Zdot:"\u017b",zdot:"\u017c",zeetrf:"\u2128",ZeroWidthSpace:"\u200b",Zeta:"\u0396",zeta:"\u03b6",Zfr:"\u2128",zfr:"\ud835\udd37",ZHcy:"\u0416",zhcy:"\u0436",zigrarr:"\u21dd",Zopf:"\u2124",zopf:"\ud835\udd6b",Zscr:"\ud835\udcb5",zscr:"\ud835\udccf",zwj:"\u200d",zwnj:"\u200c"}),t.entityMap=t.HTML_ENTITIES},313:function(e,t,n){var i=n(210).NAMESPACE,r=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,s=new RegExp("[\\-\\.0-9"+r.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),a=new RegExp("^"+r.source+s.source+"*(?::"+r.source+s.source+"*)?$"),o=0,l=1,c=2,d=3,u=4,h=5,p=6,g=7;function m(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,m)}function f(){}function y(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function b(e,t,n,r,s,a){function m(e,t,i){n.attributeNames.hasOwnProperty(e)&&a.fatalError("Attribute "+e+" redefined"),n.addValue(e,t.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,s),i)}for(var f,y=++t,b=o;;){var v=e.charAt(y);switch(v){case"=":if(b===l)f=e.slice(t,y),b=d;else{if(b!==c)throw new Error("attribute equal must after attrName");b=d}break;case"'":case'"':if(b===d||b===l){if(b===l&&(a.warning('attribute value must after "="'),f=e.slice(t,y)),t=y+1,!((y=e.indexOf(v,t))>0))throw new Error("attribute value no end '"+v+"' match");m(f,_=e.slice(t,y),t-1),b=h}else{if(b!=u)throw new Error('attribute value must after "="');m(f,_=e.slice(t,y),t),a.warning('attribute "'+f+'" missed start quot('+v+")!!"),t=y+1,b=h}break;case"/":switch(b){case o:n.setTagName(e.slice(t,y));case h:case p:case g:b=g,n.closed=!0;case u:case l:break;case c:n.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return a.error("unexpected end of input"),b==o&&n.setTagName(e.slice(t,y)),y;case">":switch(b){case o:n.setTagName(e.slice(t,y));case h:case p:case g:break;case u:case l:"/"===(_=e.slice(t,y)).slice(-1)&&(n.closed=!0,_=_.slice(0,-1));case c:b===c&&(_=f),b==u?(a.warning('attribute "'+_+'" missed quot(")!'),m(f,_,t)):(i.isHTML(r[""])&&_.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+_+'" missed value!! "'+_+'" instead!!'),m(_,_,t));break;case d:throw new Error("attribute value missed!!")}return y;case"\x80":v=" ";default:if(v<=" ")switch(b){case o:n.setTagName(e.slice(t,y)),b=p;break;case l:f=e.slice(t,y),b=c;break;case u:var _=e.slice(t,y);a.warning('attribute "'+_+'" missed quot(")!!'),m(f,_,t);case h:b=p}else switch(b){case c:n.tagName;i.isHTML(r[""])&&f.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+f+'" missed value!! "'+f+'" instead2!!'),m(f,f,t),t=y,b=l;break;case h:a.warning('attribute space is required"'+f+'"!!');case p:b=l,t=y;break;case d:b=u,t=y;break;case g:throw new Error("elements closed character '/' and '>' must be connected to")}}y++}}function v(e,t,n){for(var r=e.tagName,s=null,a=e.length;a--;){var o=e[a],l=o.qName,c=o.value;if((p=l.indexOf(":"))>0)var d=o.prefix=l.slice(0,p),u=l.slice(p+1),h="xmlns"===d&&u;else u=l,d=null,h="xmlns"===l&&"";o.localName=u,!1!==h&&(null==s&&(s={},x(n,n={})),n[h]=s[h]=c,o.uri=i.XMLNS,t.startPrefixMapping(h,c))}for(a=e.length;a--;){(d=(o=e[a]).prefix)&&("xml"===d&&(o.uri=i.XML),"xmlns"!==d&&(o.uri=n[d||""]))}var p;(p=r.indexOf(":"))>0?(d=e.prefix=r.slice(0,p),u=e.localName=r.slice(p+1)):(d=null,u=e.localName=r);var g=e.uri=n[d||""];if(t.startElement(g,u,r,e),!e.closed)return e.currentNSMap=n,e.localNSMap=s,!0;if(t.endElement(g,u,r),s)for(d in s)Object.prototype.hasOwnProperty.call(s,d)&&t.endPrefixMapping(d)}function _(e,t,n,i,r){if(/^(?:script|textarea)$/i.test(n)){var s=e.indexOf("</"+n+">",t),a=e.substring(t+1,s);if(/[&<]/.test(a))return/^script$/i.test(n)?(r.characters(a,0,a.length),s):(a=a.replace(/&#?\w+;/g,i),r.characters(a,0,a.length),s)}return t+1}function T(e,t,n,i){var r=i[n];return null==r&&((r=e.lastIndexOf("</"+n+">"))<t&&(r=e.lastIndexOf("</"+n)),i[n]=r),r<t}function x(e,t){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}function S(e,t,n,i){if("-"===e.charAt(t+2))return"-"===e.charAt(t+3)?(r=e.indexOf("--\x3e",t+4))>t?(n.comment(e,t+4,r-t-4),r+3):(i.error("Unclosed comment"),-1):-1;if("CDATA["==e.substr(t+3,6)){var r=e.indexOf("]]>",t+9);return n.startCDATA(),n.characters(e,t+9,r-t-9),n.endCDATA(),r+3}var s=function(e,t){var n,i=[],r=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;r.lastIndex=t,r.exec(e);for(;n=r.exec(e);)if(i.push(n),n[1])return i}(e,t),a=s.length;if(a>
vendor: 4,598 bytes, line 2
21&&/!doctype/i.test(s[0][0])){var o=s[1][0],l=!1,c=!1;a>3&&(/^public$/i.test(s[2][0])?(l=s[3][0],c=a>4&&s[4][0]):/^system$/i.test(s[2][0])&&(c=s[3][0]));var d=s[a-1];return n.startDTD(o,l,c),n.endDTD(),d.index+d[0].length}return-1}function A(e,t,n){var i=e.indexOf("?>",t);if(i){var r=e.substring(t,i).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(r){r[0].length;return n.processingInstruction(r[1],r[2]),i+2}return-1}return-1}function w(){this.attributeNames={}}m.prototype=new Error,m.prototype.name=m.name,f.prototype={parse:function(e,t,n){var r=this.domBuilder;r.startDocument(),x(t,t={}),function(e,t,n,r,s){function a(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}function o(e){var t=e.slice(1,-1);return Object.hasOwnProperty.call(n,t)?n[t]:"#"===t.charAt(0)?a(parseInt(t.substr(1).replace("x","0x"))):(s.error("entity not found:"+e),e)}function l(t){if(t>x){var n=e.substring(x,t).replace(/&#?\w+;/g,o);p&&c(x),r.characters(n,0,t-x),x=t}}function c(t,n){for(;t>=u&&(n=h.exec(e));)d=n.index,u=d+n[0].length,p.lineNumber++;p.columnNumber=t-d+1}var d=0,u=0,h=/.*(?:\r\n?|\n)|.*$/g,p=r.locator,g=[{currentNSMap:t}],f={},x=0;for(;;){try{var j=e.indexOf("<",x);if(j<0){if(!e.substr(x).match(/^\s*$/)){var k=r.doc,C=k.createTextNode(e.substr(x));k.appendChild(C),r.currentElement=C}return}switch(j>x&&l(j),e.charAt(j+1)){case"/":var O=e.indexOf(">",j+3),E=e.substring(j+2,O).replace(/[ \t\n\r]+$/g,""),I=g.pop();O<0?(E=e.substring(j+2).replace(/[\s<].*/,""),s.error("end tag name: "+E+" is not complete:"+I.tagName),O=j+1+E.length):E.match(/\s</)&&(E=E.replace(/[\s<].*/,""),s.error("end tag name: "+E+" maybe not complete"),O=j+1+E.length);var P=I.localNSMap,R=I.tagName==E;if(R||I.tagName&&I.tagName.toLowerCase()==E.toLowerCase()){if(r.endElement(I.uri,I.localName,E),P)for(var D in P)Object.prototype.hasOwnProperty.call(P,D)&&r.endPrefixMapping(D);R||s.fatalError("end tag name: "+E+" is not match the current start tagName:"+I.tagName)}else g.push(I);O++;break;case"?":p&&c(j),O=A(e,j,r);break;case"!":p&&c(j),O=S(e,j,r,s);break;default:p&&c(j);var L=new w,M=g[g.length-1].currentNSMap,N=(O=b(e,j,L,M,o,s),L.length);if(!L.closed&&T(e,O,L.tagName,f)&&(L.closed=!0,n.nbsp||s.warning("unclosed xml attribute")),p&&N){for(var B=y(p,{}),U=0;U<N;U++){var F=L[U];c(F.offset),F.locator=y(p,{})}r.locator=B,v(L,r,M)&&g.push(L),r.locator=p}else v(L,r,M)&&g.push(L);i.isHTML(L.uri)&&!L.closed?O=_(e,O,L.tagName,o,r):O++}}catch(q){if(q instanceof m)throw q;s.error("element parse error: "+q),O=-1}O>x?x=O:l(Math.max(j,x)+1)}}(e,t,n,r,this.errorHandler),r.endDocument()}},w.prototype={setTagName:function(e){if(!a.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,n){if(!a.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:n}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},t.XMLReader=f,t.ParseError=m},314:function(e,t,n){var i=n(315).getUint64;e.exports=function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},r=12;0===n.version?(n.earliestPresentationTime=t.getUint32(r),n.firstOffset=t.getUint32(r+4),r+=8):(n.earliestPresentationTime=i(e.subarray(r)),n.firstOffset=i(e.subarray(r+8)),r+=16),r+=2;var s=t.getUint16(r);for(r+=2;s>0;r+=12,s--)n.references.push({referenceType:(128&e[r])>>>7,referencedSize:2147483647&t.getUint32(r),subsegmentDuration:t.getUint32(r+4),startsWithSap:!!(128&e[r+8]),sapType:(112&e[r+8])>>>4,sapDeltaTime:268435455&t.getUint32(r+8)});return n}},315:function(e,t){var n=Math.pow(2,32);e.exports={getUint64:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength);return i.getBigUint64?(t=i.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(t):t:i.getUint32(0)*n+i.getUint32(4)},MAX_UINT32:n}},316:function(e,t){var n,i,r,s,a,o,l,c=9e4;n=function(e){return e*c},i=function(e,t){return e*t},r=function(e){return e/c},s=function(e,t){return e/t},a=function(e,t){return n(s(e,t))},o=function(e,t){return i(r(e),t)},l=function(e,t,n){return r(n?e:e-t)},e.exports={ONE_SECOND_IN_TS:c,secondsToVideoTs:n,secondsToAudioTs:i,videoTsToSeconds:r,audioTsToSeconds:s,audioTsToVideoTs:a,videoTsToAudioTs:o,metadataTsToSeconds:l}},317:function(e,t,n){"use strict";var i=n(189);
vendor: 7,408 bytes, line 2
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(190)),s=n(1),a=(0,r.default)((0,s.jsx)("path",{d:"m6 18 8.5-6L6 6v12zM16 6v12h2V6h-2z"}),"SkipNext");t.default=a},318:function(e,t,n){"use strict";var i=n(189);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(190)),s=n(1),a=(0,r.default)((0,s.jsx)("path",{d:"M21 3H3c-1.1 0-2 .9-2 2v3h2V5h18v14h-7v2h7c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM1 18v3h3c0-1.66-1.34-3-3-3zm0-4v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7zm0-4v2c4.97 0 9 4.03 9 9h2c0-6.08-4.93-11-11-11z"}),"Cast");t.default=a},319:function(e,t,n){},320:function(e,t,n){},321:function(e,t,n){},322:function(e,t,n){"use strict";n.d(t,"a",(function(){return A})),n.d(t,"b",(function(){return w}));var i,r=n(197),s=(new Uint8Array([79,112,117,115,72,101,97,100]),function(e){return"string"===typeof e?Object(r.h)(e):e}),a=function(e){e=Object(r.k)(e);for(var t=[],n=0;e.length>n;){var s=e[n],a=0,o=0,l=e[++o];for(o++;128&l;)a=(127&l)<<7,l=e[o],o++;a+=127&l;for(var c=0;c<i.length;c++){var d=i[c],u=d.id,h=d.parser;if(s===u){t.push(h(e.subarray(o,o+a)));break}}n+=a+o}return t};i=[{id:3,parser:function(e){var t={tag:3,id:e[0]<<8|e[1],flags:e[2],size:3,dependsOnEsId:0,ocrEsId:0,descriptors:[],url:""};if(128&t.flags&&(t.dependsOnEsId=e[t.size]<<8|e[t.size+1],t.size+=2),64&t.flags){var n=e[t.size];t.url=Object(r.c)(e.subarray(t.size+1,t.size+1+n)),t.size+=n}return 32&t.flags&&(t.ocrEsId=e[t.size]<<8|e[t.size+1],t.size+=2),t.descriptors=a(e.subarray(t.size))||[],t}},{id:4,parser:function(e){return{tag:4,oti:e[0],streamType:e[1],bufferSize:e[2]<<16|e[3]<<8|e[4],maxBitrate:e[5]<<24|e[6]<<16|e[7]<<8|e[8],avgBitrate:e[9]<<24|e[10]<<16|e[11]<<8|e[12],descriptors:a(e.subarray(13))}}},{id:5,parser:function(e){return{tag:5,bytes:e}}},{id:6,parser:function(e){return{tag:6,bytes:e}}}];var o=function e(t,n,i){void 0===i&&(i=!1),n=function(e){return Array.isArray(e)?e.map((function(e){return s(e)})):[s(e)]}(n),t=Object(r.k)(t);var a=[];if(!n.length)return a;for(var o=0;o<t.length;){var l=(t[o]<<24|t[o+1]<<16|t[o+2]<<8|t[o+3])>>>0,c=t.subarray(o+4,o+8);if(0===l)break;var d=o+l;if(d>t.length){if(i)break;d=t.length}var u=t.subarray(o+8,d);Object(r.a)(c,n[0])&&(1===n.length?a.push(u):a.push.apply(a,e(u,n.slice(1),i))),o=d}return a},l={EBML:Object(r.k)([26,69,223,163]),DocType:Object(r.k)([66,130]),Segment:Object(r.k)([24,83,128,103]),SegmentInfo:Object(r.k)([21,73,169,102]),Tracks:Object(r.k)([22,84,174,107]),Track:Object(r.k)([174]),TrackNumber:Object(r.k)([215]),DefaultDuration:Object(r.k)([35,227,131]),TrackEntry:Object(r.k)([174]),TrackType:Object(r.k)([131]),FlagDefault:Object(r.k)([136]),CodecID:Object(r.k)([134]),CodecPrivate:Object(r.k)([99,162]),VideoTrack:Object(r.k)([224]),AudioTrack:Object(r.k)([225]),Cluster:Object(r.k)([31,67,182,117]),Timestamp:Object(r.k)([231]),TimestampScale:Object(r.k)([42,215,177]),BlockGroup:Object(r.k)([160]),BlockDuration:Object(r.k)([155]),Block:Object(r.k)([161]),SimpleBlock:Object(r.k)([163])},c=[128,64,32,16,8,4,2,1],d=function(e,t,n,i){void 0===n&&(n=!0),void 0===i&&(i=!1);var s=function(e){for(var t=1,n=0;n<c.length&&!(e&c[n]);n++)t++;return t}(e[t]),a=e.subarray(t,t+s);return n&&((a=Array.prototype.slice.call(e,t,t+s))[0]^=c[s-1]),{length:s,value:Object(r.b)(a,{signed:i}),bytes:a}},u=function e(t){return"string"===typeof t?t.match(/.{1,2}/g).map((function(t){return e(t)})):"number"===typeof t?Object(r.f)(t):t},h=function e(t,n,i){if(i>=n.length)return n.length;var s=d(n,i,!1);if(Object(r.a)(t.bytes,s.bytes))return i;var a=d(n,i+s.length);return e(t,n,i+a.length+a.value+s.length)},p=function e(t,n){n=function(e){return Array.isArray(e)?e.map((function(e){return u(e)})):[u(e)]}(n),t=Object(r.k)(t);var i=[];if(!n.length)return i;for(var s=0;s<t.length;){var a=d(t,s,!1),o=d(t,s+a.length),l=s+a.length+o.length;127===o.value&&(o.value=h(a,t,l),o.value!==t.length&&(o.value-=l));var c=l+o.value>t.length?t.length:l+o.value,p=t.subarray(l,c);Object(r.a)(n[0],a.bytes)&&(1===n.length?i.push(p):i=i.concat(e(p,n.slice(1)))),s+=a.length+o.length+p.length}return i},g=n(253),m=Object(r.k)([0,0,0,1]),f=Object(r.k)([0,0,1]),y=Object(r.k)([0,0,3]),b=function(e){for(var t=[],n=1;n<e.length-2;)Object(r.a)(e.subarray(n,n+3),y)&&(t.push(n+2),n++),n++;if(0===t.length)return e;var i=e.length-t.length,s=new Uint8Array(i),a=0;for(n=0;n<i;a++,n++)a===t[0]&&(a++,t.shift()),s[n]=e[a];return s},v=function(e,t,n,i){void 0===i&&(i=1/0),e=Object(r.k)(e),n=[].concat(n);for(var s,a=0,o=0;a<e.length&&(o<i||s);){var l=void 0;if(Object(r.a)(e.subarray(a),m)?l=4:Object(r.a)(e.subarray(a),f)&&(l=3),l){if(o++,s)return b(e.subarray(s,a));var c=void 0;"h264"===t?c=31&e[a+l]:"h265"===t&&(c=e[a+l]>>1&63),-1!==n.indexOf(c)&&(s=a+l),a+=l+("h264"===t?1:2)}else a++}return e.subarray(0,0)},_={webm:Object(r.k)([119,101,98,109]),matroska:Object(r.k)([109,97,116,114,111,115,107,97]),flac:Object(r.k)([102,76,97,67]),ogg:Object(r.k)([79,103,103,83]),ac3:Object(r.k)([11,119]),riff:Object(r.k)([82,73,70,70]),avi:Object(r.k)([65,86,73]),wav:Object(r.k)([87,65,86,69]),"3gp":Object(r.k)([102,116,121,112,51,103]),mp4:Object(r.k)([102,116,121,112]),fmp4:Object(r.k)([115,116,121,112]),mov:Object(r.k)([102,116,121,112,113,116]),moov:Object(r.k)([109,111,111,118]),moof:Object(r.k)([109,111,111,102])},T={aac:function(e){var t=Object(g.a)(e);return Object(r.a)(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=Object(g.a)(e);return Object(r.a)(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){var t=p(e,[l.EBML,l.DocType])[0];return Object(r.a)(t,_.webm)},mkv:function(e){var t=p(e,[l.EBML,l.DocType])[0];return Object(r.a)(t,_.matroska)},mp4:function(e){return!T["3gp"](e)&&!T.mov(e)&&(!(!Object(r.a)(e,_.mp4,{offset:4})&&!Object(r.a)(e,_.fmp4,{offset:4}))||(!(!Object(r.a)(e,_.moof,{offset:4})&&!Object(r.a)(e,_.moov,{offset:4}))||void 0))},mov:function(e){return Object(r.a)(e,_.mov,{offset:4})},"3gp":function(e){return Object(r.a)(e,_["3gp"],{offset:4})},ac3:function(e){var t=Object(g.a)(e);return Object(r.a)(e,_.ac3,{offset:t})},ts:function(e){if(e.length<189&&e.length>=1)return 71===e[0];for(var t=0;t+188<e.length&&t<188;){if(71===e[t]&&71===e[t+188])return!0;t+=1}return!1},flac:function(e){var t=Object(g.a)(e);return Object(r.a)(e,_.flac,{offset:t})},ogg:function(e){return Object(r.a)(e,_.ogg)},avi:function(e){return Object(r.a)(e,_.riff)&&Object(r.a)(e,_.avi,{offset:8})},wav:function(e){return Object(r.a)(e,_.riff)&&Object(r.a)(e,_.wav,{offset:8})},h264:function(e){return function(e,t,n){return v(e,"h264",t,n)}(e,7,3).length},h265:function(e){return function(e,t,n){return v(e,"h265",t,n)}(e,[32,33],3).length}},x=Object.keys(T).filter((function(e){return"ts"!==e&&"h264"!==e&&"h265"!==e})).concat(["ts","h264","h265"]);x.forEach((function(e){var t=T[e];T[e]=function(e){return t(Object(r.k)(e))}}));var S=T,A=function(e){e=Object(r.k)(e);for(var t=0;t<x.length;t++){var n=x[t];if(S[n](e))return n}return""},w=function(e){return o(e,["moof"]).length>0}},323:function(e,t,n){"use strict";n.d(t,"a",(function(){return k})),n.d(t,"b",(function(){return D})),n.d(t,"c",(function(){return de})),n.d(t,"d",(function(){return ue}));var i=n(308),r=n.n(i),s=n(194),a=n.n(s),o="http://example.com",l=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=a.a.location&&a.a.location.href||"");var n="function"===typeof a.a.URL,i=/^\/\//.test(e),s=!a.a.location&&!/\/\//i.test(e);
2if(n?e=new a.a.URL(e,a.a.location||o):/\/\//i.test(e)||(e=r.a.buildAbsoluteURL(a.a.location&&a.a.location.href||"",e)),n){var l=new URL(t,e);return s?l.href.slice(18):i?l.href.slice(l.protocol.length):l.href}return r.a.buildAbsoluteURL(e,t)},c=n(309),d=n(310);const u=e=>!!e&&"object"===typeof e,h=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce(((e,t)=>("object"!==typeof t||Object.keys(t).forEach((n=>{Array.isArray(e[n])&&Array.isArray(t[n])?e[n]=e[n].concat(t[n]):u(e[n])&&u(t[n])?e[n]=h(e[n],t[n]):e[n]=t[n]})),e)),{})},p=e=>Object.keys(e).map((t=>e[t])),g=e=>e.reduce(((e,t)=>e.concat(t)),[]),m=e=>{if(!e.length)return[];const t=[];for(let n=0;n<e.length;n++)t.push(e[n]);return t};var f="INVALID_NUMBER_OF_PERIOD",y="DASH_EMPTY_MANIFEST",b="DASH_INVALID_XML",v="NO_BASE_URL",_="SEGMENT_TIME_UNSPECIFIED",T="UNSUPPORTED_UTC_TIMING_SCHEME";const x=e=>{let{baseUrl:t="",source:n="",range:i="",indexRange:r=""}=e;const s={uri:n,resolvedUri:l(t||"",n)};if(i||r){const e=(i||r).split("-");let t,n=a.a.BigInt?a.a.BigInt(e[0]):parseInt(e[0],10),o=a.a.BigInt?a.a.BigInt(e[1]):parseInt(e[1],10);n<Number.MAX_SAFE_INTEGER&&"bigint"===typeof n&&(n=Number(n)),o<Number.MAX_SAFE_INTEGER&&"bigint"===typeof o&&(o=Number(o)),t="bigint"===typeof o||"bigint"===typeof n?a.a.BigInt(o)-a.a.BigInt(n)+a.a.BigInt(1):o-n+1,"bigint"===typeof t&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),s.byterange={length:t,offset:n}}return s},S=e=>(e&&"number"!==typeof e&&(e=parseInt(e,10)),isNaN(e)?null:e),A={static(e){const{duration:t,timescale:n=1,sourceDuration:i,periodDuration:r}=e,s=S(e.endNumber),a=t/n;return"number"===typeof s?{start:0,end:s}:"number"===typeof r?{start:0,end:r/a}:{start:0,end:i/a}},dynamic(e){const{NOW:t,clientOffset:n,availabilityStartTime:i,timescale:r=1,duration:s,periodStart:a=0,minimumUpdatePeriod:o=0,timeShiftBufferDepth:l=1/0}=e,c=S(e.endNumber),d=(t+n)/1e3,u=i+a,h=d+o-u,p=Math.ceil(h*r/s),g=Math.floor((d-u-l)*r/s),m=Math.floor((d-u)*r/s);return{start:Math.max(0,g),end:"number"===typeof c?c:Math.min(p,m)}}},w=e=>{const{type:t,duration:n,timescale:i=1,periodDuration:r,sourceDuration:s}=e,{start:a,end:o}=A[t](e),l=((e,t)=>{const n=[];for(let i=e;i<t;i++)n.push(i);return n})(a,o).map((e=>t=>{const{duration:n,timescale:i=1,periodStart:r,startNumber:s=1}=e;return{number:s+t,duration:n/i,timeline:r,time:t*n}})(e));if("static"===t){const e=l.length-1,t="number"===typeof r?r:s;l[e].duration=t-n/i*e}return l},j=e=>{const{baseUrl:t,initialization:n={},sourceDuration:i,indexRange:r="",periodStart:s,presentationTime:a,number:o=0,duration:l}=e;if(!t)throw new Error(v);const c=x({baseUrl:t,source:n.sourceURL,range:n.range}),d=x({baseUrl:t,source:t,indexRange:r});if(d.map=c,l){const t=w(e);t.length&&(d.duration=t[0].duration,d.timeline=t[0].timeline)}else i&&(d.duration=i,d.timeline=s);return d.presentationTime=a||s,d.number=o,[d]},k=(e,t,n)=>{const i=e.sidx.map?e.sidx.map:null,r=e.sidx.duration,s=e.timeline||0,o=e.sidx.byterange,l=o.offset+o.length,c=t.timescale,d=t.references.filter((e=>1!==e.referenceType)),u=[],h=e.endList?"static":"dynamic",p=e.sidx.timeline;let g,m=p,f=e.mediaSequence||0;g="bigint"===typeof t.firstOffset?a.a.BigInt(l)+t.firstOffset:l+t.firstOffset;for(let y=0;y<d.length;y++){const e=t.references[y],o=e.referencedSize,l=e.subsegmentDuration;let d;d="bigint"===typeof g?g+a.a.BigInt(o)-a.a.BigInt(1):g+o-1;const b="".concat(g,"-").concat(d),v=j({baseUrl:n,timescale:c,timeline:s,periodStart:p,presentationTime:m,number:f,duration:l,sourceDuration:r,indexRange:b,type:h})[0];i&&(v.map=i),u.push(v),g+="bigint"===typeof g?a.a.BigInt(o):o,m+=l/c,f++}return e.segments=u,e},C=["AUDIO","SUBTITLES"],O=1/60,E=e=>{return(t=e,n=e=>{let{timeline:t}=e;return t},p(t.reduce(((e,t)=>(t.forEach((t=>{e[n(t)]=t})),e)),{}))).sort(((e,t)=>e.timeline>t.timeline?1:-1));var t,n},I=e=>{let t=[];var n,i;return n=e,i=(e,n,i,r)=>{t=t.concat(e.playlists||[])},C.forEach((function(e){for(var t in n.mediaGroups[e])for(var r in n.mediaGroups[e][t]){var s=n.mediaGroups[e][t][r];i(s,e,t,r)}})),t},P=e=>{let{playlist:t,mediaSequence:n}=e;
2t.mediaSequence=n,t.segments.forEach(((e,n)=>{e.number=t.mediaSequence+n}))},R=e=>{let{oldManifest:t,newManifest:n}=e;const i=t.playlists.concat(I(t)),r=n.playlists.concat(I(n));return n.timelineStarts=E([t.timelineStarts,n.timelineStarts]),(e=>{let{oldPlaylists:t,newPlaylists:n,timelineStarts:i}=e;n.forEach((e=>{e.discontinuitySequence=i.findIndex((function(t){let{timeline:n}=t;return n===e.timeline}));const n=((e,t)=>{for(let n=0;n<e.length;n++)if(e[n].attributes.NAME===t)return e[n];return null})(t,e.attributes.NAME);if(!n)return;if(e.sidx)return;const r=e.segments[0],s=n.segments.findIndex((function(e){return Math.abs(e.presentationTime-r.presentationTime)<O}));if(-1===s)return P({playlist:e,mediaSequence:n.mediaSequence+n.segments.length}),e.segments[0].discontinuity=!0,e.discontinuityStarts.unshift(0),void((!n.segments.length&&e.timeline>n.timeline||n.segments.length&&e.timeline>n.segments[n.segments.length-1].timeline)&&e.discontinuitySequence--);n.segments[s].discontinuity&&!r.discontinuity&&(r.discontinuity=!0,e.discontinuityStarts.unshift(0),e.discontinuitySequence--),P({playlist:e,mediaSequence:n.segments[s].number})}))})({oldPlaylists:i,newPlaylists:r,timelineStarts:n.timelineStarts}),n},D=e=>e&&e.uri+"-"+(e=>{let t;return t="bigint"===typeof e.offset||"bigint"===typeof e.length?a.a.BigInt(e.offset)+a.a.BigInt(e.length)-a.a.BigInt(1):e.offset+e.length-1,"".concat(e.offset,"-").concat(t)})(e.byterange),L=e=>{const t=e.reduce((function(e,t){return e[t.attributes.baseUrl]||(e[t.attributes.baseUrl]=[]),e[t.attributes.baseUrl].push(t),e}),{});let n=[];return Object.values(t).forEach((e=>{const t=p(e.reduce(((e,t)=>{const n=t.attributes.id+(t.attributes.lang||"");return e[n]?(t.segments&&(t.segments[0]&&(t.segments[0].discontinuity=!0),e[n].segments.push(...t.segments)),t.attributes.contentProtection&&(e[n].attributes.contentProtection=t.attributes.contentProtection)):(e[n]=t,e[n].attributes.timelineStarts=[]),e[n].attributes.timelineStarts.push({start:t.attributes.periodStart,timeline:t.attributes.periodStart}),e}),{}));n=n.concat(t)})),n.map((e=>{var t,n;return e.discontinuityStarts=(t=e.segments||[],n="discontinuity",t.reduce(((e,t,i)=>(t[n]&&e.push(i),e)),[])),e}))},M=(e,t)=>{const n=D(e.sidx),i=n&&t[n]&&t[n].sidx;return i&&k(e,i,e.sidx.resolvedUri),e},N=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Object.keys(t).length)return e;for(const n in e)e[n]=M(e[n],t);return e},B=e=>{let{attributes:t,segments:n,sidx:i,discontinuityStarts:r}=e;const s={attributes:{NAME:t.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:t.width,height:t.height},CODECS:t.codecs,BANDWIDTH:t.bandwidth,"PROGRAM-ID":1},uri:"",endList:"static"===t.type,timeline:t.periodStart,resolvedUri:t.baseUrl||"",targetDuration:t.duration,discontinuityStarts:r,timelineStarts:t.timelineStarts,segments:n};return t.frameRate&&(s.attributes["FRAME-RATE"]=t.frameRate),t.contentProtection&&(s.contentProtection=t.contentProtection),t.serviceLocation&&(s.attributes.serviceLocation=t.serviceLocation),i&&(s.sidx=i),s},U=e=>{let{attributes:t}=e;return"video/mp4"===t.mimeType||"video/webm"===t.mimeType||"video"===t.contentType},F=e=>{let{attributes:t}=e;return"audio/mp4"===t.mimeType||"audio/webm"===t.mimeType||"audio"===t.contentType},q=e=>{let{attributes:t}=e;return"text/vtt"===t.mimeType||"text"===t.contentType},z=e=>e?Object.keys(e).reduce(((t,n)=>{const i=e[n];return t.concat(i.playlists)}),[]):[],V=e=>{let{dashPlaylists:t,locations:n,contentSteering:i,sidxMapping:r={},previousManifest:s,eventStream:a}=e;if(!t.length)return{};const{sourceDuration:o,type:l,suggestedPresentationDelay:c,minimumUpdatePeriod:d}=t[0].attributes,u=L(t.filter(U)).map(B),h=L(t.filter(F)),p=L(t.filter(q)),g=t.map((e=>e.attributes.captionServices)).filter(Boolean),m={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:"",duration:o,playlists:N(u,r)};d>=0&&(m.minimumUpdatePeriod=1e3*d),n&&(m.locations=n),i&&(m.contentSteering=i),"dynamic"===l&&(m.suggestedPresentationDelay=c),a&&a.length>0&&(m.eventStream=a);const f=0===m.playlists.length,y=h.length?function(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=e.reduce(((e,r)=>{const s=r.attributes.role&&r.attributes.role.value||"",a=r.attributes.lang||"";let o=r.attributes.label||"main";if(a&&!r.attributes.label){const e=s?" (".concat(s,")"):"";o="".concat(r.attributes.lang).concat(e)}e[o]||(e[o]={language:a,autoselect:!0,default:"main"===s,playlists:[],uri:""});const l=M(((e,t)=>{let{attributes:n,segments:i,sidx:r,mediaSequence:s,discontinuitySequence:a,discontinuityStarts:o}=e;const l={attributes:{NAME:n.id,BANDWIDTH:n.bandwidth,CODECS:n.codecs,"PROGRAM-ID":1},uri:"",endList:"static"===n.type,timeline:n.periodStart,resolvedUri:n.baseUrl||"",targetDuration:n.duration,discontinuitySequence:a,discontinuityStarts:o,timelineStarts:n.timelineStarts,mediaSequence:s,segments:i};return n.contentProtection&&(l.contentProtection=n.contentProtection),n.serviceLocation&&(l.attributes.serviceLocation=n.serviceLocation),r&&(l.sidx=r),t&&(l.attributes.AUDIO="audio",l.attributes.SUBTITLES="subs"),l})(r,i),n);return e[o].playlists.push(l),"undefined"===typeof t&&"main"===s&&(t=r,t.default=!0),e}),{});t||(r[Object.keys(r)[0]].default=!0);return r}(h,r,f):null,b=p.length?function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.reduce(((e,n)=>{const i=n.attributes.label||n.attributes.lang||"text",r=n.attributes.lang||"und";return e[i]||(e[i]={language:r,default:!1,autoselect:!1,playlists:[],uri:""}),e[i].playlists.push(M((e=>{let{attributes:t,segments:n,mediaSequence:i,discontinuityStarts:r,discontinuitySequence:s}=e;"undefined"===typeof n&&(n=[{uri:t.baseUrl,timeline:t.periodStart,resolvedUri:t.baseUrl||"",duration:t.sourceDuration,number:0}],t.duration=t.sourceDuration);const a={NAME:t.id,BANDWIDTH:t.bandwidth,"PROGRAM-ID":1};t.codecs&&(a.CODECS=t.codecs);const o={attributes:a,uri:"",endList:"static"===t.type,timeline:t.periodStart,resolvedUri:t.baseUrl||"",targetDuration:t.duration,timelineStarts:t.timelineStarts,discontinuityStarts:r,discontinuitySequence:s,mediaSequence:i,segments:n};return t.serviceLocation&&(o.attributes.serviceLocation=t.serviceLocation),o})(n),t)),e}),{})}(p,r):null,v=u.concat(z(y),z(b)),_=v.map((e=>{let{timelineStarts:t}=e;return t}));var T,x;return m.timelineStarts=E(_),T=v,x=m.timelineStarts,T.forEach((e=>{e.mediaSequence=0,e.discontinuitySequence=x.findIndex((function(t){let{timeline:n}=t;return n===e.timeline}
2)),e.segments&&e.segments.forEach(((e,t)=>{e.number=t}))})),y&&(m.mediaGroups.AUDIO.audio=y),b&&(m.mediaGroups.SUBTITLES.subs=b),g.length&&(m.mediaGroups["CLOSED-CAPTIONS"].cc=g.reduce(((e,t)=>t?(t.forEach((t=>{const{channel:n,language:i}=t;e[i]={autoselect:!1,default:!1,instreamId:n,language:i},t.hasOwnProperty("aspectRatio")&&(e[i].aspectRatio=t.aspectRatio),t.hasOwnProperty("easyReader")&&(e[i].easyReader=t.easyReader),t.hasOwnProperty("3D")&&(e[i]["3D"]=t["3D"])})),e):e),{})),s?R({oldManifest:s,newManifest:m}):m},H=(e,t,n)=>{const{NOW:i,clientOffset:r,availabilityStartTime:s,timescale:a=1,periodStart:o=0,minimumUpdatePeriod:l=0}=e,c=(i+r)/1e3+l-(s+o);return Math.ceil((c*a-t)/n)},W=(e,t)=>{const{type:n,minimumUpdatePeriod:i=0,media:r="",sourceDuration:s,timescale:a=1,startNumber:o=1,periodStart:l}=e,c=[];let d=-1;for(let u=0;u<t.length;u++){const h=t[u],p=h.d,g=h.r||0,m=h.t||0;let f;if(d<0&&(d=m),m&&m>d&&(d=m),g<0){const o=u+1;f=o===t.length?"dynamic"===n&&i>0&&r.indexOf("$Number$")>0?H(e,d,p):(s*a-d)/p:(t[o].t-d)/p}else f=g+1;const y=o+c.length+f;let b=o+c.length;for(;b<y;)c.push({number:b,duration:p/a,time:d,timeline:l}),d+=p,b++}return c},G=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,X=(e,t)=>e.replace(G,(e=>(t,n,i,r)=>{if("$$"===t)return"$";if("undefined"===typeof e[n])return t;const s=""+e[n];return"RepresentationID"===n?s:(r=i?parseInt(r,10):1,s.length>=r?s:"".concat(new Array(r-s.length+1).join("0")).concat(s))})(t)),Y=(e,t)=>{const n={RepresentationID:e.id,Bandwidth:e.bandwidth||0},{initialization:i={sourceURL:"",range:""}}
vendor: 3,447 bytes, line 2
2=e,r=x({baseUrl:e.baseUrl,source:X(i.sourceURL,n),range:i.range}),s=((e,t)=>e.duration||t?e.duration?w(e):W(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodStart}])(e,t);return s.map((t=>{n.Number=t.number,n.Time=t.time;const i=X(e.media||"",n),s=e.timescale||1,a=e.presentationTimeOffset||0,o=e.periodStart+(t.time-a)/s;return{uri:i,timeline:t.timeline,duration:t.duration,resolvedUri:l(e.baseUrl||"",i),map:r,number:t.number,presentationTime:o}}))},Q=(e,t)=>{const{duration:n,segmentUrls:i=[],periodStart:r}=e;if(!n&&!t||n&&t)throw new Error(_);const s=i.map((t=>((e,t)=>{const{baseUrl:n,initialization:i={}}=e,r=x({baseUrl:n,source:i.sourceURL,range:i.range}),s=x({baseUrl:n,source:t.media,range:t.mediaRange});return s.map=r,s})(e,t)));let a;n&&(a=w(e)),t&&(a=W(e,t));return a.map(((t,n)=>{if(s[n]){const i=s[n],a=e.timescale||1,o=e.presentationTimeOffset||0;return i.timeline=t.timeline,i.duration=t.duration,i.number=t.number,i.presentationTime=r+(t.time-o)/a,i}})).filter((e=>e))},K=e=>{let t,n,{attributes:i,segmentInfo:r}=e;r.template?(n=Y,t=h(i,r.template)):r.base?(n=j,t=h(i,r.base)):r.list&&(n=Q,t=h(i,r.list));const s={attributes:i};if(!n)return s;const a=n(t,r.segmentTimeline);if(t.duration){const{duration:e,timescale:n=1}=t;t.duration=e/n}else a.length?t.duration=a.reduce(((e,t)=>Math.max(e,Math.ceil(t.duration))),0):t.duration=0;return s.attributes=t,s.segments=a,r.base&&t.indexRange&&(s.sidx=a[0],s.segments=[]),s},Z=(e,t)=>m(e.childNodes).filter((e=>{let{tagName:n}=e;return n===t})),J=e=>e.textContent.trim(),$=e=>{const t=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(e);if(!t)return 0;const[n,i,r,s,a,o]=t.slice(1);return 31536e3*parseFloat(n||0)+2592e3*parseFloat(i||0)+86400*parseFloat(r||0)+3600*parseFloat(s||0)+60*parseFloat(a||0)+parseFloat(o||0)},ee={mediaPresentationDuration:e=>$(e),availabilityStartTime(e){return/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(t=e)&&(t+="Z"),Date.parse(t)/1e3;var t},minimumUpdatePeriod:e=>$(e),suggestedPresentationDelay:e=>$(e),type:e=>e,timeShiftBufferDepth:e=>$(e),start:e=>$(e),width:e=>parseInt(e,10),height:e=>parseInt(e,10),bandwidth:e=>parseInt(e,10),frameRate:e=>(e=>parseFloat(e.split("/").reduce(((e,t)=>e/t))))(e),startNumber:e=>parseInt(e,10),timescale:e=>parseInt(e,10),presentationTimeOffset:e=>parseInt(e,10),duration(e){const t=parseInt(e,10);return isNaN(t)?$(e):t},d:e=>parseInt(e,10),t:e=>parseInt(e,10),r:e=>parseInt(e,10),presentationTime:e=>parseInt(e,10),DEFAULT:e=>e},te=e=>e&&e.attributes?m(e.attributes).reduce(((e,t)=>{const n=ee[t.name]||ee.DEFAULT;return e[t.name]=n(t.value),e}),{}):{},ne={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime","urn:mpeg:dash:mp4protection:2011":"mp4protection"},ie=(e,t)=>t.length?g(e.map((function(e){return t.map((function(t){const n=J(t),i=l(e.baseUrl,n),r=h(te(t),{baseUrl:i});return i!==n&&!r.serviceLocation&&e.serviceLocation&&(r.serviceLocation=e.serviceLocation),r}))}))):e,re=e=>{const t=Z(e,"SegmentTemplate")[0],n=Z(e,"SegmentList")[0],i=n&&Z(n,"SegmentURL").map((e=>h({tag:"SegmentURL"},te(e)))),r=Z(e,"SegmentBase")[0],s=n||t,a=s&&Z(s,"SegmentTimeline")[0],o=n||r||t,l=o&&Z(o,"Initialization")[0],c=t&&te(t);
2c&&l?c.initialization=l&&te(l):c&&c.initialization&&(c.initialization={sourceURL:c.initialization});const d={template:c,segmentTimeline:a&&Z(a,"S").map((e=>te(e))),list:n&&h(te(n),{segmentUrls:i,initialization:te(l)}),base:r&&h(te(r),{initialization:te(l)})};return Object.keys(d).forEach((e=>{d[e]||delete d[e]})),d},se=e=>g(Z(e.node,"EventStream").map((t=>{const n=te(t),i=n.schemeIdUri;return Z(t,"Event").map((t=>{const r=te(t),s=r.presentationTime||0,a=n.timescale||1,o=r.duration||0,l=s/a+e.attributes.start;return{schemeIdUri:i,value:n.value,id:r.id,start:l,end:l+o/a,messageData:J(t)||r.messageData,contentEncoding:n.contentEncoding,presentationTimeOffset:n.presentationTimeOffset||0}}))}))),ae=(e,t,n)=>i=>{const r=te(i),s=ie(t,Z(i,"BaseURL")),a=Z(i,"Role")[0],o={role:te(a)};let l=h(e,r,o);const d=Z(i,"Accessibility")[0],u=(e=>{if("urn:scte:dash:cc:cea-608:2015"===e.schemeIdUri)return("string"!==typeof e.value?[]:e.value.split(";")).map((e=>{let t,n;return n=e,/^CC\d=/.test(e)?[t,n]=e.split("="):/^CC\d$/.test(e)&&(t=e),{channel:t,language:n}}));if("urn:scte:dash:cc:cea-708:2015"===e.schemeIdUri)return("string"!==typeof e.value?[]:e.value.split(";")).map((e=>{const t={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};if(/=/.test(e)){const[n,i=""]=e.split("=");t.channel=n,t.language=e,i.split(",").forEach((e=>{const[n,i]=e.split(":");"lang"===n?t.language=i:"er"===n?t.easyReader=Number(i):"war"===n?t.aspectRatio=Number(i):"3D"===n&&(t["3D"]=Number(i))}))}else t.language=e;return t.channel&&(t.channel="SERVICE"+t.channel),t}))})(te(d));u&&(l=h(l,{captionServices:u}));const p=Z(i,"Label")[0];if(p&&p.childNodes.length){const e=p.childNodes[0].nodeValue.trim();l=h(l,{label:e})}const m=Z(i,"ContentProtection").reduce(((e,t)=>{const n=te(t);n.schemeIdUri&&(n.schemeIdUri=n.schemeIdUri.toLowerCase());const i=ne[n.schemeIdUri];if(i){e[i]={attributes:n};const r=Z(t,"cenc:pssh")[0];if(r){const t=J(r);e[i].pssh=t&&Object(c.a)(t)}}return e}),{});Object.keys(m).length&&(l=h(l,{contentProtection:m}));const f=re(i),y=Z(i,"Representation"),b=h(n,f);return g(y.map(((e,t,n)=>i=>{const r=Z(i,"BaseURL"),s=ie(t,r),a=h(e,te(i)),o=re(i);return s.map((e=>({segmentInfo:h(n,o),attributes:h(a,e)})))})(l,s,b)))},oe=(e,t)=>(n,i)=>{const r=ie(t,Z(n.node,"BaseURL")),s=h(e,{periodStart:n.attributes.start});"number"===typeof n.attributes.duration&&(s.periodDuration=n.attributes.duration);const a=Z(n.node,"AdaptationSet"),o=re(n.node);return g(a.map(ae(s,r,o)))},le=(e,t)=>{if(e.length>1&&t({type:"warn",message:"The MPD manifest should contain no more than one ContentSteering tag"}),!e.length)return null;const n=h({serverURL:J(e[0])},te(e[0]));return n.queryBeforeStart="true"===n.queryBeforeStart,n},ce=e=>{if(""===e)throw new Error(y);const t=new d.DOMParser;let n,i;try{n=t.parseFromString(e,"application/xml"),i=n&&"MPD"===n.documentElement.tagName?n.documentElement:null}catch(r){}if(!i||i&&i.getElementsByTagName("parsererror").length>0)throw new Error(b);return i},de=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{manifestUri:n="",NOW:i=Date.now(),clientOffset:r=0,eventHandler:s=function(){}}=t,a=Z(e,"Period");if(!a.length)throw new Error(f);const o=Z(e,"Location"),l=te(e),c=ie([{baseUrl:n}],Z(e,"BaseURL")),d=Z(e,"ContentSteering");l.type=l.type||"static",l.sourceDuration=l.mediaPresentationDuration||0,l.NOW=i,l.clientOffset=r,o.length&&(l.locations=o.map(J));const u=[];return a.forEach(((e,t)=>{const n=te(e),i=u[t-1];n.start=(e=>{let{attributes:t,priorPeriodAttributes:n,mpdType:i}=e;return"number"===typeof t.start?t.start:n&&"number"===typeof n.start&&"number"===typeof n.duration?n.start+n.duration:n||"static"!==i?null:0})({attributes:n,priorPeriodAttributes:i?i.attributes:null,mpdType:l.type}),u.push({node:e,attributes:n})})),{locations:l.locations,contentSteeringInfo:le(d,s),representationInfo:g(u.map(oe(l,c))),eventStream:g(u.map(se))}}(ce(e),t),i=n.representationInfo.map(K);return V({dashPlaylists:i,locations:n.locations,contentSteering:n.contentSteeringInfo,sidxMapping:t.sidxMapping,previousManifest:t.previousManifest,eventStream:n.eventStream})},ue=e=>(e=>{const t=Z(e,"UTCTiming")[0];if(!t)return null;const n=te(t);switch(n.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":n.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":n.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":n.method="DIRECT",n.value=Date.parse(n.value);break;default:throw new Error(T)}return n})(ce(e))},324:function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var i=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var n=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(n,1),n>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var n=t.length,i=0;i<n;++i)t[i].call(this,arguments[1]);
vendor: 5,651 bytes, line 2
2else for(var r=Array.prototype.slice.call(arguments,1),s=t.length,a=0;a<s;++a)t[a].apply(this,r)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on("data",(function(t){e.push(t)}))},e}(),r=n(83),s=n.n(r),a=n(302);class o extends i{constructor(){super(),this.buffer=""}push(e){let t;for(this.buffer+=e,t=this.buffer.indexOf("\n");t>-1;t=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)}}const l=String.fromCharCode(9),c=function(e){const t=/([0-9.]*)?@?([0-9.]*)?/.exec(e||""),n={};return t[1]&&(n.length=parseInt(t[1],10)),t[2]&&(n.offset=parseInt(t[2],10)),n},d=function(e){const t={};if(!e)return t;const n=e.split(new RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))'));let i,r=n.length;for(;r--;)""!==n[r]&&(i=/([^=]*)=(.*)/.exec(n[r]).slice(1),i[0]=i[0].replace(/^\s+|\s+$/g,""),i[1]=i[1].replace(/^\s+|\s+$/g,""),i[1]=i[1].replace(/^['"](.*)['"]$/g,"$1"),t[i[0]]=i[1]);return t},u=e=>{const t=e.split("x"),n={};return t[0]&&(n.width=parseInt(t[0],10)),t[1]&&(n.height=parseInt(t[1],10)),n};class h extends i{constructor(){super(),this.customParsers=[],this.tagMappers=[]}push(e){let t,n;if(0===(e=e.trim()).length)return;if("#"!==e[0])return void this.trigger("data",{type:"uri",uri:e});this.tagMappers.reduce(((t,n)=>{const i=n(e);return i===e?t:t.concat([i])}),[e]).forEach((e=>{for(let t=0;t<this.customParsers.length;t++)if(this.customParsers[t].call(this,e))return;if(0===e.indexOf("#EXT"))if(e=e.replace("\r",""),t=/^#EXTM3U/.exec(e),t)this.trigger("data",{type:"tag",tagType:"m3u"});else{if(t=/^#EXTINF:([0-9\.]*)?,?(.*)?$/.exec(e),t)return n={type:"tag",tagType:"inf"},t[1]&&(n.duration=parseFloat(t[1])),t[2]&&(n.title=t[2]),void this.trigger("data",n);if(t=/^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(e),t)return n={type:"tag",tagType:"targetduration"},t[1]&&(n.duration=parseInt(t[1],10)),void this.trigger("data",n);if(t=/^#EXT-X-VERSION:([0-9.]*)?/.exec(e),t)return n={type:"tag",tagType:"version"},t[1]&&(n.version=parseInt(t[1],10)),void this.trigger("data",n);if(t=/^#EXT-X-MEDIA-SEQUENCE:(\-?[0-9.]*)?/.exec(e),t)return n={type:"tag",tagType:"media-sequence"},t[1]&&(n.number=parseInt(t[1],10)),void this.trigger("data",n);if(t=/^#EXT-X-DISCONTINUITY-SEQUENCE:(\-?[0-9.]*)?/.exec(e),t)return n={type:"tag",tagType:"discontinuity-sequence"},t[1]&&(n.number=parseInt(t[1],10)),void this.trigger("data",n);if(t=/^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(e),t)return n={type:"tag",tagType:"playlist-type"},t[1]&&(n.playlistType=t[1]),void this.trigger("data",n);if(t=/^#EXT-X-BYTERANGE:(.*)?$/.exec(e),t)return n=s()(c(t[1]),{type:"tag",tagType:"byterange"}),void this.trigger("data",n);if(t=/^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(e),t)return n={type:"tag",tagType:"allow-cache"},t[1]&&(n.allowed=!/NO/.test(t[1])),void this.trigger("data",n);if(t=/^#EXT-X-MAP:(.*)$/.exec(e),t){if(n={type:"tag",tagType:"map"},t[1]){const e=d(t[1]);e.URI&&(n.uri=e.URI),e.BYTERANGE&&(n.byterange=c(e.BYTERANGE))}this.trigger("data",n)}else{if(t=/^#EXT-X-STREAM-INF:(.*)$/.exec(e),t)return n={type:"tag",tagType:"stream-inf"},t[1]&&(n.attributes=d(t[1]),n.attributes.RESOLUTION&&(n.attributes.RESOLUTION=u(n.attributes.RESOLUTION)),n.attributes.BANDWIDTH&&(n.attributes.BANDWIDTH=parseInt(n.attributes.BANDWIDTH,10)),n.attributes["FRAME-RATE"]&&(n.attributes["FRAME-RATE"]=parseFloat(n.attributes["FRAME-RATE"])),n.attributes["PROGRAM-ID"]&&(n.attributes["PROGRAM-ID"]=parseInt(n.attributes["PROGRAM-ID"],10))),void this.trigger("data",n);if(t=/^#EXT-X-MEDIA:(.*)$/.exec(e),t)return n={type:"tag",tagType:"media"},t[1]&&(n.attributes=d(t[1])),void this.trigger("data",n);if(t=/^#EXT-X-ENDLIST/.exec(e),t)this.trigger("data",{type:"tag",tagType:"endlist"});else if(t=/^#EXT-X-DISCONTINUITY/.exec(e),t)this.trigger("data",{type:"tag",tagType:"discontinuity"});else{if(t=/^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(e),t)return n={type:"tag",tagType:"program-date-time"},t[1]&&(n.dateTimeString=t[1],n.dateTimeObject=new Date(t[1])),void this.trigger("data",n);if(t=/^#EXT-X-KEY:(.*)$/.exec(e),t)return n={type:"tag",tagType:"key"},t[1]&&(n.attributes=d(t[1]),n.attributes.IV&&("0x"===n.attributes.IV.substring(0,2).toLowerCase()&&(n.attributes.IV=n.attributes.IV.substring(2)),n.attributes.IV=n.attributes.IV.match(/.{8}/g),n.attributes.IV[0]=parseInt(n.attributes.IV[0],16),n.attributes.IV[1]=parseInt(n.attributes.IV[1],16),n.attributes.IV[2]=parseInt(n.attributes.IV[2],16),n.attributes.IV[3]=parseInt(n.attributes.IV[3],16),n.attributes.IV=new Uint32Array(n.attributes.IV))),void this.trigger("data",n);if(t=/^#EXT-X-START:(.*)$/.exec(e),t)return n={type:"tag",tagType:"start"},t[1]&&(n.attributes=d(t[1]),n.attributes["TIME-OFFSET"]=parseFloat(n.attributes["TIME-OFFSET"]),n.attributes.PRECISE=/YES/.test(n.attributes.PRECISE)),void this.trigger("data",n);if(t=/^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(e),t)return n={type:"tag",tagType:"cue-out-cont"},t[1]?n.data=t[1]:n.data="",void this.trigger("data",n);if(t=/^#EXT-X-CUE-OUT:(.*)?$/.exec(e),t)return n={type:"tag",tagType:"cue-out"},t[1]?n.data=t[1]:n.data="",void this.trigger("data",n);if(t=/^#EXT-X-CUE-IN:?(.*)?$/.exec(e),t)return n={type:"tag",tagType:"cue-in"},t[1]?n.data=t[1]:n.data="",void this.trigger("data",n);if(t=/^#EXT-X-SKIP:(.*)$/.exec(e),t&&t[1])return n={type:"tag",tagType:"skip"},n.attributes=d(t[1]),n.attributes.hasOwnProperty("SKIPPED-SEGMENTS")&&(n.attributes["SKIPPED-SEGMENTS"]=parseInt(n.attributes["SKIPPED-SEGMENTS"],10)),n.attributes.hasOwnProperty("RECENTLY-REMOVED-DATERANGES")&&(n.attributes["RECENTLY-REMOVED-DATERANGES"]=n.attributes["RECENTLY-REMOVED-DATERANGES"].split(l)),void this.trigger("data",n);
vendor: 5,325 bytes, line 2
2if(t=/^#EXT-X-PART:(.*)$/.exec(e),t&&t[1])return n={type:"tag",tagType:"part"},n.attributes=d(t[1]),["DURATION"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=parseFloat(n.attributes[e]))})),["INDEPENDENT","GAP"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=/YES/.test(n.attributes[e]))})),n.attributes.hasOwnProperty("BYTERANGE")&&(n.attributes.byterange=c(n.attributes.BYTERANGE)),void this.trigger("data",n);if(t=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(e),t&&t[1])return n={type:"tag",tagType:"server-control"},n.attributes=d(t[1]),["CAN-SKIP-UNTIL","PART-HOLD-BACK","HOLD-BACK"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=parseFloat(n.attributes[e]))})),["CAN-SKIP-DATERANGES","CAN-BLOCK-RELOAD"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=/YES/.test(n.attributes[e]))})),void this.trigger("data",n);if(t=/^#EXT-X-PART-INF:(.*)$/.exec(e),t&&t[1])return n={type:"tag",tagType:"part-inf"},n.attributes=d(t[1]),["PART-TARGET"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=parseFloat(n.attributes[e]))})),void this.trigger("data",n);if(t=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(e),t&&t[1])return n={type:"tag",tagType:"preload-hint"},n.attributes=d(t[1]),["BYTERANGE-START","BYTERANGE-LENGTH"].forEach((function(e){if(n.attributes.hasOwnProperty(e)){n.attributes[e]=parseInt(n.attributes[e],10);const t="BYTERANGE-LENGTH"===e?"length":"offset";n.attributes.byterange=n.attributes.byterange||{},n.attributes.byterange[t]=n.attributes[e],delete n.attributes[e]}})),void this.trigger("data",n);if(t=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(e),t&&t[1])return n={type:"tag",tagType:"rendition-report"},n.attributes=d(t[1]),["LAST-MSN","LAST-PART"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=parseInt(n.attributes[e],10))})),void this.trigger("data",n);if(t=/^#EXT-X-DATERANGE:(.*)$/.exec(e),t&&t[1]){n={type:"tag",tagType:"daterange"},n.attributes=d(t[1]),["ID","CLASS"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=String(n.attributes[e]))})),["START-DATE","END-DATE"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=new Date(n.attributes[e]))})),["DURATION","PLANNED-DURATION"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=parseFloat(n.attributes[e]))})),["END-ON-NEXT"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=/YES/i.test(n.attributes[e]))})),["SCTE35-CMD"," SCTE35-OUT","SCTE35-IN"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=n.attributes[e].toString(16))}));const e=/^X-([A-Z]+-)+[A-Z]+$/;for(const t in n.attributes){if(!e.test(t))continue;const i=/[0-9A-Fa-f]{6}/g.test(n.attributes[t]),r=/^\d+(\.\d+)?$/.test(n.attributes[t]);n.attributes[t]=i?n.attributes[t].toString(16):r?parseFloat(n.attributes[t]):String(n.attributes[t])}this.trigger("data",n)}else if(t=/^#EXT-X-INDEPENDENT-SEGMENTS/.exec(e),t)this.trigger("data",{type:"tag",tagType:"independent-segments"});else if(t=/^#EXT-X-I-FRAMES-ONLY/.exec(e),t)this.trigger("data",{type:"tag",tagType:"i-frames-only"});else{if(t=/^#EXT-X-CONTENT-STEERING:(.*)$/.exec(e),t)return n={type:"tag",tagType:"content-steering"},n.attributes=d(t[1]),void this.trigger("data",n);if(t=/^#EXT-X-I-FRAME-STREAM-INF:(.*)$/.exec(e),t)return n={type:"tag",tagType:"i-frame-playlist"},n.attributes=d(t[1]),n.attributes.URI&&(n.uri=n.attributes.URI),n.attributes.BANDWIDTH&&(n.attributes.BANDWIDTH=parseInt(n.attributes.BANDWIDTH,10)),n.attributes.RESOLUTION&&(n.attributes.RESOLUTION=u(n.attributes.RESOLUTION)),n.attributes["AVERAGE-BANDWIDTH"]&&(n.attributes["AVERAGE-BANDWIDTH"]=parseInt(n.attributes["AVERAGE-BANDWIDTH"],10)),n.attributes["FRAME-RATE"]&&(n.attributes["FRAME-RATE"]=parseFloat(n.attributes["FRAME-RATE"])),void this.trigger("data",n);if(t=/^#EXT-X-DEFINE:(.*)$/.exec(e),t)return n={type:"tag",tagType:"define"},n.attributes=d(t[1]),void this.trigger("data",n);this.trigger("data",{type:"tag",data:e.slice(4)})}}}}else this.trigger("data",{type:"comment",text:e.slice(1)})}))}addParser(e){let{expression:t,customType:n,dataParser:i,segment:r}=e;"function"!==typeof i&&(i=e=>e),this.customParsers.push((e=>{if(t.exec(e))return this.trigger("data",{type:"custom",data:i(e),customType:n,segment:r}),!0}))}addTagMapper(e){let{expression:t,map:n}=e;this.tagMappers.push((e=>t.test(e)?n(e):e))}}const p=function(e){const t={};return Object.keys(e).forEach((function(n){var i;t[(i=n,i.toLowerCase().replace(/-(\w)/g,(e=>e[1].toUpperCase())))]=e[n]})),t},g=function(e){const{serverControl:t,targetDuration:n,partTargetDuration:i}=e;if(!t)return;const r="#EXT-X-SERVER-CONTROL",s="holdBack",a="partHoldBack",o=n&&3*n,l=i&&2*i;n&&!t.hasOwnProperty(s)&&(t[s]=o,this.trigger("info",{message:"".concat(r," defaulting HOLD-BACK to targetDuration * 3 (").concat(o,").")})),o&&t[s]<o&&(this.trigger("warn",{message:"".concat(r," clamping HOLD-BACK (").concat(t[s],") to targetDuration * 3 (").concat(o,")")}),t[s]=o),i&&!t.hasOwnProperty(a)&&(t[a]=3*i,this.trigger("info",{message:"".concat(r," defaulting PART-HOLD-BACK to partTargetDuration * 3 (").concat(t[a],").")})),i&&t[a]<l&&(this.trigger("warn",{message:"".concat(r," clamping PART-HOLD-BACK (").concat(t[a],") to partTargetDuration * 2 (").concat(l,").")}
vendor: 9,831 bytes, line 2
2),t[a]=l)};class m extends i{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(),this.lineStream=new o,this.parseStream=new h,this.lineStream.pipe(this.parseStream),this.mainDefinitions=e.mainDefinitions||{},this.params=new URL(e.uri,"https://a.com").searchParams,this.lastProgramDateTime=null;const t=this,n=[];let i,r,l={},c=!1;const d=function(){},u={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}};let m=0;this.manifest={allowCache:!0,discontinuityStarts:[],dateRanges:[],iFramePlaylists:[],segments:[]};let f=0,y=0;const b={};this.on("end",(()=>{l.uri||!l.parts&&!l.preloadHints||(!l.map&&i&&(l.map=i),!l.key&&r&&(l.key=r),l.timeline||"number"!==typeof m||(l.timeline=m),this.manifest.preloadSegment=l)})),this.parseStream.on("data",(function(e){let o,h;if(t.manifest.definitions)for(const n in t.manifest.definitions)if(e.uri&&(e.uri=e.uri.replace("{$".concat(n,"}"),t.manifest.definitions[n])),e.attributes)for(const i in e.attributes)"string"===typeof e.attributes[i]&&(e.attributes[i]=e.attributes[i].replace("{$".concat(n,"}"),t.manifest.definitions[n]));({tag(){({version(){e.version&&(this.manifest.version=e.version)},"allow-cache"(){this.manifest.allowCache=e.allowed,"allowed"in e||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange(){const t={};"length"in e&&(l.byterange=t,t.length=e.length,"offset"in e||(e.offset=f)),"offset"in e&&(l.byterange=t,t.offset=e.offset),f=t.offset+t.length},endlist(){this.manifest.endList=!0},inf(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),e.title&&(l.title=e.title),e.duration>0&&(l.duration=e.duration),0===e.duration&&(l.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=n},key(){if(e.attributes)if("NONE"!==e.attributes.METHOD)if(e.attributes.URI){if("com.apple.streamingkeydelivery"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:e.attributes});if("com.microsoft.playready"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.microsoft.playready"]={uri:e.attributes.URI});if("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"===e.attributes.KEYFORMAT){return-1===["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(e.attributes.METHOD)?void this.trigger("warn",{message:"invalid key method provided for Widevine"}):("SAMPLE-AES-CENC"===e.attributes.METHOD&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),"data:text/plain;base64,"!==e.attributes.URI.substring(0,23)?void this.trigger("warn",{message:"invalid key URI provided for Widevine"}):e.attributes.KEYID&&"0x"===e.attributes.KEYID.substring(0,2)?(this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.widevine.alpha"]={attributes:{schemeIdUri:e.attributes.KEYFORMAT,keyId:e.attributes.KEYID.substring(2)},pssh:Object(a.a)(e.attributes.URI.split(",")[1])})):void this.trigger("warn",{message:"invalid key ID provided for Widevine"}))}e.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),r={method:e.attributes.METHOD||"AES-128",uri:e.attributes.URI},"undefined"!==typeof e.attributes.IV&&(r.iv=e.attributes.IV)}else this.trigger("warn",{message:"ignoring key declaration without URI"});else r=null;else this.trigger("warn",{message:"ignoring key declaration without attribute list"})},"media-sequence"(){isFinite(e.number)?this.manifest.mediaSequence=e.number:this.trigger("warn",{message:"ignoring invalid media sequence: "+e.number})},"discontinuity-sequence"(){isFinite(e.number)?(this.manifest.discontinuitySequence=e.number,m=e.number):this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+e.number})},"playlist-type"(){/VOD|EVENT/.test(e.playlistType)?this.manifest.playlistType=e.playlistType:this.trigger("warn",{message:"ignoring unknown playlist type: "+e.playlist})},map(){i={},e.uri&&(i.uri=e.uri),e.byterange&&(i.byterange=e.byterange),r&&(i.key=r)},"stream-inf"(){this.manifest.playlists=n,this.manifest.mediaGroups=this.manifest.mediaGroups||u,e.attributes?(l.attributes||(l.attributes={}),s()(l.attributes,e.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"})},media(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||u,!(e.attributes&&e.attributes.TYPE&&e.attributes["GROUP-ID"]&&e.attributes.NAME))return void this.trigger("warn",{message:"ignoring incomplete or missing media group"});const t=this.manifest.mediaGroups[e.attributes.TYPE];t[e.attributes["GROUP-ID"]]=t[e.attributes["GROUP-ID"]]||{},o=t[e.attributes["GROUP-ID"]],h={default:/yes/i.test(e.attributes.DEFAULT)},h.default?h.autoselect=!0:h.autoselect=/yes/i.test(e.attributes.AUTOSELECT),e.attributes.LANGUAGE&&(h.language=e.attributes.LANGUAGE),e.attributes.URI&&(h.uri=e.attributes.URI),e.attributes["INSTREAM-ID"]&&(h.instreamId=e.attributes["INSTREAM-ID"]),e.attributes.CHARACTERISTICS&&(h.characteristics=e.attributes.CHARACTERISTICS),e.attributes.FORCED&&(h.forced=/yes/i.test(e.attributes.FORCED)),o[e.attributes.NAME]=h},discontinuity(){m+=1,l.discontinuity=!0,this.manifest.discontinuityStarts.push(n.length)},"program-date-time"(){"undefined"===typeof this.manifest.dateTimeString&&(this.manifest.dateTimeString=e.dateTimeString,this.manifest.dateTimeObject=e.dateTimeObject),l.dateTimeString=e.dateTimeString,l.dateTimeObject=e.dateTimeObject;const{lastProgramDateTime:t}=this;this.lastProgramDateTime=new Date(e.dateTimeString).getTime(),null===t&&this.manifest.segments.reduceRight(((e,t)=>(t.programDateTime=e-1e3*t.duration,t.programDateTime)),this.lastProgramDateTime)},targetduration(){!isFinite(e.duration)||e.duration<0?this.trigger("warn",{message:"ignoring invalid target duration: "+e.duration}):(this.manifest.targetDuration=e.duration,g.call(this,this.manifest))},start(){e.attributes&&!isNaN(e.attributes["TIME-OFFSET"])?this.manifest.start={timeOffset:e.attributes["TIME-OFFSET"],precise:e.attributes.PRECISE}:this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"})},"cue-out"(){l.cueOut=e.data},"cue-out-cont"(){l.cueOutCont=e.data},"cue-in"(){l.cueIn=e.data},skip(){this.manifest.skip=p(e.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",e.attributes,["SKIPPED-SEGMENTS"])},part(){c=!0;const t=this.manifest.segments.length,n=p(e.attributes);l.parts=l.parts||[],l.parts.push(n),n.byterange&&(n.byterange.hasOwnProperty("offset")||(n.byterange.offset=y),y=n.byterange.offset+n.byterange.length);const i=l.parts.length-1;this.warnOnMissingAttributes_("#EXT-X-PART #".concat(i," for segment #").concat(t),e.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach(((e,t)=>{e.hasOwnProperty("lastPart")||this.trigger("warn",{message:"#EXT-X-RENDITION-REPORT #".concat(t," lacks required attribute(s): LAST-PART")})}))},"server-control"(){const t=this.manifest.serverControl=p(e.attributes);t.hasOwnProperty("canBlockReload")||(t.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),g.call(this,this.manifest),t.canSkipDateranges&&!t.hasOwnProperty("canSkipUntil")&&this.trigger("warn",{message:"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set"})},"preload-hint"(){const t=this.manifest.segments.length,n=p(e.attributes),i=n.type&&"PART"===n.type;l.preloadHints=l.preloadHints||[],l.preloadHints.push(n),n.byterange&&(n.byterange.hasOwnProperty("offset")||(n.byterange.offset=i?y:0,i&&(y=n.byterange.offset+n.byterange.length)));const r=l.preloadHints.length-1;if(this.warnOnMissingAttributes_("#EXT-X-PRELOAD-HINT #".concat(r," for segment #").concat(t),e.attributes,["TYPE","URI"]),n.type)for(let e=0;e<l.preloadHints.length-1;e++){const i=l.preloadHints[e];i.type&&(i.type===n.type&&this.trigger("warn",{message:"#EXT-X-PRELOAD-HINT #".concat(r," for segment #").concat(t," has the same TYPE ").concat(n.type," as preload hint #").concat(e)}))}},"rendition-report"(){const t=p(e.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(t);const n=this.manifest.renditionReports.length-1,i=["LAST-MSN","URI"];c&&i.push("LAST-PART"),this.warnOnMissingAttributes_("#EXT-X-RENDITION-REPORT #".concat(n),e.attributes,i)},"part-inf"(){this.manifest.partInf=p(e.attributes),this.warnOnMissingAttributes_("#EXT-X-PART-INF",e.attributes,["PART-TARGET"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),g.call(this,this.manifest)},daterange(){this.manifest.dateRanges.push(p(e.attributes));const t=this.manifest.dateRanges.length-1;this.warnOnMissingAttributes_("#EXT-X-DATERANGE #".concat(t),e.attributes,["ID","START-DATE"]);const n=this.manifest.dateRanges[t];n.endDate&&n.startDate&&new Date(n.endDate)<new Date(n.startDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE"}),n.duration&&n.duration<0&&this.trigger("warn",{message:"EXT-X-DATERANGE DURATION must not be negative"}),n.plannedDuration&&n.plannedDuration<0&&this.trigger("warn",{message:"EXT-X-DATERANGE PLANNED-DURATION must not be negative"});const i=!!n.endOnNext;if(i&&!n.class&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT
2=YES attribute must have a CLASS attribute"}),i&&(n.duration||n.endDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes"}),n.duration&&n.endDate){const e=n.startDate.getTime()+1e3*n.duration;this.manifest.dateRanges[t].endDate=new Date(e)}if(b[n.id]){for(const t in b[n.id])if(n[t]&&JSON.stringify(b[n.id][t])!==JSON.stringify(n[t])){this.trigger("warn",{message:"EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes values"});break}const e=this.manifest.dateRanges.findIndex((e=>e.id===n.id));this.manifest.dateRanges[e]=s()(this.manifest.dateRanges[e],n),b[n.id]=s()(b[n.id],n),this.manifest.dateRanges.pop()}else b[n.id]=n},"independent-segments"(){this.manifest.independentSegments=!0},"i-frames-only"(){this.manifest.iFramesOnly=!0,this.requiredCompatibilityversion(this.manifest.version,4)},"content-steering"(){this.manifest.contentSteering=p(e.attributes),this.warnOnMissingAttributes_("#EXT-X-CONTENT-STEERING",e.attributes,["SERVER-URI"])},define(){this.manifest.definitions=this.manifest.definitions||{};const t=(e,t)=>{e in this.manifest.definitions?this.trigger("error",{message:"EXT-X-DEFINE: Duplicate name ".concat(e)}):this.manifest.definitions[e]=t};if("QUERYPARAM"in e.attributes){if("NAME"in e.attributes||"IMPORT"in e.attributes)return void this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"});const n=this.params.get(e.attributes.QUERYPARAM);return n?void t(e.attributes.QUERYPARAM,decodeURIComponent(n)):void this.trigger("error",{message:"EXT-X-DEFINE: No query param ".concat(e.attributes.QUERYPARAM)})}return"NAME"in e.attributes?"IMPORT"in e.attributes?void this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"}):"VALUE"in e.attributes&&"string"===typeof e.attributes.VALUE?void t(e.attributes.NAME,e.attributes.VALUE):void this.trigger("error",{message:"EXT-X-DEFINE: No value for ".concat(e.attributes.NAME)}):"IMPORT"in e.attributes?this.mainDefinitions[e.attributes.IMPORT]?void t(e.attributes.IMPORT,this.mainDefinitions[e.attributes.IMPORT]):void this.trigger("error",{message:"EXT-X-DEFINE: No value ".concat(e.attributes.IMPORT," to import, or IMPORT used on main playlist")}):void this.trigger("error",{message:"EXT-X-DEFINE: No attribute"})},"i-frame-playlist"(){this.manifest.iFramePlaylists.push({attributes:e.attributes,uri:e.uri,timeline:m}),this.warnOnMissingAttributes_("#EXT-X-I-FRAME-STREAM-INF",e.attributes,["BANDWIDTH","URI"])}}[e.tagType]||d).call(t)},uri(){l.uri=e.uri,n.push(l),this.manifest.targetDuration&&!("duration"in l)&&(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),l.duration=this.manifest.targetDuration),r&&(l.key=r),l.timeline=m,i&&(l.map=i),y=0,null!==this.lastProgramDateTime&&(l.programDateTime=this.lastProgramDateTime,this.lastProgramDateTime+=1e3*l.duration),l={}},comment(){},custom(){e.segment?(l.custom=l.custom||{},l.custom[e.customType]=e.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[e.customType]=e.data)}})[e.type].call(t)}))}requiredCompatibilityversion(e,t){(e<t||!e)&&this.trigger("warn",{message:"manifest must be at least version ".concat(t)})}warnOnMissingAttributes_(e,t,n){const i=[];n.forEach((function(e){t.hasOwnProperty(e)||i.push(e)})),i.length&&this.trigger("warn",{message:"".concat(e," lacks required attribute(s): ").concat(i.join(", "))})}push(e){this.lineStream.push(e)}end(){this.lineStream.push("\n"),this.manifest.dateRanges.length&&null===this.lastProgramDateTime&&this.trigger("warn",{message:"A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag"}),this.lastProgramDateTime=null,this.trigger("end")}addParser(e){this.parseStream.addParser(e)}addTagMapper(e){this.parseStream.addTagMapper(e)}}},329:function(e,t,n){"use strict";t.a={ingredient:"Ingrediente",category:"Categoria","basics-package":"La scuola",it:"Italiano",en:"Inglese",es:"Spagnolo",de:"Tedesco",fr:"Francese",pl:"Polacco",easy:"Facile",medium:"Medio",hard:"Difficile",amateur:"Amatori",beginner:"Principianti",professional:"Professionisti",courses:"corsi",technics:"tecniche"}},333:function(e,t,n){"use strict";var i=n(31),r=n(4),s=n(2),a=n(0),o=n(36),l=n(38),c=n(183),d=n(34),u=n(181),h=n(29),p=n(54),g=n(158),m=n(179);function f(e){return Object(g.a)("MuiSkeleton",e)}Object(m.a)("MuiSkeleton",["root","text","rectangular","circular","pulse","wave","withChildren","fitContent","heightAuto"]);var y,b,v,_,T=n(1);const x=["animation","className","component","height","style","variant","width"];let S,A,w,j;const k=Object(l.c)(S||(S=y||(y=Object(i.a)(["\n 0% {\n opacity: 1;\n }\n\n 50% {\n opacity: 0.4;\n }\n\n 100% {\n opacity: 1;\n }\n"])))),C=Object(l.c)(A||(A=b||(b=Object(i.a)(["\n 0% {\n transform: translateX(-100%);\n }\n\n 50% {\n /* +0.5s of delay between each loop */\n transform: translateX(100%);\n }\n\n 100% {\n transform: translateX(100%);\n }\n"])))),O=Object(h.a)("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;
2return[t.root,t[n.variant],!1!==n.animation&&t[n.animation],n.hasChildren&&t.withChildren,n.hasChildren&&!n.width&&t.fitContent,n.hasChildren&&!n.height&&t.heightAuto]}})((e=>{let{theme:t,ownerState:n}=e;const i=Object(d.d)(t.shape.borderRadius)||"px",r=Object(d.g)(t.shape.borderRadius);return Object(s.a)({display:"block",backgroundColor:Object(u.a)(t.palette.text.primary,"light"===t.palette.mode?.11:.13),height:"1.2em"},"text"===n.variant&&{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:"".concat(r).concat(i,"/").concat(Math.round(r/.6*10)/10).concat(i),"&:empty:before":{content:'"\\00a0"'}},"circular"===n.variant&&{borderRadius:"50%"},n.hasChildren&&{"& > *":{visibility:"hidden"}},n.hasChildren&&!n.width&&{maxWidth:"fit-content"},n.hasChildren&&!n.height&&{height:"auto"})}),(e=>{let{ownerState:t}=e;return"pulse"===t.animation&&Object(l.b)(w||(w=v||(v=Object(i.a)(["\n animation: "," 1.5s ease-in-out 0.5s infinite;\n "]))),k)}),(e=>{let{ownerState:t,theme:n}=e;return"wave"===t.animation&&Object(l.b)(j||(j=_||(_=Object(i.a)(["\n position: relative;\n overflow: hidden;\n\n /* Fix bug in Safari https://bugs.webkit.org/show_bug.cgi?id=68196 */\n -webkit-mask-image: -webkit-radial-gradient(white, black);\n\n &::after {\n animation: "," 1.6s linear 0.5s infinite;\n background: linear-gradient(90deg, transparent, ",", transparent);\n content: '';\n position: absolute;\n transform: translateX(-100%); /* Avoid flash during server-side hydration */\n bottom: 0;\n left: 0;\n right: 0;\n top: 0;\n }\n "]))),C,n.palette.action.hover)})),E=a.forwardRef((function(e,t){const n=Object(p.a)({props:e,name:"MuiSkeleton"}),{animation:i="pulse",className:a,component:l="span",height:d,style:u,variant:h="text",width:g}=n,m=Object(r.a)(n,x),y=Object(s.a)({},n,{animation:i,component:l,variant:h,hasChildren:Boolean(m.children)}),b=(e=>{const{classes:t,variant:n,animation:i,hasChildren:r,width:s,height:a}=e,o={root:["root",n,i,r&&"withChildren",r&&!s&&"fitContent",r&&!a&&"heightAuto"]};return Object(c.a)(o,f,t)})(y);return Object(T.jsx)(O,Object(s.a)({as:l,ref:t,className:Object(o.a)(b.root,a),ownerState:y},m,{style:Object(s.a)({width:g,height:d},u)}))}));t.a=E},334:function(e,t,n){"use strict";var i=n(4),r=n(2),s=n(0),a=(n(240),n(36)),o=n(183),l=n(29),c=n(54),d=n(706),u=n(158),h=n(179);function p(e){return Object(u.a)("MuiAvatarGroup",e)}var g=Object(h.a)("MuiAvatarGroup",["root","avatar"]),m=n(1);const f=["children","className","max","spacing","variant"],y={small:-16,medium:null},b=Object(l.a)("div",{name:"MuiAvatarGroup",slot:"Root",overridesResolver:(e,t)=>Object(r.a)({["& .".concat(g.avatar)]:t.avatar},t.root)})((e=>{let{theme:t}=e;return{"& .MuiAvatar-root":{border:"2px solid ".concat(t.palette.background.default),boxSizing:"content-box",marginLeft:-8,"&:last-child":{marginLeft:0}},display:"flex",flexDirection:"row-reverse"}})),v=Object(l.a)(d.a,{name:"MuiAvatarGroup",slot:"Avatar",overridesResolver:(e,t)=>t.avatar})((e=>{let{theme:t}=e;return{border:"2px solid ".concat(t.palette.background.default),boxSizing:"content-box",marginLeft:-8,"&:last-child":{marginLeft:0}}})),_=s.forwardRef((function(e,t){const n=Object(c.a)({props:e,name:"MuiAvatarGroup"}),{children:l,className:d,max:u=5,spacing:h="medium",variant:g="circular"}=n,_=Object(i.a)(n,f),T=u<2?2:u,x=Object(r.a)({},n,{max:u,spacing:h,variant:g}),S=(e=>{const{classes:t}=e;return Object(o.a)({root:["root"],avatar:["avatar"]},p,t)})(x),A=s.Children.toArray(l).filter((e=>s.isValidElement(e))),w=A.length>T?A.length-T+1:0,j=h&&void 0!==y[h]?y[h]:-h;return Object(m.jsxs)(b,Object(r.a)({ownerState:x,className:Object(a.a)(S.root,d),ref:t},_,{children:[w?Object(m.jsxs)(v,{ownerState:x,className:S.avatar,style:{marginLeft:j},variant:g,children:["+",w]}):null,A.slice(0,A.length-w).reverse().map((e=>s.cloneElement(e,{className:Object(a.a)(e.props.className,S.avatar),style:Object(r.a)({marginLeft:j},e.props.style),variant:e.props.variant||g})))]}))}));t.a=_},336:function(e,t,n){"use strict";var i=n(4),r=n(2),s=n(0),a=n(36),o=n(183),l=n(715),c=n(21),d=n(186),u=n(54),h=n(29),p=n(158),g=n(179);function m(e){return Object(p.a)("MuiMobileStepper",e)}Object(g.a)("MuiMobileStepper",["root","positionBottom","positionTop","positionStatic","dots","dot","dotActive","progress"]);var f=n(1);const y=["activeStep","backButton","className","LinearProgressProps","nextButton","position","steps","variant"],b=Object(h.a)(l.a,{name:"MuiMobileStepper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t["position".concat(Object(c.a)(n.position))]]}})((e=>{let{theme:t,ownerState:n}=e;return Object(r.a)({display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",background:t.palette.background.default,padding:8},"bottom"===n.position&&{position:"fixed",bottom:0,left:0,right:0,zIndex:t.zIndex.mobileStepper},"top"===n.position&&{position:"fixed",top:0,left:0,right:0,zIndex:t.zIndex.mobileStepper})})),v=Object(h.a)("div",{name:"MuiMobileStepper",slot:"Dots",overridesResolver:(e,t)=>t.dots})((e=>{let{ownerState:t}=e;return Object(r.a)({},"dots"===t.variant&&{display:"flex",flexDirection:"row"})})),_=Object(h.a)("div",{name:"MuiMobileStepper",slot:"Dot",shouldForwardProp:e=>Object(h.c)(e)&&"dotActive"!==e,overridesResolver:(e,t)=>{const{dotActive:n}=e;return[t.dot,n&&t.dotActive]}})((e=>{let{theme:t,ownerState:n,dotActive:i}=e;return Object(r.a)({},"dots"===n.variant&&Object(r.a)({transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),backgroundColor:t.palette.action.disabled,borderRadius:"50%",width:8,height:8,margin:"0 2px"},i&&{backgroundColor:t.palette.primary.main}))})),T=Object(h.a)(d.a,{name:"MuiMobileStepper",slot:"Progress",overridesResolver:(e,t)=>t.progress})((e=>{let{ownerState:t}=e;return Object(r.a)({},"progress"===t.variant&&{width:"50%"})})),x=s.forwardRef((function(e,t){const n=Object(u.a)({props:e,name:"MuiMobileStepper"}),{activeStep:l=0,backButton:d,className:h,LinearProgressProps:p,nextButton:g,position:x="bottom",steps:S,variant:A="dots"}=n,w=Object(i.a)(n,y),j=Object(r.a)({},n,{activeStep:l,position:x,variant:A}),k=(e=>{const{classes:t,position:n}=e,i={root:["root","position".concat(Object(c.a)(n))],dots:["dots"],dot:["dot"],dotActive:["dotActive"],progress:["progress"]};return Object(o.a)(i,m,t)})(j);
2return Object(f.jsxs)(b,Object(r.a)({square:!0,elevation:0,className:Object(a.a)(k.root,h),ref:t,ownerState:j},w,{children:[d,"text"===A&&Object(f.jsxs)(s.Fragment,{children:[l+1," / ",S]}),"dots"===A&&Object(f.jsx)(v,{ownerState:j,className:k.dots,children:[...new Array(S)].map(((e,t)=>Object(f.jsx)(_,{className:Object(a.a)(k.dot,t===l&&k.dotActive),ownerState:j,dotActive:t===l},t)))}),"progress"===A&&Object(f.jsx)(T,Object(r.a)({ownerState:j,className:k.progress,variant:"determinate",value:Math.ceil(l/(S-1)*100)},p)),g]}))}));t.a=x},344:function(e,t,n){"use strict";var i=n(189);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(190)),s=n(1),a=(0,r.default)((0,s.jsx)("path",{d:"M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"}),"Star");t.default=a},345:function(e,t,n){"use strict";n.d(t,"b",(function(){return s}));var i=n(158),r=n(179);function s(e){return Object(i.a)("MuiDivider",e)}const a=Object(r.a)("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]);t.a=a},358:function(e,t,n){"use strict";var i=n(189);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(190)),s=n(1),a=(0,r.default)((0,s.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),"Search");t.default=a},365:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i,r=n(0);function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},s.apply(null,arguments)}function a(e,t){let{title:n,titleId:a,...o}=e;return r.createElement("svg",s({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",ref:t,"aria-labelledby":a},o),n?r.createElement("title",{id:a},n):null,i||(i=r.createElement("g",{id:"Raggruppa_4117","data-name":"Raggruppa 4117",transform:"translate(0.385)"},r.createElement("g",{id:"Raggruppa_4115","data-name":"Raggruppa 4115",transform:"translate(-0.385)"},r.createElement("circle",{id:"Ellisse_423","data-name":"Ellisse 423",cx:12,cy:12,r:12,fill:"#F7F7F7"})),r.createElement("g",{id:"Raggruppa_3905","data-name":"Raggruppa 3905",transform:"translate(7.929 8.654)"},r.createElement("line",{id:"Linea_245","data-name":"Linea 245",y1:7.373,x2:7.373,fill:"none",stroke:"#26292D",strokeLinecap:"round",strokeWidth:1.5}),r.createElement("line",{id:"Linea_246","data-name":"Linea 246",x2:7.373,y2:7.373,fill:"none",stroke:"#26292D",strokeLinecap:"round",strokeWidth:1.5})))))}const o=r.forwardRef(a);n.p},371:function(e,t,n){"use strict";n.d(t,"a",(function(){return Y})),n.d(t,"b",(function(){return Q})),n.d(t,"e",(function(){return Z})),n.d(t,"f",(function(){return $})),n.d(t,"g",(function(){return ee})),n.d(t,"d",(function(){return te})),n.d(t,"c",(function(){return ne}));var i=n(0),r=n.n(i),s=n(5),a=n(27),o=n(35),l=n(79),c=n(244),d=n(221),u=n(645),h=n(198),p=n(329),g=n(37),m=n(111),f=n(738),y=n(716),b=n(717),v=n(721),_=n(700),T=n(383),x=n(706),S=n(647),A=n(720),w=n(705),j=n(689),k=n(649),C=n(334),O=n(707),E=n(336),I=n(333),P=n(236),R=n(372),D=n(188),L=n(358),M=n.n(L),N=n(344),B=n.n(N),U=n(365),F=n(247),q=n.n(F),z=n(249),V=n.n(z),H=n(373),W=n.n(H),G=n(1);const X=Object(u.a)(m.a)((e=>{let{theme:t}=e;return{position:"absolute",backgroundColor:"#fff",borderRadius:10,zIndex:2,width:"100%","&.open":{boxShadow:"0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12)"}}})),Y=e=>{const{containerProps:t,recipes:n,placeholder:i}=e,a=r.a.useRef(),c=r.a.useRef(),{section:d}=Object(s.j)(),{t:u,i18n:w}=Object(l.a)(),j=Object(s.i)(),k=Object(s.h)(),C=r.a.useMemo((()=>new URLSearchParams(j.search)),[j.search]),[O,E]=r.a.useState(!1),{request:I,cancelToken:P}=r.a.useContext(o.a),{config:R}=r.a.useContext(g.a),[L,N]=r.a.useState([]),[B,F]=r.a.useState({q:C.get("q")||""}),q=async(e,t)=>{const n=P.source(),i=await I("post","/v2/events/search",n.token,e,!0);return t(),i};return r.a.useEffect((()=>{Boolean(B.q.length)||E(!1),B.q.length>0&&B.q.length<3&&(E(!0),N([])),B.q.length>=3&&(async()=>{const e=P.source(),t=await I("get","/v2/search-auto-complete",e.token,{...B,...!!n&&{entity_type:"recipes"}});t&&N(t)})()}),[B.q]),r.a.useEffect((()=>{a.current.blur(),E(!1)}),[j]),Object(G.jsx)(m.a,{sx:{my:4,minHeight:40,position:"relative"},...t,children:Object(G.jsxs)(X,{className:O&&"open",onBlur:e=>{(!Boolean(e.relatedTarget)||Boolean(e.relatedTarget)&&!e.relatedTarget.classList.contains("search-option"))&&E(!1)},onFocus:()=>{(Boolean(B.q)||Boolean(L.length))&&E(!0)},children:[Object(G.jsx)(h.b,{ref:a,fullWidth:!0,className:"light",placeholder:i||u("Cerca un corso, ricetta, insegnante o ingrediente"),value:B.q,onKeyDown:e=>{"Enter"===e.key&&q({e:"res-click",q:B.q,et:"free-search",ac:!1},(()=>
2k.push("/".concat(w.language,"/").concat(u("cerca"),"/").concat(d||(R.recipes_enabled?u("ricette"):u("corsi")),"?q=").concat(B.q)))),"ArrowDown"===e.key&&O&&c.current.childNodes[0].focus()},onChange:e=>{F({q:e.target.value})},size:"small",inputProps:{"aria-autocomplete":"list","aria-expanded":O,"aria-controls":"search-autocomplete-listbox",role:"combobox"},InputProps:{startAdornment:Object(G.jsx)(f.a,{position:"start",children:Object(G.jsx)(y.a,{component:M.a,sx:{color:e=>e.palette.darkVariant.main}})}),endAdornment:Boolean(B.q)&&Object(G.jsx)(f.a,{position:"end",children:Object(G.jsx)(b.a,{color:"searchGreyVariant",onClick:()=>{C.delete("q"),C.delete("ac_type"),C.delete("ingredient_id"),k.push({pathname:j.pathname,search:C.toString()}),F({q:""})},children:Object(G.jsx)(U.a,{})})})}}),O&&Object(G.jsxs)(v.a,{tabIndex:-1,ref:c,id:"search-autocomplete-listbox",sx:{maxHeight:350,overflowX:"hidden",overflowY:"auto"},role:"listbox",children:[Boolean(B.q)&&Object(G.jsxs)(_.a,{button:!0,className:"search-option",component:"a",href:"#",alignItems:"flex-start",sx:{"&:hover":{backgroundColor:"#F7F7F7"}},role:"option","data-option-index":0,onClick:e=>{e.preventDefault(),q({e:"res-click",q:B.q,et:"free-search",ac:!1},(()=>k.push("/".concat(w.language,"/").concat(u("cerca"),"/").concat(d||(R.recipes_enabled?u("ricette"):u("corsi")),"?q=").concat(B.q))))},onKeyDown:e=>{"ArrowDown"===e.key&&Boolean(c.current.childNodes[1])&&c.current.childNodes[1].focus()},children:[Object(G.jsx)(T.a,{children:Object(G.jsx)(x.a,{sx:{backgroundColor:"transparent"},variant:"rounded",children:Object(G.jsx)(M.a,{style:{color:"#747D88"}})})}),Object(G.jsx)(S.a,{primary:Object(G.jsx)(A.a,{color:"darkVariant",sx:{"&:first-letter":{textTransform:"uppercase"}},children:Object(G.jsx)("b",{children:B.q})}),secondary:Object(G.jsx)(A.a,{component:"span",variant:"body2",color:"textSecondary",children:u("Tutti i risultati")})})]}),Boolean(L.length)&&L.map(((e,t)=>{return Object(G.jsxs)(_.a,{button:!0,className:"search-option",alignItems:"flex-start",sx:{"&:hover":{backgroundColor:"#F7F7F7"}},role:"option","data-option-index":Boolean(B.q)?t+1:t,onClick:t=>{t.preventDefault(),q({e:"res-click",q:B.q,ac:!0,et:e.type,id:e.id},(()=>k.push((e=>{if("recipe"===e.type)return Object(s.f)("/:lang/:recipes/:recipeSlug",{lang:w.language,recipes:u("ricette"),recipeSlug:e.slugs[0]});if("course"===e.type)return Object(s.f)("/:lang/:courses/:courseSlug",{lang:w.language,courses:u("corsi"),courseSlug:e.slugs[0]});if("lesson"===e.type)return Object(s.f)("/:lang/:courses/:courseSlug/:lessons/:lessonSlug",{lang:w.language,courses:u("corsi"),courseSlug:e.slugs[0],lessons:u("lezioni"),lessonSlug:e.slugs[1]});if("trainer"===e.type)return Object(s.f)("/:lang/:trainers/:trainerSlug",{lang:w.language,trainers:u("maestri"),trainerSlug:e.slugs[0]});if("basics-package"===e.type)return Object(s.f)("/:lang/:school/:classSlug",{lang:w.language,school:u("scuola"),classSlug:e.slugs[0]});if("basics-course"===e.type)return Object(s.f)("/:lang/:school/:classSlug/:modules/:moduleSlug",{lang:w.language,school:u("scuola"),classSlug:e.slugs[0],modules:u("moduli"),moduleSlug:e.slugs[1]});if("basics-lesson"===e.type)return Object(s.f)("/:lang/:school/:classSlug/:modules/:moduleSlug/:lessons/:chapterSlug",{lang:w.language,school:u("scuola"),classSlug:e.slugs[0],modules:u("moduli"),moduleSlug:e.slugs[1],lessons:u("lezioni"),chapterSlug:e.slugs[2]});if("wellness-package"===e.type)return Object(s.f)("/:lang/:wellness/:classSlug",{lang:w.language,wellness:u("benessere"),classSlug:e.slugs[0]});if("wellness-course"===e.type)return Object(s.f)("/:lang/:wellness/:classSlug/:modules/:moduleSlug",{lang:w.language,wellness:u("benessere"),classSlug:e.slugs[0],modules:u("moduli"),moduleSlug:e.slugs[1]});if("wellness-lesson"===e.type)return Object(s.f)("/:lang/:wellness/:classSlug/:modules/:moduleSlug/:lessons/:chapterSlug",{lang:w.language,wellness:u("benessere"),classSlug:e.slugs[0],modules:u("moduli"),moduleSlug:e.slugs[1],lessons:u("lezioni"),chapterSlug:e.slugs[2]});if(e.filters&&e.filters.filter_keys.length){const t=e.filters.filter_keys.reduce(((t,n,i)=>({...t,[n]:e.filters.filter_values[i]})),{}),n=new URLSearchParams(t);return Object(s.f)("/:lang/:search/:section/?"+n.toString(),{lang:w.language,search:u("cerca"),section:u(p.a[e.type_extra])||(R.recipes_enabled?u("ricette"):u("corsi"))})}return Object(s.f)("/:lang/:search/:section/?q=:queryString&ac_type=:acType",{lang:w.language,search:u("cerca"),queryString:e.title,section:d||(R.recipes_enabled?u("ricette"):u("corsi")),acType:e.type})})(e))))},onKeyDown:e=>{const n=Boolean(B.q)?t+1:t,i=n+1,r=n-1;"ArrowDown"===e.key&&Boolean(c.current.childNodes[i])&&c.current.childNodes[i].focus(),"ArrowUp"===e.key&&Boolean(c.current.childNodes[r])&&c.current.childNodes[r].focus()},children:[Object(G.jsx)(T.a,{children:Object(G.jsx)(x.a,{alt:e.title,src:!!e.image_url&&Object(D.m)(e.image_url,100),s
2x:{backgroundColor:"transparent"},variant:"rounded",children:Object(G.jsx)(M.a,{style:{color:"#747D88"}})})}),Object(G.jsx)(S.a,{primary:Object(G.jsx)(A.a,{color:"darkVariant",sx:{"&:first-letter":{textTransform:"uppercase"}},children:Boolean(B.q)?Object(G.jsx)("span",{dangerouslySetInnerHTML:{__html:(i=e.title,r=B.q,i.toLowerCase().split(" ").map((e=>(r.toLowerCase().split(" ").forEach((t=>{t=t.trim(),Boolean(t)&&e.includes(t)&&(e=e.replace(t,"<b>"+t+"</b>"))})),e))).join(" "))}}):e.title}),secondary:Object(G.jsx)(A.a,{component:"span",variant:"body2",color:"textSecondary",children:Boolean(e.extra)?(n=e,"lesson"===n.type||"basics-lesson"===n.type?u("Lezione di {{extra}}",{extra:n.extra}):"course"===n.type?u("Corso di {{extra}}",{extra:n.extra}):"basics-package"===n.type?u("Classe della Scuola di {{extra}}",{extra:n.extra}):"basics-course"===n.type?u("Lezioni della Scuola di {{extra}}",{extra:n.extra}):"trainer"===n.type?u("Maestro di {{extra}}",{extra:n.extra}):"sub-category"===n.type||"category"===n.type||"search_category_2"===n.type||"search_category_1"===n.type?u("Categoria di {{extra}}",{extra:n.extra}):n.extra):u(p.a[e.type])})})]},e.id);var n,i,r}))]})]})})},Q=e=>{const{widget:t}=e,{t:n,i18n:i}=Object(l.a)(),r={technique_filters:n("tecniche"),course_filters:n("corsi"),recipe_filters:n("ricette")},o=e=>{if(e.filters&&e.filters.filter_keys.length){const a=e.filters.filter_keys.reduce(((t,n,i)=>({...t,[n]:e.filters.filter_values[i]})),{}),o=new URLSearchParams(a);return Object(s.f)("/:lang/:search/:section/?"+o.toString(),{lang:i.language,search:n("cerca"),section:r[t.type]})}};return Object(G.jsx)(m.a,{sx:{my:4},children:Object(G.jsxs)(w.a,{container:!0,spacing:2,children:[Object(G.jsx)(w.a,{item:!0,xs:12,children:Object(G.jsx)(A.a,{variant:"h5",children:Object(G.jsx)("b",{children:t.title})})}),Object(G.jsx)(w.a,{item:!0,xs:6,md:4,children:Object(G.jsx)(j.a,{component:a.b,to:Object(s.f)("/:lang/:search/:section",{lang:i.language,search:n("cerca"),section:r[t.type]}),sx:{width:"100%"},children:Object(G.jsxs)(k.a,{direction:"row",alignItems:"center",spacing:1,sx:{background:"#F7F7F7",borderRadius:"4px",pr:.5,width:"100%"},children:[Object(G.jsx)(x.a,{variant:"rounded",sx:{width:{xs:41,md:84},height:{xs:41,md:61},backgroundColor:"#EAECED"},children:Object(G.jsx)(M.a,{fontSize:"large",sx:{color:e=>e.palette.darkVariant.main}})}),Object(G.jsx)(A.a,{component:"div",color:"darkVariant.main",noWrap:!0,children:Object(G.jsx)("b",{children:"course_filters"===t.type?n("Tutti"):n("Tutte")})})]})})}),t.items.map((e=>Object(G.jsx)(w.a,{item:!0,xs:6,md:4,children:Object(G.jsx)(j.a,{component:a.b,to:o(e),sx:{width:"100%"},children:Object(G.jsxs)(k.a,{direction:"row",alignItems:"center",spacing:1,sx:{background:"#F7F7F7",borderRadius:"4px",pr:0,width:"100%"},children:[Object(G.jsx)(x.a,{src:!!e.img_cover&&Object(D.m)(e.img_cover,100),alt:e.title,variant:"rounded",sx:{width:{xs:41,md:84},height:{xs:41,md:61}}}),Object(G.jsx)(A.a,{component:"div",color:"darkVariant.main",noWrap:!0,children:Object(G.jsx)("b",{children:e.label})})]})})},t.id+"_"+e.id)))]})})},K=Object(u.a)(A.a)((e=>{let{theme:t}=e;return{textShadow:"0 3px 6px rgb(0 0 0 / 30%)"}})),Z=e=>{const{widget:t}=e,{t:n,i18n:i}=Object(l.a)();return Object(G.jsx)(m.a,{sx:{my:4},children:Object(G.jsxs)(w.a,{container:!0,spacing:2,children:[Object(G.jsx)(w.a,{item:!0,xs:12,children:Object(G.jsx)(A.a,{variant:"h5",children:Object(G.jsx)("b",{children:t.title})})}),t.items.map(((e,r)=>Object(G.jsx)(w.a,{item:!0,xs:6,md:4,children:Object(G.jsx)(j.a,{component:a.b,to:Object(s.f)("/:lang/:search/:section/?q=:filterValue",{lang:i.language,search:n("cerca"),section:n("ricette"),filterValue:e.text}),sx:{width:"100%"},children:Object(G.jsx)(k.a,{justifyContent:"center",sx:{background:"#F7F7F7",borderRadius:"4px",width:"100%",height:{xs:41,md:64}},children:Object(G.jsx)(A.a,{component:"div",color:"darkVariant.main",sx:{textTransform:"capitalize",px:4},noWrap:!0,children:Object(G.jsx)("b",{children:e.text})})})})},t.type+t.id+e.id+r)))]})})},J=e=>{const{course:t,category:n}=e,{t:i}=Object(l.a)(),{handleClickItem:r}=Object(R.a)({item:t,clickItem:"c"}),{imageSet:s,ref:a}=Object(P.a)({img:t.img_cover});return Object(G.jsx)(j.a,{component:"div",onClick:r,children:Object(G.jsx)(m.a,{ref:a,sx:{minWidth:{xs:320,md:360},overflow:"hidden",aspectRatio:"16/9",backgroundImage:s,backgroundPosition:"center center",backgroundSize:"cover",backgroundRepeat:"no-repeat",borderRadius:3,p:1,pb:0},children:Object(G.jsxs)(k.a,{justifyContent:"space-between",sx:{height:"100%"},children:[Object(G.jsxs)(k.a,{direction:"row",justifyContent:"space-between",children:[Object(G.jsxs)(k.a,{direction:"row",spacing:1,alignItems:"center",children:[Object(G.jsx)(C.a,{max:2,children:t.trainers_list.map((e=>Object(G.jsx)(x.a,{alt:e.first_name+" "+e.last_name,src:Object(D.m)(e.img_portrait,100)},"avatar"+e.id)))}),Object(G.jsx)(K,{noWrap:!0,component:"div",variant:"caption",color:"textPrimary",children:Object(G.jsx)("b",{children:t.trainers_names})})]}),"ranked"===n.item_style&&Object(G.jsxs)(k.a,{justifyContent:"center",alignItems:"center",sx:{backgroundColor:"#fff",color:"#303337",borderRadius:1,px:1,pb:.5},children:[Object(G.jsx)(A.a,{variant:"caption",children:i("Top")}),Object(G.jsx)(A.a,{variant:"h5",sx:{lineHeight:.7},children:Object(G.jsx)("b",{children:t.payoff})})]})]}),Object(G.jsxs)(m.a,{children:[Object(G.jsx)(O.a,{color:"dark",size:"small",icon:Object(G.jsx)(B.a,{fontSize:"inherit",sx:{color:"#ff9d00 !important"}}),label:Object(G.jsx)("b",{children:t.average_rating?t.average_rating.toLocaleStr
2ing("it-IT",{minimumFractionDigits:1,maximumFractionDigits:1}):5..toLocaleString("it-IT",{minimumFractionDigits:1,maximumFractionDigits:1})})}),Object(G.jsx)(K,{noWrap:!0,color:"textPrimary",sx:{mt:.5},children:Object(G.jsx)("b",{children:t.title})}),Object(G.jsx)(E.a,{color:"primary",variant:"progress",position:"static",sx:{p:0,mx:-1},steps:100,activeStep:Math.round(100*t.lesson_completed_count)/t.lesson_count})]})]})})})},$=e=>{const{recipe:t,dense:n,skeleton:i}=e,{t:s}=Object(l.a)(),{handleClickItem:a}=Object(R.a)(!i&&{item:t,clickItem:"r"}),{imageSet:c,ref:d}=Object(P.a)({img:(null===t||void 0===t?void 0:t.img_cover)||""}),{request:u,cancelToken:h}=r.a.useContext(o.a),[p,g]=r.a.useState((null===t||void 0===t?void 0:t.is_favorite)||!1);return r.a.useEffect((()=>{t&&g(t.is_favorite)}),[t]),Object(G.jsx)(j.a,{component:"div",sx:{width:"100%"},...!i&&{onClick:a},children:Object(G.jsxs)(k.a,{direction:n?"row":"column",spacing:1,sx:{width:"100%",overflow:"hidden",...n&&{p:1,backgroundColor:"#F7F7F7",borderRadius:"7px"}},children:[i?Object(G.jsx)(I.a,{variant:"rounded",sx:{minWidth:n?87:"100%",paddingTop:n?"87px":"56.25%",height:"auto",borderRadius:3}}):Object(G.jsx)(k.a,{ref:d,sx:{minWidth:n?87:"100%",overflow:"hidden",aspectRatio:n?"1/1":"16/9",backgroundImage:c,backgroundPosition:"center center",backgroundSize:"cover",backgroundRepeat:"no-repeat",borderRadius:3,position:"relative"},justifyContent:"flex-end",children:t.has_video&&Object(G.jsx)(W.a,{sx:{position:"absolute",top:5,right:5,color:"#fff"}})}),Object(G.jsx)(k.a,{justifyContent:"center",sx:{width:i?"100%":n?"calc(100% - 95px)":"auto"},children:Object(G.jsxs)(k.a,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:1,sx:{width:"100%"},children:[Object(G.jsx)(m.a,{sx:{overflow:"hidden",width:"100%"},children:i?Object(G.jsxs)(G.Fragment,{children:[Object(G.jsx)(I.a,{variant:"text",width:"30%",sx:{fontSize:"0.7rem"}}),Object(G.jsx)(I.a,{variant:"text",width:"60%",sx:{fontSize:"1.3rem"}}),Object(G.jsx)(I.a,{variant:"text",sx:{fontSize:"0.7rem"}})]}):Object(G.jsxs)(G.Fragment,{children:[Object(G.jsx)(A.a,{variant:"caption",component:"div",color:"darkVariant",children:t.tagline}),Object(G.jsx)(A.a,{noWrap:!0,color:"darkVariant",children:Object(G.jsx)("b",{children:t.title})}),Object(G.jsx)(A.a,{noWrap:!0,color:"light.main",variant:"caption",component:"div",children:t.trainers_names})]})}),Object(G.jsx)(m.a,{children:Object(G.jsx)(b.a,{color:"darkVariant",sx:{backgroundColor:"#EAECED"},onClick:e=>{e.preventDefault(),e.stopPropagation(),p?(async()=>{const e=h.source();await u("delete","/v2/user-favorites/recipes/"+t.id,e.token)&&g(!1)})():(async()=>{const e=h.source();await u("post","/v2/user-favorites/recipes",e.token,{recipe_id:t.id})&&g(!0)})()},children:p?Object(G.jsx)(q.a,{}):Object(G.jsx)(V.a,{})})})]})})]})})},ee=e=>{var t,n;const{technique:i,dense:r,skeleton:s}=e,{t:a}=Object(l.a)(),{handleClickItem:o}=Object(R.a)(!s&&{item:i,clickItem:"l"}),{imageSet:c,ref:d}=Object(P.a)({img:(null===i||void 0===i?void 0:i.img_cover)||""});return Object(G.jsx)(j.a,{component:"div",sx:{width:"100%"},...!s&&{onClick:o},children:Object(G.jsxs)(k.a,{direction:r?"row":"column",spacing:1,sx:{width:"100%",overflow:"hidden",...r&&{p:1,backgroundColor:"#F7F7F7",borderRadius:"7px"}},children:[s?Object(G.jsx)(I.a,{variant:"rounded",sx:{minWidth:r?87:"100%",paddingTop:r?"87px":"56.25%",height:"auto",borderRadius:3}}):Object(G.jsx)(k.a,{ref:d,sx:{minWidth:r?87:"100%",overflow:"hidden",aspectRatio:r?"1/1":"16/9",backgroundImage:c,backgroundPosition:"center center",backgroundSize:"cover",backgroundRepeat:"no-repeat",borderRadius:3},justifyContent:"flex-end",children:Object(G.jsx)(E.a,{color:"primary",variant:"progress",position:"static",sx:{width:"100%",p:0},steps:(null===i||void 0===i||null===(t=i.lesson)||void 0===t?void 0:t.duration)||0,activeStep:(null===i||void 0===i?void 0:i.seconds_start)||0})}),Object(G.jsx)(k.a,{justifyContent:"center",sx:{width:s?"100%":r?"calc(100% - 95px)":"auto"},children:Object(G.jsx)(k.a,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:1,sx:{width:"100%"}
2,children:Object(G.jsx)(m.a,{sx:{overflow:"hidden",width:"100%"},children:s?Object(G.jsxs)(G.Fragment,{children:[Object(G.jsx)(I.a,{variant:"text",width:"30%",sx:{fontSize:"0.7rem"}}),Object(G.jsx)(I.a,{variant:"text",width:"60%",sx:{fontSize:"1.3rem"}}),Object(G.jsx)(I.a,{variant:"text",sx:{fontSize:"0.7rem"}})]}):Object(G.jsxs)(G.Fragment,{children:[Object(G.jsx)(A.a,{variant:"caption",component:"div",color:"darkVariant",children:i.search_categories}),Object(G.jsx)(A.a,{noWrap:!0,variant:"body1",color:"darkVariant.main",children:Object(G.jsx)("b",{children:i.title})}),Object(G.jsx)(A.a,{noWrap:!0,color:"light.main",variant:"caption",component:"div",children:(null===(n=i.lesson)||void 0===n?void 0:n.title)||""})]})})})})]})})},te=e=>{const{course:t,dense:n,skeleton:i}=e,{t:r}=Object(l.a)(),{handleClickItem:s}=Object(R.a)(!i&&{item:t,clickItem:"c"}),{imageSet:a,ref:o}=Object(P.a)({img:(null===t||void 0===t?void 0:t.img_cover)||""});return Object(G.jsx)(j.a,{component:"div",sx:{width:"100%"},...!i&&{onClick:s},children:Object(G.jsxs)(k.a,{direction:n?"row":"column",spacing:1,sx:{width:"100%",overflow:"hidden",...n&&{p:1,backgroundColor:"#F7F7F7",borderRadius:"7px"}},children:[i?Object(G.jsx)(I.a,{variant:"rounded",sx:{minWidth:n?87:"100%",paddingTop:n?"87px":"56.25%",height:"auto",borderRadius:3}}):Object(G.jsx)(k.a,{ref:o,sx:{minWidth:n?87:"100%",overflow:"hidden",aspectRatio:n?"1/1":"16/9",backgroundImage:a,backgroundPosition:"center center",backgroundSize:"cover",backgroundRepeat:"no-repeat",borderRadius:3},justifyContent:"flex-end",children:Object(G.jsx)(E.a,{color:"primary",variant:"progress",position:"static",sx:{width:"100%",p:0},steps:100,activeStep:Math.round(100*t.lesson_completed_count)/t.lesson_count})}),Object(G.jsxs)(m.a,{sx:{overflow:"hidden",width:"100%"},children:[Object(G.jsxs)(k.a,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[Object(G.jsx)(k.a,{direction:"row",spacing:1,alignItems:"center",sx:{overflow:"hidden",width:i?"100%":"auto"},children:i?Object(G.jsxs)(G.Fragment,{children:[Object(G.jsx)(I.a,{variant:"circular",width:34,height:34}),Object(G.jsx)(I.a,{variant:"text",width:"30%",sx:{fontSize:"0.5rem"}})]}):Object(G.jsxs)(G.Fragment,{children:[Object(G.jsx)(C.a,{max:2,sx:{"& .MuiAvatar-root":{border:0,width:34,height:34}},children:!!t.trainers_list&&t.trainers_list.map((e=>Object(G.jsx)(x.a,{alt:e.first_name+" "+e.last_name,src:Object(D.m)(e.img_portrait,100)},"avatar"+e.id)))}),Object(G.jsx)(A.a,{noWrap:!0,component:"div",variant:"caption",color:"darkVariant",children:Object(G.jsx)("b",{children:t.trainers_names})})]})}),!n&&!i&&Object(G.jsx)(O.a,{color:"searchGreyVariant",size:"small",icon:Object(G.jsx)(B.a,{fontSize:"inherit",sx:{color:"#ff9d00 !important"}}),label:Object(G.jsx)("b",{children:!!t.average_rating&&t.average_rating.toLocaleString("it-IT",{minimumFractionDigits:1,maximumFractionDigits:1})}),sx:{minWidth:52}})]}),i?Object(G.jsx)(I.a,{variant:"text",width:"60%",sx:{fontSize:"1.3rem",mt:.5}}):Object(G.jsx)(A.a,{noWrap:!0,color:"darkVariant",children:Object(G.jsx)("b",{children:t.title})}),n&&!i&&Object(G.jsx)(O.a,{color:"searchGreyVariant",size:"small",icon:Object(G.jsx)(B.a,{fontSize:"inherit",sx:{color:"#ff9d00 !important"}}),label:Object(G.jsx)("b",{children:!!t.average_rating&&t.average_rating.toLocaleString("it-IT",{minimumFractionDigits:1,maximumFractionDigits:1})})})]})]})})},ne=e=>{const{category:t,loadData:n,handleClickItem:i}=e,[s,a]=r.a.useState();return Object(G.jsx)(m.a,{sx:{my:4},children:Object(G.jsxs)(w.a,{container:!0,spacing:2,children:[Object(G.jsx)(w.a,{item:!0,xs:12,children:Object(G.jsx)(A.a,{variant:"h5",children:Object(G.jsx)("b",{children:t.title})})}),Object(G.jsx)(w.a,{item:!0,xs:12,children:Object(G.jsx)(m.a,{children:Object(G.jsx)(c.a,{loadContent:async()=>{n(t.id,(e=>{a(e)}))},loadingProps:{cols:t.columns||3},children:Object(G.jsx)(d.a,{children:!!s&&s.map(((e,n)=>"courses_list"===t.type?Object(G.jsx)(J,{category:t,course:e},t.type+e.id+n):null))})})})})]})})}},372:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n(5),r=n(79);const s=e=>{const{item:t,clickItem:n}=e,s=Object(i.h)(),{t:a,i18n:o}=Object(r.a)();return{handleClickItem:()=>{"r"===n&&s.push(Object(i.f)("/:lang/:recipes/:recipeSlug",{lang:o.language,re
2cipes:a("ricette"),recipeSlug:t.slug})),"c"===n&&("standard"===t.course_type&&s.push(Object(i.f)("/:lang/:courses/:courseSlug",{lang:o.language,courses:a("corsi"),courseSlug:t.slug})),"horeca"===t.course_type&&s.push(Object(i.f)("/:lang/horeca/:courseSlug",{lang:o.language,courseSlug:t.slug})),"basics"===t.course_type&&s.push(Object(i.f)("/:lang/:school/:classSlug/:modules/:moduleSlug",{lang:o.language,school:a("scuola"),classSlug:t.package.slug,modules:a("moduli"),moduleSlug:t.slug})),"wellness"===t.course_type&&s.push(Object(i.f)("/:lang/:package/:classSlug/:modules/:moduleSlug",{lang:o.language,package:a("benessere"),classSlug:t.package.slug,modules:a("moduli"),moduleSlug:t.slug}))),"l"===n&&("standard"===t.course.course_type&&s.push(Object(i.f)("/:lang/:courses/:courseSlug/:lessons/:lessonSlug/?lesson_progress=:lessonProgress?",{lang:o.language,courses:a("corsi"),courseSlug:t.course.slug,lessons:a("lezioni"),lessonSlug:t.lesson.slug,lessonProgress:t.seconds_start})),"horeca"===t.course.course_type&&s.push(Object(i.f)("/:lang/horeca/:courseSlug/:lessons/:lessonSlug/?lesson_progress=:lessonProgress?",{lang:o.language,courseSlug:t.course.slug,lessons:a("lezioni"),lessonSlug:t.lesson.slug,lessonProgress:t.seconds_start})),"basics"===t.course.course_type&&s.push(Object(i.f)("/:lang/:school/:classSlug/:modules/:moduleSlug/:lessons/:chapterSlug/?lesson_progress=:lessonProgress?",{lang:o.language,school:a("scuola"),classSlug:t.package.slug,modules:a("moduli"),moduleSlug:t.course.slug,lessons:a("lezioni"),chapterSlug:t.lesson.slug,lessonProgress:t.seconds_start})),"wellness"===t.course.course_type&&s.push(Object(i.f)("/:lang/:package/:classSlug/:modules/:moduleSlug/:lessons/:chapterSlug/?lesson_progress=:lessonProgress?",{lang:o.language,package:a("benessere"),classSlug:t.package.slug,modules:a("moduli"),moduleSlug:t.course.slug,lessons:a("lezioni"),chapterSlug:t.lesson.slug,lessonProgress:t.seconds_start})))}}}},373:function(e,t,n){"use strict";var i=n(189);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(190)),s=n(1),a=(0,r.default)((0,s.jsx)("path",{d:"M8 6.82v10.36c0 .79.87 1.27 1.54.84l8.14-5.18c.62-.39.62-1.29 0-1.69L9.54 5.98C8.87 5.55 8 6.03 8 6.82z"}),"PlayArrowRounded");t.default=a},382:function(e,t,n){"use strict";t.a="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wAARCABSAFEDASIAAhEBAxEB/8QAHwAAAQQCAwEBAAAAAAAAAAAACgAICQsDBgIFBwQB/8QARBAAAQQBAwIDAwcHCQkAAAAAAwECBAUGBwgRABIJEyEiMVEKFBVBUmGRcYGhscHR8BYXGCMyQqLS4RolJkNicoKS8f/EABgBAAMBAQAAAAAAAAAAAAAAAAIDBAAB/8QAKxEAAQMBBwQDAAIDAAAAAAAAAQACESEDMUFRYXGBEqGx8DKR8QQiwdHh/9oADAMBAAIRAxEAPwA/dzkanK9dNNshx2qrnIit59/1e/nj3ccfWvP516x2lgyKN7lcicIvK88J+PxT609V4T059eg+vHZ8ajJNM7jIdmW07KnVOeBC6Drfq/QTWfSWEJKHyTTjCJ0Zzlg5iWMRq5bkgSNm4kEzaOofHyl9hMxkmtLzA5OACFzgwSeNTkpJ/EZ8d7bRsjsLzTPFBl163A1jjQ5+nmJWoIWO4VYoJ/aLUXNlBOh1M0Ru1snGaaHd5MByeVbQKQUgE1RFdy3jpeIzuPnWARa1TdDsPlEkJDw7QYRcA+ZRiuVrBlzYEmVqNOOgEGMzi5aOE8qENGrobTOEkO55sqUc0mSckiTIKQ8iQd7ynOcz1IUxikVxClKRznkI9znve5XOcqqqri85/HvThPu/b1Uyya0VAcczxdyN1K+1c7GBkPfey3zLdRdQc+lln51neY5pPO5zzTstya7ySWV71Vznlk3E6YYj3Kqq5z3qqqqqqryvP14ZqpqdpzMDYaeaj55gdhHejwTsMy/IcWmAe1eWvDKo7GCcTmqnLXDe1yL6ovu6Jw8Cvwrduu6rQDPdatz2mJM4iWeYOx7T1TX+T0I48OnC4dxKCygtqtJKPmPYxHn85FT+wqcekGniUbYhbO95ms2iFRGfHw+ruw5DgHmOOb/grKIorimiMkSSGkSUqFkSaJ0g5SmO+reYpHEeqqX9Z6aTlHuXbRD0uDQ6sGgqcPwfWieHtj8e/wARPbrY14L/AFTbuGwqO4TJmJ65AJk1maOieWckPUSKSBqACxcLh0Y9tf3taGQxhz08xFOI5gHh2eNrtd34PrcIZMPoxr0aM10jSHOrSET6ektYQkn+bXLWsgwM6CATFK+B8wo8rGJkmSTGW10V891ah5z/ALvw6+yut7OnsIFtUz5dXa1cyLY1lnXSTQbCusIR2SYU+BNjPHJiTYkkQpEWUAgzxzDYURGEY1yC6za+6GkxUXYVIRMtXMp8hIoTUXCh0AoFcow7AchEVrmuRU96KnqifWqfFfx5+peeu1RUX3f69Ch+Bz41MrcqKn2oboL4DdwFRXPZpxqDNIOOmtVJUxHHlVd16ME3U6lr45JhzhaxuZU0aVaOCy8rbQ1uVLXTmyRtc13cqtT86enP4+nHH1/V1K5pY7pMToaEZjRVMcHtDhcey7jpdcef+pv8f+XS6FEoaPGH35M2NbRszz7H5sVmq+Zmbpxo5CMgzK3NcgiTCPyMsRz0eWDhdHEtMkI5wiwz2cKoppnltuBuWstsrOyurGwuLmwm21vbTpdna2tlKPOsbKxnyCSpthYTpRCyZk2bJKWTLlSCkPIkEIYpHke5ykPfKVtyU3Unedi2hMKaV+N7ftP68k+vQ6qNmfangiZXbyyCRWs7lwxmABj+Y1xRczHMc0ctWdDm+en2V/R+zquyaAwHE1J5p7mo7V3U7Qez+3LP19MOHKsZkSvgxyy5s6SCHDigYpDyZUorARwBG1FcQpivYMbGornPcjWoqrx11/np9lfxTqSXwkNCJe4vf5oDhzKx1hS45kw9RcnVWIUEOmwpw7QcmU1zXM8hbpKiMqO5a58hjVTjnlhuOx4ogaJIpNRrirBjw+tDo+3XZ1oLpUOEODN
2pMCppd0JjEY4l3bxR2NgY6IiKsl5DtadzuHd7FRyIqL0NF8qG23vr8o0E3UU8TmJeQbXSLNTjZw0VhXOdkmHHIrU4V0qIfKAEe7jtbCit59pOjIVeCMwTHPEBivFGC1ysG1SPVBhANPZar3rwwY2+rl4axqr6dRheMft0ZuV8PnXbF4gELk2EUoNWMSJ2d5GWun5HW9gEKI1V8ywxhL+sGnonmzBqq+nHUjXQ8GcY3GGGNFY5s2fTkOBQVHf9VaF0usTyKN7xvY5rxucx7V9Fa5qq1zVRfVFRUVFRfrTrj56fZX8U6sUS2zDcxyjT3LMazvCLyxxjMMOvavJsYyKokOi2dJfUk0FjVWkCQ1FUUqFNjhOJyo5iuYjXscxXNW0L8L/evV74dp+mWto3RYuWyIhMU1PpIi/1dDqZjLARMnijH2o0EK28yFlVJH7ivDj2RVAzEcdDolWR57fsr+jopH5MDuTmYrr3rTtqspxG0OpOFRNT8Zineix4+X4DYQ6a7BCYio5sy/xjJRTJjlRzHxsLjIrxvGxp1WzQWk4t8TVNsnQ4CaGka4I9T5437X6/39Lrz76Xb9tf8X+fpdSKtVX/AIn2YSs58QveLeSyuOaNr3n+KMe9yuVI2BW5cFhC5XlUaCHjkcDG/wB1g2tRERERGJdPJ8RqmkYzv43jVssT2FPuQ1dvmtcnaqxsqzW3yeG9EVE9kkO4ARi+5WuRU9FTpl/np9lfxTq9vxbsPCgd8jus/RgvyW/b2RU3AbnbSv4C81ZpJiU4o/aV8UIshyr5s93KeU9ZtEArmejixXMVyqLhoerC972sa1znvc1jGpwqq96o1rUT6+5V4TjleV/N1Z2+EZt3k7ZvD9274Jb130XlN3hkPUTMIZA+RKj5DqE52WSINgxyIRJ9VHtItPKaRVeIsBQIqINvC7Ywyhgk/qZYiXzgB+eEy7x597dxtU0z0Gx7B7clZnOXav4xk7ixjqI8XG8Jso9tLM9rHNc8Ew8dIBGqna5Cqi+/1mzwrIqDWbSXFsqGIFhjGqOn9PdLHd2FjS6fMMfBLLFfxyx4yxJ7wFYqrz7TV9eU6AM+UL7lga278bvBaiSp8Z0LpIuDRux6uG/IX9srIys4Xsc1JXlsE9vtKnfyvPuJy+T5bhpGuPh6YljdvZrY5HoblF3plMU5/OmtpUczIMZIdFVSIEddbkq4Tl7WeRU+Uz0C5US5nTZtJBkkyfAPHfdOa8utC03RTtfx7BQM++XQI+2LdjrjomRxiRMMz2+i00g7e0kyhPOLJppnC8KqSYBQkRU5ThfRVTpp3RQHynTbhFwfcJphuNpIThQtXsW/k/lJGMVBOyvE+IoCt+pvn0bYCkR3L3yPMerl5VEF489Psr+KdUsMsacYCmeAHEAQJuyWfqUnwWMxl4T4mu1qfGM4YrfJcsxOcJHKg5UXK9Osvo2CMiKnc0U2bDmCRV9mTFA/17OFiv8APT7K/inUlXg900nJfEp2nV8QT3ki55b35O1Fd2xsWwfKsllkdwi8NZGqiq5V4RE9/v6z/iePIXGz1Ni+R5VmD9Kp9tv+Hpda73u+P6E/d0uoVeq/f5QZofL0u3+3mfigvDQa74RiubxJTGqkNcgx2ALAclrx88cSxMxumvJzWorFXI45u9xDFayDX9P5erAjx6tkljub2vTsrwupJY6paBTLTUTFIsYKPnXmMvhsFqJisNrRkKSRY00GHf18OMx0u0u8VqKoHa+a/mvy85nxX3/D4r+pP/vVlk4OYBi2h+hHZR2rel2hqE9Pw9dvdnui3laAaN18B06HkWoVHMydO3uZFw2ilMu8vnF5Tt8uHjsGxOqO9HqPs55cnFqaAIo4RRwMaIIRNEIbU4awbG9rGNYno1qNRG9qLwn5Oglfkuu3aVkes2su5iwhr9D6dYqPA8elEYiK/JMxc/54SI9zfaSPRQrKPKViqrEmDG7jzeFIq8WHxDn+HNt+oNUKbGKvNc0y7OIWJ45jFtPLXRJEZIEyfc2RTxxHMjK5g4I1RgnJ5k0XcvHuTakuf0itw5/5num2UMYXHG/a8R91XHPPBk8ObU3Msk1Azfb/AAb7LcttZV3kFxKyTKEPYWc0ikkySNZcNG1xHrz2sa1rU4RqIiInTldrWx7bPsviZjC246eD09h58emk5TFjW9xYRrKRj7LMdWfybOfLGA0cdxOYpQNE8rTI0qvQQ+0Tf/ap9eU9P6NenHp6emW3XH5v9zp6fD0TrbMD+VJ6s3mcYbS5Zt9wCnxe2ymgrMit42U2xZFVST7SLFtbEIy1YxkJChFPJGx72sc8aI5URVXrFlqRJMCKgnQT4uGywdZgg3GL4zipriO2ymh8e/bgHXzw/wDPbmFDQ+VaNTYmo1GZgu+QkODxHvIY+1OUbMiPC4jkT0aBPcnPVcZ1bwZjjVHq3phkWKWggzKHUHDZ1VJY5GlESFkFS8KEYiqrXqxslpRr6p3NaqLwnKVQ+5LSyVoTr5q9o/PGURtPs9yLHRMMioVYESeV1UQiL7XcatJEKqqic9/cnsqi9F/HJ6S0mSDN2E30QWwPVMUOPvv2vF/2/wAfx+7oiX5NzobMzneDm+tEmGR9FotptKr4kzyneWLM9SpaU1WNpl9ju/knV5v5rGckapY6r2sf7Y7QO6SYUeOMpjnIwIAiG8hjGI5GDEITEcQpCPVGDYxrnPc5rWoqqidWMngp7Jpm0XanidFldW6BqpqRL/nO1REcfbMq7y8hRAVGIHVXEcN2H49FraqfGGV0VuRfT8yJ7M8riMtXQw4ExAv1/wAGua5YtJeDgK7nAd1MJ8xf8P1/v6XXpH0T936P9el1Gq1puouKtmgNwNF/tr6N9/P6VVf28pzzz0Aj40nhSX2gOa5Vuh0Lxw03RPK7WTdah4rTw1c/SbI7KQpJ1tFhRhp5Wnt7NM+SMomfN8Ts5JK0zYtKeoaCxguaocsb2q1FVWqnuT19Ofh7/VP18cdNT1O0wgXkGwgzq+LPgT40mHNgzIwZUSbElCeGTFlxjNeGRGkAI8JwGG4RhPeMjHMc5FJjiwyOdR/uED2B4g8FAK+HX44l14eWgxNEsR224nnT5uT2eU3GXWub2lROs5k8UYAgvhRaeSIYYYY6tCnnvVXFIvCcpx4B4oHixageJfI0tDkWm1JpZQ6Xx710Sko7+ffjtrW/NEWVZy5E2JC8twosCJGABgXIzsKRSL5vYyXzxAPk/FdfWl1qRs5l1WEW8l5p1lovkJjRcLnSXkcU78Hv0SQTE3kRXeRjlnHk475xGig2eMVoRxehhdadtuvW3W5JRa26TZtpxMaZQAk5BSyWUdk9quarqTJoiSsbvg9zHt+cUttPjq5j2oVXNciVtLHQQADrfP8AUHvFcyp3B7W9BBIzzuy+ssAvEul8Pf8AlReFT70X6l+/6vf1w8xn2k6XmM+0n6ejSkURoT8pw1i0f0c020tutuuIagWWA4hR4pJzS0zy6rrHI3UsIUFtrPhiqJLAypTQtIZrDkar1dwvHp1B7vr3U1+9Lc
2Zlm4eLpdVaTWmbxKx2SY9TXUm9hTr2AB0M16kqXDhGHInRGQwmAglGnzRj0Xue/nQNCNqO4vczbR6nQ/SHM89aaSkY17X1ZIeIVj1ejFW4zK1WDi1T2KqqrJ9uApEa9AiI9jm9FQ+Hj4BOK6bXVBqlurmU+qmc1xo1lT6Y1gSS9MceltQZwHyMljEDJzyxhlRO2CeHBxUJmlZIg5GJY0sSy5jASOmZkgAViKHeeJnFNAfaAA/EYngXnSv2mneB94UtznuV4zu73CYmeHhdHKiXWiGEXsRwj5XdxyMkV2pNzXSB+YzGqYrRzMPjyGDdfWzI+QI36Er6918dTp5jDYUcHI0ThrfVW+vonvRVVFV31qnPH5V4RdI0807DWiisZHYJghjGMQxMYwbGoiNY1iey1rGojWonajWp6cJwiOfqKxkUQ2taidqe9ET4J/C8ccJxx7XokrnF5k/WSpY0MAA3J1zX59Ht+y38V/f0uu/8tfgz/wBU/wAvS6FEsZ/c7/sRfz8u9etEyEbFE7ljF57ueWp6+73+nS6XWWTY8zADkn9SL3O/5bPgv3dNSzSmqLeHOrbaqrbSumjKGZX2MGLNhSwuVqqGTFkiKA4lVEVRlG9iqnqnS6XXW3jceVlDfu62sbYa6VXz6/bjoNBnTopJE2bD0g0+iy5h1kEap5UgGPMNIMrWtb5hnvf2tRO7hE62DaRtZ2xHFJtzbctBzWsJoSw7MukOnxLCITvanmRpr8eWSB/Hp3iKx339LpdObcNh4U6l+xKtroAYkKDXwoUOKxgI0SJFBHjRwCY1owgAEbBBENqI1gxsaxiIiNRE6dXhYQo6LwEScp68DZ6+0ievp8FVPyLx0ul0l153PlPbcNh4TlqBjEEnDGp7vc1E/uuX4fH163kX9n8zf29LpdcXVl6XS6XWWX//2Q=="},383:function(e,t,n){"use strict";var i=n(4),r=n(2),s=n(0),a=n(36),o=n(183),l=n(325),c=n(29),d=n(54),u=n(158),h=n(179);function p(e){return Object(u.a)("MuiListItemAvatar",e)}
2Object(h.a)("MuiListItemAvatar",["root","alignItemsFlexStart"]);var g=n(1);const m=["className"],f=Object(c.a)("div",{name:"MuiListItemAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"flex-start"===n.alignItems&&t.alignItemsFlexStart]}})((e=>{let{ownerState:t}=e;return Object(r.a)({minWidth:56,flexShrink:0},"flex-start"===t.alignItems&&{marginTop:8})})),y=s.forwardRef((function(e,t){const n=Object(d.a)({props:e,name:"MuiListItemAvatar"}),{className:c}=n,u=Object(i.a)(n,m),h=s.useContext(l.a),y=Object(r.a)({},n,{alignItems:h.alignItems}),b=(e=>{const{alignItems:t,classes:n}=e,i={root:["root","flex-start"===t&&"alignItemsFlexStart"]};return Object(o.a)(i,p,n)})(y);return Object(g.jsx)(f,Object(r.a)({className:Object(a.a)(b.root,c),ownerState:y,ref:t},u))}));t.a=y},403:function(e,t,n){"use strict";n.d(t,"d",(function(){return V})),n.d(t,"b",(function(){return H})),n.d(t,"a",(function(){return W})),n.d(t,"c",(function(){return G}));var i=n(0),r=n.n(i),s=n(5),a=n(27),o=n(56),l=n(657),c=n(35),d=n(37),u=n(79),h=n(709),p=n(244),g=n(188),m=n(221),f=n(256),y=n(645),b=n(329),v=n(236),_=n(111),T=n(705),x=n(720),S=n(718),A=n(729),w=n(689),j=n(649),k=n(706),C=n(707),O=n(717),E=n(334),I=n(358),P=n.n(I),R=n(344),D=n.n(R),L=n(249),M=n.n(L),N=n(247),B=n.n(N),U=n(259),F=n.n(U),q=n(382),z=n(1);const V=e=>{const{stats:t}=e,n=Object(s.i)(),i=Object(o.a)(),c=Object(l.a)(i.breakpoints.down("md")),{config:p}=r.a.useContext(d.a),{t:g,i18n:m}=Object(u.a)();return Object(z.jsx)(_.a,{sx:{backgroundColor:"#E3FFB6",borderRadius:{md:6},mx:{xs:-2,md:0},p:{xs:2,md:4}},children:Object(z.jsxs)(T.a,{container:!0,spacing:3,direction:c?"column":"row-reverse",children:[Object(z.jsx)(T.a,{item:!0,xs:12,md:6,children:Object(z.jsx)(_.a,{sx:{borderRadius:"10px",overflow:"hidden",minHeight:{xs:220,md:"auto"}},children:Object(z.jsx)(f.a,{trailer:!0,disableEndLesson:!0,disableAutoplay:!0,fireEvents:!0,video:{course:{},lesson:{progress:0}},poster:p.recipes_trailer_img_cover,options:{sources:[{src:p.recipes_trailer_url,type:"application/x-mpegURL"}]}})})}),Object(z.jsxs)(T.a,{item:!0,xs:12,md:6,children:[Object(z.jsx)(x.a,{variant:"h4",sx:{fontWeight:"bold",mb:2},children:Object(z.jsxs)(h.a,{t:g,children:["Ricette ",Object(z.jsx)("b",{children:Object(z.jsx)("i",{children:"facili"})})," e ",Object(z.jsx)("b",{children:Object(z.jsx)("i",{children:"buonissime"})})," da preparare a casa tua ogni giorno"]})}),Object(z.jsxs)(_.a,{children:[Object(z.jsxs)(x.a,{variant:"h6",children:[Object(z.jsxs)(h.a,{t:g,children:["\u2022 Accesso illimitato a ",Object(z.jsxs)("b",{children:[{c:t.recipe_count}," Ricette"]})]}),Object(z.jsx)("br",{}),Object(z.jsxs)(h.a,{t:g,children:["\u2022 ",Object(z.jsx)("b",{children:"Pianifica"})," i tuoi pasti con facilit\xe0"]}),Object(z.jsx)("br",{}),Object(z.jsxs)(h.a,{t:g,children:["\u2022 ",Object(z.jsx)("b",{children:"Organizza"})," e salva le tue ricette preferite"]}),Object(z.jsx)("br",{}),Object(z.jsxs)(h.a,{t:g,children:["\u2022 ",Object(z.jsx)("b",{children:"Meal prep"})," - Pianificazione settimanale"]})]}),Object(z.jsxs)(_.a,{sx:{width:{xs:"100%",lg:"80%"},textAlign:"center"},children:[Object(z.jsx)(S.a,{fullWidth:!0,disableElevation:!0,component:a.b,variant:"contained",size:"large",color:"primary",sx:{mt:3,mb:1},to:{pathname:"/".concat(m.language,"/auth/register"),state:{from:n.pathname}},children:g("Iscriviti e prova gratis")}),Object(z.jsx)(A.a,{align:"center",variant:"body1",underline:"always",color:"black.main",component:a.b,to:{pathname:"/".concat(m.language,"/paywall"),search:"from=masterclass",state:{from:n.pathname}},children:g("Attiva l'abbonamento")})]})]})]})]})})},H=e=>{const{widget:t}=e,{t:n,i18n:i}=Object(u.a)(),r=e=>{if(e.filters&&e.filters.filter_keys.length){const t=e.filters.filter_keys.reduce(((t,n,i)=>({...t,[n]:e.filters.filter_values[i]})),{}),r=new URLSearchParams(t);return Object(s.f)("/:lang/:search/:section/?"+r.toString(),{lang:i.language,search:n("cerca"),section:n("ricette")})}};return Object(z.jsx)(_.a,{sx:{my:4},children:Object(z.jsxs)(T.a,{container:!0,spacing:2,children:[Object(z.jsx)(T.a,{item:!0,xs:12,children:Object(z.jsx)(x.a,{variant:"h5",children:Object(z.jsx)("b",{children:t.title})})}),Object(z.jsx)(T.a,{item:!0,xs:12,sm:4,md:6,xl:4,children:Object(z.jsx)(w.a,{component:a.b,to:Object(s.f)("/:lang/:search/:section",{lang:i.language,search:n("cerca"),section:n("ricette")}),sx:{width:"100%"},children:Object(z.jsxs)(j.a,{direction:"row",alignItems:"center",spacing:1,sx:{background:"#F7F7F7",borderRadius:"4px",pr:.5,width:"100%"},children:[Object(z.jsx)(k.a,{variant:"rounded",sx:{width:{xs:47,md:84},height:{xs:47,md:61},backgroundColor:"#EAECED"},children:Object(z.jsx)(P.a,{fontSize:"large",sx:{color:e=>e.palette.darkVariant.main}})}),Object(z.jsx)(x.a,{component:"div",color:"darkVariant.main",noWrap:!0,children:Object(z.jsx)("b",{children:n("Tutte")})})]})})}),t.items.map((e=>Object(z.jsx)(T.a,{item:!0,xs:12,sm:4,md:6,xl:4,children:Object(z.jsx)(w.a,{component:a.b,to:r(e),sx:{width:"100%"},children:Object(z.jsxs)(j.a,{direction:"row",justifyContent:"space-between",alignItems:"center",sx:{background:"#F7F7F7",borderRadius:"4px",pr:0,width:"100%"},children:[Object(z.jsxs)(j.a,{direction:"row",alignItems:"center",spacing:1,children:[Object(z.jsx)(k.a,{src:!!e.img_cover&&Object(g.m)(e.img_cover,100),alt:e.title,variant:"rounded",sx:{width:{xs:47,md:84},height:{xs:47,md:61}}}),Object(z.jsx)(x.a,{component:"div",color:"darkVariant.main",noWrap:!0,children:Object(z.jsx)("b",{children:e.label})})]}),Object(z.jsx)(F.a,{fontSize:"small",sx:{mr:1,display:{xs:"block",md:"none"}}})]})})},t.id+"_"+e.id)))]})})},W=e=>{const{widget:t}=e,{t:n,i18n:i}=Object(u.a)(),r=Object(s.h)();return Object(z.jsxs)(_.a,{sx:{my:{xs:2,md:4},position:"relative"},children:[Object(z.jsx)(m.a,{sliderContentProps:{sx:{pr:6}},children:t.items.map((e=>Object(z.jsx)(C.a,{label:e.name,color:"redVariant",size:"medium",sx:{fontWeight:"bold",minWidth:"fit-content"},onClick:()=>{r.push({pathname:"/".concat(i.language,"/").concat(n("pasti"),"/").concat(e.slug)})}},t.id+"_"+e.id)))}),Object(z.jsx)(O.a,{component:a.b,color:"white",size:"large",sx:{position:"absolute",top:"50%",right:0,transform:"translateY(-60%)",backgroundColor:e=>e.palette.primary.main,"&:hover":{backgroundColor:e=>e.palette.primary.main}},to:{pathname:"/".concat(i.language,"/").concat(n("pasti"))},children:Object(z.jsx)(F.a,{fontSize:"small"})})]})},G=e=>{const{widget:t={},loadData:n,preloadedData:i}=e,[s,a]=r.a.useState(i);return r.a.useEffect((()=>{i&&a(i)}),[i]),Object(z.jsx)(_.a,{sx:{my:{md:4}},children:Object(z.jsxs)(T.a,{container:!0,spacing:2,children:[Object(z.jsx)(T.a,{item:!0,xs:12,children:Object(z.jsx)(x.a,{variant:"h5",children:Object(z.jsx)("b",{children:t.title})})}),Object(z.jsx)(T.a,{item:!0,xs:12,children:Object(z.jsx)(_.a,{children:Object(z.jsx)(p.a,{...!i&&{loadContent:async()=>{n(t.id,(e=>{a(e)}))}},loadingProps:{cols:t.columns||3},children:Object(z.jsx)(m.a,{children:!!s&&s.map(((e,n)=>Object(z.jsx)(Y,{widget:t,recipe:e},t.type+e.id+n)))})})})})]})})},X=Object(y.a)(x.a)((e=>{let{theme:t}=e;return{textShadow:"0 3px 6px rgb(0 0 0 / 30%)"}})),Y=e=>{const{widget:t={},recipe:n}=e,{t:i,i18n:s}=Object(u.a)(),{imageSet:o,ref:l}=Object(v.a)({img:n.img_cover||""}),{request:d,cancelToken:h}=r.a.useContext(c.a),[p,m]=r.a.useState(n.is_favorite),f=async()=>{const e=h.source();await d("post","/v2/user-favorites/recipes",e.token,{recipe_id:n.id})&&m(!0)},y=async()=>{const e=h.source();await d("delete","/v2/user-favorites/recipes/"+n.id,e.token)&&m(!1)};return r.a.useEffect((()=>{m(n.is_favorite)}),[n]),"highlight"===t.style?Object(z.jsx)("div",{children:Object(z.jsx)(w.a,{component:a.b,to:"/".concat(s.language,"/").concat(i("ricette"),"/").concat(n.slug),children:Object(z.jsx)(_.a,{ref:l,sx:{minWidth:330,maxWidth:330,height:438,overflow:"hidden",backgroundImage:o,backgroundPosition:"center center",backgroundSize:"cover",backgroundRepeat:"no-repeat",borderRadius:3,boxSizing:"border-box",p:2},children:Object(z.jsxs)(j.a,{justifyContent:"space-between",sx:{height:"100%"},children:[Object(z.jsxs)(j.a,{direction:"row",justifyContent:"space-between",children:[Object(z.jsx)(_.a,{children:!!n.label&&Object(z.jsx)(C.a,{label:n.label.text,size:"small",sx:{backgroundColor:"#"+n.label.bg_color,color:"#"+n.label.text_color}})}),Object(z.jsx)(_.a,{children:Object(z.jsx)(O.a,{color:p?"primary":"black",sx:{background:"#FFF","&:hover":{background:"#FFF"}},onClick:e=>{e.preventDefault(),e.stopPropagation(),p?y():f()},children:p?Object(z.jsx)(B.a,{fontSize:"large"}):Object(z.jsx)(M.a,{fontSize:"large"})})})]}),Object(z.jsxs)(_.a,{sx:{pb:1},children:[Object(z.jsx)(C.a,{color:"white",icon:Object(z.jsx)(D.a,{fontSize:"inherit",sx:{color:"#ff9d00 !important",fontSize:22}}),label:Object(z.jsx)("b",{children:n.average_rating?n.average_rating.toLocaleStr
2ing("it-IT",{minimumFractionDigits:1,maximumFractionDigits:1}):5..toLocaleString("it-IT",{minimumFractionDigits:1,maximumFractionDigits:1})}),sx:{fontSize:20}}),Object(z.jsx)(X,{variant:"h4",color:"text.primary",sx:{fontWeight:"bold",mt:1,WebkitLineClamp:2,display:"-webkit-box",WebkitBoxOrient:"vertical",overflow:"hidden"},children:n.title})]})]})})})}):Object(z.jsx)("div",{children:Object(z.jsx)(w.a,{component:a.b,to:"/".concat(s.language,"/").concat(i("ricette"),"/").concat(n.slug),sx:{maxWidth:269},children:Object(z.jsxs)(_.a,{sx:{backgroundColor:"#F7F7F7",borderRadius:"10px"},children:[Object(z.jsx)(_.a,{ref:l,sx:{minWidth:269,maxWidth:269,height:269,overflow:"hidden",backgroundImage:o,backgroundPosition:"center center",backgroundSize:"cover",backgroundRepeat:"no-repeat",borderRadius:"10px",boxSizing:"border-box",p:1},children:Object(z.jsxs)(j.a,{justifyContent:"space-between",sx:{height:"100%"},children:[Object(z.jsxs)(j.a,{direction:"row",justifyContent:"space-between",children:[Object(z.jsx)(_.a,{children:!!n.label&&Object(z.jsx)(C.a,{label:n.label.text,size:"small",sx:{backgroundColor:"#"+n.label.bg_color,color:"#"+n.label.text_color}})}),Object(z.jsx)(_.a,{children:Object(z.jsx)(O.a,{color:p?"primary":"black",sx:{background:"#FFF","&:hover":{background:"#FFF"}},onClick:e=>{e.preventDefault(),e.stopPropagation(),p?y():f()},children:p?Object(z.jsx)(B.a,{fontSize:"large"}):Object(z.jsx)(M.a,{fontSize:"large"})})})]}),Object(z.jsxs)(j.a,{direction:"row",spacing:1,alignItems:"center",children:[Object(z.jsx)(E.a,{max:2,children:n.trainers_list.length?n.trainers_list.map((e=>Object(z.jsx)(k.a,{alt:e.first_name+" "+e.last_name,src:Object(g.m)(e.img_portrait,100)},"avatar"+e.id))):Object(z.jsx)(k.a,{alt:"Acad\xe8mia",src:q.a})}),Object(z.jsx)(X,{noWrap:!0,component:"div",variant:"caption",color:"textPrimary",children:Object(z.jsx)("b",{children:n.trainers_names})})]})]})}),Object(z.jsxs)(j.a,{justifyContent:"space-between",sx:{minHeight:{xs:84,md:90},p:1},children:[Object(z.jsx)(x.a,{variant:"h5",sx:{fontWeight:"bold",WebkitLineClamp:2,display:"-webkit-box",WebkitBoxOrient:"vertical",overflow:"hidden",lineHeight:1.3},children:n.title}),Object(z.jsxs)(j.a,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[Object(z.jsxs)(x.a,{component:"div",variant:"caption",children:[Object(z.jsx)("b",{children:Object(g.l)(n.time_total)})," \u2022 ",!!n.difficulty&&i(b.a[n.difficulty])]}),Object(z.jsx)(C.a,{color:"white",icon:Object(z.jsx)(D.a,{fontSize:"inherit",sx:{color:"#ff9d00 !important",fontSize:16}}),label:Object(z.jsx)("b",{children:n.average_rating?n.average_rating.toLocaleString("it-IT",{minimumFractionDigits:1,maximumFractionDigits:1}):5..toLocaleString("it-IT",{minimumFractionDigits:1,maximumFractionDigits:1})}),sx:{fontSize:14,background:"transparent"}})]})]})]})})})}},404:function(e,t,n){"use strict";var i=n(189);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(190)),s=n(1),a=(0,r.default)((0,s.jsx)("path",{d:"M13 10H3c-.55 0-1 .45-1 1s.45 1 1 1h10c.55 0 1-.45 1-1s-.45-1-1-1zm0-4H3c-.55 0-1 .45-1 1s.45 1 1 1h10c.55 0 1-.45 1-1s-.45-1-1-1zM3 16h6c.55 0 1-.45 1-1s-.45-1-1-1H3c-.55 0-1 .45-1 1s.45 1 1 1zm19.21-3.79.09.09c.39.39.39 1.02 0 1.41l-5.58 5.59c-.39.39-1.02.39-1.41 0l-3.09-3.09a.9959.9959 0 0 1 0-1.41l.09-.09c.39-.39 1.02-.39 1.41 0l2.3 2.3 4.78-4.79c.38-.4 1.02-.4 1.41-.01z"}),"PlaylistAddCheckRounded");t.default=a},677:function(e,t,n){"use strict";n.r(t);var i=n(0),r=n.n(i),s=n(27),a=(n(28),n(79)),o=n(35),l=n(20),c=n(212),d=n(705),u=n(720),h=n(649),p=n(111),g=n(707),m=n(403),f=n(371),y=n(247),b=n.n(y),v=n(404),_=n.n(v),T=n(1);t.default=()=>{const{t:e,i18n:t}=Object(a.a)(),{request:n,cancelToken:i}=r.a.useContext(o.a),{auth:y}=r.a.useContext(l.a),[v,x]=r.a.useState(null),S=async(e,t)=>{const r=i.source(),s=await n("get","/v2/pages/home_recipes/widgets/"+e,r.token);s&&t(s.items)};return r.a.useEffect((()=>{(async()=>{const e=i.source(),t=await n("get","/v2/pages/home_recipes",e.token);t&&x(t)})()}),[y.isAuthenticated]),Object(T.jsx)(c.a,{title:e("Ricette"),bg:"#fff",headerBg:"#27292D",disableMaxWidth:!0,loading:!v,children:Object(T.jsx)(d.a,{container:!0,justifyContent:"center",sx:{pt:12,mb:2},children:!!v&&v.widgets&&Object(T.jsxs)(d.a,{item:!0,xs:11,md:8,xl:7,children:[Object(T.jsx)(u.a,{component:"h1",variant:"h4",sx:{mb:{xs:1,md:3}},children:Object(T.jsx)("b",{children:e("Ricette")})}),v.widgets.items.map(((n,i)=>{switch(n.type){case"search_input":return Object(T.jsxs)(h.a,{direction:{xs:"column",md:"row"},spacing:{xs:1.25,md:1.5},alignItems:{xs:"flex-start",md:"center"},sx:{flexWrap:"wrap",rowGap:1},children:[Object(T.jsx)(p.a,{sx:{width:"100%",flexGrow:1,minWidth:0},children:Object(T.jsx)(f.a,{placeholder:e("Cerca una ricetta o un ingrediente"),containerProps:{sx:{m:0,minHeight:40,position:"relative"}}
2})}),Object(T.jsxs)(h.a,{direction:"row",spacing:1,alignItems:"center",sx:{flexShrink:0},children:[Object(T.jsx)(g.a,{clickable:!0,color:"searchGreyVariant",icon:Object(T.jsx)(b.a,{fontSize:"small"}),label:Object(T.jsx)("b",{children:e("Preferite")}),component:s.b,to:"/".concat(t.language,"/user/recipes")}),Object(T.jsx)(g.a,{clickable:!0,color:"searchGreyVariant",icon:Object(T.jsx)(_.a,{fontSize:"small"}),label:Object(T.jsx)("b",{children:e("Spesa")}),component:s.b,to:"/".concat(t.language,"/user/shopping-list")})]})]},n.type+n.id+i);case"section_tutorial":return Object(T.jsx)(m.d,{stats:v.stats},n.type+n.id+i);case"recipes_latest":case"recipes_list":return Object(T.jsx)(m.c,{widget:n,loadData:S},n.type+n.id+i);case"recipe_filters":return Object(T.jsx)(m.b,{widget:n},n.type+n.id+i);case"meals_groups":return Object(T.jsx)(m.a,{widget:n},n.type+n.id+i);default:return null}}))]})})})}}}]);
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.