1/*! For license information please see main.a3803169.js.LICENSE.txt */ 2(()=>{var e={778(e,t,n){"use strict";n.r(t),n.d(t,{ActiveMode:()=>pt,AviaAccessibility:()=>hi,AviaActive:()=>fi,AviaAdControlBar:()=>pi,AviaAdProgressBar:()=>mi,AviaButton:()=>gi,AviaControlBar:()=>vi,AviaControlBarCompact:()=>yi,AviaControlGroup:()=>bi,AviaCurrentTime:()=>Ai,AviaDuration:()=>Ei,AviaFullscreenToggle:()=>Ti,AviaLiveControl:()=>wi,AviaMenu:()=>Si,AviaMenuItem:()=>Ci,AviaMuteToggle:()=>ki,AviaOverlay:()=>xi,AviaPanel:()=>Ni,AviaPauseOverlay:()=>_i,AviaPlayCta:()=>Ii,AviaPlayOverlay:()=>Oi,AviaPlayToggle:()=>Di,AviaPoster:()=>Ri,AviaProgressBar:()=>Pi,AviaScrubIndicator:()=>Li,AviaSeekBackButton:()=>Mi,AviaSeekForwardButton:()=>Fi,AviaSeekIndicator:()=>Ui,AviaSettings:()=>Bi,AviaSettingsAudio:()=>ji,AviaSettingsLanguage:()=>Vi,AviaSettingsQuality:()=>Hi,AviaSettingsText:()=>zi,AviaSettingsToggle:()=>Ki,AviaSlider:()=>Wi,AviaSpinner:()=>Gi,AviaText:()=>qi,AviaTextToggle:()=>Yi,AviaTimeDisplay:()=>Qi,AviaTimeRemaining:()=>Xi,AviaUi:()=>Zi,AviaUnmuteCta:()=>Ji,AviaVolumeIndicator:()=>$i,AviaVolumeSlider:()=>er,AviaWaitingOverlay:()=>tr,ControlMode:()=>yt,DeviceMode:()=>Tt,LocalizationId:()=>St,Orientation:()=>cn,PreviewTimeTransform:()=>Vt,ProgressMode:()=>Ht,UI:()=>gn,createUiPlugin:()=>bn,plugin:()=>En,ui:()=>yn});var i=n(987),r=n(70),a=(n(723),Object.defineProperty),o=Object.defineProperties,s=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,d=(e,t,n)=>t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,h=(e,t)=>{for(var n in t||(t={}))c.call(t,n)&&d(e,n,t[n]);if(l)for(var n of l(t))u.call(t,n)&&d(e,n,t[n]);return e},f=(e,t)=>o(e,s(t)),p=(e,t,n)=>new Promise((i,r)=>{var a=e=>{try{s(n.next(e))}catch(e){r(e)}},o=e=>{try{s(n.throw(e))}catch(e){r(e)}},s=e=>e.done?i(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())});let m,g,v,y=!1,b=!1,A=!1,E=!1,T=null,w=!1;const S="http://www.w3.org/1999/xlink",C={},k=e=>"object"==(e=typeof e)||"function"===e,x=function(e,t){let n=null,i=null,r=null,a=!1,o=!1;const s=[],l=t=>{for(let i=0;i<t.length;i++)n=t[i],Array.isArray(n)?l(n):null!=n&&"boolean"!=typeof n&&((a="function"!=typeof e&&!k(n))&&(n=String(n)),a&&o?s[s.length-1].$text$+=n:s.push(a?N(null,n):n),o=a)};for(var c=arguments.length,u=new Array(c>2?c-2:0),d=2;d<c;d++)u[d-2]=arguments[d];if(l(u),t){t.key&&(i=t.key),t.name&&(r=t.name);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter(t=>e[t]).join(" "))}}if("function"==typeof e)return e(null===t?{}:t,s,I);const h=N(e,null);return h.$attrs$=t,s.length>0&&(h.$children$=s),h.$key$=i,h.$name$=r,h},N=(e,t)=>({$flags$:0,$tag$:e,$text$:t,$elm$:null,$children$:null,$attrs$:null,$key$:null,$name$:null}),_={},I={forEach:(e,t)=>e.map(O).forEach(t),map:(e,t)=>e.map(O).map(t).map(D)},O=e=>({vattrs:e.$attrs$,vchildren:e.$children$,vkey:e.$key$,vname:e.$name$,vtag:e.$tag$,vtext:e.$text$}),D=e=>{if("function"==typeof e.vtag){const t=Object.assign({},e.vattrs);return e.vkey&&(t.key=e.vkey),e.vname&&(t.name=e.vname),x(e.vtag,t,...e.vchildren||[])}const t=N(e.vtag,e.vtext);return t.$attrs$=e.vattrs,t.$children$=e.vchildren,t.$key$=e.vkey,t.$name$=e.vname,t},R=(e,t,n)=>{const i=e;return{emit:e=>P(i,t,{bubbles:!0,composed:!0,cancelable:!0,detail:e})}},P=(e,t,n)=>{const i=Se.ce(t,n);return e.dispatchEvent(i),i},L=new WeakMap,M=(e,t)=>"sc-"+(t&&32&e.$flags$?e.$tagName$+"-"+t:e.$tagName$),F=(e,t,n,i,r,a)=>{if(n!==i){let o=ve(e,t),s=t.toLowerCase();if("class"===t){const t=e.classList,r=B(n),a=B(i);t.remove(...r.filter(e=>e&&!a.includes(e))),t.add(...a.filter(e=>e&&!r.includes(e)))}else if("style"===t){for(const t in n)i&&null!=i[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in i)n&&i[t]===n[t]||(t.includes("-")?e.style.setProperty(t,i[t]):e.style[t]=i[t])}else if("key"===t);else if("ref"===t)i&&i(e);else if(e.__lookupSetter__(t)||"o"!==t[0]||"n"!==t[1]){const l=k(i);if((o||l&&null!==i)&&!r)try{if(e.tagName.includes("-"))e[t]=i;else{const r=null==i?"":i;"list"===t?o=!1:null!=n&&e[t]==r||(e[t]=r)}}catch(e){}let c=!1;s!==(s=s.replace(/^xlink\:?/,""))&&(t=s,c=!0),null==i||!1===i?!1===i&&""!==e.getAttribute(t)||(c?e.removeAttributeNS(S,t):e.removeAttribute(t)):(!o||4&a||r)&&!l&&(i=!0===i?"":i,c?e.setAttributeNS(S,t,i):e.setAttribute(t,i))}else t="-"===t[2]?t.slice(3):ve(Ee,s)?s.slice(2):s[2]+t.slice(3),n&&Se.rel(e,t,n,!1),i&&Se.ael(e,t,i,!1)}},U=/\s/,B=e=>e?e.split(U):[],j=(e,t,n,i)=>{const r=11===t.$elm$.nodeType&&t.$elm$.host?t.$elm$.host:t.$elm$,a=e&&e.$attrs$||C,o=t.$attrs$||C;for(i in a)i in o||F(r,i,a[i],void 0,n,t.$flags$);for(i in o)F(r,i,a[i],o[i],n,t.$flags$)},V=(e,t,n,i)=>{const r=t.$children$[n];let a,o,s,l=0;if(y||(A=!0,"slot"===r.$tag$&&(m&&i.classList.add(m+"-s"),r.$flags$|=r.$children$?2:1)),null!==r.$text$)a=r.$elm$=Te.createTextNode(r.$text$);else if(1&r.$flags$)a=r.$elm$=Te.createTextNode("");else{if(E||(E="svg"===r.$tag$),a=r.$elm$=Te.createElementNS(E?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",2&r.$flags$?"slot-fb":r.$tag$),E&&"foreignObject"===r.$tag$&&(E=!1),j(null,r,E),null!=m&&a["s-si"]!==m&&a.classList.add(a["s-si"]=m),r.$children$)for(l=0;l<r.$children$.length;++l)o=V(e,r,l,a),o&&a.appendChild(o);"svg"===r.$tag$?E=!1:"foreignObject"===a.tagName&&(E=!0)}return a["s-hn"]=v,3&r.$flags$&&(a["s-sr"]=!0,a["s-cr"]=g,a["s-sn"]=r.$name$||"",s=e&&e.$children$&&e.$children$[n],s&&s.$tag$===r.$tag$&&e.$elm$&&H(e.$elm$,!1)),a},H=(e,t)=>{Se.$flags$|=1;const n=e.childNodes;for(let e=n.length-1;e>=0;e--){const i=n[e];i["s-hn"]!==v&&i["s-ol"]&&(q(i).insertBefore(i,G(i)),i["s-ol"].remove(),i["s-ol"]=void 0,A=!0),t&&H(i,t)}Se.$flags$&=-2},z=(e,t,n,i,r,a)=>{let o,s=e["s-cr"]&&e["s-cr"].parentNode||e;for(s.shadowRoot&&s.tagName===v&&(s=s.shadowRoot);r<=a;++r)i[r]&&(o=V(null,n,r,e),o&&(i[r].$elm$=o,s.insertBefore(o,G(t))))},K=(e,t,n,i,r)=>{for(;t<=n;++t)(i=e[t])&&(r=i.$elm$,$(i),b=!0,r["s-ol"]?r["s-ol"].remove():H(r,!0),r.remove())},W=(e,t)=>e.$tag$===t.$tag$&&("slot"===e.$tag$?e.$name$===t.$name$:e.$key$===t.$key$),G=e=>e&&e["s-ol"]||e,q=e=>(e["s-ol"]?e["s-ol"]:e).parentNode,Y=(e,t)=>
2{const n=t.$elm$=e.$elm$,i=e.$children$,r=t.$children$,a=t.$tag$,o=t.$text$;let s;null===o?(E="svg"===a||"foreignObject"!==a&&E,"slot"===a||j(e,t,E),null!==i&&null!==r?((e,t,n,i)=>{let r,a,o=0,s=0,l=0,c=0,u=t.length-1,d=t[0],h=t[u],f=i.length-1,p=i[0],m=i[f];for(;o<=u&&s<=f;)if(null==d)d=t[++o];else if(null==h)h=t[--u];else if(null==p)p=i[++s];else if(null==m)m=i[--f];else if(W(d,p))Y(d,p),d=t[++o],p=i[++s];else if(W(h,m))Y(h,m),h=t[--u],m=i[--f];else if(W(d,m))"slot"!==d.$tag$&&"slot"!==m.$tag$||H(d.$elm$.parentNode,!1),Y(d,m),e.insertBefore(d.$elm$,h.$elm$.nextSibling),d=t[++o],m=i[--f];else if(W(h,p))"slot"!==d.$tag$&&"slot"!==m.$tag$||H(h.$elm$.parentNode,!1),Y(h,p),e.insertBefore(h.$elm$,d.$elm$),h=t[--u],p=i[++s];else{for(l=-1,c=o;c<=u;++c)if(t[c]&&null!==t[c].$key$&&t[c].$key$===p.$key$){l=c;break}l>=0?(a=t[l],a.$tag$!==p.$tag$?r=V(t&&t[s],n,l,e):(Y(a,p),t[l]=void 0,r=a.$elm$),p=i[++s]):(r=V(t&&t[s],n,s,e),p=i[++s]),r&&q(d.$elm$).insertBefore(r,G(d.$elm$))}o>u?z(e,null==i[f+1]?null:i[f+1].$elm$,n,i,s,f):s>f&&K(t,o,u)})(n,i,t,r):null!==r?(null!==e.$text$&&(n.textContent=""),z(n,null,t,r,0,r.length-1)):null!==i&&K(i,0,i.length-1),E&&"svg"===a&&(E=!1)):(s=n["s-cr"])?s.parentNode.textContent=o:e.$text$!==o&&(n.data=o)},Q=e=>{const t=e.childNodes;let n,i,r,a,o,s;for(i=0,r=t.length;i<r;i++)if(n=t[i],1===n.nodeType){if(n["s-sr"])for(o=n["s-sn"],n.hidden=!1,a=0;a<r;a++)if(s=t[a].nodeType,t[a]["s-hn"]!==n["s-hn"]||""!==o){if(1===s&&o===t[a].getAttribute("slot")){n.hidden=!0;break}}else if(1===s||3===s&&""!==t[a].textContent.trim()){n.hidden=!0;break}Q(n)}},X=[],Z=e=>{let t,n,i,r,a,o,s=0;const l=e.childNodes,c=l.length;for(;s<c;s++){if(t=l[s],t["s-sr"]&&(n=t["s-cr"])&&n.parentNode)for(i=n.parentNode.childNodes,r=t["s-sn"],o=i.length-1;o>=0;o--)n=i[o],n["s-cn"]||n["s-nr"]||n["s-hn"]===t["s-hn"]||(J(n,r)?(a=X.find(e=>e.$nodeToRelocate$===n),b=!0,n["s-sn"]=n["s-sn"]||r,a?a.$slotRefNode$=t:X.push({$slotRefNode$:t,$nodeToRelocate$:n}),n["s-sr"]&&X.map(e=>{J(e.$nodeToRelocate$,n["s-sn"])&&(a=X.find(e=>e.$nodeToRelocate$===n),a&&!e.$slotRefNode$&&(e.$slotRefNode$=a.$slotRefNode$))})):X.some(e=>e.$nodeToRelocate$===n)||X.push({$nodeToRelocate$:n}));1===t.nodeType&&Z(t)}},J=(e,t)=>1===e.nodeType?null===e.getAttribute("slot")&&""===t||e.getAttribute("slot")===t:e["s-sn"]===t||""===t,$=e=>{e.$attrs$&&e.$attrs$.ref&&e.$attrs$.ref(null),e.$children$&&e.$children$.map($)},ee=(e,t)=>(e.$flags$|=16,e.$ancestorComponent$,De(()=>te(e,t))),te=(e,t)=>{const n=e.$hostElement$,i=(e.$cmpMeta$.$tagName$,()=>{}),r=n;let a;return a=ae(r,t?"componentWillLoad":"componentWillUpdate"),a=oe(a,()=>ae(r,"componentWillRender")),i(),oe(a,()=>ne(e,r,t))},ne=(e,t,n)=>p(null,null,function*(){const i=e.$hostElement$,r=(e.$cmpMeta$.$tagName$,()=>{});i["s-rc"],n&&(e=>{const t=e.$cmpMeta$,n=e.$hostElement$,i=t.$flags$,r=(t.$tagName$,()=>{}),a=((e,t,n)=>{let i=M(t,n);const r=be.get(i);if(e=11===e.nodeType?e:Te,r)if("string"==typeof r){e=e.head||e;let t,n=L.get(e);n||L.set(e,n=new Set),n.has(i)||(t=Te.createElement("style"),t.innerHTML=r,e.insertBefore(t,e.querySelector("link")),n&&n.add(i))}else e.adoptedStyleSheets.includes(r)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]);return i})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t,e.$modeName$);10&i&&(n["s-sc"]=a,n.classList.add(a+"-h"),2&i&&n.classList.add(a+"-s")),r()})(e);const a=(e.$cmpMeta$.$tagName$,()=>{});ie(e,t),a(),r(),re(e)}),ie=(e,t,n)=>{try{T=t,t=t.render&&t.render(),e.$flags$&=-17,e.$flags$|=2,((e,t)=>{const n=e.$hostElement$,r=e.$cmpMeta$,a=e.$vnode$||N(null,null),o=(s=t)&&s.$tag$===_?t:x(null,null,t);var s;if(v=n.tagName,r.$attrsToReflect$&&(o.$attrs$=o.$attrs$||{},r.$attrsToReflect$.map(e=>{let t=(0,i.A)(e,2),r=t[0],a=t[1];return o.$attrs$[a]=n[r]})),o.$tag$=null,o.$flags$|=4,e.$vnode$=o,o.$elm$=a.$elm$=n.shadowRoot||n,m=n["s-sc"],g=n["s-cr"],y=!!(1&r.$flags$),b=!1,Y(a,o),Se.$flags$|=1,A){let e,t,n,i,r,a;Z(o.$elm$);let s=0;for(;s<X.length;s++)e=X[s],t=e.$nodeToRelocate$,t["s-ol"]||(n=Te.createTextNode(""),n["s-nr"]=t,t.parentNode.insertBefore(t["s-ol"]=n,t));for(s=0;s<X.length;s++)if(e=X[s],t=e.$nodeToRelocate$,e.$slotRefNode$){for(i=e.$slotRefNode$.parentNode,r=e.$slotRefNode$.nextSibling,n=t["s-ol"];n=n.previousSibling;)if(a=n["s-nr"],a&&a["s-sn"]===t["s-sn"]&&i===a.parentNode&&(a=a.nextSibling,!a||!a["s-nr"])){r=a;break}(!r&&i!==t.parentNode||t.nextSibling!==r)&&t!==r&&(!t["s-hn"]&&t["s-ol"]&&(t["s-hn"]=t["s-ol"].parentNode.nodeName),i.insertBefore(t,r))}else 1===t.nodeType&&(t.hidden=!0)}b&&Q(o.$elm$),Se.$flags$&=-2,X.length=0})(e,t)}catch(t){ye(t,e.$hostElement$)}return T=null,null},re=e=>{e.$cmpMeta$.$tagName$;const t=e.$hostElement$;e.$ancestorComponent$,ae(t,"componentDidRender"),64&e.$flags$?ae(t,"componentDidUpdate"):(e.$flags$|=64,ae(t,"componentDidLoad"))},ae=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){ye(e)}},oe=(e,t)=>e&&e.then?e.then(t):t(),se=(e,t,n)=>{if(t.$members$){e.watchers&&(t.$watchers$=e.watchers);const n=Object.entries(t.$members$),r=e.prototype;n.map(e=>
2{let n=(0,i.A)(e,2),a=n[0],o=(0,i.A)(n[1],1)[0];(31&o||32&o)&&Object.defineProperty(r,a,{get(){return e=a,me(this).$instanceValues$.get(e);var e},set(e){((e,t,n,i)=>{const r=me(e),a=e,o=r.$instanceValues$.get(t),s=r.$flags$,l=a;var c,u;c=n,u=i.$members$[t][0],n=null==c||k(c)?c:4&u?"false"!==c&&(""===c||!!c):2&u?parseFloat(c):1&u?String(c):c;const d=Number.isNaN(o)&&Number.isNaN(n);if(n!==o&&!d){if(r.$instanceValues$.set(t,n),i.$watchers$&&128&s){const e=i.$watchers$[t];e&&e.map(e=>{try{l[e](n,o,t)}catch(e){ye(e,a)}})}if(2==(18&s)){if(l.componentShouldUpdate&&!1===l.componentShouldUpdate(n,o,t))return;ee(r,!1)}}})(this,a,e,t)},configurable:!0,enumerable:!0})});{const a=new Map;r.attributeChangedCallback=function(e,t,n){Se.jmp(()=>{const t=a.get(e);if(this.hasOwnProperty(t))n=this[t],delete this[t];else if(r.hasOwnProperty(t)&&"number"==typeof this[t]&&this[t]==n)return;this[t]=(null!==n||"boolean"!=typeof this[t])&&n})},e.observedAttributes=n.filter(e=>{let t=(0,i.A)(e,2);return t[0],15&t[1][0]}).map(e=>{let n=(0,i.A)(e,2),r=n[0],o=n[1];const s=o[1]||r;return a.set(s,r),512&o[0]&&t.$attrsToReflect$.push([r,s]),s})}}return e},le=(e,t)=>
2{const n={$flags$:t[0],$tagName$:t[1]};n.$members$=t[2],n.$listeners$=t[3],n.$watchers$=e.$watchers$,n.$attrsToReflect$=[];const r=e.prototype.connectedCallback,a=e.prototype.disconnectedCallback;return Object.assign(e.prototype,{__registerHost(){ge(this,n)},connectedCallback(){(e=>{if(!(1&Se.$flags$)){const t=me(e),n=t.$cmpMeta$,r=(n.$tagName$,()=>{});1&t.$flags$?(ue(e,t,n.$listeners$),t.$lazyInstance$):(t.$flags$|=1,12&n.$flags$&&(e=>{const t=e["s-cr"]=Te.createComment("");t["s-cn"]=!0,e.insertBefore(t,e.firstChild)})(e),n.$members$&&Object.entries(n.$members$).map(t=>{let n=(0,i.A)(t,2),r=n[0];if(31&(0,i.A)(n[1],1)[0]&&e.hasOwnProperty(r)){const t=e[r];delete e[r],e[r]=t}}),((e,t,n,i,r)=>{p(null,null,function*(){if(!(32&t.$flags$)&&(r=e.constructor,t.$flags$|=32,customElements.whenDefined(n.$tagName$).then(()=>t.$flags$|=128),r.style)){let i=r.style;"string"!=typeof i&&(i=i[t.$modeName$=(e=>Ae.map(t=>t(e)).find(e=>!!e))(e)]);const a=M(n,t.$modeName$);if(!be.has(a)){const e=(n.$tagName$,()=>{});((e,t,n)=>{let i=be.get(e);ke&&n?(i=i||new CSSStyleSheet,"string"==typeof i?i=t:i.replaceSync(t)):i=t,be.set(e,i)})(a,i,!!(1&n.$flags$)),e()}}t.$ancestorComponent$,ee(t,!0)})})(e,t,n)),r()}})(this),r&&r.call(this)},disconnectedCallback(){(e=>{if(!(1&Se.$flags$)){const t=me(e);t.$rmListeners$&&(t.$rmListeners$.map(e=>e()),t.$rmListeners$=void 0)}})(this),a&&a.call(this)},__attachShadow(){this.attachShadow({mode:"open",delegatesFocus:!!(16&n.$flags$)})}}),e.is=n.$tagName$,se(e,n)},ce=(e,t)=>t,ue=(e,t,n,r)=>{n&&n.map(n=>{let r=(0,i.A)(n,3),a=r[0],o=r[1],s=r[2];const l=he(e,a),c=de(t,s),u=fe(a);Se.ael(l,o,c,u),(t.$rmListeners$=t.$rmListeners$||[]).push(()=>Se.rel(l,o,c,u))})},de=(e,t)=>n=>{try{e.$hostElement$[t](n)}catch(e){ye(e)}},he=(e,t)=>4&t?Te:8&t?Ee:16&t?Te.body:e,fe=e=>Ce?{passive:!!(1&e),capture:!!(2&e)}:!!(2&e),pe=new WeakMap,me=e=>pe.get(e),ge=(e,t)=>{const n={$flags$:0,$hostElement$:e,$cmpMeta$:t,$instanceValues$:new Map};return ue(e,n,t.$listeners$),pe.set(e,n)},ve=(e,t)=>t in e,ye=(e,t)=>(0,console.error)(e,t),be=new Map,Ae=[],Ee="undefined"!=typeof window?window:{},Te=Ee.document||{head:{}},we=Ee.HTMLElement||class{},Se={$flags$:0,$resourcesUrl$:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,i)=>e.addEventListener(t,n,i),rel:(e,t,n,i)=>e.removeEventListener(t,n,i),ce:(e,t)=>new CustomEvent(e,t)},Ce=(()=>{let e=!1;try{Te.addEventListener("e",null,Object.defineProperty({},"passive",{get(){e=!0}}))}catch(e){}return e})(),ke=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),xe=[],Ne=[],_e=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){ye(e)}e.length=0},Ie=()=>{_e(xe),_e(Ne),(w=xe.length>0)&&Se.raf(Ie)},Oe=e=>Promise.resolve(void 0).then(e),De=(e=>t=>{e.push(t),w||(w=!0,4&Se.$flags$?Oe(Ie):Se.raf(Ie))})(Ne);function Re(){return Re=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},Re.apply(this,arguments)}function Pe(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={mimeType:t.mimeType||null,onBeforeSend:t.onBeforeSend||Function.prototype,onSuccess:t.onSuccess||Function.prototype,onError:t.onError||Function.prototype,onComplete:t.onComplete||Function.prototype},i=Array.isArray(e)?e:[e],r=Array.apply(null,Array(i.length)).map(function(e){return null});function a(e){var t="string"==typeof e,n=t&&"<"===e.trim().charAt(0);return t&&!n}function o(e,t){n.onError(e,i[t],t)}function s(e,t){var a=n.onSuccess(e,i[t],t);e=!1===a?"":a||e,r[t]=e,-1===r.indexOf(null)&&n.onComplete(r)}var l=document.createElement("a");i.forEach(function(e,t){if(l.setAttribute("href",e),l.href=String(l.href),Boolean(document.all&&!window.atob)&&l.host.split(":")[0]!==location.host.split(":")[0])if(l.protocol===location.protocol){var i=new XDomainRequest;i.open("GET",e),i.timeout=0,i.onprogress=Function.prototype,i.ontimeout=Function.prototype,i.onload=function(){var e=i.responseText;a(e)?s(e,t):o(i,t)},i.onerror=function(e){o(i,t)},setTimeout(function(){i.send()},0)}else console.warn("Internet Explorer 9 Cross-Origin (CORS) requests must use the same protocol (".concat(e,")")),o(null,t);else{var r=new XMLHttpRequest;r.open("GET",e),n.mimeType&&r.overrideMimeType&&r.overrideMimeType(n.mimeType),n.onBeforeSend(r,e,t),r.onreadystatechange=function(){if(4===r.readyState){var e=r.responseText;r.status<400&&a(e)||0===r.status&&a(e)?s(e,t):o(r,t)}},r.send()}})}
2function Le(e){var t=/\/\*[\s\S]+?\*\//g,n=/(?:@import\s*)(?:url\(\s*)?(?:['"])([^'"]*)(?:['"])(?:\s*\))?(?:[^;]*;)/g,i={rootElement:e.rootElement||document,include:e.include||'style,link[rel="stylesheet"]',exclude:e.exclude||null,filter:e.filter||null,skipDisabled:!1!==e.skipDisabled,useCSSOM:e.useCSSOM||!1,onBeforeSend:e.onBeforeSend||Function.prototype,onSuccess:e.onSuccess||Function.prototype,onError:e.onError||Function.prototype,onComplete:e.onComplete||Function.prototype},r=Array.apply(null,i.rootElement.querySelectorAll(i.include)).filter(function(e){return t=e,n=i.exclude,!(t.matches||t.matchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector).call(t,n);var t,n}),a=Array.apply(null,Array(r.length)).map(function(e){return null});function o(){if(-1===a.indexOf(null)){a.reduce(function(e,t,n){return""===t&&e.push(n),e},[]).reverse().forEach(function(e){return[r,a].forEach(function(t){return t.splice(e,1)})});var e=a.join("");i.onComplete(e,a,r)}}function s(e,t,n,r){var s=i.onSuccess(e,n,r);c(e=void 0!==s&&!1===Boolean(s)?"":s||e,n,r,function(e,r){null===a[t]&&(r.forEach(function(e){return i.onError(e.xhr,n,e.url)}),!i.filter||i.filter.test(e)?a[t]=e:a[t]="",o())})}function l(e,i){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],a={};return a.rules=(e.replace(t,"").match(n)||[]).filter(function(e){return-1===r.indexOf(e)}),a.urls=a.rules.map(function(e){return e.replace(n,"$1")}),a.absoluteUrls=a.urls.map(function(e){return Me(e,i)}),a.absoluteRules=a.rules.map(function(e,t){var n=a.urls[t],r=Me(a.absoluteUrls[t],i);return e.replace(n,r)}),a}function c(e,t,n,r){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[],s=l(e,n,o);s.rules.length?Pe(s.absoluteUrls,{onBeforeSend:function(e,n,r){i.onBeforeSend(e,t,n)},onSuccess:function(e,n,r){var a=i.onSuccess(e,t,n),s=l(e=!1===a?"":a||e,n,o);
2return s.rules.forEach(function(t,n){e=e.replace(t,s.absoluteRules[n])}),e},onError:function(i,l,u){a.push({xhr:i,url:l}),o.push(s.rules[u]),c(e,t,n,r,a,o)},onComplete:function(i){i.forEach(function(t,n){e=e.replace(s.rules[n],t)}),c(e,t,n,r,a,o)}}):r(e,a)}r.length?r.forEach(function(e,t){var n=e.getAttribute("href"),r=e.getAttribute("rel"),l="link"===e.nodeName.toLowerCase()&&n&&r&&-1!==r.toLowerCase().indexOf("stylesheet"),c=!1!==i.skipDisabled&&e.disabled,u="style"===e.nodeName.toLowerCase();if(l&&!c)if(-1!==n.indexOf("data:text/css")){var d=decodeURIComponent(n.substring(n.indexOf(",")+1));i.useCSSOM&&(d=Array.apply(null,e.sheet.cssRules).map(function(e){return e.cssText}).join("")),s(d,t,e,location.href)}else Pe(n,{mimeType:"text/css",onBeforeSend:function(t,n,r){i.onBeforeSend(t,e,n)},onSuccess:function(i,r,a){var o=Me(n);s(i,t,e,o)},onError:function(n,r,s){a[t]="",i.onError(n,e,r),o()}});else if(u&&!c){var h=e.textContent;i.useCSSOM&&(h=Array.apply(null,e.sheet.cssRules).map(function(e){return e.cssText}).join("")),s(h,t,e,location.href)}else a[t]="",o()}):i.onComplete("",[])}function Me(e,t){var n=document.implementation.createHTMLDocument(""),i=n.createElement("base"),r=n.createElement("a");return n.head.appendChild(i),n.body.appendChild(r),i.href=t||document.baseURI||(document.querySelector("base")||{}).href||location.href,r.href=e,r.href}(function(){var e=window.Document.prototype.createElement,t=window.Document.prototype.createElementNS,n=window.Document.prototype.importNode,i=window.Document.prototype.prepend,r=window.Document.prototype.append,a=window.DocumentFragment.prototype.prepend,o=window.DocumentFragment.prototype.append,s=window.Node.prototype.cloneNode,l=window.Node.prototype.appendChild,c=window.Node.prototype.insertBefore,u=window.Node.prototype.removeChild,d=window.Node.prototype.replaceChild,h=Object.getOwnPropertyDescriptor(window.Node.prototype,"textContent"),f=window.Element.prototype.attachShadow,p=Object.getOwnPropertyDescriptor(window.Element.prototype,"innerHTML"),m=window.Element.prototype.getAttribute,g=window.Element.prototype.setAttribute,v=window.Element.prototype.removeAttribute,y=window.Element.prototype.toggleAttribute,b=window.Element.prototype.getAttributeNS,A=window.Element.prototype.setAttributeNS,E=window.Element.prototype.removeAttributeNS,T=window.Element.prototype.insertAdjacentElement,w=window.Element.prototype.insertAdjacentHTML,S=window.Element.prototype.prepend,C=window.Element.prototype.append,k=window.Element.prototype.before,x=window.Element.prototype.after,N=window.Element.prototype.replaceWith,_=window.Element.prototype.remove,I=window.HTMLElement,O=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML"),D=window.HTMLElement.prototype.insertAdjacentElement,R=window.HTMLElement.prototype.insertAdjacentHTML,P=new Set;function L(e){var t=P.has(e);return e=/^[a-z][.0-9_a-z]*-[-.0-9_a-z]*$/.test(e),!t&&e}"annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" ").forEach(function(e){return P.add(e)});var M=document.contains?document.contains.bind(document):document.documentElement.contains.bind(document.documentElement);function F(e){var t=e.isConnected;if(void 0!==t)return t;if(M(e))return!0;for(;e&&!(e.__CE_isImportDocument||e instanceof Document);)e=e.parentNode||(window.ShadowRoot&&e instanceof ShadowRoot?e.host:void 0);return!(!e||!(e.__CE_isImportDocument||e instanceof Document))}function U(e){var t=e.children;if(t)return Array.prototype.slice.call(t);for(t=[],e=e.firstChild;e;e=e.nextSibling)e.nodeType===Node.ELEMENT_NODE&&t.push(e);return t}function B(e,t){for(;t&&t!==e&&!t.nextSibling;)t=t.parentNode;return t&&t!==e?t.nextSibling:null}function j(e,t,n){for(var i=e;i;){if(i.nodeType===Node.ELEMENT_NODE){var r=i;t(r);var a=r.localName;if("link"===a&&"import"===r.getAttribute("rel")){if(i=r.import,void 0===n&&(n=new Set),i instanceof Node&&!n.has(i))for(n.add(i),i=i.firstChild;i;i=i.nextSibling)j(i,t,n);i=B(e,r);continue}if("template"===a){i=B(e,r);continue}if(r=r.__CE_shadowRoot)for(r=r.firstChild;r;r=r.nextSibling)j(r,t,n)}i=i.firstChild?i.firstChild:B(e,i)}}function V(){var e=!(null==le||!le.noDocumentConstructionObserver),t=!(null==le||!le.shadyDomFastWalk);this.m=[],this.g=[],this.j=!1,this.shadyDomFastWalk=t,this.I=!e}function H(e,t,n,i){var r=window.ShadyDOM;
2if(e.shadyDomFastWalk&&r&&r.inUse){if(t.nodeType===Node.ELEMENT_NODE&&n(t),t.querySelectorAll)for(e=r.nativeMethods.querySelectorAll.call(t,"*"),t=0;t<e.length;t++)n(e[t])}else j(t,n,i)}function z(e,t){e.j&&H(e,t,function(t){return K(e,t)})}function K(e,t){if(e.j&&!t.__CE_patched){t.__CE_patched=!0;for(var n=0;n<e.m.length;n++)e.m[n](t);for(n=0;n<e.g.length;n++)e.g[n](t)}}function W(e,t){var n=[];for(H(e,t,function(e){return n.push(e)}),t=0;t<n.length;t++){var i=n[t];1===i.__CE_state?e.connectedCallback(i):Y(e,i)}}function G(e,t){var n=[];for(H(e,t,function(e){return n.push(e)}),t=0;t<n.length;t++){var i=n[t];1===i.__CE_state&&e.disconnectedCallback(i)}}function q(e,t,n){var i=(n=void 0===n?{}:n).J,r=n.upgrade||function(t){return Y(e,t)},a=[];for(H(e,t,function(t){if(e.j&&K(e,t),"link"===t.localName&&"import"===t.getAttribute("rel")){var n=t.import;n instanceof Node&&(n.__CE_isImportDocument=!0,n.__CE_registry=document.__CE_registry),n&&"complete"===n.readyState?n.__CE_documentLoadHandled=!0:t.addEventListener("load",function(){var n=t.import;if(!n.__CE_documentLoadHandled){n.__CE_documentLoadHandled=!0;var a=new Set;i&&(i.forEach(function(e){return a.add(e)}),a.delete(n)),q(e,n,{J:a,upgrade:r})}})}else a.push(t)},i),t=0;t<a.length;t++)r(a[t])}function Y(e,t){try{var n=t.ownerDocument,i=n.__CE_registry,r=i&&(n.defaultView||n.__CE_isImportDocument)?re(i,t.localName):void 0;if(r&&void 0===t.__CE_state){r.constructionStack.push(t);try{try{if(new r.constructorFunction!==t)throw Error("The custom element constructor did not produce the element being upgraded.")}finally{r.constructionStack.pop()}}catch(e){throw t.__CE_state=2,e}if(t.__CE_state=1,t.__CE_definition=r,r.attributeChangedCallback&&t.hasAttributes()){var a=r.observedAttributes;for(r=0;r<a.length;r++){var o=a[r],s=t.getAttribute(o);null!==s&&e.attributeChangedCallback(t,o,null,s,null)}}F(t)&&e.connectedCallback(t)}}catch(e){X(e)}}function Q(n,i,r,a){var o=i.__CE_registry;if(o&&(null===a||"http://www.w3.org/1999/xhtml"===a)&&(o=re(o,r)))try{var s=new o.constructorFunction;if(void 0===s.__CE_state||void 0===s.__CE_definition)throw Error("Failed to construct '"+r+"': The returned value was not constructed with the HTMLElement constructor.");if("http://www.w3.org/1999/xhtml"!==s.namespaceURI)throw Error("Failed to construct '"+r+"': The constructed element's namespace must be the HTML namespace.");if(s.hasAttributes())throw Error("Failed to construct '"+r+"': The constructed element must not have any attributes.");if(null!==s.firstChild)throw Error("Failed to construct '"+r+"': The constructed element must not have any children.");if(null!==s.parentNode)throw Error("Failed to construct '"+r+"': The constructed element must not have a parent node.");if(s.ownerDocument!==i)throw Error("Failed to construct '"+r+"': The constructed element's owner document is incorrect.");if(s.localName!==r)throw Error("Failed to construct '"+r+"': The constructed element's local name is incorrect.");return s}catch(o){return X(o),i=null===a?e.call(i,r):t.call(i,a,r),Object.setPrototypeOf(i,HTMLUnknownElement.prototype),i.__CE_state=2,i.__CE_definition=void 0,K(n,i),i}return K(n,i=null===a?e.call(i,r):t.call(i,a,r)),i}function X(e){var t="",n="",i=0,r=0;e instanceof Error?(t=e.message,n=e.sourceURL||e.fileName||"",i=e.line||e.lineNumber||0,r=e.column||e.columnNumber||0):t="Uncaught "+String(e);var a=void 0;void 0===ErrorEvent.prototype.initErrorEvent?a=new ErrorEvent("error",{cancelable:!0,message:t,filename:n,lineno:i,colno:r,error:e}):((a=document.createEvent("ErrorEvent")).initErrorEvent("error",!1,!0,t,n,i),a.preventDefault=function(){Object.defineProperty(this,"defaultPrevented",{configurable:!0,get:function(){return!0}})}),void 0===a.error&&Object.defineProperty(a,"error",{configurable:!0,enumerable:!0,get:function(){return e}}),window.dispatchEvent(a),a.defaultPrevented||console.error(e)}function Z(){var e=this;this.g=void 0,this.F=new Promise(function(t){e.l=t})}function J(e){var t=document;this.l=void 0,this.h=e,this.g=t,q(this.h,this.g),"loading"===this.g.readyState&&(this.l=new MutationObserver(this.G.bind(this)),this.l.observe(this.g,{childList:!0,subtree:!0}))}function $(e){e.l&&e.l.disconnect()}function ee(e){this.s=new Map,this.u=new Map,this.C=new Map,this.A=!1,this.B=new Map,this.o=function(e){return e()},this.i=!1,this.v=[],this.h=e,this.D=e.I?new J(e):void 0}function te(e,t){if(!L(t))throw new SyntaxError("The element name '"+t+"' is not val
2id.");if(re(e,t))throw Error("A custom element with name '"+t+"' has already been defined.");if(e.A)throw Error("A custom element is already being defined.")}function ne(e,t,n){var i;e.A=!0;try{var r=n.prototype;if(!(r instanceof Object))throw new TypeError("The custom element constructor's prototype is not an object.");var a=function(e){var t=r[e];if(void 0!==t&&!(t instanceof Function))throw Error("The '"+e+"' callback must be a function.");return t},o=a("connectedCallback"),s=a("disconnectedCallback"),l=a("adoptedCallback"),c=(i=a("attributeChangedCallback"))&&n.observedAttributes||[]}catch(e){throw e}finally{e.A=!1}return n={localName:t,constructorFunction:n,connectedCallback:o,disconnectedCallback:s,adoptedCallback:l,attributeChangedCallback:i,observedAttributes:c,constructionStack:[]},e.u.set(t,n),e.C.set(n.constructorFunction,n),n}function ie(e){if(!1!==e.i){e.i=!1;for(var t=[],n=e.v,i=new Map,r=0;r<n.length;r++)i.set(n[r],[]);for(q(e.h,document,{upgrade:function(n){if(void 0===n.__CE_state){var r=n.localName,a=i.get(r);a?a.push(n):e.u.has(r)&&t.push(n)}}}),r=0;r<t.length;r++)Y(e.h,t[r]);for(r=0;r<n.length;r++){for(var a=n[r],o=i.get(a),s=0;s<o.length;s++)Y(e.h,o[s]);(a=e.B.get(a))&&a.resolve(void 0)}n.length=0}}function re(e,t){var n=e.u.get(t);if(n)return n;if(n=e.s.get(t)){e.s.delete(t);try{return ne(e,t,n())}catch(e){X(e)}}}function ae(e,t,n){function i(t){return function(n){for(var i=[],r=0;r<arguments.length;++r)i[r]=arguments[r];r=[];for(var a=[],o=0;o<i.length;o++){var s=i[o];if(s instanceof Element&&F(s)&&a.push(s),s instanceof DocumentFragment)for(s=s.firstChild;s;s=s.nextSibling)r.push(s);else r.push(s)}for(t.apply(this,i),i=0;i<a.length;i++)G(e,a[i]);if(F(this))for(i=0;i<r.length;i++)(a=r[i])instanceof Element&&W(e,a)}}
vendor: 8,820 bytes, line 2
2void 0!==n.prepend&&(t.prepend=i(n.prepend)),void 0!==n.append&&(t.append=i(n.append))}function oe(e){function n(t,n){Object.defineProperty(t,"innerHTML",{enumerable:n.enumerable,configurable:!0,get:n.get,set:function(t){var i=this,r=void 0;if(F(this)&&(r=[],H(e,this,function(e){e!==i&&r.push(e)})),n.set.call(this,t),r)for(var a=0;a<r.length;a++){var o=r[a];1===o.__CE_state&&e.disconnectedCallback(o)}return this.ownerDocument.__CE_registry?q(e,this):z(e,this),t}})}function i(t,n){t.insertAdjacentElement=function(t,i){var r=F(i);return t=n.call(this,t,i),r&&G(e,i),F(t)&&W(e,i),t}}function r(t,n){function i(t,n){for(var i=[];t!==n;t=t.nextSibling)i.push(t);for(n=0;n<i.length;n++)q(e,i[n])}t.insertAdjacentHTML=function(e,t){if("beforebegin"===(e=e.toLowerCase())){var r=this.previousSibling;n.call(this,e,t),i(r||this.parentNode.firstChild,this)}else if("afterbegin"===e)r=this.firstChild,n.call(this,e,t),i(this.firstChild,r);else if("beforeend"===e)r=this.lastChild,n.call(this,e,t),i(r||this.firstChild,null);else{if("afterend"!==e)throw new SyntaxError("The value provided ("+String(e)+") is not one of 'beforebegin', 'afterbegin', 'beforeend', or 'afterend'.");r=this.nextSibling,n.call(this,e,t),i(this.nextSibling,r)}}}f&&(Element.prototype.attachShadow=function(t){if(t=f.call(this,t),e.j&&!t.__CE_patched){t.__CE_patched=!0;for(var n=0;n<e.m.length;n++)e.m[n](t)}return this.__CE_shadowRoot=t}),p&&p.get?n(Element.prototype,p):O&&O.get?n(HTMLElement.prototype,O):function(e,t){e.j=!0,e.g.push(t)}(e,function(e){n(e,{enumerable:!0,configurable:!0,get:function(){return s.call(this,!0).innerHTML},set:function(e){var n="template"===this.localName,i=n?this.content:this,r=t.call(document,this.namespaceURI,this.localName);for(r.innerHTML=e;0<i.childNodes.length;)u.call(i,i.childNodes[0]);for(e=n?r.content:r;0<e.childNodes.length;)l.call(i,e.childNodes[0])}})}),Element.prototype.setAttribute=function(t,n){if(1!==this.__CE_state)return g.call(this,t,n);var i=m.call(this,t);g.call(this,t,n),n=m.call(this,t),e.attributeChangedCallback(this,t,i,n,null)},Element.prototype.setAttributeNS=function(t,n,i){if(1!==this.__CE_state)return A.call(this,t,n,i);var r=b.call(this,t,n);A.call(this,t,n,i),i=b.call(this,t,n),e.attributeChangedCallback(this,n,r,i,t)},Element.prototype.removeAttribute=function(t){if(1!==this.__CE_state)return v.call(this,t);var n=m.call(this,t);v.call(this,t),null!==n&&e.attributeChangedCallback(this,t,n,null,null)},y&&(Element.prototype.toggleAttribute=function(t,n){if(1!==this.__CE_state)return y.call(this,t,n);var i=m.call(this,t);return null!==i!==(n=y.call(this,t,n))&&e.attributeChangedCallback(this,t,i,n?"":null,null),n}),Element.prototype.removeAttributeNS=function(t,n){if(1!==this.__CE_state)return E.call(this,t,n);var i=b.call(this,t,n);E.call(this,t,n);var r=b.call(this,t,n);i!==r&&e.attributeChangedCallback(this,n,i,r,t)},D?i(HTMLElement.prototype,D):T&&i(Element.prototype,T),R?r(HTMLElement.prototype,R):w&&r(Element.prototype,w),ae(e,Element.prototype,{prepend:S,append:C}),function(e){function t(t){return function(n){for(var i=[],r=0;r<arguments.length;++r)i[r]=arguments[r];r=[];for(var a=[],o=0;o<i.length;o++){var s=i[o];if(s instanceof Element&&F(s)&&a.push(s),s instanceof DocumentFragment)for(s=s.firstChild;s;s=s.nextSibling)r.push(s);else r.push(s)}for(t.apply(this,i),i=0;i<a.length;i++)G(e,a[i]);if(F(this))for(i=0;i<r.length;i++)(a=r[i])instanceof Element&&W(e,a)}}var n=Element.prototype;void 0!==k&&(n.before=t(k)),void 0!==x&&(n.after=t(x)),void 0!==N&&(n.replaceWith=function(t){for(var n=[],i=0;i<arguments.length;++i)n[i]=arguments[i];i=[];for(var r=[],a=0;a<n.length;a++){var o=n[a];if(o instanceof Element&&F(o)&&r.push(o),o instanceof DocumentFragment)for(o=o.firstChild;o;o=o.nextSibling)i.push(o);else i.push(o)}for(a=F(this),N.apply(this,n),n=0;n<r.length;n++)G(e,r[n]);if(a)for(G(e,this),n=0;n<i.length;n++)(r=i[n])instanceof Element&&W(e,r)}),void 0!==_&&(n.remove=function(){var t=F(this);_.call(this),t&&G(e,this)})}(e)}V.prototype.connectedCallback=function(e){var t=e.__CE_definition;if(t.connectedCallback)try{t.connectedCallback.call(e)}catch(e){X(e)}},V.prototype.disconnectedCallback=function(e){var t=e.__CE_definition;if(t.disconnectedCallback)try{t.disconnectedCallback.call(e)}catch(e){X(e)}},V.prototype.attributeChangedCallback=function(e,t,n,i,r){var a=e.__CE_definition;if(a.attributeChangedCallback&&-1<a.observedAttributes.indexOf(t))try{a.attributeChangedCallback.call(e,t,n,i,r)}catch(e){X(e)}},Z.prototype.resolve=function(e){if(this.g)throw Error("Already resolved.");this.g=e,this.l(e)},J.prototype.G=function(e){var t=this.g.readyState;for("interactive"!==t&&"complete"!==t||$(this),t=0;t<e.length;t++)for(var n=e[t].addedNodes,i=0;i<n.length;i++)q(this.h,n[i])},ee.prototype.H=function(e,t){var n=this;if(!(t instanceof Function))throw new TypeError("Custom element constructor getters must be functions.");te(this,e),this.s.set(e,t),this.v.push(e),this.i||(this.i=!0,this.o(function(){return ie(n)}))},ee.prototype.define=function(e,t){var n=this;if(!(t instanceof Function))throw new TypeError("Custom element constructors must be functions.");te(this,e),ne(this,e,t),this.v.push(e),this.i||(this.i=!0,this.o(function(){return ie(n)}))},ee.prototype.upgrade=function(e){q(this.h,e)},ee.prototype.get=function(e){if(e=re(this,e))return e.constructorFunction},ee.prototype.whenDefined=function(e){if(!L(e))return Promise.reject(new SyntaxError("'"+e+"' is not a valid custom element name."));var t=this.B.get(e);if(t)return t.F;t=new Z,this.B.set(e,t);var n=this.u.has(e)||this.s.has(e);return e=-1===this.v.indexOf(e),n&&e&&t.resolve(void 0),t.F},ee.prototype.polyfillWrapFlushCallback=function(e){this.D&&$(this.D);var t=this.o;this.o=function(n){return e(function(){return t(n)})}},ee.prototype.define=ee.prototype.define,ee.prototype.upgrade=ee.prototype.upgrade,ee.prototype.get=ee.prototype.get,ee.prototype.whenDefined=ee.prototype.whenDefined,ee.prototype.polyfillDefineLazy=ee.prototype.H,ee.prototype.polyfillWrapFlushCallback=ee.prototype.polyfillWrapFlushCallback;var se={},le=window.customElements;function ce(){var t=new V;!function(t){function n(){var n=this.constructor,i=document.__CE_registry.C.get(n);if(!i)throw Error("Failed to construct a custom element: The constructor was not registered with `customElements`.");var r=i.constructionStack;if(0===r.length)return r=e.call(document,i.localName),Object.setPrototypeOf(r,n.prototype),r.__CE_state=1,r.__CE_definition=i,K(t,r),r;var a=r.length-1,o=r[a];if(o===se)throw Error("Failed to construct '"+i.localName+"': This element was already constructed.");return r[a]=se,Object.setPrototypeOf(o,n.prototype),K(t,o),o}n.prototype=I.prototype,Object.defineProperty(HTMLElement.prototype,"constructor",{writable:!0,configurable:!0,enumerable:!1,value:n}),window.HTMLElement=n}(t),function(e){Document.prototype.createElement=function(t){return Q(e,this,t,null)},Document.prototype.importNode=function(t,i){return t=n.call(this,t,!!i),this.__CE_registry?q(e,t):z(e,t),t},Document.prototype.createElementNS=function(t,n){return Q(e,this,n,t)},ae(e,Document.prototype,{prepend:i,append:r})}(t),ae(t,DocumentFragment.prototype,{prepend:a,append:o}),function(e){function t(t,n){Object.defineProperty(t,"textContent",{enumerable:n.enumerable,configurable:!0,get:n.get,set:function(t){if(this.nodeType===Node.TEXT_NODE)n.set.call(this,t);else{var i=void 0;if(this.firstChild){var r=this.childNodes,a=r.length;if(0<a&&F(this)){i=Array(a);for(var o=0;o<a;o++)i[o]=r[o]}}if(n.set.call(this,t),i)for(t=0;t<i.length;t++)G(e,i[t])}}})}Node.prototype.insertBefore=function(t,n){if(t instanceof DocumentFragment){var i=U(t);if(t=c.call(this,t,n),F(this))for(n=0;n<i.length;n++)W(e,i[n]);return t}return i=t instanceof Element&&F(t),n=c.call(this,t,n),i&&G(e,t),F(this)&&W(e,t),n},Node.prototype.appendChild=function(t){if(t instanceof DocumentFragment){var n=U(t);if(t=l.call(this,t),F(this))for(var i=0;i<n.length;i++)W(e,n[i]);return t}return n=t instanceof Element&&F(t),i=l.call(this,t),n&&G(e,t),F(this)&&W(e,t),i},Node.prototype.cloneNode=function(t){return t=s.call(this,!!t),this.ownerDocument.__CE_registry?q(e,t):z(e,t),t},Node.prototype.removeChild=function(t){var n=t instanceof Element&&F(t),i=u.call(this,t);return n&&G(e,t),i},Node.prototype.replaceChild=function(t,n){if(t instanceof DocumentFragment){var i=U(t);if(t=d.call(this,t,n),F(this))for(G(e,n),n=0;n<i.length;n++)W(e,i[n]);return t}i=t instanceof Element&&F(t);var r=d.call(this,t,n),a=F(this);return a&&G(e,n),i&&G(e,t),a&&W(e,t),r},h&&h.get?t(Node.prototype,h):function(e,t){e.j=!0,e.m.push(t)}(e,function(e){t(e,{enumerable:!0,configurable:!0,get:function(){for(var e=[],t=this.firstChild;t;t=t.nextSibling)t.nodeType!==Node.COMMENT_NODE&&e.push(t.textContent);return e.join("")}
2,set:function(e){for(;this.firstChild;)u.call(this,this.firstChild);null!=e&&""!==e&&l.call(this,document.createTextNode(e))}})})}(t),oe(t),window.CustomElementRegistry=ee,t=new ee(t),document.__CE_registry=t,Object.defineProperty(window,"customElements",{configurable:!0,enumerable:!0,value:t})}le&&!le.forcePolyfill&&"function"==typeof le.define&&"function"==typeof le.get||ce(),window.__CE_installPolyfill=ce}).call(self);var Fe=Ue;function Ue(e,t,n){e instanceof RegExp&&(e=Be(e,n)),t instanceof RegExp&&(t=Be(t,n));var i=je(e,t,n);return i&&{start:i[0],end:i[1],pre:n.slice(0,i[0]),body:n.slice(i[0]+e.length,i[1]),post:n.slice(i[1]+t.length)}}function Be(e,t){var n=t.match(e);return n?n[0]:null}function je(e,t,n){var i,r,a,o,s,l=n.indexOf(e),c=n.indexOf(t,l+1),u=l;if(l>=0&&c>0){if(e===t)return[l,c];for(i=[],a=n.length;u>=0&&!s;)u==l?(i.push(u),l=n.indexOf(e,u+1)):1==i.length?s=[i.pop(),c]:((r=i.pop())<a&&(a=r,o=c),c=n.indexOf(t,u+1)),u=l<c&&l>=0?l:c;i.length&&(s=[a,o])}return s}function Ve(e){var t=Re({},{preserveStatic:!0,removeComments:!1},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{});function n(e){throw new Error("CSS parse error: ".concat(e))}function i(t){var n=t.exec(e);if(n)return e=e.slice(n[0].length),n}function r(){return i(/^{\s*/)}function a(){return i(/^}/)}function o(){i(/^\s*/)}function s(){if(o(),"/"===e[0]&&"*"===e[1]){for(var t=2;e[t]&&("*"!==e[t]||"/"!==e[t+1]);)t++;if(!e[t])return n("end of comment is missing");var i=e.slice(2,t);return e=e.slice(t+2),{type:"comment",comment:i}}}function l(){for(var e,n=[];e=s();)n.push(e);return t.removeComments?[]:n}function c(){for(o();"}"===e[0];)n("extra closing bracket");var t=i(/^(("(?:\\"|[^"])*"|'(?:\\'|[^'])*'|[^{])+)/);if(t){var r,a=t[0].trim();/\/\*/.test(a)&&(a=a.replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,""));var s=/["']\w*,\w*["']/.test(a);return s&&(a=a.replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(e){return e.replace(/,/g,"â")})),r=/,/.test(a)?a.split(/\s*(?![^(]*\)),\s*/):[a],s&&(r=r.map(function(e){return e.replace(/\u200C/g,",")})),r}}function u(){if("@"===e[0])return f();i(/^([;\s]*)+/);var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=i(/^(\*?[-#/*\\\w.]+(\[[0-9a-z_-]+\])?)\s*/);if(r){if(r=r[0].trim(),!i(/^:\s*/))return n("property missing ':'");var a=i(/^((?:\/\*.*?\*\/|'(?:\\'|.)*?'|"(?:\\"|.)*?"|\((\s*'(?:\\'|.)*?'|"(?:\\"|.)*?"|[^)]*?)\s*\)|[^};])+)/),o={type:"declaration",property:r.replace(t,""),value:a?a[0].replace(t,"").trim():""};return i(/^[;\s]*/),o}}function d(){if(!r())return n("missing '{'");for(var e,t=l();e=u();)t.push(e),t=t.concat(l());return a()?t:n("missing '}'")}function h(){o();for(var e,t=[];e=i(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),i(/^,\s*/);if(t.length)return{type:"keyframe",values:t,declarations:d()}}function f(){if(o(),"@"===e[0]){var s=function(){var e=i(/^@(import|charset|namespace)\s*([^;]+);/);if(e)return{type:e[1],name:e[2].trim()}}()||function(){if(i(/^@font-face\s*/))return{type:"font-face",declarations:d()}}()||function(){var e=i(/^@media([^{]+)*/);if(e)return{type:"media",media:(e[1]||"").trim(),rules:m()}}
vendor: 7,104 bytes, line 2
2()||function(){var e=i(/^@([-\w]+)?keyframes\s*/);if(e){var t=e[1];if(!(e=i(/^([-\w]+)\s*/)))return n("@keyframes missing name");var o,s=e[1];if(!r())return n("@keyframes missing '{'");for(var c=l();o=h();)c.push(o),c=c.concat(l());return a()?{type:"keyframes",name:s,vendor:t,keyframes:c}:n("@keyframes missing '}'")}}()||function(){var e=i(/^@supports *([^{]+)/);if(e)return{type:"supports",supports:e[1].trim(),rules:m()}}()||function(){var e=i(/^@([-\w]+)?document *([^{]+)/);if(e)return{type:"document",document:e[2].trim(),vendor:e[1]?e[1].trim():null,rules:m()}}()||function(){var e=i(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(e)return{type:"custom-media",name:e[1].trim(),media:e[2].trim()}}()||function(){if(i(/^@host\s*/))return{type:"host",rules:m()}}()||function(){if(i(/^@page */))return{type:"page",selectors:c()||[],declarations:d()}}()||function(){var e=i(/@(top|bottom|left|right)-(left|center|right|top|middle|bottom)-?(corner)?\s*/);if(e)return{type:"page-margin-box",name:"".concat(e[1],"-").concat(e[2])+(e[3]?"-".concat(e[3]):""),declarations:d()}}();if(s&&!t.preserveStatic){var u=!1;return u=s.declarations?s.declarations.some(function(e){return/var\(/.test(e.value)}):(s.keyframes||s.rules||[]).some(function(e){return(e.declarations||[]).some(function(e){return/var\(/.test(e.value)})}),u?s:{}}return s}}function p(){if(!t.preserveStatic){var i=Fe("{","}",e);if(i){var r=/:(?:root|host)(?![.:#(])/.test(i.pre)&&/--\S*\s*:/.test(i.body),a=/var\(/.test(i.body);if(!r&&!a)return e=e.slice(i.end+1),{}}}var o=c()||[],s=t.preserveStatic?d():d().filter(function(e){var t=o.some(function(e){return/:(?:root|host)(?![.:#(])/.test(e)})&&/^--\S/.test(e.property),n=/var\(/.test(e.value);return t||n});return o.length||n("selector missing"),{type:"rule",selectors:o,declarations:s}}function m(t){if(!t&&!r())return n("missing '{'");for(var i,o=l();e.length&&(t||"}"!==e[0])&&(i=f()||p());)i.type&&o.push(i),o=o.concat(l());return t||a()?o:n("missing '}'")}return{type:"stylesheet",stylesheet:{rules:m(!0),errors:[]}}}function He(e){var t=Re({},{parseHost:!1,store:{},onWarning:function(){}},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}),n=new RegExp(":".concat(t.parseHost?"host":"root","$"));return"string"==typeof e&&(e=Ve(e,t)),e.stylesheet.rules.forEach(function(e){"rule"===e.type&&e.selectors.some(function(e){return n.test(e)})&&e.declarations.forEach(function(e,n){var i=e.property,r=e.value;i&&0===i.indexOf("--")&&(t.store[i]=r)})}),t.store}function ze(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,i={charset:function(e){return"@charset "+e.name+";"},comment:function(e){return 0===e.comment.indexOf("__CSSVARSPONYFILL")?"/*"+e.comment+"*/":""},"custom-media":function(e){return"@custom-media "+e.name+" "+e.media+";"},declaration:function(e){return e.property+":"+e.value+";"},document:function(e){return"@"+(e.vendor||"")+"document "+e.document+"{"+r(e.rules)+"}"},"font-face":function(e){return"@font-face{"+r(e.declarations)+"}"},host:function(e){return"@host{"+r(e.rules)+"}"},import:function(e){return"@import "+e.name+";"},keyframe:function(e){return e.values.join(",")+"{"+r(e.declarations)+"}"},keyframes:function(e){return"@"+(e.vendor||"")+"keyframes "+e.name+"{"+r(e.keyframes)+"}"},media:function(e){return"@media "+e.media+"{"+r(e.rules)+"}"},namespace:function(e){return"@namespace "+e.name+";"},page:function(e){return"@page "+(e.selectors.length?e.selectors.join(", "):"")+"{"+r(e.declarations)+"}"},"page-margin-box":function(e){return"@"+e.name+"{"+r(e.declarations)+"}"},rule:function(e){var t=e.declarations;if(t.length)return e.selectors.join(",")+"{"+r(t)+"}"},supports:function(e){return"@supports "+e.supports+"{"+r(e.rules)+"}"}};function r(e){for(var r="",a=0;a<e.length;a++){var o=e[a];n&&n(o);var s=i[o.type](o);s&&(r+=s,s.length&&o.selectors&&(r+=t))}return r}return r(e.stylesheet.rules)}function Ke(e,t){e.rules.forEach(function(n){n.rules?Ke(n,t):n.keyframes?n.keyframes.forEach(function(e){"keyframe"===e.type&&t(e.declarations,n)}):n.declarations&&t(n.declarations,e)})}function We(e){var t=Re({},{preserveStatic:!0,preserveVars:!1,variables:{},onWarning:function(){}},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{});return"string"==typeof e&&(e=Ve(e,t)),Ke(e.stylesheet,function(e,n){for(var i=0;i<e.length;i++){var r=e[i],a=r.type,o=r.property,s=r.value;if("declaration"===a)if(t.preserveVars||!o||0!==o.indexOf("--")){if(-1!==s.indexOf("var(")){var l=qe(s,t);l!==r.value&&(l=Ge(l),t.preserveVars?(e.splice(i,0,{type:a,property:o,value:l}),i++):r.value=l)}}else e.splice(i,1),i--}}),ze(e)}function Ge(e){return(e.match(/calc\(([^)]+)\)/g)||[]).forEach(function(t){var n="calc".concat(t.split("calc").join(""));e=e.replace(t,n)}),e}function qe(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;if(-1===e.indexOf("var("))return e;var i=Fe("(",")",e);return i?"var"===i.pre.slice(-3)?0===i.body.trim().length?(t.onWarning("var() must contain a non-whitespace string"),e):i.pre.slice(0,-3)+function(e){var i=e.split(",")[0].replace(/[\s\n\t]/g,""),r=(e.match(/(?:\s*,\s*){1}(.*)?/)||[])[1],a=Object.prototype.hasOwnProperty.call(t.variables,i)?String(t.variables[i]):void 0,o=a||(r?String(r):void 0),s=n||e;return a||t.onWarning('variable "'.concat(i,'" is undefined')),o&&"undefined"!==o&&o.length>0?qe(o,t,s):"var(".concat(s,")")}(i.body)+qe(i.post,t):i.pre+"(".concat(qe(i.body,t),")")+qe(i.post,t):(-1!==e.indexOf("var(")&&t.onWarning('missing closing ")" in the value "'.concat(e,'"')),e)}Ue.range=je;var Ye="undefined"!=typeof window,Qe=Ye&&window.CSS&&window.CSS.supports&&window.CSS.supports("(--a: 0)"),Xe={group:0,job:0},Ze={rootElement:Ye?document:null,shadowDOM:!1,include:"style,link[rel=stylesheet]",exclude:"",variables:{},onlyLegacy:!0,preserveStatic:!0,preserveVars:!1,silent:!1,updateDOM:!0,updateURLs:!0,watch:null,onBeforeSend:function(){},onError:function(){},onWarning:function(){},onSuccess:function(){},onComplete:function(){},onFinally:function(){}},Je={cssComments:/\/\*[\s\S]+?\*\//g,cssKeyframes:/@(?:-\w*-)?keyframes/,cssMediaQueries:/@media[^{]+\{([\s\S]+?})\s*}/g,cssUrls:/url\((?!['"]?(?:data|http|\/\/):)['"]?([^'")]*)['"]?\)/g,cssVarDeclRules:/(?::(?:root|host)(?![.:#(])[\s,]*[^{]*{\s*[^}]*})/g,cssVarDecls:/(?:[\s;]*)(-{2}\w[\w-]*)(?:\s*:\s*)([^;]*);/g,cssVarFunc:/var\(\s*--[\w-]/,cssVars:/(?:(?::(?:root|host)(?![.:#(])[\s,]*[^{]*{\s*[^;]*;*\s*)|(?:var\(\s*))(--[^:)]+)(?:\s*[:)])/},$e={dom:{},job:{},user:{}},et=!1,tt=null,nt=0,it=null,rt=!1;function at(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t="cssVars(): ",n=Re({},Ze,e);function i(e,i,r,a){!n.silent&&window.console&&console.error("".concat(t).concat(e,"\n"),i),n.onError(e,i,r,a)}function r(e){!n.silent&&window.console&&console.warn("".concat(t).concat(e)),n.onWarning(e)}function a(e){n.onFinally(Boolean(e),Qe,st()-n.__benchmark)}if(Ye){if(n.watch)return n.watch=Ze.watch,function(e){function t(e){var t=n(e)&&e.hasAttribute("disabled"),i=(e.sheet||{}).disabled;return t||i}
2function n(e){return"link"===e.nodeName.toLowerCase()&&-1!==(e.getAttribute("rel")||"").indexOf("stylesheet")}function i(e){return"style"===e.nodeName.toLowerCase()}function r(i){var r=!1;if("attributes"===i.type&&n(i.target)&&!t(i.target)){var a="disabled"===i.attributeName,o="href"===i.attributeName,s="skip"===i.target.getAttribute("data-cssvars"),l="src"===i.target.getAttribute("data-cssvars");a?r=!s&&!l:o&&(s?i.target.setAttribute("data-cssvars",""):l&<(e.rootElement,!0),r=!0)}return r}function a(e){var r=!1;return"childList"===e.type&&(r=[].slice.call(e.addedNodes).some(function(e){var r=1===e.nodeType&&e.hasAttribute("data-cssvars"),a=i(e)&&Je.cssVars.test(e.textContent);return!r&&(n(e)||a)&&!t(e)})),r}function o(t){var n=!1;return"childList"===t.type&&(n=[].slice.call(t.removedNodes).some(function(t){var n=1===t.nodeType,i=n&&"out"===t.getAttribute("data-cssvars"),r=n&&"src"===t.getAttribute("data-cssvars"),a=r;if(r||i){var o=t.getAttribute("data-cssvars-group"),s=e.rootElement.querySelector('[data-cssvars-group="'.concat(o,'"]'));r&<(e.rootElement,!0),s&&s.parentNode.removeChild(s)}return a})),n}window.MutationObserver&&(tt&&(tt.disconnect(),tt=null),tt=new MutationObserver(function(t){t.some(function(e){return r(e)||function(e){var t=!1;if("childList"===e.type){var n=i(e.target),r="out"===e.target.getAttribute("data-cssvars");t=n&&!r}return t}(e)||a(e)||o(e)})&&at(e)}),tt.observe(document.documentElement,{attributes:!0,attributeFilter:["disabled","href"],childList:!0,subtree:!0}))}(n),void at(n);if(!1===n.watch&&tt&&(tt.disconnect(),tt=null),!n.__benchmark){if(et===n.rootElement)return void function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;clearTimeout(it),it=setTimeout(function(){e.__benchmark=null,at(e)},t)}(e);var o=[].slice.call(n.rootElement.querySelectorAll('[data-cssvars]:not([data-cssvars="out"])'));n.__benchmark=st(),n.exclude=[tt?'[data-cssvars]:not([data-cssvars=""])':'[data-cssvars="out"]',"link[disabled]:not([data-cssvars])",n.exclude].filter(function(e){return e}).join(","),n.variables=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=/^-{2}/;return Object.keys(e).reduce(function(n,i){return n[t.test(i)?i:"--".concat(i.replace(/^-+/,""))]=e[i],n},{})}(n.variables),o.forEach(function(e){var t="style"===e.nodeName.toLowerCase()&&e.__cssVars.text,n=t&&e.textContent!==e.__cssVars.text;t&&n&&(e.sheet&&(e.sheet.disabled=!1),e.setAttribute("data-cssvars",""))}),tt||([].slice.call(n.rootElement.querySelectorAll('[data-cssvars="out"]')).forEach(function(e){var t=e.getAttribute("data-cssvars-group");t&&n.rootElement.querySelector('[data-cssvars="src"][data-cssvars-group="'.concat(t,'"]'))||e.parentNode.removeChild(e)}),nt&&o.length<nt&&(nt=o.length,$e.dom={}))}if("loading"!==document.readyState)if(Qe&&n.onlyLegacy){var s=!1;if(n.updateDOM){var l=n.rootElement.host||(n.rootElement===document?document.documentElement:n.rootElement);Object.keys(n.variables).forEach(function(e){var t=n.variables[e];s=s||t!==getComputedStyle(l).getPropertyValue(e),l.style.setProperty(e,t)})}a(s)}else!rt&&(n.shadowDOM||n.rootElement.shadowRoot||n.rootElement.host)?Le({rootElement:Ze.rootElement,include:Ze.include,exclude:n.exclude,skipDisabled:!1,onSuccess:function(e,t,n){return!((t.sheet||{}).disabled&&!t.__cssVars)&&((e=((e=e.replace(Je.cssComments,"").replace(Je.cssMediaQueries,"")).match(Je.cssVarDeclRules)||[]).join(""))||!1)},onComplete:function(e,t,i){He(e,{store:$e.dom,onWarning:r}),rt=!0,at(n)}}):(et=n.rootElement,Le({rootElement:n.rootElement,include:n.include,exclude:n.exclude,skipDisabled:!1,onBeforeSend:n.onBeforeSend,onError:function(e,t,n){var r=e.responseURL||ot(n,location.href),a=e.statusText?"(".concat(e.statusText,")"):"Unspecified Error"+(0===e.status?" (possibly CORS related)":"");i("CSS XHR Error: ".concat(r," ").concat(e.status," ").concat(a),t,e,r)},onSuccess:function(e,t,i){if((t.sheet||{}).disabled&&!t.__cssVars)return!1;var r="link"===t.nodeName.toLowerCase(),a="style"===t.nodeName.toLowerCase()&&e!==t.textContent,o=n.onSuccess(e,t,i);return e=void 0!==o&&!1===Boolean(o)?"":o||e,n.updateURLs&&(r||a)&&(e=function(e,t){return(e.replace(Je.cssComments,"").match(Je.cssUrls)||[]).forEac
2h(function(n){var i=n.replace(Je.cssUrls,"$1"),r=ot(i,t);e=e.replace(n,n.replace(i,r))}),e}(e,i)),e},onComplete:function(e,t){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],s=Re({},$e.dom,$e.user);if($e.job={},o.forEach(function(e,a){var o=t[a];if(e.__cssVars=e.__cssVars||{},e.__cssVars.text=o,Je.cssVars.test(o))try{var s=Ve(o,{preserveStatic:n.preserveStatic,removeComments:!0});He(s,{parseHost:Boolean(n.rootElement.host),store:$e.dom,onWarning:r}),e.__cssVars.tree=s}catch(t){i(t.message,e)}}),Re($e.job,$e.dom),n.updateDOM?(Re($e.user,n.variables),Re($e.job,$e.user)):(Re($e.job,$e.user,n.variables),Re(s,n.variables)),Xe.job>0&&Boolean(Object.keys($e.job).length>Object.keys(s).length||Boolean(Object.keys(s).length&&Object.keys($e.job).some(function(e){return $e.job[e]!==s[e]}))))lt(n.rootElement),at(n);else{var l=[],c=[],u=!1;if(n.updateDOM&&Xe.job++,o.forEach(function(e,a){var o=!e.__cssVars.tree;if(e.__cssVars.tree)try{We(e.__cssVars.tree,Re({},n,{variables:$e.job,onWarning:r}));var s=ze(e.__cssVars.tree);if(n.updateDOM){var d=t[a],h=Je.cssVarFunc.test(d);if(e.getAttribute("data-cssvars")||e.setAttribute("data-cssvars","src"),s.length&&h){var f=e.getAttribute("data-cssvars-group")||++Xe.group,p=s.replace(/\s/g,""),m=n.rootElement.querySelector('[data-cssvars="out"][data-cssvars-group="'.concat(f,'"]'))||document.createElement("style");u=u||Je.cssKeyframes.test(s),n.preserveStatic&&e.sheet&&(e.sheet.disabled=!0),m.hasAttribute("data-cssvars")||m.setAttribute("data-cssvars","out"),p===e.textContent.replace(/\s/g,"")?(o=!0,m&&m.parentNode&&(e.removeAttribute("data-cssvars-group"),m.parentNode.removeChild(m))):p!==m.textContent.replace(/\s/g,"")&&([e,m].forEach(function(e){e.setAttribute("data-cssvars-job",Xe.job),e.setAttribute("data-cssvars-group",f)}),m.textContent=s,l.push(s),c.push(m),m.parentNode||e.parentNode.insertBefore(m,e.nextSibling))}}else e.textContent.replace(/\s/g,"")!==s&&l.push(s)}catch(t){i(t.message,e)}o&&e.setAttribute("data-cssvars","skip"),e.hasAttribute("data-cssvars-job")||e.setAttribute("data-cssvars-job",Xe.job)}),nt=n.rootElement.querySelectorAll('[data-cssvars]:not([data-cssvars="out"])').length,n.shadowDOM)for(var d,h=[].concat(n.rootElement).concat([].slice.call(n.rootElement.querySelectorAll("*"))),f=0;d=h[f];++f)d.shadowRoot&&d.shadowRoot.querySelector("style")&&at(Re({},n,{rootElement:d.shadowRoot}));n.updateDOM&&u&&function(e){var t=["animation-name","-moz-animation-name","-webkit-animation-name"].filter(function(e){return getComputedStyle(document.body)[e]})[0];if(t){for(var n=[].slice.call(e.querySelectorAll("*")),i=[],r="__CSSVARSPONYFILL-KEYFRAMES__",a=0,o=n.length;a<o;a++){var s=n[a];"none"!==getComputedStyle(s)[t]&&(s.style[t]+=r,i.push(s))}for(var l=0,c=i.length;l<c;l++){var u=i[l].style;u[t]=u[t].replace(r,"")}}}(n.rootElement),et=!1,n.onComplete(l.join(""),c,JSON.parse(JSON.stringify($e.job)),st()-n.__benchmark),a(c.length)}}}));else document.addEventListener("DOMContentLoaded",function t(n){at(e),document.removeEventListener("DOMContentLoaded",t)})}}function ot(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:location.href,n=document.implementation.createHTMLDocument(""),i=n.createElement("base"),r=n.createElement("a");return n.head.appendChild(i),n.body.appendChild(r),i.href=t,r.href=e,r.href}function st(){return Ye&&(window.performance||{}).now?window.performance.now():(new Date).getTime()}function lt(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];[].slice.call(e.querySelectorAll('[data-cssvars="skip"],[data-cssvars="src"]')).forEach(function(e){return e.setAttribute("data-cssvars","")}),t&&($e.dom={})}function ct(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},n.exports),n.exports}at.reset=function(){for(var e in Xe.job=0,Xe.group=0,et=!1,tt&&(tt.disconnect(),tt=null),nt=0,it=null,rt=!1,$e)$e[e]={}},"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self&&self,ct(function(e,t){!function(){function e(e){var t=!0,n=!1,i=null,r={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function a(e){return!!(e&&e!==document&&"HTML"!==e.nodeName&&"BODY"!==e.n
2odeName&&"classList"in e&&"contains"in e.classList)}function o(e){e.classList.contains("focus-visible")||(e.classList.add("focus-visible"),e.setAttribute("data-focus-visible-added",""))}function s(e){t=!1}function l(){document.addEventListener("mousemove",c),document.addEventListener("mousedown",c),document.addEventListener("mouseup",c),document.addEventListener("pointermove",c),document.addEventListener("pointerdown",c),document.addEventListener("pointerup",c),document.addEventListener("touchmove",c),document.addEventListener("touchstart",c),document.addEventListener("touchend",c)}function c(e){e.target.nodeName&&"html"===e.target.nodeName.toLowerCase()||(t=!1,document.removeEventListener("mousemove",c),document.removeEventListener("mousedown",c),document.removeEventListener("mouseup",c),document.removeEventListener("pointermove",c),document.removeEventListener("pointerdown",c),document.removeEventListener("pointerup",c),document.removeEventListener("touchmove",c),document.removeEventListener("touchstart",c),document.removeEventListener("touchend",c))}document.addEventListener("keydown",function(n){n.metaKey||n.altKey||n.ctrlKey||(a(e.activeElement)&&o(e.activeElement),t=!0)},!0),document.addEventListener("mousedown",s,!0),document.addEventListener("pointerdown",s,!0),document.addEventListener("touchstart",s,!0),document.addEventListener("visibilitychange",function(e){"hidden"===document.visibilityState&&(n&&(t=!0),l())},!0),l(),e.addEventListener("focus",function(e){a(e.target)&&(t||function(e){var t=e.type,n=e.tagName;return!("INPUT"!==n||!r[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}(e.target))&&o(e.target)},!0),e.addEventListener("blur",function(e){a(e.target)&&(e.target.classList.contains("focus-visible")||e.target.hasAttribute("data-focus-visible-added"))&&(n=!0,window.clearTimeout(i),i=window.setTimeout(function(){n=!1},100),function(e){e.hasAttribute("data-focus-visible-added")&&(e.classList.remove("focus-visible"),e.removeAttribute("data-focus-visible-added"))}(e.target))},!0),e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.host?e.host.setAttribute("data-js-focus-visible",""):e.nodeType===Node.DOCUMENT_NODE&&(document.documentElement.classList.add("js-focus-visible"),document.documentElement.setAttribute("data-js-focus-visible",""))}if("undefined"!=typeof window&&"undefined"!=typeof document){var t;window.applyFocusVisiblePolyfill=e;try{t=new CustomEvent("focus-visible-polyfill-ready")}catch(e){(t=document.createEvent("CustomEvent")).initCustomEvent("focus-visible-polyfill-ready",!1,!1,{})}window.dispatchEvent(t)}"undefined"!=typeof document&&e(document)}()});var ut,dt,ht,ft,pt,mt,gt,vt,yt,bt,At,Et,Tt,wt,St,Ct,kt,xt,Nt=ct(function(e){function t(e){var i=n(e);return function(e){return"#document-fragment"===e.nodeName&&"ShadowRoot"===e.constructor.name}(i)?t(i.host):i}function n(e){return null!=e.parentNode?n(e.parentNode):e}e.exports&&(e.exports=function(e){return"object"==typeof e&&Boolean(e.composed)?t(this):n(this)})});function _t(e){return Mt(e)?[]:e.split(",").map(e=>e.trim())}function It(e,t){const n=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;(null==e||isNaN(e))&&(e=0);const t=Ft(e,3600).split(":");return{hours:parseInt(t[0]),minutes:parseInt(t[1]),seconds:parseInt(t[2])}}(e),i=n.hours>0;let r="";return i&&(r+="".concat(n.hours," ").concat(t[St.HOURS]," ")),(n.minutes>0||i)&&(r+="".concat(n.minutes," ").concat(t[St.MINUTES]," ")),r+="".concat(n.seconds," ").concat(t[St.SECONDS]),r}function Ot(e){const t=null==e,n=!t&&e.targetTouches&&e.targetTouches.length,i=t||!("pageX"in e)?null:e.pageX,r=t||!("pageY"in e)?null:e.pageY;if((null===i||null===r)&&!n)return{x:null,y:null};const a=window.scrollX,o=window.scrollY;if(n)return{x:e.targetTouches[0].pageX-a,y:e.targetTouches[0].pageY-o};const s=null!=a&&!isNaN(a),l=null!=o&&!isNaN(o);return{x:i-(s?a:window.pageXOffset),y:r-(l?o:window.pageYOffset)}}function Dt(e){return"".concat((t=100*e,Math.round(t*Math.pow(10,2))/Math.pow(10,2)),"%");var t}function Rt(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&e.stopPropagation(),e.preventDefault()}function Pt(e){const t=e.split("-").shift().slice(0,2).toUpperCase();return kt[t]}function Lt(e,t){let n;const i=()=>{clearTimeout(n),n=null},r=function(){i();for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];n=setTimeout(e,t,...a)};return r.cancel=i,r.flush=e,r.pending=()=>null!=n,r}function Mt(e){return null==e||void 0===e||""===e}function Ft(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:61;if(null==e||isNaN(e))return"00:00";let n=Ut((e|=0)%60);return n=Ut((e=e/60|0)%60)+":"+n,(e=e/60|0)>0&&(n=Ut(e)+":"+n),t>=3600&&5===n.length&&(n="00:"+n),n}function Ut(e){return e<10?"0"+e:e.toString()}function Bt(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return(e-t)*((arguments.length>4&&void 0!==arguments[4]?arguments[4]:1)-i)/(n-t)+i}function jt(e,t,n){return Math.max(t,Math.min(n,e))}Object.prototype.hasOwnProperty.call(Node.prototype,"getRootNode")||Object.defineProperty(Node.prototype,"getRootNode",{enumerable:!1,
2configurable:!1,value:Nt}),(dt=ut||(ut={})).PLAY="play",dt.PAUSE="pause",dt.STOP="stop",dt.ENTER_FULLSCREEN="enterfullscreen",dt.EXIT_FULLSCREEN="exitfullscreen",dt.MUTE="mute",dt.UNMUTE="unmute",dt.TEXT_ON="texton",dt.TEXT_OFF="textoff",dt.GO_TO_LIVE="gotolive",dt.MENU_ITEM_SELECT="menuitemselect",dt.LIST_ITEM_SELECT="listitemselect",dt.NONE="none",dt.SEEK="seek",dt.SEEK_FORWARD="seekforward",dt.SEEK_BACK="seekback",dt.VOLUME="volume",dt.PREVIEW="preview",dt.SETTINGS_ON="settingson",dt.SETTINGS_OFF="settingsoff",dt.LANGUAGE_SELECT="languageselect",dt.QUALITY_SELECT="qualityselect",dt.POSTER_PLAY="posterplay",dt.PANEL_BACK="panelback",dt.PANEL_CLOSE="panelclose",dt.LOCK_ACTIVE="lockactive",dt.ENTER_CONTEXT="entercontext",dt.EXIT_CONTEXT="exitcontext",(ft=ht||(ht={})).TV="auitv",ft.UI="auiui",ft.BUTTON="auibutton",ft.SLIDER="auislider",ft.SLIDER_ENGAGED="auisliderengaged",ft.SEEK="auiseek",ft.PANEL="auipanel",ft.MENU="auimenu",ft.PREVIEW_SLIDER_ENGAGED="auipreviewsliderengaged",(mt=pt||(pt={})).AUTO="auto",mt.MANUAL="manual",(vt=gt||(gt={})).MUTE="mute",vt.PLAY="play",vt.FULLSCREEN="fullscreen",vt.TEXT="text",vt.PLAY_OVERLAY="playOverlay",vt.SETTINGS="settings",vt.VOLUME="volume",(bt=yt||(yt={})).NONE="none",bt.AD="ad",bt.CONTENT="content",bt.COMPACT="compact",(Et=At||(At={})).HIDDEN="avia-ui-hidden",Et.ACC_VOL_ON="avia-volume-on",Et.ACC_VOL_OFF="avia-volume-off",Et.SEGMENT_MARKER="avia-segment-marker",Et.INDICATOR_ACTIVE="avia-indicator-active",Et.ACC_VOL="avia-acc-vol",Et.ACC_VOL_METER="avia-acc-vol-meter",Et.ACC_VOL_OVERLAY="avia-vol-meter-overlay",Et.ACC_FWD="avia-acc-fwd",Et.ACC_BACK="avia-acc-back",Et.ACC_ARROW="avia-acc-arrow",Et.UNMUTE_CTA="avia-unmute-cta",Et.CONTROLS_VISIBLE="avia-controls-vis",Et.SPINNER_ACTIVE="avia-spinner",Et.SPINNER_IDLE="avia-spinner-idle",Et.SETTINGS_NUDGE_LEFT="avia-settings-nudge-left",(wt=Tt||(Tt={})).AUTO="auto",wt.TV="tv",wt.DESKTOP="desktop",wt.MOBILE="mobile",(Ct=St||(St={})).PLAY="play",Ct.PAUSE="pause",Ct.STOP="stop",Ct.MUTE="mute",Ct.UNMUTE="unmute",Ct.VOLUME="volume",Ct.CLICK_TO_UNMUTE="click-to-unmute",Ct.TAP_TO_UNMUTE="tap-to-unmute",Ct.LIVE="live",Ct.GO_LIVE="go-live",Ct.SEEK="seek",Ct.SEEK_BACK="seek-back",Ct.SEEK_FORWARD="seek-forward",Ct.CLOSED_CAPTIONS_OFF="closed-captions-off",Ct.CLOSED_CAPTIONS_ON="closed-captions-on",Ct.FULL_SCREEN_ENTER="full-screen-enter",Ct.FULL_SCREEN_EXIT="full-screen-exit",Ct.HOURS="hours",Ct.MINUTES="minutes",Ct.SECONDS="seconds",Ct.VALUE_OF_TOTAL="value-of-total",Ct.UNMUTE_CTA="unmute-cta",Ct.SETTINGS="settings",Ct.LANGUAGE="language",Ct.QUALITY="quality",Ct.BACK="back",Ct.CAPTIONS="captions",Ct.AUDIO="audio",Ct.CLOSE="close",Ct.AUTO="auto",Ct.UNKNOWN="unknown",(xt=kt||(kt={})).AB="Abkhaz",xt.AE="Avesta",xt.AF="Afrikaans",xt.AK="Akan",xt.AM="á ááá",xt.AN="Aragonés",xt.AR="Ø§ÙØ¹Ø±Ø¨ÙØ©",xt.AV="AÐ²Ð°Ñ Ð¼Ð°ÑÓ",xt.AY="Aymar aru",xt.AZ="azÉrbaycan dili",xt.BA="баÑҡоÑÑ Ñеле",xt.BE="белаÑÑÑÐºÐ°Ñ Ð¼Ð¾Ð²Ð°",xt.BG="бÑлгаÑÑки език",xt.BH="à¤à¥à¤à¤ªà¥à¤°à¥",xt.BI="Bislama",xt.BM="Bamanankan",xt.BN="বাà¦à¦²à¦¾",xt.BO="à½à½¼à½à¼à½¡à½²à½",xt.BR="Brezhoneg",xt.BS="Bosanski jezik",xt.CA="català ",xt.CE="ноÑ
Ñийн моÑÑ",xt.CH="Chamoru",xt.CO="Corsu",xt.CR="áá¦ááááá£",xt.CS="ÄeÅ¡tina",xt.CU="ѩзÑÐºÑ ÑловѣнÑÑкÑ",xt.CV="ÑÓÐ²Ð°Ñ ÑÓлÑ
и",xt.CY="Cymraeg",xt.DA="Dansk",xt.DE="Deutsch",xt.DZ="རྫོà½à¼à½",xt.EE="EÊegbe",xt.EL="ελληνικά",xt.EN="English",xt.EO="Esperanto",xt.ES="Español",xt.ET="Eesti",xt.EU="Euskara",xt.FA="ÙØ§Ø±Ø³Û",xt.FF="Fulfulde",xt.FI="Suomi",xt.FJ="Vosa Vakaviti",xt.FO="Føroyskt",xt.FR="Français",xt.FY="Frysk",xt.GA="Gaeilge",xt.GD="Gà idhlig",xt.GL="Galego",xt.GN="Avañe'ẽ",xt.GU="àªà«àªàª°àª¾àª¤à«",xt.GV="Gaelg",xt.HA="(Hausa) ÙÙÙÙØ³Ù",xt.HE="×¢×ר×ת",xt.HI="हिनà¥à¤¦à¥",xt.HO="Hiri Motu",xt.HR="hrvatski jezik",xt.HT="Kreyòl ayisyen",xt.HU="Magyar",xt.HY="ÕÕ¡ÕµÕ¥ÖÕ¥Õ¶",xt.HZ="Otjiherero",xt.IA="Interlingua",xt.ID="Bahasa Indonesia",xt.IE="Interlingue",xt.IG="Asụsụ Igbo",xt.II="êê ê¿ Nuosuhxop",xt.IK="Iñupiaq",xt.IO="Ido",xt.IS="Ãslenska",xt.IT="Italiano",xt.IU="áááááá¦",xt.JA="æ¥æ¬äºº",xt.JV="Basa Jawa",xt.KA="á¥áá áá£áá",xt.KG="Kikongo",xt.KI="GÄ©kÅ©yÅ©",xt.KJ="Kuanyama",xt.KK="ÒÐ°Ð·Ð°Ò ÑÑлÑ",xt.KL="kalaallisut",xt.KM="ááááá",xt.KN="à²à²¨à³à²¨à²¡",xt.KO="íêµì´",xt.KR="Kanuri",xt.KS="à¤à¤¶à¥à¤®à¥à¤°à¥,",xt.KU="Kurdî",xt.KV="коми кÑв",xt.KW="Kernewek",xt.KY="ÐÑÑгÑзÑа",xt.LA="Latine",xt.LB="Lëtzebuergesch",xt.LG="Luganda",xt.LI="Limburgs",xt.LN="Lingála",xt.LO="àºàº²àºªàº²àº¥àº²àº§",xt.LT="Lietuvių kalba",xt.LU="Kiluba",xt.LV="latvieÅ¡u valoda",xt.MG="fiteny malagasy",xt.MH="Kajin M̧ajeļ",xt.MI="te reo MÄori",xt.MK="македонÑки Ñазик",xt.ML="മലയാളà´",xt.MN="Ðонгол Ñ
Ñл",xt.MR="मराठà¥",xt.MS="Bahasa Melayu",xt.MT="Malti",xt.MY="ááá¬á
á¬",xt.NA="Dorerin Naoero",xt.NB="Norsk BokmÃ¥l",xt.NE="नà¥à¤ªà¤¾à¤²à¥",xt.NG="Owambo",xt.NL="Nederlands",xt.NN="Norsk Nynorsk",xt.NO="Norsk",xt.NR="IsiNdebele",xt.NV="Diné bizaad",xt.NY="ChiCheŵa",xt.OC="Occitan",xt.OJ="ááááá¯á§áá",xt.OM="Afaan Oromoo",xt.OR="à¬à¬¡à¬¼à¬¿à¬",xt.OS="иÑоÐ
2½ æвзаг",xt.PA="ਪੰà¨à¨¾à¨¬à©",xt.PI="पालि, पाळि",xt.PL="JÄzyk polski",xt.PS="Ù¾ÚØªÙ",xt.PT="Português",xt.QU="Runa Simi",xt.RM="Rumantsch Grischun",xt.RN="Ikirundi",xt.RO="RomânÄ",xt.RU="ÑÑÑÑкий",xt.RW="Ikinyarwanda",xt.SA="सà¤à¤¸à¥à¤à¥à¤¤à¤®à¥",xt.SC="sardu",xt.SD="सिनà¥à¤§à¥",xt.SE="Davvisámegiella",xt.SG="Yângâ tî sängö",xt.SI="à·à·à¶à·à¶½",xt.SK="SlovenÄina",xt.SL="Slovenski jezik",xt.SM="Gagana fa'a Samoa",xt.SN="chiShona",xt.SO="Soomaaliga",xt.SQ="Shqip",xt.SR="ÑÑпÑки Ñезик",xt.SS="SiSwati",xt.ST="Sesotho",xt.SU="Basa Sunda",xt.SV="Svenska",xt.SW="Kiswahili",xt.TA="தமிழà¯",xt.TE="à°¤à±à°²à±à°à±",xt.TG="Ñоҷикӣ",xt.TH="à¹à¸à¸¢",xt.TI="áµááá",xt.TK="Türkmen",xt.TL="Wikang Tagalog",xt.TN="Setswana",xt.TO="Faka Tonga",xt.TR="Türkçe",xt.TS="Xitsonga",xt.TT="ÑаÑÐ°Ñ Ñеле",xt.TW="Twi",xt.TY="Reo Tahiti",xt.UG="ئÛÙØºÛرÚÛ",xt.UK="УкÑаÑнÑÑка",xt.UR="اردÙ",xt.UZ="OÊ»zbek",xt.VE="Tshivená¸a",xt.VI="Tiếng Viá»t",xt.VO="Volapük",xt.WA="Walon",xt.WO="Wollof",xt.XH="IsiXhosa",xt.YI="××Ö´××ש",xt.YO="Yorùbá",xt.ZA="Saɯ cueÅÆ
",xt.ZH="䏿 (ZhÅngwén)",xt.ZU="IsiZulu";const Vt={DEFAULT:e=>Ft(e.contentTime),UTC_TIME:e=>new Date(e.liveStreamUtcTime).toTimeString().split(" ")[0]};var Ht,zt,Kt,Wt,Gt,qt,Yt,Qt;(zt=Ht||(Ht={})).CURSOR="cursor",zt.VALUE="value",(Wt=Kt||(Kt={})).PREVIEW="preview",Wt.POSTER_PLAY="posterplay";class Xt{constructor(e){this.debug=!1,this.logFmt="color: #fcf; font-style: italic;",this.id=e,this.player=null,this.services=null,this.options=null,this.onPlayerEvent=this.onPlayerEvent.bind(this)}getId(){return this.id}destroy(){this.listenToPlayer(!1,this.getEventInterests()),this.player=null,this.options=null,this.services=null,this.avia=null}onPlayerEvent(e){}getEventInterests(){return[]}sendEvent(e){this.services.event.dispatchPluginEvent(e)}listenToPlayer(e,t){const n=!1!==e?"on":"off";t.forEach(e=>this.player[n](e,this.onPlayerEvent))}log(e){this.services.logger.debug(e)}onRegister(e,t,n){return p(this,null,function*(){this.player=e,this.services=n,this.options=t||{},this.avia=n.avia,this.debug=!0===t.debug,yield this.initialize(),this.listenToPlayer(!0,this.getEventInterests()),this.log("Registered ".concat(this.id))})}initialize(){return p(this,null,function*(){})}}(qt=Gt||(Gt={})).LEFT="left",qt.RIGHT="right",qt.UP="up",qt.DOWN="down",qt.ENTER="enter",qt.UNSPECIFIED="*",(Qt=Yt||(Yt={})).VERTICAL="vertical",Qt.HORIZONTAL="horizontal";var Zt={4:Gt.LEFT,21:Gt.LEFT,37:Gt.LEFT,214:Gt.LEFT,205:Gt.LEFT,218:Gt.LEFT,5:Gt.RIGHT,22:Gt.RIGHT,39:Gt.RIGHT,213:Gt.RIGHT,206:Gt.RIGHT,217:Gt.RIGHT,29460:Gt.UP,19:Gt.UP,38:Gt.UP,211:Gt.UP,203:Gt.UP,215:Gt.UP,29461:Gt.DOWN,20:Gt.DOWN,40:Gt.DOWN,212:Gt.DOWN,204:Gt.DOWN,216:Gt.DOWN,29443:Gt.ENTER,13:Gt.ENTER,67:Gt.ENTER,32:Gt.ENTER,23:Gt.ENTER,195:Gt.ENTER},Jt=function(e){return!!e&&(null!=e.isFocusable?e.isFocusable:!!e.selectAction)},$t=function(e,t){if(!e||!t)return!1;var n=an(e),i=on(t);return i===Gt.UNSPECIFIED||n===Yt.VERTICAL&&(i===Gt.UP||i===Gt.DOWN)||n===Yt.HORIZONTAL&&(i===Gt.LEFT||i===Gt.RIGHT)},en=function(e,t){if(e&&e.children)for(var n=0;n<e.children.length;n++){var i=e.children[n];if(i.indexRange&&i.indexRange[0]<=t&&i.indexRange[1]>=t)return i}},tn=function(e,t,n){if(e&&e.children){if(n&&e.activeChild&&e.activeChild.index>=n[0]&&e.activeChild.index<=n[1]&&Jt(e.activeChild))return e.activeChild;for(var i,r,a=[],o=0;o<e.children.length;o++)(Jt(e.children[o])||e.children[o].children)&&a.push(o);if(!(a.length<=0))return e.children[i=a,r=t,i.reduce(function(e,t){return Math.abs(t-r)<Math.abs(e-r)?t:e})]}},nn=function(e,t){if(e&&t)if(e.children||(e.children=[]),t.parent=e,"number"!=typeof t.index||t.index>e.children.length)t.index=e.children.length,e.children.push(t);else{e.children.splice(t.index,0,t);for(var n=t.index+1;n<e.children.length;n++)e.children[n].index=n}},rn=function(e,t){if(t&&e&&e.children){for(var n=-1,i=0;i<e.children.length;i++)e.children[i]===t?n=i:-1!==n&&(e.children[i].index=i-1);-1!==n&&(1===e.children.length?e.children=void 0:e.children.splice(n,1))}},an=function(e){if(e)for(var t=0,n=Object.keys(Yt);t<n.length;t++){var i=n[t];if(Yt[i]===e.toLowerCase())return Yt[i]}},on=function(e){if(e)for(var t=0,n=Object.keys(Gt);t<n.length;t++){var i=n[t];if(Gt[i]===e.toLowerCase())return Gt[i]}},sn=function(e,t){for(var n,i=[e],r=Object.create(null);i.length>0;){if(n=i.pop(),t.call(r,n))return;if(n.children)for(var a=n.children.length-1;a>=0;a--)i.push(n.children[a])}};function ln(e){return e=e||Object.create(null),{on:function(t,n){(e[t]||(e[t]=[])).push(n)},off:function(t,n){e[t]&&e[t].splice(e[t].indexOf(n)>>>0,1)},emit:function(t,n){(e[t]||[]).slice().map(function(e){e(n)}),(e["*"]||[]).slice().map(function(e){e(t,n)})}}}var cn,un,dn=function(){function e(){this.nodes={},this.rootNode=void 0,this.currentFocusNode=void 0,this.isIndexAlignMode=!1,this.emitter=ln()}return e.prototype.on=function(e,t){this.emitter.on(e,t)},e.prototype.off=function(e,t){this.emitter.off(e,t)},e.prototype.getRootNode=function(){if(!this.rootNode)throw new Error("no root node");return this.rootNode},e.prototype.getCurrentFocusNode=function(){return this.currentFocusNode},e.prototype.registerNode=function(e,t){var n;if(void 0===t&&(t={}),this.getNode(e))throw Error("Node with an ID of "+e+" has already been registered");var i=function(e,t){if(void 0===t&&(t={}),!e)throw Error("Node ID has to be defined");return{id:e,parent:void 0,children:void 0,activeChild:void 0,overrides:void 0,overrideSources:void 0,index:"number"==typeof t.index?t.index:void 0,orientation:t.orientation,indexRange:t.indexRange,selectAction:t.selectAction,isFocusable:t.is
2Focusable,isWrapping:t.isWrapping,isStopPropagate:t.isStopPropagate,isIndexAlign:t.isIndexAlign,onLeave:t.onLeave,onEnter:t.onEnter,shouldCancelLeave:t.shouldCancelLeave,onLeaveCancelled:t.onLeaveCancelled,shouldCancelEnter:t.shouldCancelEnter,onEnterCancelled:t.onEnterCancelled,onSelect:t.onSelect,onInactive:t.onInactive,onActive:t.onActive,onActiveChildChange:t.onActiveChildChange,onBlur:t.onBlur,onFocus:t.onFocus,onMove:t.onMove}}(e,t);if(!this.rootNode)return this.rootNode=i,this.nodes=((n={})[e]=i,n),this;var r=t.parent?this.getNode(t.parent):this.rootNode;return r?(this.nodes[e]=i,nn(r,i),this):this},e.prototype.moveNode=function(e,t,n){if(void 0===n&&(n={maintainIndex:!1}),e="string"==typeof e?this.getNode(e):e,t="string"==typeof t?this.getNode(t):t,e&&t&&e!==this.rootNode&&e.parent!==t){var i=e.parent;rn(i,e),"number"==typeof n.index?e.index=n.index:n.maintainIndex||(e.index=void 0),nn(t,e),this.unsetActiveChild(i,e),this.isSameOrParentForChild(e,this.currentFocusNode)&&this.setActiveChildRecursive(t,e)}},e.prototype.register=function(e,t){return this.registerNode(e,t)},e.prototype.unregister=function(e,t){this.unregisterNode(e,t)},e.prototype.unregisterNode=function(e,t){var n=this;if(void 0===t&&(t={forceRefocus:!0}),!(e="string"==typeof e?this.getNode(e):e))return this;if(e===this.rootNode)return this.nodes={},this.rootNode=void 0,this.currentFocusNode=void 0,this.isIndexAlignMode=!1,this.emitter=ln(),this;var i=e.parent;i.activeChild&&i.activeChild===e&&(this.isIndexAlignMode=!1,this.unsetActiveChild(i,e)),rn(i,e);var r=!1;return sn(e,function(e){delete n.nodes[e.id],n.unregisterOverride(e);for(var t=0,i=e.overrideSources||[];t<i.length;t++)n.unregisterOverride(i[t].node,i[t].direction);e===n.currentFocusNode&&(n.currentFocusNode=void 0,r=!0)}),this.emitter.emit("blur",e),e.onBlur&&e.onBlur(e),r&&t.forceRefocus&&this.recalculateFocus(i),this},e.prototype.registerOverride=function(e,t,n,i){if(void 0===i&&(i={}),!(e="string"==typeof e?this.getNode(e):e))throw new Error("registering override: missing source node");if(!(t="string"==typeof t?this.getNode(t):t))throw new Error("registering override: missing target node");if(!(n=on(n)))throw new Error("registering override: missing direction");if(e.overrides&&e.overrides[n]){if(!i.forceOverride)throw new Error("registering override: override from "+e.id+" to "+t.id+" in direction "+n+" already exist");this.unregisterOverride(e,n)}return e.overrides=e.overrides||{},e.overrides[n]=t,t.overrideSources=t.overrideSources||[],t.overrideSources.push({direction:n,node:e}),this},e.prototype.unregisterOverride=function(e,t){if((e="string"==typeof e?this.getNode(e):e)&&e.overrides&&(!t||(t=on(t)))){for(var n=!0,i=0,r=Object.keys(Gt);i<r.length;i++){var a=r[i],o=Gt[a];if(t&&t!==o)n=n&&!(e.overrides&&e.overrides[o]);else{var s=e.overrides[o];if(s&&s.overrideSources)for(var l=0;l<s.overrideSources.length;l++)if(s.overrideSources[l].direction===o&&s.overrideSources[l].node===e){1===s.overrideSources.length?s.overrideSources=void 0:(s.overrideSources[l]=s.overrideSources[s.overrideSources.length-1],s.overrideSources.length=s.overrideSources.length-1);break}e.overrides[o]=void 0}}return n&&(e.overrides=void 0),this}},e.prototype.getNode=function(e){if(e)return this.nodes[e]},e.prototype.pickNode=function(e){var t=this.getNode(e);if(t)return this.unregisterNode(t),t},e.prototype.climbUp=function(e,t){for(;e;){if(e.overrides&&e.overrides[t])return e.overrides[t];if(e!==this.currentFocusNode)if($t(e.orientation,t)){if(this.getNextFocusableChildInDirection(e,t))return e;e=e.parent}else e=e.parent;else e=e.parent}},e.prototype.digDown=function(e,t){for(void 0===t&&(t=Gt.UNSPECIFIED);e;){if(Jt(e)&&(e.isStopPropagate||!this.doesNodeHaveFocusableChildren(e)))return e;if(this.isIndexAlignMode){var n=this.getCurrentFocusNode(),i=n.indexRange,r=i?i[0]:n.index;if(e.isIndexAlign){if(e.parent.orientation===Yt.VERTICAL){if(t===Gt.UP){e=tn(this.getNodeLastChild(e),r,i);continue}if(t===Gt.DOWN){e=tn(this.getNodeFirstChild(e),r,i);continue}}if(e.parent.orientation===Yt.HORIZONTAL){if(t===Gt.LEFT){e=this.getNodeLastChild(tn(e,n.parent.index));continue}if(t===Gt.RIGHT){e=this.getNodeFirstChild(tn(e,n.parent.index));continue}}}var a=en(e,r);if(a){e=a;continue}e=tn(e,r,i)}else e=e.activeChild?e.activeChild:this.getNextFocusableChildInDirection(e,Gt.UNSPECIFIED)}},e.prototype.getNextFocusableChildInDirection=function(e,t){if(e){var n,i=an(e.orientation),r=on(t);(r===Gt.UNSPECIFIED||i===Yt.HORIZONTAL&&r===Gt.RIGHT||i===Yt.VERTICAL&&r===Gt.DOWN)&&(n=this.getNextFocusableChild(e));var a=r===Gt.UNSPECIFIED||i===Yt.HORIZONTAL&&r===Gt.LEFT||i===Yt.VERTICAL&&r===Gt.UP;return!n&&a&&(n=this.getPrevFocusableChild(e)),n}},e.prototype.getNextFocusableChild=function(e){if(e&&e.children){if(!e.activeChild)return this.getNodeFirstFocusableChild(e);for(var t=e.activeChild.index+1;t<e.children.length;t++)if(this.isNodeFocusableCandidate(e.children[t]))return e.children[t];if(e.isWrapping)for(t=0;t<e.activeChild.index;t++)if(this.isNodeFocusableCandidate(e.children[t]))return e.children[t]}},e.prototype.getPrevFocusableChild=function(e){if(e&&e.children){if(!e.activeChild)return this.getNodeLastFocusableChild(e);for(var t=e.activeChild.index-1;t>=0;t--)if(this.isNodeFocusableCandidate(e.children[t]))return e.children[t];if(e.isWrapping)for(t=e.children.length-1;t>e.activeChild.index;t--)if(this.isNodeFocusableCandidate(e.children[t]))return e.children[t]}},e.prototype.getNodeFirstChild=function(e){if(e&&e.children)return e.children[0]},e.prototype.getNodeLastChild=function(e){if(e&&e.children)return e.children[e.children.length-1]},e.prototype.getNodeFirstFocusableChild=function(e){if(e&&e.children)for(var t=0;t<e.children.length;t++)if(this.isNodeFocusableCandidate(e.children[t]))return e.children[t]},e.prototype.getNodeLastFocusableChild=function(e){if(e&&e.children)for(var t=e.children.length-1;t>=0;t--)if(this.isNodeFocusableCandidate(e.children[t]))return e.children[t]},e.prototype.handleKeyEvent=function(e,t){if(void 0===t&&(t={forceFocus:!1}),e){var n,i=e.keyCode?(n=e.keyCode,Zt[n]):on(e.direction);if(i){var r,a,o=this.getCurrentFocusNode();if(i===Gt.ENTER)return o&&(this.emitter.emit("select",o),o.onSelect&&o.onSelect(o)),o;if(!o&&t.forceFocus)r=this.getRootNode(),a=this.getNextFocusableChildInDirection(r,Gt.UNSPECIFIED);else{if(!(r=this.climbUp(o,i)))return;this.isIndexAlignMode=!0===r.isIndexAlign;var s=this.getNextFocusableChildInDirection(r,i);a=this.digDown(s||r,i)}if(a){if(o&&o.shouldCancelLeave&&o.shouldCancelLeave(o,a))return o.onLeaveCancelled&&o.onLeaveCancelled(o,a),this.emitter.emit("cancelled",{leave:o,enter:a}),o;if(a.shouldCancelEnter&&a.shouldCancelEnter(o,a))return a.onEnterCancelled&&a.onEnterCancelled(o,a),this.emitter.emit("cancelled",{leave:o,enter:a}),o;this.assignFocus(a);var l=i===Gt.LEFT||i===Gt.UP?-1:1;return this.emitter.emit("move",{leave:o,enter:a,direction:i,offset:l}),r.onMove&&r.onMove({node:r,leave:o,enter:a,direction:i,offset:l}
2),o&&o.onLeave&&o.onLeave(o),a.onEnter&&a.onEnter(a),a}}}},e.prototype.setActiveChild=function(e,t){if(e="string"==typeof e?this.getNode(e):e,t="string"==typeof t?this.getNode(t):t,e&&t&&t.parent.id===e.id)if(e.activeChild&&e.activeChild.id!==t.id){var n=e.activeChild;e.activeChild=t,this.emitter.emit("inactive",n),n.onInactive&&n.onInactive(n),this.emitter.emit("active",t),t.onActive&&t.onActive(t),e.onActiveChildChange&&e.onActiveChildChange({node:e,leave:n,enter:t})}else e.activeChild||(e.activeChild=t,this.emitter.emit("active",t),t.onActive&&t.onActive(t),e.onActiveChildChange&&e.onActiveChildChange({node:e,leave:null,enter:t}))},e.prototype.setActiveChildRecursive=function(e,t){for(e="string"==typeof e?this.getNode(e):e,t="string"==typeof t?this.getNode(t):t;e;)this.setActiveChild(e,t),t=e,e=e.parent},e.prototype.unsetActiveChild=function(e,t){if(e="string"==typeof e?this.getNode(e):e,t="string"==typeof t?this.getNode(t):t,e&&e.activeChild&&t&&e.activeChild===t)for(var n=this.isSameOrParentForChild(t,this.currentFocusNode);e&&e.activeChild;){var i=e.activeChild===t,r=this.isSameOrParentForChild(e.activeChild,this.currentFocusNode);(n||i&&!r)&&(e.activeChild=void 0),t=e,e=e.parent}},e.prototype.assignFocus=function(e){if((e="string"==typeof e?this.getNode(e):e)&&!Jt(e)&&(e=this.digDown(e,Gt.UNSPECIFIED)),!e)throw new Error("trying to assign focus to a non focusable node");this.currentFocusNode&&(this.emitter.emit("blur",this.currentFocusNode),this.currentFocusNode.onBlur&&this.currentFocusNode.onBlur(this.currentFocusNode)),this.currentFocusNode=e,e.parent&&this.setActiveChildRecursive(e.parent,e),e.onFocus&&e.onFocus(e),this.emitter.emit("focus",e)},e.prototype.recalculateFocus=function(e){var t=this.climbUp(e,Gt.UNSPECIFIED)||this.getRootNode(),n=this.getNextFocusableChildInDirection(t,Gt.UNSPECIFIED),i=this.digDown(n||t,Gt.UNSPECIFIED);i?this.assignFocus(i):this.currentFocusNode=void 0},e.prototype.registerTree=function(e){var t=this;e&&sn(e,function(e){if(t.registerNode(e.id,e),e.children)for(var n=0;n<e.children.length;n++)e.children[n].parent=e.id})},e.prototype.insertTree=function(e,t){if(void 0===t&&(t={maintainIndex:!0}),e){var n=this.pickNode(e.id);!e.parent&&n&&n.parent&&(e.parent=n.parent.id),t.maintainIndex&&n&&"number"==typeof n.index&&(e.index=n.index),this.registerTree(e)}},e.prototype.doesNodeHaveFocusableChildren=function(e){if(!e||!e.children)return!1;var t=!1;return sn(e,function(n){return n!==e&&(t=t||Jt(n)),t}),t},e.prototype.isNodeFocusableCandidate=function(e){return Jt(e)||this.doesNodeHaveFocusableChildren(e)},e.prototype.isSameOrParentForChild=function(e,t){if(e="string"==typeof e?this.getNode(e):e,t="string"==typeof t?this.getNode(t):t,!e||!t)return!1;if(e===t)return!0;for(;t;){if(t.parent===e)return!0;t=t.parent}return!1},e.prototype.setNodeFocusable=function(e,t){(e="string"==typeof e?this.getNode(e):e)&&Jt(e)!==t&&(e.isFocusable=t,t||(this.currentFocusNode===e&&this.recalculateFocus(e),e.parent&&this.unsetActiveChild(e.parent,e)))},e}();(un=cn||(cn={})).HORIZONTAL="horizontal",un.VERTICAL="vertical";class hn{constructor(e,t){this.parents=["[role=menu]","[role=menubar]"],this.interactive=[...this.parents,"button","a[href]","input","textarea","select","details",'[tabindex]:not([tabindex="-1"]'],this.scope=document,this.update=Lt(()=>{this.createGraph()},250),this.onActionKey=e=>{if(e.defaultPrevented)return;const t=e.detail.action,n=this.navigation.handleKeyEvent({direction:t});this.logger.verbose(e.type,t,n)},this.onFocus=e=>{const t=this.find(t=>t.id===e.id);(null==t?void 0:t.element)&&t.element.focus()},this.onFocusIn=Lt(e=>{if(!this.navigation)return;const t=this.find(t=>t.element===e.target);this.assignFocus(null==t?void 0:t.id)},250),this.element=e,this.logger=t.create({id:"FocusManager"}),this.scope.addEventListener("actionkey",this.onActionKey),this.element.addEventListener("focusin",this.onFocusIn)}createGraph(){var e,t;const n=this.interactive.join(", "),i=this.parents.join(", "),r=new Map;this.graph=this.elementToNode(this.element),this.element.querySelectorAll(n).forEach(e=>{if(null===e.offsetParent)return;if(!0===e.disabled)return;const t=(e.matches(i)?e.parentElement:e).closest(i)||this.element;r.has(t)||r.set(t,[]),r.get(t).push(e)}),r.forEach((e,t)=>{const n=this.find(e=>e.element===t);n.children=e.map(e=>this.elementToNode(e,n))});const a=null===(e=this.navigation)||void 0===e?void 0:e.getCurrentFocusNode();null===(t=this.navigation)||void 0===t||t.unregisterNode(this.rootId),this.walk(e=>{0===e.children.length&&e.orientation&&(e.isFocusable=!1)});const o=this.navigation=new dn;o.registerTree(this.graph),this.rootId=this.graph.id,o.on("focus",this.onFocus);const s=document.activeElement;if(a)if(s){const e=this.find(e=>e.element===s);e&&this.assignFocus(e.id)}else this.assignFocus(a.id)}walk(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.graph;e(t);
2for(const n of t.children)this.walk(e,n)}find(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.graph;if(e(t))return t;for(const n of t.children){const t=this.find(e,n);if(t)return t}return null}focus(e){const t=this.interactive.join(", "),n=e.querySelector(t),i=this.find(e=>e.element===n);i&&this.assignFocus(i.id)}elementToNode(e,t){const n=this.getProperty(e,"role"),i="menu"===n?cn.VERTICAL:"menubar"===n?cn.HORIZONTAL:void 0;return e.dataset.auid||(e.dataset.auid=function(){const e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()}()),{id:e.dataset.auid,element:e,parent:null==t?void 0:t.id,children:[],orientation:i,isFocusable:!!t}}getProperty(e,t){return e[t]||e.getAttribute(t)}destroy(){this.navigation&&(this.navigation.off("focus",this.onFocus),this.navigation.unregisterNode(this.rootId)),this.element.removeEventListener("focusin",this.onFocusIn),this.onFocusIn.cancel(),this.scope.removeEventListener("actionkey",this.onActionKey),this.scope=null,this.update.cancel(),this.logger=null}assignFocus(e){const t=this.navigation;if(e&&t.isNodeFocusableCandidate(t.getNode(e)))try{t.assignFocus(e)}catch(e){}}}const fn={en:{[St.PLAY]:"Play",[St.PAUSE]:"Pause",[St.STOP]:"Stop",[St.MUTE]:"Mute",[St.UNMUTE]:"Unmute",[St.VOLUME]:"Volume",[St.CLICK_TO_UNMUTE]:"Click to unmute",[St.TAP_TO_UNMUTE]:"Tap to unmute",[St.SEEK]:"Seek",[St.SEEK_BACK]:"Seek Backward",[St.SEEK_FORWARD]:"Seek Forward",[St.LIVE]:"Live",[St.GO_LIVE]:"Go Live",[St.CLOSED_CAPTIONS_OFF]:"Closed Captions Off",[St.CLOSED_CAPTIONS_ON]:"Closed Captions On",[St.FULL_SCREEN_ENTER]:"Enter Fullscreen",[St.FULL_SCREEN_EXIT]:"Exit Fullscreen",[St.HOURS]:"Hours",[St.MINUTES]:"Minutes",[St.SECONDS]:"Seconds",[St.VALUE_OF_TOTAL]:"{{value}} of {{total}}",[St.SETTINGS]:"Settings",[St.LANGUAGE]:"Language",[St.QUALITY]:"Quality",[St.BACK]:"Back",[St.CAPTIONS]:"Captions",[St.AUDIO]:"Audio",[St.CLOSE]:"Close",[St.AUTO]:"Auto",[St.UNKNOWN]:"Unknown"},es:{[St.PLAY]:"Reproducir",[St.PAUSE]:"Pausa",[St.STOP]:"Stop",[St.MUTE]:"Silencio",[St.UNMUTE]:"Dejar de silenciar",[St.VOLUME]:"Volumen",[St.CLICK_TO_UNMUTE]:"Haz clic para dejar de silenciar",[St.TAP_TO_UNMUTE]:"Toca para dejar de silenciar",[St.SEEK]:"Buscar",[St.SEEK_BACK]:"Buscar hacia atrás",[St.SEEK_FORWARD]:"Buscar adelante",[St.LIVE]:"En Vivo",[St.GO_LIVE]:"Ir a Vivir",[St.CLOSED_CAPTIONS_OFF]:"SubtÃtulos cerrados",[St.CLOSED_CAPTIONS_ON]:"SubtÃtulos cerrados en",[St.FULL_SCREEN_ENTER]:"Ir a pantalla completa",[St.FULL_SCREEN_EXIT]:"Salir de pantalla completa",[St.HOURS]:"Horas",[St.MINUTES]:"Minutos",[St.SECONDS]:"Segundos",[St.VALUE_OF_TOTAL]:"{{value}} de {{total}}",[St.SETTINGS]:"Configuraciones",[St.LANGUAGE]:"Lengua",[St.QUALITY]:"Calidad",[St.BACK]:"Volver",[St.CAPTIONS]:"SubtÃtulos",[St.AUDIO]:"Audio",[St.CLOSE]:"Cerrar",[St.AUTO]:"Auto",[St.UNKNOWN]:"Desconocida"}};class pn{constructor(e,t){this.context=e,this.uiPlugin=t,this.INC_PCT=5e-4,this.multipliers=[1,2,3],this.cursorPosition=NaN,this.playPending=!1,this.direction=0,this.onActionKey=e=>{const t=e.detail,n=t.action,i=t.avia,r=t.metadata;if(!e.defaultPrevented||n===i.ActionKey.CANCEL)switch(n){case i.ActionKey.FAST_FORWARD:this.startFfw(),r.multiplier=this.getMultiplier();break;case i.ActionKey.REWIND:this.startRw(),r.multiplier=this.getMultiplier();break;case i.ActionKey.SELECT:this.seekToCursorPosition(),this.reset();break;case i.ActionKey.CANCEL:this.playPending=!0,this.reset()}},this.onEngaged=e=>{e.detail.engaged||this.reset()},this.listen(!0)}destroy(){this.stop(),this.listen(!1),this.context=null,this.uiPlugin=null}onTick(){const e=this.context.player,t=this.cursorPosition+this.increment;this.setPosition(Math.max(0,Math.min(e.contentDuration,t))),this.tick()}tick(){this.frameId=window.requestAnimationFrame(()=>this.onTick())}setPosition(e){this.cursorPosition=e,this.uiPlugin.showPreview(e)}startFfw(){this.direction>0?this.updateIncrement():(this.direction<=0&&(this.stop(),this.direction=1),this.initNav())}startRw(){this.direction<0?this.updateIncrement():(this.direction>=0&&(this.stop(),this.direction=-1),this.initNav())}updateIncrement(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.multiplierIndex=e?0:this.multiplierIndex+1;const t=this.context.player;this.increment=this.INC_PCT*(t.contentDuration-t.contentTime)*this.getMultiplier()*this.direction}getMultiplier(){return this.multipliers[this.multiplierIndex%this.multipliers.length]}initNav(){var e;const t=this.context,n=t.player,i=t.avia;this.cursorPosition||(this.cursorPosition=n.contentTime),this.updateIncrement(!0),n.playbackState===i.PlaybackState.PLAYING&&(this.playPending=!0,n.pause()),null===(e=this.uiPlugin.querySelector("avia-progress-bar"))||void 0===e||e.focus(),n.enterActionKeyContext(ht.PREVIEW_SLIDER_ENGAGED),this.tick()}stop(){window.cancelAnimationFrame(this.frameId),this.direction=0,this.multiplierIndex=0}reset(){return p(this,null,function*(){const e=this.context.player;this.stop(),e.exitActionKeyContext(ht.PREVIEW_SLIDER_ENGAGED),this.playPending&&(this.playPending=!1,e.play()),this.cursorPosition=NaN})}seekToCursorPosition(){return p(this,null,function*(){const e=this.context.player;isNaN(this.cursorPosition)||(yield e.seek(this.cursorPosition),this.cursorPosition=NaN,this.uiPlugin.hidePreview())})}listen(e){const t=this.context.avia,n="".concat(e?"add":"remove","EventListener");document[n](t.PlayerEvent.ACTION_KEY,this.onActionKey),document[n]("engaged",this.onEngaged)}}class mn{constructor(){this.controlMode=yt.NONE,this.fullscreen=!1,this.active=null,this.deviceMode=Tt.DESKTOP,this.fullscreenDisabled=!0,this.muted=!1,this.muteDisabled=!0,this.volume=1,this.playing=!1,this.playDisabled=!0,this.textTrackEnabled=!1,this.textDisabled=!0,this.timeDisplayValue="",this.isLiveLinear=!1,this.isLts=!1,this.live=!1,this.playheadPosition=0,this.durationSeconds=0,this.currentTimeSeconds=0,this.seekDisabled=!0,this.seekBackDisabled=!0,this.seekForwardDisabled=!0,this.settingsDisabled=!0,this.adPlayheadPosition=0,this.localeData=null,this.preview=null,this.unmuteCtaVisible=!1,this.settings=null,this.posterActive=!1,this.posterImageUrl="",this.qual
2ityLabel=0,this.waiting=!1,this.initialized=!1,this.pausable=!0,this.isTouch=!1,this.isIosNative=!1,this.linkMuteAndVolume=!0,this.playerDimensions={width:0,height:0},this.bufferedRanges=[],this.options=null}}const gn="ui",vn="uiaction";function yn(){return{id:gn,factory:bn,options:arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}}}function bn(e,t){return p(this,null,function*(){"object"!=typeof customElements&&e.logger.warn("Polyfill warning: customElements is not defined"),"function"!=typeof Node.prototype.getRootNode&&e.logger.warn("Polyfill warning: Node.prototype.getRootNode is not defined");const n=new An;return yield n.onRegister(e.player,t,e),n})}class An extends Xt{constructor(){super(gn),this.TV_MODE_IDLE_DELAY=7e3,this.defaultSeekInc=10,this.accIndicatorDisplayTime=1500,this.playbackStarted=!1,this.settingsEngaged=!1,this.firstProgressReceived=!1,this.defaultCompactViewBreakpoint=520,this.rootElement="avia-ui",this.previewTimeTransform=Vt.DEFAULT,this.pendingActive=!1,this.activeLocked=!1,this.resourceStarted=!1,this.activeMode_=pt.AUTO,this.idleDelay_=NaN,this.BUFFERED_CHECK_COUNT_INTERVAL=10,this.bufferedCheckCounter=0,this.viewState=new mn,this.seekPending=!1,this.onUiEvent=e=>{const t=e.detail.action,n=e.detail.value;switch(t!==ut.POSTER_PLAY&&this.dispatchEvent(t,n),t){case ut.ENTER_CONTEXT:this.player.enterActionKeyContext(n);break;case ut.EXIT_CONTEXT:this.player.exitActionKeyContext(n);break;case ut.POSTER_PLAY:!this.playbackStarted&&this.resourceStarted&&(this.cancelPoster(t===ut.POSTER_PLAY),this.player.play().catch(()=>{}));break;case ut.PLAY:case ut.PAUSE:case ut.STOP:this.player[t]();break;case ut.ENTER_FULLSCREEN:this.player.enterFullscreen();break;case ut.EXIT_FULLSCREEN:this.player.exitFullscreen();break;case ut.MUTE:this.player.muted=!0,this.updateViewState({muted:!0});break;case ut.UNMUTE:this.unmute();break;case ut.TEXT_ON:case ut.TEXT_OFF:const e=t===ut.TEXT_ON;this.player.textTrackEnabled=e,this.updateViewState({textTrackEnabled:e});break;case ut.SEEK:this.seekPending=!0,this.player.seek(n).then(()=>{this.seekPending=!1}).catch(e=>{this.seekPending=!1,this.log("AviaUI: A seek() call failed: ".concat(e.message))});break;case ut.SEEK_FORWARD:this.incrementalSeek(1);break;case ut.SEEK_BACK:this.incrementalSeek(-1);break;case ut.VOLUME:this.player.volume=n;break;case ut.PREVIEW:const i=n.time,r=n.percent,a=this.player,o=a.contentDuration,s=a.streamDuration,l=a.liveStreamUtcDuration,c=a.liveStreamUtcStart,u=r*s;this.dispatchEvent(Kt.PREVIEW,n),Promise.resolve(this.previewTimeTransform({contentTime:i,streamTime:u,liveStreamUtcTime:Math.round(1e3*u+c),contentDuration:o,streamDuration:s,liveStreamUtcDuration:l})).then(e=>{this.player.getThumbnails(i).then(t=>this.updateViewState({preview:{value:e,thumbs:t,thumbnailScaleFactor:this.options.thumbnailScaleFactor||.25}}))});break;case ut.SETTINGS_ON:case ut.SETTINGS_OFF:this.setStateForSettings(t===ut.SETTINGS_ON);break;case ut.LANGUAGE_SELECT:this.selectLanguage(n);break;case ut.QUALITY_SELECT:this.selectQuality(n);break;case ut.GO_TO_LIVE:this.player.goLive();break;case ut.LOCK_ACTIVE:this.activeLocked=n.locked,this.setActive(this.activeLocked||this.viewState.active)}},this.onReady=e=>{var t,n;const i=null===(t=this.getContainer())||void 0===t?void 0:t.querySelectorAll("slot-fb[hidden]");null==i||i.forEach(e=>e.parentElement.removeChild(e)),null===(n=this.focusManager)||void 0===n||n.update();const r=e.target;"avia-ui"===r.nodeName.toLowerCase()&&this.setUiElement(r),this.progressBar_=this.querySelector("avia-progress-bar")},this.onKeyDown=()=>{this.viewState.deviceMode===Tt.TV&&this.activeMode!==pt.MANUAL&&(this.setActive(!0),this.aviaUi.contains(document.activeElement)||this.applyFocusTimeout(()=>{const e=this.querySelector("avia-progress-bar");null==e||e.focus()}))},this.onFocusIn=()=>{this.setActive(!0)},this.aviaUi=null,this.accVolUpdater=Lt(e=>{this.setAccIndicatorState(e)},this.accIndicatorDisplayTime),this.accSeekUpdater=Lt(e=>{this.setAccIndicatorState(e)},this.accIndicatorDisplayTime),this.breakStartHandler=Lt(()=>{this.setStateForAdBreakStart()},50)}get activeMode(){return this.activeMode_||pt.AUTO}set activeMode(e){this.activeMode_=e}get active(){return this.viewState.active}set active(e){this.setActive(e)}get idleDelay(){return this.idleDelay_}set idleDelay(e){this.idleDelay_=e}showPreview(e){var t;const n=!isNaN(e);this.setActive(n),this.activeLocked=n,null===(t=this.progressBar)||void 0===t||t.showPreview(e)}hidePreview(){this.activeLocked=!1,this.progressBar.hidePreview()}querySelector(e){if(!this.aviaUi)return null;const t=this.aviaUi.querySelectorAll(e);for(let e=0,n=t.length;e<n;e++){const n=t[e];if(null==n.closest("slot-fb[hidden]"))return n}return null}destroy(){var e,t,n,i,r;this.accVolUpdater.cancel(),this.accSeekUpdater.cancel(),this.breakStartHandler.cancel(),null===(e=this.previewEngine)||void 0===e||e.destroy(),this.previewEngine=null,null===(t=this.getContainer())||void 0===t||t.removeEventListener("ready",this.onReady),null===(n=this.aviaUi)||void 0===n||n.removeEventListener(vn,this.onUiEvent),null===(i=this.aviaUi)||void 0===i||i.removeEventListener("focusin",this.onFocusIn),this.aviaUi=null,null===(r=this.focusManager)||void 0===r||r.destroy(),document.removeEventListener("keydown",this.onKeyDown),clearTimeout(this.idleTimeout),clearTimeout(this.focusTimeout),super.destroy()}initKeys(){const e=this.avia,t=e.ActionKey,n=e.KeyCode;
2this.avia.registerActionKeyContext(ht.TV,{[n.ENTER]:t.PLAY_PAUSE}),this.avia.registerActionKeyContext(ht.UI,{[n.LEFT_ARROW]:t.LEFT,[n.RIGHT_ARROW]:t.RIGHT,[n.UP_ARROW]:t.UP,[n.DOWN_ARROW]:t.DOWN}),this.avia.registerActionKeyContext(ht.BUTTON,{[n.ENTER]:t.SELECT,[n.SPACE]:t.SELECT}),this.avia.registerActionKeyContext(ht.SLIDER,{[n.LEFT_ARROW]:t.LEFT,[n.RIGHT_ARROW]:t.RIGHT,[n.UP_ARROW]:t.UP,[n.DOWN_ARROW]:t.DOWN,[n.PAGE_UP]:t.UP,[n.PAGE_DOWN]:t.DOWN}),this.avia.registerActionKeyContext(ht.SLIDER_ENGAGED,{[n.ENTER]:t.SELECT,[n.SPACE]:t.SELECT,[n.MEDIA_PLAY]:t.SELECT,[n.MEDIA_PLAY_PAUSE]:t.SELECT}),this.avia.registerActionKeyContext(ht.PREVIEW_SLIDER_ENGAGED,{[n.MEDIA_PLAY]:t.SELECT,[n.MEDIA_PAUSE]:t.SELECT,[n.MEDIA_PLAY_PAUSE]:t.SELECT,[n.LEFT_ARROW]:t.SELECT,[n.RIGHT_ARROW]:t.SELECT,[n.MEDIA_STOP]:t.CANCEL,[n.ESCAPE]:t.CANCEL}),this.avia.registerActionKeyContext(ht.SEEK,{[n.ENTER]:t.SELECT,[n.SPACE]:t.SELECT,[n.ESCAPE]:t.CANCEL}),this.avia.registerActionKeyContext(ht.PANEL,{[n.ESCAPE]:t.CANCEL}),this.avia.registerActionKeyContext(ht.MENU,{[n.ENTER]:t.SELECT,[n.SPACE]:t.SELECT,[n.RIGHT_ARROW]:t.RIGHT}),document.addEventListener("keydown",this.onKeyDown)}updateViewState(e){Object.assign(this.viewState,e),this.aviaUi&&Object.entries(e).forEach(e=>{let t=(0,i.A)(e,2),n=t[0],r=t[1];this.aviaUi[n]=r})}dispatchEvent(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.services.event.dispatchPluginEvent({id:this.id,target:this,type:e,detail:t})}onPlayerEvent(e){const t=this.avia,n=t.PlayerEvent,i=t.StreamType,r=t.PlaybackState,a=this.player.streamType===i.LIVE,o=this.player.streamType===i.LTS,s=e.type,l=e.detail,c={};switch(s){case n.CLOCK:this.bufferedCheckCounter=l.count;const e=this.player.playbackState;e!==r.PAUSED&&e!==r.WAITING||this.updateBufferedRanges();break;case n.READY:this.setPlayState(),this.setPosterState();break;case n.AUTOPLAY_BLOCKED:this.setPosterState(!0);break;case n.RESOURCE_START:this.setPosterState(this.viewState.posterActive),this.setSegmentBreakPositions([]),this.resourceStarted=!0;break;case n.AD_CUEPOINTS_AVAILABLE:this.setSegmentBreakPositions(l.cuepoints);break;case n.AD_SEGMENT_START:!1!==this.options.showAdControlsOnAdSegmentStart?this.breakStartHandler():this.setControlMode(yt.CONTENT);break;case n.AD_START:this.setControlMode(yt.AD),this.enableControls([gt.PLAY],!0),this.updateViewState({playing:!0});break;case n.AD_BREAK_START:this.breakStartHandler();break;case n.AD_PROGRESS:this.setAdPosition(l);break;case n.AD_SEGMENT_END:case n.AD_BREAK_COMPLETE:this.setControlMode(yt.NONE);break;case n.CONTENT_START:case n.CONTENT_SEGMENT_START:this.setStateForContentStart(a,o);break;case n.CONTENT_SEGMENT_END:this.firstProgressReceived=!1,this.setControlMode(yt.NONE);break;case n.CONTENT_PLAYING:this.setControlMode(yt.CONTENT),this.setPlayState();break;case n.AD_PAUSED:case n.CONTENT_PAUSED:this.updateViewState({playing:!1});break;case n.AD_PLAYING:this.updateViewState({playing:!0});break;case n.STREAM_TYPE_CHANGE:this.setLiveState(a,o);break;case n.CONTENT_PROGRESS:this.firstProgressReceived||(this.firstProgressReceived=!0,this.setPlayState(),this.setLiveState(a,o)),this.seekPending||(this.updateBufferedRanges(),a||this.setTimeAndPosition(),(a||o)&&this.setLiveState(a,o));break;case n.FULLSCREEN_CHANGE:this.updateViewState({fullscreen:l.fullscreen});break;case n.TEXT_TRACK_ENABLED_CHANGE:this.updateViewState({textTrackEnabled:l.textTrackEnabled});break;case n.LANGUAGE_CHANGE:this.setLocalizationData(l.language||"en");break;case n.MUTE_CHANGE:c.muted=l.muted,this.player.muted||(c.unmuteCtaVisible=!1),this.updateViewState(c);break;case n.VOLUME_CHANGE:const t=l.volume,i=this.player.muted;if(c.volume=t,this.viewState.volume===t)break;this.viewState.muted?this.viewState.muted&&t>0&&this.unmute():c.muted=!Math.ceil(t),i||(c.unmuteCtaVisible=!1),this.updateViewState(c);break;case n.ACTION_KEY_METADATA:this.playbackStarted&&this.setAccIndicator(l.action,l.metadata);break;case n.ACTIVE_STATE_CHANGE:this.activeMode===pt.AUTO&&this.setActiveState(l.activeState);break;case n.PRESENTATION_SIZE_CHANGE:this.respondToSizeChange();break;case n.AUDIO_TRACK_CHANGE:case n.AUDIO_TRACKS_CHANGE:case n.QUALITY_CHANGE:case n.QUALITIES_CHANGE:case n.TEXT_TRACK_CHANGE:case n.TEXT_TRACKS_CHANGE:s===n.TEXT_TRACKS_CHANGE&&this.enableControls(gt.TEXT,this.player.textTracks.length>0),this.enableSettingsButton(),this.setStateForSettings();break;case n.RESOURCE_END:this.setIdleState();break;case n.PLAYBACK_STATE_CHANGE:this.setPlayState()}}updateBufferedRanges(){if(this.bufferedCheckCounter%this.BUFFERED_CHECK_COUNT_INTERVAL!==0||this.player.streamType===this.avia.StreamType.LIVE)return;const e=(this.player.getBuffered()||[]).map(e=>({start:e.startTime,end:e.endTime})),t=this.player.contentTime;this.updateViewState({bufferedRanges:!1===this.options.showForwardBufferedRangeOnly?e:e.filter(e=>t>=e.start&&t<=e.end)})}incrementalSeek(e){const t=e*(this.options.seekIncrement||this.defaultSeekInc);this.player.jump(t).catch(e=>{this.log("AviaUI: A jump() call failed: ".concat(e.message))}),this.player.recordMetric(this.avia.MetricType.UI,this.avia.UiMetric.SEEK_BY,t)}unmute(){this.player.muted=!1,this.updateViewState({muted:!1})}setControlMode(e){const t=this.getContentControlMode()===yt.COMPACT?this.querySelector("avia-control-bar-compact"):this.querySelector("avia-control-bar"),n=this.querySelector("avia-ad-control-bar"),i=document.activeElement,r=e===yt.CONTENT&&(null==n?void 0:n.contains(i))||e===yt.AD&&(null==t?void 0:t.contains(i));this.updateViewState({controlMode:e===yt.CONTENT?this.getContentControlMode():e}),r&&this.applyFocusTimeout(()=>{const r=e===yt.CONTENT?t:n,a=null==r?void 0:r.querySelector("".concat(i.parentElement.nodeName," avia-button"));null==a||a.focus({focusVisible:!0})})}setActiveState(e){this.active=e===this.avia.ActiveState.ACTIVE}setActive(e){var t,n;this.playbackStarted?this.activeLocked||(this.updateViewState({active:this.activeMode===pt.MANUAL?e:!!(null===(n=null===(t=this.aviaUi)||void 0===t?void 0:t.settings)||void 0===n?void 0:n.active)||e}
2),this.options.offsetTimedTextOnControlsVisible&&this.viewState.controlMode===yt.CONTENT&&this.player.offsetTimedText(e?this.controlBarHeight+4:0),this.viewState.active&&this.activateTimeout()):this.pendingActive=!0}activateTimeout(){clearTimeout(this.idleTimeout),this.activeMode!==pt.MANUAL&&Number.isFinite(this.idleDelay)&&(this.idleTimeout=setTimeout(()=>{this.viewState.settings.active||this.activeLocked?this.activateTimeout():this.setActive(!1)},this.idleDelay))}applyFocusTimeout(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;clearTimeout(this.focusTimeout),this.focusTimeout=setTimeout(e,t)}setAccIndicator(e,t){const n={},i=this.avia.ActionKey;switch(e){case i.INCREASE_VOLUME:case i.DECREASE_VOLUME:case i.MUTE_UNMUTE:n.volumeKey=!0,this.accVolUpdater({volumeKey:!1}),this.player.muted||this.updateViewState({unmuteCtaVisible:!1});break;case i.SKIP_FORWARD:case i.SKIP_BACKWARD:n.seekForward=e===i.SKIP_FORWARD,n.seekBack=e===i.SKIP_BACKWARD,n.seekTime=(null==t?void 0:t.position)||0,this.accSeekUpdater({seekForward:!1,seekBack:!1,seekTime:null});break;case i.FAST_FORWARD:n.seekForward=!0,n.seekBack=!1,n.multiplier=t.multiplier;break;case i.REWIND:n.seekForward=!1,n.seekBack=!0,n.multiplier=t.multiplier;break;case i.SELECT:case i.CANCEL:n.seekForward=!1,n.seekBack=!1,n.multiplier=0}this.setAccIndicatorState(n)}setAccIndicatorState(e){this.updateViewState({accIndicatorState:Object.assign(Object.assign({},this.viewState.accIndicatorState),e)})}setStateForContentStart(e,t){this.cancelPoster(!1),this.setControlMode(yt.CONTENT),this.setLiveState(e,t);const n={muted:this.player.muted,volume:this.player.volume},i=[gt.MUTE,gt.PLAY];!0!==this.options.disableFullscreen&&i.push(gt.FULLSCREEN),this.enableControls(i,!0),this.updateViewState(n),this.setSeekDisabled(!1),this.setStateForPlaybackStart(),this.enableSettingsButton()}setStateForAdBreakStart(){const e=[gt.MUTE,gt.PLAY];!this.services.playerOptions.useNativeFullscreen||this.services.system.hasFullscreenApi&&!0!==this.options.disableFullscreen?e.push(gt.FULLSCREEN):this.enableControls([gt.FULLSCREEN],!1),this.cancelPoster(!1),this.setControlMode(yt.AD),this.enableControls(e,!0),this.updateViewState({playing:!0,muted:this.player.muted}),this.setStateForPlaybackStart()}setStateForPlaybackStart(){this.options.useUnmuteCta&&!this.playbackStarted&&this.player.muted&&this.updateViewState({unmuteCtaVisible:!0}),this.playbackStarted=!0,this.setPlayState(),this.pendingActive&&(this.pendingActive=!1,this.setActiveState(this.avia.ActiveState.ACTIVE))}setPosterState(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.services.playerOptions.autoplay===this.avia.Autoplay.NONE;var t;this.updateViewState({posterImageUrl:(null===(t=this.player.resource)||void 0===t?void 0:t.location.posterImageUrl)||this.options.posterImageUrl,posterActive:e})}cancelPoster(e){this.updateViewState({posterActive:!1}),e&&this.dispatchEvent(Kt.POSTER_PLAY)}setIdleState(){this.setControlMode(yt.NONE),this.updateViewState({unmuteCtaVisible:!1,active:!1});const e=[gt.MUTE,gt.PLAY,gt.TEXT];!0!==this.options.disableFullscreen&&e.push(gt.FULLSCREEN),this.enableControls(e,!1),this.playbackStarted=!1}setLiveState(e,t){const n=this.player.isPlayingLive;this.updateViewState({isLiveLinear:e,isLts:t,live:e||t&&n,pausable:this.player.pausable,seekForwardDisabled:t?n:this.viewState.seekForwardDisabled})}setPlayState(){const e=this.player.playbackState,t=e===this.avia.PlaybackState.PLAYING,n=e===this.avia.PlaybackState.WAITING,i=e===this.avia.PlaybackState.PAUSED;this.updateViewState({playing:!(!n&&!t),playDisabled:!t&&!i,waiting:n}),this.viewState.deviceMode===Tt.TV&&i&&this.setActive(!0)}respondToSizeChange(){const e=this.aviaUi.controlMode;this.updateViewState({playerDimensions:this.player.dimensions,controlMode:e===yt.CONTENT||e===yt.COMPACT?this.getContentControlMode():this.viewState.controlMode})}getContentControlMode(){return this.player.dimensions.width>(this.options.compactViewBreakpoint||this.defaultCompactViewBreakpoint)?yt.CONTENT:yt.COMPACT}enableSettingsButton(){const e=this.player,t=e.textTrack,n=e.audioTrack,i=e.qualities.length>1;this.updateViewState({settingsDisabled:!(t||n||i)})}setStateForSettings(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.settingsEngaged;const t=this.player;this.services.system.browser===this.avia.Browser.FIREFOX&&e&&this.aviaUi.classList.add(At.SETTINGS_NUDGE_LEFT);const n=new Set;
2t.qualities.forEach(e=>e.enabled&&n.add(e.category[this.viewState.qualityLabel])),this.updateViewState({settings:{active:e,languageEnabled:t.textTracks.length>1||t.audioTracks.length>1,qualityEnabled:n.size>1,textTrack:t.textTrack,textTracks:t.textTracks,audioTrack:t.audioTrack,audioTracks:t.audioTracks,quality:t.quality,qualities:t.qualities,qualityAuto:t.autoQualitySwitching}}),this.settingsEngaged=e,this.pauseOnSettings(e)}pauseOnSettings(e){if(this.options.pauseOnSettings){const t=this.player.playbackState===this.avia.PlaybackState.PLAYING;e&&t&&(this.player.pause(),this.playPendingAfterSettings=!0),!e&&this.playPendingAfterSettings&&(this.playPendingAfterSettings=!1,this.player.play())}}enableControls(e,t){if(!this.aviaUi)return;const n=Array.isArray(e)?e:[e],i=this.aviaUi;n.forEach(e=>i["".concat(e,"Disabled")]=!t)}setSeekDisabled(e){this.updateViewState({seekDisabled:e,seekBackDisabled:e,seekForwardDisabled:e})}setAdPosition(e){let t,n;this.options.showBreakProgress?(t=e.breakTime,n=e.breakDuration):(t=e.currentTime,n=e.duration),this.updateViewState({adPlayheadPosition:t/n})}
2setTimeAndPosition(){if(this.viewState.waiting&&!this.player.video.paused||this.seekPending)return;const e=this.player.contentTime,t=this.player.contentDuration;this.updateViewState({timeDisplayValue:this.getTimeDisplayValue(e,t),currentTimeSeconds:e,durationSeconds:t,playheadPosition:e/t})}setSegmentBreakPositions(e){const t=this.player.contentDuration;this.updateViewState({segmentBreakPositions:e.filter(e=>e>0&&e!==t).join(",")})}selectLanguage(e){var t,n;const i=e.trackType,r=e.trackId;if("text"===i){const e=null===(t=this.player.textTracks)||void 0===t?void 0:t.find(e=>e.id===r);e&&(this.player.textTrack=e)}else if("audio"===i){const e=null===(n=this.player.audioTracks)||void 0===n?void 0:n.find(e=>e.id===r);e&&(this.player.audioTrack=e)}}selectQuality(e){const t=e.index;if(-1===t)return void(this.player.autoQualitySwitching=!0);const n=this.player.qualities.find(e=>e.index===t),i=null==n?void 0:n.bitrate;i&&(this.player.bitrate=i)}getTimeDisplayValue(e,t){return t>86400?"":"".concat(Ft(e)," / ").concat(Ft(t))}get progressBar(){return this.progressBar_||(this.progressBar_=this.querySelector("avia-progress-bar")),this.progressBar_}get controlBarHeight(){if(null==this.controlBarHeight_){const e=this.querySelector("avia-control-bar");this.controlBarHeight_=e.getBoundingClientRect().height}return this.controlBarHeight_}createUi(){return!1!==this.options.focusManagerEnabled&&(this.focusManager=new hn(this.getContainer(),this.services.logger)),this.applyTheme(this.options.theme),customElements.whenDefined(this.rootElement).then(()=>{this.initializeState()})}getContainer(){var e;let t=this.options.container;return t&&(t=document.querySelector(t)),t||(null===(e=this.services)||void 0===e?void 0:e.dom.main)}initializeState(){const e=this.options,t=this.services,n=this.calculateDeviceMode();e.activeMode?this.activeMode=e.activeMode:n===Tt.TV&&(this.active=!0,this.idleDelay=e.idleDelay||this.TV_MODE_IDLE_DELAY,null==e.progressMode&&(e.progressMode=Ht.CURSOR),this.player.exitActionKeyContext(this.avia.ActionKeyContext.HOTKEY),this.player.enterActionKeyContext(ht.TV),this.log("AviaUI is in TV Mode")),e.previewTimeTransform&&(this.previewTimeTransform=e.previewTimeTransform),this.updateViewState({accIndicatorState:{displayTime:this.accIndicatorDisplayTime,volumeKey:!1,muted:!1,seekForward:!1,seekBack:!1,seekTime:null,multiplier:0},qualityLabel:e.qualityLabel||0,deviceMode:n,isIosNative:n===Tt.MOBILE&&!t.system.hasFullscreenApi&&t.playerOptions.useNativeFullscreen,linkMuteAndVolume:!1!==e.linkMuteAndVolume,isTouch:"ontouchstart"in document.documentElement,options:e,active:e.active,initialized:!0}),this.previewEngine=new pn(t,this)}setLocalizationData(e){const t=Object.values(St).reduce((t,n)=>(t[n]=this.services.localization.localize(n,e),t),{});this.updateViewState({localeData:t})}calculateDeviceMode(){const e=this.options.deviceMode;if(e&&e!==Tt.AUTO)return e;const t=this.services.system;return t.isTv||t.isConsole||t.isEmbedded||t.isChromecast?Tt.TV:t.isMobile?Tt.MOBILE:Tt.DESKTOP}setUiElement(e){var t;const n=this.aviaUi;e&&e!==n&&(n&&(null===(t=n.parentElement)||void 0===t||t.removeChild(n),n.removeEventListener(vn,this.onUiEvent),n.removeEventListener("focusin",this.onFocusIn)),Object.entries(this.viewState).forEach(t=>{let n=(0,i.A)(t,2),r=n[0],a=n[1];"function"==typeof a||r.startsWith("_")||a instanceof HTMLElement||(e[r]=a)}),this.aviaUi=e,this.aviaUi.addEventListener(vn,this.onUiEvent),this.aviaUi.addEventListener("focusin",this.onFocusIn),this.progressBar_=this.querySelector("avia-progress-bar"))}getEventInterests(){const e=this.avia.PlayerEvent;return[e.CLOCK,e.READY,e.AUTOPLAY_BLOCKED,e.RESOURCE_START,e.AD_CUEPOINTS_AVAILABLE,e.AD_SEGMENT_START,e.AD_START,e.AD_BREAK_START,e.AD_PROGRESS,e.AD_SEGMENT_END,e.AD_BREAK_COMPLETE,e.CONTENT_START,e.CONTENT_SEGMENT_START,e.CONTENT_SEGMENT_END,e.CONTENT_PLAYING,e.AD_PAUSED,e.CONTENT_PAUSED,e.AD_PLAYING,e.STREAM_TYPE_CHANGE,e.CONTENT_PROGRESS,e.FULLSCREEN_CHANGE,e.TEXT_TRACK_ENABLED_CHANGE,e.LANGUAGE_CHANGE,e.MUTE_CHANGE,e.VOLUME_CHANGE,e.ACTION_KEY_METADATA,e.ACTIVE_STATE_CHANGE,e.PRESENTATION_SIZE_CHANGE,e.AUDIO_TRACK_CHANGE,e.AUDIO_TRACKS_CHANGE,e.QUALITY_CHANGE,e.QUALITIES_CHANGE,e.TEXT_TRACK_CHANGE,e.TEXT_TRACKS_CHANGE,e.RESOURCE_END,e.PLAYBACK_STATE_CHANGE]}initialize(){return p(this,null,function*(){this.getContainer().addEventListener("ready",this.onReady),this.services.localization.registerLocalizationData(fn),this.initKeys(),yield this.createUi()})}applyTheme(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=this.getContainer(),n=e.html,i=e.cssVars;i&&function(e){const t=document.documentElement.style;Object.keys(e).forEach(n=>t.setProperty(n,e[n]))}(i);let r=t.querySelector(this.rootElement);const a=!1!==this.options.useDefaultTheme&&!r;if(n||a){const e=n?function(e){try{const t=document.createElement("template");return t.innerHTML=e,Array.from(t.content.children)}catch(t){throw new Error("Could not create element from string: ".concat(e))}}(n):[document.createElement(this.rootElement)];if(r=e.find(e=>e.nodeName.toLowerCase()===this.rootElement),!r)throw new Error("Avia UI theme HTML must contain the root element ".concat(this.rootElement));
2return void e.forEach(e=>t.appendChild(e))}this.setUiElement(r)}}at({watch:!0});const En=yn;var Tn=function(e,t,n){void 0===n&&(n=!0);var i="Function"===e.constructor.name?e.prototype:e,r=i.componentWillLoad;i.componentWillLoad=function(){var e=this,i=this,a=function(){var e;return{promise:new Promise(function(t){e=t}),resolve:e}}(),o=new CustomEvent("openWormhole",{bubbles:!0,composed:!0,detail:{consumer:this,fields:t,updater:function(t,n){(t in i?i:e)[t]=n},onOpen:a}});i.dispatchEvent(o);var s=function(){if(r)return r.call(e)};return n?a.promise.then(function(){return s()}):s()}},wn=new Map,Sn=function(e,t){var n=e.fields,i=e.updater;n.forEach(function(e){i(e,t[e])})},Cn=function(e,t){var n=e.state,i=T;if(wn.has(i)){var r=wn.get(i);r.state=n,r.wormholes.forEach(function(e){Sn(e,n)})}return t};const kn=class extends we{constructor(){super(),this.__registerHost(),this.onRef=e=>{this.pbar=e,this.adPlayheadPositionHandler(this.adPlayheadPosition)},this.adPlayheadPosition=0,this.isLiveLinear=!1}adPlayheadPositionHandler(e){!this.pbar||null==e||isNaN(e)||e<0||(this.pbar.style.width="".concat(100*e,"%"))}render(){return x("div",{class:"avia-ad-prog-bar",ref:this.onRef})}static get watchers(){return{adPlayheadPosition:["adPlayheadPositionHandler"]}}static get style(){return"avia-ad-progress-bar{display:block;position:absolute;background:var(--avia-ad-progress-track-color);position:absolute;height:3px;bottom:0;left:0;right:0;user-select:none}.avia-ad-prog-bar{height:3px;user-select:none;background-color:var(--avia-ad-progress-color);width:0%}"}};Tn(kn,["adPlayheadPosition","isLiveLinear"]);const xn=class extends we{constructor(){super(),this.__registerHost(),this.actionEvent=R(this,"action"),this.disabledEvent=R(this,"disabled"),this.readyEvent=R(this,"ready"),this.TAP_THRESHOLD=300,this.isTouch="ontouchstart"in document.documentElement,this.locId=void 0,this.toggled=!1,this.compact=!1,this.icon=!1,this.variant=!1,this.ids="",this.actions="",this.localeData=void 0,this.label="",this.labelledby="",this.disabled=!1,this.focusIndex=0,this.focused=!1}onDisabledChange(e){this.disabledEvent.emit({disabled:e})}componentDidLoad(){this.readyEvent.emit()}onClick(e){this.isTouch||this.disabled?Rt(e):this.execAction()}onTouchStart(e){Rt(e),this.touchStartStamp=e.timeStamp}onTouchEnd(e){!this.disabled&&this.touchStartStamp&&e.timeStamp-this.touchStartStamp<=this.TAP_THRESHOLD&&(this.touchStartStamp=null,this.execAction())}onFocus(){this.element.classList.contains("focus-visible")&&(this.focused=!0,this.actionEvent.emit({action:ut.ENTER_CONTEXT,value:ht.BUTTON}))}onBlur(){this.focused&&(this.focused=!1,this.actionEvent.emit({action:ut.EXIT_CONTEXT,value:ht.BUTTON}))}onKeyDown(e){const t=e.detail,n=t.avia;if(t.action===n.ActionKey.SELECT)return this.element.click(),void Rt(e)}getCsvValue(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:+this.toggled;return _t(e)[t]}execAction(){const e=this.getCsvValue(this.actions);e&&this.actionEvent.emit({action:e})}focus(e){this.focused||(!0===(null==e?void 0:e.focusVisible)&&(this.element.classList.add("focus-visible"),this.element.dataset.focusVisibleAdded=""),this.onFocus(),this.focused=!0,we.prototype.focus.call(this.element,e))}render(){var e;const t=this.getCsvValue(this.ids)||this.locId,n=this.label||(null===(e=this.localeData)||void 0===e?void 0:e[t]),i={"aria-label":n};return!this.focused&&n&&(i.title=n),this.labelledby&&(i["aria-labelledby"]=this.labelledby),x(_,Object.assign({role:"button",tabindex:this.disabled?-1:this.focusIndex},i))}get element(){return this}static get watchers(){return{disabled:["onDisabledChange"]}}static get style(){return"avia-button{display:inline-block;background-color:transparent;height:var(--avia-control-bar-btn-height);width:var(--avia-control-bar-btn-width);color:var(--avia-control-bar-btn-text-color);border:var(--avia-control-bar-btn-border);border-width:var(--avia-control-bar-btn-border-width);border-radius:var(--avia-control-bar-btn-border-radius);outline:var(--avia-control-bar-btn-border-outline);cursor:var(--avia-control-bar-btn-border-cursor);pointer-events:all}avia-button:hover{color:var(--avia-control-bar-btn-text-color-hover)}avia-button[disabled]{cursor:var(--avia-control-bar-btn-disabled-cursor);opacity:var(--avia-control-bar-btn-disabled-opacity);pointer-events:none}avia-button[icon]{padding:0;margin:0;background-position:center;background-size:var(--avia-icon-btn-bg-size);background-repeat:no-repeat;user-select:none}avia-button[compact]{width:var(--avia-compact-button-width);height:var(--avia-compact-button-height);border-radius:var(--avia-compact-button-border-radius);background-color:var(--avia-compact-button-background-color)}"}};Tn(xn,["localeData"]);const Nn=class extends we{constructor(){super(),this.__registerHost(),this.active=!1,this.controlMode=yt.NONE,this.deviceMode=Tt.DESKTOP,this.isLts=!1,this.isLiveLinear=!1,this.isIosNative=!1,this.settings=null}getHeight(){return p(this,null,function*(){return this.element.getBoundingClientRect().height})}render(){var e,t;const n=this.deviceMode===Tt.DESKTOP,i=this.deviceMode===Tt.TV,r=(null===(e=this.settings)||void 0===e?void 0:e.languageEnabled)||(null===(t=this.settings)||void 0===t?void 0:t.qualityEnabled);return x(_,{role:"menu"},x("div",{class:"avia-control-container-top"},x("slot",{name:"top"},x("div",null,i?x("avia-control-group",{orientation:cn.HORIZONTAL,class:"avia-control-group-top"},x("div",{class:"avia-control-group-top-left"},this.isLiveLinear?x("avia-live-control",null):""),x("div",{class:"avia-control-group-top-right"},x("avia-text-toggle",null),x("avia-settings-toggle",null))):"",this.isLiveLinear?"":x("avia-progress-bar",null)))),x("avia-control-group",{orientation:cn.HORIZONTAL,class:"avia-control-container"},x("div",{class:"avia-control-group-left"},x("slot",{name:"left"},x("div",{class:"avia-control-group-left"},i?"":x("avia-play-toggle",null),i?"":x("avia-mute-toggle",null),n?x("avia-volume-slider",null):"",i&&!this.isLiveLinear?x("avia-current-time",null):""))),x("div",{class:"avia-control-group-center"},x("slot",{name:"center"})),x("div",{class:"avia-control-group-right"},x("slot",{name:"right"},x("div",{class:"avia-control-group-right"},i?"":x(ce,null,x("avia-time-display",null),this.isLiveLinear||this.isLts?x("avia-live-control",null):"",this.isIosNative?"":x("avia-text-toggle",null),this.isIosNative?"":x("avia-settings-toggle",{disabled:!r}),x("avia-fullscreen-toggle",null)),i&&!this.isLiveLinear?x("avia-time-remaining",null):"")))),x("div",{class:"avia-control-container-bottom"},x("slot",{name:"bottom"})))}
2get element(){return this}static get style(){return'avia-control-bar{box-sizing:border-box;width:100%;padding:0 var(--avia-default-spacing);background:var(--avia-control-bar-bg);display:none;transition:var(--avia-active-transition-in);padding-bottom:auto;pointer-events:auto}avia-ui[control-mode="content"] avia-control-bar{display:block}avia-ui:not([active]) avia-control-bar{opacity:0;transition:var(--avia-active-transition-out)}.avia-control-container{display:flex;justify-content:space-between;align-items:center;height:calc(var(--avia-control-bar-btn-height) + 6px);flex-wrap:nowrap}avia-control-bar.avia-layout-c-30 .avia-control-group-left,avia-control-bar.avia-layout-c-30 .avia-control-group-right{width:35%}avia-control-bar.avia-layout-c-30 .avia-control-group-center{width:30%}avia-control-bar.avia-layout-c-40 .avia-control-group-left,avia-control-bar.avia-layout-c-40 .avia-control-group-right{width:30%}avia-control-bar.avia-layout-c-40 .avia-control-group-center{width:40%}avia-control-bar.avia-layout-c-50 .avia-control-group-left,avia-control-bar.avia-layout-c-50 .avia-control-group-right{width:25%}avia-control-bar.avia-layout-c-50 .avia-control-group-center{width:50%}avia-control-bar.avia-layout-c-60 .avia-control-group-left,avia-control-bar.avia-layout-c-60 .avia-control-group-right{width:20%}avia-control-bar.avia-layout-c-60 .avia-control-group-center{width:60%}avia-control-bar.avia-layout-c-70 .avia-control-group-left,avia-control-bar.avia-layout-c-70 .avia-control-group-right{width:15%}avia-control-bar.avia-layout-c-70 .avia-control-group-center{width:70%}avia-control-bar[avia-layout=default] .avia-control-group-left,avia-control-bar[avia-layout=default] .avia-control-group-right{display:flex;flex-basis:auto}avia-control-bar[avia-layout=default] .avia-control-group-left{flex-grow:1}.avia-control-container-top{min-height:var(--avia-slider-handle-height)}.avia-control-group-left,.avia-control-group-right,.avia-control-group-center,.avia-control-group-left>*,.avia-control-group-right>*,.avia-control-group-center>*{display:flex;flex-basis:auto;align-items:center}.avia-control-group-center>*{flex-grow:1;justify-content:space-evenly}.avia-control-group-right,.avia-control-group-right>*{justify-content:flex-end}.avia-control-group-left>*{justify-content:flex-start}.avia-control-group-left>*>*{margin-right:var(--avia-half-spacing)}.avia-control-group-right>*>*{margin-left:var(--avia-half-spacing)}.avia-control-group-right avia-current-time{text-align:right}.avia-control-group-right avia-duration{text-align:right}avia-control-bar avia-progress-bar{position:relative;top:2px}.avia-control-group-left>*:empty,.avia-control-group-right>*:empty,.avia-control-group-center>*:empty{display:none}.avia-control-group-top{display:flex}.avia-control-group-top-left{flex-grow:1}'}};Tn(Nn,["active","controlMode","deviceMode","isLts","isIosNative","isLiveLinear","settings"]);const _n=class extends we{constructor(){super(),this.__registerHost(),this.currentTimeSeconds=void 0,this.localeData=void 0}render(){const e=this.currentTimeSeconds||0,t=this.localeData?It(e,this.localeData):"";return x(_,{"aria-label":t,title:t},Ft(e))}static get style(){return"avia-current-time{user-select:none;height:var(--avia-time-height);line-height:var(--avia-time-line-height);font-size:var(--avia-time-font-size);color:var(--avia-time-color);font-family:var(--avia-time-font-family)}"}};Tn(_n,["currentTimeSeconds","localeData"]);const In=class extends we{constructor(){super(),this.__registerHost(),this.durationSeconds=void 0,this.localeData=void 0}render(){const e=this.durationSeconds||0,t=this.localeData?It(e,this.localeData):"";return x(_,{"aria-label":t,title:t},Ft(this.durationSeconds||0))}static get style(){return"avia-duration{user-select:none;height:var(--avia-time-height);line-height:var(--avia-time-line-height);font-size:var(--avia-time-font-size);color:var(--avia-time-color);font-family:var(--avia-time-font-family)}"}};Tn(In,["durationSeconds","localeData"]);const On=class extends we{constructor(){super(),this.__registerHost(),this.disabledEvent=R(this,"disabled"),this.readyEvent=R(this,"ready"),this.fullscreen=!1,this.fullscreenDisabled=!0,this.compact=!1,this.label=void 0,this.labelledby=void 0,this.disabled=!1,this.focusIndex=0}focus(e){var t;null===(t=this.focusElement)||void 0===t||t.focus(e)}blur(){var e;null===(e=this.focusElement)||void 0===e||e.blur()}render(){return x("avia-button",{ref:e=>this.focusElement=e,ids:"".concat(St.FULL_SCREEN_ENTER,", ").concat(St.FULL_SCREEN_EXIT),actions:"".concat(ut.ENTER_FULLSCREEN,", ").concat(ut.EXIT_FULLSCREEN),focusIndex:this.focusIndex,label:this.label,labelledby:this.labelledby,disabled:this.disabled||this.fullscreenDisabled,toggled:this.fullscreen,compact:this.compact,icon:!0})}static get style(){return"avia-fullscreen-toggle avia-button{background-image:var(--avia-fs-icon)}avia-fullscreen-toggle avia-button:hover{background-image:var(--avia-fs-icon-hover)}avia-fullscreen-toggle avia-button[toggled]{background-image:var(--avia-fs-exit-icon)}avia-fullscreen-toggle avia-button[toggled]:hover{background-image:var(--avia-fs-exit-icon-hover)}"}};Tn(On,["fullscreen","fullscreenDisabled"]);const Dn=class extends we{constructor(){super(),this.__registerHost(),this.disabledEvent=R(this,"disabled"),this.readyEvent=R(this,"ready"),this.isLiveLinear=!1,this.isLts=!1,this.live=!1,this.label=void 0,this.labelledby=void 0,this.disabled=!1,this.focusIndex=0}focus(e){var t;null===(t=this.focusElement)||void 0===t||t.focus(e)}blur(){var e;null===(e=this.focusElement)||void 0===e||e.blur()}
2render(){if(!this.isLiveLinear&&!this.isLts)return;const e=this.live||this.isLiveLinear,t=e?St.LIVE:St.GO_LIVE;return x("avia-button",{ref:e=>this.focusElement=e,actions:"".concat(ut.NONE,", ").concat(ut.GO_TO_LIVE),toggled:!this.live,focusIndex:this.focusIndex,label:this.label,labelledby:this.labelledby,disabled:this.disabled||e},x("avia-text",{"loc-id":t}))}static get style(){return"avia-live-control{margin-right:var(--avia-default-spacing)}avia-live-control avia-button{width:auto;height:auto !important;font-size:0.9em;text-align:right;overflow:hidden}avia-live-control avia-button[disabled]{opacity:1;cursor:default}avia-live-control avia-button::before,avia-live-control avia-button[disabled]::before{content:'⢠';color:red;font-size:0.9em}"}};Tn(Dn,["isLiveLinear","live","isLts"]);const Rn=class extends we{constructor(){super(),this.__registerHost(),this.disabledEvent=R(this,"disabled"),this.actionEvent=R(this,"action"),this.readyEvent=R(this,"ready"),this.localeData=void 0,this.hasSubmenu=!1,this.locId=void 0,this.titlebar=!1,this.options=[],this.disabled=!1}onDisabledChange(e){this.disabledEvent.emit({disabled:e})}onAction(e){if(e.detail.action!==ut.LIST_ITEM_SELECT)return;const t=e.detail.value,n=t.key,i=t.value,r=this.element.querySelector('[data-key="'.concat(n,'"][data-value="').concat(i,'"]'));r&&this.selectListItem(r)}onKeydown(e){var t;if(this.disabled)return;const n=e.detail,i=n.avia;if(n.action===i.ActionKey.RIGHT){if(!this.hasSubmenu)return;null===(t=document.activeElement)||void 0===t||t.click()}}selectListItem(e){const t=this.element.querySelector("[selected]");t&&(t.selected=!1,t.disabled=!1),e.selected=!0}createDataAttributes(e){return Object.entries(e).reduce((e,t)=>(e["data-".concat(t[0])]=t[1],e),{})}onFocusIn(e){this.element.contains(e.relatedTarget)||this.actionEvent.emit({action:ut.ENTER_CONTEXT,value:ht.MENU})}onFocusOut(e){this.element.contains(e.relatedTarget)||this.actionEvent.emit({action:ut.EXIT_CONTEXT,value:ht.MENU})}focus(e){this.focusElement?this.focusElement.focus(e):this.element.addEventListener("ready",()=>{var t;return null===(t=this.focusElement)||void 0===t?void 0:t.focus(e)},{once:!0})}blur(){var e;null===(e=this.focusElement)||void 0===e||e.blur()}componentDidLoad(){this.readyEvent.emit()}render(){var e;const t=null===(e=this.localeData)||void 0===e?void 0:e[this.locId],n=this.hasSubmenu?ut.MENU_ITEM_SELECT:ut.LIST_ITEM_SELECT;return x(_,{"aria-label":t,role:"menu"},this.titlebar?x("div",{class:"avia-menu-titlebar"},t):"",x("div",{class:"avia-menu-content"},this.options.map((e,t)=>{const i=e.value,r=e.disabled,a=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n}(e,["value","disabled"]);return x("avia-menu-item",Object.assign({key:t,ref:e=>{0===t&&(this.focusElement=e)}},a,{hasSubmenu:this.hasSubmenu,disabled:this.disabled||r,action:n},this.createDataAttributes(i)))})))}get element(){return this}static get watchers(){return{disabled:["onDisabledChange"]}}static get style(){return"avia-menu{display:flex;flex-direction:column;font-size:0.95em;width:100%}.avia-menu-titlebar{padding-left:1em;color:var(--avia-accent-color);font-size:0.9em;font-weight:bold;height:2em;line-height:2em;background-color:black;border-bottom:1px solid #444}.avia-menu-content{scrollbar-width:thin;scrollbar-color:var(--avia-menu-text-color) transparent}.avia-menu-content::-webkit-scrollbar{width:8px;height:0}.avia-menu-content::-webkit-scrollbar-track{background-color:transparent}.avia-menu-content::-webkit-scrollbar-thumb{background-color:var(--avia-menu-text-color);border-radius:20px}.avia-menu-content::-webkit-scrollbar-thumb:hover{background-color:var(--avia-control-bar-btn-text-color-hover)}.avia-menu-content::-webkit-scrollbar-corner{background-color:transparent}"}};Tn(Rn,["localeData"]);const Pn=class extends we{constructor(){super(),this.__registerHost(),this.disabledEvent=R(this,"disabled"),this.readyEvent=R(this,"ready"),this.muted=!1,this.muteDisabled=!0,this.compact=!1,this.label="",this.labelledby=void 0,this.disabled=!1,this.focusIndex=0}focus(e){var t;null===(t=this.focusElement)||void 0===t||t.focus(e)}blur(){var e;null===(e=this.focusElement)||void 0===e||e.blur()}render(){return x("avia-button",{ref:e=>this.focusElement=e,ids:"".concat(St.MUTE,", ").concat(St.UNMUTE),actions:"".concat(ut.MUTE,", ").concat(ut.UNMUTE),toggled:this.muted,focusIndex:this.focusIndex,disabled:this.disabled||this.muteDisabled,label:this.label,labelledby:this.labelledby,compact:this.compact,icon:!0})}static get style(){return"avia-mute-toggle avia-button{background-image:var(--avia-u
2nmuted-icon)}avia-mute-toggle avia-button:hover{background-image:var(--avia-unmuted-icon-hover)}avia-mute-toggle avia-button[toggled]{background-image:var(--avia-mute-icon)}avia-mute-toggle avia-button[toggled]:hover{background-image:var(--avia-mute-icon-hover)}"}};Tn(Pn,["muted","muteDisabled"]);const Ln=class extends we{constructor(){super(),this.__registerHost(),this.localeData=void 0,this.titlebar=!0,this.back=!1,this.locId=void 0}render(){var e;const t=null===(e=this.localeData)||void 0===e?void 0:e[this.locId];return x("avia-control-group",{orientation:cn.VERTICAL},this.titlebar?x("avia-control-group",{class:"avia-panel-titlebar",orientation:cn.HORIZONTAL},this.back?x("avia-button",{"loc-id":St.BACK,class:"avia-panel-back-button",disabled:!1,actions:ut.PANEL_BACK,icon:!0}):"",x("span",null,t),x("span",{class:"avia-spacer"}),x("avia-button",{"loc-id":St.CLOSE,class:"avia-panel-close-button",disabled:!1,actions:ut.PANEL_CLOSE,icon:!0})):"",x("div",{class:"avia-panel-content"},x("slot",null)))}get element(){return this}static get style(){return"avia-panel{width:100%;height:100%}.avia-panel-titlebar{padding:0.5em 0.25em 0.5em 0.75em;color:var(--avia-accent-color);background-color:black;border-bottom:1px solid #444;display:flex;align-items:center;justify-content:center;font-weight:bold}.avia-panel-close-button{width:1.75em;height:2em;background-image:var(--avia-x-symbol);background-repeat:no-repeat;padding:0px}.avia-panel-back-button{width:1.75em;height:1.75em;background-image:var(--avia-chevron-right);background-repeat:no-repeat;background-size:47.5% 47.5%;transform:rotate(180deg);margin-right:1em}.avia-panel-content{display:flex;flex-direction:row;overflow:hidden}.avia-panel-content>div{width:180px;color:var(--avia-menu-text-color)}.avia-panel-content>div:first-child{border-right:1px solid #888}.avia-panel-content>div:only-child{border-right:none}"}};Tn(Ln,["localeData"]);const Mn=class extends we{constructor(){super(),this.__registerHost(),this.started=!1,this.playing=!1,this.waiting=!1}render(){if(this.started&&!this.waiting&&!this.playing)return x("avia-overlay",{centered:!0},x("div",null));this.started=!0}static get style(){return":root{--avia-pause-large-width:66px;--avia-pause-large-height:66px;--avia-pause-large-border-radius:calc(var(--avia-pause-large-width) / 2);--avia-pause-large-bg-image:var(--avia-pause-icon);--avia-pause-large-bg-position:50%;
2--avia-pause-large-bg-color:rgba(64, 64, 64, 0.5);--avia-pause-large-bg-size:calc(var(--avia-pause-large-width) / 2) calc(var(--avia-pause-large-height) / 2)}avia-pause-overlay div{width:var(--avia-pause-large-width);height:var(--avia-pause-large-height);background-image:var(--avia-pause-large-bg-image);background-repeat:no-repeat;background-position-x:calc(var(--avia-pause-large-bg-position) + 6%);background-position-y:var(--avia-pause-large-bg-position);background-size:var(--avia-pause-large-bg-size)}"}};Tn(Mn,["playing","waiting"]);const Fn=class extends we{constructor(){super(),this.__registerHost(),this.actionEvent=R(this,"action"),this.readyEvent=R(this,"ready"),this.playing=!1,this.controlMode=yt.NONE,this.playDisabled=!0,this.pausable=!0,this.isTouch=!1,this.focusIndex=0}onClick(){const e=this.playing?ut.PAUSE:ut.PLAY;this.actionEvent.emit({action:e})}focus(e){var t;null===(t=this.focusElement)||void 0===t||t.focus(e)}blur(){var e;null===(e=this.focusElement)||void 0===e||e.blur()}render(){const e=!this.playing;if((e||!this.isTouch)&&!this.playDisabled&&this.pausable&&this.controlMode===yt.CONTENT)return x("avia-overlay",{centered:!0},e?x("avia-play-cta",{ref:e=>this.focusElement=e}):"")}static get style(){return"avia-play-overlay{background-color:var(--avia-play-overlay-bg-color)}avia-play-overlay.focus-visible avia-play-cta{box-shadow:var(--avia-focus-box-shadow-inner)}"}};Tn(Fn,["controlMode","isTouch","pausable","playDisabled","playing"]);const Un=class extends we{constructor(){super(),this.__registerHost(),this.disabledEvent=R(this,"disabled"),this.readyEvent=R(this,"ready"),this.playing=!1,this.playDisabled=!0,this.pausable=void 0,this.compact=!1,this.label=void 0,this.labelledby=void 0,this.disabled=!1,this.focusIndex=0}focus(e){var t;null===(t=this.focusElement)||void 0===t||t.focus(e)}blur(){var e;null===(e=this.focusElement)||void 0===e||e.blur()}render(){const e=!this.playing,t=[St.PLAY,this.pausable?St.PAUSE:St.STOP],n=[ut.PLAY,this.pausable?ut.PAUSE:ut.STOP],i=e?this.pausable?St.PAUSE:St.STOP:St.PLAY;return x("avia-button",{ref:e=>this.focusElement=e,ids:t.join(","),actions:n.join(","),focusIndex:this.focusIndex,disabled:this.disabled||this.playDisabled,label:this.label,labelledby:this.labelledby,"loc-id":i,toggled:this.playing,compact:this.compact,variant:!this.pausable,icon:!0})}static get style(){return"avia-play-toggle avia-button{background-image:var(--avia-play-icon)}avia-play-toggle avia-button:hover{background-image:var(--avia-play-icon-hover)}avia-play-toggle avia-button[toggled]{background-image:var(--avia-pause-icon)}avia-play-toggle avia-button[toggled]:hover{background-image:var(--avia-pause-icon-hover)}avia-play-toggle avia-button[toggled][variant]{background-image:var(--avia-stop-icon)}avia-play-toggle avia-button[toggled][variant]:hover{background-image:var(--avia-stop-icon-hover)}"}};Tn(Un,["playing","playDisabled","pausable"]);const Bn=class extends we{constructor(){super(),this.__registerHost(),this.actionEvent=R(this,"action"),this.canceled=!1,this.posterActive=!1,this.posterImageUrl=void 0,this.playing=!1,this.waiting=!1}playingStateWatcher(){this.canceled=!0}waitingStateWatcher(){this.canceled=!0}handleAction(e){this.canceled=!0,this.actionEvent.emit({action:ut.POSTER_PLAY}),Rt(e,!0)}render(){return this.canceled||!this.posterActive?"":x("avia-overlay",null,Mt(this.posterImageUrl)?"":x("img",{src:this.posterImageUrl,alt:""}),x("div",{class:""},x("slot",null)),x("avia-overlay",{centered:!0},x("avia-play-cta",null)))}static get watchers(){return{playing:["playingStateWatcher"],waiting:["waitingStateWatcher"]}}static get style(){return"avia-poster img{width:100%;height:auto}"}};Tn(Bn,["playing","posterActive","posterImageUrl","waiting"]);const jn=class extends we{constructor(){super(),this.__registerHost(),this.disabledEvent=R(this,"disabled"),this.readyEvent=R(this,"ready"),this.actionEvent=R(this,"action"),this.updateEvent=R(this,"update"),this.engagedEvent=R(this,"engaged"),this.hoverDelay=250,this.engaged=!1,this.imgElement=document.createElement("img"),this.dragging=!1,this.bufferedRanges=void 0,this.currentTimeSeconds=void 0,this.durationSeconds=void 0,this.live=!1,this.localeData=void 0,this.options=void 0,this.segmentBreakPositions=void 0,this.preview=void 0,this.increment=15,this.progressMode=null,this.label=void 0,this.labelledby=void 0,this.disabled=!1,this.focusIndex=0,this.hovering=!1,this.cursor=0,this.value=0}focus(e){const t=()=>{this.focusElement.focus(e)};this.focusElement?t():this.element.addEventListener("ready",t,{once:!0})}blur(){var e;null===(e=this.focusElement)||void 0===e||e.blur()}showPreview(e){return p(this,null,function*(){if(isNaN(e))return this.triggerEngaged(!1),void this.onCurrentTimeSeconds();this.focus(),this.value=e})}hidePreview(){return p(this,null,function*(){this.engaged&&(this.triggerEngaged(!1),this.onCurrentTimeSeconds())})}onCurrentTimeSeconds(){this.cursorActive||this.engaged||(this.value=this.live?this.durationSeconds:this.currentTimeSeconds)}onMouseEnter(e){this.engaged||(clearTimeout(this.hoverTimeoutHandle),this.hoverTimeoutHandle=setTimeout(()=>{this.hovering=!0,this.onMouseMove(e)},this.hoverDelay))}onMouseLeave(){clearTimeout(this.hoverTimeoutHandle),this.hovering=!1}onMouseMove(e){if(!this.mouseActive)return;const t=this.sliderElement.getBoundingClientRect(),n=jt((Ot(e).x-t.left)/t.width,0,1);this.cursor=n,this.actionEvent.emit({action:ut.PREVIEW,value:{time:n*this.durationSeconds,percent:n}})}onKeydown(e){if(this.progressMode!==Ht.CURSOR)return;const t=t=>{Rt(e),this.triggerEngaged(t)},n=e.detail,i=n.action,r=n.avia.ActionKey;switch(i){case r.LEFT:case r.RIGHT:t(!0);break;case r.SELECT:if(!this.engaged)return;t(!1),this.value=this.sliderElement.value,this.actionEvent.emit({action:ut.SEEK,value:this.sliderElement.value});break;case r.CANCEL:if(!this.engaged)return;t(!1),this.resetCursor(),this.sliderElement.value=this.value}}get active(){return this.mouseActive||this.previewActive||this.cursorActive}get cursorActive(){return this.progressMode===Ht.CURSOR&&this.engaged}get previewActive(){return this.mouseActive||this.engaged}
2get mouseActive(){return this.hovering||this.dragging}onChange(e){this.progressMode!==Ht.CURSOR&&this.actionEvent.emit({action:ut.SEEK,value:e.detail.value})}onDragging(e){this.dragging=e.detail.value}onFocus(){this.actionEvent.emit({action:ut.ENTER_CONTEXT,value:ht.SEEK})}onBlur(){this.actionEvent.emit({action:ut.EXIT_CONTEXT,value:ht.SEEK}),this.resetCursor(),this.triggerEngaged(!1)}onClick(){if(this.progressMode!==Ht.CURSOR)return;const e=this.cursor*this.durationSeconds;this.value=e,this.actionEvent.emit({action:ut.SEEK,value:e})}onUpdate(e){if(!this.engaged||this.dragging||this.hovering)return;const t=e.detail.percent;this.cursor=t,this.actionEvent.emit({action:ut.PREVIEW,value:{time:t*this.durationSeconds,percent:t}})}hasPreview(){var e,t;return!!(null===(t=null===(e=this.preview)||void 0===e?void 0:e.thumbs)||void 0===t?void 0:t.length)}resetCursor(){this.cursor=this.value/this.sliderElement.max}triggerEngaged(e){if(this.engaged===e)return;this.engaged=e;const t=e?ut.ENTER_CONTEXT:ut.EXIT_CONTEXT;this.actionEvent.emit({action:t,value:ht.SLIDER_ENGAGED}),this.engagedEvent.emit({value:e,engaged:e}),this.actionEvent.emit({action:ut.LOCK_ACTIVE,value:{locked:e}}),this.actionEvent.emit({action:ut.PREVIEW,value:{time:this.value,percent:this.value/this.durationSeconds}})}componentWillLoad(){var e,t;null!==(e=this.progressMode)&&void 0!==e||(this.progressMode=(null===(t=this.options)||void 0===t?void 0:t.progressMode)||Ht.VALUE)}componentDidRender(){const e=this.sliderElement.offsetWidth;if(this.hasPreview()){const t=e*this.preview.thumbnailScaleFactor,n=this.imgElement,i=this.preview.thumbs.reduce((e,n)=>e?Math.abs(t-e.width)>Math.abs(t-n.width)?n:e:n,null),r=()=>{const e=this.canvasElement,r=Math.min(t/i.width,1),a=e.getContext("2d"),o=i.width*r,s=i.height*r;e.width=o,e.height=s,a.drawImage(n,i.x,i.y,i.width,i.height,0,0,o,s)};i&&(n.src!==i.url?(n.src=i.url,n.onload=r):r())}const t=this.previewElement,n=t.offsetWidth/2,i=e-n,r=this.cursor*e,a=r<n?n-r:r>i?i-r:0;t.style.marginLeft="".concat(a-n,"px")}render(){var e;const t=_t(this.segmentBreakPositions).map(e=>({value:parseFloat(e)})),n={};return this.label||this.labelledby||!this.localeData||(n["aria-valuetext"]=function(e,t,n){const i=It(e,n),r=It(t,n);return function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"{{",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"}}";if(!e)return e;const r=new RegExp("".concat(n,"((?:(?!(").concat(n,"|").concat(i,")).)+)").concat(i),"g");return e.replace(r,(e,n)=>function(e){return void 0===e}(t[n])?e:t[n])}(n[St.VALUE_OF_TOTAL],{value:i,total:r})}(Math.round(this.value),Math.round(this.durationSeconds),this.localeData)),x("avia-slider",Object.assign({ref:e=>this.focusElement=this.sliderElement=e,"loc-id":St.SEEK,list:t,value:this.value,max:this.durationSeconds,ranges:this.bufferedRanges,increment:this.increment,onChange:e=>this.onChange(e),onDragging:e=>this.onDragging(e),onUpdate:e=>this.onUpdate(e),onFocus:()=>this.onFocus(),onBlur:()=>this.onBlur(),onClick:()=>this.onClick(),focusIndex:this.focusIndex,disabled:this.disabled,label:this.label,labelledby:this.labelledby},n),x("div",{ref:e=>this.previewElement=e,class:"avia-progress-preview",style:{visibility:this.active?"visible":"hidden",left:Dt(this.cursor)}},x("canvas",{ref:e=>this.canvasElement=e,class:"avia-progress-img",style:{display:this.hasPreview()&&this.imgElement.complete?"block":"none"}}),x("div",{ref:e=>this.textElement=e,class:"avia-progress-text"},null===(e=this.preview)||void 0===e?void 0:e.value)),x("slot",{name:"handle"}))}get element(){return this}static get watchers(){return{currentTimeSeconds:["onCurrentTimeSeconds"],live:["onCurrentTimeSeconds"]}}static get style(){return":root{--avia-progress-preview-height:24px;--avia-progress-preview-width:50px;--avia-progress-preview-line-height:24px;--avia-progress-preview-top:-34px;--avia-progress-preview-bg-color:rgba(44, 44, 44, 0.7);--avia-progress-preview-color:rgb(220, 220, 220);--avia-progress-preview-font-size:13px;--avia-progress-preview-border-radius:4px}avia-progress-bar .avia-slider-range-item{background-color:var(--avia-buffered-range-background-color)}avia-progress-bar.focus-visible{outline:none}.avia-progress-preview{position:absolute;line-height:var(--avia-progress-preview-line-height);background:var(--avia-progress-preview-bg-color);color:var(--avia-progress-preview-color);font-size:var(--avia-progress-preview-font-size);text-align:center;border-radius:var(--avia-progress-preview-border-radius);user-select:none;overflow:hidden;bottom:1em;margin-bottom:calc(var(--avia-slider-handle-height) / 2)}.avia-progress-text{padding:0 0.5em 0 0.5em;white-space:nowrap}"}};Tn(jn,["bufferedRanges","currentTimeSeconds","cursorPosition","durationSeconds","live","localeData","options","preview","segmentBreakPositions"]);const Vn=class extends we{constructor(){super(),this.__registerHost(),this.accIndicatorState=void 0}render(){const e=this.accIndicatorState,t=e.seekForward,n=e.seekBack,i=e.multiplier;return(t||n)&&i?x(_,{class:t?At.ACC_FWD:At.ACC_BACK}
2,x("span",null,i,"x"),x("div",{class:"avia-acc-arrow"})):""}static get style(){return"avia-scrub-indicator{position:absolute;display:inline-block;box-sizing:border-box;border-radius:var(--avia-seek-indicator-border-radius);background-color:var(--avia-seek-indicator-background-color);color:var(--avia-seek-indicator-color);height:var(--avia-seek-indicator-height);font-size:var(--avia-seek-indicator-font-size);font-family:var(--avia-seek-indicator-font-family);line-height:var(--avia-seek-indicator-line-height);top:calc(50% - 24px)}avia-scrub-indicator.avia-acc-fwd{right:12px;padding-left:48px;padding-right:12px;text-align:right}avia-scrub-indicator.avia-acc-back{left:12px;padding-right:48px;padding-left:12px}avia-scrub-indicator .avia-acc-arrow{width:24px;height:18px;position:absolute;top:calc(50% - 9px);background-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 -256 512 512' version='1.1' width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform='matrix(0.31427155,0,0,-0.31427155,-24.298031,281.39149)'%3E%3Cpath d='m 181.67796,150.76271 q -19,-19 -32,-13 -12.99999,6 -12.99999,32 V 1641.7627 q 0,26 12.99999,32 13,6 32,-13 l 710,-709.99999 q 8,-8 13,-19 v 709.99999 q 0,26 13,32 13,6 32,-13 L 1659.678,950.76271 q 19,-19 19,-45 0,-26 -19,-45 l -710.00004,-710 q -19,-19 -32,-13 -13,6 -13,32 v 710 q -5,-10 -13,-19 z' style='fill:%23ffffff' /%3E%3C/g%3E%3C/svg%3E\");background-repeat:no-repeat;background-size:24px 18px}avia-scrub-indicator.avia-acc-fwd .avia-acc-arrow{left:12px}avia-scrub-indicator.avia-acc-back .avia-acc-arrow{transform:rotate(180deg);right:12px}"}};Tn(Vn,["accIndicatorState"]);const Hn=class extends we{constructor(){super(),this.__registerHost(),this.disabledEvent=R(this,"disabled"),this.readyEvent=R(this,"ready"),this.seekBackDisabled=!1,this.isLiveLinear=!1,this.label=void 0,this.labelledby=void 0,this.disabled=!1,this.focusIndex=0}focus(e){var t;null===(t=this.focusElement)||void 0===t||t.focus(e)}blur(){var e;null===(e=this.focusElement)||void 0===e||e.blur()}render(){return this.isLiveLinear?"":x("avia-button",{ref:e=>this.focusElement=e,actions:ut.SEEK_BACK,focusIndex:this.focusIndex,disabled:this.disabled||this.seekBackDisabled,label:this.label,labelledby:this.labelledby,"loc-id":St.SEEK_BACK,icon:!0})}static get style(){return"avia-seek-back-button avia-button{background-image:var(--avia-seek-back-icon)}avia-seek-back-button avia-button:hover{background-image:var(--avia-seek-back-icon-hover)}"}};Tn(Hn,["seekBackDisabled","isLiveLinear"]);const zn=class extends we{constructor(){super(),this.__registerHost(),this.disabledEvent=R(this,"disabled"),this.readyEvent=R(this,"ready"),this.seekForwardDisabled=!1,this.isLiveLinear=!1,this.label=void 0,this.labelledby=void 0,this.disabled=!1,this.focusIndex=0}focus(e){var t;null===(t=this.focusElement)||void 0===t||t.focus(e)}blur(){var e;null===(e=this.focusElement)||void 0===e||e.blur()}render(){return this.isLiveLinear?"":x("avia-button",{ref:e=>this.focusElement=e,actions:ut.SEEK_FORWARD,focusIndex:this.focusIndex,disabled:this.disabled||this.seekForwardDisabled,label:this.label,labelledby:this.labelledby,"loc-id":St.SEEK_FORWARD,icon:!0})}static get style(){return"avia-seek-forward-button avia-button{background-image:var(--avia-seek-forward-icon)}avia-seek-forward-button avia-button:hover{background-image:var(--avia-seek-forward-icon-hover)}"}};Tn(zn,["seekForwardDisabled","isLiveLinear"]);const Kn=class extends we{constructor(){super(),this.__registerHost(),this.durationSeconds=void 0,this.accIndicatorState=void 0}componentDidRender(){!this.debouncer&&this.accIndicatorState.displayTime>0&&(this.debouncer=Lt(()=>{var e;null===(e=this.el)||void 0===e||e.classList.remove(At.INDICATOR_ACTIVE),this.visible=!1},this.accIndicatorState.displayTime)),this.visible&&(setTimeout(()=>this.el.classList.add(At.INDICATOR_ACTIVE),0),this.debouncer&&this.debouncer())}render(){const e=this.accIndicatorState;if(!e.seekForward&&!e.seekBack||e.multiplier)return this.visible=!1,"";this.visible=!0;const t=this.accIndicatorState.seekTime,n=this.durationSeconds;let i="";if(n&&!isNaN(n)){const e=Ft(n);!isNaN(t)&&t>=0&&(i=Ft(t)+" / "+e)}return x(_,{class:e.seekForward?At.ACC_FWD:At.ACC_BACK}
2,x("span",null,i),x("div",{class:"avia-acc-arrow"}))}get el(){return this}static get style(){return"avia-seek-indicator{position:absolute;display:inline-block;box-sizing:border-box;border-radius:var(--avia-seek-indicator-border-radius);background-color:var(--avia-seek-indicator-background-color);color:var(--avia-seek-indicator-color);height:var(--avia-seek-indicator-height);font-size:var(--avia-seek-indicator-font-size);font-family:var(--avia-seek-indicator-font-family);line-height:var(--avia-seek-indicator-line-height);top:calc(50% - 24px);opacity:0;transition-property:opacity;transition-duration:300ms;transition-timing-function:ease-in}avia-seek-indicator.avia-indicator-active{opacity:1}avia-seek-indicator:empty{opacity:0}.avia-acc-fwd{right:12px;padding-left:48px;padding-right:12px;text-align:right}.avia-acc-back{left:12px;padding-right:48px;padding-left:12px}avia-seek-indicator .avia-acc-arrow{width:24px;height:18px;position:absolute;top:calc(50% - 9px);background-image:url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2017.81%2024%22%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill%3A%23fff%3B%7D%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cg%20id%3D%22Layer_2%22%20data-name%3D%22Layer%202%22%3E%3Cg%20id%3D%22Layer_2-2%22%20data-name%3D%22Layer%202%22%3E%3Cpath%20class%3D%22cls-1%22%20d%3D%22M0%2C6.55V17.79a.54.54%2C0%2C0%2C0%2C.54.54l5.15-.08a.54.54%2C0%2C0%2C1%2C.54.54v4.67a.54.54%2C0%2C0%2C0%2C.92.38l10.51-11.2a.56.56%2C0%2C0%2C0%2C0-.76L7.25.17a.54.54%2C0%2C0%2C0-.93.37V5.39a.54.54%2C0%2C0%2C1-.54.54L.54%2C6A.54.54%2C0%2C0%2C0%2C0%2C6.55Z%22%2F%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E');background-repeat:no-repeat;background-size:24px 18px}.avia-acc-fwd .avia-acc-arrow{left:12px}.avia-acc-back .avia-acc-arrow{transform:rotate(180deg);right:12px}"}};Tn(Kn,["durationSeconds","accIndicatorState"]);const Wn=class extends we{constructor(){super(),this.__registerHost(),this.actionEvent=R(this,"action"),this.readyEvent=R(this,"ready"),this.settings=null,this.localeData=null,this.controlMode=null,this.deviceMode=Tt.DESKTOP,this.options=void 0,this.qualityLabel=0,this.currentId=St.SETTINGS,this.menu=void 0}onMenuChange(e){e&&this.menu&&this.menu.focus()}onAction(e){switch(e.detail.action){case ut.PANEL_BACK:this.currentId=St.SETTINGS;break;case ut.PANEL_CLOSE:this.close();break;case ut.MENU_ITEM_SELECT:this.currentId=e.detail.value.action}}onKeyDown(e){var t;if(!(null===(t=this.settings)||void 0===t?void 0:t.active))return;const n=e.detail,i=n.avia;n.action===i.ActionKey.CANCEL&&this.close()}onFocusIn(e){this.element.contains(e.relatedTarget)||this.actionEvent.emit({action:ut.ENTER_CONTEXT,value:ht.PANEL})}onFocusOut(e){this.element.contains(e.relatedTarget)||this.actionEvent.emit({action:ut.EXIT_CONTEXT,value:ht.PANEL})}close(){return p(this,null,function*(){this.actionEvent.emit({action:ut.SETTINGS_OFF})})}focus(e){this.menu?this.menu.focus(e):this.element.addEventListener("ready",()=>this.menu.focus(e),{once:!0})}blur(){var e;null===(e=this.menu)||void 0===e||e.blur()}componentDidLoad(){this.readyEvent.emit()}render(){var e,t;if((null===(e=this.settings)||void 0===e?void 0:e.active)&&this.localeData){if(this.controlMode===yt.CONTENT||!(null===(t=this.settings)||void 0===t?void 0:t.active))return this.deviceMode===Tt.TV?x("avia-settings-language",{ref:e=>this.menu=e}):x("avia-panel",{locId:this.currentId,back:this.currentId!==St.SETTINGS},this.getMenu());this.close()}}getMenu(){switch(this.currentId){case St.SETTINGS:const e=[];return this.settings.languageEnabled&&e.push({label:this.localeData[St.LANGUAGE],value:{action:St.LANGUAGE}}),this.settings.qualityEnabled&&e.push({label:this.localeData[St.QUALITY],value:{action:St.QUALITY}}),x("avia-menu",{ref:e=>this.menu=e,locId:St.SETTINGS,key:St.SETTINGS,options:e,titlebar:!1,hasSubmenu:!0});case St.LANGUAGE:return x("avia-settings-language",{ref:e=>this.menu=e,key:St.LANGUAGE});case St.QUALITY:return x("avia-settings-quality",{key:St.QUALITY,ref:e=>this.menu=e})}}get element(){return this}static get watchers(){return{menu:["onMenuChange"]}}static get style(){return":root{--avia-chevron-right:url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22white%22%3E%3Cpath%20id%3D%22Arrow_2_1%22%20d%3D%22M0%2C24L14.4%2C11.556%2C0%2C0%2C6.74%2C0%2C24%2C11.556%2C6.74%2C24Z%22%2F%3E%3C%2Fsvg%3E');--avia-x-symbol:url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2012%2012%22%20width%3D%2212%22%20height%3D%2212%22%3E%3Cstyle%3Etspan%20%7B%20white-space%3Apre%20%7D%3C%2Fstyle%3E%3Cpath%20fill%3D%22%23FFF%22%20d%3D%22M0.07%202.19L2.26%200L5.91%203.65L9.56%200L11.75%202.19L8.1%205.84L11.75%209.49L9.56%2011.68L5.91%208.03L2.26%2011.68L0.07%209.49L3.72%205.84L0.07%202.19Z%22%20%2F%3E%3C%2Fsvg%3E');--avia-menu-text-color:var(--avia-text-color);--avia-menu-text-size:var(--avia-text-size);--avia-menu-text-color-hover:var(--avia-text-color-hover)}avia-settings{display:flex;align-self:flex-end;pointer-events:none;min-width:180px;height:auto;background-color:rgba(0, 0, 0, 0.65);flex-direction:column;max-height:calc(100% - 1em - var(--avia-control-bar-height));border-radius:0.25em;overflow:hidden;position:absolute;bottom:64px;right:var(--avia-default-spacing)}avia-settings>*{pointer-events:auto}.avia-settings-nudge-left avia-settings{right:calc(var(--avia-default-spacing) + 48px)}[device-mode=tv] avia-settings{bottom:118px}"}};Tn(Wn,["controlMode","deviceMode","localeData","options","qualityLabel","settings"]);const Gn=class extends we{constructor(){super(),this.__registerHost(),this.actionEvent=R(this,"action"),this.readyEvent=R(this,"ready"),this.localeData=void 0,this.settings=void 0}onAction(e){if(e.detail.action===ut.LIST_ITEM_SELECT){const t=e.detail.value,n=t.key,i=t.value;this.actionEvent.emit({action:ut.LANGUAGE_SELECT,value:{trackType:n,trackId:i}})}}focus(e){this.focusElement?this.focusElement.focus(e):this.element.addEventListener("ready",()=>this.focusElement.focus(e),{once:!0})}blur(){var e;null===(e=this.focusElement)||void 0===e||e.blur()}componentDidLoad(){this.readyEvent.emit()}render(){const e=this.settings,t=e.audioTrack,n=e.audioTracks,i=null==t?void 0:t.id,r=n.map(e=>({selected:e.id===i,disabled:1===n.length,label:Pt(e.language)||this.localeData[St.UNKNOWN],value:{key:"audio",value:e.id,description:"description"===e.type,spatial:e.spatialAudio}}));if(null==r?void 0:r.length)return x("avia-menu",{ref:e=>this.focusElement=e,locId:St.AUDIO,options:r,titlebar:!0})}
2get element(){return this}static get style(){return""}};Tn(Gn,["localeData","settings"]);const qn=class extends we{constructor(){super(),this.__registerHost(),this.localeData=void 0,this.settings=void 0}focus(e){this.focusElement?this.focusElement.focus(e):this.element.addEventListener("ready",()=>this.focusElement.focus(e),{once:!0})}blur(){var e;null===(e=this.focusElement)||void 0===e||e.blur()}render(){return x(_,{role:"menubar"},x("avia-settings-text",{ref:e=>this.focusElement=e}),x("avia-settings-audio",null))}get element(){return this}static get style(){return"avia-settings-language{display:flex;flex-direction:row}avia-menu{min-width:180px}"}};Tn(qn,["localeData","settings"]);const Yn=class extends we{constructor(){super(),this.__registerHost(),this.actionEvent=R(this,"action"),this.readyEvent=R(this,"ready"),this.localeData=void 0,this.settings=void 0,this.qualityLabel=0}onAction(e){e.detail.action===ut.LIST_ITEM_SELECT&&this.actionEvent.emit({action:ut.QUALITY_SELECT,value:{index:parseInt(e.detail.value.value)}})}getQualityLabel(e){var t;if(null===(t=e.category)||void 0===t?void 0:t.length)return e.category[this.qualityLabel||0]}focus(e){this.focusElement?this.focusElement.focus(e):this.element.addEventListener("ready",()=>this.focusElement.focus(e),{once:!0})}blur(){var e;null===(e=this.focusElement)||void 0===e||e.blur()}componentDidLoad(){this.readyEvent.emit()}render(){const e=this.settings,t=e.quality,n=e.qualities,i=e.qualityAuto,r=n.reduce((e,t)=>{const n=this.getQualityLabel(t),i=e.find(e=>e.label===n);return t.enabled&&(i?t.bitrate>i.value.bitrate&&(i.value.value=t.index,i.value.bitrate=t.bitrate):e.push({label:n,value:{key:"quality",value:t.index,bitrate:t.bitrate}})),e},[]),a=this.getQualityLabel(t),o=1===r.length,s=r.map(e=>Object.assign(Object.assign({},e),{selected:o||!i&&e.label===a,disabled:o})).sort((e,t)=>t.value.bitrate-e.value.bitrate);return s.length>1&&s.unshift({selected:i,disabled:!1,label:"".concat(this.localeData[St.AUTO]," (").concat(a,")"),value:{key:"quality",value:-1}}),x(_,null,x("avia-menu",{ref:e=>this.focusElement=e,locId:St.QUALITY,options:s,titlebar:!1}))}get element(){return this}static get style(){return"avia-settigs-quality{display:flex;flex-direction:row}avia-menu{min-width:180px}"}};Tn(Yn,["localeData","settings","qualityLabel"]);const Qn=class extends we{constructor(){super(),this.__registerHost(),this.actionEvent=R(this,"action"),this.readyEvent=R(this,"ready"),this.localeData=void 0,this.settings=void 0}onAction(e){if(e.detail.action===ut.LIST_ITEM_SELECT){const t=e.detail.value,n=t.key,i=t.value;this.actionEvent.emit({action:ut.LANGUAGE_SELECT,value:{trackType:n,trackId:i}})}}focus(e){this.focusElement?this.focusElement.focus(e):this.element.addEventListener("ready",()=>this.focusElement.focus(e),{once:!0})}blur(){var e;null===(e=this.focusElement)||void 0===e||e.blur()}componentDidLoad(){this.readyEvent.emit()}render(){const e=this.settings,t=e.textTrack,n=e.textTracks,i=null==t?void 0:t.id,r=n.map(e=>({selected:e.id===i,disabled:1===n.length,label:Pt(e.language)||this.localeData[St.UNKNOWN],value:{key:"text",value:e.id}}));if(null==r?void 0:r.length)return x("avia-menu",{ref:e=>this.focusElement=e,locId:St.CAPTIONS,options:r,titlebar:!0})}get element(){return this}static get style(){return""}};Tn(Qn,["localeData","settings"]);const Xn=class extends we{constructor(){super(),this.__registerHost(),this.disabledEvent=R(this,"disabled"),this.readyEvent=R(this,"ready"),this.settings=void 0,this.settingsDisabled=!0,this.label=void 0,this.labelledby=void 0,this.disabled=!1,this.focusIndex=0}focus(e){var t;null===(t=this.focusElement)||void 0===t||t.focus(e)}blur(){var e;null===(e=this.focusElement)||void 0===e||e.blur()}render(){var e;const t=!0===(null===(e=this.settings)||void 0===e?void 0:e.active);return x("avia-button",{ref:e=>this.focusElement=e,actions:"".concat(ut.SETTINGS_ON,",").concat(ut.SETTINGS_OFF),focusIndex:this.focusIndex,disabled:this.disabled||this.settingsDisabled,label:this.label,labelledby:this.labelledby,"loc-id":St.SETTINGS,"aria-haspopup":"true","aria-expanded":t?"true":"false",toggled:t,icon:!0})}static get style(){return"avia-settings-toggle avia-button{background-image:var(--avia-settings-icon)}avia-settings-toggle avia-button:hover{background-image:var(--avia-settings-icon-hover)}"}};Tn(Xn,["settings","settingsDisabled"]);const Zn=class extends we{constructor(){super(),this.__registerHost(),this.disabledEvent=R(this,"disabled"),this.readyEvent=R(this,"ready"),this.actionEvent=R(this,"action"),this.changeEvent=R(this,"change"),this.inputEvent=R(this,"input"),this.updateEvent=R(this,"update"),this.draggingEvent=R(this,"dragging"),this.dragging=!1,this.localeData=void 0,this.deviceMode=void 0,this.locId=void 0,this.min=0,this.max=1,this.value=1,this.ranges=[],this.list=[],this.increment=.1,this.label="",this.labelledby="",this.disabled=!1,this.focusIndex=0,this.valueInternal=this.value}onDisabledChange(e){this.disabledEvent.emit({disabled:e})}componentDidLoad(){this.readyEvent.emit()}onValueInternalChange(){this.update()}onValueChange(e){this.dragging||(e<this.min?this.value=this.min:e>this.max?this.value=this.max:this.valueInternal=e)}onMinChange(e,t){isNaN(this.min)||isNaN(this.max)||(this.value=Bt(this.value,t||this.min,this.max,e,this.max))}onMaxChange(e,t){isNaN(this.min)||isNaN(this.max)||(this.value=Bt(this.value,this.min,t||this.max,this.min,e))}onListChange(e){e||(this.list=[],this.update())}onMouseDown(e){var t;this.disabled||null===(t=this.gestureStartDebouncer)||void 0===t||t.call(this,e)}onMouseMove(e){!this.disabled&&this.dragging&&(Rt(e),this.move(e))}onMouseUp(e){var t;this.disabled||null===(t=this.gestureEndDebouncer)||void 0===t||t.call(this,e)}onKeydown(e){if(this.disabled)return;const t=e.detail,n=t.action,i=t.avia.ActionKey,r=t=>{const n=this.value+=t;this.input(n),this.change(n),Rt(e)};switch(n){case i.RIGHT:r(this.increment);break;case i.LEFT:r(-this.increment);break;case i.UP:this.deviceMode===Tt.DESKTOP&&r(this.increment);break;case i.DOWN:this.deviceMode===Tt.DESKTOP&&r(-this.increment)}}move(e){const t=this.element.getBoundingClientRect(),n=Ot(e);if(null===n.x)return;const i=Bt(jt((n.x-t.left)/t.width,0,1),0,1,this.min,this.max);this.input(i)}toPercent(e){return Dt(Bt(e,this.min,this.max))}update(){const e=this.list,t=this.max,n=this.min,i=this.value;this.updateEvent.emit({value:i,min:n,max:t,list:e,percent:Bt(i,n,t)})}input(e){const t=this.valueInternal,n=jt(e,this.min,this.max);this.valueInternal=n,this.inputEvent.emit({value:n,previous:t})}
2change(e){const t=this.value,n=jt(e,this.min,this.max);this.value=n,this.changeEvent.emit({value:n,previous:t})}connectedCallback(){this.gestureStartDebouncer=Lt(e=>{e.which>1||e.button>0||(Rt(e),this.dragging=!0,this.draggingEvent.emit({value:!0}),this.move(e))},200),this.gestureEndDebouncer=Lt(e=>{this.dragging&&(Rt(e),this.dragging=!1,this.draggingEvent.emit({value:!1}),this.move(e),this.change(this.valueInternal))},200),Promise.resolve().then(()=>this.valueInternal=this.value)}disconnectedCallback(){var e,t;null===(e=this.gestureStartDebouncer)||void 0===e||e.cancel(),null===(t=this.gestureEndDebouncer)||void 0===t||t.cancel()}onFocus(){this.actionEvent.emit({action:ut.ENTER_CONTEXT,value:ht.SLIDER})}onBlur(){this.actionEvent.emit({action:ut.EXIT_CONTEXT,value:ht.SLIDER})}focus(e){!0===(null==e?void 0:e.focusVisible)&&(this.element.classList.add("focus-visible"),this.element.dataset.focusVisibleAdded=""),we.prototype.focus.call(this.element,e)}render(){var e;const t=this.toPercent(this.valueInternal),n={"aria-label":this.label||(null===(e=this.localeData)||void 0===e?void 0:e[this.locId])};return this.labelledby&&(n["aria-labelledby"]=this.labelledby),this.label||Object.assign(n,{role:"slider","aria-valuemin":Math.round(this.min),"aria-valuemax":Math.round(this.max),"aria-valuenow":Math.round(this.value)}),x(_,Object.assign({tabindex:this.disabled?-1:this.focusIndex},n),x("div",{class:"avia-slider-track"},x("div",{class:"avia-slider-ranges"},this.ranges.map((e,t)=>x("div",{class:"avia-slider-range-item",key:t,style:{left:this.toPercent(e.start),width:this.toPercent(e.end-e.start)}}))),x("div",{class:"avia-slider-value",style:{width:t}}),x("div",{class:"avia-slider-list"},this.list.map(e=>x("div",{class:"avia-slider-list-item",key:e.value,style:{left:this.toPercent(e.value)}})))),x("slot",null),x("div",{class:"avia-slider-handle-container",style:{left:t}},x("slot",{name:"handle"},x("div",{class:"avia-slider-handle"}))))}get element(){return this}static get watchers(){return{disabled:["onDisabledChange"],valueInternal:["onValueInternalChange"],value:["onValueChange"],min:["onMinChange"],max:["onMaxChange"],list:["onListChange"]}}static get style(){return":root{--avia-slider-height:12px;--avia-slider-color:var(--avia-accent-color);--avia-slider-handle-color:var(--avia-accent-color);--avia-slider-track-color:#444;--avia-slider-track-radius:2px;--avia-slider-value-height:4px;--avia-slider-handle-width:12px;--avia-slider-handle-height:12px;--avia-slider-handle-radius:12px}avia-slider{display:block;height:var(--avia-slider-height);cursor:pointer;position:relative;box-shadow:none;outline:none}avia-slider.focus-visible{box-shadow:none;outline:none}.avia-slider-track{position:absolute;width:100%;height:var(--avia-slider-value-height);top:calc((var(--avia-slider-height) - var(--avia-slider-value-height)) * 0.5);background:var(--avia-slider-track-color);border-radius:var(--avia-slider-track-radius);overflow:hidden}.avia-slider-value{position:absolute;height:var(--avia-slider-value-height);top:0;background-color:var(--avia-slider-color)}.avia-slider-handle-container{position:absolute}.avia-slider-handle{width:var(--avia-slider-handle-width);height:var(--avia-slider-handle-height);margin-top:calc((var(--avia-slider-handle-height) - var(--avia-slider-height)) / -2);margin-left:calc(var(--avia-slider-handle-width) / -2);background-color:var(--avia-slider-handle-color);border-radius:var(--avia-slider-handle-radius);cursor:pointer;opacity:0;transition-property:opacity;transition-duration:250ms}avia-slider:hover .avia-slider-handle{opacity:1.0}avia-slider.focus-visible .avia-slider-handle{opacity:1.0;box-shadow:var(--avia-focus-box-shadow)}.avia-slider-ranges{position:absolute;width:100%;height:var(--avia-slider-value-height);top:0;background:transparent}.avia-slider-range-item{position:absolute;height:var(--avia-segment-marker-height);top:0;background-color:#fff}.avia-slider-list{position:absolute;width:100%;height:var(--avia-slider-value-height);top:0;background:transparent}.avia-slider-list-item{background-color:var(--avia-segment-marker-color);width:var(--avia-segment-marker-width);height:var(--avia-segment-marker-height);position:absolute;top:0}"}};Tn(Zn,["deviceMode","localeData"]);const Jn=class extends we{constructor(){super(),this.__registerHost(),this.localeData=void 0,this.locId=void 0}render(){var e;return x(_,null,null===(e=this.localeData)||void 0===e?void 0:e[this.locId])}static get style(){return"avia-text{color:var(--avia-control-bar-btn-text-color)}"}};Tn(Jn,["localeData"]);const $n=class extends we{constructor(){super(),this.__registerHost(),this.disabledEvent=R(this,"disabled"),this.readyEvent=R(this,"ready"),this.textTrackEnabled=!1,this.textDisabled=!0,this.label=void 0,this.labelledby=void 0,this.disabled=!1,this.focusIndex=0}focus(e){var t;null===(t=this.focusElement)||void 0===t||t.focus(e)}blur(){var e;null===(e=this.focusElement)||void 0===e||e.blur()}render(){return x("avia-button",{ref:e=>this.focusElement=e,ids:"".concat(St.CLOSED_CAPTIONS_ON,", ").concat(St.CLOSED_CAPTIONS_OFF),actions:"".concat(ut.TEXT_ON,", ").concat(ut.TEXT_OFF),focusIndex:this.focusIndex,disabled:this.disabled||this.textDisabled,label:this.label,labelledby:this.labelledby,toggled:this.textTrackEnabled,icon:!0})}static get style(){return"avia-text-toggle avia-button{background-image:var(--avia-text-on-icon)}avia-text-toggle avia-button:hover{background-image:var(--avia-text-on-icon-hover)}avia-text-toggle avia-button[toggled]{background-image:var(--avia-text-off-icon)}avia-text-toggle avia-button[toggled]:hover{background-image:var(--avia-text-off-icon-hover)}"}};Tn($n,["textTrackEnabled","textDisabled"]);const ei=class extends we{constructor(){super(),this.__registerHost(),this.timeDisplayValue=void 0,this.currentTimeSeconds=void 0,this.durationSeconds=void 0,this.isLiveLinear=!1,this.isLts=!1}render(){return this.isLiveLinear||this.isLts?"":x("div",{class:"avia-time-display"},this.timeDisplayValue)}static get style(){return"avia-time-display{margin-right:var(--avia-default-spacing)}.avia-time-display{display:inline-block;user-select:none;height:var(--avia-time-height);line-height:var(--avia-time-line-height);font-size:var(--avia-time-font-size);color:var(--avia-time-color);font-family:var(--avia-time-font-family)}.avia-control-group-right .avia-time-display{text-align:right}"}};Tn(ei,["timeDisplayValue","currentTimeSeconds","durationSeconds","isLiveLinear","isLts"]);const ti=class extends we{constructor(){super(),this.__registerHost(),this.currentTimeSeconds=0,this.durationSeconds=0,this.localeData=void 0}render(){const e=Math.max(this.durationSeconds-this.currentTimeSeconds,0),t=this.localeData?It(e,this.localeData):"";return x(_,{"aria-label":t,title:t},"-".concat(Ft(e)))}static get style(){return"avia-time-remaining{user-select:none;height:var(--avia-time-height);line-height:var(--avia-time-line-height);font-size:var(--avia-time-font-size);color:var(--avia-time-color);font-family:var(--avia-time-font-family)}"}};Tn(ti,["currentTimeSeconds","durationSeconds","localData"]);const ni=class extends we{constructor(){super(),this.__registerHost(),this.disabledEvent=R(this,"disabled"),this.readyEvent=R(this,"ready"),this.muted=!1,this.unmuteCtaVisible=!1,this.isTouch=!1,this.label=void 0,this.labelledby=void 0,this.disabled=!1,this.focusIndex=0}focus(e){var t;null===(t=this.focusElement)||void 0===t||t.focus(e)}blur(){var e;null===(e=this.focusElement)||void 0===e||e.blur()}getText(){return this.isTouch?St.TAP_TO_UNMUTE:St.CLICK_TO_UNMUTE}render(){return this.unmuteCtaVisible&&this.muted?x("avia-button",{actions:ut.UNMUTE,ref:e=>this.focusElement=e,focusIndex:this.focusIndex,label:this.label,labelledby:this.labelledby,disabled:this.disabled},x("avia-text",{"loc-id":this.getText()})):""}static get style(){return"avia-unmute-cta{box-sizing:border-box;display:inline-block;position:absolute;top:64px;
2height:var(--avia-control-bar-btn-height);left:var(--avia-default-spacing);pointer-events:auto;background-color:rgba(0, 0, 0, 0.415);border-radius:4px;opacity:1}avia-unmute-cta avia-button{background-image:var(--avia-mute-icon);background-position:-31px center;background-repeat:no-repeat;background-size:60% 45%;line-height:var(--avia-control-bar-btn-height);padding-right:var(--avia-default-spacing);padding-left:50px;font-size:1.1em;text-align:left;width:auto;height:var(--avia-control-bar-btn-height);color:white;cursor:pointer;opacity:0.85}avia-unmute-cta avia-button:hover{background-image:var(--avia-mute-icon-hover)}"}};Tn(ni,["muted","unmuteCtaVisible","isTouch"]);const ii=class extends we{constructor(){super(),this.__registerHost(),this.volume=void 0,this.accIndicatorState=void 0}componentDidRender(){var e;!this.debouncer&&this.accIndicatorState.displayTime>0&&(this.debouncer=Lt(()=>{var e;null===(e=this.el)||void 0===e||e.classList.remove(At.INDICATOR_ACTIVE),this.visible=!1},this.accIndicatorState.displayTime)),this.visible&&(setTimeout(()=>this.el.classList.add(At.INDICATOR_ACTIVE),0),null===(e=this.debouncer)||void 0===e||e.call(this))}render(){var e;const t=this.accIndicatorState;if(!t.volumeKey)return null===(e=this.el)||void 0===e||e.classList.remove(At.INDICATOR_ACTIVE),this.visible=!1,"";this.visible=!0;const n=0===this.volume?0:jt(this.volume,0,1);return x(_,{class:t.muted||0===this.volume?At.ACC_VOL_OFF:At.ACC_VOL_ON},x("div",{class:At.ACC_VOL},x("div",{class:At.ACC_VOL_METER,style:{width:Dt(n)}}),x("div",{class:At.ACC_VOL_OVERLAY})))}get el(){return this}static get style(){return"avia-volume-indicator{position:absolute;display:block;box-sizing:border-box;border-radius:var(--avia-volume-indicator-border-radius);background-color:var(--avia-volume-indicator-background-color);width:0;height:0;right:var(--avia-volume-indicator-right);bottom:var(--avia-volume-indicator-bottom);visibility:hidden;padding-top:48px;opacity:0;transition-property:opacity;transition-duration:300ms;transition-timing-function:ease-in;box-shadow:0px 0px 1px 1px rgba(0, 0, 0, 0.3)}avia-volume-indicator:empty{opacity:0}.avia-acc-vol{width:48px;margin:0 auto;background-color:black;height:4px;position:relative}.avia-acc-vol-meter{height:4px;background-color:#fff}.avia-vol-meter-overlay{position:absolute;top:0;left:0;height:4px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAFElEQVQImWNAA/+Z0EUICDAwMAAANNwBBuf8FlcAAAAASUVORK5CYII=');width:100%}avia-volume-indicator.avia-indicator-active{width:var(--avia-volume-indicator-width);height:var(--avia-volume-indicator-height);opacity:1.0}avia-volume-indicator.avia-volume-on::before,avia-volume-indicator.avia-volume-off::before{content:\"\";position:absolute;top:0px;right:0px;bottom:0px;left:0px;opacity:0.85;background-repeat:no-repeat;background-position:center 12px;background-size:40% 30%}avia-volume-indicator.avia-volume-on::before{background-image:var(--avia-unmuted-icon)}avia-volume-indicator.avia-volume-on::before:hover{background-image:var(--avia-unmuted-icon-hover)}avia-volume-indicator.avia-volume-off::before{background-image:var(--avia-mute-icon)}avia-volume-indicator.avia-volume-off::before:hover{background-image:var(--avia-mute-icon-hover)}"}};Tn(ii,["volume","accIndicatorState"]);const ri=class extends we{constructor(){super(),this.__registerHost(),this.disabledEvent=R(this,"disabled"),this.readyEvent=R(this,"ready"),this.changeEvent=R(this,"action"),this.volume=void 0,this.muted=!1,this.linkMuteAndVolume=!0,this.playerDimensions=void 0,this.durationSeconds=void 0,this.label=void 0,this.labelledby=void 0,this.disabled=!1,this.focusIndex=0}focus(e){this.focusElement?this.focusElement.focus(e):this.element.addEventListener("ready",()=>this.focusElement.focus(e),{once:!0})}blur(){var e;null===(e=this.focusElement)||void 0===e||e.blur()}onInput(e){this.changeEvent.emit({action:ut.VOLUME,value:e.detail.value})}onDragging(e){!0===e.detail.value&&this.changeEvent.emit({action:ut.UNMUTE,value:!0})}getSliderWidth(){const e=this.durationSeconds>=3600?560:530;return"".concat(this.playerDimensions.width&&this.playerDimensions.width<=e?60:100,"px")}render(){return x(_,{style:{width:this.getSliderWidth()}},x("avia-slider",{ref:e=>this.focusElement=e,"loc-id":St.VOLUME,value:this.linkMuteAndVolume&&this.muted?0:this.volume,onInput:e=>this.onInput(e),onDragging:e=>this.onDragging(e),focusIndex:this.focusIndex,disabled:this.disabled,label:this.label,labelledby:this.labelledby}))}
2get element(){return this}static get style(){return"avia-volume-slider{margin-left:var(--avia-default-spacing)}avia-volume-slider avia-slider{width:100%;margin-top:-4px}avia-volume-slider.focus-visible{outline:none}"}};Tn(ri,["linkMuteAndVolume","muted","volume","playerDimensions","durationSeconds"]);const ai=class extends we{constructor(){super(),this.__registerHost(),this.waiting=!1}render(){if(this.waiting)return x("avia-overlay",{centered:!0},x("avia-spinner",null))}static get style(){return"avia-waiting-overlay{display:block;justify-content:center;align-items:center;display:flex}avia-waiting-overlay slot-fb:not(:empty)~avia-spinner{display:none}"}};Tn(ai,["waiting"]),"undefined"!=typeof customElements&&[le(class extends we{constructor(){super(),this.__registerHost()}render(){return x(_,null,x("avia-volume-indicator",null),x("avia-seek-indicator",null),x("avia-scrub-indicator",null))}static get style(){return"avia-accessibility{display:block}"}},[0,"avia-accessibility"]),le(class extends we{constructor(){super(),this.__registerHost()}render(){return x(_,null)}static get style(){return"avia-active{display:block;transition:var(--avia-active-transition-in)}avia-ui:not([active]) avia-active{opacity:0;transition:var(--avia-active-transition-out)}"}},[0,"avia-active"]),le(class extends we{constructor(){super(),this.__registerHost()}render(){return x(_,null,x("div",{class:"avia-ad-control-container"},x("avia-mute-toggle",null),x("avia-play-toggle",null),x("avia-fullscreen-toggle",null)),x("avia-ad-progress-bar",null))}static get style(){return'avia-ad-control-bar{position:absolute;height:56px;width:100%;left:0;bottom:0;right:0;pointer-events:none;flex-direction:row;justify-content:center;display:none;transition:var(--avia-active-transition-in)}avia-ui[control-mode="ad"] avia-ad-control-bar{display:flex}.avia-ad-control-container{pointer-events:auto;display:flex;width:calc(3 * var(--avia-control-bar-btn-width) + (2 * var(--avia-default-spacing)));height:var(--avia-control-bar-btn-height);justify-content:space-between;background-color:var(--avia-ad-control-bg-color);border-radius:var(--avia-ad-control-border-radius)}avia-ui:not([active]) avia-ad-control-bar{opacity:0;transition:var(--avia-active-transition-out)}'}},[0,"avia-ad-control-bar"]),le(kn,[0,"avia-ad-progress-bar",{adPlayheadPosition:[2,"ad-playhead-position"],isLiveLinear:[4,"is-live-linear"]}]),le(xn,[0,"avia-button",{locId:[513,"loc-id"],toggled:[516],compact:[516],icon:[516],variant:[516],ids:[513],actions:[1],localeData:[16],label:[1],labelledby:[1],disabled:[516],focusIndex:[2,"focus-index"],focused:[32]},[[0,"click","onClick"],[0,"touchstart","onTouchStart"],[1,"touchend","onTouchEnd"],[0,"focus","onFocus"],[0,"blur","onBlur"],[0,"actionkey","onKeyDown"]]]),le(Nn,[4,"avia-control-bar",{active:[516],controlMode:[513,"control-mode"],deviceMode:[1,"device-mode"],isLts:[4,"is-lts"],isLiveLinear:[4,"is-live-linear"],isIosNative:[4,"is-ios-native"],settings:[16]}]),le(class extends we{constructor(){super(),this.__registerHost()}render(){return x(_,null,x("avia-mute-toggle",{compact:!0}),x("avia-play-toggle",{compact:!0}),x("avia-fullscreen-toggle",{compact:!0}))}static get style(){return'avia-control-bar-compact{display:none;position:absolute;top:50%;left:50%;width:var(--avia-compact-control-bar-width);height:var(--avia-compact-button-height);border-radius:var(--avia-compact-button-border-radius);margin-left:var(--avia-compact-control-bar-margin-left);margin-top:var(--avia-compact-control-bar-margin-top)}avia-ui[control-mode="compact"][active] avia-control-bar-compact{display:flex;flex-direction:row;align-items:center;justify-content:space-between}'}},[0,"avia-control-bar-compact"]),le(class extends we{constructor(){super(),this.__registerHost(),this.orientation=cn.HORIZONTAL}render(){const e=this.orientation===cn.VERTICAL?"menu":"menubar";return x(_,{role:e})}static get style(){return""}},[0,"avia-control-group",{orientation:[513]}]),le(_n,[0,"avia-current-time",{currentTimeSeconds:[2,"current-time-seconds"],localeData:[16]}]),le(In,[0,"avia-duration",{durationSeconds:[2,"duration-seconds"],localeData:[16]}]),le(On,[0,"avia-fullscreen-toggle",{fullscreen:[4],fullscreenDisabled:[4,"fullscreen-disabled"],compact:[516],label:[1],labelledby:[1],disabled:[516],focusIndex:[2,"focus-index"]}]),le(Dn,[0,"avia-live-control",{isLiveLinear:[4,"is-live-linear"],isLts:[4,"is-lts"],live:[4],label:[1],labelledby:[1],disabled:[516],focusIndex:[2,"focus-index"]}]),le(Rn,[0,"avia-menu",{localeData:[16],hasSubmenu:[4,"has-submenu"],locId:[1,"loc-id"],titlebar:[4],options:[1040],disabled:[516]},[[0,"action","onAction"],[0,"actionkey","onKeydown"],[0,"focusin","onFocusIn"],[0,"focusout","onFocusOut"]]]),le(class extends we{constructor(){super(),this.__registerHost(),this.actionEvent=R(this,"action"),this.disabledEvent=R(this,"disabled"),this.readyEvent=R(this,"ready"),this.disabled=!1,this.selected=!1,this.label="",this.action="",this.hasSubmenu=!1}onDisabledChange(e){this.disabledEvent.emit({disabled:e})}onClick(e){this.disabled||this.selected||(Rt(e),this.actionEvent.emit({action:this.action,value:this.element.dataset}))}focus(e){this.focusElement?this.focusElement.focus(e):this.element.addEventListener("ready",()=>this.focusElement.focus(e),{once:!0})}blur(){var e;null===(e=this.focusElement)||void 0===e||e.blur()}componentDidLoad(){this.readyEvent.emit()}onKeyDown(e){const t=e.detail,n=t.avia;if(t.action===n.ActionKey.SELECT)return this.element.click(),void Rt(e)}render(){return x(_,null,x("button",{ref:e=>this.focusElement=e,role:this.hasSubmenu?"menuitem":"menuitemradio","aria-haspopup":String(this.hasSubmenu),"aria-checked":String(this.selected),disabled:this.disabled},x("label",null,this.label),x("slot",null)))}
2get element(){return this}static get watchers(){return{disabled:["onDisabledChange"]}}static get style(){return"avia-menu-item{display:block;width:100%;height:auto;border:none;outline:none;text-align:left;color:var(--avia-menu-text-color);background-color:transparent;background-position:right center;background-repeat:no-repeat;background-size:20% 20%;margin:0}avia-menu-item:hover{color:var(--avia-menu-text-color-hover);background-color:rgba(0, 0, 0, 0.65)}avia-menu-item[aria-haspopup=true]{background-image:var(--avia-chevron-right)}avia-menu-item[disabled]{cursor:default;opacity:0.55}avia-menu-item[disabled]:hover{background-color:transparent;color:var(--avia-menu-text-color)}avia-menu-item button{border:none;outline:none;width:100%;height:100%;padding:1em;margin:0;color:var(--avia-menu-text-color);background-color:transparent;text-align:left;cursor:pointer;font-size:var(--avia-menu-text-size)}avia-menu-item button:focus-visible,avia-menu-item button.focus-visible{outline:none;box-shadow:var(--avia-focus-box-shadow-inner)}avia-menu-item button[aria-haspopup=true]{background-image:var(--avia-chevron-right);background-position:right center;background-repeat:no-repeat;background-size:20% 20%}avia-menu-item[data-description] button:after{content:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAVCAYAAABc6S4mAAACG0lEQVQ4jZ2Vz0tVQRTHP89QKJ9lm6ikzN6zJAlxJ1E8CJO27oo2IdKmRdBWwRZhkH9A4kJoI7ppIUWkibRsERpILpQCF9lPLPpBQc+vTJ0Lh+lduc8Dw8z9zJlz5sw5MzcniR1IAegDDgJrwCjwvqKZ4CBDa5VUkrTf6YbNnZc0JemHpHFJtbGtrBF0AOeAI8AxYAp44OYvAo+BT0AJeFVtBEnbI2lI/+RZtOPDxsuSmnwEd4FG4E+06xxQa2c8DSy6uSKwYufeBnwxfgGYAZaBU0kEWeWJpONux822bjWK8qHx63+PX9J6FU5+SWp3xm4av+PYSWMh8XXhiNat3IIMA5+BGqAM1ANX7BgSCfotwG/T+wrkgV3AptMJNrviCNKSOxlF0ufm7hu77NiIsVs1UWJbUsr0EvDBffe48YL1JcdeW98bO9hO5lI28tb63Y6VrS9U48Dn4Z0b563fdCyX6MUONlKMXwU63fdzNy5Y/8axpGgexUnukLRPUqOkvZKKkgYqlOtRl9AlY82OLRvrjh38lPTdavhbyl245gy1G1t07IDTzWNvR1a5EZXviq1rdeyesZHkJr+QtLZNeylpzG6oNz5R4U4UjYXo6xIH1bYGSfNmqD9a+9H42YRlNV4v6bSkQUkLkp5KanPzh5zxXr82i/HwXoX3vdsS3Bm9qLetKEI1ndjpHy2W8P84Y09GEzAGzP6nBWwBc7kMbCgO6BoAAAAASUVORK5CYII=');left:0.4em;top:0.25em;position:relative}avia-menu-item[data-spatial] button:after{content:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHAAAAAQCAYAAADOFPsRAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAhGVYSWZNTQAqAAAACAAFARIAAwAAAAEAAQAAARoABQAAAAEAAABKARsABQAAAAEAAABSASgAAwAAAAEAAgAAh2kABAAAAAEAAABaAAAAAAAAASwAAAABAAABLAAAAAEAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAcKADAAQAAAABAAAAEAAAAADSaTvUAAAACXBIWXMAAC4jAAAuIwF4pT92AAACy2lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNi4wLjAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyIKICAgICAgICAgICAgeG1sbnM6ZXhpZj0iaHR0cDovL25zLmFkb2JlLmNvbS9leGlmLzEuMC8iPgogICAgICAgICA8dGlmZjpZUmVzb2x1dGlvbj4zMDA8L3RpZmY6WVJlc29sdXRpb24+CiAgICAgICAgIDx0aWZmOlJlc29sdXRpb25Vbml0PjI8L3RpZmY6UmVzb2x1dGlvblVuaXQ+CiAgICAgICAgIDx0aWZmOlhSZXNvbHV0aW9uPjMwMDwvdGlmZjpYUmVzb2x1dGlvbj4KICAgICAgICAgPHRpZmY6T3JpZW50YXRpb24+MTwvdGlmZjpPcmllbnRhdGlvbj4KICAgICAgICAgPGV4aWY6UGl4ZWxYRGltZW5zaW9uPjY2NTwvZXhpZjpQaXhlbFhEaW1lbnNpb24+CiAgICAgICAgIDxleGlmOkNvbG9yU3BhY2U+MTwvZXhpZjpDb2xvclNwYWNlPgogICAgICAgICA8ZXhpZjpQaXhlbFlEaW1lbnNpb24+OTU8L2V4aWY6UGl4ZWxZRGltZW5zaW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KbpzqugAABZpJREFUWAntmGuIlVUUhudW4zWLMfqRDGM4kFZmRilZOKVdSEyrH5UESRRRgUX0pygKGgiKCIIoMDIr6EpmwpTdbELJLmMXy4yUqbQoy5Cmi44zc3rePes97PnmNPUn8MAseGet9a619/ftvb59OVNTKpU+BjtDP4VeUBOCXZfZ9bLhmsG9YCP4EnwPFjov1/CHRZv7sTeEnfrErw2/AXs9mB5+eo7sUfkPM8DE9YGiPO6mBGqBi7cMu7eYjH+J863hXKjJ2J+DX8BZiqPLRcIeA74Bp0bMRXd7Pb9OcN+Rlzj49CHksYhXbJfnVeo3j1eFzSD2AYkKY8hfHRNxeOjFIkP2ow+CA+EvKQ4W3u3ase8DV4FXoy+tunJBsFXgaRX6KBc62tWrXd7WvNsSU+Ea7FvnHPaQfot9uE1VaAbTAyQDg6rUj/YqWxSDmwCnrVLimGyv3qWR522xvCrI2QZmARVNfbR4YrCPBW1AK/BKcAo4JvpKBcVXu3mg2e0ifiLcHHPYKmz+3Cb8ueCkLCd9AJk/m/hs+1WpGUCxgFDlIr2iQeFfIRLJiye/WMD05cNbL8Pe6InBfho8kPnL8d8Fe0EneBucDcaB98ASoPPxebAd3Bbv8xJ2B3gt+FnB+wN6CH4rWAfeATrnF2TPnYq/Gai98AmY53hVaV68UgFdmJ0xMbq0SEYsoAdOXtqi0JvA8oyfi6/Vlgqc8Zrg4zN/LP4O8BFoEY8+KvxP0Suy3Lvwv8r85/BVtAkZtwj/NzBfHFrFvzOL34B/vf2q0rz4SAXcpcGQ8yCQ/GsByXHx5mB/7cnA9up4H/ua6NcrVUXxJUZbobY6nc2XRd4RoXWWdoednhP2LvgpYCb4SZwEW9uvn3EjdlfwWt1Xp6Qq/1O+SBTGUQr/x9C7C/GRXPd5E0lrlchkjUONkY2sAtclq6amP7RUemZtbe0AdiPQs7cASe+gqulBd4at4vjM2wenNuc4TqyRvvrwPZaXsZvEo28B7dhrwM1gCn5VSvo6K7y5JlaxdRF7PbS+ek2IJy7oQcVE1DFpup0eDbMY7MbW2eKfBiqO+tDl4TRyP0SXVxK8Rf1r8g+aCK32fnaJ9i6OtKDnFNs4R231ITTRTitwJval4FxwB/618Guwq0t48eIW+hec5Acw0aPBflQk8ifQTVXis9K3UBdKX/dbQOfWdNAamIGeBJ4AL6pvtFbSFpAuIsGNx/8CTA1fq0a5mujVYaefKWFrC9ZzzgTd4iTYjWBs2Bdjb0uBwh/4pSCd94XQoe/y4jpr9BNCK8fyB4bPJBdFZ9MbTkCreP4deFE+UvjvwMKcy21i08CvYLJ4dDc43TnY+tmiorRE3AW8HW5VcHkBP4A/I3hdfFbKtuA3Az3vcnFo3VLTxxG+fuNudX41aZ1Xk4C2JW2Z2n50VpzAdtLFoBrQKqy2xgGg7eZuoIuCtj5PorUmZwV8L7lvqj3wj29pQWfTDnI+A+1Aoq3rGWJPgjbiv+OruD5P9X4Sraby7TIxg380Br/D+dj6
2QHSzXQlewN8E7qHfZ9GS/WADsUfAY9gPg1tB1Yn+a3EBb63BHwDbGeS3GgW8iqdzKAl+KqIc7PEo/QA+EqiQm8nVpUOx+agefG2L5TaKScyhW3FbyesIXhPfDNbC7SF+IXYntnaDerS27RlwE7F1ky33jX0efBf8XnQSOK3Ik0EPWE/sZ7jUjxKwj0O1AZ2NHcT3oKtfNEih0kjgVfC0pRbjEfOKSYUq5tgnd0ie2jpW1I4V2xTz5CtXeXmu8+C0wyTJ7YyrOGbHD1VdLEg/X6K+yBGFCdCEa8Ce+D7apdsesTQR+PlPhGH9kaciahWlVR6Tqv5SX+HrfVK/6iDaQA3t+x9y9R7+UIaNK/py0YbF9bxRGZ2B/30G/gYwJWzLCvt+pAAAAABJRU5ErkJggg==');left:0.4em;top:0.25em;position:relative}avia-menu-item[selected] button{font-weight:bold;cursor:default;background-position:94% center;background-repeat:no-repeat;background-size:0.9em;background-image:var(--avia-selected-icon);pointer-events:none}"}},[4,"avia-menu-item",{disabled:[1540],selected:[516],label:[1],action:[1],hasSubmenu:[4,"has-submenu"]},[[0,"click","onClick"],[0,"actionkey","onKeyDown"]]]),le(Pn,[0,"avia-mute-toggle",{muted:[4],muteDisabled:[4,"mute-disabled"],compact:[516],label:[1],labelledby:[1],disabled:[516],focusIndex:[2,"focus-index"]}]),le(class extends we{constructor(){super(),this.__registerHost(),this.centered=!1}render(){return x(_,{centered:this.centered})}static get style(){return"avia-overlay{background:transparent;position:absolute;width:100%;height:100%;top:0;left:0;border:none;padding:0;margin:0}avia-overlay[centered]{justify-content:center;align-items:center;display:flex}"}},[0,"avia-overlay",{centered:[516]}]),le(Ln,[4,"avia-panel",{localeData:[16],titlebar:[4],back:[4],locId:[1,"loc-id"]}]),le(Mn,[0,"avia-pause-overlay",{playing:[4],waiting:[4]}]),le(class extends we{constructor(){super(),this.__registerHost(),this.disabledEvent=R(this,"disabled"),this.readyEvent=R(this,"ready"),this.label=void 0,this.labelledby=void 0,this.disabled=!1,this.focusIndex=0}focus(e){var t;null===(t=this.focusElement)||void 0===t||t.focus(e)}blur(){var e;null===(e=this.focusElement)||void 0===e||e.blur()}render(){return x("avia-button",{ref:e=>this.focusElement=e,focusIndex:this.focusIndex,disabled:this.disabled,label:this.label,labelledby:this.labelledby,actions:ut.PLAY,"loc-id":St.PLAY})}static get style(){return"avia-play-cta avia-button{width:var(--avia-play-cta-width);height:var(--avia-play-cta-height);border-radius:var(--avia-play-cta-border-radius);background-image:var(--avia-play-cta-bg-image);background-color:var(--avia-play-cta-bg-color);background-repeat:no-repeat;background-position-x:calc(var(--avia-play-cta-bg-position) + 6%);background-position-y:var(--avia-play-cta-bg-position);background-size:var(--avia-play-cta-bg-size);cursor:pointer}"}},[0,"avia-play-cta",{label:[1],labelledby:[1],disabled:[516],focusIndex:[2,"focus-index"]}]),le(Fn,[0,"avia-play-overlay",{playing:[4],controlMode:[1,"control-mode"],playDisabled:[4,"play-disabled"],pausable:[4],isTouch:[4,"is-touch"],focusIndex:[2,"focus-index"]},[[2,"click","onClick"]]]),le(Un,[0,"avia-play-toggle",{playing:[4],playDisabled:[4,"play-disabled"],pausable:[4],compact:[516],label:[1],labelledby:[1],disabled:[516],focusIndex:[2,"focus-index"]}]),le(Bn,[4,"avia-poster",{posterActive:[4,"poster-active"],posterImageUrl:[1,"poster-image-url"],playing:[4],waiting:[4]},[[2,"click","handleAction"]]]),le(jn,[4,"avia-progress-bar",{bufferedRanges:[16],currentTimeSeconds:[2,"current-time-seconds"],durationSeconds:[2,"duration-seconds"],live:[4],localeData:[16],options:[16],segmentBreakPositions:[1,"segment-break-positions"],preview:[16],increment:[2],progressMode:[1,"progress-mode"],label:[1],labelledby:[1],disabled:[516],focusIndex:[2,"focus-index"],hovering:[32],cursor:[32],value:[32]},[[1,"mouseenter","onMouseEnter"],[1,"mouseleave","onMouseLeave"],[8,"touchmove","onMouseMove"],[9,"mousemove","onMouseMove"],[0,"actionkey","onKeydown"]]]),le(Vn,[0,"avia-scrub-indicator",{accIndicatorState:[16]}]),le(Hn,[0,"avia-seek-back-button",{seekBackDisabled:[4,"seek-back-disabled"],isLiveLinear:[4,"is-live-linear"],label:[1],labelledby:[1],disabled:[516],focusIndex:[2,"focus-index"]}]),le(zn,[0,"avia-seek-forward-button",{seekForwardDisabled:[4,"seek-forward-disabled"],isLiveLinear:[4,"is-live-linear"],label:[1],labelledby:[1],disabled:[516],focusIndex:[2,"focus-index"]}]),le(Kn,[0,"avia-seek-indicator",{durationSeconds:[2,"duration-seconds"],accIndicatorState:[16]}]),le(Wn,[0,"avia-settings",{settings:[16],localeData:[16],controlMode:[
21,"control-mode"],deviceMode:[1,"device-mode"],options:[16],qualityLabel:[2,"quality-label"],currentId:[32],menu:[32]},[[0,"action","onAction"],[0,"actionkey","onKeyDown"],[0,"focusin","onFocusIn"],[0,"focusout","onFocusOut"]]]),le(Gn,[0,"avia-settings-audio",{localeData:[16],settings:[16]},[[0,"action","onAction"]]]),le(qn,[0,"avia-settings-language",{localeData:[16],settings:[16]}]),le(Yn,[0,"avia-settings-quality",{localeData:[16],settings:[16],qualityLabel:[2,"quality-label"]},[[0,"action","onAction"]]]),le(Qn,[0,"avia-settings-text",{localeData:[16],settings:[16]},[[0,"action","onAction"]]]),le(Xn,[0,"avia-settings-toggle",{settings:[16],settingsDisabled:[4,"settings-disabled"],label:[1],labelledby:[1],disabled:[516],focusIndex:[2,"focus-index"]}]),le(Zn,[4,"avia-slider",{localeData:[16],deviceMode:[1,"device-mode"],locId:[1,"loc-id"],min:[2],max:[2],value:[1026],ranges:[16],list:[16],increment:[2],label:[1],labelledby:[1],disabled:[516],focusIndex:[2,"focus-index"],valueInternal:[32]},[[1,"touchstart","onMouseDown"],[0,"mousedown","onMouseDown"],[8,"touchmove","onMouseMove"],[8,"mousemove","onMouseMove"],[9,"touchend","onMouseUp"],[8,"mouseup","onMouseUp"],[0,"actionkey","onKeydown"],[0,"focus","onFocus"],[0,"blur","onBlur"]]]),le(class extends we{constructor(){super(),this.__registerHost()}render(){return x(_,null)}static get style(){return"avia-spinner{display:block;width:var(--avia-spinner-diameter);height:var(--avia-spinner-diameter);overflow:visible;background-size:var(--avia-spinner-diameter);background-repeat:no-repeat;background-image:var(--avia-spinner-image);animation:avia-rotate 2s linear infinite}@keyframes avia-rotate{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}"}},[0,"avia-spinner"]),le(Jn,[0,"avia-text",{localeData:[16],locId:[513,"loc-id"]}]),le($n,[0,"avia-text-toggle",{textTrackEnabled:[4,"text-track-enabled"],textDisabled:[4,"text-disabled"],label:[1],labelledby:[1],disabled:[516],focusIndex:[2,"focus-index"]}]),le(ei,[0,"avia-time-display",{timeDisplayValue:[1,"time-display-value"],currentTimeSeconds:[2,"current-time-seconds"],durationSeconds:[2,"duration-seconds"],isLiveLinear:[4,"is-live-linear"],isLts:[4,"is-lts"]}]),le(ti,[0,"avia-time-remaining",{currentTimeSeconds:[2,"current-time-seconds"],durationSeconds:[2,"duration-seconds"],localeData:[16]}]),le(class extends we{constructor(){super(),this.__registerHost(),this.actionEvent=R(this,"uiaction"),this.readyEvent=R(this,"ready"),this.controlMode=yt.NONE,this.fullscreen=!1,this.active=null,this.deviceMode=Tt.DESKTOP,this.options=null,this.fullscreenDisabled=!0,this.muted=!1,this.muteDisabled=!0,this.volume=1,this.playing=!1,this.playDisabled=!0,this.textTrackEnabled=!1,this.textDisabled=!0,this.timeDisplayValue="",this.isLiveLinear=!1,this.isLts=!1,this.live=!1,this.playheadPosition=0,this.durationSeconds=0,this.currentTimeSeconds=0,this.seekDisabled=!0,this.seekBackDisabled=!0,this.seekForwardDisabled=!0,this.settingsDisabled=!0,this.adPlayheadPosition=0,this.segmentBreakPositions=void 0,this.localeData=null,this.preview=null,this.accIndicatorState=void 0,this.unmuteCtaVisible=!1,this.settings=null,this.posterActive=!1,this.posterImageUrl="",this.qualityLabel=0,this.waiting=!1,this.initialized=!1,this.pausable=!0,this.isTouch=!1,this.isIosNative=!1,this.linkMuteAndVolume=!0,this.playerDimensions={width:0,height:0},this.bufferedRanges=[]}handleAction(e){var t;this.actionEvent.emit(e.detail),e.detail.action===ut.SETTINGS_OFF&&(null===(t=this.element.querySelector("avia-settings-toggle"))||void 0===t||t.focus())}onFocusIn(e){this.element.contains(e.relatedTarget)||this.actionEvent.emit({action:ut.ENTER_CONTEXT,value:ht.UI})}onFocusOut(e){this.element.contains(e.relatedTarget)||this.actionEvent.emit({action:ut.EXIT_CONTEXT,value:ht.UI})}componentWillLoad(){!function(e,t){var n=e,i=new Map,r={wormholes:i,state:t};wn.set(e,r);var a=e.connectedCallback;e.connectedCallback=function(){wn.set(e,r),a&&a.call(e)};var o=e.disconnectedCallback;e.disconnectedCallback=function(){wn.delete(e),o&&o.call(e)},n.addEventListener("openWormhole",function(e){e.stopPropagation();var t=e.detail,n=t.consumer,a=t.onOpen;if(!i.has(n)){if("symbol"!=typeof n){var o=n.connectedCallback,s=n.disconnectedCallback;n.connectedCallback=function(){i.set(n,e.detail),o&&o.call(n)},n.disconnectedCallback=function(){i.delete(n),s&&s.call(n)}}i.set(n,e.detail),Sn(e.detail,r.state),null==a||a.resolve(function(){i.delete(n)})}}),n.addEventListener("closeWormhole",function(e){var t=e.detail;i.delete(t)})}(this,this)}componentDidLoad(){this.readyEvent.emit()}
2render(){if(!this.initialized)return;const e=this.deviceMode===Tt.TV;return x(_,null,x(Cn,{state:this},x("div",{class:"avia-layer"},x("slot",{name:"underlay"})),x("slot",{name:"play-overlay"},e?"":x("avia-play-overlay",null)),x("slot",{name:"pause-overlay"},e?x("avia-pause-overlay",null):""),x("slot",{name:"waiting-overlay"},x("avia-waiting-overlay",null)),x("slot",{name:"unmute-cta"},e?"":x("avia-unmute-cta",null)),x("slot",{name:"accessibility"},x("avia-accessibility",null)),x("slot",{name:"poster"},e?"":x("avia-poster",null)),x("div",{class:"avia-layer avia-controls"},x("div",{class:"avia-spacer"}),x("slot",{name:"settings"},x("avia-settings",null)),x("slot",{name:"control-bar"},x("avia-control-bar",null)),x("slot",{name:"ad-control-bar"},x("avia-ad-control-bar",null)),x("slot",{name:"compact-control-bar"},e?"":x("avia-control-bar-compact",null))),x("div",{class:"avia-layer"},x("slot",{name:"overlay"}))))}get element(){return this}static get style(){return":root{--avia-accent-color:#3aacff;--avia-text-color:#dedede;--avia-text-color-hover:#ffffff;--avia-font-family:Arial, sans-serif;--avia-control-bar-bg:linear-gradient(to top, rgba(2, 0, 36, 0.8) 0%, rgba(1, 0, 10, 0.5029586834733894) 62%, rgba(0, 0, 0, 0) 100%);--avia-control-bar-height:64px;--avia-default-spacing:12px;--avia-half-spacing:6px;--avia-live-padding-top:12px;--avia-compact-button-width:48px;--avia-compact-button-height:48px;--avia-compact-button-border-radius:calc(var(--avia-compact-button-width) / 2);
2--avia-compact-button-background-color:rgba(64, 64, 64, 0.5);--avia-compact-control-bar-width:calc((var(--avia-compact-button-width) * 3) + (var(--avia-default-spacing) * 2));--avia-compact-control-bar-margin-left:calc(var(--avia-compact-control-bar-width) / -2);--avia-compact-control-bar-margin-top:calc(var(--avia-compact-button-height) / -2);--avia-play-overlay-bg-color:rgba(0, 0, 0, 0.35);--avia-play-cta-width:66px;--avia-play-cta-height:66px;--avia-play-cta-border-radius:calc(var(--avia-play-cta-width) / 2);--avia-play-cta-bg-image:var(--avia-play-icon);--avia-play-cta-bg-position:50%;--avia-play-cta-bg-color:rgba(64, 64, 64, 0.5);--avia-play-cta-bg-size:calc(var(--avia-play-cta-width) / 2) calc(var(--avia-play-cta-height) / 2);--avia-control-bar-btn-height:48px;--avia-control-bar-btn-width:48px;--avia-control-bar-btn-text-color:var(--avia-text-color);--avia-control-bar-btn-text-color-hover:var(--avia-text-color-hover);--avia-control-bar-btn-border:none;--avia-control-bar-btn-border-width:0;--avia-control-bar-btn-border-radius:0;--avia-control-bar-btn-border-outline:none;--avia-control-bar-btn-border-cursor:pointer;--avia-control-bar-btn-disabled-cursor:not-allowed;--avia-control-bar-btn-disabled-opacity:0.5;--avia-icon-btn-bg-width:50%;--avia-icon-btn-bg-height:37.5%;--avia-icon-btn-bg-size:var(--avia-icon-btn-bg-width) var(--avia-icon-btn-bg-height);--avia-fs-icon:url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22white%22%20viewBox%3D%220%200%2024%2018%22%3E%3Cpath%20fill%3D%22none%22%20d%3D%22M0%200h24v18H0z%22%2F%3E%3Cpath%20d%3D%22M1%207a1%201%200%200%201-1-1V1a1%201%200%200%201%201-1h5a1%201%200%200%201%200%202H2.5a.5.5%200%200%200-.5.5V6a1%201%200%200%201-1%201zM6%2018H1a1%201%200%200%201-1-1v-5a1%201%200%200%201%202%200v3.5a.5.5%200%200%200%20.5.5H6a1%201%200%200%201%200%202zM23%2018h-5a1%201%200%200%201%200-2h3.5a.5.5%200%200%200%20.5-.5V12a1%201%200%200%201%202%200v5a1%201%200%200%201-1%201zM23%207a1%201%200%200%201-1-1V2.5a.5.5%200%200%200-.5-.5H18a1%201%200%200%201%200-2h5a1%201%200%200%201%201%201v5a1%201%200%200%201-1%201z%22%2F%3E%3C%2Fsvg%3E');--avia-fs-icon-hover:var(--avia-fs-icon);--avia-fs-exit-icon:url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22white%22%20viewBox%3D%220%200%2024%2018%22%3E%3Cpath%20fill%3D%22none%22%20d%3D%22M0%200h24v18H0z%22%2F%3E%3Cpath%20d%3D%22M4%206H1a1%201%200%200%201%200-2h2.5a.5.5%200%200%200%20.5-.5V1a1%201%200%200%201%202%200v3a2%202%200%200%201-2%202zM23%206h-4a1%201%200%200%201-1-1V1a1%201%200%200%201%202%200v2.5a.5.5%200%200%200%20.5.5H23a1%201%200%200%201%200%202zM19%2018a1%201%200%200%201-1-1v-3a2%202%200%200%201%202-2h3a1%201%200%200%201%200%202h-2.5a.5.5%200%200%200-.5.5V17a1%201%200%200%201-1%201zM5%2018a1%201%200%200%201-1-1v-2.5a.5.5%200%200%200-.5-.5H1a1%201%200%200%201%200-2h3a2%202%200%200%201%202%202v3a1%201%200%200%201-1%201z%22%2F%3E%3C%2Fsvg%3E');--avia-fs-exit-icon-hover:var(--avia-fs-exit-icon);--avia-play-icon:url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22white%22%20viewBox%3D%220%200%2024%2018%22%3E%3Ctitle%3EPlay%3C%2Ftitle%3E%3Cpath%20fill%3D%22none%22%20d%3D%22M0%200h24v18H0z%22%2F%3E%3Cpath%20d%3D%22M19%2010L6.84%2017.81a1.19%201.19%200%200%201-1.84-1V1.19a1.19%201.19%200%200%201%201.83-1L19%208a1.19%201.19%200%200%201%200%202z%22%2F%3E%3C%2Fsvg%3E');--avia-play-icon-hover:var(--avia-play-icon);--avia-pause-icon:url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22white%22%20viewBox%3D%220%200%2024%2018%22%3E%3Ctitle%3EPause%3C%2Ftitle%3E%3Cpath%20fill%3D%22none%22%20d%3D%22M0%200h24v18H0z%22%2F%3E%3Crect%20x%3D%226%22%20width%3D%224%22%20height%3D%2218%22%20rx%3D%221%22%2F%3E%3Crect%20x%3D%2214%22%20width%3D%224%22%20height%3D%2218%22%20rx%3D%221%22%2F%3E%3C%2Fsvg%3E');--avia-pause-icon-hover:var(--avia-pause-icon);--avia-stop-icon:url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22white%22%20viewBox%3D%220%200%2024%2018%22%3E%3Ctitle%3EStop%3C%2Ftitle%3E%3Cpath%20fill%3D%22none%22%20d%3D%22M0%200h24v18H0z%22%2F%3
2E%3Crect%20x%3D%223%22%20width%3D%2218%22%20height%3D%2218%22%20rx%3D%221%22%2F%3E%3C%2Fsvg%3E');--avia-stop-icon-hover:var(--avia-stop-icon);--avia-mute-icon:url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22white%22%20viewBox%3D%220%200%2024%2018%22%3E%3Cpath%20fill%3D%22none%22%20d%3D%22M0%200h24v18H0z%22%2F%3E%3Cpath%20d%3D%22M3.58%206H2a1%201%200%200%200-1%201v4a1%201%200%200%200%201%201h1.58a1%201%200%200%201%20.72.3l5%205a1%201%200%200%200%201.7-.74V1.44A1%201%200%200%200%209.27.73l-5%205a1%201%200%200%201-.69.27zM19.77%209.33a.5.5%200%200%201%200-.71l.94-.94a1%201%200%200%200%200-1.41%201%201%200%200%200-1.42%200l-.94.94a.5.5%200%200%201-.7%200l-.94-.94a1%201%200%200%200-1.42%200%201%201%200%200%200%200%201.41l.94.94a.5.5%200%200%201%200%20.71l-.94.94a1%201%200%200%200%200%201.41%201%201%200%200%200%201.42%200l.94-.94a.5.5%200%200%201%20.7%200l.94.94a1%201%200%200%200%201.42%200%201%201%200%200%200%200-1.41z%22%2F%3E%3C%2Fsvg%3E');--avia-mute-icon-hover:var(--avia-mute-icon);--avia-unmuted-icon:url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22white%22%20viewBox%3D%220%200%2024%2018%22%3E%3Cpath%20fill%3D%22none%22%20d%3D%22M0%200h24v18H0z%22%2F%3E%3Cpath%20d%3D%22M3.59%206H2a1%201%200%200%200-1%201v4a1%201%200%200%200%201%201h1.59a1%201%200%200%201%20.7.29l5%205a1%201%200%200%200%201.71-.7V1.41a1%201%200%200%200-1.71-.7l-5%205a1%201%200%200%201-.7.29zM14%2018a1%201%200%200%201%200-2%207%207%200%200%200%200-14%201%201%200%200%201%200-2%209%209%200%200%201%200%2018z%22%2F%3E%3Cpath%20d%3D%22M14%2014a1%201%200%200%201%200-2%203%203%200%200%200%200-6%201%201%200%200%201%200-2%205%205%200%200%201%200%2010z%22%2F%3E%3C%2Fsvg%3E');--avia-unmuted-icon-hover:var(--avia-unmuted-icon);--avia-text-on-icon:url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2018%22%3E%3Cdefs%3E%3Cstyle%3E.b%7Bfill%3Anone%3Bstroke%3A%23fff%3Bstroke-linecap%3Around%3Bstroke-miterlimit%3A10%7D%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cpath%20d%3D%22M23%200H1a1%201%200%2000-1%201v12a1%201%200%20001%201h2.5a.5.5%200%2001.5.5V17a1%201%200%2000.62.92A.84.84%200%20005%2018a1%201%200%2000.71-.29l3.56-3.56a.47.47%200%2001.35-.15H23a1%201%200%20001-1V1a1%201%200%2000-1-1zm-1%2011a1%201%200%2001-1%201H9a1%201%200%2000-.71.29L6%2014.59V13a1%201%200%2000-1-1H3a1%201%200%2001-1-1V3a1%201%200%20011-1h18a1%201%200%20011%201z%22%20fill%3D%22%23fff%22%2F%3E%3Cpath%20class%3D%22b%22%20d%3D%22M4.5%206.5h5M16.5%206.5h3M12.5%206.5h1M4.5%209.5h3M18.5%209.5h1M10.5%209.5h5%22%2F%3E%3C%2Fsvg%3E');--avia-text-on-icon-hover:var(--avia-text-on-icon);--avia-text-off-icon:url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2018%22%3E%3Cdefs%3E%3Cstyle%3E.b%7Bfill%3Anone%3Bstroke%3A%23231f20%3Bstroke-linecap%3Around%3Bstroke-miterlimit%3A10%7D%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cpath%20d%3D%22M23%200H1a1%201%200%2000-1%201v12a1%201%200%20001%201h2.5a.5.5%200%2001.5.5V17a1%201%200%2000.62.92A.84.84%200%20005%2018a1%201%200%2000.71-.29l3.56-3.56a.47.47%200%2001.35-.15H23a1%201%200%20001-1V1a1%201%200%2000-1-1z%22%20fill%3D%22%23fff%22%2F%3E%3Cpath%20class%3D%22b%22%20d%3D%22M4.5%206.5h5M16.5%206.5h3M12.5%206.5h1M4.5%209.5h3M18.5%209.5h1M10.5%209.5h5%22%2F%3E%3C%2Fsvg%3E');--avia-text-off-icon-hover:var(--avia-text-off-icon);--avia-text-icon-disabled:url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2018%22%3E%3Cdefs%3E%3Cstyle%3E.b%7Bfill%3Anone%3Bstroke%3A%23fff%3Bstroke-linecap%3Around%3Bstroke-miterlimit%3A10%7D%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cpath%20d%3D%22M23%200H1a1%201%200%2000-1%201v12a1%201%200%20001%201h2.5a.5.5%200%2001.5.5V17a1%201%200%2000.62.92A.84.84%200%20005%2018a1%201%200%2000.71-.29l3.56-3.56a.47.47%200%2001.35-.15H23a1%201%200%20001-1V1a1%201%200%2000-1-1zm-1%2011a1%201%200%2001-1%201H9a1%201%200%2000-.71.29L6%2014.59V13a1%201%200%2000-1-1H3a1%201%200%2001-1-1V3a1%201%200%20011-1h18a1%201%200%20011%201z%22%20fill%3D%22%23fff%22%2F%3
2E%3Cpath%20class%3D%22b%22%20d%3D%22M4.5%206.5h5M16.5%206.5h3M12.5%206.5h1M4.5%209.5h3M18.5%209.5h1M10.5%209.5h5%22%2F%3E%3C%2Fsvg%3E');--avia-seek-forward-icon:url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2015.52%2017.29%22%3E%3Cpath%20d%3D%22M14.69%2C1.16%2C14%2C1.8A8.76%2C8.76%2C0%2C0%2C0%2C1.81%2C3.37%2C8.59%2C8.59%2C0%2C0%2C0%2C3.39%2C15.49a8.77%2C8.77%2C0%2C0%2C0%2C11.5-.74A1%2C1%2C0%2C0%2C0%2C15%2C13.4a1%2C1%2C0%2C0%2C0-1.36-.11l-.11.11a6.81%2C6.81%2C0%2C0%2C1-9.58%2C0%2C6.69%2C6.69%2C0%2C0%2C1-.06-9.51%2C6.82%2C6.82%2C0%2C0%2C1%2C8.73-.77L11.8%2C4a.47.47%2C0%2C0%2C0%2C0%2C.67.5.5%2C0%2C0%2C0%2C.37.15H15a.49.49%2C0%2C0%2C0%2C.49-.48V1.49a.47.47%2C0%2C0%2C0-.83-.33Z%22%20style%3D%22fill%3A%23fff%22%2F%3E%3C%2Fsvg%3E');--avia-seek-forward-icon-hover:var(--avia-seek-forward-icon);--avia-seek-back-icon:url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2015.52%2017.29%22%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill%3A%23fff%3B%7D%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cg%20id%3D%22Layer_2%22%20data-name%3D%22Layer%202%22%3E%3Cpath%20class%3D%22cls-1%22%20d%3D%22M.46%2C1A.48.48%2C0%2C0%2C0%2C0%2C1.49V4.33a.49.49%2C0%2C0%2C0%2C.48.48h2.9a.51.51%2C0%2C0%2C0%2C.37-.15.48.48%2C0%2C0%2C0%2C0-.67L2.9%2C3.17a6.82%2C6.82%2C0%2C0%2C1%2C8.73.77%2C6.69%2C6.69%2C0%2C0%2C1-.05%2C9.51A6.82%2C6.82%2C0%2C0%2C1%2C2%2C13.4a.52.52%2C0%2C0%2C0-.1-.11%2C1%2C1%2C0%2C0%2C0-1.37.11%2C1%2C1%2C0%2C0%2C0%2C.11%2C1.35%2C8.76%2C8.76%2C0%2C0%2C0%2C11.49.74A8.59%2C8.59%2C0%2C0%2C0%2C13.7%2C3.37%2C8.76%2C8.76%2C0%2C0%2C0%2C1.48%2C1.8L.82%2C1.16A.45.45%2C0%2C0%2C0%2C.46%2C1Z%22%20transform%3D%22translate(0%200)%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E');--avia-seek-back-icon-hover:var(--avia-seek-back-icon);--avia-settings-icon:url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22white%22%20viewBox%3D%220%200%2024%2018%22%3E%3Cpath%20fill%3D%22none%22%20d%3D%22M0%200h24v18H0z%22%2F%3E%3Cpath%20d%3D%22M20.43%2010.4l-.93-.53a1%201%200%200%201%200-1.74l.93-.53a1%201%200%200%200%20.36-1.37l-2-3.46a1%201%200%200%200-1.36-.37l-.93.54a1%201%200%200%201-1.5-.87V1a1%201%200%200%200-1-1h-4a1%201%200%200%200-1%201v1.07a1%201%200%200%201-1.5.87l-.93-.54a1%201%200%200%200-1.36.37l-2%203.46a1%201%200%200%200%20.36%201.37l.93.53a1%201%200%200%201%200%201.74l-.93.53a1%201%200%200%200-.36%201.37l2%203.46a1%201%200%200%200%201.36.37l.93-.54a1%201%200%200%201%201.5.87V17a1%201%200%200%200%201%201h4a1%201%200%200%200%201-1v-1.07a1%201%200%200%201%201.5-.87l.93.54a1%201%200%200%200%201.36-.37l2-3.46a1%201%200%200%200-.36-1.37zM12%2012a3%203%200%201%201%203-3%203%203%200%200%201-3%203z%22%2F%3E%3C%2Fsvg%3E');--avia-settings-icon-hover:var(--avia-settings-icon);--avia-selected-icon:url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22white%22%3E%3Cpath%20d%3D%22M20.285%202l-11.285%2011.567-5.286-5.011-3.714%203.716%209%208.728%2015-15.285z%22%2F%3E%3C%2Fsvg%3E');--avia-time-height:48px;--avia-time-width:86px;--avia-time-line-height:48px;--avia-time-font-size:13px;--avia-time-color:var(--avia-text-color);--avia-time-font-family:var(--avia-font-family);--avia-segment-marker-color:var(--avia-text-color);--avia-segment-marker-height:4px;--avia-segment-marker-width:2px;--avia-ad-progress-color:#ffe83a;--avia-ad-progress-track-color:transparent;--avia-ad-control-bg-color:rgba(0, 0, 0, 0.7);--avia-ad-control-border-radius:4px;--avia-seek-indicator-border-radius:4px;--avia-seek-indicator-background-color:rgba(0, 0, 0, 0.5);--avia-seek-indicator-color:var(--avia-text-color);--avia-seek-indicator-height:48px;--avia-seek-indicator-font-size:20px;--avia-seek-indicator-font-family:var(--avia-font-family);--avia-seek-indicator-line-height:48px;--avia-volume-indicator-border-radius:6px;--avia-volume-indicator-background-color:rgba(0, 0, 0, 0.5);--avia-volume-indicator-width:64px;--avia-volume-indicator-height:64px;--avia-volume-indicator-right:12px;--avia-volume-indicator-bottom:72px;
2--avia-focus-box-shadow:0 0 2px 3px rgba(247, 228, 85, 0.85);--avia-focus-box-shadow-inner:inset 0 0 2px 3px rgba(247, 228, 85, 0.85);--avia-spinner-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" stroke=\"white\" stroke-width=\"1\" width=\"40\" height=\"40\" fill=\"white\" viewBox=\"0 0 37.84 41\"><path d=\"M18,39.61V32.09a.93.93,0,0,1,.26-.66.85.85,0,0,1,.64-.27.83.83,0,0,1,.63.27.89.89,0,0,1,.26.66v7.52a.91.91,0,0,1-.89.89.85.85,0,0,1-.64-.27.87.87,0,0,1-.26-.62Zm-6.4-10.27a.89.89,0,0,1,.59-.37.82.82,0,0,1,.65.16.79.79,0,0,1,.36.59.94.94,0,0,1-.15.69L8.8,36.47a.8.8,0,0,1-.57.38,1,1,0,0,1-.67-.16.84.84,0,0,1-.36-.59,1,1,0,0,1,.16-.7ZM1.13,25.53,8,23.21a.92.92,0,0,1,.67.05.93.93,0,0,1,.4,1.23,1,1,0,0,1-.52.47L1.64,27.27A.87.87,0,0,1,1,27.22a.82.82,0,0,1-.43-.53,1,1,0,0,1,0-.72.81.81,0,0,1,.54-.44Zm.51-11.8L8.56,16a1,1,0,0,1,.52.47.93.93,0,0,1-.4,1.23.92.92,0,0,1-.67.05L1.13,15.47A.81.81,0,0,1,.59,15a1,1,0,0,1,0-.72A.82.82,0,0,1,1,13.78a.87.87,0,0,1,.67,0ZM8.8,4.53l4.27,6.06a.94.94,0,0,1,.15.69.79.79,0,0,1-.36.59.82.82,0,0,1-.65.16.89.89,0,0,1-.59-.37L7.36,5.6a1,1,0,0,1-.16-.7.84.84,0,0,1,.36-.59,1,1,0,0,1,.67-.16.8.8,0,0,1,.57.38Zm11-3.14V8.91a.89.89,0,0,1-.26.66.83.83,0,0,1-.63.27.85.85,0,0,1-.64-.27A.93.93,0,0,1,18,8.91V1.39a.87.87,0,0,1,.26-.62A.85.85,0,0,1,18.92.5a.83.83,0,0,1,.63.27.83.83,0,0,1,.26.62ZM30.48,5.6l-4.27,6.06a.87.87,0,0,1-.58.37.85.85,0,0,1-.66-.16.86.86,0,0,1-.36-.59,1,1,0,0,1,.16-.69L29,4.53a.76.76,0,0,1,.56-.38.94.94,0,0,1,.67.16.86.86,0,0,1,.37.59,1,1,0,0,1-.16.7Zm6.23,9.87-6.88,2.32a.91.91,0,0,1-.67-.05.93.93,0,0,1-.4-1.23,1,1,0,0,1,.52-.47l6.91-2.31a.87.87,0,0,1,.67,0,.83.83,0,0,1,.44.53,1,1,0,0,1-.06.72.79.79,0,0,1-.53.44Zm-.52,11.8L29.28,25a1,1,0,0,1-.52-.47.93.93,0,0,1,.4-1.23.91.91,0,0,1,.67-.05l6.88,2.32a.79.79,0,0,1,.53.44,1,1,0,0,1,.06.72.83.83,0,0,1-.44.53.87.87,0,0,1-.67.05ZM29,36.47l-4.27-6.06a1,1,0,0,1-.16-.69.86.86,0,0,1,.36-.59.85.85,0,0,1,.66-.16.87.87,0,0,1,.58.37l4.27,6.06a1,1,0,0,1,.16.7.86.86,0,0,1-.37.59.94.94,0,0,1-.67.16.76.76,0,0,1-.56-.38Z\"/></svg>');--avia-spinner-diameter:48px;--avia-active-transition-in:opacity 0.5s ease 0s;--avia-active-transition-out:opacity 0.5s ease 0s;--avia-buffered-range-background-color:rgba(255, 255, 255, 0.20)}avia-ui{color:var(--avia-text-color);font-family:var(--avia-font-family)}avia-ui>*{pointer-events:auto;-webkit-user-select:none;user-select:none}avia-ui,avia-ui avia-accessibility,.avia-layer{pointer-events:none;position:absolute;top:0;left:0;bottom:0;right:0}.avia-layer>*{pointer-events:auto}slot-fb[hidden]{display:none}.avia-ui-hidden{display:none}img.avia-poster-img{width:100%;height:auto}.avia-container,avia-ui:focus,avia-ui button:focus{outline:none}avia-ui.focus-visible,avia-ui .focus-visible{box-shadow:var(--avia-focus-box-shadow)}avia-ui.focus-visible .avia-menu-button,avia-ui .focus-visible.avia-menu-button{box-shadow:var(--avia-focus-box-shadow-inner)}avia-ui:not([active])[fullscreen]{cursor:none}.avia-container.avia-controls-vis video::-webkit-media-text-track-container{bottom:calc(var(--avia-control-bar-height) + 4px);height:auto}.avia-controls{display:flex;flex-direction:column}.avia-spacer{pointer-events:none;flex-grow:1}"}},[4,"avia-ui",{controlMode:[513,"control-mode"],fullscreen:[516],active:[516],deviceMode:[513,"device-mode"],options:[16],fullscreenDisabled:[4,"fullscreen-disabled"],muted:[4],muteDisabled:[4,"mute-disabled"],volume:[2],playing:[4],playDisabled:[4,"play-disabled"],textTrackEnabled:[4,"text-track-enabled"],textDisabled:[4,"text-disabled"],timeDisplayValue:[1,"time-display-value"],isLiveLinear:[4,"is-live-linear"],isLts:[4,"is-lts"],live:[4],playheadPosition:[2,"playhead-position"],durationSeconds:[2,"duration-seconds"],currentTimeSeconds:[2,"current-time-seconds"],seekDisabled:[4,"seek-disabled"],seekBackDisabled:[4,"seek-back-disabled"],seekForwardDisabled:[4,"seek-forward-disabled"],settingsDisabled:[4,"settings-disabled"],adPlayheadPosition:[2,"ad-playhead-position"],segmentBreakPositions:[1,"segment-break-positions"],localeData:[16],preview:[16],accIndicatorState:[16],unmuteCtaVisible:[4,"unmute-cta-visible"],settings:[16],posterActive:[4,"poster-active"],posterImageUrl:[1,"poster-image-url"],qualityLabel:[2,"quality-label"],waiting:[4],initialized:[4],pausable:[4],isTouch:[4,"is-touch"],isIosNative:[4,"is-ios-native"],linkMuteAndVolume:[4,"link-mute-and-volume"],playerDimensions:[16],bufferedRanges:[16]},[[0,"action","handleAction"],[0,"focusin","onFocusIn"],[0,"focusout","onFocusOut"]]]),le(ni,[0,"avia-unmute-cta",{muted:[4],unmuteCtaVisible:[4,"unmute-cta-visible"],isTouch:[4,"is-touch"],label:[1],labelledby:[1],disabled:[516],focusIndex:[2,"focus-index"]}]),le(ii,[0,"avia-volume-indicator",{volume:[2],accIndicatorState:[16]}]),le(ri,[0,"avia-volume-slider",{volume:[2],muted:[4],linkMuteAndVolume:[4,"link-mute-and-volume"],playerDimensions:[16],durationSeconds:[2,"duration-seconds"],label:[1],labelledby:[1],disabled:[516],focusIndex:[2,"focus-index"]}]),le(ai,[0,"avia-waiting-overlay",{waiting:[4]}
2])].forEach(e=>{customElements.get(e.is)||customElements.define(e.is,e,void 0)});const oi=e=>e.replace(/([A-Z])/g,e=>"-".concat(e[0].toLowerCase())),si=e=>{if("undefined"==typeof document)return!0;{const t="on"+e;let n=t in document;if(!n){const e=document.createElement("div");e.setAttribute(t,"return;"),n="function"==typeof e[t]}return n}},li=(e,t,n)=>{const i=e.__events||(e.__events={}),r=i[t];r&&e.removeEventListener(t,r),e.addEventListener(t,i[t]=function(e){n&&n.call(this,e)})},ci=e=>{const t=new Map;return e.forEach(e=>t.set(e,e)),t},ui=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return e=>{t.forEach(t=>{((e,t)=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})(t,e)})}},di=(e,t,n,i)=>{const a=e.toLowerCase().split("-").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(""),o=class extends r.Component{constructor(e){super(e),this.setComponentElRef=e=>{this.componentEl=e}}componentDidMount(){this.componentDidUpdate(this.props)}componentDidUpdate(e){!function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e instanceof Element){const i=((e,t,n)=>{const i=t.className||t.class,r=n.className||n.class,a=ci(e),o=ci(i?i.split(" "):[]),s=ci(r?r.split(" "):[]),l=[];return a.forEach(e=>{o.has(e)?(l.push(e),o.delete(e)):s.has(e)||l.push(e)}),o.forEach(e=>l.push(e)),l.join(" ")})(e.classList,t,n);""!==i&&(e.className=i),Object.keys(t).forEach(n=>{if("children"!==n&&"style"!==n&&"ref"!==n&&"class"!==n&&"className"!==n&&"forwardedRef"!==n)if(0===n.indexOf("on")&&n[2]===n[2].toUpperCase()){const i=n.substring(2),r=i[0].toLowerCase()+i.substring(1);si(r)||li(e,r,t[n])}else e[n]=t[n],"string"==typeof t[n]&&e.setAttribute(oi(n),t[n])})}}(this.componentEl,this.props,e)}render(){const t=this.props,n=t.children,i=t.forwardedRef,a=t.style,o=(t.className,t.ref,((e,t)=>{var n={};for(var i in e)c.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&l)for(var i of l(e))t.indexOf(i)<0&&u.call(e,i)&&(n[i]=e[i]);return n})(t,["children","forwardedRef","style","className","ref"]));let s=Object.keys(o).reduce((e,t)=>{const n=o[t];if(0===t.indexOf("on")&&t[2]===t[2].toUpperCase()){const i=t.substring(2).toLowerCase();"undefined"!=typeof document&&si(i)&&(e[t]=n)}else{const i=typeof n;"string"!==i&&"boolean"!==i&&"number"!==i||(e[oi(t)]=n)}return e},{});const d=f(h({},s),{ref:ui(i,this.setComponentElRef),style:a});return(0,r.createElement)(e,d,n)}static get displayName(){return a}};return((e,t)=>{const n=(t,n)=>r.createElement(e,f(h({},t),{forwardedRef:n}));return n.displayName=t,r.forwardRef(n)})(o,a)},hi=di("avia-accessibility"),fi=di("avia-active"),pi=di("avia-ad-control-bar"),mi=di("avia-ad-progress-bar"),gi=di("avia-button"),vi=di("avia-control-bar"),yi=di("avia-control-bar-compact"),bi=di("avia-control-group"),Ai=di("avia-current-time"),Ei=di("avia-duration"),Ti=di("avia-fullscreen-toggle"),wi=di("avia-live-control"),Si=di("avia-menu"),Ci=di("avia-menu-item"),ki=di("avia-mute-toggle"),xi=di("avia-overlay"),Ni=di("avia-panel"),_i=di("avia-pause-overlay"),Ii=di("avia-play-cta"),Oi=di("avia-play-overlay"),Di=di("avia-play-toggle"),Ri=di("avia-poster"),Pi=di("avia-progress-bar"),Li=di("avia-scrub-indicator"),Mi=di("avia-seek-back-button"),Fi=di("avia-seek-forward-button"),Ui=di("avia-seek-indicator"),Bi=di("avia-settings"),ji=di("avia-settings-audio"),Vi=di("avia-settings-language"),Hi=di("avia-settings-quality"),zi=di("avia-settings-text"),Ki=di("avia-settings-toggle"),Wi=di("avia-slider"),Gi=di("avia-spinner"),qi=di("avia-text"),Yi=di("avia-text-toggle"),Qi=di("avia-time-display"),Xi=di("avia-time-remaining"),Zi=di("avia-ui"),Ji=di("avia-unmute-cta"),$i=di("avia-volume-indicator"),er=di("avia-volume-slider"),tr=di("avia-waiting-overlay")},564(e){"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(e){i[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},i)).join("")}catch(e){return!1}}()?Object.assign:function(e,r){for(var a,o,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),l=1;l<arguments.length;l++){for(var c in a=Object(arguments[l]))n.call(a,c)&&(s[c]=a[c]);if(t){o=t(a);for(var u=0;u<o.length;u++)i.call(a,o[u])&&(s[o[u]]=a[o[u]])}}return s}},238(e,t,n){"use strict";var i=n(293);function r(){}function a(){}a.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,a,o){if(o!==i){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol
vendor: 4,449 bytes, line 2
2:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:r};return n.PropTypes=n,n}},444(e,t,n){e.exports=n(238)()},293(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},89(e,t,n){"use strict";var i=n(518),r=n(70),a=n(723);function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function l(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function c(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function u(e){if(31===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function d(e){if(l(e)!==e)throw Error(o(188))}function h(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e;for(e=e.child;null!==e;){if(null!==(t=h(e)))return t;e=e.sibling}return null}var f=Object.assign,p=Symbol.for("react.element"),m=Symbol.for("react.transitional.element"),g=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),E=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),S=Symbol.for("react.suspense_list"),C=Symbol.for("react.memo"),k=Symbol.for("react.lazy");Symbol.for("react.scope");var x=Symbol.for("react.activity");Symbol.for("react.legacy_hidden"),Symbol.for("react.tracing_marker");var N=Symbol.for("react.memo_cache_sentinel");Symbol.for("react.view_transition");var _=Symbol.iterator;function I(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=_&&e[_]||e["@@iterator"])?e:null}var O=Symbol.for("react.client.reference");function D(e){if(null==e)return null;if("function"==typeof e)return e.$$typeof===O?null:e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case v:return"Fragment";case b:return"Profiler";case y:return"StrictMode";case w:return"Suspense";case S:return"SuspenseList";case x:return"Activity"}if("object"==typeof e)switch(e.$$typeof){case g:return"Portal";case E:return e.displayName||"Context";case A:return(e._context.displayName||"Context")+".Consumer";case T:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case C:return null!==(t=e.displayName||null)?t:D(e.type)||"Memo";case k:t=e._payload,e=e._init;try{return D(e(t))}catch(e){}}return null}var R=Array.isArray,P=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,M={pending:!1,data:null,method:null,action:null},F=[],U=-1;function B(e){return{current:e}}function j(e){0>U||(e.current=F[U],F[U]=null,U--)}function V(e,t){U++,F[U]=e.current,e.current=t}var H,z,K=B(null),W=B(null),G=B(null),q=B(null);function Y(e,t){switch(V(G,t),V(W,e),V(K,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)e=yd(t=vd(t),e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}j(K),V(K,e)}function Q(){j(K),j(W),j(G)}function X(e){null!==e.memoizedState&&V(q,e);var t=K.current,n=yd(t,e.type);t!==n&&(V(W,e),V(K,n))}function Z(e){W.current===e&&(j(K),j(W)),q.current===e&&(j(q),uh._currentValue=M)}function J(e){if(void 0===H)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);H=t&&t[1]||"",z=-1<e.stack.indexOf("\n at")?" (<anonymous>)":-1<e.stack.indexOf("@")?"@unknown:0:0":""}return"\n"+H+e+z}var $=!1;function ee(e,t){if(!e||$)return"";$=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var i={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var i=e}Reflect.construct(e,[],n)}
vendor: 5,917 bytes, line 2
2else{try{n.call()}catch(e){i=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){i=e}(n=e())&&"function"==typeof n.catch&&n.catch(function(){})}}catch(e){if(e&&i&&"string"==typeof e.stack)return[e.stack,i.stack]}return[null,null]}};i.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var r=Object.getOwnPropertyDescriptor(i.DetermineComponentFrameRoot,"name");r&&r.configurable&&Object.defineProperty(i.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var a=i.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var l=o.split("\n"),c=s.split("\n");for(r=i=0;i<l.length&&!l[i].includes("DetermineComponentFrameRoot");)i++;for(;r<c.length&&!c[r].includes("DetermineComponentFrameRoot");)r++;if(i===l.length||r===c.length)for(i=l.length-1,r=c.length-1;1<=i&&0<=r&&l[i]!==c[r];)r--;for(;1<=i&&0<=r;i--,r--)if(l[i]!==c[r]){if(1!==i||1!==r)do{if(i--,0>--r||l[i]!==c[r]){var u="\n"+l[i].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}}while(1<=i&&0<=r);break}}}finally{$=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?J(n):""}function te(e,t){switch(e.tag){case 26:case 27:case 5:return J(e.type);case 16:return J("Lazy");case 13:return e.child!==t&&null!==t?J("Suspense Fallback"):J("Suspense");case 19:return J("SuspenseList");case 0:case 15:return ee(e.type,!1);case 11:return ee(e.type.render,!1);case 1:return ee(e.type,!0);case 31:return J("Activity");default:return""}}function ne(e){try{var t="",n=null;do{t+=te(e,n),n=e,e=e.return}while(e);return t}catch(e){return"\nError generating stack: "+e.message+"\n"+e.stack}}var ie=Object.prototype.hasOwnProperty,re=i.unstable_scheduleCallback,ae=i.unstable_cancelCallback,oe=i.unstable_shouldYield,se=i.unstable_requestPaint,le=i.unstable_now,ce=i.unstable_getCurrentPriorityLevel,ue=i.unstable_ImmediatePriority,de=i.unstable_UserBlockingPriority,he=i.unstable_NormalPriority,fe=i.unstable_LowPriority,pe=i.unstable_IdlePriority,me=i.log,ge=i.unstable_setDisableYieldValue,ve=null,ye=null;function be(e){if("function"==typeof me&&ge(e),ye&&"function"==typeof ye.setStrictMode)try{ye.setStrictMode(ve,e)}catch(e){}}var Ae=Math.clz32?Math.clz32:function(e){return 0==(e>>>=0)?32:31-(Ee(e)/Te|0)|0},Ee=Math.log,Te=Math.LN2,we=256,Se=262144,Ce=4194304;function ke(e){var t=42&e;if(0!==t)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return 261888&e;case 262144:case 524288:case 1048576:case 2097152:return 3932160&e;case 4194304:case 8388608:case 16777216:case 33554432:return 62914560&e;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function xe(e,t,n){var i=e.pendingLanes;if(0===i)return 0;var r=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=134217727&i;return 0!==s?0!==(i=s&~a)?r=ke(i):0!==(o&=s)?r=ke(o):n||0!==(n=s&~e)&&(r=ke(n)):0!==(s=i&~a)?r=ke(s):0!==o?r=ke(o):n||0!==(n=i&~e)&&(r=ke(n)),0===r?0:0!==t&&t!==r&&0===(t&a)&&((a=r&-r)>=(n=t&-t)||32===a&&4194048&n)?t:r}function Ne(e,t){return 0===(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)}function _e(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function Ie(){var e=Ce;return!(62914560&(Ce<<=1))&&(Ce=4194304),e}function Oe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function De(e,t){e.pendingLanes|=t,268435456!==t&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Re(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var i=31-Ae(t);e.entangledLanes|=t,e.entanglements[i]=1073741824|e.entanglements[i]|261930&n}function Pe(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var i=31-Ae(n),r=1<<i;r&t|e[i]&t&&(e[i]|=t),n&=~r}}function Le(e,t){var n=t&-t;return 0!==((n=42&n?1:Me(n))&(e.suspendedLanes|t))?0:n}function Me(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Fe(e){return 2<(e&=-e)?8<e?134217727&e?32:268435456:8:2}function Ue(){var e=L.p;return 0!==e?e:void 0===(e=window.event)?32:kh(e.type)}function Be(e,t){var n=L.p;try{return L.p=e,t()}finally{L.p=n}}var je=Math.random().toString(36).slice(2),Ve="__reactFiber$"+je,He="__reactProps$"+je,ze="__reactContainer$"+je,Ke="__reactEvents$"+je,We="__reactListeners$"+je,Ge="__reactHandles$"+je,qe="__reactResources$"+je,Ye="__reactMarker$"+je;function Qe(e){delete e[Ve],delete e[He],delete e[Ke],delete e[We],delete e[Ge]}function Xe(e){var t=e[Ve];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ze]||n[Ve]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Md(e);null!==e;){if(n=e[Ve])return n;e=Md(e)}return t}n=(e=n).parentNode}return null}function Ze(e){if(e=e[Ve]||e[ze]){var t=e.tag;if(5===t||6===t||13===t||31===t||26===t||27===t||3===t)return e}return null}function Je(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e.stateNode;throw Error(o(33))}function $e(e){var t=e[qe];return t||(t=e[qe]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function et(e){e[Ye]=!0}var tt=new Set,nt={};function it(e,t){rt(e,t),rt(e+"Capture",t)}function rt(e,t){for(nt[e]=t,e=0;e<t.length;e++)tt.add(t[e])}var at=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u
2037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),ot={},st={};function lt(e,t,n){if(r=t,ie.call(st,r)||!ie.call(ot,r)&&(at.test(r)?st[r]=!0:(ot[r]=!0,0)))if(null===n)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":return void e.removeAttribute(t);case"boolean":var i=t.toLowerCase().slice(0,5);if("data-"!==i&&"aria-"!==i)return void e.removeAttribute(t)}e.setAttribute(t,""+n)}var r}function ct(e,t,n){if(null===n)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":return void e.removeAttribute(t)}e.setAttribute(t,""+n)}}function ut(e,t,n,i){if(null===i)e.removeAttribute(n);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":return void e.removeAttribute(n)}e.setAttributeNS(t,n,""+i)}}function dt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function ht(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function ft(e){if(!e._valueTracker){var t=ht(e)?"checked":"value";e._valueTracker=function(e,t,n){var i=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&void 0!==i&&"function"==typeof i.get&&"function"==typeof i.set){var r=i.get,a=i.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(e){n=""+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:i.enumerable}),{getValue:function(){return n},setValue:function(e){n=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e,t,""+e[t])}}function pt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),i="";return e&&(i=ht(e)?e.checked?"true":"false":e.value),(e=i)!==n&&(t.setValue(e),!0)}function mt(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}var gt=/[\n"\\]/g;function vt(e){return e.replace(gt,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function yt(e,t,n,i,r,a,o,s){e.name="",null!=o&&"function"!=typeof o&&"symbol"!=typeof o&&"boolean"!=typeof o?e.type=o:e.removeAttribute("type"),null!=t?"number"===o?(0===t&&""===e.value||e.value!=t)&&(e.value=""+dt(t)):e.value!==""+dt(t)&&(e.value=""+dt(t)):"submit"!==o&&"reset"!==o||e.removeAttribute("value"),null!=t?At(e,o,dt(t)):null!=n?At(e,o,dt(n)):null!=i&&e.removeAttribute("value"),null==r&&null!=a&&(e.defaultChecked=!!a),null!=r&&(e.checked=r&&"function"!=typeof r&&"symbol"!=typeof r),null!=s&&"function"!=typeof s&&"symbol"!=typeof s&&"boolean"!=typeof s?e.name=""+dt(s):e.removeAttribute("name")}function bt(e,t,n,i,r,a,o,s){if(null!=a&&"function"!=typeof a&&"symbol"!=typeof a&&"boolean"!=typeof a&&(e.type=a),null!=t||null!=n){if(("submit"===a||"reset"===a)&&null==t)return void ft(e);n=null!=n?""+dt(n):"",t=null!=t?""+dt(t):n,s||t===e.value||(e.value=t),e.defaultValue=t}i="function"!=typeof(i=null!=i?i:r)&&"symbol"!=typeof i&&!!i,e.checked=s?e.checked:!!i,e.defaultChecked=!!i,null!=o&&"function"!=typeof o&&"symbol"!=typeof o&&"boolean"!=typeof o&&(e.name=o),ft(e)}function At(e,t,n){"number"===t&&mt(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Et(e,t,n,i){if(e=e.options,t){t={};for(var r=0;r<n.length;r++)t["$"+n[r]]=!0;for(n=0;n<e.length;n++)r=t.hasOwnProperty("$"+e[n].value),e[n].selected!==r&&(e[n].selected=r),r&&i&&(e[n].defaultSelected=!0)}else{for(n=""+dt(n),t=null,r=0;r<e.length;r++){if(e[r].value===n)return e[r].selected=!0,void(i&&(e[r].defaultSelected=!0));null!==t||e[r].disabled||(t=e[r])}null!==t&&(t.selected=!0)}}function Tt(e,t,n){null==t||((t=""+dt(t))!==e.value&&(e.value=t),null!=n)?e.defaultValue=null!=n?""+dt(n):"":e.defaultValue!==t&&(e.defaultValue=t)}function wt(e,t,n,i){if(null==t){if(null!=i){if(null!=n)throw Error(o(92));if(R(i)){if(1<i.length)throw Error(o(93));i=i[0]}n=i}null==n&&(n=""),t=n}n=dt(t),e.defaultValue=n,(i=e.textContent)===n&&""!==i&&null!==i&&(e.value=i),ft(e)}function St(e,t){if(t){var n=e.firstChild;
vendor: 4,144 bytes, line 2
2if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var Ct=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function kt(e,t,n){var i=0===t.indexOf("--");null==n||"boolean"==typeof n||""===n?i?e.setProperty(t,""):"float"===t?e.cssFloat="":e[t]="":i?e.setProperty(t,n):"number"!=typeof n||0===n||Ct.has(t)?"float"===t?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function xt(e,t,n){if(null!=t&&"object"!=typeof t)throw Error(o(62));if(e=e.style,null!=n){for(var i in n)!n.hasOwnProperty(i)||null!=t&&t.hasOwnProperty(i)||(0===i.indexOf("--")?e.setProperty(i,""):"float"===i?e.cssFloat="":e[i]="");for(var r in t)i=t[r],t.hasOwnProperty(r)&&n[r]!==i&&kt(e,r,i)}else for(var a in t)t.hasOwnProperty(a)&&kt(e,a,t[a])}function Nt(e){if(-1===e.indexOf("-"))return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var _t=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode
2-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),It=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Ot(e){return It.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Dt(){}var Rt=null;function Pt(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Lt=null,Mt=null;function Ft(e){var t=Ze(e);if(t&&(e=t.stateNode)){var n=e[He]||null;e:switch(e=t.stateNode,t.type){case"input":if(yt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+vt(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var i=n[t];if(i!==e&&i.form===e.form){var r=i[He]||null;if(!r)throw Error(o(90));yt(i,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(t=0;t<n.length;t++)(i=n[t]).form===e.form&&pt(i)}break e;case"textarea":Tt(e,n.value,n.defaultValue);break e;case"select":null!=(t=n.value)&&Et(e,!!n.multiple,t,!1)}}}var Ut=!1;function Bt(e,t,n){if(Ut)return e(t,n);Ut=!0;try{return e(t)}finally{if(Ut=!1,(null!==Lt||null!==Mt)&&($c(),Lt&&(t=Lt,e=Mt,Mt=Lt=null,Ft(t),e)))for(t=0;t<e.length;t++)Ft(e[t])}}function jt(e,t){var n=e.stateNode;if(null===n)return null;var i=n[He]||null;if(null===i)return null;n=i[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(i=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!i;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(o(231,t,typeof n));return n}var Vt=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),Ht=!1;if(Vt)try{var zt={};Object.defineProperty(zt,"passive",{get:function(){Ht=!0}}),window.addEventListener("test",zt,zt),window.removeEventListener("test",zt,zt)}catch(e){Ht=!1}var Kt=null,Wt=null,Gt=null;function qt(){if(Gt)return Gt;var e,t,n=Wt,i=n.length,r="value"in Kt?Kt.value:Kt.textContent,a=r.length;for(e=0;e<i&&n[e]===r[e];e++);var o=i-e;for(t=1;t<=o&&n[i-t]===r[a-t];t++);return Gt=r.slice(e,1<t?1-t:void 0)}function Yt(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function Qt(){return!0}function Xt(){return!1}function Zt(e){function t(t,n,i,r,a){for(var o in this._reactName=t,this._targetInst=i,this.type=n,this.nativeEvent=r,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(r):r[o]);return this.isDefaultPrevented=(null!=r.defaultPrevented?r.defaultPrevented:!1===r.returnValue)?Qt:Xt,this.isPropagationStopped=Xt,this}return f(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Qt)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Qt)},persist:function(){},isPersistent:Qt}),t}var Jt,$t,en,tn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},nn=Zt(tn),rn=f({},tn,{view:0,detail:0}),an=Zt(rn),on=f({},rn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:vn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.from
vendor: 146,530 bytes, line 2
2Element===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==en&&(en&&"mousemove"===e.type?(Jt=e.screenX-en.screenX,$t=e.screenY-en.screenY):$t=Jt=0,en=e),Jt)},movementY:function(e){return"movementY"in e?e.movementY:$t}}),sn=Zt(on),ln=Zt(f({},on,{dataTransfer:0})),cn=Zt(f({},rn,{relatedTarget:0})),un=Zt(f({},tn,{animationName:0,elapsedTime:0,pseudoElement:0})),dn=Zt(f({},tn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),hn=Zt(f({},tn,{data:0})),fn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},pn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},mn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function gn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=mn[e])&&!!t[e]}function vn(){return gn}var yn=Zt(f({},rn,{key:function(e){if(e.key){var t=fn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=Yt(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?pn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:vn,charCode:function(e){return"keypress"===e.type?Yt(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Yt(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}})),bn=Zt(f({},on,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),An=Zt(f({},rn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:vn})),En=Zt(f({},tn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Tn=Zt(f({},on,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),wn=Zt(f({},tn,{newState:0,oldState:0})),Sn=[9,13,27,32],Cn=Vt&&"CompositionEvent"in window,kn=null;Vt&&"documentMode"in document&&(kn=document.documentMode);var xn=Vt&&"TextEvent"in window&&!kn,Nn=Vt&&(!Cn||kn&&8<kn&&11>=kn),_n=String.fromCharCode(32),In=!1;function On(e,t){switch(e){case"keyup":return-1!==Sn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Dn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Rn=!1,Pn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Ln(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Pn[e.type]:"textarea"===t}function Mn(e,t,n,i){Lt?Mt?Mt.push(i):Mt=[i]:Lt=i,0<(t=id(t,"onChange")).length&&(n=new nn("onChange","change",null,n,i),e.push({event:n,listeners:t}))}var Fn=null,Un=null;function Bn(e){Qu(e,0)}function jn(e){if(pt(Je(e)))return e}function Vn(e,t){if("change"===e)return t}var Hn=!1;if(Vt){var zn;if(Vt){var Kn="oninput"in document;if(!Kn){var Wn=document.createElement("div");Wn.setAttribute("oninput","return;"),Kn="function"==typeof Wn.oninput}zn=Kn}else zn=!1;Hn=zn&&(!document.documentMode||9<document.documentMode)}function Gn(){Fn&&(Fn.detachEvent("onpropertychange",qn),Un=Fn=null)}function qn(e){if("value"===e.propertyName&&jn(Un)){var t=[];Mn(t,Un,e,Pt(e)),Bt(Bn,t)}}function Yn(e,t,n){"focusin"===e?(Gn(),Un=n,(Fn=t).attachEvent("onpropertychange",qn)):"focusout"===e&&Gn()}function Qn(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return jn(Un)}function Xn(e,t){if("click"===e)return jn(t)}function Zn(e,t){if("input"===e||"change"===e)return jn(t)}var Jn="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function $n(e,t){if(Jn(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(i=0;i<n.length;i++){var r=n[i];if(!ie.call(t,r)||!Jn(e[r],t[r]))return!1}return!0}function ei(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ti(e,t){var n,i=ei(e);for(e=0;i;){if(3===i.nodeType){if(n=e+i.textContent.length,e<=t&&n>=t)return{node:i,offset:t-e};e=n}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=ei(i)}}function ni(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?ni(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function ii(e){for(var t=mt((e=null!=e&&null!=e.ownerDocument&&null!=e.ownerDocument.defaultView?e.ownerDocument.defaultView:window).document);t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=mt((e=t.contentWindow).document)}return t}function ri(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var ai=Vt&&"documentMode"in document&&11>=document.documentMode,oi=null,si=null,li=null,ci=!1;function ui(e,t,n){var i=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;ci||null==oi||oi!==mt(i)||(i="selectionStart"in(i=oi)&&ri(i)?{start:i.selectionStart,end:i.selectionEnd}:{anchorNode:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset},li&&$n(li,i)||(li=i,0<(i=id(si,"onSelect")).length&&(t=new nn("onSelect","select",null,t,n),e.push({event:t,listeners:i}),t.target=oi)))}function di(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var hi={animationend:di("Animation","AnimationEnd"),animationiteration:di("Animation","AnimationIteration"),animationstart:di("Animation","AnimationStart"),transitionrun:di("Transition","TransitionRun"),transitionstart:di("Transition","TransitionStart"),transitioncancel:di("Transition","TransitionCancel"),transitionend:di("Transition","TransitionEnd")},fi={},pi={};function mi(e){if(fi[e])return fi[e];if(!hi[e])return e;var t,n=hi[e];for(t in n)if(n.hasOwnProperty(t)&&t in pi)return fi[e]=n[t];return e}Vt&&(pi=document.createElement("div").style,"AnimationEvent"in window||(delete hi.animationend.animation,delete hi.animationiteration.animation,delete hi.animationstart.animation),"TransitionEvent"in window||delete hi.transitionend.transition);var gi=mi("animationend"),vi=mi("animationiteration"),yi=mi("animationstart"),bi=mi("transitionrun"),Ai=mi("transitionstart"),Ei=mi("transitioncancel"),Ti=mi("transitionend"),wi=new Map,Si="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Ci(e,t){wi.set(e,t),it(t,[e])}Si.push("scrollEnd");var ki="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof process&&"function"==typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)},xi=[],Ni=0,_i=0;function Ii(){for(var e=Ni,t=_i=Ni=0;t<e;){var n=xi[t];xi[t++]=null;var i=xi[t];xi[t++]=null;var r=xi[t];xi[t++]=null;var a=xi[t];if(xi[t++]=null,null!==i&&null!==r){var o=i.pending;null===o?r.next=r:(r.next=o.next,o.next=r),i.pending=r}0!==a&&Pi(n,r,a)}}function Oi(e,t,n,i){xi[Ni++]=e,xi[Ni++]=t,xi[Ni++]=n,xi[Ni++]=i,_i|=i,e.lanes|=i,null!==(e=e.alternate)&&(e.lanes|=i)}function Di(e,t,n,i){return Oi(e,t,n,i),Li(e)}function Ri(e,t){return Oi(e,null,null,t),Li(e)}function Pi(e,t,n){e.lanes|=n;var i=e.alternate;null!==i&&(i.lanes|=n);for(var r=!1,a=e.return;null!==a;)a.childLanes|=n,null!==(i=a.alternate)&&(i.childLanes|=n),22===a.tag&&(null===(e=a.stateNode)||1&e._visibility||(r=!0)),e=a,a=a.return;return 3===e.tag?(a=e.stateNode,r&&null!==t&&(r=31-Ae(n),null===(i=(e=a.hiddenUpdates)[r])?e[r]=[t]:i.push(t),t.lane=536870912|n),a):null}function Li(e){if(50<Kc)throw Kc=0,Wc=null,Error(o(185));for(var t=e.return;null!==t;)t=(e=t).return;return 3===e.tag?e.stateNode:null}var Mi={};function Fi(e,t,n,i){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ui(e,t,n,i){return new Fi(e,t,n,i)}function Bi(e){return!(!(e=e.prototype)||!e.isReactComponent)}function ji(e,t){var n=e.alternate;return null===n?((n=Ui(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=65011712&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Vi(e,t){e.flags&=65011714;var n=e.alternate;return null===n?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Hi(e,t,n,i,r,a){var s=0;if(i=e,"function"==typeof e)Bi(e)&&(s=1);else if("string"==typeof e)s=function(e,t,n){if(1===n||null!=t.itemProp)return!1;switch(e){case"meta":case"title":return!0;case"style":if("string"!=typeof t.precedence||"string"!=typeof t.href||""===t.href)break;return!0;case"link":if("string"!=typeof t.rel||"string"!=typeof t.href||""===t.href||t.onLoad||t.onError)break;return"stylesheet"!==t.rel||(e=t.disabled,"string"==typeof t.precedence&&null==e);case"script":if(t.async&&"function"!=typeof t.async&&"symbol"!=typeof t.async&&!t.onLoad&&!t.onError&&t.src&&"string"==typeof t.src)return!0}return!1}(e,n,K.current)?26:"html"===e||"head"===e||"body"===e?27:5;else e:switch(e){case x:return(e=Ui(31,n,t,r)).elementType=x,e.lanes=a,e;case v:return zi(n.children,r,a,t);case y:s=8,r|=24;break;case b:return(e=Ui(12,n,t,2|r)).elementType=b,e.lanes=a,e;case w:return(e=Ui(13,n,t,r)).elementType=w,e.lanes=a,e;case S:return(e=Ui(19,n,t,r)).elementType=S,e.lanes=a,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case E:s=10;break e;case A:s=9;break e;case T:s=11;break e;case C:s=14;break e;case k:s=16,i=null;break e}s=29,n=Error(o(130,null===e?"null":typeof e,"")),i=null}return(t=Ui(s,n,t,r)).elementType=e,t.type=i,t.lanes=a,t}function zi(e,t,n,i){return(e=Ui(7,e,i,t)).lanes=n,e}function Ki(e,t,n){return(e=Ui(6,e,null,t)).lanes=n,e}function Wi(e){var t=Ui(18,null,null,0);return t.stateNode=e,t}function Gi(e,t,n){return(t=Ui(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var qi=new WeakMap;function Yi(e,t){if("object"==typeof e&&null!==e){var n=qi.get(e);return void 0!==n?n:(t={value:e,source:t,stack:ne(t)},qi.set(e,t),t)}return{value:e,source:t,stack:ne(t)}}var Qi=[],Xi=0,Zi=null,Ji=0,$i=[],er=0,tr=null,nr=1,ir="";function rr(e,t){Qi[Xi++]=Ji,Qi[Xi++]=Zi,Zi=e,Ji=t}function ar(e,t,n){$i[er++]=nr,$i[er++]=ir,$i[er++]=tr,tr=e;var i=nr;e=ir;var r=32-Ae(i)-1;i&=~(1<<r),n+=1;var a=32-Ae(t)+r;if(30<a){var o=r-r%5;a=(i&(1<<o)-1).toString(32),i>>=o,r-=o,nr=1<<32-Ae(t)+r|n<<r|i,ir=a+e}else nr=1<<a|n<<r|i,ir=e}function or(e){null!==e.return&&(rr(e,1),ar(e,1,0))}function sr(e){for(;e===Zi;)Zi=Qi[--Xi],Qi[Xi]=null,Ji=Qi[--Xi],Qi[Xi]=null;for(;e===tr;)tr=$i[--er],$i[er]=null,ir=$i[--er],$i[er]=null,nr=$i[--er],$i[er]=null}function lr(e,t){$i[er++]=nr,$i[er++]=ir,$i[er++]=tr,nr=t.id,ir=t.overflow,tr=e}var cr=null,ur=null,dr=!1,hr=null,fr=!1,pr=Error(o(519));function mr(e){throw Er(Yi(Error(o(418,1<arguments.length&&void 0!==arguments[1]&&arguments[1]?"text":"HTML","")),e)),pr}function gr(e){var t=e.stateNode,n=e.type,i=e.memoizedProps;switch(t[Ve]=e,t[He]=i,n){case"dialog":Xu("cancel",t),Xu("close",t);break;case"iframe":case"object":case"embed":Xu("load",t);break;case"video":case"audio":for(n=0;n<qu.length;n++)Xu(qu[n],t);break;case"source":Xu("error",t);break;case"img":case"image":case"link":Xu("error",t),Xu("load",t);break;case"details":Xu("toggle",t);break;case"input":Xu("invalid",t),bt(t,i.value,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name,!0);break;case"select":Xu("invalid",t);break;case"textarea":Xu("invalid",t),wt(t,i.value,i.defaultValue,i.children)}"string"!=typeof(n=i.children)&&"number"!=typeof n&&"bigint"!=typeof n||t.textContent===""+n||!0===i.suppressHydrationWarning||cd(t.textContent,n)?(null!=i.popover&&(Xu("beforetoggle",t),Xu("toggle",t)),null!=i.onScroll&&Xu("scroll",t),null!=i.onScrollEnd&&Xu("scrollend",t),null!=i.onClick&&(t.onclick=Dt),t=!0):t=!1,t||mr(e,!0)}function vr(e){for(cr=e.return;cr;)switch(cr.tag){case 5:case 31:case 13:return void(fr=!1);case 27:case 3:return void(fr=!0);default:cr=cr.return}}function yr(e){if(e!==cr)return!1;if(!dr)return vr(e),dr=!0,!1;var t,n=e.tag;if((t=3!==n&&27!==n)&&((t=5===n)&&(t=!("form"!==(t=e.type)&&"button"!==t)||bd(e.type,e.memoizedProps)),t=!t),t&&ur&&mr(e),vr(e),13===n){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(o(317));ur=Ld(e)}else if(31===n){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(o(317));ur=Ld(e)}else 27===n?(n=ur,kd(e.type)?(e=Pd,Pd=null,ur=e):ur=n):ur=cr?Rd(e.stateNode.nextSibling):null;return!0}function br(){ur=cr=null,dr=!1}function Ar(){var e=hr;return null!==e&&(null===Ic?Ic=e:Ic.push.apply(Ic,e),hr=null),e}function Er(e){null===hr?hr=[e]:hr.push(e)}var Tr=B(null),wr=null,Sr=null;function Cr(e,t,n){V(Tr,t._currentValue),t._currentValue=n}function kr(e){e._currentValue=Tr.current,j(Tr)}function xr(e,t,n){for(;null!==e;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==i&&(i.childLanes|=t)):null!==i&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===n)break;e=e.return}}function Nr(e,t,n,i){var r=e.child;for(null!==r&&(r.return=e);null!==r;){var a=r.dependencies;if(null!==a){var s=r.child;a=a.firstContext;e:for(;null!==a;){var l=a;a=r;for(var c=0;c<t.length;c++)if(l.context===t[c]){a.lanes|=n,null!==(l=a.alternate)&&(l.lanes|=n),xr(a.return,n,e),i||(s=null);break e}a=l.next}}else if(18===r.tag){if(null===(s=r.return))throw Error(o(341));s.lanes|=n,null!==(a=s.alternate)&&(a.lanes|=n),xr(s,n,e),s=null}else s=r.child;if(null!==s)s.return=r;else for(s=r;null!==s;){if(s===e){s=null;break}if(null!==(r=s.sibling)){r.return=s.return,s=r;break}s=s.return}r=s}}function _r(e,t,n,i){e=null;for(var r=t,a=!1;null!==r;){if(!a)if(524288&r.flags)a=!0;else if(262144&r.flags)break;if(10===r.tag){var s=r.alternate;if(null===s)throw Error(o(387));if(null!==(s=s.memoizedProps)){var l=r.type;Jn(r.pendingProps.value,s.value)||(null!==e?e.push(l):e=[l])}}else if(r===q.current){if(null===(s=r.alternate))throw Error(o(387));s.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(null!==e?e.push(uh):e=[uh])}r=r.return}null!==e&&Nr(t,e,n,i),t.flags|=262144}function Ir(e){for(e=e.firstContext;null!==e;){if(!Jn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Or(e){wr=e,Sr=null,null!==(e=e.dependencies)&&(e.firstContext=null)}function Dr(e){return Pr(wr,e)}function Rr(e,t){return null===wr&&Or(e),Pr(e,t)}function Pr(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},null===Sr){if(null===e)throw Error(o(308));Sr=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Sr=Sr.next=t;return n}var Lr="undefined"!=typeof AbortController?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},Mr=i.unstable_scheduleCallback,Fr=i.unstable_NormalPriority,Ur={$$typeof:E,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Br(){return{controller:new Lr,data:new Map,refCount:0}}function jr(e){e.refCount--,0===e.refCount&&Mr(Fr,function(){e.controller.abort()})}var Vr=null,Hr=0,zr=0,Kr=null;function Wr(){if(0===--Hr&&null!==Vr){null!==Kr&&(Kr.status="fulfilled");var e=Vr;Vr=null,zr=0,Kr=null;for(var t=0;t<e.length;t++)(0,e[t])()}}var Gr=P.S;P.S=function(e,t){Rc=le(),"object"==typeof t&&null!==t&&"function"==typeof t.then&&function(e,t){if(null===Vr){var n=Vr=[];Hr=0,zr=Hu(),Kr={status:"pending",value:void 0,then:function(e){n.push(e)}}}Hr++,t.then(Wr,Wr)}(0,t),null!==Gr&&Gr(e,t)};var qr=B(null);function Yr(){var e=qr.current;return null!==e?e:pc.pooledCache}function Qr(e,t){V(qr,null===t?qr.current:t.pool)}function Xr(){var e=Yr();return null===e?null:{parent:Ur._currentValue,pool:e}}var Zr=Error(o(460)),Jr=Error(o(474)),$r=Error(o(542)),ea={then:function(){}};function ta(e){return"fulfilled"===(e=e.status)||"rejected"===e}function na(e,t,n){switch(void 0===(n=e[n])?e.push(t):n!==t&&(t.then(Dt,Dt),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw oa(e=t.reason),e;default:if("string"==typeof t.status)t.then(Dt,Dt);else{if(null!==(e=pc)&&100<e.shellSuspendCounter)throw Error(o(482));(e=t).status="pending",e.then(function(e){if("pending"===t.status){var n=t;n.status="fulfilled",n.value=e}},function(e){if("pending"===t.status){var n=t;n.status="rejected",n.reason=e}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw oa(e=t.reason),e}throw ra=t,Zr}}function ia(e){try{return(0,e._init)(e._payload)}catch(e){if(null!==e&&"object"==typeof e&&"function"==typeof e.then)throw ra=e,Zr;throw e}}var ra=null;function aa(){if(null===ra)throw Error(o(459));var e=ra;return ra=null,e}function oa(e){if(e===Zr||e===$r)throw Error(o(483))}var sa=null,la=0;function ca(e){var t=la;return la+=1,null===sa&&(sa=[]),na(sa,e,t)}function ua(e,t){t=t.props.ref,e.ref=void 0!==t?t:null}function da(e,t){if(t.$$typeof===p)throw Error(o(525));throw e=Object.prototype.toString.call(t),Error(o(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ha(e){function t(t,n){if(e){var i=t.deletions;null===i?(t.deletions=[n],t.flags|=16):i.push(n)}}function n(n,i){if(!e)return null;for(;null!==i;)t(n,i),i=i.sibling;return null}function i(e){for(var t=new Map;null!==e;)null!==e.key?t.set(e.key,e):t.set(e.index,e),e=e.sibling;return t}function r(e,t){return(e=ji(e,t)).index=0,e.sibling=null,e}function a(t,n,i){return t.index=i,e?null!==(i=t.alternate)?(i=i.index)<n?(t.flags|=67108866,n):i:(t.flags|=67108866,n):(t.flags|=1048576,n)}function s(t){return e&&null===t.alternate&&(t.flags|=67108866),t}function l(e,t,n,i){return null===t||6!==t.tag?((t=Ki(n,e.mode,i)).return=e,t):((t=r(t,n)).return=e,t)}function c(e,t,n,i){var a=n.type;return a===v?d(e,t,n.props.children,i,n.key):null!==t&&(t.elementType===a||"object"==typeof a&&null!==a&&a.$$typeof===k&&ia(a)===t.type)?(ua(t=r(t,n.props),n),t.return=e,t):(ua(t=Hi(n.type,n.key,n.props,null,e.mode,i),n),t.return=e,t)}function u(e,t,n,i){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Gi(n,e.mode,i)).return=e,t):((t=r(t,n.children||[])).return=e,t)}function d(e,t,n,i,a){return null===t||7!==t.tag?((t=zi(n,e.mode,i,a)).return=e,t):((t=r(t,n)).return=e,t)}function h(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t||"bigint"==typeof t)return(t=Ki(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case m:return ua(n=Hi(t.type,t.key,t.props,null,e.mode,n),t),n.return=e,n;case g:return(t=Gi(t,e.mode,n)).return=e,t;case k:return h(e,t=ia(t),n)}if(R(t)||I(t))return(t=zi(t,e.mode,n,null)).return=e,t;if("function"==typeof t.then)return h(e,ca(t),n);if(t.$$typeof===E)return h(e,Rr(e,t),n);da(e,t)}return null}function f(e,t,n,i){var r=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n||"bigint"==typeof n)return null!==r?null:l(e,t,""+n,i);if("object"==typeof n&&null!==n){switch(n.$$typeof){case m:return n.key===r?c(e,t,n,i):null;case g:return n.key===r?u(e,t,n,i):null;case k:return f(e,t,n=ia(n),i)}if(R(n)||I(n))return null!==r?null:d(e,t,n,i,null);if("function"==typeof n.then)return f(e,t,ca(n),i);if(n.$$typeof===E)return f(e,t,Rr(e,n),i);da(e,n)}return null}function p(e,t,n,i,r){if("string"==typeof i&&""!==i||"number"==typeof i||"bigint"==typeof i)return l(t,e=e.get(n)||null,""+i,r);if("object"==typeof i&&null!==i){switch(i.$$typeof){case m:return c(t,e=e.get(null===i.key?n:i.key)||null,i,r);case g:return u(t,e=e.get(null===i.key?n:i.key)||null,i,r);case k:return p(e,t,n,i=ia(i),r)}if(R(i)||I(i))return d(t,e=e.get(n)||null,i,r,null);if("function"==typeof i.then)return p(e,t,n,ca(i),r);if(i.$$typeof===E)return p(e,t,n,Rr(t,i),r);da(t,i)}return null}function y(l,c,u,d){if("object"==typeof u&&null!==u&&u.type===v&&null===u.key&&(u=u.props.children),"object"==typeof u&&null!==u){switch(u.$$typeof){case m:e:{for(var b=u.key;null!==c;){if(c.key===b){if((b=u.type)===v){if(7===c.tag){n(l,c.sibling),(d=r(c,u.props.children)).return=l,l=d;break e}}else if(c.elementType===b||"object"==typeof b&&null!==b&&b.$$typeof===k&&ia(b)===c.type){n(l,c.sibling),ua(d=r(c,u.props),u),d.return=l,l=d;break e}n(l,c);break}t(l,c),c=c.sibling}u.type===v?((d=zi(u.props.children,l.mode,d,u.key)).return=l,l=d):(ua(d=Hi(u.type,u.key,u.props,null,l.mode,d),u),d.return=l,l=d)}return s(l);case g:e:{for(b=u.key;null!==c;){if(c.key===b){if(4===c.tag&&c.stateNode.containerInfo===u.containerInfo&&c.stateNode.implementation===u.implementation){n(l,c.sibling),(d=r(c,u.children||[])).return=l,l=d;break e}n(l,c);break}t(l,c),c=c.sibling}(d=Gi(u,l.mode,d)).return=l,l=d}return s(l);case k:return y(l,c,u=ia(u),d)}if(R(u))return function(r,o,s,l){for(var c=null,u=null,d=o,m=o=0,g=null;null!==d&&m<s.length;m++){d.index>m?(g=d,d=null):g=d.sibling;var v=f(r,d,s[m],l);if(null===v){null===d&&(d=g);break}e&&d&&null===v.alternate&&t(r,d),o=a(v,o,m),null===u?c=v:u.sibling=v,u=v,d=g}if(m===s.length)return n(r,d),dr&&rr(r,m),c;if(null===d){for(;m<s.length;m++)null!==(d=h(r,s[m],l))&&(o=a(d,o,m),null===u?c=d:u.sibling=d,u=d);return dr&&rr(r,m),c}for(d=i(d);m<s.length;m++)null!==(g=p(d,r,m,s[m],l))&&(e&&null!==g.alternate&&d.delete(null===g.key?m:g.key),o=a(g,o,m),null===u?c=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(r,e)}),dr&&rr(r,m),c}(l,c,u,d);if(I(u)){if("function"!=typeof(b=I(u)))throw Error(o(150));return function(r,s,l,c){if(null==l)throw Error(o(151));for(var u=null,d=null,m=s,g=s=0,v=null,y=l.next();null!==m&&!y.done;g++,y=l.next()){m.index>g?(v=m,m=null):v=m.sibling;var b=f(r,m,y.value,c);if(null===b){null===m&&(m=v);break}e&&m&&null===b.alternate&&t(r,m),s=a(b,s,g),null===d?u=b:d.sibling=b,d=b,m=v}if(y.done)return n(r,m),dr&&rr(r,g),u;if(null===m){for(;!y.done;g++,y=l.next())null!==(y=h(r,y.value,c))&&(s=a(y,s,g),null===d?u=y:d.sibling=y,d=y);return dr&&rr(r,g),u}for(m=i(m);!y.done;g++,y=l.next())null!==(y=p(m,r,g,y.value,c))&&(e&&null!==y.alternate&&m.delete(null===y.key?g:y.key),s=a(y,s,g),null===d?u=y:d.sibling=y,d=y);return e&&m.forEach(function(e){return t(r,e)}),dr&&rr(r,g),u}(l,c,u=b.call(u),d)}if("function"==typeof u.then)return y(l,c,ca(u),d);if(u.$$typeof===E)return y(l,c,Rr(l,u),d);da(l,u)}return"string"==typeof u&&""!==u||"number"==typeof u||"bigint"==typeof u?(u=""+u,null!==c&&6===c.tag?(n(l,c.sibling),(d=r(c,u)).return=l,l=d):(n(l,c),(d=Ki(u,l.mode,d)).return=l,l=d),s(l)):n(l,c)}return function(e,t,n,i){try{la=0;var r=y(e,t,n,i);return sa=null,r}catch(t){if(t===Zr||t===$r)throw t;var a=Ui(29,t,null,e.mode);return a.lanes=i,a.return=e,a}}}var fa=ha(!0),pa=ha(!1),ma=!1;function ga(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function va(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ya(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ba(e,t,n){var i=e.updateQueue;if(null===i)return null;if(i=i.shared,2&fc){var r=i.pending;return null===r?t.next=t:(t.next=r.next,r.next=t),i.pending=t,t=Li(e),Pi(e,null,n),t}return Oi(e,i,t,n),Li(e)}function Aa(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194048&n)){var i=t.lanes;n|=i&=e.pendingLanes,t.lanes=n,Pe(e,n)}}function Ea(e,t){var n=e.updateQueue,i=e.alternate;if(null!==i&&n===(i=i.updateQueue)){var r=null,a=null;if(null!==(n=n.firstBaseUpdate)){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};null===a?r=a=o:a=a.next=o,n=n.next}while(null!==n);null===a?r=a=t:a=a.next=t}else r=a=t;return n={baseState:i.baseState,firstBaseUpdate:r,lastBaseUpdate:a,shared:i.shared,callbacks:i.callbacks},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ta=!1;function wa(){if(Ta&&null!==Kr)throw Kr}function Sa(e,t,n,i){Ta=!1;var r=e.updateQueue;ma=!1;var a=r.firstBaseUpdate,o=r.lastBaseUpdate,s=r.shared.pending;if(null!==s){r.shared.pending=null;var l=s,c=l.next;l.next=null,null===o?a=c:o.next=c,o=l;var u=e.alternate;null!==u&&(s=(u=u.updateQueue).lastBaseUpdate)!==o&&(null===s?u.firstBaseUpdate=c:s.next=c,u.lastBaseUpdate=l)}if(null!==a){var d=r.baseState;for(o=0,u=c=l=null,s=a;;){var h=-536870913&s.lane,p=h!==s.lane;if(p?(gc&h)===h:(i&h)===h){0!==h&&h===zr&&(Ta=!0),null!==u&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});e:{var m=e,g=s;h=t;var v=n;switch(g.tag){case 1:if("function"==typeof(m=g.payload)){d=m.call(v,d,h);break e}d=m;break e;case 3:m.flags=-65537&m.flags|128;case 0:if(null===(h="function"==typeof(m=g.payload)?m.call(v,d,h):m)||void 0===h)break e;d=f({},d,h);break e;case 2:ma=!0}}null!==(h=s.callback)&&(e.flags|=64,p&&(e.flags|=8192),null===(p=r.callbacks)?r.callbacks=[h]:p.push(h))}else p={lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===u?(c=u=p,l=d):u=u.next=p,o|=h;if(null===(s=s.next)){if(null===(s=r.shared.pending))break;s=(p=s).next,p.next=null,r.lastBaseUpdate=p,r.shared.pending=null}}null===u&&(l=d),r.baseState=l,r.firstBaseUpdate=c,r.lastBaseUpdate=u,null===a&&(r.shared.lanes=0),Sc|=o,e.lanes=o,e.memoizedState=d}}function Ca(e,t){if("function"!=typeof e)throw Error(o(191,e));e.call(t)}function ka(e,t){var n=e.callbacks;if(null!==n)for(e.callbacks=null,e=0;e<n.length;e++)Ca(n[e],t)}var xa=B(null),Na=B(0);function _a(e,t){V(Na,e=Tc),V(xa,t),Tc=e|t.baseLanes}function Ia(){V(Na,Tc),V(xa,xa.current)}function Oa(){Tc=Na.current,j(xa),j(Na)}var Da=B(null),Ra=null;function Pa(e){var t=e.alternate;V(Ba,1&Ba.current),V(Da,e),null===Ra&&(null===t||null!==xa.current||null!==t.memoizedState)&&(Ra=e)}function La(e){V(Ba,Ba.current),V(Da,e),null===Ra&&(Ra=e)}function Ma(e){22===e.tag?(V(Ba,Ba.current),V(Da,e),null===Ra&&(Ra=e)):Fa()}function Fa(){V(Ba,Ba.current),V(Da,Da.current)}function Ua(e){j(Da),Ra===e&&(Ra=null),j(Ba)}var Ba=B(0);function ja(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||Od(n)||Dd(n)))return t}else if(19!==t.tag||"forwards"!==t.memoizedProps.revealOrder&&"backwards"!==t.memoizedProps.revealOrder&&"unstable_legacy-backwards"!==t.memoizedProps.revealOrder&&"together"!==t.memoizedProps.revealOrder){if(null!==t.child){t.child.return=t,t=t.child;continue}}else if(128&t.flags)return t;if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Va=0,Ha=null,za=null,Ka=null,Wa=!1,Ga=!1,qa=!1,Ya=0,Qa=0,Xa=null,Za=0;function Ja(){throw Error(o(321))}function $a(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Jn(e[n],t[n]))return!1;return!0}function eo(e,t,n,i,r,a){return Va=a,Ha=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,P.H=null===e||null===e.memoizedState?gs:vs,qa=!1,a=n(i,r),qa=!1,Ga&&(a=no(t,n,i,r)),to(e),a}function to(e){P.H=ms;var t=null!==za&&null!==za.next;if(Va=0,Ka=za=Ha=null,Wa=!1,Qa=0,Xa=null,t)throw Error(o(300));null===e||Rs||null!==(e=e.dependencies)&&Ir(e)&&(Rs=!0)}function no(e,t,n,i){Ha=e;var r=0;do{if(Ga&&(Xa=null),Qa=0,Ga=!1,25<=r)throw Error(o(301));if(r+=1,Ka=za=null,null!=e.updateQueue){var a=e.updateQueue;a.lastEffect=null,a.events=null,a.stores=null,null!=a.memoCache&&(a.memoCache.index=0)}P.H=ys,a=t(n,i)}while(Ga);return a}function io(){var e=P.H,t=e.useState()[0];return t="function"==typeof t.then?co(t):t,e=e.useState()[0],(null!==za?za.memoizedState:null)!==e&&(Ha.flags|=1024),t}function ro(){var e=0!==Ya;return Ya=0,e}function ao(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function oo(e){if(Wa){for(e=e.memoizedState;null!==e;){var t=e.queue;null!==t&&(t.pending=null),e=e.next}Wa=!1}Va=0,Ka=za=Ha=null,Ga=!1,Qa=Ya=0,Xa=null}function so(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Ka?Ha.memoizedState=Ka=e:Ka=Ka.next=e,Ka}function lo(){if(null===za){var e=Ha.alternate;e=null!==e?e.memoizedState:null}else e=za.next;var t=null===Ka?Ha.memoizedState:Ka.next;if(null!==t)Ka=t,za=e;else{if(null===e){if(null===Ha.alternate)throw Error(o(467));throw Error(o(310))}e={memoizedState:(za=e).memoizedState,baseState:za.baseState,baseQueue:za.baseQueue,queue:za.queue,next:null},null===Ka?Ha.memoizedState=Ka=e:Ka=Ka.next=e}return Ka}function co(e){var t=Qa;return Qa+=1,null===Xa&&(Xa=[]),e=na(Xa,e,t),t=Ha,null===(null===Ka?t.memoizedState:Ka.next)&&(t=t.alternate,P.H=null===t||null===t.memoizedState?gs:vs),e}function uo(e){if(null!==e&&"object"==typeof e){if("function"==typeof e.then)return co(e);if(e.$$typeof===E)return Dr(e)}throw Error(o(438,String(e)))}function ho(e){var t=null,n=Ha.updateQueue;if(null!==n&&(t=n.memoCache),null==t){var i=Ha.alternate;null!==i&&null!==(i=i.updateQueue)&&null!=(i=i.memoCache)&&(t={data:i.data.map(function(e){return e.slice()}),index:0})}if(null==t&&(t={data:[],index:0}),null===n&&(n={lastEffect:null,events:null,stores:null,memoCache:null},Ha.updateQueue=n),n.memoCache=t,void 0===(n=t.data[t.index]))for(n=t.data[t.index]=Array(e),i=0;i<e;i++)n[i]=N;return t.index++,n}function fo(e,t){return"function"==typeof t?t(e):t}function po(e){return mo(lo(),za,e)}function mo(e,t,n){var i=e.queue;if(null===i)throw Error(o(311));i.lastRenderedReducer=n;var r=e.baseQueue,a=i.pending;if(null!==a){if(null!==r){var s=r.next;r.next=a.next,a.next=s}t.baseQueue=r=a,i.pending=null}if(a=e.baseState,null===r)e.memoizedState=a;else{var l=s=null,c=null,u=t=r.next,d=!1;do{var h=-536870913&u.lane;if(h!==u.lane?(gc&h)===h:(Va&h)===h){var f=u.revertLane;if(0===f)null!==c&&(c=c.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),h===zr&&(d=!0);else{if((Va&f)===f){u=u.next,f===zr&&(d=!0);continue}h={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},null===c?(l=c=h,s=a):c=c.next=h,Ha.lanes|=f,Sc|=f}h=u.action,qa&&n(a,h),a=u.hasEagerState?u.eagerState:n(a,h)}else f={lane:h,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},null===c?(l=c=f,s=a):c=c.next=f,Ha.lanes|=h,Sc|=h;u=u.next}while(null!==u&&u!==t);if(null===c?s=a:c.next=l,!Jn(a,e.memoizedState)&&(Rs=!0,d&&null!==(n=Kr)))throw n;e.memoizedState=a,e.baseState=s,e.baseQueue=c,i.lastRenderedState=a}return null===r&&(i.lanes=0),[e.memoizedState,i.dispatch]}function go(e){var t=lo(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var i=n.dispatch,r=n.pending,a=t.memoizedState;if(null!==r){n.pending=null;var s=r=r.next;do{a=e(a,s.action),s=s.next}while(s!==r);Jn(a,t.memoizedState)||(Rs=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,i]}function vo(e,t,n){var i=Ha,r=lo(),a=dr;if(a){if(void 0===n)throw Error(o(407));n=n()}else n=t();var s=!Jn((za||r).memoizedState,n);if(s&&(r.memoizedState=n,Rs=!0),r=r.queue,Ho(Ao.bind(null,i,r,e),[e]),r.getSnapshot!==t||s||null!==Ka&&1&Ka.memoizedState.tag){if(i.flags|=2048,Fo(9,{destroy:void 0},bo.bind(null,i,r,n,t),null),null===pc)throw Error(o(349));a||127&Va||yo(i,t,n)}return n}function yo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=Ha.updateQueue)?(t={lastEffect:null,events:null,stores:null,memoCache:null},Ha.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function bo(e,t,n,i){t.value=n,t.getSnapshot=i,Eo(t)&&To(e)}function Ao(e,t,n){return n(function(){Eo(t)&&To(e)})}function Eo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Jn(e,n)}catch(e){return!0}}function To(e){var t=Ri(e,2);null!==t&&Yc(t,e,2)}function wo(e){var t=so();if("function"==typeof e){var n=e;if(e=n(),qa){be(!0);try{n()}finally{be(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:fo,lastRenderedState:e},t}function So(e,t,n,i){return e.baseState=n,mo(e,za,"function"==typeof i?i:fo)}function Co(e,t,n,i,r){if(hs(e))throw Error(o(485));if(null!==(e=t.action)){var a={payload:r,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(e){a.listeners.push(e)}};null!==P.T?n(!0):a.isTransition=!1,i(a),null===(n=t.pending)?(a.next=t.pending=a,ko(t,a)):(a.next=n.next,t.pending=n.next=a)}}function ko(e,t){var n=t.action,i=t.payload,r=e.state;if(t.isTransition){var a=P.T,o={};P.T=o;try{var s=n(r,i),l=P.S;null!==l&&l(o,s),xo(e,t,s)}catch(n){_o(e,t,n)}finally{null!==a&&null!==o.types&&(a.types=o.types),P.T=a}}else try{xo(e,t,a=n(r,i))}catch(n){_o(e,t,n)}}function xo(e,t,n){null!==n&&"object"==typeof n&&"function"==typeof n.then?n.then(function(n){No(e,t,n)},function(n){return _o(e,t,n)}):No(e,t,n)}function No(e,t,n){t.status="fulfilled",t.value=n,Io(t),e.state=n,null!==(t=e.pending)&&((n=t.next)===t?e.pending=null:(n=n.next,t.next=n,ko(e,n)))}function _o(e,t,n){var i=e.pending;if(e.pending=null,null!==i){i=i.next;do{t.status="rejected",t.reason=n,Io(t),t=t.next}while(t!==i)}e.action=null}function Io(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Oo(e,t){return t}function Do(e,t){if(dr){var n=pc.formState;if(null!==n){e:{var i=Ha;if(dr){if(ur){t:{for(var r=ur,a=fr;8!==r.nodeType;){if(!a){r=null;break t}if(null===(r=Rd(r.nextSibling))){r=null;break t}}r="F!"===(a=r.data)||"F"===a?r:null}if(r){ur=Rd(r.nextSibling),i="F!"===r.data;break e}}mr(i)}i=!1}i&&(t=n[0])}}return(n=so()).memoizedState=n.baseState=t,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Oo,lastRenderedState:t},n.queue=i,n=cs.bind(null,Ha,i),i.dispatch=n,i=wo(!1),a=ds.bind(null,Ha,!1,i.queue),r={state:t,dispatch:null,action:e,pending:null},(i=so()).queue=r,n=Co.bind(null,Ha,r,a,n),r.dispatch=n,i.memoizedState=e,[t,n,!1]}function Ro(e){return Po(lo(),za,e)}function Po(e,t,n){if(t=mo(e,t,Oo)[0],e=po(fo)[0],"object"==typeof t&&null!==t&&"function"==typeof t.then)try{var i=co(t)}catch(e){if(e===Zr)throw $r;throw e}else i=t;var r=(t=lo()).queue,a=r.dispatch;return n!==t.memoizedState&&(Ha.flags|=2048,Fo(9,{destroy:void 0},Lo.bind(null,r,n),null)),[i,a,e]}function Lo(e,t){e.action=t}function Mo(e){var t=lo(),n=za;if(null!==n)return Po(t,n,e);lo(),t=t.memoizedState;var i=(n=lo()).queue.dispatch;return n.memoizedState=e,[t,i,!1]}function Fo(e,t,n,i){return e={tag:e,create:n,deps:i,inst:t,next:null},null===(t=Ha.updateQueue)&&(t={lastEffect:null,events:null,stores:null,memoCache:null},Ha.updateQueue=t),null===(n=t.lastEffect)?t.lastEffect=e.next=e:(i=n.next,n.next=e,e.next=i,t.lastEffect=e),e}function Uo(){return lo().memoizedState}function Bo(e,t,n,i){var r=so();Ha.flags|=e,r.memoizedState=Fo(1|t,{destroy:void 0},n,void 0===i?null:i)}function jo(e,t,n,i){var r=lo();i=void 0===i?null:i;var a=r.memoizedState.inst;null!==za&&null!==i&&$a(i,za.memoizedState.deps)?r.memoizedState=Fo(t,a,n,i):(Ha.flags|=e,r.memoizedState=Fo(1|t,a,n,i))}function Vo(e,t){Bo(8390656,8,e,t)}function Ho(e,t){jo(2048,8,e,t)}function zo(e){var t=lo().memoizedState;return function(e){Ha.flags|=4;var t=Ha.updateQueue;if(null===t)t={lastEffect:null,events:null,stores:null,memoCache:null},Ha.updateQueue=t,t.events=[e];else{var n=t.events;null===n?t.events=[e]:n.push(e)}}({ref:t,nextImpl:e}),function(){if(2&fc)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function Ko(e,t){return jo(4,2,e,t)}function Wo(e,t){return jo(4,4,e,t)}function Go(e,t){if("function"==typeof t){e=e();var n=t(e);return function(){"function"==typeof n?n():t(null)}}if(null!=t)return e=e(),t.current=e,function(){t.current=null}}function qo(e,t,n){n=null!=n?n.concat([e]):null,jo(4,4,Go.bind(null,t,e),n)}function Yo(){}function Qo(e,t){var n=lo();t=void 0===t?null:t;var i=n.memoizedState;return null!==t&&$a(t,i[1])?i[0]:(n.memoizedState=[e,t],e)}function Xo(e,t){var n=lo();t=void 0===t?null:t;var i=n.memoizedState;if(null!==t&&$a(t,i[1]))return i[0];if(i=e(),qa){be(!0);try{e()}finally{be(!1)}}return n.memoizedState=[i,t],i}function Zo(e,t,n){return void 0===n||1073741824&Va&&!(261930&gc)?e.memoizedState=t:(e.memoizedState=n,e=qc(),Ha.lanes|=e,Sc|=e,n)}function Jo(e,t,n,i){return Jn(n,t)?n:null!==xa.current?(e=Zo(e,n,i),Jn(e,t)||(Rs=!0),e):42&Va&&(!(1073741824&Va)||261930&gc)?(e=qc(),Ha.lanes|=e,Sc|=e,t):(Rs=!0,e.memoizedState=n)}function $o(e,t,n,i,r){var a=L.p;L.p=0!==a&&8>a?a:8;var o=P.T,s={};P.T=s,ds(e,!1,t,n);try{var l=r(),c=P.S;null!==c&&c(s,l),null!==l&&"object"==typeof l&&"function"==typeof l.then?us(e,t,function(e,t){var n=[],i={status:"pending",value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){i.status="fulfilled",i.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(i.status="rejected",i.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),i}(l,i),Gc()):us(e,t,i,Gc())}catch(n){us(e,t,{then:function(){},status:"rejected",reason:n},Gc())}finally{L.p=a,null!==o&&null!==s.types&&(o.types=s.types),P.T=o}}function es(){}function ts(e,t,n,i){if(5!==e.tag)throw Error(o(476));var r=ns(e).queue;$o(e,r,t,M,null===n?es:function(){return is(e),n(i)})}function ns(e){var t=e.memoizedState;if(null!==t)return t;var n={};return(t={memoizedState:M,baseState:M,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fo,lastRenderedState:M},next:null}).next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fo,lastRenderedState:n},next:null},e.memoizedState=t,null!==(e=e.alternate)&&(e.memoizedState=t),t}function is(e){var t=ns(e);null===t.next&&(t=e.alternate.memoizedState),us(e,t.next.queue,{},Gc())}function rs(){return Dr(uh)}function as(){return lo().memoizedState}function os(){return lo().memoizedState}function ss(e){for(var t=e.return;null!==t;){switch(t.tag){case 24:case 3:var n=Gc(),i=ba(t,e=ya(n),n);return null!==i&&(Yc(i,t,n),Aa(i,t,n)),t={cache:Br()},void(e.payload=t)}t=t.return}}function ls(e,t,n){var i=Gc();n={lane:i,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},hs(e)?fs(t,n):null!==(n=Di(e,t,n,i))&&(Yc(n,e,i),ps(n,t,i))}function cs(e,t,n){us(e,t,n,Gc())}function us(e,t,n,i){var r={lane:i,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(hs(e))fs(t,r);else{var a=e.alternate;if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var o=t.lastRenderedState,s=a(o,n);if(r.hasEagerState=!0,r.eagerState=s,Jn(s,o))return Oi(e,t,r,0),null===pc&&Ii(),!1}catch(e){}if(null!==(n=Di(e,t,r,i)))return Yc(n,e,i),ps(n,t,i),!0}return!1}function ds(e,t,n,i){if(i={lane:2,revertLane:Hu(),gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},hs(e)){if(t)throw Error(o(479))}else null!==(t=Di(e,n,i,2))&&Yc(t,e,2)}function hs(e){var t=e.alternate;return e===Ha||null!==t&&t===Ha}function fs(e,t){Ga=Wa=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ps(e,t,n){if(4194048&n){var i=t.lanes;n|=i&=e.pendingLanes,t.lanes=n,Pe(e,n)}}var ms={readContext:Dr,use:uo,useCallback:Ja,useContext:Ja,useEffect:Ja,useImperativeHandle:Ja,useLayoutEffect:Ja,useInsertionEffect:Ja,useMemo:Ja,useReducer:Ja,useRef:Ja,useState:Ja,useDebugValue:Ja,useDeferredValue:Ja,useTransition:Ja,useSyncExternalStore:Ja,useId:Ja,useHostTransitionStatus:Ja,useFormState:Ja,useActionState:Ja,useOptimistic:Ja,useMemoCache:Ja,useCacheRefresh:Ja};ms.useEffectEvent=Ja;var gs={readContext:Dr,use:uo,useCallback:function(e,t){return so().memoizedState=[e,void 0===t?null:t],e},useContext:Dr,useEffect:Vo,useImperativeHandle:function(e,t,n){n=null!=n?n.concat([e]):null,Bo(4194308,4,Go.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Bo(4194308,4,e,t)},useInsertionEffect:function(e,t){Bo(4,2,e,t)},useMemo:function(e,t){var n=so();t=void 0===t?null:t;var i=e();if(qa){be(!0);try{e()}finally{be(!1)}}return n.memoizedState=[i,t],i},useReducer:function(e,t,n){var i=so();if(void 0!==n){var r=n(t);if(qa){be(!0);try{n(t)}finally{be(!1)}}}else r=t;return i.memoizedState=i.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},i.queue=e,e=e.dispatch=ls.bind(null,Ha,e),[i.memoizedState,e]},useRef:function(e){return e={current:e},so().memoizedState=e},useState:function(e){var t=(e=wo(e)).queue,n=cs.bind(null,Ha,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Yo,useDeferredValue:function(e,t){return Zo(so(),e,t)},useTransition:function(){var e=wo(!1);return e=$o.bind(null,Ha,e.queue,!0,!1),so().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var i=Ha,r=so();if(dr){if(void 0===n)throw Error(o(407));n=n()}else{if(n=t(),null===pc)throw Error(o(349));127&gc||yo(i,t,n)}r.memoizedState=n;var a={value:n,getSnapshot:t};return r.queue=a,Vo(Ao.bind(null,i,a,e),[e]),i.flags|=2048,Fo(9,{destroy:void 0},bo.bind(null,i,a,n,t),null),n},useId:function(){var e=so(),t=pc.identifierPrefix;if(dr){var n=ir;t="_"+t+"R_"+(n=(nr&~(1<<32-Ae(nr)-1)).toString(32)+n),0<(n=Ya++)&&(t+="H"+n.toString(32)),t+="_"}else t="_"+t+"r_"+(n=Za++).toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:rs,useFormState:Do,useActionState:Do,useOptimistic:function(e){var t=so();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=ds.bind(null,Ha,!0,n),n.dispatch=t,[e,t]},useMemoCache:ho,useCacheRefresh:function(){return so().memoizedState=ss.bind(null,Ha)},useEffectEvent:function(e){var t=so(),n={impl:e};return t.memoizedState=n,function(){if(2&fc)throw Error(o(440));return n.impl.apply(void 0,arguments)}}},vs={readContext:Dr,use:uo,useCallback:Qo,useContext:Dr,useEffect:Ho,useImperativeHandle:qo,useInsertionEffect:Ko,useLayoutEffect:Wo,useMemo:Xo,useReducer:po,useRef:Uo,useState:function(){return po(fo)},useDebugValue:Yo,useDeferredValue:function(e,t){return Jo(lo(),za.memoizedState,e,t)},useTransition:function(){var e=po(fo)[0],t=lo().memoizedState;return["boolean"==typeof e?e:co(e),t]},useSyncExternalStore:vo,useId:as,useHostTransitionStatus:rs,useFormState:Ro,useActionState:Ro,useOptimistic:function(e,t){return So(lo(),0,e,t)},useMemoCache:ho,useCacheRefresh:os};vs.useEffectEvent=zo;var ys={readContext:Dr,use:uo,useCallback:Qo,useContext:Dr,useEffect:Ho,useImperativeHandle:qo,useInsertionEffect:Ko,useLayoutEffect:Wo,useMemo:Xo,useReducer:go,useRef:Uo,useState:function(){return go(fo)},useDebugValue:Yo,useDeferredValue:function(e,t){var n=lo();return null===za?Zo(n,e,t):Jo(n,za.memoizedState,e,t)},useTransition:function(){var e=go(fo)[0],t=lo().memoizedState;return["boolean"==typeof e?e:co(e),t]},useSyncExternalStore:vo,useId:as,useHostTransitionStatus:rs,useFormState:Mo,useActionState:Mo,useOptimistic:function(e,t){var n=lo();return null!==za?So(n,0,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:ho,useCacheRefresh:os};function bs(e,t,n,i){n=null===(n=n(i,t=e.memoizedState))||void 0===n?t:f({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}ys.useEffectEvent=zo;var As={enqueueSetState:function(e,t,n){e=e._reactInternals;var i=Gc(),r=ya(i);r.payload=t,null!=n&&(r.callback=n),null!==(t=ba(e,r,i))&&(Yc(t,e,i),Aa(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var i=Gc(),r=ya(i);r.tag=1,r.payload=t,null!=n&&(r.callback=n),null!==(t=ba(e,r,i))&&(Yc(t,e,i),Aa(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Gc(),i=ya(n);i.tag=2,null!=t&&(i.callback=t),null!==(t=ba(e,i,n))&&(Yc(t,e,n),Aa(t,e,n))}};function Es(e,t,n,i,r,a,o){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(i,a,o):!(t.prototype&&t.prototype.isPureReactComponent&&$n(n,i)&&$n(r,a))}function Ts(e,t,n,i){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,i),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,i),t.state!==e&&As.enqueueReplaceState(t,t.state,null)}function ws(e,t){var n=t;if("ref"in t)for(var i in n={},t)"ref"!==i&&(n[i]=t[i]);if(e=e.defaultProps)for(var r in n===t&&(n=f({},n)),e)void 0===n[r]&&(n[r]=e[r]);return n}function Ss(e){ki(e)}function Cs(e){console.error(e)}function ks(e){ki(e)}function xs(e,t){try{(0,e.onUncaughtError)(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Ns(e,t,n){try{(0,e.onCaughtError)(n.value,{componentStack:n.stack,errorBoundary:1===t.tag?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function _s(e,t,n){return(n=ya(n)).tag=3,n.payload={element:null},n.callback=function(){xs(e,t)},n}function Is(e){return(e=ya(e)).tag=3,e}function Os(e,t,n,i){var r=n.type.getDerivedStateFromError;if("function"==typeof r){var a=i.value;e.payload=function(){return r(a)},e.callback=function(){Ns(t,n,i)}}var o=n.stateNode;null!==o&&"function"==typeof o.componentDidCatch&&(e.callback=function(){Ns(t,n,i),"function"!=typeof r&&(null===Mc?Mc=new Set([this]):Mc.add(this));var e=i.stack;this.componentDidCatch(i.value,{componentStack:null!==e?e:""})})}var Ds=Error(o(461)),Rs=!1;function Ps(e,t,n,i){t.child=null===e?pa(t,null,n,i):fa(t,e.child,n,i)}function Ls(e,t,n,i,r){n=n.render;var a=t.ref;if("ref"in i){var o={};for(var s in i)"ref"!==s&&(o[s]=i[s])}else o=i;return Or(t),i=eo(e,t,n,o,a,r),s=ro(),null===e||Rs?(dr&&s&&or(t),t.flags|=1,Ps(e,t,i,r),t.child):(ao(e,t,r),rl(e,t,r))}function Ms(e,t,n,i,r){if(null===e){var a=n.type;return"function"!=typeof a||Bi(a)||void 0!==a.defaultProps||null!==n.compare?((e=Hi(n.type,null,i,t,t.mode,r)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Fs(e,t,a,i,r))}if(a=e.child,!al(e,r)){var o=a.memoizedProps;if((n=null!==(n=n.compare)?n:$n)(o,i)&&e.ref===t.ref)return rl(e,t,r)}return t.flags|=1,(e=ji(a,i)).ref=t.ref,e.return=t,t.child=e}function Fs(e,t,n,i,r){if(null!==e){var a=e.memoizedProps;if($n(a,i)&&e.ref===t.ref){if(Rs=!1,t.pendingProps=i=a,!al(e,r))return t.lanes=e.lanes,rl(e,t,r);131072&e.flags&&(Rs=!0)}}return Ks(e,t,n,i,r)}function Us(e,t,n,i){var r=i.children,a=null!==e?e.memoizedState:null;if(null===e&&null===t.stateNode&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),"hidden"===i.mode){if(128&t.flags){if(a=null!==a?a.baseLanes|n:n,null!==e){for(i=t.child=e.child,r=0;null!==i;)r=r|i.lanes|i.childLanes,i=i.sibling;i=r&~a}else i=0,t.child=null;return js(e,t,a,n,i)}if(!(536870912&n))return i=t.lanes=536870912,js(e,t,null!==a?a.baseLanes|n:n,n,i);t.memoizedState={baseLanes:0,cachePool:null},null!==e&&Qr(0,null!==a?a.cachePool:null),null!==a?_a(t,a):Ia(),Ma(t)}else null!==a?(Qr(0,a.cachePool),_a(t,a),Fa(),t.memoizedState=null):(null!==e&&Qr(0,null),Ia(),Fa());return Ps(e,t,r,n),t.child}function Bs(e,t){return null!==e&&22===e.tag||null!==t.stateNode||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function js(e,t,n,i,r){var a=Yr();return a=null===a?null:{parent:Ur._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},null!==e&&Qr(0,null),Ia(),Ma(t),null!==e&&_r(e,t,i,!0),t.childLanes=r,null}function Vs(e,t){return(t=$s({mode:t.mode,children:t.children},e.mode)).ref=e.ref,e.child=t,t.return=e,t}function Hs(e,t,n){return fa(t,e.child,null,n),(e=Vs(t,t.pendingProps)).flags|=2,Ua(t),t.memoizedState=null,e}function zs(e,t){var n=t.ref;if(null===n)null!==e&&null!==e.ref&&(t.flags|=4194816);else{if("function"!=typeof n&&"object"!=typeof n)throw Error(o(284));null!==e&&e.ref===n||(t.flags|=4194816)}}function Ks(e,t,n,i,r){return Or(t),n=eo(e,t,n,i,void 0,r),i=ro(),null===e||Rs?(dr&&i&&or(t),t.flags|=1,Ps(e,t,n,r),t.child):(ao(e,t,r),rl(e,t,r))}function Ws(e,t,n,i,r,a){return Or(t),t.updateQueue=null,n=no(t,i,n,r),to(e),i=ro(),null===e||Rs?(dr&&i&&or(t),t.flags|=1,Ps(e,t,n,a),t.child):(ao(e,t,a),rl(e,t,a))}function Gs(e,t,n,i,r){if(Or(t),null===t.stateNode){var a=Mi,o=n.contextType;"object"==typeof o&&null!==o&&(a=Dr(o)),a=new n(i,a),t.memoizedState=null!==a.state&&void 0!==a.state?a.state:null,a.updater=As,t.stateNode=a,a._reactInternals=t,(a=t.stateNode).props=i,a.state=t.memoizedState,a.refs={},ga(t),o=n.contextType,a.context="object"==typeof o&&null!==o?Dr(o):Mi,a.state=t.memoizedState,"function"==typeof(o=n.getDerivedStateFromProps)&&(bs(t,n,o,i),a.state=t.memoizedState),"function"==typeof n.getDerivedStateFromProps||"function"==typeof a.getSnapshotBeforeUpdate||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||(o=a.state,"function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount(),o!==a.state&&As.enqueueReplaceState(a,a.state,null),Sa(t,i,a,r),wa(),a.state=t.memoizedState),"function"==typeof a.componentDidMount&&(t.flags|=4194308),i=!0}else if(null===e){a=t.stateNode;var s=t.memoizedProps,l=ws(n,s);a.props=l;var c=a.context,u=n.contextType;o=Mi,"object"==typeof u&&null!==u&&(o=Dr(u));var d=n.getDerivedStateFromProps;u="function"==typeof d||"function"==typeof a.getSnapshotBeforeUpdate,s=t.pendingProps!==s,u||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s||c!==o)&&Ts(t,a,i,o),ma=!1;var h=t.memoizedState;a.state=h,Sa(t,i,a,r),wa(),c=t.memoizedState,s||h!==c||ma?("function"==typeof d&&(bs(t,n,d,i),c=t.memoizedState),(l=ma||Es(t,n,l,i,h,c,o))?(u||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.flags|=4194308)):("function"==typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=c),a.props=i,a.state=c,a.context=o,i=l):("function"==typeof a.componentDidMount&&(t.flags|=4194308),i=!1)}else{a=t.stateNode,va(e,t),u=ws(n,o=t.memoizedProps),a.props=u,d=t.pendingProps,h=a.context,c=n.contextType,l=Mi,"object"==typeof c&&null!==c&&(l=Dr(c)),(c="function"==typeof(s=n.getDerivedStateFromProps)||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(o!==d||h!==l)&&Ts(t,a,i,l),ma=!1,h=t.memoizedState,a.state=h,Sa(t,i,a,r),wa();var f=t.memoizedState;o!==d||h!==f||ma||null!==e&&null!==e.dependencies&&Ir(e.dependencies)?("function"==typeof s&&(bs(t,n,s,i),f=t.memoizedState),(u=ma||Es(t,n,u,i,h,f,l)||null!==e&&null!==e.dependencies&&Ir(e.dependencies))?(c||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(i,f,l),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(i,f,l)),"function"==typeof a.componentDidUpdate&&(t.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof a.componentDidUpdate||o===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||o===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=f),a.props=i,a.state=f,a.context=l,i=u):("function"!=typeof a.componentDidUpdate||o===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||o===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),i=!1)}return a=i,zs(e,t),i=!!(128&t.flags),a||i?(a=t.stateNode,n=i&&"function"!=typeof n.getDerivedStateFromError?null:a.render(),t.flags|=1,null!==e&&i?(t.child=fa(t,e.child,null,r),t.child=fa(t,null,n,r)):Ps(e,t,n,r),t.memoizedState=a.state,e=t.child):e=rl(e,t,r),e}function qs(e,t,n,i){return br(),t.flags|=256,Ps(e,t,n,i),t.child}var Ys={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Qs(e){return{baseLanes:e,cachePool:Xr()}}function Xs(e,t,n){return e=null!==e?e.childLanes&~n:0,t&&(e|=xc),e}function Zs(e,t,n){var i,r=t.pendingProps,a=!1,s=!!(128&t.flags);if((i=s)||(i=(null===e||null!==e.memoizedState)&&!!(2&Ba.current)),i&&(a=!0,t.flags&=-129),i=!!(32&t.flags),t.flags&=-33,null===e){if(dr){if(a?Pa(t):Fa(),(e=ur)?null!==(e=null!==(e=Id(e,fr))&&"&"!==e.data?e:null)&&(t.memoizedState={dehydrated:e,treeContext:null!==tr?{id:nr,overflow:ir}:null,retryLane:536870912,hydrationErrors:null},(n=Wi(e)).return=t,t.child=n,cr=t,ur=null):e=null,null===e)throw mr(t);return Dd(e)?t.lanes=32:t.lanes=536870912,null}var l=r.children;return r=r.fallback,a?(Fa(),l=$s({mode:"hidden",children:l},a=t.mode),r=zi(r,a,n,null),l.return=t,r.return=t,l.sibling=r,t.child=l,(r=t.child).memoizedState=Qs(n),r.childLanes=Xs(e,i,n),t.memoizedState=Ys,Bs(null,r)):(Pa(t),Js(t,l))}var c=e.memoizedState;if(null!==c&&null!==(l=c.dehydrated)){if(s)256&t.flags?(Pa(t),t.flags&=-257,t=el(e,t,n)):null!==t.memoizedState?(Fa(),t.child=e.child,t.flags|=128,t=null):(Fa(),l=r.fallback,a=t.mode,r=$s({mode:"visible",children:r.children},a),(l=zi(l,a,n,null)).flags|=2,r.return=t,l.return=t,r.sibling=l,t.child=r,fa(t,e.child,null,n),(r=t.child).memoizedState=Qs(n),r.childLanes=Xs(e,i,n),t.memoizedState=Ys,t=Bs(null,r));else if(Pa(t),Dd(l)){if(i=l.nextSibling&&l.nextSibling.dataset)var u=i.dgst;i=u,(r=Error(o(419))).stack="",r.digest=i,Er({value:r,source:null,stack:null}),t=el(e,t,n)}else if(Rs||_r(e,t,n,!1),i=0!==(n&e.childLanes),Rs||i){if(null!==(i=pc)&&0!==(r=Le(i,n))&&r!==c.retryLane)throw c.retryLane=r,Ri(e,r),Yc(i,e,r),Ds;Od(l)||ou(),t=el(e,t,n)}else Od(l)?(t.flags|=192,t.child=e.child,t=null):(e=c.treeContext,ur=Rd(l.nextSibling),cr=t,dr=!0,hr=null,fr=!1,null!==e&&lr(t,e),(t=Js(t,r.children)).flags|=4096);return t}return a?(Fa(),l=r.fallback,a=t.mode,u=(c=e.child).sibling,(r=ji(c,{mode:"hidden",children:r.children})).subtreeFlags=65011712&c.subtreeFlags,null!==u?l=ji(u,l):(l=zi(l,a,n,null)).flags|=2,l.return=t,r.return=t,r.sibling=l,t.child=r,Bs(null,r),r=t.child,null===(l=e.child.memoizedState)?l=Qs(n):(null!==(a=l.cachePool)?(c=Ur._currentValue,a=a.parent!==c?{parent:c,pool:c}:a):a=Xr(),l={baseLanes:l.baseLanes|n,cachePool:a}),r.memoizedState=l,r.childLanes=Xs(e,i,n),t.memoizedState=Ys,Bs(e.child,r)):(Pa(t),e=(n=e.child).sibling,(n=ji(n,{mode:"visible",children:r.children})).return=t,n.sibling=null,null!==e&&(null===(i=t.deletions)?(t.deletions=[e],t.flags|=16):i.push(e)),t.child=n,t.memoizedState=null,n)}function Js(e,t){return(t=$s({mode:"visible",children:t},e.mode)).return=e,e.child=t}function $s(e,t){return(e=Ui(22,e,null,t)).lanes=0,e}function el(e,t,n){return fa(t,e.child,null,n),(e=Js(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function tl(e,t,n){e.lanes|=t;var i=e.alternate;null!==i&&(i.lanes|=t),xr(e.return,t,n)}function nl(e,t,n,i,r,a){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:n,tailMode:r,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=i,o.tail=n,o.tailMode=r,o.treeForkCount=a)}function il(e,t,n){var i=t.pendingProps,r=i.revealOrder,a=i.tail;i=i.children;var o=Ba.current,s=!!(2&o);if(s?(o=1&o|2,t.flags|=128):o&=1,V(Ba,o),Ps(e,t,i,n),i=dr?Ji:0,!s&&null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&tl(e,n,t);else if(19===e.tag)tl(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(r){case"forwards":for(n=t.child,r=null;null!==n;)null!==(e=n.alternate)&&null===ja(e)&&(r=n),n=n.sibling;null===(n=r)?(r=t.child,t.child=null):(r=n.sibling,n.sibling=null),nl(t,!1,r,n,a,i);break;case"backwards":case"unstable_legacy-backwards":for(n=null,r=t.child,t.child=null;null!==r;){if(null!==(e=r.alternate)&&null===ja(e)){t.child=r;break}e=r.sibling,r.sibling=n,n=r,r=e}nl(t,!0,n,null,a,i);break;case"together":nl(t,!1,null,null,void 0,i);break;default:t.memoizedState=null}return t.child}function rl(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Sc|=t.lanes,0===(n&t.childLanes)){if(null===e)return null;if(_r(e,t,n,!1),0===(n&t.childLanes))return null}if(null!==e&&t.child!==e.child)throw Error(o(153));if(null!==t.child){for(n=ji(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=ji(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function al(e,t){return 0!==(e.lanes&t)||!(null===(e=e.dependencies)||!Ir(e))}function ol(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps)Rs=!0;else{if(!(al(e,n)||128&t.flags))return Rs=!1,function(e,t,n){switch(t.tag){case 3:Y(t,t.stateNode.containerInfo),Cr(0,Ur,e.memoizedState.cache),br();break;case 27:case 5:X(t);break;case 4:Y(t,t.stateNode.containerInfo);break;case 10:Cr(0,t.type,t.memoizedProps.value);break;case 31:if(null!==t.memoizedState)return t.flags|=128,La(t),null;break;case 13:var i=t.memoizedState;if(null!==i)return null!==i.dehydrated?(Pa(t),t.flags|=128,null):0!==(n&t.child.childLanes)?Zs(e,t,n):(Pa(t),null!==(e=rl(e,t,n))?e.sibling:null);Pa(t);break;case 19:var r=!!(128&e.flags);if((i=0!==(n&t.childLanes))||(_r(e,t,n,!1),i=0!==(n&t.childLanes)),r){if(i)return il(e,t,n);t.flags|=128}if(null!==(r=t.memoizedState)&&(r.rendering=null,r.tail=null,r.lastEffect=null),V(Ba,Ba.current),i)break;return null;case 22:return t.lanes=0,Us(e,t,n,t.pendingProps);case 24:Cr(0,Ur,e.memoizedState.cache)}return rl(e,t,n)}(e,t,n);Rs=!!(131072&e.flags)}else Rs=!1,dr&&1048576&t.flags&&ar(t,Ji,t.index);switch(t.lanes=0,t.tag){case 16:e:{var i=t.pendingProps;if(e=ia(t.elementType),t.type=e,"function"!=typeof e){if(null!=e){var r=e.$$typeof;if(r===T){t.tag=11,t=Ls(null,t,e,i,n);break e}if(r===C){t.tag=14,t=Ms(null,t,e,i,n);break e}}throw t=D(e)||e,Error(o(306,t,""))}Bi(e)?(i=ws(e,i),t.tag=1,t=Gs(null,t,e,i,n)):(t.tag=0,t=Ks(null,t,e,i,n))}return t;case 0:return Ks(e,t,t.type,t.pendingProps,n);case 1:return Gs(e,t,i=t.type,r=ws(i,t.pendingProps),n);case 3:e:{if(Y(t,t.stateNode.containerInfo),null===e)throw Error(o(387));i=t.pendingProps;var a=t.memoizedState;r=a.element,va(e,t),Sa(t,i,null,n);var s=t.memoizedState;if(i=s.cache,Cr(0,Ur,i),i!==a.cache&&Nr(t,[Ur],n,!0),wa(),i=s.element,a.isDehydrated){if(a={element:i,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){t=qs(e,t,i,n);break e}if(i!==r){Er(r=Yi(Error(o(424)),t)),t=qs(e,t,i,n);break e}for(e=9===(e=t.stateNode.containerInfo).nodeType?e.body:"HTML"===e.nodeName?e.ownerDocument.body:e,ur=Rd(e.firstChild),cr=t,dr=!0,hr=null,fr=!0,n=pa(t,null,i,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(br(),i===r){t=rl(e,t,n);break e}Ps(e,t,i,n)}t=t.child}return t;case 26:return zs(e,t),null===e?(n=Wd(t.type,null,t.pendingProps,null))?t.memoizedState=n:dr||(n=t.type,e=t.pendingProps,(i=gd(G.current).createElement(n))[Ve]=t,i[He]=e,hd(i,n,e),et(i),t.stateNode=i):t.memoizedState=Wd(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return X(t),null===e&&dr&&(i=t.stateNode=Fd(t.type,t.pendingProps,G.current),cr=t,fr=!0,r=ur,kd(t.type)?(Pd=r,ur=Rd(i.firstChild)):ur=r),Ps(e,t,t.pendingProps.children,n),zs(e,t),null===e&&(t.flags|=4194304),t.child;case 5:return null===e&&dr&&((r=i=ur)&&(null!==(i=function(e,t,n,i){for(;1===e.nodeType;){var r=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!i&&("INPUT"!==e.nodeName||"hidden"!==e.type))break}else if(i){if(!e[Ye])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if("stylesheet"===(a=e.getAttribute("rel"))&&e.hasAttribute("data-precedence"))break;if(a!==r.rel||e.getAttribute("href")!==(null==r.href||""===r.href?null:r.href)||e.getAttribute("crossorigin")!==(null==r.crossOrigin?null:r.crossOrigin)||e.getAttribute("title")!==(null==r.title?null:r.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(((a=e.getAttribute("src"))!==(null==r.src?null:r.src)||e.getAttribute("type")!==(null==r.type?null:r.type)||e.getAttribute("crossorigin")!==(null==r.crossOrigin?null:r.crossOrigin))&&a&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else{if("input"!==t||"hidden"!==e.type)return e;var a=null==r.name?null:""+r.name;if("hidden"===r.type&&e.getAttribute("name")===a)return e}if(null===(e=Rd(e.nextSibling)))break}return null}(i,t.type,t.pendingProps,fr))?(t.stateNode=i,cr=t,ur=Rd(i.firstChild),fr=!1,r=!0):r=!1),r||mr(t)),X(t),r=t.type,a=t.pendingProps,s=null!==e?e.memoizedProps:null,i=a.children,bd(r,a)?i=null:null!==s&&bd(r,s)&&(t.flags|=32),null!==t.memoizedState&&(r=eo(e,t,io,null,null,n),uh._currentValue=r),zs(e,t),Ps(e,t,i,n),t.child;case 6:return null===e&&dr&&((e=n=ur)&&(null!==(n=function(e,t,n){if(""===t)return null;for(;3!==e.nodeType;){if((1!==e.nodeType||"INPUT"!==e.nodeName||"hidden"!==e.type)&&!n)return null;if(null===(e=Rd(e.nextSibling)))return null}return e}(n,t.pendingProps,fr))?(t.stateNode=n,cr=t,ur=null,e=!0):e=!1),e||mr(t)),null;case 13:return Zs(e,t,n);case 4:return Y(t,t.stateNode.containerInfo),i=t.pendingProps,null===e?t.child=fa(t,null,i,n):Ps(e,t,i,n),t.child;case 11:return Ls(e,t,t.type,t.pendingProps,n);case 7:return Ps(e,t,t.pendingProps,n),t.child;case 8:case 12:return Ps(e,t,t.pendingProps.children,n),t.child;case 10:return i=t.pendingProps,Cr(0,t.type,i.value),Ps(e,t,i.children,n),t.child;case 9:return r=t.type._context,i=t.pendingProps.children,Or(t),i=i(r=Dr(r)),t.flags|=1,Ps(e,t,i,n),t.child;case 14:return Ms(e,t,t.type,t.pendingProps,n);case 15:return Fs(e,t,t.type,t.pendingProps,n);case 19:return il(e,t,n);case 31:return function(e,t,n){var i=t.pendingProps,r=!!(128&t.flags);if(t.flags&=-129,null===e){if(dr){if("hidden"===i.mode)return e=Vs(t,i),t.lanes=536870912,Bs(null,e);if(La(t),(e=ur)?null!==(e=null!==(e=Id(e,fr))&&"&"===e.data?e:null)&&(t.memoizedState={dehydrated:e,treeContext:null!==tr?{id:nr,overflow:ir}:null,retryLane:536870912,hydrationErrors:null},(n=Wi(e)).return=t,t.child=n,cr=t,ur=null):e=null,null===e)throw mr(t);return t.lanes=536870912,null}return Vs(t,i)}var a=e.memoizedState;if(null!==a){var s=a.dehydrated;if(La(t),r)if(256&t.flags)t.flags&=-257,t=Hs(e,t,n);else{if(null===t.memoizedState)throw Error(o(558));t.child=e.child,t.flags|=128,t=null}else if(Rs||_r(e,t,n,!1),r=0!==(n&e.childLanes),Rs||r){if(null!==(i=pc)&&0!==(s=Le(i,n))&&s!==a.retryLane)throw a.retryLane=s,Ri(e,s),Yc(i,e,s),Ds;ou(),t=Hs(e,t,n)}else e=a.treeContext,ur=Rd(s.nextSibling),cr=t,dr=!0,hr=null,fr=!1,null!==e&&lr(t,e),(t=Vs(t,i)).flags|=4096;return t}return(e=ji(e.child,{mode:i.mode,children:i.children})).ref=t.ref,t.child=e,e.return=t,e}(e,t,n);case 22:return Us(e,t,n,t.pendingProps);case 24:return Or(t),i=Dr(Ur),null===e?(null===(r=Yr())&&(r=pc,a=Br(),r.pooledCache=a,a.refCount++,null!==a&&(r.pooledCacheLanes|=n),r=a),t.memoizedState={parent:i,cache:r},ga(t),Cr(0,Ur,r)):(0!==(e.lanes&n)&&(va(e,t),Sa(t,null,null,n),wa()),r=e.memoizedState,a=t.memoizedState,r.parent!==i?(r={parent:i,cache:i},t.memoizedState=r,0===t.lanes&&(t.memoizedState=t.updateQueue.baseState=r),Cr(0,Ur,i)):(i=a.cache,Cr(0,Ur,i),i!==r.cache&&Nr(t,[Ur],n,!0))),Ps(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function sl(e){e.flags|=4}function ll(e,t,n,i,r){if((t=!!(32&e.mode))&&(t=!1),t){if(e.flags|=16777216,(335544128&r)===r)if(e.stateNode.complete)e.flags|=8192;else{if(!iu())throw ra=ea,Jr;e.flags|=8192}}else e.flags&=-16777217}function cl(e,t){if("stylesheet"!==t.type||4&t.state.loading)e.flags&=-16777217;else if(e.flags|=16777216,!rh(t)){if(!iu())throw ra=ea,Jr;e.flags|=8192}}function ul(e,t){null!==t&&(e.flags|=4),16384&e.flags&&(t=22!==e.tag?Ie():536870912,e.lanes|=t,Nc|=t)}function dl(e,t){if(!dr)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var i=null;null!==n;)null!==n.alternate&&(i=n),n=n.sibling;null===i?t||null===e.tail?e.tail=null:e.tail.sibling=null:i.sibling=null}}function hl(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,i=0;if(t)for(var r=e.child;null!==r;)n|=r.lanes|r.childLanes,i|=65011712&r.subtreeFlags,i|=65011712&r.flags,r.return=e,r=r.sibling;else for(r=e.child;null!==r;)n|=r.lanes|r.childLanes,i|=r.subtreeFlags,i|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=i,e.childLanes=n,t}function fl(e,t,n){var i=t.pendingProps;switch(sr(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:case 1:return hl(t),null;case 3:return n=t.stateNode,i=null,null!==e&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),kr(Ur),Q(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||(yr(t)?sl(t):null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,Ar())),hl(t),null;case 26:var r=t.type,a=t.memoizedState;return null===e?(sl(t),null!==a?(hl(t),cl(t,a)):(hl(t),ll(t,r,0,0,n))):a?a!==e.memoizedState?(sl(t),hl(t),cl(t,a)):(hl(t),t.flags&=-16777217):((e=e.memoizedProps)!==i&&sl(t),hl(t),ll(t,r,0,0,n)),null;case 27:if(Z(t),n=G.current,r=t.type,null!==e&&null!=t.stateNode)e.memoizedProps!==i&&sl(t);else{if(!i){if(null===t.stateNode)throw Error(o(166));return hl(t),null}e=K.current,yr(t)?gr(t):(e=Fd(r,i,n),t.stateNode=e,sl(t))}return hl(t),null;case 5:if(Z(t),r=t.type,null!==e&&null!=t.stateNode)e.memoizedProps!==i&&sl(t);else{if(!i){if(null===t.stateNode)throw Error(o(166));return hl(t),null}if(a=K.current,yr(t))gr(t);else{var s=gd(G.current);switch(a){case 1:a=s.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:a=s.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":a=s.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":a=s.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":(a=s.createElement("div")).innerHTML="<script><\/script>",a=a.removeChild(a.firstChild);break;case"select":a="string"==typeof i.is?s.createElement("select",{is:i.is}):s.createElement("select"),i.multiple?a.multiple=!0:i.size&&(a.size=i.size);break;default:a="string"==typeof i.is?s.createElement(r,{is:i.is}):s.createElement(r)}}a[Ve]=t,a[He]=i;e:for(s=t.child;null!==s;){if(5===s.tag||6===s.tag)a.appendChild(s.stateNode);else if(4!==s.tag&&27!==s.tag&&null!==s.child){s.child.return=s,s=s.child;continue}if(s===t)break e;for(;null===s.sibling;){if(null===s.return||s.return===t)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=a;e:switch(hd(a,r,i),r){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}i&&sl(t)}}return hl(t),ll(t,t.type,null===e||e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&null!=t.stateNode)e.memoizedProps!==i&&sl(t);else{if("string"!=typeof i&&null===t.stateNode)throw Error(o(166));if(e=G.current,yr(t)){if(e=t.stateNode,n=t.memoizedProps,i=null,null!==(r=cr))switch(r.tag){case 27:case 5:i=r.memoizedProps}e[Ve]=t,(e=!!(e.nodeValue===n||null!==i&&!0===i.suppressHydrationWarning||cd(e.nodeValue,n)))||mr(t,!0)}else(e=gd(e).createTextNode(i))[Ve]=t,t.stateNode=e}return hl(t),null;case 31:if(n=t.memoizedState,null===e||null!==e.memoizedState){if(i=yr(t),null!==n){if(null===e){if(!i)throw Error(o(318));if(!(e=null!==(e=t.memoizedState)?e.dehydrated:null))throw Error(o(557));e[Ve]=t}else br(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;hl(t),e=!1}else n=Ar(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return 256&t.flags?(Ua(t),t):(Ua(t),null);if(128&t.flags)throw Error(o(558))}return hl(t),null;case 13:if(i=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(r=yr(t),null!==i&&null!==i.dehydrated){if(null===e){if(!r)throw Error(o(318));if(!(r=null!==(r=t.memoizedState)?r.dehydrated:null))throw Error(o(317));r[Ve]=t}else br(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;hl(t),r=!1}else r=Ar(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return 256&t.flags?(Ua(t),t):(Ua(t),null)}return Ua(t),128&t.flags?(t.lanes=n,t):(n=null!==i,e=null!==e&&null!==e.memoizedState,n&&(r=null,null!==(i=t.child).alternate&&null!==i.alternate.memoizedState&&null!==i.alternate.memoizedState.cachePool&&(r=i.alternate.memoizedState.cachePool.pool),a=null,null!==i.memoizedState&&null!==i.memoizedState.cachePool&&(a=i.memoizedState.cachePool.pool),a!==r&&(i.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),ul(t,t.updateQueue),hl(t),null);case 4:return Q(),null===e&&$u(t.stateNode.containerInfo),hl(t),null;case 10:return kr(t.type),hl(t),null;case 19:if(j(Ba),null===(i=t.memoizedState))return hl(t),null;if(r=!!(128&t.flags),null===(a=i.rendering))if(r)dl(i,!1);else{if(0!==wc||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(a=ja(e))){for(t.flags|=128,dl(i,!1),e=a.updateQueue,t.updateQueue=e,ul(t,e),t.subtreeFlags=0,e=n,n=t.child;null!==n;)Vi(n,e),n=n.sibling;return V(Ba,1&Ba.current|2),dr&&rr(t,i.treeForkCount),t.child}e=e.sibling}null!==i.tail&&le()>Pc&&(t.flags|=128,r=!0,dl(i,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=ja(a))){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,ul(t,e),dl(i,!0),null===i.tail&&"hidden"===i.tailMode&&!a.alternate&&!dr)return hl(t),null}else 2*le()-i.renderingStartTime>Pc&&536870912!==n&&(t.flags|=128,r=!0,dl(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(null!==(e=i.last)?e.sibling=a:t.child=a,i.last=a)}return null!==i.tail?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=le(),e.sibling=null,n=Ba.current,V(Ba,r?1&n|2:1&n),dr&&rr(t,i.treeForkCount),e):(hl(t),null);case 22:case 23:return Ua(t),Oa(),i=null!==t.memoizedState,null!==e?null!==e.memoizedState!==i&&(t.flags|=8192):i&&(t.flags|=8192),i?!!(536870912&n)&&!(128&t.flags)&&(hl(t),6&t.subtreeFlags&&(t.flags|=8192)):hl(t),null!==(n=t.updateQueue)&&ul(t,n.retryQueue),n=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),i=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(i=t.memoizedState.cachePool.pool),i!==n&&(t.flags|=2048),null!==e&&j(qr),null;case 24:return n=null,null!==e&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),kr(Ur),hl(t),null;case 25:case 30:return null}throw Error(o(156,t.tag))}function pl(e,t){switch(sr(t),t.tag){case 1:return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return kr(Ur),Q(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 26:case 27:case 5:return Z(t),null;case 31:if(null!==t.memoizedState){if(Ua(t),null===t.alternate)throw Error(o(340));br()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 13:if(Ua(t),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(o(340));br()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return j(Ba),null;case 4:return Q(),null;case 10:return kr(t.type),null;case 22:case 23:return Ua(t),Oa(),null!==e&&j(qr),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 24:return kr(Ur),null;default:return null}}function ml(e,t){switch(sr(t),t.tag){case 3:kr(Ur),Q();break;case 26:case 27:case 5:Z(t);break;case 4:Q();break;case 31:null!==t.memoizedState&&Ua(t);break;case 13:Ua(t);break;case 19:j(Ba);break;case 10:kr(t.type);break;case 22:case 23:Ua(t),Oa(),null!==e&&j(qr);break;case 24:kr(Ur)}}function gl(e,t){try{var n=t.updateQueue,i=null!==n?n.lastEffect:null;if(null!==i){var r=i.next;n=r;do{if((n.tag&e)===e){i=void 0;var a=n.create,o=n.inst;i=a(),o.destroy=i}n=n.next}while(n!==r)}}catch(e){wu(t,t.return,e)}}function vl(e,t,n){try{var i=t.updateQueue,r=null!==i?i.lastEffect:null;if(null!==r){var a=r.next;i=a;do{if((i.tag&e)===e){var o=i.inst,s=o.destroy;if(void 0!==s){o.destroy=void 0,r=t;var l=n,c=s;try{c()}catch(e){wu(r,l,e)}}}i=i.next}while(i!==a)}}catch(e){wu(t,t.return,e)}}function yl(e){var t=e.updateQueue;if(null!==t){var n=e.stateNode;try{ka(t,n)}catch(t){wu(e,e.return,t)}}}function bl(e,t,n){n.props=ws(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){wu(e,t,n)}}function Al(e,t){try{var n=e.ref;if(null!==n){switch(e.tag){case 26:case 27:case 5:var i=e.stateNode;break;default:i=e.stateNode}"function"==typeof n?e.refCleanup=n(i):n.current=i}}catch(n){wu(e,t,n)}}function El(e,t){var n=e.ref,i=e.refCleanup;if(null!==n)if("function"==typeof i)try{i()}catch(n){wu(e,t,n)}finally{e.refCleanup=null,null!=(e=e.alternate)&&(e.refCleanup=null)}else if("function"==typeof n)try{n(null)}catch(n){wu(e,t,n)}else n.current=null}function Tl(e){var t=e.type,n=e.memoizedProps,i=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&i.focus();break e;case"img":n.src?i.src=n.src:n.srcSet&&(i.srcset=n.srcSet)}}catch(t){wu(e,e.return,t)}}function wl(e,t,n){try{var i=e.stateNode;!function(e,t,n,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var r=null,a=null,s=null,l=null,c=null,u=null,d=null;for(p in n){var h=n[p];if(n.hasOwnProperty(p)&&null!=h)switch(p){case"checked":case"value":break;case"defaultValue":c=h;default:i.hasOwnProperty(p)||ud(e,t,p,null,i,h)}}for(var f in i){var p=i[f];if(h=n[f],i.hasOwnProperty(f)&&(null!=p||null!=h))switch(f){case"type":a=p;break;case"name":r=p;break;case"checked":u=p;break;case"defaultChecked":d=p;break;case"value":s=p;break;case"defaultValue":l=p;break;case"children":case"dangerouslySetInnerHTML":if(null!=p)throw Error(o(137,t));break;default:p!==h&&ud(e,t,f,p,i,h)}}return void yt(e,s,l,c,u,d,a,r);case"select":for(a in p=s=l=f=null,n)if(c=n[a],n.hasOwnProperty(a)&&null!=c)switch(a){case"value":break;case"multiple":p=c;default:i.hasOwnProperty(a)||ud(e,t,a,null,i,c)}for(r in i)if(a=i[r],c=n[r],i.hasOwnProperty(r)&&(null!=a||null!=c))switch(r){case"value":f=a;break;case"defaultValue":l=a;break;case"multiple":s=a;default:a!==c&&ud(e,t,r,a,i,c)}return t=l,n=s,i=p,void(null!=f?Et(e,!!n,f,!1):!!i!=!!n&&(null!=t?Et(e,!!n,t,!0):Et(e,!!n,n?[]:"",!1)));case"textarea":for(l in p=f=null,n)if(r=n[l],n.hasOwnProperty(l)&&null!=r&&!i.hasOwnProperty(l))switch(l){case"value":case"children":break;default:ud(e,t,l,null,i,r)}for(s in i)if(r=i[s],a=n[s],i.hasOwnProperty(s)&&(null!=r||null!=a))switch(s){case"value":f=r;break;case"defaultValue":p=r;break;case"children":break;case"dangerouslySetInnerHTML":if(null!=r)throw Error(o(91));break;default:r!==a&&ud(e,t,s,r,i,a)}return void Tt(e,f,p);case"option":for(var m in n)f=n[m],n.hasOwnProperty(m)&&null!=f&&!i.hasOwnProperty(m)&&("selected"===m?e.selected=!1:ud(e,t,m,null,i,f));for(c in i)f=i[c],p=n[c],!i.hasOwnProperty(c)||f===p||null==f&&null==p||("selected"===c?e.selected=f&&"function"!=typeof f&&"symbol"!=typeof f:ud(e,t,c,f,i,p));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var g in n)f=n[g],n.hasOwnProperty(g)&&null!=f&&!i.hasOwnProperty(g)&&ud(e,t,g,null,i,f);for(u in i)if(f=i[u],p=n[u],i.hasOwnProperty(u)&&f!==p&&(null!=f||null!=p))switch(u){case"children":case"dangerouslySetInnerHTML":if(null!=f)throw Error(o(137,t));break;default:ud(e,t,u,f,i,p)}return;default:if(Nt(t)){for(var v in n)f=n[v],n.hasOwnProperty(v)&&void 0!==f&&!i.hasOwnProperty(v)&&dd(e,t,v,void 0,i,f);for(d in i)f=i[d],p=n[d],!i.hasOwnProperty(d)||f===p||void 0===f&&void 0===p||dd(e,t,d,f,i,p);return}}for(var y in n)f=n[y],n.hasOwnProperty(y)&&null!=f&&!i.hasOwnProperty(y)&&ud(e,t,y,null,i,f);for(h in i)f=i[h],p=n[h],!i.hasOwnProperty(h)||f===p||null==f&&null==p||ud(e,t,h,f,i,p)}(i,e.type,n,t),i[He]=t}catch(t){wu(e,e.return,t)}}function Sl(e){return 5===e.tag||3===e.tag||26===e.tag||27===e.tag&&kd(e.type)||4===e.tag}function Cl(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||Sl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(27===e.tag&&kd(e.type))continue e;if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function kl(e,t,n){var i=e.tag;if(5===i||6===i)e=e.stateNode,t?(9===n.nodeType?n.body:"HTML"===n.nodeName?n.ownerDocument.body:n).insertBefore(e,t):((t=9===n.nodeType?n.body:"HTML"===n.nodeName?n.ownerDocument.body:n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=Dt));else if(4!==i&&(27===i&&kd(e.type)&&(n=e.stateNode,t=null),null!==(e=e.child)))for(kl(e,t,n),e=e.sibling;null!==e;)kl(e,t,n),e=e.sibling}function xl(e,t,n){var i=e.tag;if(5===i||6===i)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==i&&(27===i&&kd(e.type)&&(n=e.stateNode),null!==(e=e.child)))for(xl(e,t,n),e=e.sibling;null!==e;)xl(e,t,n),e=e.sibling}function Nl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var i=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);hd(t,i,n),t[Ve]=e,t[He]=n}catch(t){wu(e,e.return,t)}}var _l=!1,Il=!1,Ol=!1,Dl="function"==typeof WeakSet?WeakSet:Set,Rl=null;function Pl(e,t,n){var i=n.flags;switch(n.tag){case 0:case 11:case 15:Yl(e,n),4&i&&gl(5,n);break;case 1:if(Yl(e,n),4&i)if(e=n.stateNode,null===t)try{e.componentDidMount()}catch(e){wu(n,n.return,e)}else{var r=ws(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){wu(n,n.return,e)}}64&i&&yl(n),512&i&&Al(n,n.return);break;case 3:if(Yl(e,n),64&i&&null!==(e=n.updateQueue)){if(t=null,null!==n.child)switch(n.child.tag){case 27:case 5:case 1:t=n.child.stateNode}try{ka(e,t)}catch(e){wu(n,n.return,e)}}break;case 27:null===t&&4&i&&Nl(n);case 26:case 5:Yl(e,n),null===t&&4&i&&Tl(n),512&i&&Al(n,n.return);break;case 12:Yl(e,n);break;case 31:Yl(e,n),4&i&&jl(e,n);break;case 13:Yl(e,n),4&i&&Vl(e,n),64&i&&null!==(e=n.memoizedState)&&null!==(e=e.dehydrated)&&function(e,t){var n=e.ownerDocument;if("$~"===e.data)e._reactRetry=t;else if("$?"!==e.data||"loading"!==n.readyState)t();else{var i=function(){t(),n.removeEventListener("DOMContentLoaded",i)};n.addEventListener("DOMContentLoaded",i),e._reactRetry=i}}(e,n=xu.bind(null,n));break;case 22:if(!(i=null!==n.memoizedState||_l)){t=null!==t&&null!==t.memoizedState||Il,r=_l;var a=Il;_l=i,(Il=t)&&!a?Xl(e,n,!!(8772&n.subtreeFlags)):Yl(e,n),_l=r,Il=a}break;case 30:break;default:Yl(e,n)}}function Ll(e){var t=e.alternate;null!==t&&(e.alternate=null,Ll(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&null!==(t=e.stateNode)&&Qe(t),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Ml=null,Fl=!1;function Ul(e,t,n){for(n=n.child;null!==n;)Bl(e,t,n),n=n.sibling}function Bl(e,t,n){if(ye&&"function"==typeof ye.onCommitFiberUnmount)try{ye.onCommitFiberUnmount(ve,n)}catch(e){}switch(n.tag){case 26:Il||El(n,t),Ul(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode).parentNode.removeChild(n);break;case 27:Il||El(n,t);var i=Ml,r=Fl;kd(n.type)&&(Ml=n.stateNode,Fl=!1),Ul(e,t,n),Ud(n.stateNode),Ml=i,Fl=r;break;case 5:Il||El(n,t);case 6:if(i=Ml,r=Fl,Ml=null,Ul(e,t,n),Fl=r,null!==(Ml=i))if(Fl)try{(9===Ml.nodeType?Ml.body:"HTML"===Ml.nodeName?Ml.ownerDocument.body:Ml).removeChild(n.stateNode)}catch(e){wu(n,t,e)}else try{Ml.removeChild(n.stateNode)}catch(e){wu(n,t,e)}break;case 18:null!==Ml&&(Fl?(xd(9===(e=Ml).nodeType?e.body:"HTML"===e.nodeName?e.ownerDocument.body:e,n.stateNode),Kh(e)):xd(Ml,n.stateNode));break;case 4:i=Ml,r=Fl,Ml=n.stateNode.containerInfo,Fl=!0,Ul(e,t,n),Ml=i,Fl=r;break;case 0:case 11:case 14:case 15:vl(2,n,t),Il||vl(4,n,t),Ul(e,t,n);break;case 1:Il||(El(n,t),"function"==typeof(i=n.stateNode).componentWillUnmount&&bl(n,t,i)),Ul(e,t,n);break;case 21:Ul(e,t,n);break;case 22:Il=(i=Il)||null!==n.memoizedState,Ul(e,t,n),Il=i;break;default:Ul(e,t,n)}}function jl(e,t){if(null===t.memoizedState&&null!==(e=t.alternate)&&null!==(e=e.memoizedState)){e=e.dehydrated;try{Kh(e)}catch(e){wu(t,t.return,e)}}}function Vl(e,t){if(null===t.memoizedState&&null!==(e=t.alternate)&&null!==(e=e.memoizedState)&&null!==(e=e.dehydrated))try{Kh(e)}catch(e){wu(t,t.return,e)}}function Hl(e,t){var n=function(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return null===t&&(t=e.stateNode=new Dl),t;case 22:return null===(t=(e=e.stateNode)._retryCache)&&(t=e._retryCache=new Dl),t;default:throw Error(o(435,e.tag))}}(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var i=Nu.bind(null,e,t);t.then(i,i)}})}function zl(e,t){var n=t.deletions;if(null!==n)for(var i=0;i<n.length;i++){var r=n[i],a=e,s=t,l=s;e:for(;null!==l;){switch(l.tag){case 27:if(kd(l.type)){Ml=l.stateNode,Fl=!1;break e}break;case 5:Ml=l.stateNode,Fl=!1;break e;case 3:case 4:Ml=l.stateNode.containerInfo,Fl=!0;break e}l=l.return}if(null===Ml)throw Error(o(160));Bl(a,s,r),Ml=null,Fl=!1,null!==(a=r.alternate)&&(a.return=null),r.return=null}if(13886&t.subtreeFlags)for(t=t.child;null!==t;)Wl(t,e),t=t.sibling}var Kl=null;function Wl(e,t){var n=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:zl(t,e),Gl(e),4&i&&(vl(3,e,e.return),gl(3,e),vl(5,e,e.return));break;case 1:zl(t,e),Gl(e),512&i&&(Il||null===n||El(n,n.return)),64&i&&_l&&null!==(e=e.updateQueue)&&null!==(i=e.callbacks)&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=null===n?i:n.concat(i));break;case 26:var r=Kl;if(zl(t,e),Gl(e),512&i&&(Il||null===n||El(n,n.return)),4&i){var a=null!==n?n.memoizedState:null;if(i=e.memoizedState,null===n)if(null===i)if(null===e.stateNode){e:{i=e.type,n=e.memoizedProps,r=r.ownerDocument||r;t:switch(i){case"title":(!(a=r.getElementsByTagName("title")[0])||a[Ye]||a[Ve]||"http://www.w3.org/2000/svg"===a.namespaceURI||a.hasAttribute("itemprop"))&&(a=r.createElement(i),r.head.insertBefore(a,r.querySelector("head > title"))),hd(a,i,n),a[Ve]=e,et(a),i=a;break e;case"link":var s=nh("link","href",r).get(i+(n.href||""));if(s)for(var l=0;l<s.length;l++)if((a=s[l]).getAttribute("href")===(null==n.href||""===n.href?null:n.href)&&a.getAttribute("rel")===(null==n.rel?null:n.rel)&&a.getAttribute("title")===(null==n.title?null:n.title)&&a.getAttribute("crossorigin")===(null==n.crossOrigin?null:n.crossOrigin)){s.splice(l,1);break t}hd(a=r.createElement(i),i,n),r.head.appendChild(a);break;case"meta":if(s=nh("meta","content",r).get(i+(n.content||"")))for(l=0;l<s.length;l++)if((a=s[l]).getAttribute("content")===(null==n.content?null:""+n.content)&&a.getAttribute("name")===(null==n.name?null:n.name)&&a.getAttribute("property")===(null==n.property?null:n.property)&&a.getAttribute("http-equiv")===(null==n.httpEquiv?null:n.httpEquiv)&&a.getAttribute("charset")===(null==n.charSet?null:n.charSet)){s.splice(l,1);break t}hd(a=r.createElement(i),i,n),r.head.appendChild(a);break;default:throw Error(o(468,i))}a[Ve]=e,et(a),i=a}e.stateNode=i}else ih(r,e.type,e.stateNode);else e.stateNode=Zd(r,i,e.memoizedProps);else a!==i?(null===a?null!==n.stateNode&&(n=n.stateNode).parentNode.removeChild(n):a.count--,null===i?ih(r,e.type,e.stateNode):Zd(r,i,e.memoizedProps)):null===i&&null!==e.stateNode&&wl(e,e.memoizedProps,n.memoizedProps)}break;case 27:zl(t,e),Gl(e),512&i&&(Il||null===n||El(n,n.return)),null!==n&&4&i&&wl(e,e.memoizedProps,n.memoizedProps);break;case 5:if(zl(t,e),Gl(e),512&i&&(Il||null===n||El(n,n.return)),32&e.flags){r=e.stateNode;try{St(r,"")}catch(t){wu(e,e.return,t)}}4&i&&null!=e.stateNode&&wl(e,r=e.memoizedProps,null!==n?n.memoizedProps:r),1024&i&&(Ol=!0);break;case 6:if(zl(t,e),Gl(e),4&i){if(null===e.stateNode)throw Error(o(162));i=e.memoizedProps,n=e.stateNode;try{n.nodeValue=i}catch(t){wu(e,e.return,t)}}break;case 3:if(th=null,r=Kl,Kl=Vd(t.containerInfo),zl(t,e),Kl=r,Gl(e),4&i&&null!==n&&n.memoizedState.isDehydrated)try{Kh(t.containerInfo)}catch(t){wu(e,e.return,t)}Ol&&(Ol=!1,ql(e));break;case 4:i=Kl,Kl=Vd(e.stateNode.containerInfo),zl(t,e),Gl(e),Kl=i;break;case 12:default:zl(t,e),Gl(e);break;case 31:case 19:zl(t,e),Gl(e),4&i&&null!==(i=e.updateQueue)&&(e.updateQueue=null,Hl(e,i));break;case 13:zl(t,e),Gl(e),8192&e.child.flags&&null!==e.memoizedState!=(null!==n&&null!==n.memoizedState)&&(Dc=le()),4&i&&null!==(i=e.updateQueue)&&(e.updateQueue=null,Hl(e,i));break;case 22:r=null!==e.memoizedState;var c=null!==n&&null!==n.memoizedState,u=_l,d=Il;if(_l=u||r,Il=d||c,zl(t,e),Il=d,_l=u,Gl(e),8192&i)e:for(t=e.stateNode,t._visibility=r?-2&t._visibility:1|t._visibility,r&&(null===n||c||_l||Il||Ql(e)),n=null,t=e;;){if(5===t.tag||26===t.tag){if(null===n){c=n=t;try{if(a=c.stateNode,r)"function"==typeof(s=a.style).setProperty?s.setProperty("display","none","important"):s.display="none";else{l=c.stateNode;var h=c.memoizedProps.style,f=null!=h&&h.hasOwnProperty("display")?h.display:null;l.style.display=null==f||"boolean"==typeof f?"":(""+f).trim()}}catch(e){wu(c,c.return,e)}}}else if(6===t.tag){if(null===n){c=t;try{c.stateNode.nodeValue=r?"":c.memoizedProps}catch(e){wu(c,c.return,e)}}}else if(18===t.tag){if(null===n){c=t;try{var p=c.stateNode;r?Nd(p,!0):Nd(c.stateNode,!1)}catch(e){wu(c,c.return,e)}}}else if((22!==t.tag&&23!==t.tag||null===t.memoizedState||t===e)&&null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;null===t.sibling;){if(null===t.return||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}4&i&&null!==(i=e.updateQueue)&&null!==(n=i.retryQueue)&&(i.retryQueue=null,Hl(e,n));case 30:case 21:}}function Gl(e){var t=e.flags;if(2&t){try{for(var n,i=e.return;null!==i;){if(Sl(i)){n=i;break}i=i.return}if(null==n)throw Error(o(160));switch(n.tag){case 27:var r=n.stateNode;xl(e,Cl(e),r);break;case 5:var a=n.stateNode;32&n.flags&&(St(a,""),n.flags&=-33),xl(e,Cl(e),a);break;case 3:case 4:var s=n.stateNode.containerInfo;kl(e,Cl(e),s);break;default:throw Error(o(161))}}catch(t){wu(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function ql(e){if(1024&e.subtreeFlags)for(e=e.child;null!==e;){var t=e;ql(t),5===t.tag&&1024&t.flags&&t.stateNode.reset(),e=e.sibling}}function Yl(e,t){if(8772&t.subtreeFlags)for(t=t.child;null!==t;)Pl(e,t.alternate,t),t=t.sibling}function Ql(e){for(e=e.child;null!==e;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:vl(4,t,t.return),Ql(t);break;case 1:El(t,t.return);var n=t.stateNode;"function"==typeof n.componentWillUnmount&&bl(t,t.return,n),Ql(t);break;case 27:Ud(t.stateNode);case 26:case 5:El(t,t.return),Ql(t);break;case 22:null===t.memoizedState&&Ql(t);break;default:Ql(t)}e=e.sibling}}function Xl(e,t,n){for(n=n&&!!(8772&t.subtreeFlags),t=t.child;null!==t;){var i=t.alternate,r=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:Xl(r,a,n),gl(4,a);break;case 1:if(Xl(r,a,n),"function"==typeof(r=(i=a).stateNode).componentDidMount)try{r.componentDidMount()}catch(e){wu(i,i.return,e)}if(null!==(r=(i=a).updateQueue)){var s=i.stateNode;try{var l=r.shared.hiddenCallbacks;if(null!==l)for(r.shared.hiddenCallbacks=null,r=0;r<l.length;r++)Ca(l[r],s)}catch(e){wu(i,i.return,e)}}n&&64&o&&yl(a),Al(a,a.return);break;case 27:Nl(a);case 26:case 5:Xl(r,a,n),n&&null===i&&4&o&&Tl(a),Al(a,a.return);break;case 12:Xl(r,a,n);break;case 31:Xl(r,a,n),n&&4&o&&jl(r,a);break;case 13:Xl(r,a,n),n&&4&o&&Vl(r,a);break;case 22:null===a.memoizedState&&Xl(r,a,n),Al(a,a.return);break;case 30:break;default:Xl(r,a,n)}t=t.sibling}}function Zl(e,t){var n=null;null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),e=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(e=t.memoizedState.cachePool.pool),e!==n&&(null!=e&&e.refCount++,null!=n&&jr(n))}function Jl(e,t){e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&jr(e))}function $l(e,t,n,i){if(10256&t.subtreeFlags)for(t=t.child;null!==t;)ec(e,t,n,i),t=t.sibling}function ec(e,t,n,i){var r=t.flags;switch(t.tag){case 0:case 11:case 15:$l(e,t,n,i),2048&r&&gl(9,t);break;case 1:case 31:case 13:default:$l(e,t,n,i);break;case 3:$l(e,t,n,i),2048&r&&(e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&jr(e)));break;case 12:if(2048&r){$l(e,t,n,i),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;"function"==typeof s&&s(o,null===t.alternate?"mount":"update",e.passiveEffectDuration,-0)}catch(e){wu(t,t.return,e)}}else $l(e,t,n,i);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,null!==t.memoizedState?2&a._visibility?$l(e,t,n,i):nc(e,t):2&a._visibility?$l(e,t,n,i):(a._visibility|=2,tc(e,t,n,i,!!(10256&t.subtreeFlags)||!1)),2048&r&&Zl(o,t);break;case 24:$l(e,t,n,i),2048&r&&Jl(t.alternate,t)}}function tc(e,t,n,i,r){for(r=r&&(!!(10256&t.subtreeFlags)||!1),t=t.child;null!==t;){var a=e,o=t,s=n,l=i,c=o.flags;switch(o.tag){case 0:case 11:case 15:tc(a,o,s,l,r),gl(8,o);break;case 23:break;case 22:var u=o.stateNode;null!==o.memoizedState?2&u._visibility?tc(a,o,s,l,r):nc(a,o):(u._visibility|=2,tc(a,o,s,l,r)),r&&2048&c&&Zl(o.alternate,o);break;case 24:tc(a,o,s,l,r),r&&2048&c&&Jl(o.alternate,o);break;default:tc(a,o,s,l,r)}t=t.sibling}}function nc(e,t){if(10256&t.subtreeFlags)for(t=t.child;null!==t;){var n=e,i=t,r=i.flags;switch(i.tag){case 22:nc(n,i),2048&r&&Zl(i.alternate,i);break;case 24:nc(n,i),2048&r&&Jl(i.alternate,i);break;default:nc(n,i)}t=t.sibling}}var ic=8192;function rc(e,t,n){if(e.subtreeFlags&ic)for(e=e.child;null!==e;)ac(e,t,n),e=e.sibling}function ac(e,t,n){switch(e.tag){case 26:rc(e,t,n),e.flags&ic&&null!==e.memoizedState&&function(e,t,n,i){if(!("stylesheet"!==n.type||"string"==typeof i.media&&!1===matchMedia(i.media).matches||4&n.state.loading)){if(null===n.instance){var r=Gd(i.href),a=t.querySelector(qd(r));if(a)return null!==(t=a._p)&&"object"==typeof t&&"function"==typeof t.then&&(e.count++,e=oh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,void et(a);a=t.ownerDocument||t,i=Yd(i),(r=Bd.get(r))&&$d(i,r),et(a=a.createElement("link"));var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),hd(a,"link",i),n.instance=a}null===e.stylesheets&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(3&n.state.loading)&&(e.count++,n=oh.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}(n,Kl,e.memoizedState,e.memoizedProps);break;case 5:default:rc(e,t,n);break;case 3:case 4:var i=Kl;Kl=Vd(e.stateNode.containerInfo),rc(e,t,n),Kl=i;break;case 22:null===e.memoizedState&&(null!==(i=e.alternate)&&null!==i.memoizedState?(i=ic,ic=16777216,rc(e,t,n),ic=i):rc(e,t,n))}}function oc(e){var t=e.alternate;if(null!==t&&null!==(e=t.child)){t.child=null;do{t=e.sibling,e.sibling=null,e=t}while(null!==e)}}function sc(e){var t=e.deletions;if(16&e.flags){if(null!==t)for(var n=0;n<t.length;n++){var i=t[n];Rl=i,uc(i,e)}oc(e)}if(10256&e.subtreeFlags)for(e=e.child;null!==e;)lc(e),e=e.sibling}function lc(e){switch(e.tag){case 0:case 11:case 15:sc(e),2048&e.flags&&vl(9,e,e.return);break;case 3:case 12:default:sc(e);break;case 22:var t=e.stateNode;null!==e.memoizedState&&2&t._visibility&&(null===e.return||13!==e.return.tag)?(t._visibility&=-3,cc(e)):sc(e)}}function cc(e){var t=e.deletions;if(16&e.flags){if(null!==t)for(var n=0;n<t.length;n++){var i=t[n];Rl=i,uc(i,e)}oc(e)}for(e=e.child;null!==e;){switch((t=e).tag){case 0:case 11:case 15:vl(8,t,t.return),cc(t);break;case 22:2&(n=t.stateNode)._visibility&&(n._visibility&=-3,cc(t));break;default:cc(t)}e=e.sibling}}function uc(e,t){for(;null!==Rl;){var n=Rl;switch(n.tag){case 0:case 11:case 15:vl(8,n,t);break;case 23:case 22:if(null!==n.memoizedState&&null!==n.memoizedState.cachePool){var i=n.memoizedState.cachePool.pool;null!=i&&i.refCount++}break;case 24:jr(n.memoizedState.cache)}if(null!==(i=n.child))i.return=n,Rl=i;else e:for(n=e;null!==Rl;){var r=(i=Rl).sibling,a=i.return;if(Ll(i),i===n){Rl=null;break e}if(null!==r){r.return=a,Rl=r;break e}Rl=a}}}var dc={getCacheForType:function(e){var t=Dr(Ur),n=t.data.get(e);return void 0===n&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Dr(Ur).controller.signal}},hc="function"==typeof WeakMap?WeakMap:Map,fc=0,pc=null,mc=null,gc=0,vc=0,yc=null,bc=!1,Ac=!1,Ec=!1,Tc=0,wc=0,Sc=0,Cc=0,kc=0,xc=0,Nc=0,_c=null,Ic=null,Oc=!1,Dc=0,Rc=0,Pc=1/0,Lc=null,Mc=null,Fc=0,Uc=null,Bc=null,jc=0,Vc=0,Hc=null,zc=null,Kc=0,Wc=null;function Gc(){return 2&fc&&0!==gc?gc&-gc:null!==P.T?Hu():Ue()}function qc(){if(0===xc)if(536870912&gc&&!dr)xc=536870912;else{var e=Se;!(3932160&(Se<<=1))&&(Se=262144),xc=e}return null!==(e=Da.current)&&(e.flags|=32),xc}function Yc(e,t,n){(e!==pc||2!==vc&&9!==vc)&&null===e.cancelPendingCommit||(tu(e,0),Jc(e,gc,xc,!1)),De(e,n),2&fc&&e===pc||(e===pc&&(!(2&fc)&&(Cc|=n),4===wc&&Jc(e,gc,xc,!1)),Lu(e))}function Qc(e,t,n){if(6&fc)throw Error(o(327));for(var i=!n&&!(127&t)&&0===(t&e.expiredLanes)||Ne(e,t),r=i?function(e,t){var n=fc;fc|=2;var i=ru(),r=au();pc!==e||gc!==t?(Lc=null,Pc=le()+500,tu(e,t)):Ac=Ne(e,t);e:for(;;)try{if(0!==vc&&null!==mc){t=mc;var a=yc;t:switch(vc){case 1:vc=0,yc=null,hu(e,t,a,1);break;case 2:case 9:if(ta(a)){vc=0,yc=null,du(t);break}t=function(){2!==vc&&9!==vc||pc!==e||(vc=7),Lu(e)},a.then(t,t);break e;case 3:vc=7;break e;case 4:vc=5;break e;case 7:ta(a)?(vc=0,yc=null,du(t)):(vc=0,yc=null,hu(e,t,a,7));break;case 5:var s=null;switch(mc.tag){case 26:s=mc.memoizedState;case 5:case 27:var l=mc;if(s?rh(s):l.stateNode.complete){vc=0,yc=null;var c=l.sibling;if(null!==c)mc=c;else{var u=l.return;null!==u?(mc=u,fu(u)):mc=null}break t}}vc=0,yc=null,hu(e,t,a,5);break;case 6:vc=0,yc=null,hu(e,t,a,6);break;case 8:eu(),wc=6;break e;default:throw Error(o(462))}}cu();break}catch(t){nu(e,t)}return Sr=wr=null,P.H=i,P.A=r,fc=n,null!==mc?0:(pc=null,gc=0,Ii(),wc)}(e,t):su(e,t,!0),a=i;;){if(0===r){Ac&&!i&&Jc(e,t,0,!1);break}if(n=e.current.alternate,!a||Zc(n)){if(2===r){if(a=t,e.errorRecoveryDisabledLanes&a)var s=0;else s=0!=(s=-536870913&e.pendingLanes)?s:536870912&s?536870912:0;if(0!==s){t=s;e:{var l=e;r=_c;var c=l.current.memoizedState.isDehydrated;if(c&&(tu(l,s).flags|=256),2!==(s=su(l,s,!1))){if(Ec&&!c){l.errorRecoveryDisabledLanes|=a,Cc|=a,r=4;break e}a=Ic,Ic=r,null!==a&&(null===Ic?Ic=a:Ic.push.apply(Ic,a))}r=s}if(a=!1,2!==r)continue}}if(1===r){tu(e,0),Jc(e,t,0,!0);break}e:{switch(i=e,a=r){case 0:case 1:throw Error(o(345));case 4:if((4194048&t)!==t)break;case 6:Jc(i,t,xc,!bc);break e;case 2:Ic=null;break;case 3:case 5:break;default:throw Error(o(329))}if((62914560&t)===t&&10<(r=Dc+300-le())){if(Jc(i,t,xc,!bc),0!==xe(i,0,!0))break e;jc=t,i.timeoutHandle=Ed(Xc.bind(null,i,n,Ic,Lc,Oc,t,xc,Cc,Nc,bc,a,"Throttled",-0,0),r)}else Xc(i,n,Ic,Lc,Oc,t,xc,Cc,Nc,bc,a,null,-0,0)}break}r=su(e,t,!1),a=!1}Lu(e)}function Xc(e,t,n,i,r,a,o,s,l,c,u,d,h,f){if(e.timeoutHandle=-1,8192&(d=t.subtreeFlags)||!(16785408&~d)){ac(t,a,d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Dt});var p=(62914560&a)===a?Dc-le():(4194048&a)===a?Rc-le():0;if(null!==(p=function(e,t){return e.stylesheets&&0===e.count&&lh(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var i=setTimeout(function(){if(e.stylesheets&&lh(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&0===ah&&(ah=62500*function(){if("function"==typeof performance.getEntriesByType){for(var e=0,t=0,n=performance.getEntriesByType("resource"),i=0;i<n.length;i++){var r=n[i],a=r.transferSize,o=r.initiatorType,s=r.duration;if(a&&s&&fd(o)){for(o=0,s=r.responseEnd,i+=1;i<n.length;i++){var l=n[i],c=l.startTime;if(c>s)break;var u=l.transferSize,d=l.initiatorType;u&&fd(d)&&(o+=u*((l=l.responseEnd)<s?1:(s-c)/(l-c)))}if(--i,t+=8*(a+o)/(r.duration/1e3),10<++e)break}}if(0<e)return t/e/1e6}return navigator.connection&&"number"==typeof(e=navigator.connection.downlink)?e:5}());var r=setTimeout(function(){if(e.waitingForImages=!1,0===e.count&&(e.stylesheets&&lh(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>ah?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(i),clearTimeout(r)}}:null}(d,p)))return jc=a,e.cancelPendingCommit=p(mu.bind(null,e,t,a,n,i,r,o,s,l,u,d,null,h,f)),void Jc(e,a,o,!c)}mu(e,t,a,n,i,r,o,s,l)}function Zc(e){for(var t=e;;){var n=t.tag;if((0===n||11===n||15===n)&&16384&t.flags&&null!==(n=t.updateQueue)&&null!==(n=n.stores))for(var i=0;i<n.length;i++){var r=n[i],a=r.getSnapshot;r=r.value;try{if(!Jn(a(),r))return!1}catch(e){return!1}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Jc(e,t,n,i){t&=~kc,t&=~Cc,e.suspendedLanes|=t,e.pingedLanes&=~t,i&&(e.warmLanes|=t),i=e.expirationTimes;for(var r=t;0<r;){var a=31-Ae(r),o=1<<a;i[a]=-1,r&=~o}0!==n&&Re(e,n,t)}function $c(){return!!(6&fc)||(Mu(0,!1),!1)}function eu(){if(null!==mc){if(0===vc)var e=mc.return;else Sr=wr=null,oo(e=mc),sa=null,la=0,e=mc;for(;null!==e;)ml(e.alternate,e),e=e.return;mc=null}}function tu(e,t){var n=e.timeoutHandle;-1!==n&&(e.timeoutHandle=-1,Td(n)),null!==(n=e.cancelPendingCommit)&&(e.cancelPendingCommit=null,n()),jc=0,eu(),pc=e,mc=n=ji(e.current,null),gc=t,vc=0,yc=null,bc=!1,Ac=Ne(e,t),Ec=!1,Nc=xc=kc=Cc=Sc=wc=0,Ic=_c=null,Oc=!1,8&t&&(t|=32&t);var i=e.entangledLanes;if(0!==i)for(e=e.entanglements,i&=t;0<i;){var r=31-Ae(i),a=1<<r;t|=e[r],i&=~a}return Tc=t,Ii(),n}function nu(e,t){Ha=null,P.H=ms,t===Zr||t===$r?(t=aa(),vc=3):t===Jr?(t=aa(),vc=4):vc=t===Ds?8:null!==t&&"object"==typeof t&&"function"==typeof t.then?6:1,yc=t,null===mc&&(wc=1,xs(e,Yi(t,e.current)))}function iu(){var e=Da.current;return null===e||((4194048&gc)===gc?null===Ra:((62914560&gc)===gc||!!(536870912&gc))&&e===Ra)}function ru(){var e=P.H;return P.H=ms,null===e?ms:e}function au(){var e=P.A;return P.A=dc,e}function ou(){wc=4,bc||(4194048&gc)!==gc&&null!==Da.current||(Ac=!0),!(134217727&Sc)&&!(134217727&Cc)||null===pc||Jc(pc,gc,xc,!1)}function su(e,t,n){var i=fc;fc|=2;var r=ru(),a=au();pc===e&&gc===t||(Lc=null,tu(e,t)),t=!1;var o=wc;e:for(;;)try{if(0!==vc&&null!==mc){var s=mc,l=yc;switch(vc){case 8:eu(),o=6;break e;case 3:case 2:case 9:case 6:null===Da.current&&(t=!0);var c=vc;if(vc=0,yc=null,hu(e,s,l,c),n&&Ac){o=0;break e}break;default:c=vc,vc=0,yc=null,hu(e,s,l,c)}}lu(),o=wc;break}catch(t){nu(e,t)}return t&&e.shellSuspendCounter++,Sr=wr=null,fc=i,P.H=r,P.A=a,null===mc&&(pc=null,gc=0,Ii()),o}function lu(){for(;null!==mc;)uu(mc)}function cu(){for(;null!==mc&&!oe();)uu(mc)}function uu(e){var t=ol(e.alternate,e,Tc);e.memoizedProps=e.pendingProps,null===t?fu(e):mc=t}function du(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Ws(n,t,t.pendingProps,t.type,void 0,gc);break;case 11:t=Ws(n,t,t.pendingProps,t.type.render,t.ref,gc);break;case 5:oo(t);default:ml(n,t),t=ol(n,t=mc=Vi(t,Tc),Tc)}e.memoizedProps=e.pendingProps,null===t?fu(e):mc=t}function hu(e,t,n,i){Sr=wr=null,oo(t),sa=null,la=0;var r=t.return;try{if(function(e,t,n,i,r){if(n.flags|=32768,null!==i&&"object"==typeof i&&"function"==typeof i.then){if(null!==(t=n.alternate)&&_r(t,n,r,!0),null!==(n=Da.current)){switch(n.tag){case 31:case 13:return null===Ra?ou():null===n.alternate&&0===wc&&(wc=3),n.flags&=-257,n.flags|=65536,n.lanes=r,i===ea?n.flags|=16384:(null===(t=n.updateQueue)?n.updateQueue=new Set([i]):t.add(i),Su(e,i,r)),!1;case 22:return n.flags|=65536,i===ea?n.flags|=16384:(null===(t=n.updateQueue)?(t={transitions:null,markerInstances:null,retryQueue:new Set([i])},n.updateQueue=t):null===(n=t.retryQueue)?t.retryQueue=new Set([i]):n.add(i),Su(e,i,r)),!1}throw Error(o(435,n.tag))}return Su(e,i,r),ou(),!1}if(dr)return null!==(t=Da.current)?(!(65536&t.flags)&&(t.flags|=256),t.flags|=65536,t.lanes=r,i!==pr&&Er(Yi(e=Error(o(422),{cause:i}),n))):(i!==pr&&Er(Yi(t=Error(o(423),{cause:i}),n)),(e=e.current.alternate).flags|=65536,r&=-r,e.lanes|=r,i=Yi(i,n),Ea(e,r=_s(e.stateNode,i,r)),4!==wc&&(wc=2)),!1;var a=Error(o(520),{cause:i});if(a=Yi(a,n),null===_c?_c=[a]:_c.push(a),4!==wc&&(wc=2),null===t)return!0;i=Yi(i,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=r&-r,n.lanes|=e,Ea(n,e=_s(n.stateNode,i,e)),!1;case 1:if(t=n.type,a=n.stateNode,!(128&n.flags||"function"!=typeof t.getDerivedStateFromError&&(null===a||"function"!=typeof a.componentDidCatch||null!==Mc&&Mc.has(a))))return n.flags|=65536,r&=-r,n.lanes|=r,Os(r=Is(r),e,n,i),Ea(n,r),!1}n=n.return}while(null!==n);return!1}(e,r,t,n,gc))return wc=1,xs(e,Yi(n,e.current)),void(mc=null)}catch(t){if(null!==r)throw mc=r,t;return wc=1,xs(e,Yi(n,e.current)),void(mc=null)}32768&t.flags?(dr||1===i?e=!0:Ac||536870912&gc?e=!1:(bc=e=!0,(2===i||9===i||3===i||6===i)&&null!==(i=Da.current)&&13===i.tag&&(i.flags|=16384)),pu(t,e)):fu(t)}function fu(e){var t=e;do{if(32768&t.flags)return void pu(t,bc);e=t.return;var n=fl(t.alternate,t,Tc);if(null!==n)return void(mc=n);if(null!==(t=t.sibling))return void(mc=t);mc=t=e}while(null!==t);0===wc&&(wc=5)}function pu(e,t){do{var n=pl(e.alternate,e);if(null!==n)return n.flags&=32767,void(mc=n);if(null!==(n=e.return)&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&null!==(e=e.sibling))return void(mc=e);mc=e=n}while(null!==e);wc=6,mc=null}function mu(e,t,n,i,r,a,s,l,c){e.cancelPendingCommit=null;do{Au()}while(0!==Fc);if(6&fc)throw Error(o(327));if(null!==t){if(t===e.current)throw Error(o(177));if(a=t.lanes|t.childLanes,function(e,t,n,i,r,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,l=e.expirationTimes,c=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Ae(n),d=1<<u;s[u]=0,l[u]=-1;var h=c[u];if(null!==h)for(c[u]=null,u=0;u<h.length;u++){var f=h[u];null!==f&&(f.lane&=-536870913)}n&=~d}0!==i&&Re(e,i,0),0!==a&&0===r&&0!==e.tag&&(e.suspendedLanes|=a&~(o&~t))}(e,n,a|=_i,s,l,c),e===pc&&(mc=pc=null,gc=0),Bc=t,Uc=e,jc=n,Vc=a,Hc=r,zc=i,10256&t.subtreeFlags||10256&t.flags?(e.callbackNode=null,e.callbackPriority=0,re(he,function(){return Eu(),null})):(e.callbackNode=null,e.callbackPriority=0),i=!!(13878&t.flags),13878&t.subtreeFlags||i){i=P.T,P.T=null,r=L.p,L.p=2,s=fc,fc|=4;try{!function(e,t){if(e=e.containerInfo,pd=bh,ri(e=ii(e))){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var i=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(i&&0!==i.rangeCount){n=i.anchorNode;var r=i.anchorOffset,a=i.focusNode;i=i.focusOffset;try{n.nodeType,a.nodeType}catch(e){n=null;break e}var s=0,l=-1,c=-1,u=0,d=0,h=e,f=null;t:for(;;){for(var p;h!==n||0!==r&&3!==h.nodeType||(l=s+r),h!==a||0!==i&&3!==h.nodeType||(c=s+i),3===h.nodeType&&(s+=h.nodeValue.length),null!==(p=h.firstChild);)f=h,h=p;for(;;){if(h===e)break t;if(f===n&&++u===r&&(l=s),f===a&&++d===i&&(c=s),null!==(p=h.nextSibling))break;f=(h=f).parentNode}h=p}n=-1===l||-1===c?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(md={focusedElem:e,selectionRange:n},bh=!1,Rl=t;null!==Rl;)if(e=(t=Rl).child,1028&t.subtreeFlags&&null!==e)e.return=t,Rl=e;else for(;null!==Rl;){switch(a=(t=Rl).alternate,e=t.flags,t.tag){case 0:if(4&e&&null!==(e=null!==(e=t.updateQueue)?e.events:null))for(n=0;n<e.length;n++)(r=e[n]).ref.impl=r.nextImpl;break;case 11:case 15:case 5:case 26:case 27:case 6:case 4:case 17:break;case 1:if(1024&e&&null!==a){e=void 0,n=t,r=a.memoizedProps,a=a.memoizedState,i=n.stateNode;try{var m=ws(n.type,r);e=i.getSnapshotBeforeUpdate(m,a),i.__reactInternalSnapshotBeforeUpdate=e}catch(e){wu(n,n.return,e)}}break;case 3:if(1024&e)if(9===(n=(e=t.stateNode.containerInfo).nodeType))_d(e);else if(1===n)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":_d(e);break;default:e.textContent=""}break;default:if(1024&e)throw Error(o(163))}if(null!==(e=t.sibling)){e.return=t.return,Rl=e;break}Rl=t.return}}(e,t)}finally{fc=s,L.p=r,P.T=i}}Fc=1,gu(),vu(),yu()}}function gu(){if(1===Fc){Fc=0;var e=Uc,t=Bc,n=!!(13878&t.flags);if(13878&t.subtreeFlags||n){n=P.T,P.T=null;var i=L.p;L.p=2;var r=fc;fc|=4;try{Wl(t,e);var a=md,o=ii(e.containerInfo),s=a.focusedElem,l=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&ni(s.ownerDocument.documentElement,s)){if(null!==l&&ri(s)){var c=l.start,u=l.end;if(void 0===u&&(u=c),"selectionStart"in s)s.selectionStart=c,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,h=d&&d.defaultView||window;if(h.getSelection){var f=h.getSelection(),p=s.textContent.length,m=Math.min(l.start,p),g=void 0===l.end?m:Math.min(l.end,p);!f.extend&&m>g&&(o=g,g=m,m=o);var v=ti(s,m),y=ti(s,g);if(v&&y&&(1!==f.rangeCount||f.anchorNode!==v.node||f.anchorOffset!==v.offset||f.focusNode!==y.node||f.focusOffset!==y.offset)){var b=d.createRange();b.setStart(v.node,v.offset),f.removeAllRanges(),m>g?(f.addRange(b),f.extend(y.node,y.offset)):(b.setEnd(y.node,y.offset),f.addRange(b))}}}}for(d=[],f=s;f=f.parentNode;)1===f.nodeType&&d.push({element:f,left:f.scrollLeft,top:f.scrollTop});for("function"==typeof s.focus&&s.focus(),s=0;s<d.length;s++){var A=d[s];A.element.scrollLeft=A.left,A.element.scrollTop=A.top}}bh=!!pd,md=pd=null}finally{fc=r,L.p=i,P.T=n}}e.current=t,Fc=2}}function vu(){if(2===Fc){Fc=0;var e=Uc,t=Bc,n=!!(8772&t.flags);if(8772&t.subtreeFlags||n){n=P.T,P.T=null;var i=L.p;L.p=2;var r=fc;fc|=4;try{Pl(e,t.alternate,t)}finally{fc=r,L.p=i,P.T=n}}Fc=3}}function yu(){if(4===Fc||3===Fc){Fc=0,se();var e=Uc,t=Bc,n=jc,i=zc;10256&t.subtreeFlags||10256&t.flags?Fc=5:(Fc=0,Bc=Uc=null,bu(e,e.pendingLanes));var r=e.pendingLanes;if(0===r&&(Mc=null),Fe(n),t=t.stateNode,ye&&"function"==typeof ye.onCommitFiberRoot)try{ye.onCommitFiberRoot(ve,t,void 0,!(128&~t.current.flags))}catch(e){}if(null!==i){t=P.T,r=L.p,L.p=2,P.T=null;try{for(var a=e.onRecoverableError,o=0;o<i.length;o++){var s=i[o];a(s.value,{componentStack:s.stack})}}finally{P.T=t,L.p=r}}!!(3&jc)&&Au(),Lu(e),r=e.pendingLanes,261930&n&&42&r?e===Wc?Kc++:(Kc=0,Wc=e):Kc=0,Mu(0,!1)}}function bu(e,t){0===(e.pooledCacheLanes&=t)&&null!=(t=e.pooledCache)&&(e.pooledCache=null,jr(t))}function Au(){return gu(),vu(),yu(),Eu()}function Eu(){if(5!==Fc)return!1;var e=Uc,t=Vc;Vc=0;var n=Fe(jc),i=P.T,r=L.p;try{L.p=32>n?32:n,P.T=null,n=Hc,Hc=null;var a=Uc,s=jc;if(Fc=0,Bc=Uc=null,jc=0,6&fc)throw Error(o(331));var l=fc;if(fc|=4,lc(a.current),ec(a,a.current,s,n),fc=l,Mu(0,!1),ye&&"function"==typeof ye.onPostCommitFiberRoot)try{ye.onPostCommitFiberRoot(ve,a)}catch(e){}return!0}finally{L.p=r,P.T=i,bu(e,t)}}function Tu(e,t,n){t=Yi(n,t),null!==(e=ba(e,t=_s(e.stateNode,t,2),2))&&(De(e,2),Lu(e))}function wu(e,t,n){if(3===e.tag)Tu(e,e,n);else for(;null!==t;){if(3===t.tag){Tu(t,e,n);break}if(1===t.tag){var i=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof i.componentDidCatch&&(null===Mc||!Mc.has(i))){e=Yi(n,e),null!==(i=ba(t,n=Is(2),2))&&(Os(n,i,t,e),De(i,2),Lu(i));break}}t=t.return}}function Su(e,t,n){var i=e.pingCache;if(null===i){i=e.pingCache=new hc;var r=new Set;i.set(t,r)}else void 0===(r=i.get(t))&&(r=new Set,i.set(t,r));r.has(n)||(Ec=!0,r.add(n),e=Cu.bind(null,e,t,n),t.then(e,e))}function Cu(e,t,n){var i=e.pingCache;null!==i&&i.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,pc===e&&(gc&n)===n&&(4===wc||3===wc&&(62914560&gc)===gc&&300>le()-Dc?!(2&fc)&&tu(e,0):kc|=n,Nc===gc&&(Nc=0)),Lu(e)}function ku(e,t){0===t&&(t=Ie()),null!==(e=Ri(e,t))&&(De(e,t),Lu(e))}function xu(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),ku(e,n)}function Nu(e,t){var n=0;switch(e.tag){case 31:case 13:var i=e.stateNode,r=e.memoizedState;null!==r&&(n=r.retryLane);break;case 19:i=e.stateNode;break;case 22:i=e.stateNode._retryCache;break;default:throw Error(o(314))}null!==i&&i.delete(t),ku(e,n)}var _u=null,Iu=null,Ou=!1,Du=!1,Ru=!1,Pu=0;function Lu(e){e!==Iu&&null===e.next&&(null===Iu?_u=Iu=e:Iu=Iu.next=e),Du=!0,Ou||(Ou=!0,Sd(function(){6&fc?re(ue,Fu):Uu()}))}function Mu(e,t){if(!Ru&&Du){Ru=!0;do{for(var n=!1,i=_u;null!==i;){if(!t)if(0!==e){var r=i.pendingLanes;if(0===r)var a=0;else{var o=i.suspendedLanes,s=i.pingedLanes;a=(1<<31-Ae(42|e)+1)-1,a=201326741&(a&=r&~(o&~s))?201326741&a|1:a?2|a:0}0!==a&&(n=!0,Vu(i,a))}else a=gc,!(3&(a=xe(i,i===pc?a:0,null!==i.cancelPendingCommit||-1!==i.timeoutHandle)))||Ne(i,a)||(n=!0,Vu(i,a));i=i.next}}while(n);Ru=!1}}function Fu(){Uu()}function Uu(){Du=Ou=!1;var e=0;0!==Pu&&function(){var e=window.event;return e&&"popstate"===e.type?e!==Ad&&(Ad=e,!0):(Ad=null,!1)}()&&(e=Pu);for(var t=le(),n=null,i=_u;null!==i;){var r=i.next,a=Bu(i,t);0===a?(i.next=null,null===n?_u=r:n.next=r,null===r&&(Iu=n)):(n=i,(0!==e||!!(3&a))&&(Du=!0)),i=r}0!==Fc&&5!==Fc||Mu(e,!1),0!==Pu&&(Pu=0)}function Bu(e,t){for(var n=e.suspendedLanes,i=e.pingedLanes,r=e.expirationTimes,a=-62914561&e.pendingLanes;0<a;){var o=31-Ae(a),s=1<<o,l=r[o];-1===l?0!==(s&n)&&0===(s&i)||(r[o]=_e(s,t)):l<=t&&(e.expiredLanes|=s),a&=~s}if(n=gc,n=xe(e,e===(t=pc)?n:0,null!==e.cancelPendingCommit||-1!==e.timeoutHandle),i=e.callbackNode,0===n||e===t&&(2===vc||9===vc)||null!==e.cancelPendingCommit)return null!==i&&null!==i&&ae(i),e.callbackNode=null,e.callbackPriority=0;if(!(3&n)||Ne(e,n)){if((t=n&-n)===e.callbackPriority)return t;switch(null!==i&&ae(i),Fe(n)){case 2:case 8:n=de;break;case 32:default:n=he;break;case 268435456:n=pe}return i=ju.bind(null,e),n=re(n,i),e.callbackPriority=t,e.callbackNode=n,t}return null!==i&&null!==i&&ae(i),e.callbackPriority=2,e.callbackNode=null,2}function ju(e,t){if(0!==Fc&&5!==Fc)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Au()&&e.callbackNode!==n)return null;var i=gc;return 0===(i=xe(e,e===pc?i:0,null!==e.cancelPendingCommit||-1!==e.timeoutHandle))?null:(Qc(e,i,t),Bu(e,le()),null!=e.callbackNode&&e.callbackNode===n?ju.bind(null,e):null)}function Vu(e,t){if(Au())return null;Qc(e,t,!0)}function Hu(){if(0===Pu){var e=zr;0===e&&(e=we,!(261888&(we<<=1))&&(we=256)),Pu=e}return Pu}function zu(e){return null==e||"symbol"==typeof e||"boolean"==typeof e?null:"function"==typeof e?e:Ot(""+e)}function Ku(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}for(var Wu=0;Wu<Si.length;Wu++){var Gu=Si[Wu];Ci(Gu.toLowerCase(),"on"+(Gu[0].toUpperCase()+Gu.slice(1)))}Ci(gi,"onAnimationEnd"),Ci(vi,"onAnimationIteration"),Ci(yi,"onAnimationStart"),Ci("dblclick","onDoubleClick"),Ci("focusin","onFocus"),Ci("focusout","onBlur"),Ci(bi,"onTransitionRun"),Ci(Ai,"onTransitionStart"),Ci(Ei,"onTransitionCancel"),Ci(Ti,"onTransitionEnd"),rt("onMouseEnter",["mouseout","mouseover"]),rt("onMouseLeave",["mouseout","mouseover"]),rt("onPointerEnter",["pointerout","pointerover"]),rt("onPointerLeave",["pointerout","pointerover"]),it("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),it("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),it("onBeforeInput",["compositionend","keypress","textInput","paste"]),it("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),it("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),it("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var qu="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Yu=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(qu));function Qu(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var i=e[n],r=i.event;i=i.listeners;e:{var a=void 0;if(t)for(var o=i.length-1;0<=o;o--){var s=i[o],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==a&&r.isPropagationStopped())break e;a=s,r.currentTarget=c;try{a(r)}catch(e){ki(e)}r.currentTarget=null,a=l}else for(o=0;o<i.length;o++){if(l=(s=i[o]).instance,c=s.currentTarget,s=s.listener,l!==a&&r.isPropagationStopped())break e;a=s,r.currentTarget=c;try{a(r)}catch(e){ki(e)}r.currentTarget=null,a=l}}}}function Xu(e,t){var n=t[Ke];void 0===n&&(n=t[Ke]=new Set);var i=e+"__bubble";n.has(i)||(ed(t,e,2,!1),n.add(i))}function Zu(e,t,n){var i=0;t&&(i|=4),ed(n,e,i,t)}var Ju="_reactListening"+Math.random().toString(36).slice(2);function $u(e){if(!e[Ju]){e[Ju]=!0,tt.forEach(function(t){"selectionchange"!==t&&(Yu.has(t)||Zu(t,!1,e),Zu(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Ju]||(t[Ju]=!0,Zu("selectionchange",!1,t))}}function ed(e,t,n,i){switch(kh(t)){case 2:var r=Ah;break;case 8:r=Eh;break;default:r=Th}n=r.bind(null,t,n,e),r=void 0,!Ht||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(r=!0),i?void 0!==r?e.addEventListener(t,n,{capture:!0,passive:r}):e.addEventListener(t,n,!0):void 0!==r?e.addEventListener(t,n,{passive:r}):e.addEventListener(t,n,!1)}function td(e,t,n,i,r){var a=i;if(!(1&t||2&t||null===i))e:for(;;){if(null===i)return;var o=i.tag;if(3===o||4===o){var s=i.stateNode.containerInfo;if(s===r)break;if(4===o)for(o=i.return;null!==o;){var c=o.tag;if((3===c||4===c)&&o.stateNode.containerInfo===r)return;o=o.return}for(;null!==s;){if(null===(o=Xe(s)))return;if(5===(c=o.tag)||6===c||26===c||27===c){i=a=o;continue e}s=s.parentNode}}i=i.return}Bt(function(){var i=a,r=Pt(n),o=[];e:{var s=wi.get(e);if(void 0!==s){var c=nn,u=e;switch(e){case"keypress":if(0===Yt(n))break e;case"keydown":case"keyup":c=yn;break;case"focusin":u="focus",c=cn;break;case"focusout":u="blur",c=cn;break;case"beforeblur":case"afterblur":c=cn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":c=sn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":c=ln;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":c=An;break;case gi:case vi:case yi:c=un;break;case Ti:c=En;break;case"scroll":case"scrollend":c=an;break;case"wheel":c=Tn;break;case"copy":case"cut":case"paste":c=dn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":c=bn;break;case"toggle":case"beforetoggle":c=wn}var d=!!(4&t),h=!d&&("scroll"===e||"scrollend"===e),f=d?null!==s?s+"Capture":null:s;d=[];for(var p,m=i;null!==m;){var g=m;if(p=g.stateNode,5!==(g=g.tag)&&26!==g&&27!==g||null===p||null===f||null!=(g=jt(m,f))&&d.push(nd(m,g,p)),h)break;m=m.return}0<d.length&&(s=new c(s,u,null,n,r),o.push({event:s,listeners:d}))}}if(!(7&t)){if(c="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===Rt||!(u=n.relatedTarget||n.fromElement)||!Xe(u)&&!u[ze])&&(c||s)&&(s=r.window===r?r:(s=r.ownerDocument)?s.defaultView||s.parentWindow:window,c?(c=i,null!==(u=(u=n.relatedTarget||n.toElement)?Xe(u):null)&&(h=l(u),d=u.tag,u!==h||5!==d&&27!==d&&6!==d)&&(u=null)):(c=null,u=i),c!==u)){if(d=sn,g="onMouseLeave",f="onMouseEnter",m="mouse","pointerout"!==e&&"pointerover"!==e||(d=bn,g="onPointerLeave",f="onPointerEnter",m="pointer"),h=null==c?s:Je(c),p=null==u?s:Je(u),(s=new d(g,m+"leave",c,n,r)).target=h,s.relatedTarget=p,g=null,Xe(r)===i&&((d=new d(f,m+"enter",u,n,r)).target=p,d.relatedTarget=h,g=d),h=g,c&&u)e:{for(d=rd,m=u,p=0,g=f=c;g;g=d(g))p++;g=0;for(var v=m;v;v=d(v))g++;for(;0<p-g;)f=d(f),p--;for(;0<g-p;)m=d(m),g--;for(;p--;){if(f===m||null!==m&&f===m.alternate){d=f;break e}f=d(f),m=d(m)}d=null}else d=null;null!==c&&ad(o,s,c,d,!1),null!==u&&null!==h&&ad(o,h,u,d,!0)}if("select"===(c=(s=i?Je(i):window).nodeName&&s.nodeName.toLowerCase())||"input"===c&&"file"===s.type)var y=Vn;else if(Ln(s))if(Hn)y=Zn;else{y=Qn;var b=Yn}else!(c=s.nodeName)||"input"!==c.toLowerCase()||"checkbox"!==s.type&&"radio"!==s.type?i&&Nt(i.elementType)&&(y=Vn):y=Xn;switch(y&&(y=y(e,i))?Mn(o,y,n,r):(b&&b(e,s,i),"focusout"===e&&i&&"number"===s.type&&null!=i.memoizedProps.value&&At(s,"number",s.value)),b=i?Je(i):window,e){case"focusin":(Ln(b)||"true"===b.contentEditable)&&(oi=b,si=i,li=null);break;case"focusout":li=si=oi=null;break;case"mousedown":ci=!0;break;case"contextmenu":case"mouseup":case"dragend":ci=!1,ui(o,n,r);break;case"selectionchange":if(ai)break;case"keydown":case"keyup":ui(o,n,r)}var A;if(Cn)e:{switch(e){case"compositionstart":var E="onCompositionStart";break e;case"compositionend":E="onCompositionEnd";break e;case"compositionupdate":E="onCompositionUpdate";break e}E=void 0}else Rn?On(e,n)&&(E="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(E="onCompositionStart");E&&(Nn&&"ko"!==n.locale&&(Rn||"onCompositionStart"!==E?"onCompositionEnd"===E&&Rn&&(A=qt()):(Wt="value"in(Kt=r)?Kt.value:Kt.textContent,Rn=!0)),0<(b=id(i,E)).length&&(E=new hn(E,e,null,n,r),o.push({event:E,listeners:b}),(A||null!==(A=Dn(n)))&&(E.data=A))),(A=xn?function(e,t){switch(e){case"compositionend":return Dn(t);case"keypress":return 32!==t.which?null:(In=!0,_n);case"textInput":return(e=t.data)===_n&&In?null:e;default:return null}}(e,n):function(e,t){if(Rn)return"compositionend"===e||!Cn&&On(e,t)?(e=qt(),Gt=Wt=Kt=null,Rn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Nn&&"ko"!==t.locale?null:t.data}}(e,n))&&0<(E=id(i,"onBeforeInput")).length&&(b=new hn("onBeforeInput","beforeinput",null,n,r),o.push({event:b,listeners:E}),b.data=A),function(e,t,n,i,r){if("submit"===t&&n&&n.stateNode===r){var a=zu((r[He]||null).action),o=i.submitter;o&&null!==(t=(t=o[He]||null)?zu(t.formAction):o.getAttribute("formAction"))&&(a=t,o=null);var s=new nn("action","action",null,i,r);e.push({event:s,listeners:[{instance:null,listener:function(){if(i.defaultPrevented){if(0!==Pu){var e=o?Ku(r,o):new FormData(r);ts(n,{pending:!0,data:e,method:r.method,action:a},null,e)}}else"function"==typeof a&&(s.preventDefault(),e=o?Ku(r,o):new FormData(r),ts(n,{pending:!0,data:e,method:r.method,action:a},a,e))},currentTarget:r}]})}}(o,e,i,n,r)}Qu(o,t)})}function nd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function id(e,t){for(var n=t+"Capture",i=[];null!==e;){var r=e,a=r.stateNode;if(5!==(r=r.tag)&&26!==r&&27!==r||null===a||(null!=(r=jt(e,n))&&i.unshift(nd(e,r,a)),null!=(r=jt(e,t))&&i.push(nd(e,r,a))),3===e.tag)return i;e=e.return}return[]}function rd(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag&&27!==e.tag);return e||null}function ad(e,t,n,i,r){for(var a=t._reactName,o=[];null!==n&&n!==i;){var s=n,l=s.alternate,c=s.stateNode;if(s=s.tag,null!==l&&l===i)break;5!==s&&26!==s&&27!==s||null===c||(l=c,r?null!=(c=jt(n,a))&&o.unshift(nd(n,c,l)):r||null!=(c=jt(n,a))&&o.push(nd(n,c,l))),n=n.return}0!==o.length&&e.push({event:t,listeners:o})}var od=/\r\n?/g,sd=/\u0000|\uFFFD/g;function ld(e){return("string"==typeof e?e:""+e).replace(od,"\n").replace(sd,"")}function cd(e,t){return t=ld(t),ld(e)===t}function ud(e,t,n,i,r,a){switch(n){case"children":"string"==typeof i?"body"===t||"textarea"===t&&""===i||St(e,i):("number"==typeof i||"bigint"==typeof i)&&"body"!==t&&St(e,""+i);break;case"className":ct(e,"class",i);break;case"tabIndex":ct(e,"tabindex",i);break;case"dir":case"role":case"viewBox":case"width":case"height":ct(e,n,i);break;case"style":xt(e,i,a);break;case"data":if("object"!==t){ct(e,"data",i);break}case"src":case"href":if(""===i&&("a"!==t||"href"!==n)){e.removeAttribute(n);break}if(null==i||"function"==typeof i||"symbol"==typeof i||"boolean"==typeof i){e.removeAttribute(n);break}i=Ot(""+i),e.setAttribute(n,i);break;case"action":case"formAction":if("function"==typeof i){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}if("function"==typeof a&&("formAction"===n?("input"!==t&&ud(e,t,"name",r.name,r,null),ud(e,t,"formEncType",r.formEncType,r,null),ud(e,t,"formMethod",r.formMethod,r,null),ud(e,t,"formTarget",r.formTarget,r,null)):(ud(e,t,"encType",r.encType,r,null),ud(e,t,"method",r.method,r,null),ud(e,t,"target",r.target,r,null))),null==i||"symbol"==typeof i||"boolean"==typeof i){e.removeAttribute(n);break}i=Ot(""+i),e.setAttribute(n,i);break;case"onClick":null!=i&&(e.onclick=Dt);break;case"onScroll":null!=i&&Xu("scroll",e);break;case"onScrollEnd":null!=i&&Xu("scrollend",e);break;case"dangerouslySetInnerHTML":if(null!=i){if("object"!=typeof i||!("__html"in i))throw Error(o(61));if(null!=(n=i.__html)){if(null!=r.children)throw Error(o(60));e.innerHTML=n}}break;case"multiple":e.multiple=i&&"function"!=typeof i&&"symbol"!=typeof i;break;case"muted":e.muted=i&&"function"!=typeof i&&"symbol"!=typeof i;break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":case"autoFocus":break;case"xlinkHref":if(null==i||"function"==typeof i||"boolean"==typeof i||"symbol"==typeof i){e.removeAttribute("xlink:href");break}n=Ot(""+i),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":null!=i&&"function"!=typeof i&&"symbol"!=typeof i?e.setAttribute(n,""+i):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":i&&"function"!=typeof i&&"symbol"!=typeof i?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":!0===i?e.setAttribute(n,""):!1!==i&&null!=i&&"function"!=typeof i&&"symbol"!=typeof i?e.setAttribute(n,i):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":null!=i&&"function"!=typeof i&&"symbol"!=typeof i&&!isNaN(i)&&1<=i?e.setAttribute(n,i):e.removeAttribute(n);break;case"rowSpan":case"start":null==i||"function"==typeof i||"symbol"==typeof i||isNaN(i)?e.removeAttribute(n):e.setAttribute(n,i);break;case"popover":Xu("beforetoggle",e),Xu("toggle",e),lt(e,"popover",i);break;case"xlinkActuate":ut(e,"http://www.w3.org/1999/xlink","xlink:actuate",i);break;case"xlinkArcrole":ut(e,"http://www.w3.org/1999/xlink","xlink:arcrole",i);break;case"xlinkRole":ut(e,"http://www.w3.org/1999/xlink","xlink:role",i);break;case"xlinkShow":ut(e,"http://www.w3.org/1999/xlink","xlink:show",i);break;case"xlinkTitle":ut(e,"http://www.w3.org/1999/xlink","xlink:title",i);break;case"xlinkType":ut(e,"http://www.w3.org/1999/xlink","xlink:type",i);break;case"xmlBase":ut(e,"http://www.w3.org/XML/1998/namespace","xml:base",i);break;case"xmlLang":ut(e,"http://www.w3.org/XML/1998/namespace","xml:lang",i);break;case"xmlSpace":ut(e,"http://www.w3.org/XML/1998/namespace","xml:space",i);break;case"is":lt(e,"is",i);break;case"innerText":case"textContent":break;default:(!(2<n.length)||"o"!==n[0]&&"O"!==n[0]||"n"!==n[1]&&"N"!==n[1])&<(e,n=_t.get(n)||n,i)}}function dd(e,t,n,i,r,a){switch(n){case"style":xt(e,i,a);break;case"dangerouslySetInnerHTML":if(null!=i){if("object"!=typeof i||!("__html"in i))throw Error(o(61));if(null!=(n=i.__html)){if(null!=r.children)throw Error(o(60));e.innerHTML=n}}break;case"children":"string"==typeof i?St(e,i):("number"==typeof i||"bigint"==typeof i)&&St(e,""+i);break;case"onScroll":null!=i&&Xu("scroll",e);break;case"onScrollEnd":null!=i&&Xu("scrollend",e);break;case"onClick":null!=i&&(e.onclick=Dt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":case"innerText":case"textContent":break;default:nt.hasOwnProperty(n)||("o"!==n[0]||"n"!==n[1]||(r=n.endsWith("Capture"),t=n.slice(2,r?n.length-7:void 0),"function"==typeof(a=null!=(a=e[He]||null)?a[n]:null)&&e.removeEventListener(t,a,r),"function"!=typeof i)?n in e?e[n]=i:!0===i?e.setAttribute(n,""):lt(e,n,i):("function"!=typeof a&&null!==a&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,i,r)))}}function hd(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Xu("error",e),Xu("load",e);var i,r=!1,a=!1;for(i in n)if(n.hasOwnProperty(i)){var s=n[i];if(null!=s)switch(i){case"src":r=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:ud(e,t,i,s,n,null)}}return a&&ud(e,t,"srcSet",n.srcSet,n,null),void(r&&ud(e,t,"src",n.src,n,null));case"input":Xu("invalid",e);var l=i=s=a=null,c=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(null!=d)switch(r){case"name":a=d;break;case"type":s=d;break;case"checked":c=d;break;case"defaultChecked":u=d;break;case"value":i=d;break;case"defaultValue":l=d;break;case"children":case"dangerouslySetInnerHTML":if(null!=d)throw Error(o(137,t));break;default:ud(e,t,r,d,n,null)}}return void bt(e,i,l,c,u,s,a,!1);case"select":for(a in Xu("invalid",e),r=s=i=null,n)if(n.hasOwnProperty(a)&&null!=(l=n[a]))switch(a){case"value":i=l;break;case"defaultValue":s=l;break;case"multiple":r=l;default:ud(e,t,a,l,n,null)}return t=i,n=s,e.multiple=!!r,void(null!=t?Et(e,!!r,t,!1):null!=n&&Et(e,!!r,n,!0));case"textarea":for(s in Xu("invalid",e),i=a=r=null,n)if(n.hasOwnProperty(s)&&null!=(l=n[s]))switch(s){case"value":r=l;break;case"defaultValue":a=l;break;case"children":i=l;break;case"dangerouslySetInnerHTML":if(null!=l)throw Error(o(91));break;default:ud(e,t,s,l,n,null)}return void wt(e,r,a,i);case"option":for(c in n)n.hasOwnProperty(c)&&null!=(r=n[c])&&("selected"===c?e.selected=r&&"function"!=typeof r&&"symbol"!=typeof r:ud(e,t,c,r,n,null));return;case"dialog":Xu("beforetoggle",e),Xu("toggle",e),Xu("cancel",e),Xu("close",e);break;case"iframe":case"object":Xu("load",e);break;case"video":case"audio":for(r=0;r<qu.length;r++)Xu(qu[r],e);break;case"image":Xu("error",e),Xu("load",e);break;case"details":Xu("toggle",e);break;case"embed":case"source":case"link":Xu("error",e),Xu("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(u in n)if(n.hasOwnProperty(u)&&null!=(r=n[u]))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:ud(e,t,u,r,n,null)}return;default:if(Nt(t)){for(d in n)n.hasOwnProperty(d)&&void 0!==(r=n[d])&&dd(e,t,d,r,n,void 0);return}}for(l in n)n.hasOwnProperty(l)&&null!=(r=n[l])&&ud(e,t,l,r,n,null)}function fd(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}var pd=null,md=null;function gd(e){return 9===e.nodeType?e:e.ownerDocument}function vd(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function yd(e,t){if(0===e)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return 1===e&&"foreignObject"===t?0:e}function bd(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"bigint"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var Ad=null,Ed="function"==typeof setTimeout?setTimeout:void 0,Td="function"==typeof clearTimeout?clearTimeout:void 0,wd="function"==typeof Promise?Promise:void 0,Sd="function"==typeof queueMicrotask?queueMicrotask:void 0!==wd?function(e){return wd.resolve(null).then(e).catch(Cd)}:Ed;function Cd(e){setTimeout(function(){throw e})}function kd(e){return"head"===e}function xd(e,t){var n=t,i=0;do{var r=n.nextSibling;if(e.removeChild(n),r&&8===r.nodeType)if("/$"===(n=r.data)||"/&"===n){if(0===i)return e.removeChild(r),void Kh(t);i--}else if("$"===n||"$?"===n||"$~"===n||"$!"===n||"&"===n)i++;else if("html"===n)Ud(e.ownerDocument.documentElement);else if("head"===n){Ud(n=e.ownerDocument.head);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[Ye]||"SCRIPT"===s||"STYLE"===s||"LINK"===s&&"stylesheet"===a.rel.toLowerCase()||n.removeChild(a),a=o}}else"body"===n&&Ud(e.ownerDocument.body);n=r}while(n);Kh(t)}function Nd(e,t){var n=e;e=0;do{var i=n.nextSibling;if(1===n.nodeType?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",""===n.getAttribute("style")&&n.removeAttribute("style")):3===n.nodeType&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),i&&8===i.nodeType)if("/$"===(n=i.data)){if(0===e)break;e--}else"$"!==n&&"$?"!==n&&"$~"!==n&&"$!"!==n||e++;n=i}while(n)}function _d(e){var t=e.firstChild;for(t&&10===t.nodeType&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":_d(n),Qe(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if("stylesheet"===n.rel.toLowerCase())continue}e.removeChild(n)}}function Id(e,t){for(;8!==e.nodeType;){if((1!==e.nodeType||"INPUT"!==e.nodeName||"hidden"!==e.type)&&!t)return null;if(null===(e=Rd(e.nextSibling)))return null}return e}function Od(e){return"$?"===e.data||"$~"===e.data}function Dd(e){return"$!"===e.data||"$?"===e.data&&"loading"!==e.ownerDocument.readyState}function Rd(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t||"$~"===t||"&"===t||"F!"===t||"F"===t)break;if("/$"===t||"/&"===t)return null}}return e}var Pd=null;function Ld(e){e=e.nextSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n||"/&"===n){if(0===t)return Rd(e.nextSibling);t--}else"$"!==n&&"$!"!==n&&"$?"!==n&&"$~"!==n&&"&"!==n||t++}e=e.nextSibling}return null}function Md(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n||"$~"===n||"&"===n){if(0===t)return e;t--}else"/$"!==n&&"/&"!==n||t++}e=e.previousSibling}return null}function Fd(e,t,n){switch(t=gd(n),e){case"html":if(!(e=t.documentElement))throw Error(o(452));return e;case"head":if(!(e=t.head))throw Error(o(453));return e;case"body":if(!(e=t.body))throw Error(o(454));return e;default:throw Error(o(451))}}function Ud(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Qe(e)}var Bd=new Map,jd=new Set;function Vd(e){return"function"==typeof e.getRootNode?e.getRootNode():9===e.nodeType?e:e.ownerDocument}var Hd=L.d;L.d={f:function(){var e=Hd.f(),t=$c();return e||t},r:function(e){var t=Ze(e);null!==t&&5===t.tag&&"form"===t.type?is(t):Hd.r(e)},D:function(e){Hd.D(e),Kd("dns-prefetch",e,null)},C:function(e,t){Hd.C(e,t),Kd("preconnect",e,t)},L:function(e,t,n){Hd.L(e,t,n);var i=zd;if(i&&e&&t){var r='link[rel="preload"][as="'+vt(t)+'"]';"image"===t&&n&&n.imageSrcSet?(r+='[imagesrcset="'+vt(n.imageSrcSet)+'"]',"string"==typeof n.imageSizes&&(r+='[imagesizes="'+vt(n.imageSizes)+'"]')):r+='[href="'+vt(e)+'"]';var a=r;switch(t){case"style":a=Gd(e);break;case"script":a=Qd(e)}Bd.has(a)||(e=f({rel:"preload",href:"image"===t&&n&&n.imageSrcSet?void 0:e,as:t},n),Bd.set(a,e),null!==i.querySelector(r)||"style"===t&&i.querySelector(qd(a))||"script"===t&&i.querySelector(Xd(a))||(hd(t=i.createElement("link"),"link",e),et(t),i.head.appendChild(t)))}},m:function(e,t){Hd.m(e,t);var n=zd;if(n&&e){var i=t&&"string"==typeof t.as?t.as:"script",r='link[rel="modulepreload"][as="'+vt(i)+'"][href="'+vt(e)+'"]',a=r;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":a=Qd(e)}if(!Bd.has(a)&&(e=f({rel:"modulepreload",href:e},t),Bd.set(a,e),null===n.querySelector(r))){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Xd(a)))return}hd(i=n.createElement("link"),"link",e),et(i),n.head.appendChild(i)}}},X:function(e,t){Hd.X(e,t);var n=zd;if(n&&e){var i=$e(n).hoistableScripts,r=Qd(e),a=i.get(r);a||((a=n.querySelector(Xd(r)))||(e=f({src:e,async:!0},t),(t=Bd.get(r))&&eh(e,t),et(a=n.createElement("script")),hd(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},i.set(r,a))}},S:function(e,t,n){Hd.S(e,t,n);var i=zd;if(i&&e){var r=$e(i).hoistableStyles,a=Gd(e);t=t||"default";var o=r.get(a);if(!o){var s={loading:0,preload:null};if(o=i.querySelector(qd(a)))s.loading=5;else{e=f({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Bd.get(a))&&$d(e,n);var l=o=i.createElement("link");et(l),hd(l,"link",e),l._p=new Promise(function(e,t){l.onload=e,l.onerror=t}),l.addEventListener("load",function(){s.loading|=1}),l.addEventListener("error",function(){s.loading|=2}),s.loading|=4,Jd(o,t,i)}o={type:"stylesheet",instance:o,count:1,state:s},r.set(a,o)}}},M:function(e,t){Hd.M(e,t);var n=zd;if(n&&e){var i=$e(n).hoistableScripts,r=Qd(e),a=i.get(r);a||((a=n.querySelector(Xd(r)))||(e=f({src:e,async:!0,type:"module"},t),(t=Bd.get(r))&&eh(e,t),et(a=n.createElement("script")),hd(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},i.set(r,a))}}};var zd="undefined"==typeof document?null:document;function Kd(e,t,n){var i=zd;if(i&&"string"==typeof t&&t){var r=vt(t);r='link[rel="'+e+'"][href="'+r+'"]',"string"==typeof n&&(r+='[crossorigin="'+n+'"]'),jd.has(r)||(jd.add(r),e={rel:e,crossOrigin:n,href:t},null===i.querySelector(r)&&(hd(t=i.createElement("link"),"link",e),et(t),i.head.appendChild(t)))}}function Wd(e,t,n,i){var r,a,s,l,c=(c=G.current)?Vd(c):null;if(!c)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return"string"==typeof n.precedence&&"string"==typeof n.href?(t=Gd(n.href),(i=(n=$e(c).hoistableStyles).get(t))||(i={type:"style",instance:null,count:0,state:null},n.set(t,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if("stylesheet"===n.rel&&"string"==typeof n.href&&"string"==typeof n.precedence){e=Gd(n.href);var u=$e(c).hoistableStyles,d=u.get(e);if(d||(c=c.ownerDocument||c,d={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,d),(u=c.querySelector(qd(e)))&&!u._p&&(d.instance=u,d.state.loading=5),Bd.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Bd.set(e,n),u||(r=c,a=e,s=n,l=d.state,r.querySelector('link[rel="preload"][as="style"]['+a+"]")?l.loading=1:(a=r.createElement("link"),l.preload=a,a.addEventListener("load",function(){return l.loading|=1}),a.addEventListener("error",function(){return l.loading|=2}),hd(a,"link",s),et(a),r.head.appendChild(a))))),t&&null===i)throw Error(o(528,""));return d}if(t&&null!==i)throw Error(o(529,""));return null;case"script":return t=n.async,"string"==typeof(n=n.src)&&t&&"function"!=typeof t&&"symbol"!=typeof t?(t=Qd(n),(i=(n=$e(c).hoistableScripts).get(t))||(i={type:"script",instance:null,count:0,state:null},n.set(t,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function Gd(e){return'href="'+vt(e)+'"'}function qd(e){return'link[rel="stylesheet"]['+e+"]"}function Yd(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Qd(e){return'[src="'+vt(e)+'"]'}function Xd(e){return"script[async]"+e}function Zd(e,t,n){if(t.count++,null===t.instance)switch(t.type){case"style":var i=e.querySelector('style[data-href~="'+vt(n.href)+'"]');if(i)return t.instance=i,et(i),i;var r=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return et(i=(e.ownerDocument||e).createElement("style")),hd(i,"style",r),Jd(i,n.precedence,e),t.instance=i;case"stylesheet":r=Gd(n.href);var a=e.querySelector(qd(r));if(a)return t.state.loading|=4,t.instance=a,et(a),a;i=Yd(n),(r=Bd.get(r))&&$d(i,r),et(a=(e.ownerDocument||e).createElement("link"));var s=a;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),hd(a,"link",i),t.state.loading|=4,Jd(a,n.precedence,e),t.instance=a;case"script":return a=Qd(n.src),(r=e.querySelector(Xd(a)))?(t.instance=r,et(r),r):(i=n,(r=Bd.get(a))&&eh(i=f({},n),r),et(r=(e=e.ownerDocument||e).createElement("script")),hd(r,"link",i),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(o(443,t.type))}else"stylesheet"===t.type&&!(4&t.state.loading)&&(i=t.instance,t.state.loading|=4,Jd(i,n.precedence,e));return t.instance}function Jd(e,t,n){for(var i=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=i.length?i[i.length-1]:null,a=r,o=0;o<i.length;o++){var s=i[o];if(s.dataset.precedence===t)a=s;else if(a!==r)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=9===n.nodeType?n.head:n).insertBefore(e,t.firstChild)}function $d(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.title&&(e.title=t.title)}function eh(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.integrity&&(e.integrity=t.integrity)}var th=null;function nh(e,t,n){if(null===th){var i=new Map,r=th=new Map;r.set(n,i)}else(i=(r=th).get(n))||(i=new Map,r.set(n,i));if(i.has(e))return i;for(i.set(e,null),n=n.getElementsByTagName(e),r=0;r<n.length;r++){var a=n[r];if(!(a[Ye]||a[Ve]||"link"===e&&"stylesheet"===a.getAttribute("rel"))&&"http://www.w3.org/2000/svg"!==a.namespaceURI){var o=a.getAttribute(t)||"";o=e+o;var s=i.get(o);s?s.push(a):i.set(o,[a])}}return i}function ih(e,t,n){(e=e.ownerDocument||e).head.insertBefore(n,"title"===t?e.querySelector("head > title"):null)}function rh(e){return"stylesheet"!==e.type||!!(3&e.state.loading)}var ah=0;function oh(){if(this.count--,0===this.count&&(0===this.imgCount||!this.waitingForImages))if(this.stylesheets)lh(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}var sh=null;function lh(e,t){e.stylesheets=null,null!==e.unsuspend&&(e.count++,sh=new Map,t.forEach(ch,e),sh=null,oh.call(e))}function ch(e,t){if(!(4&t.state.loading)){var n=sh.get(e);if(n)var i=n.get(null);else{n=new Map,sh.set(e,n);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),a=0;a<r.length;a++){var o=r[a];"LINK"!==o.nodeName&&"not all"===o.getAttribute("media")||(n.set(o.dataset.precedence,o),i=o)}i&&n.set(null,i)}o=(r=t.instance).getAttribute("data-precedence"),(a=n.get(o)||i)===i&&n.set(null,r),n.set(o,r),this.count++,i=oh.bind(this),r.addEventListener("load",i),r.addEventListener("error",i),a?a.parentNode.insertBefore(r,a.nextSibling):(e=9===e.nodeType?e.head:e).insertBefore(r,e.firstChild),t.state.loading|=4}}var uh={$$typeof:E,Provider:null,Consumer:null,_currentValue:M,_currentValue2:M,_threadCount:0};function dh(e,t,n,i,r,a,o,s,l){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Oe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Oe(0),this.hiddenUpdates=Oe(null),this.identifierPrefix=i,this.onUncaughtError=r,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=l,this.incompleteTransitions=new Map}function hh(e,t,n,i,r,a,o,s,l,c,u,d){return e=new dh(e,t,n,o,l,c,u,d,s),t=1,!0===a&&(t|=24),a=Ui(3,null,null,t),e.current=a,a.stateNode=e,(t=Br()).refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:i,isDehydrated:n,cache:t},ga(a),e}function fh(e){return e?e=Mi:Mi}function ph(e,t,n,i,r,a){r=fh(r),null===i.context?i.context=r:i.pendingContext=r,(i=ya(t)).payload={element:n},null!==(a=void 0===a?null:a)&&(i.callback=a),null!==(n=ba(e,i,t))&&(Yc(n,0,t),Aa(n,e,t))}function mh(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function gh(e,t){mh(e,t),(e=e.alternate)&&mh(e,t)}function vh(e){if(13===e.tag||31===e.tag){var t=Ri(e,67108864);null!==t&&Yc(t,0,67108864),gh(e,67108864)}}function yh(e){if(13===e.tag||31===e.tag){var t=Gc(),n=Ri(e,t=Me(t));null!==n&&Yc(n,0,t),gh(e,t)}}var bh=!0;function Ah(e,t,n,i){var r=P.T;P.T=null;var a=L.p;try{L.p=2,Th(e,t,n,i)}finally{L.p=a,P.T=r}}function Eh(e,t,n,i){var r=P.T;P.T=null;var a=L.p;try{L.p=8,Th(e,t,n,i)}finally{L.p=a,P.T=r}}function Th(e,t,n,i){if(bh){var r=wh(i);if(null===r)td(e,t,i,Sh,n),Lh(e,i);else if(function(e,t,n,i,r){switch(t){case"focusin":return Nh=Mh(Nh,e,t,n,i,r),!0;case"dragenter":return _h=Mh(_h,e,t,n,i,r),!0;case"mouseover":return Ih=Mh(Ih,e,t,n,i,r),!0;case"pointerover":var a=r.pointerId;return Oh.set(a,Mh(Oh.get(a)||null,e,t,n,i,r)),!0;case"gotpointercapture":return a=r.pointerId,Dh.set(a,Mh(Dh.get(a)||null,e,t,n,i,r)),!0}return!1}(r,e,t,n,i))i.stopPropagation();else if(Lh(e,i),4&t&&-1<Ph.indexOf(e)){for(;null!==r;){var a=Ze(r);if(null!==a)switch(a.tag){case 3:if((a=a.stateNode).current.memoizedState.isDehydrated){var o=ke(a.pendingLanes);if(0!==o){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var l=1<<31-Ae(o);s.entanglements[1]|=l,o&=~l}Lu(a),!(6&fc)&&(Pc=le()+500,Mu(0,!1))}}break;case 31:case 13:null!==(s=Ri(a,2))&&Yc(s,0,2),$c(),gh(a,2)}if(null===(a=wh(i))&&td(e,t,i,Sh,n),a===r)break;r=a}null!==r&&i.stopPropagation()}else td(e,t,i,null,n)}}function wh(e){return Ch(e=Pt(e))}var Sh=null;function Ch(e){if(Sh=null,null!==(e=Xe(e))){var t=l(e);if(null===t)e=null;else{var n=t.tag;if(13===n){if(null!==(e=c(t)))return e;e=null}else if(31===n){if(null!==(e=u(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Sh=e,null}function kh(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ce()){case ue:return 2;case de:return 8;case he:case fe:return 32;case pe:return 268435456;default:return 32}default:return 32}}var xh=!1,Nh=null,_h=null,Ih=null,Oh=new Map,Dh=new Map,Rh=[],Ph="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Lh(e,t){switch(e){case"focusin":case"focusout":Nh=null;break;case"dragenter":case"dragleave":_h=null;break;case"mouseover":case"mouseout":Ih=null;break;case"pointerover":case"pointerout":Oh.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Dh.delete(t.pointerId)}}function Mh(e,t,n,i,r,a){return null===e||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:i,nativeEvent:a,targetContainers:[r]},null!==t&&null!==(t=Ze(t))&&vh(t),e):(e.eventSystemFlags|=i,t=e.targetContainers,null!==r&&-1===t.indexOf(r)&&t.push(r),e)}function Fh(e){var t=Xe(e.target);if(null!==t){var n=l(t);
vendor: 8,159 bytes, line 2
2if(null!==n)if(13===(t=n.tag)){if(null!==(t=c(n)))return e.blockedOn=t,void Be(e.priority,function(){yh(n)})}else if(31===t){if(null!==(t=u(n)))return e.blockedOn=t,void Be(e.priority,function(){yh(n)})}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Uh(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=wh(e.nativeEvent);if(null!==n)return null!==(t=Ze(n))&&vh(t),e.blockedOn=n,!1;var i=new(n=e.nativeEvent).constructor(n.type,n);Rt=i,n.target.dispatchEvent(i),Rt=null,t.shift()}return!0}function Bh(e,t,n){Uh(e)&&n.delete(t)}function jh(){xh=!1,null!==Nh&&Uh(Nh)&&(Nh=null),null!==_h&&Uh(_h)&&(_h=null),null!==Ih&&Uh(Ih)&&(Ih=null),Oh.forEach(Bh),Dh.forEach(Bh)}function Vh(e,t){e.blockedOn===t&&(e.blockedOn=null,xh||(xh=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,jh)))}var Hh=null;function zh(e){Hh!==e&&(Hh=e,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){Hh===e&&(Hh=null);for(var t=0;t<e.length;t+=3){var n=e[t],i=e[t+1],r=e[t+2];if("function"!=typeof i){if(null===Ch(i||n))continue;break}var a=Ze(n);null!==a&&(e.splice(t,3),t-=3,ts(a,{pending:!0,data:r,method:n.method,action:i},i,r))}}))}function Kh(e){function t(t){return Vh(t,e)}null!==Nh&&Vh(Nh,e),null!==_h&&Vh(_h,e),null!==Ih&&Vh(Ih,e),Oh.forEach(t),Dh.forEach(t);for(var n=0;n<Rh.length;n++){var i=Rh[n];i.blockedOn===e&&(i.blockedOn=null)}for(;0<Rh.length&&null===(n=Rh[0]).blockedOn;)Fh(n),null===n.blockedOn&&Rh.shift();if(null!=(n=(e.ownerDocument||e).$$reactFormReplay))for(i=0;i<n.length;i+=3){var r=n[i],a=n[i+1],o=r[He]||null;if("function"==typeof a)o||zh(n);else if(o){var s=null;if(a&&a.hasAttribute("formAction")){if(r=a,o=a[He]||null)s=o.formAction;else if(null!==Ch(r))continue}else s=o.action;"function"==typeof s?n[i+1]=s:(n.splice(i,3),i-=3),zh(n)}}}function Wh(){function e(e){e.canIntercept&&"react-transition"===e.info&&e.intercept({handler:function(){return new Promise(function(e){return r=e})},focusReset:"manual",scroll:"manual"})}function t(){null!==r&&(r(),r=null),i||setTimeout(n,20)}function n(){if(!i&&!navigation.transition){var e=navigation.currentEntry;e&&null!=e.url&&navigation.navigate(e.url,{state:e.getState(),info:"react-transition",history:"replace"})}}if("object"==typeof navigation){var i=!1,r=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){i=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),null!==r&&(r(),r=null)}}}function Gh(e){this._internalRoot=e}function qh(e){this._internalRoot=e}qh.prototype.render=Gh.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(o(409));ph(t.current,Gc(),e,t,null,null)},qh.prototype.unmount=Gh.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;ph(e.current,2,null,e,null,null),$c(),t[ze]=null}},qh.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ue();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Rh.length&&0!==t&&t<Rh[n].priority;n++);Rh.splice(n,0,e),0===n&&Fh(e)}};var Yh=r.version;if("19.2.1"!==Yh)throw Error(o(527,Yh,"19.2.1"));L.findDOMNode=function(e){var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(o(188));throw e=Object.keys(e).join(","),Error(o(268,e))}return e=function(e){var t=e.alternate;if(!t){if(null===(t=l(e)))throw Error(o(188));return t!==e?null:e}for(var n=e,i=t;;){var r=n.return;if(null===r)break;var a=r.alternate;if(null===a){if(null!==(i=r.return)){n=i;continue}break}if(r.child===a.child){for(a=r.child;a;){if(a===n)return d(r),e;if(a===i)return d(r),t;a=a.sibling}throw Error(o(188))}if(n.return!==i.return)n=r,i=a;else{for(var s=!1,c=r.child;c;){if(c===n){s=!0,n=r,i=a;break}if(c===i){s=!0,i=r,n=a;break}c=c.sibling}if(!s){for(c=a.child;c;){if(c===n){s=!0,n=a,i=r;break}if(c===i){s=!0,i=a,n=r;break}c=c.sibling}if(!s)throw Error(o(189))}}if(n.alternate!==i)throw Error(o(190))}if(3!==n.tag)throw Error(o(188));return n.stateNode.current===n?e:t}(t),null===(e=null!==e?h(e):null)?null:e.stateNode};var Qh={bundleType:0,version:"19.2.1",rendererPackageName:"react-dom",currentDispatcherRef:P,reconcilerVersion:"19.2.1"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var Xh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Xh.isDisabled&&Xh.supportsFiber)try{ve=Xh.inject(Qh),ye=Xh}catch(e){}}t.createRoot=function(e,t){if(!s(e))throw Error(o(299));var n=!1,i="",r=Ss,a=Cs,l=ks;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(i=t.identifierPrefix),void 0!==t.onUncaughtError&&(r=t.onUncaughtError),void 0!==t.onCaughtError&&(a=t.onCaughtError),void 0!==t.onRecoverableError&&(l=t.onRecoverableError)),t=hh(e,1,!1,null,0,n,i,null,r,a,l,Wh),e[ze]=t.current,$u(e),new Gh(t)},t.hydrateRoot=function(e,t,n){if(!s(e))throw Error(o(299));var i=!1,r="",a=Ss,l=Cs,c=ks,u=null;return null!=n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(r=n.identifierPrefix),void 0!==n.onUncaughtError&&(a=n.onUncaughtError),void 0!==n.onCaughtError&&(l=n.onCaughtError),void 0!==n.onRecoverableError&&(c=n.onRecoverableError),void 0!==n.formState&&(u=n.formState)),(t=hh(e,1,!0,t,0,i,r,u,a,l,c,Wh)).context=fh(null),n=t.current,(r=ya(i=Me(i=Gc()))).callback=null,ba(n,r,i),n=i,t.current.lanes=n,De(t,n),Lu(t),e[ze]=t.current,$u(e),new qh(t)},t.version="19.2.1"},264(e,t,n){"use strict";var i=n(70);function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var o={d:{f:a,r:function(){throw Error(r(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},s=Symbol.for("react.portal"),l=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){return"font"===e?"":"string"==typeof t?"use-credentials"===t?t:"":void 0}t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!t||1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType)throw Error(r(299));return function(e,t,n){var i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:s,key:null==i?null:""+i,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.flushSync=function(e){var t=l.T,n=o.p;try{if(l.T=null,o.p=2,e)return e()}finally{l.T=t,o.p=n,o.d.f()}},t.preconnect=function(e,t){"string"==typeof e&&(t=t?"string"==typeof(t=t.crossOrigin)?"use-credentials"===t?t:"":void 0:null,o.d.C(e,t))},t.prefetchDNS=function(e){"string"==typeof e&&o.d.D(e)},t.preinit=function(e,t){if("string"==typeof e&&t&&"string"==typeof t.as){var n=t.as,i=c(n,t.crossOrigin),r="string"==typeof t.integrity?t.integrity:void 0,a="string"==typeof t.fetchPriority?t.fetchPriority:void 0;"style"===n?o.d.S(e,"string"==typeof t.precedence?t.precedence:void 0,{crossOrigin:i,integrity:r,fetchPriority:a}):"script"===n&&o.d.X(e,{crossOrigin:i,integrity:r,fetchPriority:a,nonce:"string"==typeof t.nonce?t.nonce:void 0})}},t.preinitModule=function(e,t){if("string"==typeof e)if("object"==typeof t&&null!==t){if(null==t.as||"script"===t.as){var n=c(t.as,t.crossOrigin);o.d.M(e,{crossOrigin:n,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0})}}else null==t&&o.d.M(e)},t.preload=function(e,t){if("string"==typeof e&&"object"==typeof t&&null!==t&&"string"==typeof t.as){var n=t.as,i=c(n,t.crossOrigin);o.d.L(e,n,{crossOrigin:i,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0,type:"string"==typeof t.type?t.type:void 0,fetchPriority:"string"==typeof t.fetchPriority?t.fetchPriority:void 0,referrerPolicy:"str
2ing"==typeof t.referrerPolicy?t.referrerPolicy:void 0,imageSrcSet:"string"==typeof t.imageSrcSet?t.imageSrcSet:void 0,imageSizes:"string"==typeof t.imageSizes?t.imageSizes:void 0,media:"string"==typeof t.media?t.media:void 0})}},t.preloadModule=function(e,t){if("string"==typeof e)if(t){var n=c(t.as,t.crossOrigin);o.d.m(e,{as:"string"==typeof t.as&&"script"!==t.as?t.as:void 0,crossOrigin:n,integrity:"string"==typeof t.integrity?t.integrity:void 0})}else o.d.m(e)},t.requestFormReset=function(e){o.d.r(e)},t.unstable_batchedUpdates=function(e,t){return e(t)},t.useFormState=function(e,t,n){return l.H.useFormState(e,t,n)},t.useFormStatus=function(){return l.H.useHostTransitionStatus()},t.version="19.2.1"},172(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(89)},723(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(264)},540(e){var t="undefined"!=typeof Element,n="function"==typeof Map,i="function"==typeof Set,r="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;function a(e,o){if(e===o)return!0;if(e&&o&&"object"==typeof e&&"object"==typeof o){if(e.constructor!==o.constructor)return!1;var s,l,c,u;if(Array.isArray(e)){if((s=e.length)!=o.length)return!1;for(l=s;0!==l--;)if(!a(e[l],o[l]))return!1;return!0}if(n&&e instanceof Map&&o instanceof Map){if(e.size!==o.size)return!1;for(u=e.entries();!(l=u.next()).done;)if(!o.has(l.value[0]))return!1;for(u=e.entries();!(l=u.next()).done;)if(!a(l.value[1],o.get(l.value[0])))return!1;return!0}if(i&&e instanceof Set&&o instanceof Set){if(e.size!==o.size)return!1;for(u=e.entries();!(l=u.next()).done;)if(!o.has(l.value[0]))return!1;return!0}if(r&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(o)){if((s=e.length)!=o.length)return!1;for(l=s;0!==l--;)if(e[l]!==o[l])return!1;return!0}if(e.constructor===RegExp)return e.source===o.source&&e.flags===o.flags;if(e.valueOf!==Object.prototype.valueOf&&"function"==typeof e.valueOf&&"function"==typeof o.valueOf)return e.valueOf()===o.valueOf();if(e.toString!==Object.prototype.toString&&"function"==typeof e.toString&&"function"==typeof o.toString)return e.toString()===o.toString();if((s=(c=Object.keys(e)).length)!==Object.keys(o).length)return!1;for(l=s;0!==l--;)if(!Object.prototype.hasOwnProperty.call(o,c[l]))return!1;if(t&&e instanceof Element)return!1;for(l=s;0!==l--;)if(("_owner"!==c[l]&&"__v"!==c[l]&&"__o"!==c[l]||!e.$$typeof)&&!a(e[c[l]],o[c[l]]))return!1;return!0}return e!=e&&o!=o}e.exports=function(e,t){try{return a(e,t)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}}},513(e,t,n){"use strict";var i,r=n(70),a=(i=r)&&"object"==typeof i&&"default"in i?i.default:i;function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s=!("undefined"==typeof window||!window.document||!window.document.createElement);e.exports=function(e,t,n){if("function"!=typeof e)throw new Error("Expected reducePropsToState to be a function.");if("function"!=typeof t)throw new Error("Expected handleStateChangeOnClient to be a function.");if(void 0!==n&&"function"!=typeof n)throw new Error("Expected mapStateOnServer to either be undefined or a function.");return function(i){if("function"!=typeof i)throw new Error("Expected WrappedComponent to be a React component.");var l,c=[];function u(){l=e(c.map(function(e){return e.props})),d.canUseDOM?t(l):n&&(l=n(l))}var d=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.peek=function(){return l},r.rewind=function(){if(r.canUseDOM)throw new Error("You may only call rewind() on the server. Call peek() to read the current state.");var e=l;return l=void 0,c=[],e};var o=r.prototype;return o.UNSAFE_componentWillMount=function(){c.push(this),u()},o.componentDidUpdate=function(){u()},o.componentWillUnmount=function(){var e=c.indexOf(this);c.splice(e,1),u()},o.render=function(){return a.createElement(i,this.props)},r}(r.PureComponent);return o(d,"displayName","SideEffect("+function(e){return e.displayName||e.name||"Component"}(i)+")"),o(d,"canUseDOM",s),d}}},732(e,t){"use strict";var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function r(e,t,i){var r=null;if(void 0!==i&&(r=""+i),void 0!==t.key&&(r=""+t.key),"key"in t)for(var a in i={},t)"key"!==a&&(i[a]=t[a]);else i=t;return t=i.ref,{$$typeof:n,type:e,key:r,ref:void 0!==t?t:null,props:i}}t.Fragment=i,t.jsx=r,t.jsxs=r},183(e,t){"use strict";var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),f=Symbol.for("react.activity"),p=Symbol.iterator,m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||m}function b(){}function A(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||m}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},b.prototype=y.prototype;var E=A.prototype=new b;
vendor: 10,100 bytes, line 2
2E.constructor=A,g(E,y.prototype),E.isPureReactComponent=!0;var T=Array.isArray;function w(){}var S={H:null,A:null,T:null,S:null},C=Object.prototype.hasOwnProperty;function k(e,t,i){var r=i.ref;return{$$typeof:n,type:e,key:t,ref:void 0!==r?r:null,props:i}}function x(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}var N=/\/+/g;function _(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return t[e]})}(""+e.key):t.toString(36)}function I(e,t,r,a,o){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var l,c,u=!1;if(null===e)u=!0;else switch(s){case"bigint":case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case n:case i:u=!0;break;case h:return I((u=e._init)(e._payload),t,r,a,o)}}if(u)return o=o(e),u=""===a?"."+_(e,0):a,T(o)?(r="",null!=u&&(r=u.replace(N,"$&/")+"/"),I(o,t,r,"",function(e){return e})):null!=o&&(x(o)&&(l=o,c=r+(null==o.key||e&&e.key===o.key?"":(""+o.key).replace(N,"$&/")+"/")+u,o=k(l.type,c,l.props)),t.push(o)),1;u=0;var d,f=""===a?".":a+":";if(T(e))for(var m=0;m<e.length;m++)u+=I(a=e[m],t,r,s=f+_(a,m),o);else if("function"==typeof(m=null===(d=e)||"object"!=typeof d?null:"function"==typeof(d=p&&d[p]||d["@@iterator"])?d:null))for(e=m.call(e),m=0;!(a=e.next()).done;)u+=I(a=a.value,t,r,s=f+_(a,m++),o);else if("object"===s){if("function"==typeof e.then)return I(function(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch("string"==typeof e.status?e.then(w,w):(e.status="pending",e.then(function(t){"pending"===e.status&&(e.status="fulfilled",e.value=t)},function(t){"pending"===e.status&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}(e),t,r,a,o);throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return u}function O(e,t,n){if(null==e)return e;var i=[],r=0;return I(e,i,"","",function(e){return t.call(n,e,r++)}),i}function D(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var R="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof process&&"function"==typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)},P={map:O,forEach:function(e,t,n){O(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return O(e,function(){t++}),t},toArray:function(e){return O(e,function(e){return e})||[]},only:function(e){if(!x(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};t.Activity=f,t.Children=P,t.Component=y,t.Fragment=r,t.Profiler=o,t.PureComponent=A,t.StrictMode=a,t.Suspense=u,t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=S,t.__COMPILER_RUNTIME={__proto__:null,c:function(e){return S.H.useMemoCache(e)}},t.cache=function(e){return function(){return e.apply(null,arguments)}},t.cacheSignal=function(){return null},t.cloneElement=function(e,t,n){if(null==e)throw Error("The argument must be a React element, but you passed "+e+".");var i=g({},e.props),r=e.key;if(null!=t)for(a in void 0!==t.key&&(r=""+t.key),t)!C.call(t,a)||"key"===a||"__self"===a||"__source"===a||"ref"===a&&void 0===t.ref||(i[a]=t[a]);var a=arguments.length-2;if(1===a)i.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];i.children=o}return k(e.type,r,i)},t.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider=e,e.Consumer={$$typeof:s,_context:e},e},t.createElement=function(e,t,n){var i,r={},a=null;if(null!=t)for(i in void 0!==t.key&&(a=""+t.key),t)C.call(t,i)&&"key"!==i&&"__self"!==i&&"__source"!==i&&(r[i]=t[i]);var o=arguments.length-2;if(1===o)r.children=n;else if(1<o){for(var s=Array(o),l=0;l<o;l++)s[l]=arguments[l+2];r.children=s}if(e&&e.defaultProps)for(i in o=e.defaultProps)void 0===r[i]&&(r[i]=o[i]);return k(e,a,r)},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:c,render:e}},t.isValidElement=x,t.lazy=function(e){return{$$typeof:h,_payload:{_status:-1,_result:e},_init:D}},t.memo=function(e,t){return{$$typeof:d,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=S.T,n={};S.T=n;try{var i=e(),r=S.S;null!==r&&r(n,i),"object"==typeof i&&null!==i&&"function"==typeof i.then&&i.then(w,R)}catch(e){R(e)}finally{null!==t&&null!==n.types&&(t.types=n.types),S.T=t}},t.unstable_useCacheRefresh=function(){return S.H.useCacheRefresh()},t.use=function(e){return S.H.use(e)},t.useActionState=function(e,t,n){return S.H.useActionState(e,t,n)},t.useCallback=function(e,t){return S.H.useCallback(e,t)},t.useContext=function(e){return S.H.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e,t){return S.H.useDeferredValue(e,t)},t.useEffect=function(e,t){return S.H.useEffect(e,t)},t.useEffectEvent=function(e){return S.H.useEffectEvent(e)},t.useId=function(){return S.H.useId()},t.useImperativeHandle=function(e,t,n){return S.H.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return S.H.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return S.H.useLayoutEffect(e,t)},t.useMemo=function(e,t){return S.H.useMemo(e,t)},t.useOptimistic=function(e,t){return S.H.useOptimistic(e,t)},t.useReducer=function(e,t,n){return S.H.useReducer(e,t,n)},t.useRef=function(e){return S.H.useRef(e)},t.useState=function(e){return S.H.useState(e)},t.useSyncExternalStore=function(e,t,n){return S.H.useSyncExternalStore(e,t,n)},t.useTransition=function(){return S.H.useTransition()},t.version="19.2.1"},70(e,t,n){"use strict";e.exports=n(183)},198(e,t,n){"use strict";e.exports=n(732)},981(e,t){"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var i=n-1>>>1,r=e[i];if(!(0<a(r,t)))break e;e[i]=t,e[n]=r,n=i}}function i(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var i=0,r=e.length,o=r>>>1;i<o;){var s=2*(i+1)-1,l=e[s],c=s+1,u=e[c];if(0>a(l,n))c<r&&0>a(u,l)?(e[i]=u,e[c]=n,i=c):(e[i]=l,e[s]=n,i=s);else{if(!(c<r&&0>a(u,n)))break e;e[i]=u,e[c]=n,i=c}}}return t}function a(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if(t.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var o=performance;t.unstable_now=function(){return o.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var c=[],u=[],d=1,h=null,f=3,p=!1,m=!1,g=!1,v=!1,y="function"==typeof setTimeout?setTimeout:null,b="function"==typeof clearTimeout?clearTimeout:null,A="undefined"!=typeof setImmediate?setImmediate:null;function E(e){for(var t=i(u);null!==t;){if(null===t.callback)r(u);else{if(!(t.startTime<=e))break;r(u),t.sortIndex=t.expirationTime,n(c,t)}t=i(u)}}function T(e){if(g=!1,E(e),!m)if(null!==i(c))m=!0,S||(S=!0,w());else{var t=i(u);null!==t&&D(T,t.startTime-e)}}var w,S=!1,C=-1,k=5,x=-1;function N(){return!(!v&&t.unstable_now()-x<k)}function _(){if(v=!1,S){var e=t.unstable_now();x=e;var n=!0;try{e:{m=!1,g&&(g=!1,b(C),C=-1),p=!0;var a=f;try{t:{for(E(e),h=i(c);null!==h&&!(h.expirationTime>e&&N());){var o=h.callback;if("function"==typeof o){h.callback=null,f=h.priorityLevel;var s=o(h.expirationTime<=e);if(e=t.unstable_now(),"function"==typeof s){h.callback=s,E(e),n=!0;break t}h===i(c)&&r(c),E(e)}else r(c);h=i(c)}if(null!==h)n=!0;else{var l=i(u);null!==l&&D(T,l.startTime-e),n=!1}}break e}finally{h=null,f=a,p=!1}n=void 0}}finally{n?w():S=!1}}}if("function"==typeof A)w=function(){A(_)};else if("undefined"!=typeof MessageChannel){var I=new MessageChannel,O=I.port2;I.port1.onmessage=_,w=function(){O.postMessage(null)}}else w=function(){y(_,0)};function D(e,n){C=y(function(){e(t.unstable_now())},n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):k=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return f},t.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},t.unstable_requestPaint=function(){v=!0},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},t.unstable_scheduleCallback=function(e,r,a){var o=t.unstable_now();switch(a="object"==typeof a&&null!==a&&"number"==typeof(a=a.delay)&&0<a?o+a:o,e){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return e={id:d++,callback:r,priorityLevel:e,startTime:a,expirationTime:s=a+s,sortIndex:-1},a>o?(e.sortIndex=a,n(u,e),null===i(c)&&e===i(u)&&(g?(b(C),C=-1):g=!0,D(T,a-o))):(e.sortIndex=s,n(c,e),m||p||(m=!0,S||(S=!0,w()))),e},t.unstable_shouldYield=N,t.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}},518(e,t,n){"use strict";e.exports=n(981)},137(e,t,n){"use strict";function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}n.d(t,{A:()=>i})},966(e,t,n){"use strict";function i(e){if(Array.isArray(e))return e}n.d(t,{A:()=>i})},159(e,t,n){"use strict";
2function i(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,{A:()=>i})},987(e,t,n){"use strict";n.d(t,{A:()=>o});var i=n(966),r=n(407),a=n(159);function o(e,t){return(0,i.A)(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,a,o,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=a.call(n)).done)&&(s.push(i.value),s.length!==t);l=!0);}catch(e){c=!0,r=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw r}}return s}}(e,t)||(0,r.A)(e,t)||(0,a.A)()}},407(e,t,n){"use strict";n.d(t,{A:()=>r});var i=n(137);function r(e,t){if(e){if("string"==typeof e)return(0,i.A)(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,i.A)(e,t):void 0}}},54(e){"use strict";e.exports=JSON.parse('[{"href":"#","text":"USER NAME","image":"","newTab":false,"noFollow":false,"useImage":false,"hasSubMenu":true,"subMenu":[{"href":"/account/","text":"Account","image":"","newTab":false,"noFollow":false,"useImage":false},{"href":"https://help.cbs.com/s/ ","text":"Help","image":"","newTab":true,"noFollow":true,"useImage":false},{"href":"/account/logout/","text":"Sign out","image":"","newTab":false,"noFollow":false,"useImage":false}]}]')},24(e){"use strict";e.exports=JSON.parse('[{"href":"/account/signin/","text":"SIGN IN","image":"","newTab":false,"noFollow":false,"useImage":false,"hasSubMenu":false}]')},313(e){"use strict";e.exports=JSON.parse('[{"text":"Site Navigation","image":"","newTab":"false","noFollow":"false","useImage":"false","subMenu":[{"href":"/shows/","text":"Shows","image":"","newTab":"false","noFollow":"false","useImage":"false","subMenu":[]},{"href":"/live-tv/stream/","text":"Live TV","image":"","newTab":"false","noFollow":"false","useImage":"false","subMenu":[]},{"href":"/schedule/","text":"Schedule","image":"","newTab":"false","noFollow":"false","useImage":"false","subMenu":[]},{"href":"/live-tv/stream/tveverywhere/","text":"TV Provider","image":"","newTab":"false","noFollow":"false","useImage":"false","subMenu":[]},{"href":"https://www.paramountplus.com/","text":"Paramount+","image":"","newTab":"false","noFollow":"false","useImage":"false","subMenu":[]},{"href":"https://www.cbsnews.com/?ftag=CNM-16-10abi1j","text":"CBS News","image":"","newTab":"true","noFollow":"false","useImage":"false","subMenu":[]},{"href":"https://www.cbssports.com/?ftag=CBS-16-10aeb5g","text":"CBS Sports","image":"","newTab":"true","noFollow":"false","useImage":"false","subMenu":[]},{"href":"https://www.paramountshop.com/pages/cbs?utm_source=CBS.com&utm_medium=referral&utm_campaign=nav&utm_term=&utm_content=footer","text":"Shop","image":"","newTab":"true","noFollow":"false","useImage":"false","subMenu":[]}]},{"text":"Privacy & Terms","image":"","newTab":"false","noFollow":"false","useImage":"false","subMenu":[{"href":"https://www.viacomcbs.legal/us/en/cbsi/terms-of-use","text":"Terms of Use","image":"","newTab":"true","noFollow":"false","useImage":"false","subMenu":[]},{"href":"https://privacy.paramount.com/en/policy?r=www.cbs.com","text":"Privacy Policy","image":"","newTab":"true","noFollow":"false","useImage":"false","subMenu":[]},{"href":"/","text":"Your Privacy Choices","image":"","newTab":"false","noFollow":"false","useImage":"false","subMenu":[]},{"href":"https://privacy.paramount.com/en/policy#additional-information-us-states","text":"California Notice","image":"","newTab":"true","noFollow":"false","useImage":"false","subMenu":[]}]},{"text":"Information","image":"","newTab":"false","noFollow":"false","useImage":"false","subMenu":[{"href":"https://help.cbs.com/s/","text":"Help/Contact Us","image":"","newTab":"true","noFollow":"false","useImage":"false","subMenu":[]},{"href":"/showfeedback/","text":"Show Feedback","image":"","newTab":"false","noFollow":"false","useImage":"false","subMenu":[]},{"href":"/casting/","text":"Casting","image":"","newTab":"false","noFollow":"false","useImage":"false","subMenu":[]},{"href":"/closed-captioning/","text":"Closed Captioning","image":"","newTab":"false","noFollow":"false","useImage":"false","subMenu":[]},{"href":"/video-description/","text":"Video Description","image":"","newTab":"false","noFollow":"false","useImage":"false","subMenu":[]},{"href":"http://www.tvguidelines.org/index.html","text":"Ratings Guidelines","image":"","newTab":"true","noFollow":"false","useImage":"false","subMenu":[]},{"href":"https://www.paramount.com/","text":"About Paramount","image":"","newTab":"true","noFollow":"false","useImage":"false","subMenu":[]},{"href":"https://careers.paramount.com/","text":"Careers","image":"","newTab":"true","noFollow":"false","useImage":"false","subMenu":[]},{"href":"https://help.paramountplus.com/s/article/PD-What-is-Paramount-s-anti-bias-policy-regarding-content","text":"Anti-Bias Statement","image":"","newTab":"true","noFollow":"false","useImage":"false","subMenu":[]}]},{"href":"/","text":"Follow Us","image":"","newTab":"false","noFollow":"false","useImage":"false","subMenu":[{"href":"https://www.facebook.com/CBS","text":"","image":"data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20xmlns%3Axlink%3D%22http%3A//www.w3.org/1999/xlink%22%20version%3D%221.1%22%20id%3D%22Capa_1%22%20x%3D%220px%22%20y%3D%220px%22%20width%3D%2220px%22%20height%3D%2220px%22%20viewBox%3D%220%200%2060.734%2060.733%22%20style%3D%22enable-background%3Anew%200%200%2060.734%2060.733%3B%22%20xml%3Aspace%3D%22preserve%22%3E%0A%3Cg%3E%0A%09%3Cpath%20d%3D%22M57.378%2C0.001H3.352C1.502%2C0.001%2C0%2C1.5%2C0%2C3.353v54.026c0%2C1.853%2C1.502%2C3.354%2C3.352%2C3.354h29.086V37.214h-7.914v-9.167h7.914%20%20%20v-6.76c0-7.843%2C4.789-12.116%2C11.787-12.116c3.355%2C0%2C6.232%2C0.251%2C7.071%2C0.36v8.198l-4.854%2C0.
2002c-3.805%2C0-4.539%2C1.809-4.539%2C4.462%20%20%20v5.851h9.078l-1.187%2C9.166h-7.892v23.52h15.475c1.852%2C0%2C3.355-1.503%2C3.355-3.351V3.351C60.731%2C1.5%2C59.23%2C0.001%2C57.378%2C0.001z%22%20fill%3D%22%23969696%22/%3E%0A%3C/g%3E%0A%3C/svg%3E%0A","newTab":"true","noFollow":"false","useImage":"true","subMenu":[]},{"href":"https://x.com/cbs","text":"","image":"data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2225px%22%20height%3D%2220px%22%20viewBox%3D%220%200%2010%208%22%20version%3D%221.1%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20xmlns%3Axlink%3D%22http%3A//www.w3.org/1999/xlink%22%3E%0A%20%20%20%20%3Cg%20id%3D%22Page-1%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%0A%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Twitter%22%20transform%3D%22translate%280.000000%2C%20-1.000000%29%22%20fill%3D%22%23969696%22%20fill-rule%3D%22nonzero%22%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22twitter%22%20transform%3D%22translate%280.000000%2C%201.000000%29%22%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M9.98041748%2C0.952683652%20C9.61168285%2C1.11221613%209.21794925%2C1.22089506%208.80338319%2C1.27051828%20C9.22586559%2C1.01994156%209.55085205%2C0.625006408%209.70459564%2C0.153790947%20C9.30836215%2C0.381401548%208.86921378%2C0.547085662%208.40173326%2C0.63936023%20C8.02841548%2C0.246065515%207.49635432%2C0%206.9055456%2C0%20C5.77350944%2C0%204.85563102%2C0.903470549%204.85563102%2C2.01650689%20C4.85563102%2C2.17644948%204.87438023%2C2.33024043%204.90854548%2C2.47746963%20C3.20444981%2C2.39831855%201.69409608%2C1.5928641%200.683304862%2C0.37524991%20C0.505395609%2C0.671348747%200.405816424%2C1.01543036%200.405816424%2C1.39027016%20C0.405816424%2C2.09155688%200.768301321%2C2.70795099%201.31744511%2C3.07007741%20C0.981209116%2C3.05941457%200.664972293%2C2.96837033%200.389150452%2C2.81745015%20L0.389150452%2C2.84246681%20C0.389150452%2C3.82057723%201.09453773%2C4.63628441%202.03324861%2C4.82206387%20C1.86117245%2C4.86758599%201.67951335%2C4.89219255%201.49327111%2C4.89219255%20C1.36244323%2C4.89219255%201.23703179%2C4.87988927%201.11162035%2C4.85692316%20C1.37452606%2C5.65786641%202.1303279%2C6.2418619%203.02987376%2C6.25826626%20C2.32990292%2C6.79920029%201.44285655%2C7.12154611%200.487479688%2C7.12154611%20C0.324986459%2C7.12154611%200.162909879%2C7.1121136%200%2C7.0940688%20C0.912045331%2C7.66576101%201.98658389%2C8%203.14861881%2C8%20C6.92096163%2C8%208.98129245%2C4.9258215%208.98129245%2C2.26421285%20C8.98129245%2C2.17850003%208.98129245%2C2.09196699%208.97504271%2C2.00584406%20C9.37544269%2C1.72327882%209.72501146%2C1.36607372%2010%2C0.960885836%20L9.98041748%2C0.952683652%20Z%22%20id%3D%22Shape%22%3E%3C/path%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3C/g%3E%0A%20%20%20%20%20%20%20%20%3C/g%3E%0A%20%20%20%20%3C/g%3E%0A%3C/svg%3E","newTab":"true","noFollow":"false","useImage":"true","subMenu":[]},{"href":"https://www.youtube.com/cbs","text":"","image":"data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2225px%22%20height%3D%2220px%22%20viewBox%3D%220%200%2010%208%22%20version%3D%221.1%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20xmlns%3Axlink%3D%22http%3A//www.w3.org/1999/xlink%22%3E%0A%20%20%20%20%3Cg%20id%3D%22Page-1%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%0A%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Youtube%22%20transform%3D%22translate%280.000000%2C%20-1.000000%29%22%20fill%3D%22%23969696%22%20fill-rule%3D%22nonzero%22%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22youtube%22%20transform%3D%22translate%280.000000%2C%201.000000%29%22%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M9.79122799%2C1.23528932%20C9.6733471%2C0.751795608%209.34328791%2C0.373983442%208.92090462%2C0.23904754%20C8.14144834%2C6.76869904e-06%205.00444943%2C6.76869904e-06%205.00444943%2C6.76869904e-06%20C5.00444943%2C6.76869904e-06%201.87537014%2C-0.00476450418%201.08799425%2C0.23904754%20C0.665610962%2C0.373983442%200.335551766%2C0.751795608%200.217670874%2C1.23528932%20C0.0699162221%2C2.14875455%20-0.00292752911%2C3.07602864
2%209.00302909e-05%2C4.00501322%20C-0.00235707429%2C4.93049236%200.0704842891%2C5.85422195%200.217670874%2C6.76424033%20C0.335551766%2C7.24773403%200.665610962%2C7.6255462%201.08799425%2C7.7604821%20C1.86661688%2C8%205.00444943%2C8%205.00444943%2C8%20C5.00444943%2C8%208.13311191%2C8%208.92090462%2C7.7604821%20C9.34328791%2C7.6255462%209.6733471%2C7.24773403%209.79122799%2C6.76424033%20C9.93533956%2C5.85389233%2010.0051108%2C4.93016541%209.99963876%2C4.00501322%20C10.0056812%2C3.0763568%209.93590767%2C2.14908539%209.79122799%2C1.23528932%20Z%20M4.0032441%2C5.71837731%20L4.0032441%2C2.28640073%20L6.61421422%2C4.00501322%20L4.0032441%2C5.71837731%20Z%22%20id%3D%22Shape%22%3E%3C/path%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3C/g%3E%0A%20%20%20%20%20%20%20%20%3C/g%3E%0A%20%20%20%20%3C/g%3E%0A%3C/svg%3E","newTab":"true","noFollow":"false","useImage":"true","subMenu":[]},{"href":"https://www.instagram.com/cbstv/","text":"","image":"data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2220px%22%20height%3D%2220px%22%20viewBox%3D%220%200%2010%2010%22%20version%3D%221.1%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20xmlns%3Axlink%3D%22http%3A//www.w3.org/1999/xlink%22%3E%0A%20%20%20%20%3Cg%20id%3D%22Page-1%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%0A%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Instagram%22%20fill%3D%22%23969696%22%20fill-rule%3D%22nonzero%22%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22instagram%22%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M5%2C0%20C3.64166667%2C0%203.47208333%2C0.00625%202.93875%2C0.03%20C2.40625%2C0.055%202.04375%2C0.13875%201.725%2C0.2625%20C1.39625%2C0.39%201.11708333%2C0.56125%200.839166667%2C0.839166667%20C0.56125%2C1.11708333%200.389583333%2C1.39583333%200.2625%2C1.725%20C0.13875%2C2.04375%200.0545833333%2C2.40625%200.03%2C2.93875%20C0.005%2C3.47208333%200%2C3.64166667%200%2C5%20C0%2C6.35833333%200.00625%2C6.52791667%200.03%2C7.06125%20C0.055%2C7.59333333%200.13875%2C7.95625%200.2625%2C8.275%20C0.39%2C8.60333333%200.56125%2C8.88291667%200.839166667%2C9.16083333%20C1.11708333%2C9.43833333%201.39583333%2C9.61041667%201.725%2C9.7375%20C2.04416667%2C9.86083333%202.40666667%2C9.94541667%202.93875%2C9.97%20C3.47208333%2C9.995%203.64166667%2C10%205%2C10%20C6.35833333%2C10%206.52791667%2C9.99375%207.06125%2C9.97%20C7.59333333%2C9.945%207.95625%2C9.86083333%208.275%2C9.7375%20C8.60333333%2C9.61%208.88291667%2C9.43833333%209.16083333%2C9.16083333%20C9.43833333%2C8.88291667%209.61041667%2C8.60458333%209.7375%2C8.275%20C9.86083333%2C7.95625%209.94541667%2C7.59333333%209.97%2C7.06125%20C9.995%2C6.52791667%2010%2C6.35833333%2010%2C5%20C10%2C3.64166667%209.99375%2C3.47208333%209.97%2C2.93875%20C9.945%2C2.40666667%209.86083333%2C2.04333333%209.7375%2C1.725%20C9.61%2C1.39625%209.43833333%2C1.11708333%209.16083333%2C0.839166667%20C8.88291667%2C0.56125%208.60458333%2C0.389583333%208.275%2C0.2625%20C7.95625%2C0.13875%207.59333333%2C0.0545833333%207.06125%2C0.03%20C6.52791667%2C0.005%206.35833333%2C0%205%2C0%20Z%20M5%2C0.9%20C6.33458333%2C0.9%206.49375%2C0.906666667%207.02083333%2C0.929583333%20C7.50833333%2C0.9525%207.77291667%2C1.03333333%207.94875%2C1.1025%20C8.18291667%2C1.19291667%208.34875%2C1.30125%208.52458333%2C1.47583333%20C8.69916667%2C1.65083333%208.8075%2C1.81708333%208.89791667%2C2.05125%20C8.96625%2C2.22708333%209.04791667%2C2.49166667%209.07%2C2.97916667%20C9.09375%2C3.50666667%209.09916667%2C3.665%209.09916667%2C5%20C9.09916667%2C6.335%209.09291667%2C6.49375%209.06833333%2C7.02083333%20C9.04291667%2C7.50833333%208.96166667%2C7.77291667%208.89291667%2C7.94875%20C8.79958333%2C8.18291667%208.69333333%2C8.34875%208.51833333%2C8.52458333%20C8.34375%2C8.69916667%208.175%2C8.8075%207.94333333%2C8.89791667%20C7.76833333%2C8.96625%207.49958333%2C9.04791667%207.01208333%2C9.07%20C6.48125%2C9.09375%206.325%2C9.09916667%204.9875%2C9.09916667%20C3.64958333%2C9.09916667%203.49333333%2C9.09291667%202.96291667%2C9.06833333%20C2.475%2C9.04291667%202.20625%2C8.96166667%202.03125%2C8.89291667%20C1.79416667%2C8.79958333%201.63125%2C8.69333333%201.45666667%2C8.51833333%2
20C1.28125%2C8.34375%201.16916667%2C8.175%201.08166667%2C7.94333333%20C1.01291667%2C7.76833333%200.932083333%2C7.49958333%200.906666667%2C7.01208333%20C0.887916667%2C6.48708333%200.88125%2C6.325%200.88125%2C4.99375%20C0.88125%2C3.66208333%200.887916667%2C3.49958333%200.906666667%2C2.96833333%20C0.932083333%2C2.48083333%201.01291667%2C2.2125%201.08166667%2C2.0375%20C1.16916667%2C1.8%201.28125%2C1.6375%201.45666667%2C1.46208333%20C1.63125%2C1.2875%201.79416667%2C1.175%202.03125%2C1.08791667%20C2.20625%2C1.01875%202.46916667%2C0.9375%202.95666667%2C0.9125%20C3.48791667%2C0.89375%203.64416667%2C0.8875%204.98125%2C0.8875%20L5%2C0.9%20Z%20M5%2C2.4325%20C3.58125%2C2.4325%202.4325%2C3.5825%202.4325%2C5%20C2.4325%2C6.41875%203.5825%2C7.5675%205%2C7.5675%20C6.41875%2C7.5675%207.5675%2C6.4175%207.5675%2C5%20C7.5675%2C3.58125%206.4175%2C2.4325%205%2C2.4325%20Z%20M5%2C6.66666667%20C4.07916667%2C6.66666667%203.33333333%2C5.92083333%203.33333333%2C5%20C3.33333333%2C4.07916667%204.07916667%2C3.33333333%205%2C3.33333333%20C5.92083333%2C3.33333333%206.66666667%2C4.07916667%206.66666667%2C5%20C6.66666667%2C5.92083333%205.92083333%2C6.66666667%205%2C6.66666667%20Z%20M8.26916667%2C2.33125%20C8.26916667%2C2.6625%208%2C2.93125%207.66916667%2C2.93125%20C7.33791667%2C2.93125%207.06916667%2C2.66208333%207.06916667%2C2.33125%20C7.06916667%2C2.00041667%207.33833333%2C1.73166667%207.66916667%2C1.73166667%20C7.99958333%2C1.73125%208.26916667%2C2.00041667%208.26916667%2C2.33125%20Z%22%20id%3D%22Shape%22%3E%3C/path%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3C/g%3E%0A%20%20%20%20%20%20%20%20%3C/g%3E%0A%20%20%20%20%3C/g%3E%0A%3C/svg%3E","newTab":"true","noFollow":"false","useImage":"true","subMenu":[]}]}]')},841(e){"use strict";e.exports=JSON.parse('[{"href":"/","text":"","image":"data:image/svg+xml;charset=utf-8,%3Csvg xmlns=\'http://www.w3.org/2000/svg\' width=\'85\' height=\'24\' fill=\'%23fff\'%3E%3Cpath d=\'M24.5 11.985q0 4.989-3.588 8.5-3.588 3.516-8.646 3.515-5.062 0-8.663-3.514Q0 16.974 0 11.985q0-4.957 3.603-8.47Q7.205 0 12.266 0q5.058 0 8.646 3.514 3.587 3.514 3.587 8.47m-.737.015q-1.444-3.111-4.459-5.063-3.176-2.105-7.054-2.106-3.88 0-7.088 2.106Q2.18 8.887.737 12q1.443 3.113 4.425 5.094 3.206 2.075 7.088 2.075 3.88 0 7.055-2.075 3.014-1.982 4.458-5.094m-4.997-.015q0 2.635-1.905 4.501t-4.596 1.867-4.595-1.867-1.906-4.501q0-2.636 1.906-4.487t4.595-1.851q2.691 0 4.596 1.851t1.906 4.487M26.681 12C26.681 5.803 31.9.69 38.7.69c6.167 0 9.33 4.339 9.33 4.339l-3.163 3.098S42.652 5.03 38.699 5.03s-7.116 3.098-7.116 6.97c0 3.874 3.163 6.972 7.116 6.972 4.111 0 6.326-3.098 6.326-3.098l3.163 3.098S45.025 23.31 38.7 23.31c-6.8 0-12.019-5.112-12.019-11.31M49.958 1.156h9.33c4.428 0 7.116 2.633 7.116 5.732 0 3.407-3.005 4.492-3.005 4.492s4.11 1.085 4.11 5.267c0 3.408-2.845 6.197-7.59 6.197h-9.963V1.156zm9.014 8.365c1.58 0 2.53-.929 2.53-2.168s-.948-2.168-2.53-2.168h-4.269v4.338h4.269zm.633 9.296c1.897 0 3.005-1.085 3.005-2.634s-1.108-2.633-3.005-2.633h-4.902v5.267zM68.08 19.902l3.162-3.099s1.898 2.324 5.219 2.324c2.53 0 3.638-1.084 3.638-2.478 0-3.719-11.07-2.014-11.07-9.605 0-3.408 3.005-6.352 8.064-6.352 4.902 0 7.432 2.944 7.432 2.944l-3.163 3.099s-1.58-1.86-4.111-1.86c-2.373 0-3.32.93-3.32 2.169C73.93 10.762 85 9.058 85 16.649c0 3.563-3.163 6.66-8.382 6.66-5.691 0-8.539-3.407-8.539-3.407\'/%3E%3C/svg%3E","newTab":false,"noFollow":false,"useImage":true,"hasSubMenu":false},{"href":"/shows","text":"Shows","image":"","newTab":false,"noFollow":false,"useImage":false,"hasSubMenu":false},{"href":"https://www.cbsnews.com/?ftag=CNM-16-10abi1j/","text":"CBS News","image":"","newTab":true,"noFollow":true,"useImage":false,"hasSubMenu":false},{"href":"https://www.cbssports.com/?ftag=CBS-16-10aeb5g/","text":"CBS Sports","image":"","newTab":true,"noFollow":true,"useImage":false,"hasSubMenu":false},{"href":"","text":"Live TV","image":"","newTab":false,"noFollow":false,"useImage":false,"hasSubMenu":true,"subMenu":[{"href":"/live-tv/stream/tveverywhere/","text":"CBS","image":"","newTab":false,"noFollow":false,"useImage":false},{"href":"/live-tv/stream/cbs-news/","text":"CBS News 24/7","image":"","newTab":false,"noFollow":false,"useImage":false},{"href":"/live-tv/stream/sports/","text":"CBS Sports HQ","image":"","newTab":false,"noFollow":false,"useImage":false},{"href":"/live-tv/stream/48-hours-channel/","text":"48 Hours","image":"","newTab":false,"noFollow":false,"useImage":false},{"href":"/live-tv/stream/golazo/","text":"CBS Sports Golazo Network","image":"","newTab":false,"noFollow":false,"useImage":false},{"href":"/live-tv/stream/inside-edition/","text":"Inside Edition","image":"","newTab":false,"noFollow":false,"useImage":false}
2,{"href":"/live-tv/stream/60-minutes-channel/","text":"60 Minutes","image":"","newTab":false,"noFollow":false,"useImage":false},{"href":"/live-tv/stream/etl/","text":"ET","image":"","newTab":false,"noFollow":false,"useImage":false},{"href":"/live-tv/stream/uefa-champions-league-channel/","text":"UEFA Champions League","image":"","newTab":false,"noFollow":false,"useImage":false},{"href":"/live-tv/stream/car-chase/","text":"Car Chase","image":"","newTab":false,"noFollow":false,"useImage":false}]},{"href":"/schedule/","text":"Schedule","image":"","newTab":false,"noFollow":false,"useImage":false,"hasSubMenu":false},{"href":"/live-tv/stream/tveverywhere/","text":"TV Provider","image":"","newTab":false,"noFollow":false,"useImage":false,"hasSubMenu":false},{"href":"/search/","text":"Search","image":"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMjBweCI gaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIHZlcnNpb249IjEuMSIgeG1sbnM9Im h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vc mcvMTk5OS94bGluayI+CiAgICAKICAgIDx0aXRsZT5JY29uIC8gU2VhcmNoPC90aXRsZT4KICAg IDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPgogICAgPGRlZnM+CiAgICAgICAgPHB hdGggZD0iTTguMDA0MzE0MDYsMTUuMDA4NjI4MSBDOS43MTI2ODMzNSwxNS4wMDg2MjgxIDExLj I2NTc0NjMsMTQuNDAyOTMzNiAxMi40NzcxMzU1LDEzLjM3NzkxMiBMMTcuOTEyODU1OSwxOC44M TM2MzI0IEMxOC4wMzcxMDA5LDE4LjkzNzg3NzUgMTguMTkyNDA3MiwxOSAxOC4zNjMyNDQyLDE5 IEMxOC41MzQwODExLDE5IDE4LjY4OTM4NzQsMTguOTM3ODc3NSAxOC44MTM2MzI0LDE4LjgxMzY zMjQgQzE5LjA2MjEyMjUsMTguNTY1MTQyNCAxOS4wNjIxMjI1LDE4LjE2MTM0NiAxOC44MTM2Mz I0LDE3LjkxMjg1NTkgTDEzLjM3NzkxMiwxMi40NzcxMzU1IEMxNC4zODc0MDI5LDExLjI2NTc0N jMgMTUuMDA4NjI4MSw5LjY5NzE1MjcyIDE1LjAwODYyODEsOC4wMDQzMTQwNiBDMTUuMDA4NjI4 MSw0LjEzNzE4NzIzIDExLjg3MTQ0MDksMSA4LjAwNDMxNDA2LDEgQzQuMTUyNzE3ODYsMSAxLDQ uMTUyNzE3ODYgMSw4LjAwNDMxNDA2IEMxLDExLjg3MTQ0MDkgNC4xNTI3MTc4NiwxNS4wMDg2Mj gxIDguMDA0MzE0MDYsMTUuMDA4NjI4MSBaIE04LjAwNDMxNDA2LDIuMjczNTExNjUgQzExLjE3M jU2MjYsMi4yNzM1MTE2NSAxMy43MzUxMTY1LDQuODUxNTk2MiAxMy43MzUxMTY1LDguMDA0MzE0 MDYgQzEzLjczNTExNjUsMTEuMTcyNTYyNiAxMS4xNzI1NjI2LDEzLjczNTExNjUgOC4wMDQzMTQ wNiwxMy43MzUxMTY1IEM0LjgzNjA2NTU3LDEzLjczNTExNjUgMi4yNzM1MTE2NSwxMS4xNTcwMz E5IDIuMjczNTExNjUsOC4wMDQzMTQwNiBDMi4yNzM1MTE2NSw0Ljg1MTU5NjIgNC44NTE1OTYyL DIuMjczNTExNjUgOC4wMDQzMTQwNiwyLjI3MzUxMTY1IFoiIGlkPSJwYXRoLTEiPjwvcGF0aD4K ICAgIDwvZGVmcz4KICAgIDxnIGlkPSJJY29uLS8tU2VhcmNoIiBzdHJva2U9Im5vbmUiIHN0cm9 rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgICAgICA8bW FzayBpZD0ibWFzay0yIiBmaWxsPSJ3aGl0ZSI+CiAgICAgICAgICAgIDx1c2UgeGxpbms6aHJlZ j0iI3BhdGgtMSI+PC91c2U+CiAgICAgICAgPC9tYXNrPgogICAgICAgIDx1c2UgaWQ9Ik1hc2si IGZpbGw9IiNGRkZGRkYiIGZpbGwtcnVsZT0ibm9uemVybyIgeGxpbms6aHJlZj0iI3BhdGgtMSI +PC91c2U+CiAgICA8L2c+Cjwvc3ZnPg==","newTab":false,"noFollow":false,"useImage":true,"hasSubMenu":false}]')}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var a=t[i]={exports:{}};return e[i](a,a.exports,n),a.exports}n.m=e,n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;n.t=function(i,r){if(1&r&&(i=this(i)),8&r)return i;if("object"==typeof i&&i){if(4&r&&i.__esModule)return i;if(16&r&&"function"==typeof i.then)return i}var a=Object.create(null);n.r(a);var o={};e=e||[null,t({}),t([]),t(t)];for(var s=2&r&&i;("object"==typeof s||"function"==typeof s)&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach(e=>o[e]=()=>i[e]);return o.default=()=>i,n.d(a,o),a}})(),n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce((t,i)=>(n.f[i](e,t),t),[])),n.u=e=>"static/js/"+e+"."+{242:"f9318a62",552:"bcc61f6d",590:"f33019ea",684:"82e58a48",722:"f2a3576b",814:"dc3de620",974:"edc1229c"}[e]+".chunk.js",n.miniCssF=e=>"static/css/"+e+".0f9fd390.chunk.css",n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={},t="@cbsdigital-tve/cbs-react-app:";n.l=(i,r,a,o)=>
2{if(e[i])e[i].push(r);else{var s,l;if(void 0!==a)for(var c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var d=c[u];if(d.getAttribute("src")==i||d.getAttribute("data-webpack")==t+a){s=d;break}}s||(l=!0,(s=document.createElement("script")).charset="utf-8",n.nc&&s.setAttribute("nonce",n.nc),s.setAttribute("data-webpack",t+a),s.src=i),e[i]=[r];var h=(t,n)=>{s.onerror=s.onload=null,clearTimeout(f);var r=e[i];if(delete e[i],s.parentNode&&s.parentNode.removeChild(s),r&&r.forEach(e=>e(n)),t)return t(n)},f=setTimeout(h.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=h.bind(null,s.onerror),s.onload=h.bind(null,s.onload),l&&document.head.appendChild(s)}}})(),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.p="/assets/web-components/",(()=>{if("undefined"!=typeof document){var e=e=>new Promise((t,i)=>{var r=n.miniCssF(e),a=n.p+r;if(((e,t)=>{for(var n=document.getElementsByTagName("link"),i=0;i<n.length;i++){var r=(o=n[i]).getAttribute("data-href")||o.getAttribute("href");if("stylesheet"===o.rel&&(r===e||r===t))return o}var a=document.getElementsByTagName("style");for(i=0;i<a.length;i++){var o;if((r=(o=a[i]).getAttribute("data-href"))===e||r===t)return o}})(r,a))return t();((e,t,i,r,a)=>{var o=document.createElement("link");o.rel="stylesheet",o.type="text/css",n.nc&&(o.nonce=n.nc),o.onerror=o.onload=n=>{if(o.onerror=o.onload=null,"load"===n.type)r();else{var i=n&&n.type,s=n&&n.target&&n.target.href||t,l=new Error("Loading CSS chunk "+e+" failed.\n("+i+": "+s+")");l.name="ChunkLoadError",l.code="CSS_CHUNK_LOAD_FAILED",l.type=i,l.request=s,o.parentNode&&o.parentNode.removeChild(o),a(l)}},o.href=t,document.head.appendChild(o)})(e,a,0,t,i)}),t={792:0};n.f.miniCss=(n,i)=>{t[n]?i.push(t[n]):0!==t[n]&&{722:1}[n]&&i.push(t[n]=e(n).then(()=>{t[n]=0},e=>{throw delete t[n],e}))}}})(),(()=>{var e={792:0};n.f.j=(t,i)=>{var r=n.o(e,t)?e[t]:void 0;if(0!==r)if(r)i.push(r[2]);else{var a=new Promise((n,i)=>r=e[t]=[n,i]);i.push(r[2]=a);var o=n.p+n.u(t),s=new Error;n.l(o,i=>{if(n.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var a=i&&("load"===i.type?"missing":i.type),o=i&&i.target&&i.target.src;s.message="Loading chunk "+t+" failed.\n("+a+": "+o+")",s.name="ChunkLoadError",s.type=a,s.request=o,r[1](s)}},"chunk-"+t,t)}};var t=(t,i)=>{var r,a,[o,s,l]=i,c=0;if(o.some(t=>0!==e[t])){for(r in s)n.o(s,r)&&(n.m[r]=s[r]);l&&l(n)}for(t&&t(i);c<o.length;c++)a=o[c],n.o(e,a)&&e[a]&&e[a][0](),e[a]=0},i=self.webpackChunk_cbsdigital_tve_cbs_react_app=self.webpackChunk_cbsdigital_tve_cbs_react_app||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})(),(()=>{"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(t){var n=function(t){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!=e(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==e(n)?n:n+""}function i(e,n,i){return(n=t(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach(function(t){i(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const o={stringify:e=>e.name,parse:(e,t,i)=>{const r=typeof window<"u"&&e in window?window[e]:typeof n.g<"u"&&e in n.g?n.g[e]:void 0;return"function"==typeof r?r.bind(i):void 0}},s={stringify:e=>JSON.stringify(e),parse:e=>JSON.parse(e)};function l(e){return e.replace(/([a-z0-9])([A-Z])/g,(e,t,n)=>"".concat(t,"-").concat(n.toLowerCase()))}const c=Symbol.for("r2wc.bound"),u={parse:(e,t,n)=>{const i=function(e){return e.replace(/[-:]([a-z])/g,(e,t)=>"".concat(t.toUpperCase()))}(t),r=n;if(typeof r<"u"&&i in r&&typeof r[i]<"u"){let e=r[i];return c in r[i]||(e=e.bind(r),Object.defineProperty(e,c,{value:!0})),e}}},d={string:{stringify:e=>e,parse:e=>e},number:{stringify:e=>"".concat(e),parse:e=>parseFloat(e)},boolean:{stringify:e=>e?"true":"false",parse:e=>/^[ty1-9]/i.test(e)},function:o,method:u,json:s},h=Symbol.for("r2wc.render"),f=Symbol.for("r2wc.connected"),p=Symbol.for("r2wc.context"),m=Symbol.for("r2wc.props");function g(e,t,n){return function(e,t,n){t.props||(t.props=e.propTypes?Object.keys(e.propTypes):[]),t.events||(t.events=[]);const r=Array.isArray(t.props)?t.props.slice():Object.keys(t.props),o=Array.isArray(t.events)?t.events.slice():Object.keys(t.events),s={},c={},u={},g={};for(const e of r){s[e]=Array.isArray(t.props)?"string":t.props[e];const n=l(e);u[e]=n,g[n]=e}for(const e of o)c[e]=Array.isArray(t.events)?{}:t.events[e];class v extends HTMLElement{static get observedAttributes(){return Object.keys(g)}constructor(){super(),i(this,f,!0),i(this,p,void 0),i(this,m,{}),i(this,"container",void 0),t.shadow?this.container=this.attachShadow({mode:t.shadow}):this.container=this,this[m].container=this.container;for(const e of r){const t=u[e],n=this.getAttribute(t),i=s[e],r=i?d[i]:null;(null==r?void 0:r.parse)&&(n||"method"===i)&&(this[m][e]=r.parse(n,t,this))}for(const e of o)this[m][e]=t=>{const n=e.replace(/^on/,"").toLowerCase();this.dispatchEvent(new CustomEvent(n,a({detail:t},c[e])))}}connectedCallback(){this[f]=!0,this[h]()}disconnectedCallback(){this[f]=!1,this[p]&&n.unmount(this[p]),delete this[p]}attributeChangedCallback(e,t,n){const i=g[e],r=s[i],a=r?d[r]:null;i in s&&(null==a?void 0:a.parse)&&(n||"method"===r)&&(this[m][i]=a.parse(n,e,this),this[h]())}[h](){this[f]&&(this[p]?n.update(this[p],this[m]):this[p]=n.mount(this.container,e,this[m]))}}for(const e of r){const t=u[e],n=s[e];Object.defineProperty(v.prototype,e,{enumerable:!0,configurable:!0,get(){return this[m][e]},set(i){this[m][e]=i;const r=n?d[n]:null;if(null!=r&&r.stringify){const e=r.stringify(i,t,this);this.getAttribute(t)!==e&&(null==e?this.removeAttribute(t):this.setAttribute(t,e))}else e in s&&null!=r&&r.parse&&(i||"method"===n)&&(this[m][e]=r.parse(i,t,this)),this[h]()}})}return v}(e,arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},{mount:function(e,i,r){const a=t.createElement(i,r);if("createRoot"in n){const t=n.createRoot(e);return t.render(a),{container:e,root:t,ReactComponent:i}}if("render"in n)return n.render(a,e),{container:e,ReactComponent:i};throw new Error("Invalid ReactDOM instance provided.")},unmount:function(e){let t=e.container,i=e.root;i?i.unmount():"unmountComponentAtNode"in n&&n.unmountComponentAtNode(t)},update:function(e,i){let r=e.container,a=e.root,o=e.ReactComponent;const s=t.createElement(o,i);a?a.render(s):"render"in n&&n.render(s,r)}})}var v=n(70),y=n.t(v,2),b=n(172),A=n.t(b,2);function E(e,t){if(null==e)return{};var n,i,r=function(e,t){if(null==e)return{};var n={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(-1!==t.indexOf(i))continue;n[i]=e[i]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var T=n(137),w=n(966),S=n(407),C=n(159);function k(e){return(0,w.A)(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||(0,S.A)(e)||(0,C.A)()}var x=n(987);const N=["page"],_=["page","matches"],I=["page","matches"],O=["onClick","discover","prefetch","relative","reloadDocument","replace","mask","state","target","to","preventScrollReset","viewTransition","defaultShouldRevalidate"],D=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],R=["discover","fetcherKey","navigate","reloadDocument","replace","state","method","action","onSubmit","relative","preventScrollReset","viewTransition","defaultShouldRevalidate"];var P="popstate";function L(e){return"object"==typeof e&&null!=e&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function M(){return function(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=i.window,o=void 0===r?document.defaultView:r,s=i.v5Compat,l=void 0!==s&&s,c=o.history,u="POP",d=null,h=f();function f(){return(c.state||{idx:null}).idx}function p(){u="POP";let e=f(),t=null==e?null:e-h;h=e,d&&d({action:u,location:g.location,delta:t})}function m(e){return function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n="http://localhost";"undefined"!=typeof window&&(n="null"!==window.location.origin?window.location.origin:window.location.href),F(n,"No window.location.(origin|href) available to create URL");let i="string"==typeof e?e:V(e);return i=i.replace(/ $/,"%20"),!t&&i.startsWith("//")&&(i=n+i),new URL(i,n)}(e)}null==h&&(h=0,c.replaceState(a(a({},c.state),{},{idx:h}),""));let g={get action(){return u},get location(){return e(o,c)},listen(e){if(d)throw new Error("A history only accepts one active listener");return o.addEventListener(P,p),d=e,()=>{o.removeEventListener(P,p),d=null}},createHref:e=>t(o,e),createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){u="PUSH";let i=L(e)?e:j(g.location,e,t);n&&n(i,e),h=f()+1;let r=B(i,h),a=g.createHref(i.mask||i);try{c.pushState(r,"",a)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;o.location.assign(a)}l&&d&&d({action:u,location:g.location,delta:1})},replace:function(e,t){u="REPLACE";let i=L(e)?e:j(g.location,e,t);n&&n(i,e),h=f();let r=B(i,h),a=g.createHref(i.mask||i);c.replaceState(r,"",a),l&&d&&d({action:u,location:g.location,delta:0})},go:e=>c.go(e)};return g}(function(e,t){var n;let i=null===(n=t.state)||void 0===n?void 0:n.masked,r=i||e.location;return j("",{pathname:r.pathname,search:r.search,hash:r.hash},t.state&&t.state.usr||null,t.state&&t.state.key||"default",i?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)},function(e,t){return"string"==typeof t?t:V(t)},null,arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}function F(e,t){if(!1===e||null==e)throw new Error(t)}function U(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function B(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function j(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0;return a(a({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?H(t):t),{},{state:n,key:t&&t.key||i||Math.random().toString(36).substring(2,10),mask:r})}function V(e){let t=e.pathname,n=void 0===t?"/":t,i=e.search,r=void 0===i?"":i,a=e.hash,o=void 0===a?"":a;return r&&"?"!==r&&(n+="?"===r.charAt(0)?r:"?"+r),o&&"#"!==o&&(n+="#"===o.charAt(0)?o:"#"+o),n}function H(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let i=e.indexOf("?");i>=0&&(t.search=e.substring(i),e=e.substring(0,i)),e&&(t.pathname=e)}return t}function z(e,t){return K(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:"/",!1)}function K(e,t,n,i,r){let a=ie(("string"==typeof t?H(t):t).pathname||"/",n);if(null==a)return null;let o=null!=r?r:function(e){let t=W(e);return function(e){e.sort((e,t)=>
2e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(t),t}(e),s=null,l=function(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return U(!1,'The URL path "'.concat(e,'" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (').concat(t,").")),e}}(a);for(let e=0;null==s&&e<o.length;++e)s=te(o[e],l,i);return s}function W(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",r=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=function(e,a){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:r,s=arguments.length>3?arguments[3]:void 0,l={relativePath:void 0===s?e.path||"":s,caseSensitive:!0===e.caseSensitive,childrenIndex:a,route:e};if(l.relativePath.startsWith("/")){if(!l.relativePath.startsWith(i)&&o)return;F(l.relativePath.startsWith(i),'Absolute route path "'.concat(l.relativePath,'" nested under path "').concat(i,'" is not valid. An absolute child route path must start with the combined path of all its parent routes.')),l.relativePath=l.relativePath.slice(i.length)}let c=ue([i,l.relativePath]),u=n.concat(l);e.children&&e.children.length>0&&(F(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'.concat(c,'".')),W(e.children,t,u,c,o)),(null!=e.path||e.index)&&t.push({path:c,score:ee(c,e.index),routesMeta:u})};return e.forEach((e,t)=>{var n;if(""!==e.path&&null!==(n=e.path)&&void 0!==n&&n.includes("?"))for(let n of G(e.path))a(e,t,!0,n);else a(e,t)}),t}function G(e){let t=e.split("/");if(0===t.length)return[];let n=k(t),i=n[0],r=(0,T.A)(n).slice(1),a=i.endsWith("?"),o=i.replace(/\?$/,"");if(0===r.length)return a?[o,""]:[o];let s=G(r.join("/")),l=[];return l.push(...s.map(e=>""===e?o:[o,e].join("/"))),a&&l.push(...s),l.map(t=>e.startsWith("/")&&""===t?"/":t)}new WeakMap;var q=/^:[\w-]+$/,Y=3,Q=2,X=1,Z=10,J=-2,$=e=>"*"===e;function ee(e,t){let n=e.split("/"),i=n.length;return n.some($)&&(i+=J),t&&(i+=Q),n.filter(e=>!$(e)).reduce((e,t)=>e+(q.test(t)?Y:""===t?X:Z),i)}function te(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=e.routesMeta,r={},a="/",o=[];for(let e=0;e<i.length;++e){let s=i[e],l=e===i.length-1,c="/"===a?t:t.slice(a.length)||"/",u=ne({path:s.relativePath,caseSensitive:s.caseSensitive,end:l},c),d=s.route;if(!u&&l&&n&&!i[i.length-1].route.index&&(u=ne({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},c)),!u)return null;
2Object.assign(r,u.params),o.push({params:r,pathname:ue([a,u.pathname]),pathnameBase:he(ue([a,u.pathnameBase])),route:d}),"/"!==u.pathnameBase&&(a=ue([a,u.pathnameBase]))}return o}function ne(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let n=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];U("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'.concat(e,'" will be treated as if it were "').concat(e.replace(/\*$/,"/*"),'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "').concat(e.replace(/\*$/,"/*"),'".'));let i=[],r="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,n,r,a)=>{if(i.push({paramName:t,isOptional:null!=n}),n){let t=a.charAt(r+e.length);return t&&"/"!==t?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(i.push({paramName:"*"}),r+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?r+="\\/*$":""!==e&&"/"!==e&&(r+="(?:(?=\\/|$))"),[new RegExp(r,t?void 0:"i"),i]}(e.path,e.caseSensitive,e.end),i=(0,x.A)(n,2),r=i[0],a=i[1],o=t.match(r);if(!o)return null;let s=o[0],l=s.replace(/(.)\/+$/,"$1"),c=o.slice(1),u=a.reduce((e,t,n)=>{let i=t.paramName,r=t.isOptional;if("*"===i){let e=c[n]||"";l=s.slice(0,s.length-e.length).replace(/(.)\/+$/,"$1")}const a=c[n];return e[i]=r&&!a?void 0:(a||"").replace(/%2F/g,"/"),e},{});return{params:u,pathname:s,pathnameBase:l,pattern:e}}function ie(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,i=e.charAt(n);return i&&"/"!==i?null:e.slice(n)||"/"}var re=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function ae(e,t){let n=de(t).split("/");return e.split("/").forEach(e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)}),n.length>1?n.join("/"):"/"}function oe(e,t,n,i){return"Cannot include a '".concat(e,"' character in a manually specified `to.").concat(t,"` field [").concat(JSON.stringify(i),"]. Please separate it out to the `to.").concat(n,'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.')}function se(e){let t=function(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function le(e,t,n){let i,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];"string"==typeof e?i=H(e):(i=a({},e),F(!i.pathname||!i.pathname.includes("?"),oe("?","pathname","search",i)),F(!i.pathname||!i.pathname.includes("#"),oe("#","pathname","hash",i)),F(!i.search||!i.search.includes("#"),oe("#","search","hash",i)));let o,s=""===e||""===i.pathname,l=s?"/":i.pathname;if(null==l)o=n;else{let e=t.length-1;if(!r&&l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}o=e>=0?t[e]:"/"}let c=function(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/",i="string"==typeof e?H(e):e,r=i.pathname,a=i.search,o=void 0===a?"":a,s=i.hash,l=void 0===s?"":s;return r?(r=ce(r),t=r.startsWith("/")?ae(r.substring(1),"/"):ae(r,n)):t=n,{pathname:t,search:fe(o),hash:pe(l)}}(i,o),u=l&&"/"!==l&&l.endsWith("/"),d=(s||"."===l)&&n.endsWith("/");return c.pathname.endsWith("/")||!u&&!d||(c.pathname+="/"),c}var ce=e=>e.replace(/\/\/+/g,"/"),ue=e=>ce(e.join("/")),de=e=>e.replace(/\/+$/,""),he=e=>de(e).replace(/^\/*/,"/"),fe=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",pe=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"",me=class{constructor(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];this.status=e,this.statusText=t||"",this.internal=i,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function ge(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}function ve(e){let t=e.map(e=>e.route.path).filter(Boolean);return ue(t)||"/"}var ye="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function be(e,t){let n=e;if("string"!=typeof n||!re.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let i=n,r=!1;if(ye)try{let e=new URL(window.location.href),i=n.startsWith("//")?new URL(e.protocol+n):new URL(n),a=ie(i.pathname,t);i.origin===e.origin&&null!=a?n=a+i.search+i.hash:r=!0}catch(e){U(!1,'<Link to="'.concat(n,'">
2 contains an invalid URL which will probably break when clicked - please update to a valid URL path.'))}return{absoluteURL:i,isExternal:r,to:n}}Symbol("Uninstrumented"),Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Ae=["POST","PUT","PATCH","DELETE"],Ee=(new Set(Ae),["GET",...Ae]);new Set(Ee),Symbol("ResetLoaderData"),new WeakMap,new WeakMap,new WeakMap,new WeakMap;var Te=v.createContext(null);Te.displayName="DataRouter";var we=v.createContext(null);we.displayName="DataRouterState";var Se=v.createContext(!1);function Ce(){return v.useContext(Se)}var ke=v.createContext({isTransitioning:!1});ke.displayName="ViewTransition",v.createContext(new Map).displayName="Fetchers",v.createContext(null).displayName="Await";var xe=v.createContext(null);xe.displayName="Navigation";var Ne=v.createContext(null);Ne.displayName="Location";var _e=v.createContext({outlet:null,matches:[],isDataRoute:!1});_e.displayName="Route";var Ie=v.createContext(null);Ie.displayName="RouteError";var Oe="REACT_ROUTER_ERROR";function De(){return null!=v.useContext(Ne)}function Re(){return F(De(),"useLocation() may be used only in the context of a <Router> component."),v.useContext(Ne).location}var Pe="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Le(e){v.useContext(xe).static||v.useLayoutEffect(e)}function Me(){return v.useContext(_e).isDataRoute?function(){let e=function(e){let t=v.useContext(Te);return F(t,We(e)),t}("useNavigate").router,t=Ge("useNavigate"),n=v.useRef(!1);Le(()=>{n.current=!0});let i=v.useCallback(async function(i){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};U(n.current,Pe),n.current&&("number"==typeof i?await e.navigate(i):await e.navigate(i,a({fromRouteId:t},r)))},[e,t]);return i}():function(){F(De(),"useNavigate() may be used only in the context of a <Router> component.");let e=v.useContext(Te),t=v.useContext(xe),n=t.basename,i=t.navigator,r=v.useContext(_e).matches,a=Re().pathname,o=JSON.stringify(se(r)),s=v.useRef(!1);Le(()=>{s.current=!0});let l=v.useCallback(function(t){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(U(s.current,Pe),!s.current)return;if("number"==typeof t)return void i.go(t);let l=le(t,JSON.parse(o),a,"path"===r.relative);null==e&&"/"!==n&&(l.pathname="/"===l.pathname?n:ue([n,l.pathname])),(r.replace?i.replace:i.push)(l,r.state,r)},[n,i,o,a,e]);return l}()}function Fe(){var e;let t=v.useContext(_e).matches,n=t[t.length-1];return null!==(e=null==n?void 0:n.params)&&void 0!==e?e:{}}function Ue(e){let t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).relative,n=v.useContext(_e).matches,i=Re().pathname,r=JSON.stringify(se(n));return v.useMemo(()=>le(e,JSON.parse(r),i,"path"===t),[e,r,i,t])}function Be(e,t,n){F(De(),"useRoutes() may be used only in the context of a <Router> component.");let i=v.useContext(xe).navigator,r=v.useContext(_e).matches,o=r[r.length-1],s=o?o.params:{},l=o?o.pathname:"/",c=o?o.pathnameBase:"/",u=o&&o.route;{let e=u&&u.path||"";Ye(l,!u||e.endsWith("*")||e.endsWith("*?"),'You rendered descendant <Routes> (or called `useRoutes()`) at "'.concat(l,'" (under <Route path="').concat(e,'">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won\'t match anymore and therefore the child routes will never render.\n\nPlease change the parent <Route path="').concat(e,'"> to <Route path="').concat("/"===e?"*":"".concat(e,"/*"),'">.'))}let d,h=Re();if(t){var f;let e="string"==typeof t?H(t):t;F("/"===c||(null===(f=e.pathname)||void 0===f?void 0:f.startsWith(c)),'When overriding the location using `<Routes location>` or `useRoutes(routes, location)`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "'.concat(c,'" but pathname "').concat(e.pathname,'" was given in the `location` prop.')),d=e}else d=h;let p=d.pathname||"/",m=p;if("/"!==c){let e=c.replace(/^\//,"").split("/");m="/"+p.replace(/^\//,"").split("/").slice(e.length).join("/")}let g=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):z(e,{pathname:m});U(u||null!=g,'No routes matched location "'.concat(d.pathname).concat(d.search).concat(d.hash,'" ')),U(null==g||void 0!==g[g.length-1].route.element||void 0!==g[g.length-1].route.Component||void 0!==g[g.length-1].route.lazy,'Matched leaf route at location "'.concat(d.pathname).concat(d.search).concat(d.hash,'" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.'));let y=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0,i=null==n?void 0:n.state;if(null==e){if(!i)return null;if(i.errors)e=i.matches;else{if(0!==t.length||i.initialized||!(i.matches.length>0))return null;e=i.matches}}let r=e,a=null==i?void 0:i.errors;if(null!=a){let e=r.findIndex(e=>e.route.id&&void 0!==(null==a?void 0:a[e.route.id]));F(e>=0,"Could not find a matching route for errors on route IDs: ".concat(Object.keys(a).join(","))),r=r.slice(0,Math.min(r.length,e+1))}let o=!1,s=-1;if(n&&i){o=i.renderFallback;for(let e=0;e<r.length;e++){let t=r[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let e=i.loaderData,a=i.errors,l=t.route.loader&&!e.hasOwnProperty(t.route.id)&&
2(!a||void 0===a[t.route.id]);if(t.route.lazy||l){n.isStatic&&(o=!0),r=s>=0?r.slice(0,s+1):[r[0]];break}}}}let l=null==n?void 0:n.onError,c=i&&l?(e,t)=>{var n,r;l(e,{location:i.location,params:null!==(n=null===(r=i.matches)||void 0===r||null===(r=r[0])||void 0===r?void 0:r.params)&&void 0!==n?n:{},pattern:ve(i.matches),errorInfo:t})}:void 0;return r.reduceRight((e,n,l)=>{let u,d=!1,h=null,f=null;i&&(u=a&&n.route.id?a[n.route.id]:void 0,h=n.route.errorElement||je,o&&(s<0&&0===l?(Ye("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,f=null):s===l&&(d=!0,f=n.route.hydrateFallbackElement||null)));let p=t.concat(r.slice(0,l+1)),m=()=>{let t;return t=u?h:d?f:n.route.Component?v.createElement(n.route.Component,null):n.route.element?n.route.element:e,v.createElement(Ke,{match:n,routeContext:{outlet:e,matches:p,isDataRoute:null!=i},children:t})};return i&&(n.route.ErrorBoundary||n.route.errorElement||0===l)?v.createElement(Ve,{location:i.location,revalidation:i.revalidation,component:h,error:u,children:m(),routeContext:{outlet:null,matches:p,isDataRoute:!0},onError:c}):m()},null)}(g&&g.map(e=>Object.assign({},e,{params:Object.assign({},s,e.params),pathname:ue([c,i.encodeLocation?i.encodeLocation(e.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?c:ue([c,i.encodeLocation?i.encodeLocation(e.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathnameBase])})),r,n);return t&&y?v.createElement(Ne.Provider,{value:{location:a({pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0},d),navigationType:"POP"}},y):y}v.createContext(null);var je=v.createElement(function(){let e=function(){var e;let t=v.useContext(Ie),n=function(e){let t=v.useContext(we);return F(t,We(e)),t}("useRouteError"),i=Ge("useRouteError");return void 0!==t?t:null===(e=n.errors)||void 0===e?void 0:e[i]}(),t=ge(e)?"".concat(e.status," ").concat(e.statusText):e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i="rgba(200,200,200, 0.5)",r={padding:"0.5rem",backgroundColor:i},a={padding:"2px 4px",backgroundColor:i},o=null;return console.error("Error handled by React Router default ErrorBoundary:",e),o=v.createElement(v.Fragment,null,v.createElement("p",null,"ð¿ Hey developer ð"),v.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",v.createElement("code",{style:a},"ErrorBoundary")," or"," ",v.createElement("code",{style:a},"errorElement")," prop on your route.")),v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},t),n?v.createElement("pre",{style:r},n):null,o)},null),Ve=class extends v.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&"object"==typeof e&&e&&"digest"in e&&"string"==typeof e.digest){const t=function(e){if(e.startsWith("".concat(Oe,":").concat("ROUTE_ERROR_RESPONSE",":{")))try{let t=JSON.parse(e.slice(40));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText)return new me(t.status,t.statusText,t.data)}catch(e){}}(e.digest);t&&(e=t)}let t=void 0!==e?v.createElement(_e.Provider,{value:this.props.routeContext},v.createElement(Ie.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?v.createElement(ze,{error:e},t):t}};Ve.contextType=Se;var He=new WeakMap;function ze(e){let t=e.children,n=e.error,i=v.useContext(xe).basename;if("object"==typeof n&&n&&"digest"in n&&"string"==typeof n.digest){let e=function(e){if(e.startsWith("".concat(Oe,":").concat("REDIRECT",":{")))try{let t=JSON.parse(e.slice(28));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"string"==typeof t.location&&"boolean"==typeof t.reloadDocument&&"boolean"==typeof t.replace)return t}catch(e){}}(n.digest);if(e){let t=He.get(n);if(t)throw t;let r=be(e.location,i);if(ye&&!He.get(n)){if(!r.isExternal&&!e.reloadDocument){const t=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(r.to,{replace:e.replace}));throw He.set(n,t),t}window.location.href=r.absoluteURL||r.to}return v.createElement("meta",{httpEquiv:"refresh",content:"0;url=".concat(r.absoluteURL||r.to)})}}return t}function Ke(e){let t=e.routeContext,n=e.match,i=e.children,r=v.useContext(Te);return r&&r.static&&r.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=n.route.id),v.createElement(_e.Provider,{value:t},i)}function We(e){return"".concat(e," must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.")}function Ge(e){let t=function(e){let t=v.useContext(_e);return F(t,We(e)),t}(e),n=t.matches[t.matches.length-1];return F(n.route.id,"".concat(e,' can only be used on routes that contain a unique "id"')),n.route.id}var qe={};function Ye(e,t,n){t||qe[e]||(qe[e]=!0,U(!1,n))}function Qe(e){F(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Xe(e){let t=e.basename,n=void 0===t?"/":t,i=e.children,r=void 0===i?null:i,a=e.location,o=e.navigationType,s=void 0===o?"POP":o,l=e.navigator,c=e.static,u=void 0!==c&&c,d=e.useTransitions;F(!De(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let h=n.replace(/^\/*/,"/"),f=v.useMemo(()=>({basename:h,navigator:l,static:u,useTransitions:d,future:{}}),[h,l,u,d]);"string"==typeof a&&(a=H(a));let p=a,m=p.pathname,g=void 0===m?"/":m,y=p.search,b=void 0===y?""
2:y,A=p.hash,E=void 0===A?"":A,T=p.state,w=void 0===T?null:T,S=p.key,C=void 0===S?"default":S,k=p.mask,x=v.useMemo(()=>{let e=ie(g,h);return null==e?null:{location:{pathname:e,search:b,hash:E,state:w,key:C,mask:k},navigationType:s}},[h,g,b,E,w,C,s,k]);return U(null!=x,'<Router basename="'.concat(h,'"> is not able to match the URL "').concat(g).concat(b).concat(E,"\" because it does not start with the basename, so the <Router> won't render anything.")),null==x?null:v.createElement(xe.Provider,{value:f},v.createElement(Ne.Provider,{children:r,value:x}))}function Ze(e){let t=e.children,n=e.location;return Be(Je(t),n)}function Je(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[];return v.Children.forEach(e,(e,i)=>{if(!v.isValidElement(e))return;let r=[...t,i];if(e.type===v.Fragment)return void n.push.apply(n,Je(e.props.children,r));F(e.type===Qe,"[".concat("string"==typeof e.type?e.type:e.type.name,"] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>")),F(!e.props.index||!e.props.children,"An index route cannot have child routes.");let a={id:e.props.id||r.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:!0===e.props.hasErrorBoundary||null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=Je(e.props.children,r)),n.push(a)}),n}y.useOptimistic,v.memo(function(e){let t=e.routes,n=e.manifest,i=e.future;return Be(t,void 0,{manifest:n,state:e.state,isStatic:e.isStatic,onError:e.onError,future:i})}),v.Component;var $e="get",et="application/x-www-form-urlencoded";function tt(e){return"undefined"!=typeof HTMLElement&&e instanceof HTMLElement}var nt=null,it=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function rt(e){return null==e||it.has(e)?e:(U(!1,'"'.concat(e,'" is not a valid `encType` for `<Form>`/`<fetcher.Form>` and will default to "').concat(et,'"')),null)}function at(e,t){if(!1===e||null==e)throw new Error(t)}function ot(e,t,n,i){let r="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return n?r.pathname.endsWith("/")?r.pathname="".concat(r.pathname,"_.").concat(i):r.pathname="".concat(r.pathname,".").concat(i):"/"===r.pathname?r.pathname="_root.".concat(i):t&&"/"===ie(r.pathname,t)?r.pathname="".concat(de(t),"/_root.").concat(i):r.pathname="".concat(de(r.pathname),".").concat(i),r}function st(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}function lt(e,t,n,i,r,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>{var i;return n[t].pathname!==e.pathname||(null===(i=n[t].route.path)||void 0===i?void 0:i.endsWith("*"))&&n[t].params["*"]!==e.params["*"]};return"assets"===a?t.filter((e,t)=>o(e,t)||s(e,t)):"data"===a?t.filter((t,a)=>{let l=i.routes[t.route.id];if(!l||!l.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){var c;let i=t.route.shouldRevalidate({currentUrl:new URL(r.pathname+r.search+r.hash,window.origin),currentParams:(null===(c=n[0])||void 0===c?void 0:c.params)||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof i)return i}return!0}):[]}function ct(e,t){let n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).includeHydrateFallback;return i=e.map(e=>{let i=t.routes[e.route.id];if(!i)return[];let r=[i.module];return i.clientActionModule&&(r=r.concat(i.clientActionModule)),i.clientLoaderModule&&(r=r.concat(i.clientLoaderModule)),n&&i.hydrateFallbackModule&&(r=r.concat(i.hydrateFallbackModule)),i.imports&&(r=r.concat(i.imports)),r}).flat(1),[...new Set(i)];var i}function ut(){let e=v.useContext(Te);return at(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function dt(){let e=v.useContext(we);return at(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}Object.getOwnPropertyNames(Object.prototype).sort().join("\0"),"undefined"!=typeof window?window:"undefined"!=typeof globalThis&&globalThis,Symbol("SingleFetchRedirect");var ht=v.createContext(void 0);function ft(){let e=v.useContext(ht);return at(e,"You must render this element inside a <HydratedRouter> element"),e}function pt(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function mt(e){let t=e.page,n=E(e,N),i=Ce(),r=ut().router,o=v.useMemo(()=>z(r.routes,t,r.basename),[r.routes,t,r.basename]);return o?i?v.createElement(vt,a({page:t,matches:o},n)):v.createElement(yt,a({page:t,matches:o},n)):null}function gt(e){let t=ft(),n=t.manifest,i=t.routeModules,r=v.useState([]),o=(0,x.A)(r,2),s=o[0],l=o[1];return v.useEffect(()=>{let t=!1;return async function(e,t,n){let i=await Promise.all(e.map(async e=>{let i=t.routes[e.route.id];if(i){let e=await async function(e,t){if(e.id in t)return t[e.id];try{let n=await(import(e.module));return t[e.id]=n,n}catch(t){return console.error("Error loading route module `".concat(e.module,"`, reloading page...")),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.
2isSpaMode,window.location.reload(),new Promise(()=>{})}}(i,n);return e.links?e.links():[]}return[]}));return function(e,t){let n=new Set,i=new Set(t);return e.reduce((e,r)=>{if(t&&!function(e){return null!=e&&"string"==typeof e.page}(r)&&"script"===r.as&&r.href&&i.has(r.href))return e;let a=JSON.stringify(function(e){let t={},n=Object.keys(e).sort();for(let i of n)t[i]=e[i];return t}(r));return n.has(a)||(n.add(a),e.push({key:a,link:r})),e},[])}(i.flat(1).filter(st).filter(e=>"stylesheet"===e.rel||"preload"===e.rel).map(e=>"stylesheet"===e.rel?a(a({},e),{},{rel:"prefetch",as:"style"}):a(a({},e),{},{rel:"prefetch"})))}(e,n,i).then(e=>{t||l(e)}),()=>{t=!0}},[e,n,i]),s}function vt(e){let t=e.page,n=e.matches,i=E(e,_),r=Re(),o=ft().future,s=ut().basename,l=v.useMemo(()=>{if(t===r.pathname+r.search+r.hash)return[];let e=ot(t,s,o.unstable_trailingSlashAwareDataRequests,"rsc"),i=!1,a=[];for(let e of n)"function"==typeof e.route.shouldRevalidate?i=!0:a.push(e.route.id);return i&&a.length>0&&e.searchParams.set("_routes",a.join(",")),[e.pathname+e.search]},[s,o.unstable_trailingSlashAwareDataRequests,t,r,n]);return v.createElement(v.Fragment,null,l.map(e=>v.createElement("link",a({key:e,rel:"prefetch",as:"fetch",href:e},i))))}function yt(e){let t=e.page,n=e.matches,i=E(e,I),r=Re(),o=ft(),s=o.future,l=o.manifest,c=o.routeModules,u=ut().basename,d=dt(),h=d.loaderData,f=d.matches,p=v.useMemo(()=>lt(t,n,f,l,r,"data"),[t,n,f,l,r]),m=v.useMemo(()=>lt(t,n,f,l,r,"assets"),[t,n,f,l,r]),g=v.useMemo(()=>{if(t===r.pathname+r.search+r.hash)return[];let e=new Set,i=!1;if(n.forEach(t=>{var n;let r=l.routes[t.route.id];r&&r.hasLoader&&(!p.some(e=>e.route.id===t.route.id)&&t.route.id in h&&null!==(n=c[t.route.id])&&void 0!==n&&n.shouldRevalidate||r.hasClientLoader?i=!0:e.add(t.route.id))}),0===e.size)return[];let a=ot(t,u,s.unstable_trailingSlashAwareDataRequests,"data");return i&&e.size>0&&a.searchParams.set("_routes",n.filter(t=>e.has(t.route.id)).map(e=>e.route.id).join(",")),[a.pathname+a.search]},[u,s.unstable_trailingSlashAwareDataRequests,h,r,l,p,n,t,c]),y=v.useMemo(()=>ct(m,l),[m,l]),b=gt(m);return v.createElement(v.Fragment,null,g.map(e=>v.createElement("link",a({key:e,rel:"prefetch",as:"fetch",href:e},i))),y.map(e=>v.createElement("link",a({key:e,rel:"modulepreload",href:e},i))),b.map(e=>{var t;let n=e.key,r=e.link;return v.createElement("link",a(a({key:n,nonce:i.nonce},r),{},{crossOrigin:null!==(t=r.crossOrigin)&&void 0!==t?t:i.crossOrigin}))}))}ht.displayName="FrameworkContext";function bt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return e=>{t.forEach(t=>{"function"==typeof t?t(e):null!=t&&(t.current=e)})}}v.Component;var At="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{At&&(window.__reactRouterVersion="7.15.0")}catch(e){}function Et(e){let t=e.basename,n=e.children,i=e.useTransitions,r=e.window,a=v.useRef();null==a.current&&(a.current=M({window:r,v5Compat:!0}));let o=a.current,s=v.useState({action:o.action,location:o.location}),l=(0,x.A)(s,2),c=l[0],u=l[1],d=v.useCallback(e=>{!1===i?u(e):v.startTransition(()=>u(e))},[i]);return v.useLayoutEffect(()=>o.listen(d),[o,d]),v.createElement(Xe,{basename:t,children:n,location:c.location,navigationType:c.action,navigator:o,useTransitions:i})}var Tt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,wt=v.forwardRef(function(e,t){let n=e.onClick,i=e.discover,r=void 0===i?"render":i,o=e.prefetch,s=void 0===o?"none":o,l=e.relative,c=e.reloadDocument,u=e.replace,d=e.mask,h=e.state,f=e.target,p=e.to,m=e.preventScrollReset,g=e.viewTransition,y=e.defaultShouldRevalidate,b=E(e,O),A=v.useContext(xe),T=A.basename,w=A.navigator,S=A.useTransitions,C="string"==typeof p&&Tt.test(p),k=be(p,T);p=k.to;let N=function(e){let t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).relative;F(De(),"useHref() may be used only in the context of a <Router> component.");let n=v.useContext(xe),i=n.basename,r=n.navigator,a=Ue(e,{relative:t}),o=a.hash,s=a.pathname,l=a.search,c=s;return"/"!==i&&(c="/"===s?i:ue([i,s])),r.createHref({pathname:c,search:l,hash:o})}(p,{relative:l}),_=Re(),I=null;if(d){let e=le(d,[],_.mask?_.mask.pathname:"/",!0);"/"!==T&&(e.pathname="/"===e.pathname?T:ue([T,e.pathname])),I=w.createHref(e)}let D=function(e,t){let n=v.useContext(ht),i=v.useState(!1),r=(0,x.A)(i,2),a=r[0],o=r[1],s=v.useState(!1),l=(0,x.A)(s,2),c=l[0],u=l[1],d=t.onFocus,h=t.onBlur,f=t.onMouseEnter,p=t.onMouseLeave,m=t.onTouchStart,g=v.useRef(null);v.useEffect(()=>{if("render"===e&&u(!0),"viewport"===e){let e=new IntersectionObserver(e=>
2{e.forEach(e=>{u(e.isIntersecting)})},{threshold:.5});return g.current&&e.observe(g.current),()=>{e.disconnect()}}},[e]),v.useEffect(()=>{if(a){let e=setTimeout(()=>{u(!0)},100);return()=>{clearTimeout(e)}}},[a]);let y=()=>{o(!0)},b=()=>{o(!1),u(!1)};return n?"intent"!==e?[c,g,{}]:[c,g,{onFocus:pt(d,y),onBlur:pt(h,b),onMouseEnter:pt(f,y),onMouseLeave:pt(p,b),onTouchStart:pt(m,y)}]:[!1,g,{}]}(s,b),R=(0,x.A)(D,3),P=R[0],L=R[1],M=R[2],U=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.target,i=t.replace,r=t.mask,a=t.state,o=t.preventScrollReset,s=t.relative,l=t.viewTransition,c=t.defaultShouldRevalidate,u=t.useTransitions,d=Me(),h=Re(),f=Ue(e,{relative:s});return v.useCallback(t=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(t,n)){t.preventDefault();let n=void 0!==i?i:V(h)===V(f),p=()=>d(e,{replace:n,mask:r,state:a,preventScrollReset:o,relative:s,viewTransition:l,defaultShouldRevalidate:c});u?v.startTransition(()=>p()):p()}},[h,d,f,i,r,a,n,e,o,s,l,c,u])}(p,{replace:u,mask:d,state:h,target:f,preventScrollReset:m,relative:l,viewTransition:g,defaultShouldRevalidate:y,useTransitions:S}),B=!(k.isExternal||c),j=v.createElement("a",a(a(a({},b),M),{},{href:(B?I:void 0)||k.absoluteURL||N,onClick:B?function(e){n&&n(e),e.defaultPrevented||U(e)}:n,ref:bt(t,L),target:f,"data-discover":C||"render"!==r?void 0:"true"}));return P&&!C?v.createElement(v.Fragment,null,j,v.createElement(mt,{page:N})):j});wt.displayName="Link",v.forwardRef(function(e,t){let n=e["aria-current"],i=void 0===n?"page":n,r=e.caseSensitive,o=void 0!==r&&r,s=e.className,l=void 0===s?"":s,c=e.end,u=void 0!==c&&c,d=e.style,h=e.to,f=e.viewTransition,p=e.children,m=E(e,D),g=Ue(h,{relative:m.relative}),y=Re(),b=v.useContext(we),A=v.useContext(xe),T=A.navigator,w=A.basename,S=null!=b&&function(e){let t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).relative,n=v.useContext(ke);F(null!=n,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let i=Ct("useViewTransitionState").basename,r=Ue(e,{relative:t});if(!n.isTransitioning)return!1;let a=ie(n.currentLocation.pathname,i)||n.currentLocation.pathname,o=ie(n.nextLocation.pathname,i)||n.nextLocation.pathname;return null!=ne(r.pathname,o)||null!=ne(r.pathname,a)}(g)&&!0===f,C=T.encodeLocation?T.encodeLocation(g).pathname:g.pathname,k=y.pathname,x=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;o||(k=k.toLowerCase(),x=x?x.toLowerCase():null,C=C.toLowerCase()),x&&w&&(x=ie(x,w)||x);const N="/"!==C&&C.endsWith("/")?C.length-1:C.length;let _,I=k===C||!u&&k.startsWith(C)&&"/"===k.charAt(N),O=null!=x&&(x===C||!u&&x.startsWith(C)&&"/"===x.charAt(C.length)),R={isActive:I,isPending:O,isTransitioning:S},P=I?i:void 0;_="function"==typeof l?l(R):[l,I?"active":null,O?"pending":null,S?"transitioning":null].filter(Boolean).join(" ");let L="function"==typeof d?d(R):d;return v.createElement(wt,a(a({},m),{},{"aria-current":P,className:_,ref:t,style:L,to:h,viewTransition:f}),"function"==typeof p?p(R):p)}).displayName="NavLink";var St=v.forwardRef((e,t)=>{let n=e.discover,i=void 0===n?"render":n,r=e.fetcherKey,o=e.navigate,s=e.reloadDocument,l=e.replace,c=e.state,u=e.method,d=void 0===u?$e:u,h=e.action,f=e.onSubmit,p=e.relative,m=e.preventScrollReset,g=e.viewTransition,y=e.defaultShouldRevalidate,b=E(e,R),A=v.useContext(xe).useTransitions,T=function(){let e=Ct("useSubmit").router,t=v.useContext(xe).basename,n=Ge("useRouteId"),i=e.fetch,r=e.navigate;return v.useCallback(async function(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=function(e,t){let n,i,r,a,o;if(tt(s=e)&&"form"===s.tagName.toLowerCase()){let o=e.getAttribute("action");i=o?ie(o,t):null,n=e.getAttribute("method")||$e,r=rt(e.getAttribute("enctype"))||et,a=new FormData(e)}else if(function(e){return tt(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return tt(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let o=e.form;if(null==o)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||o.getAttribute("action");if(i=s?ie(s,t):null,n=e.getAttribute("formmethod")||o.getAttribute("method")||$e,r=rt(e.getAttribute("formenctype"))||rt(o.getAttribute("enctype"))||et,a=new FormData(o,e),!function(){if(null===nt)try{new FormData(document.createElement("form"),0),nt=!1}catch(e){nt=!0}return nt}()){let t=e.name,n=e.type,i=e.value;if("image"===n){let e=t?"".concat(t,"."):"";a.append("".concat(e,"x"),"0"),a.append("".concat(e,"y"),"0")}else t&&a.append(t,i)}}else{if(tt(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=$e,i=null,r=et,o=e}var s;return a&&"text/plain"===r&&(o=a,a=void 0),{action:i,method:n.toLowerCase(),encType:r,formData:a,body:o}}(e,t),s=o.action,l=o.method,c=o.encType,u=o.formData,d=o.body;if(!1===a.navigate){let e=a.fetcherKey||xt();await i(e,n,a.action||s,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:u,body:d,formMethod:a.method||l,formEncType:a.encType||c,flushSync:a.flushSync})}else await r(a.action||s,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:u,body:d,formMethod:a.method||l,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[i,r,t,n])}(),w=function(e){let t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).relative,n=v.useContext(xe).basename,i=v.useContext(_e);F(i,"useFormAction must be used inside a RouteContext");let r=i.matches.slice(-1),o=(0,x.A)(r,1)[0],s=a({},Ue(e||".",{relative:t})),l=Re();if(null==e){s.search=l.search;let e=new URLSearchParams(s.search),t=e.getAll("index");if(t.some(e=>""===e)){e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let n=e.toString();s.search=n?"?".concat(n):""}}return e&&"."!==e||!o.route.index||(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),"/"!==n&&(s.pathname="/"===s.pathname?n:ue([n,s.pathname])),V(s)}(h,{relative:p}),S="get"===d.toLowerCase()?"get":"post",C="string"==typeof h&&Tt.test(h);return v.createElement("form",a(a({ref:t,method:S,action:w,onSubmit:s?f:e=>{if(f&&f(e),e.defaultPrevented)return;e.preventDefault();let t=e.nativeEvent.submitter,n=(null==t?void 0:t.getAttribute("formmethod"))||d,i=()=>T(t||e.currentTarget,{fetcherKey:r,method:n,navigate:o,replace:l,state:c,relative:p,preventScrollReset:m,viewTransition:g,defaultShouldRevalidate:y});A&&!1!==o?v.startTransition(()=>i()):i()}},b),{},{"data-discover":C||"render"!==i?void 0:"true"}))});function Ct(e){let t=v.useContext(Te);return F(t,function(e){return"".concat(e," must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.")}(e)),t}St.displayName="Form";var kt=0,xt=()=>"__".concat(String(++kt),"__");var Nt=n(444),_t=n.n(Nt),It=n(513),Ot=n.n(It),Dt=n(540),Rt=n.n(Dt),Pt=n(564),Lt=n.n(Pt),Mt="bodyAttributes",Ft="htmlAttributes",Ut={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title"},Bt=(Object.keys(Ut).map(function(e){return Ut[e]}),"charset"),jt="cssText",Vt="href",Ht="innerHTML",zt="itemprop",Kt="rel",Wt={accesskey:"accessKey",charset
2:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},Gt=Object.keys(Wt).reduce(function(e,t){return e[Wt[t]]=t,e},{}),qt=[Ut.NOSCRIPT,Ut.SCRIPT,Ut.STYLE],Yt="data-react-helmet",Qt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xt=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),Zt=Object.assign||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},Jt=function(e,t){var n={};for(var i in e)t.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n},$t=function(e){return!1===(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])?String(e):String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")},en=function(e){var t=on(e,Ut.TITLE),n=on(e,"titleTemplate");if(n&&t)return n.replace(/%s/g,function(){return Array.isArray(t)?t.join(""):t});var i=on(e,"defaultTitle");return t||i||void 0},tn=function(e){return on(e,"onChangeClientState")||function(){}},nn=function(e,t){return t.filter(function(t){return void 0!==t[e]}).map(function(t){return t[e]}).reduce(function(e,t){return Zt({},e,t)},{})},rn=function(e,t){return t.filter(function(e){return void 0!==e[Ut.BASE]}).map(function(e){return e[Ut.BASE]}).reverse().reduce(function(t,n){if(!t.length)for(var i=Object.keys(n),r=0;r<i.length;r++){var a=i[r].toLowerCase();if(-1!==e.indexOf(a)&&n[a])return t.concat(n)}return t},[])},an=function(e,t,n){var i={};return n.filter(function(t){return!!Array.isArray(t[e])||(void 0!==t[e]&&dn("Helmet: "+e+' should be of type "Array". Instead found type "'+Qt(t[e])+'"'),!1)}).map(function(t){return t[e]}).reverse().reduce(function(e,n){var r={};n.filter(function(e){for(var n=void 0,a=Object.keys(e),o=0;o<a.length;o++){var s=a[o],l=s.toLowerCase();-1===t.indexOf(l)||n===Kt&&"canonical"===e[n].toLowerCase()||l===Kt&&"stylesheet"===e[l].toLowerCase()||(n=l),-1===t.indexOf(s)||s!==Ht&&s!==jt&&s!==zt||(n=s)}if(!n||!e[n])return!1;var c=e[n].toLowerCase();return i[n]||(i[n]={}),r[n]||(r[n]={}),!i[n][c]&&(r[n][c]=!0,!0)}).reverse().forEach(function(t){return e.push(t)});for(var a=Object.keys(r),o=0;o<a.length;o++){var s=a[o],l=Lt()({},i[s],r[s]);i[s]=l}return e},[]).reverse()},on=function(e,t){for(var n=e.length-1;n>=0;n--){var i=e[n];if(i.hasOwnProperty(t))return i[t]}return null},sn=function(){var e=Date.now();return function(t){var n=Date.now();n-e>16?(e=n,t(n)):setTimeout(function(){sn(t)},0)}}(),ln=function(e){return clearTimeout(e)},cn="undefined"!=typeof window?window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||sn:n.g.requestAnimationFrame||sn,un="undefined"!=typeof window?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||ln:n.g.cancelAnimationFrame||ln,dn=function(e){return console&&"function"==typeof console.warn&&console.warn(e)},hn=null,fn=function(e,t){var n=e.baseTag,i=e.bodyAttributes,r=e.htmlAttributes,a=e.linkTags,o=e.metaTags,s=e.noscriptTags,l=e.onChangeClientState,c=e.scriptTags,u=e.styleTags,d=e.title,h=e.titleAttributes;gn(Ut.BODY,i),gn(Ut.HTML,r),mn(d,h);var f={baseTag:vn(Ut.BASE,n),linkTags:vn(Ut.LINK,a),metaTags:vn(Ut.META,o),noscriptTags:vn(Ut.NOSCRIPT,s),scriptTags:vn(Ut.SCRIPT,c),styleTags:vn(Ut.STYLE,u)},p={},m={};Object.keys(f).forEach(function(e){var t=f[e],n=t.newTags,i=t.oldTags;n.length&&(p[e]=n),i.length&&(m[e]=f[e].oldTags)}),t&&t(),l(e,p,m)},pn=function(e){return Array.isArray(e)?e.join(""):e},mn=function(e,t){void 0!==e&&document.title!==e&&(document.title=pn(e)),gn(Ut.TITLE,t)},gn=function(e,t){var n=document.getElementsByTagName(e)[0];if(n){for(var i=n.getAttribute(Yt),r=i?i.split(","):[],a=[].concat(r),o=Object.keys(t),s=0;s<o.length;s++){var l=o[s],c=t[l]||"";n.getAttribute(l)!==c&&n.setAttribute(l,c),-1===r.indexOf(l)&&r.push(l);var u=a.indexOf(l);-1!==u&&a.splice(u,1)}for(var d=a.length-1;d>=0;d--)n.removeAttribute(a[d]);r.length===a.length?n.removeAttribute(Yt):n.getAttribute(Yt)!==o.join(",")&&n.setAttribute(Yt,o.join(","))}},vn=function(e,t){var n=document.head||document.querySelector(Ut.HEAD),i=n.querySelectorAll(e+"["+Yt+"]"),r=Array.prototype.slice.call(i),a=[],o=void 0;return t&&t.length&&t.forEach(function(t){var n=document.createElement(e);for(var i in t)if(t.hasOwnProperty(i))if(i===Ht)n.innerHTML=t.innerHTML;else if(i===jt)n.styleSheet?n.styleSheet.cssText=t.cssText:n.appendChild(document.createTextNode(t.cssText));else{var s=void 0===t[i]?"":t[i];n.setAttribute(i,s)}n.setAttribute(Yt,"true"),r.some(function(e,t){return o=t,n.isEqualNode(e)})?r.splice(o,1):a.push(n)}),r.forEach(function(e){return e.parentNode.removeChild(e)}),a.forEach(function(e){return n.appendChild(e)}),{oldTags:r,newTags:a}},yn=function(e){return Object.keys(e).reduce(function(t,n){var i=void 0!==e[n]?n+'="'+e[n]+'"':""+n;return t?t+" "+i:i},"")},bn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(e).reduce(function(t,n){return t[Wt[n]||n]=e[n],t},t)},An=function(e,t,n){switch(e){case Ut.TITLE:return{toComponent:function(){return function(e,t,n){var i,r=((i={key:t})[Yt]=!0,i),a=bn(n,r);return[v.createElement(Ut.TITLE,a,t)]}(0,t.title,t.titleAttributes)},toString:function(){return function(e,t,n,i){var r=yn(n),a=pn(t);return r?"<"+e+" "+Yt+'="true" '+r+">"+$t(a,i)+"</"+e+">":"<"+e+" "+Yt+'="true">'+$t(a,i)+"</"+e+">"}(e,t.title,t.titleAttributes,n)}};case Mt:case Ft:return{toComponent:function(){return bn(t)},toString:function(){return yn(t)}};default:return{toComponent:function(){return function(e,t){return t.map(function(t,n){var i,r=((i={key:n})[Yt]=!0,i);return Object.keys(t).forEach(function(e){var n=Wt[e]||e;if(n===Ht||n===jt){var i=t.innerHTML||t.cssText;r.dangerouslySetInnerHTML={__html:i}}else r[n]=t[e]}),v.createElement(e,r)})}(e,t)},toString:function(){return function(e,t,n){return t.reduce(function(t,i){var r=Object.keys(i).filter(function(e){return!(e===Ht||e===jt)}).reduce(function(e,t){var r=void 0===i[t]?t:t+'="'+$t(i[t],n)+'"';return e?e+" "+r:r},""),a=i.innerHTML||i.cssText||"",o=-1===qt.indexOf(e);return t+"<"+e+" "+Yt+'="true" '+r+(o?"/>":">"+a+"</"+e+">")},"")}(e,t,n)}}}},En=function(e){var t=e.baseTag,n=e.bodyAttributes,i=e.encode,r=e.htmlAttributes,a=e.linkTags,o=e.metaTags,s=e.noscriptTags,l=e.scriptTags,c=e.styleTags,u=e.title,d=void 0===u?"":u,h=e.titleAttributes;return{base:An(Ut.BASE,t,i),bodyAttributes:An(Mt,n,i),htmlAttributes:An(Ft,r,i),link:An(Ut.LINK,a,i),meta:An(Ut.META,o,i),noscript:An(Ut.NOSCRIPT,s,i),script:An(Ut.SCR
2IPT,l,i),style:An(Ut.STYLE,c,i),title:An(Ut.TITLE,{title:d,titleAttributes:h},i)}},Tn=function(e){var t,n;return n=t=function(t){function n(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,t.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,t),n.prototype.shouldComponentUpdate=function(e){return!Rt()(this.props,e)},n.prototype.mapNestedChildrenToProps=function(e,t){if(!t)return null;switch(e.type){case Ut.SCRIPT:case Ut.NOSCRIPT:return{innerHTML:t};case Ut.STYLE:return{cssText:t}}throw new Error("<"+e.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")},n.prototype.flattenArrayTypeChildren=function(e){var t,n=e.child,i=e.arrayTypeChildren,r=e.newChildProps,a=e.nestedChildren;return Zt({},i,((t={})[n.type]=[].concat(i[n.type]||[],[Zt({},r,this.mapNestedChildrenToProps(n,a))]),t))},n.prototype.mapObjectTypeChildren=function(e){var t,n,i=e.child,r=e.newProps,a=e.newChildProps,o=e.nestedChildren;switch(i.type){case Ut.TITLE:return Zt({},r,((t={})[i.type]=o,t.titleAttributes=Zt({},a),t));case Ut.BODY:return Zt({},r,{bodyAttributes:Zt({},a)});case Ut.HTML:return Zt({},r,{htmlAttributes:Zt({},a)})}return Zt({},r,((n={})[i.type]=Zt({},a),n))},n.prototype.mapArrayTypeChildrenToProps=function(e,t){var n=Zt({},t);return Object.keys(e).forEach(function(t){var i;n=Zt({},n,((i={})[t]=e[t],i))}),n}
2,n.prototype.warnOnInvalidChildren=function(e,t){return!0},n.prototype.mapChildrenToProps=function(e,t){var n=this,i={};return v.Children.forEach(e,function(e){if(e&&e.props){var r=e.props,a=r.children,o=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(e).reduce(function(t,n){return t[Gt[n]||n]=e[n],t},t)}(Jt(r,["children"]));switch(n.warnOnInvalidChildren(e,a),e.type){case Ut.LINK:case Ut.META:case Ut.NOSCRIPT:case Ut.SCRIPT:case Ut.STYLE:i=n.flattenArrayTypeChildren({child:e,arrayTypeChildren:i,newChildProps:o,nestedChildren:a});break;default:t=n.mapObjectTypeChildren({child:e,newProps:t,newChildProps:o,nestedChildren:a})}}}),t=this.mapArrayTypeChildrenToProps(i,t)},n.prototype.render=function(){var t=this.props,n=t.children,i=Jt(t,["children"]),r=Zt({},i);return n&&(r=this.mapChildrenToProps(n,r)),v.createElement(e,r)},Xt(n,null,[{key:"canUseDOM",set:function(t){e.canUseDOM=t}}]),n}(v.Component),t.propTypes={base:_t().object,bodyAttributes:_t().object,children:_t().oneOfType([_t().arrayOf(_t().node),_t().node]),defaultTitle:_t().string,defer:_t().bool,encodeSpecialCharacters:_t().bool,htmlAttributes:_t().object,link:_t().arrayOf(_t().object),meta:_t().arrayOf(_t().object),noscript:_t().arrayOf(_t().object),onChangeClientState:_t().func,script:_t().arrayOf(_t().object),style:_t().arrayOf(_t().object),title:_t().string,titleAttributes:_t().object,titleTemplate:_t().string},t.defaultProps={defer:!0,encodeSpecialCharacters:!0},t.peek=e.peek,t.rewind=function(){var t=e.rewind();return t||(t=En({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}})),t},n}(Ot()(function(e){return{baseTag:rn([Vt,"target"],e),bodyAttributes:nn(Mt,e),defer:on(e,"defer"),encode:on(e,"encodeSpecialCharacters"),htmlAttributes:nn(Ft,e),linkTags:an(Ut.LINK,[Kt,Vt],e),metaTags:an(Ut.META,["name",Bt,"http-equiv","property",zt],e),noscriptTags:an(Ut.NOSCRIPT,[Ht],e),onChangeClientState:tn(e),scriptTags:an(Ut.SCRIPT,["src",Ht],e),styleTags:an(Ut.STYLE,[jt],e),title:en(e),titleAttributes:nn("titleAttributes",e)}},function(e){hn&&un(hn),e.defer?hn=cn(function(){fn(e,function(){hn=null})}):(fn(e),hn=null)},En)(function(){return null}));Tn.renderStatic=Tn.rewind;var wn=n(198);"localhost"===window.location.hostname&&(n.e(722).then(n.bind(n,722)),localStorage.setItem("dmaInfo",'[{"dma":"539","stationId":2493,"stationSlug":"wtsp","dmaMarket":"miami"}]'));const Sn=()=>((0,v.useEffect)(()=>{"localhost"===window.location.hostname&&(window.utag_data=window.utag_data||{},window.utag_data.isSPA=!0,window.CBS={Registry:{siteEdition:"en|US",user:{id:566025860,sub_status:"MVPD_AUTHZ",sb:"tve|18",hashedID:"78a8368838577bc7ee0bab4d4aa327c5097a91b9cb3d8b663f07237b4665d74b",token:"eyJraWQiOiJjYnMiLCJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI3OGE4MzY4ODM4NTc3YmM3ZWUwYmFiNGQ0YWEzMjdjNTA5N2E5MWI5Y2IzZDhiNjYzZjA3MjM3YjQ2NjVkNzRiIiwiaWF0IjoxNzY5MTA5ODc4LCJleHAiOjE3NjkxMTM0Nzh9.T7QomCSWNHMGIm0ELt3VOEY926uLNWuOsCacGUZiYbc",profile_id:567008550,first_name:"David",profile_reference_id:0,profile_type:"ADULT",pinActive:!1,userProfileMaster:!0,isLC:!1,isLCP:!1,isMVPDGhostAccount:!1,isMVPDAuthZ:!0,bundleStatus:"",multiPackageTracking:"MVPD:MVPD_AA_STACKING_PACKAGE_LC"}}})},[]),(0,wn.jsx)(wn.Fragment,{}));var Cn=Object.defineProperty,kn=Object.getOwnPropertySymbols,xn=Object.prototype.hasOwnProperty,Nn=Object.prototype.propertyIsEnumerable,_n=(e,t,n)=>t in e?Cn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,In=(e,t,n)=>new Promise((i,r)=>{var a=e=>{try{s(n.next(e))}catch(e){r(e)}},o=e=>{try{s(n.throw(e))}catch(e){r(e)}},s=e=>e.done?i(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),On=Object.defineProperty,Dn=Object.defineProperties,Rn=Object.getOwnPropertyDescriptors,Pn=Object.getOwnPropertySymbols,Ln=Object.prototype.hasOwnProperty,Mn=Object.prototype.propertyIsEnumerable,Fn=(e,t,n)=>t in e?On(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Un=(e,t)=>{for(var n in t||(t={}))Ln.call(t,n)&&Fn(e,n,t[n]);if(Pn)for(var n of Pn(t))Mn.call(t,n)&&Fn(e,n,t[n]);return e},Bn=(e,t)=>Dn(e,Rn(t)),jn=(e,t,n)=>new Promise((i,r)=>{var a=e=>
2{try{s(n.next(e))}catch(e){r(e)}},o=e=>{try{s(n.throw(e))}catch(e){r(e)}},s=e=>e.done?i(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),Vn=(e=>(e.ABR_UNAVAILABLE="Single bitrate stream detected, adaptive bitrate system is unavailable",e.ABR_MANUAL_SWITCHING_REACHED_LOWER_BOUNDS="You have reached the lowest available quality for this presentation.",e.ABR_MANUAL_SWITCHING_REACHED_UPPER_BOUNDS="You have reached the highest available quality for this presentation at this screen size",e.ABR_MIN_BITRATE_RESTRICTION_UNAVAILABLE="Min bitrate restrictions are not offered with this streaming library",e.ACTION_HANDLER_ERROR="An error occurred within a registered action handler",e.AD_STALLED="Stalled ad detected",e.ADAPTER_UNAVAILABLE="Unable to play the requested resource - mediaUrl not recognized",e.ADAPTER_LIB_UNAVAILABLE="Unable to play the requested resource - External library is not loading",e.ADAPTER_NOT_FOUND="Unable to find an adapter for the requested resource",e.API_INVALID_ARG="API method called with missing or invalid param",e.CAP_LEVEL_MAXBITRATE="Max bitrate setting will be ignored since capQualityToPlayerSize is enabled",e.CONTENT_PLAYBACK_SETTING_IGNORED="This API is only available after the CONTENT_START event has been dispatched. This setting will be ignored.",e.DAI_MISSING_ASSET_URL="Unexpected condition = valid assetUrl not found in DAI stream data",e.DAI_SDK_UNAVAILABLE="A DAI SDK is required for playback, but is not found",e.ENVIRONMENT_NOT_SUPPORTED='Unable to locate a global "window" object or suitable alternative',e.FAIRPLAY_LICENSE_ERROR="Issue with fairplay DRM and the provided license acquisition url",e.FAIRPLAY_APP_CERT_ERROR="Issue creating a fairplay keysession with the provided application certificate",e.FAIRPLAY_NO_CONTENT_ID="A valid content or asset id was not detected when creating fairplay drm session",e.FAIRPLAY_WEBKIT_ERROR="Issue with webkit and keysession creations while using fairplay drm.",e.FATAL_PLAYBACK_MEDIA_ERROR="Fatal media error, no option for recovery",e.NONFATAL_PLAYBACK_MEDIA_ERROR="Nonfatal media error",e.FATAL_PLAYBACK_NETWORK_ERROR="Fatal network error, no option for recovery",e.NONFATAL_PLAYBACK_NETWORK_ERROR="Nonfatal network error",e.IMA_SDK_MISSING="IMA SDK not found.",e.INVALID_RESOURCE="Resource configuration appears to be invalid",e.MANUAL_ABR_SWITCHING_UNAVAILABLE="Native HTML5 Video does not allow manual bitrate switching",e.PAUSING_LINEAR_LIVE_STREAM_NOT_ALLOWED="StreamType.LIVE is detected. Redirecting to the stop method since a LTS window is not detected.",e.PLUGIN_LOAD_ERROR="Unable to load plugin",e.PLUGIN_FACTORY_ERROR="Invalid plugin factory",e.PLUGIN_ID_ERROR="Invalid plugin ID",e.RESOURCE_MISSING="Resource missing",e.RESOURCE_NOT_SUPPORTED="Resource is not recognized or is currently unsupported",e.RETRY_PLAYBACK_MEDIA_ERROR="Media error detected",e.RETRY_PLAYBACK_NETWORK_ERROR="Network error detected",e.UNEXPECTED_CONDITION="An unexpected condition was encountered",e.UNSPECIFIED_ERROR="Unspecified error",e.VIDEO_PLAYBACK_UNAVAILABLE="Unable to locate a video element or suitable alternative",e.WEBKIT_KEY_ADDED_SUCCESS="Webkit key added successfully",e.WEBKIT_MEDIA_KEYS_NOT_SUPPORTED="WebKitMediaKeys are not supported for this type of media on this user agent",e))(Vn||{});const Hn=class{constructor(){}};Hn.blankVideoUrl="https://avia.vtg.paramount.tech/h5/blanks/uvp_blank.mp4",Hn.blankDataUrl="data:video/mp4;base64,AAAAHGZ0eXBpc29tAAACAGlzb21pc28ybXA0MQAAAAhmcmVlAAAC721kYXQhEAUgpBv/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcCEQBSCkG//AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADengAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcAAAAsJtb292AAAAbG12aGQAAAAAAAAAAAAAAAAAAAPoAAAALwABAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAB7HRyYWsAAABcdGtoZAAAAAMAAAAAAAAAAAAAAAIAAAAAAAAALwAAAAAAAAAAAAAAAQEAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAACRlZHRzAAAAHGVsc3QAAAAAAAAAAQAAAC8AAAAAAAEAAAAAAWRtZGlhAAAAIG1kaGQAAAAAAAAAAAAAAAAAAKxEAAAIAFXEAAAAAAAtaGRscgAAAAAAAAAAc291bgAAAAAAAAAAAAAAAFNvdW5kSGFuZGxlcgAAAAEPbWluZgAAABBzbWhkAAAAAAAAAAAAAAAkZGluZgAAABxkcmVmAAAAAAAAAAEAAAAMdXJsIAAAAAEAAADTc3RibAAAAGdzdHNkAAAAAAAAAAEAAABXbXA0YQAAAAAAAAABAAAAAAAAAAAAAgAQAAAAAKxEAAAAAAAzZXNkcwAAAAADgICAIgACAASAgIAUQBUAAAAAAfQAAAHz+QWAgIACEhAGgICAAQIAAAAYc3R0cwAAAAAAAAABAAAAAgAABAAAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAIAAAABAAAAHHN0c3oAAAAAAAAAAAAAAAIAAAFzAAABdAAAABRzdGNvAAAAAAAAAAEAAAAsAAAAYnVkdGEAAABabWV0YQAAAAAAAAAhaGRscgAAAAAAAAAAbWRpcmFwcGwAAAAAAAAAAAAAAAAtaWxzdAAAACWpdG9vAAAAHWRhdGEAAAABAAAAAExhdmY1Ni40MC4xMDE=",Hn.messages=Vn;let zn=Hn;const Kn="html5";var Wn=(e=>(e.AD="ad",e.PLAYBACK="playback",e.VIDEO="video",e.SQUEEZEBACK="squeezeback",e))(Wn||{}),Gn=(e=>(e.MAIN="main",e.DESCRIPTION="description",e))(Gn||{}),qn=(e=>(e.MP4_VIDEO="video/mp4",e.MP4_AUDIO="audio/mp4",e.HLS="application/vnd.apple.mpegurl",e.HLS_ALT="application/x-mpegURL",e.DASH="application/d
2ash+xml",e.WEBM_VIDEO="video/webm",e.WEBM_AUDIO="audio/webm",e.TS_VIDEO="video/mp2t",e.VTT="text/vtt",e.TTML="application/ttml+xml",e.ISM="application/vnd.ms-sstr+xml",e.UNKNOWN="",e))(qn||{}),Yn=(e=>(e.EVENT="event",e.AD_BREAK="adbreak",e.AD="ad",e.ATTACH_RESOURCE="attachresource",e.REQUEST="request",e.RESPONSE="response",e.SEEK="seek",e))(Yn||{}),Qn=(e=>(e.MANIFEST="manifest",e.SEGMENT="segment",e.KEY="key",e.OTHER="other",e))(Qn||{}),Xn=(e=>(e.CUE_CHANGE="cuechange",e.ADD_TRACK="addtrack",e.CHANGE="change",e))(Xn||{});function Zn(e){return new Uint8Array([...atob(e)].map(e=>e.charCodeAt(0)))}const Jn="utf-16",$n="utf-16be",ei="utf-16le",ti="utf-8";function ni(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=e instanceof ArrayBuffer?new DataView(e):new DataView(e.buffer,e.byteOffset,e.byteLength);let i=0,r=n.encoding;if(!r){const e=t.getUint8(0),n=t.getUint8(1);239==e&&187==n&&191==t.getUint8(2)?(r=ti,i=3):254==e&&255==n?(r=$n,i=2):255==e&&254==n?(r=ei,i=2):r=ti}if("undefined"!=typeof TextDecoder)return new TextDecoder(r).decode(t);const a=t.byteLength,o=r!==$n;let s,l="";for(;i<a;){switch(r){case ti:if(s=t.getUint8(i),s<128)i++;else if(s>=194&&s<=223)if(i+1<a){const e=t.getUint8(i+1);e>=128&&e<=191?(s=(31&s)<<6|63&e,i+=2):i++}else i++;else if(s>=224&&s<=239)if(i+2<=a-1){const e=t.getUint8(i+1),n=t.getUint8(i+2);e>=128&&e<=191&&n>=128&&n<=191?(s=(15&s)<<12|(63&e)<<6|63&n,i+=3):i++}else i++;else if(s>=240&&s<=244)if(i+3<=a-1){const e=t.getUint8(i+1),n=t.getUint8(i+2),r=t.getUint8(i+3);e>=128&&e<=191&&n>=128&&n<=191&&r>=128&&r<=191?(s=(7&s)<<18|(63&e)<<12|(63&n)<<6|63&r,i+=4):i++}else i++;else i++;break;case $n:case Jn:case ei:s=t.getUint16(i,o),i+=2}l+=String.fromCodePoint(s)}return l}function ii(e,t){if(e<0)return-ii(-e,t);const n=Math.pow(10,t);if(Math.abs(e*n%1-.5)<Number.EPSILON){const t=Math.floor(e*n);return(t%2==0?t:t+1)/n}return Math.round(e*n)/n}function ri(){const e=(t,n)=>null==t?n:(null==n||Object.getOwnPropertyNames(n).forEach(i=>{const r=n[i],a=t[i];switch(typeof r){case"undefined":return;case"number":case"string":case"boolean":case"symbol":case"function":case"bigint":t[i]=r;break;case"object":if(Array.isArray(r))t[i]=r.slice();else if(null===r||(e=>{try{return e instanceof Node}catch(e){return!1}})(r))t[i]=r;else{const n=null==a?{}:a;t[i]=e(n,r)}}}),t);for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];const r=n[0];return(0,T.A)(n).slice(1).reduce((t,n)=>e(t,n),r)}function ai(e){return Object.keys(e).reduce((t,n,i)=>(t[i]=e[n],t),[])}function oi(e){return Object.keys(e).reduce((t,n,i)=>(t[i]=[n,e[n]],t),[])}function si(e){return e.reduce((e,t)=>{let n=(0,x.A)(t,2),i=n[0],r=n[1];return e[i]=r,e},{})}function li(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=Array.isArray(e)?e.map(e=>li(e,t)):Object.assign({},e);return t?Object.freeze(n):n}function ci(e){return Array.isArray(e)&&e.forEach(e=>ci(e)),Object.freeze(e)}"undefined"!=typeof MediaKeys&&"function"==typeof MediaKeys.isTypeSupported&&MediaKeys.isTypeSupported;const ui={},di=Object.freeze(Object.defineProperty({__proto__:null,cache:function(e,t){return ui[e]||(ui[e]=t()),ui[e]},clone:li,entries:oi,freeze:ci,fromEntries:si,mapProperties:function(e,t,n){Object.keys(n).forEach(i=>{const r=n[i];t[r]=e[i]})},merge:ri,values:ai},Symbol.toStringTag,{value:"Module"}));function hi(e){return"object"==typeof e}function fi(e){return"function"==typeof e}function pi(e){return"number"==typeof e}function mi(e){return null==e||Array.isArray(e)&&0===e.length||hi(e)&&0===Object.keys(e).length||gi(e)&&""===e}function gi(e){return"string"==typeof e}function vi(e){return void 0===e}function yi(e){return"boolean"==typeof e}const bi=Object.freeze(Object.defineProperty({__proto__:null,isBoolean:yi,isEmpty:mi,isFunction:fi,isNumber:pi,isObject:hi,isString:gi,isUndefined:vi},Symbol.toStringTag,{value:"Module"}));class Ai{static encode(e){if(mi(e))return"";const t=oi(e).map(e=>{let t=(0,x.A)(e,2),n=t[0],i=t[1];return n+"="+encodeURIComponent(i)});return t.join("&")}static decode(e){const t={};return null==e||e.replace(/^[^?]*\?/,"").replace(new RegExp("([^?=&]+)(=([^&]*))?","g"),(e,n,i,r)=>{let a;try{a=vi(r)?r:decodeURIComponent(r)}catch(e){a=r}t[decodeURIComponent(n)]=a}),t}static parseValue(e){if(vi(e))return!0;let t=e.toLowerCase();return"true"===t||"false"===t?"true"===t:"undefined"!==e?"null"===t?null:(t=parseFloat(e),isNaN(t)?e:t):void 0}static parse(e){const t=Ai.decode(e);for(const e in t)t[e]=Ai.parseValue(t[e]);return t}static append(e,t){const n=e.includes("?")?"&":"?";return e+n+Ai.encode(t)}}var Ei=(e=>(e.INCLUDE="include",e.SAME_ORIGIN="same-origin",e.OMIT="omit",e))(Ei||{}),Ti=(e=>(e.ARRAY_BUFFER="arraybuffer",e.TEXT="text",e.JSON="json",e.DOCUMENT="document",e.DEFAULT="",e))(Ti||{});class wi{static get TIMEOUT(){return 5e3}}var Si=(e=>(e.GET="GET",e.POST="POST",e.DELETE="DELETE",e.OPTIONS="OPTIONS",e.PUT="PUT",e))(Si||{});class Ci{constructor(){}static create(e){return{url:e.url||"",method:e.method||Si.GET,timeout:e.timeout||wi.TIMEOUT,headers:e.headers||{},data:this.getBody(e.data,e.encodeList,e.sendJson),withCredentials:!0===e.withCredentials,responseType:e.responseType||Ti.TEXT,onComplete:e.onComplete||null,errorRecovery:e.errorRecovery||null}}static getBody(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e)return null;if("string"==typeof e)return e;if(!Object.keys(e).length)return null;(!Array.isArray(t)||!t.length)&&(t=[]);for(const n in e)e[n]=this.getValue(n,e[n],t);
2if(n)return JSON.stringify(e);let i,r="";for(const t in e)i=e[t],null!=i&&void 0!==i&&""!==i&&(r+="".concat(t,"=").concat(i,"&"));return r=r.substr(0,r.length-1),r}static getValue(e,t,n){return n.indexOf(e)>=0?encodeURIComponent(t):t}}class ki{constructor(e,t,n){this.defaultPrevented_=!1,this.timeStamp=Date.now(),this.detail=n,this.target=t,this.type=e}get defaultPrevented(){return this.defaultPrevented_}preventDefault(){this.defaultPrevented_=!0}}class xi{constructor(e,t){this.value=e,this.next=t}}class Ni{constructor(){this.head=null,this.tail=null}get empty(){return null==this.head}forEach(e){let t=this.head;for(;t;)e(t.value),t=t.next}add(e){const t=new xi(e);null==this.head?(this.head=t,this.head.next=null,this.tail=null):null==this.tail?this.head.next=this.tail=t:this.tail.next=this.tail=t}has(e){let t=this.head;for(;t;){if(t.value===e)return!0;t=t.next}return!1}delete(e){let t=null,n=this.head;for(;n;){if(n.value===e)return t&&(t.next=n.next),n===this.head?this.head=n.next:n===this.tail&&(this.tail=t!==this.head?t:null),!0;t=n,n=n.next}return!1}clear(){let e,t=this.head;for(;t;)e=t.next,t.value=t.next=null,t=e;this.head=this.tail=null}}class _i{constructor(e,t){this.target=t||this,this.opts=e||{},this.eventMap={};const n=this.opts;for(const e in n)if(fi(n[e])&&/^on[A-Z]/.test(e)){const t=e.charAt(2).toLowerCase()+e.substring(3);this.on(t,n[e]),delete this.opts[e]}}destroy(){let e;if(this.opts&&(this.opts=null),this.offAll(null),this.eventMap){for(e in this.eventMap)delete this.eventMap[e];this.eventMap=null}this.target=null}on(e,t){if(!this.eventMap||!e||!fi(t))return;const n=this.eventMap[e]||(this.eventMap[e]=new Ni);n.has(t)||n.add(t)}once(e,t){if(!this.eventMap||!e||!fi(t))return;const n=i=>{this.off(e,n),t(i)};this.on(e,n)}off(e,t){!t&&this.offAll(e),t&&this.remove(e,t)}offAll(e){if(!this.eventMap)return;const t=this.eventMap;if(e)this.remove(e,null);else for(const e in t)this.remove(e,null)}hasListenerFor(e){return this.eventMap&&this.eventMap[e]&&!this.eventMap[e].empty}emit(e,t){this.hasListenerFor(e)&&this.dispatch(new ki(e,this.target||this,t))}dispatchEvt(e){this.hasListenerFor(e.type)&&this.dispatch(e)}dispatch(e){this.eventMap[e.type].forEach(t=>{var n;try{t(e)}catch(e){null==(n=null==console?void 0:console.error)||n.call(console,e)}})}remove(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.hasListenerFor(e)&&(t?this.eventMap[e].delete(t):this.eventMap[e].clear())}}class Ii extends _i{constructor(e){super(e),this.retryCount=0,this.limit=0,this.retryIntervals=null;const t=this.opts.errorRecovery;t&&!isNaN(t.retryAttempts)&&t.retryAttempts>0&&(this.limit=t.retryAttempts),t&&t.retryIntervals&&Array.isArray(t.retryIntervals)&&(this.retryIntervals=t.retryIntervals)}shouldRetry(){return this.limit&&!this.atLimit}incrementAttempts(){this.retryCount++}get retryLimit(){return this.limit}get atLimit(){return this.retryCount===this.limit}get retryInterval(){return this.retryIntervals&&this.retryIntervals[this.retryCount-1]||300*this.retryCount}}const Oi=class e extends Ii{static load(t){return new Promise((n,i)=>{const r=t;r.credentials&&(r.withCredentials=r.credentials===Ei.INCLUDE),r.body&&(r.data=r.body),r.onComplete=e=>{let t=e.detail;!t||t.error?i(t):n(t)},new e(r)})}constructor(e){super(Ci.create(e)),this.requestOptions=this.opts,this.opts.url&&this.createXhr()}createXhr(){this.request(this.requestOptions).then(e=>{const t=e.response,n=e.getResponseHeader("content-type");let i=t;if(this.requestOptions.responseType===Ti.TEXT&&n)if(n.includes("application/smil")||n.includes("application/xml")){const e=new DOMParser;i=e.parseFromString(i,"application/xml")}else(null==n?void 0:n.includes("application/json"))&&(i=JSON.parse(i));204!==e.status&&null==i?this.emitCompleteWithError("Unable to parse response."):setTimeout(()=>{this.emitComplete({contentType:n,data:i})},1)}).catch(e=>{if(this.shouldRetry())this.incrementAttempts(),setTimeout(()=>{this.createXhr()},this.retryInterval);else{const t=this.getErrorMessage(e);this.emitCompleteWithError(t,e.status)}})}getErrorMessage(t){var n;return"string"==typeof t.response?t.response:"string"==typeof(null==(n=t.response)?void 0:n.message)?t.response.message:e.statusMessages[t.status]||e.statusMessages[0]}request(e){return new Promise((t,n)=>{e.query&&(e.url=Ai.append(e.url,e.query));const i=new XMLHttpRequest;if(i.open(e.method,e.url),i.onload=()=>{!1!==e.checkStatus&&i.status>399&&n(i),t(i)},i.onerror=e=>{n(i)},i.withCredentials=e.withCredentials,null!=e.responseType)try{i.responseType=e.responseType}catch(e){}
2return null!=e.headers&&oi(e.headers).forEach(e=>{let t=(0,x.A)(e,2),n=t[0],r=t[1];null!=n&&null!=r&&i.setRequestHeader(n,r)}),i.send(e.data)})}emitComplete(t){this.emit(e.event.COMPLETE,{response:t.data,contentType:t.contentType,error:!1})}emitCompleteWithError(t,n){const i=gi(t)?t:null,r=i?null:t;this.emit(e.event.COMPLETE,{status:n||r&&r.status,error:!0,url:this.requestOptions.url||"not available",message:i||this.getMsg((null==r?void 0:r.status)||0,(null==r?void 0:r.data)||null)})}getMsg(t,n){let i=e.statusMessages[""+t];return i||(i=gi(n)?n:"Unspecified error"),"XhrDataRequest error: "+i}};Oi.event={COMPLETE:"complete"},Oi.statusMessages={0:"Request failed; blocked or timed out",400:"Bad Request",500:"Server error encountered.",404:"Resource not found.",403:"Access denied."};let Di=Oi;function Ri(e){return e.query&&(e.url=Ai.append(e.url,e.query)),Di.load(e).then(e=>e.response)}var Pi,Li=(e=>(e.WIDEVINE="com.widevine.alpha",e.PLAYREADY="com.microsoft.playready",e.PLAYREADY_REC="com.microsoft.playready.recommendation",e.CLEAR_KEY="org.w3.clearkey",e.FAIRPLAY_1_0="com.apple.fps.1_0",e))(Li||{}),Mi=(e=>(e.IRDETO="irdeto",e.DRM_TODAY="drmtoday",e.UNKNOWN="unknown",e))(Mi||{}),Fi=(e=>(e.CMAF_PARSE_ERROR="2111",e.CMAF_NETWORK_ERROR="3011",e.CMAF_SRC_NOT_SUPPORTED="3111",e.CMAF_MEDIA_ERROR="3211",e.CMAF_DRM_ERROR="3311",e.UNSPECIFIED_CMAF_ERROR="3411",e))(Fi||{}),Ui=((Pi=Ui||{}).INVALID_RESOURCE_FORMAT="1000",Pi.RESOURCE_UNAVAILABLE="1100",Pi.GEO_LOCATION_BLOCKED="1101",Pi.DOMAIN_BLOCKED="1102",Pi.IP_BLOCKED="1103",Pi.SATELLITE_PROVIDER_BLOCKED="1104",Pi.EXPIRED="1105",Pi.SELECTOR_CALL_ERROR="1106",Pi.IMA_SDK_MISSING="1200",Pi.DAI_SDK_MISSING="1201",Pi.DASH_SDK_MISSING="1202",Pi.HLS_SDK_MISSING="1203",Pi.SHAKA_SDK_MISSING="1204",Pi.TWITCH_SDK_MISSING="1205",Pi.FW_SDK_MISSING="1206",Pi.HLSJS_PARSE_ERROR="2101",Pi.DASHJS_PARSE_ERROR="2102",Pi.SHAKA_PARSE_ERROR="2103",Pi.TWITCH_PARSE_ERROR="2104",Pi.WEBMAF_START_ERROR="2105",Pi[Pi.CMAF_PARSE_ERROR=Fi.CMAF_PARSE_ERROR]="CMAF_PARSE_ERROR",Pi.USER_GESTURE_REQUIRED="2300",Pi.HTML5_NETWORK_ERROR="3001",Pi.HLSJS_NETWORK_ERROR="3002",Pi.DASHJS_NETWORK_ERROR="3003",Pi.WEBMAF_NETWORK_ERROR="3004",Pi.SHAKA_NETWORK_ERROR="3005",Pi.TWITCH_NETWORK_ERROR="3006",Pi.OIPF_NETWORK_ERROR="3007",Pi[Pi.CMAF_NETWORK_ERROR=Fi.CMAF_NETWORK_ERROR]="CMAF_NETWORK_ERROR",Pi.MEDIA_ABORTED="3100",Pi.HTML5_SRC_NOT_SUPPORTED="3101",Pi.HLSJS_SRC_NOT_SUPPORTED="3102",Pi.DASHJS_SRC_NOT_SUPPORTED="3103",Pi.SHAKA_SRC_NOT_SUPPORTED="3105",Pi.TWITCH_SRC_NOT_SUPPORTED="3106",Pi.OIPF_SRC_NOT_SUPPORTED="3107",Pi[Pi.CMAF_SRC_NOT_SUPPORTED=Fi.CMAF_SRC_NOT_SUPPORTED]="CMAF_SRC_NOT_SUPPORTED",Pi.HTML5_MEDIA_ERROR="3200",Pi.HLSJS_MEDIA_ERROR="3201",Pi.HLSJS_MUX_ERROR="3202",Pi.DASHJS_MEDIA_ERROR="3203",Pi.SHAKA_MEDIA_ERROR="3205",Pi.TWITCH_MEDIA_ERROR="3206",Pi.OIPF_MEDIA_ERROR="3207",Pi[Pi.CMAF_MEDIA_ERROR=Fi.CMAF_MEDIA_ERROR]="CMAF_MEDIA_ERROR",Pi.FAIRPLAY_APP_CERT_ERROR="3300",Pi.FAIRPLAY_LIC_ERROR="3301",Pi.DASHJS_DRM_ERROR="3302",Pi.SHAKA_DRM_ERROR="3304",Pi.OIPF_DRM_ERROR="3305",Pi[Pi.CMAF_DRM_ERROR=Fi.CMAF_DRM_ERROR]="CMAF_DRM_ERROR",Pi.UNSPECIFIED_VIDEO_PLAYBACK_ERROR="3400",Pi.UNSPECIFIED_HLSJS_ERROR="3401",Pi.UNSPECIFIED_DASHJS_ERROR="3402",Pi.UNSPECIFIED_SHAKA_ERROR="3404",Pi.UNSPECIFIED_TWITCH_ERROR="3405",Pi[Pi.UNSPECIFIED_CMAF_ERROR=Fi.UNSPECIFIED_CMAF_ERROR]="UNSPECIFIED_CMAF_ERROR",Pi.AD_STALLED="4000",Pi.IMA_INIT_FAILURE="4100",Pi.IMA_AD_ERROR="4101",Pi.DAI_DATA_ERROR="4200",Pi.DAI_NETWORK_ERROR="4201",Pi.AD_BLOCKING_DETECTED="4300",Pi.AD_ADAPTER_ERROR="4400",Pi.ADAPTER_NOT_FOUND="5000",Pi.HOOK_ERROR="6000",Pi.EVENT_HOOK="6001",Pi.AD_BREAK_HOOK="6002",Pi.AD_HOOK="6003",Pi.ATTACH_RESOURCE_HOOK="6004",Pi.REQUEST_HOOK="6005",Pi.RESPONSE_HOOK="6006",Pi.CREATE_PLAYER_HOOK="6007",Pi.REMOVE_PLAYER_HOOK="6008",Pi.DEVICE_CAPABILITIES="6009",Pi.SCRIPT_LOAD="6010",Pi.PLUGIN_ERROR="7000",Pi.PLUGIN_FACTORY_ERROR="7001",Pi.PLUGIN_ID_ERROR="7002",Pi.PLUGIN_LOAD_ERROR="7003",Pi.INVALID_ARGUMENT="9000",Pi.CALL_AFTER_DESTROY="9001",Pi.ACTION_KEY="9111",Pi.UNEXPECTED_CONDITION="9999",Pi);var Bi,ji={exports:{}},Vi=function(){return Bi||(Bi=1,e=ji,function(){var t="undefined"!=typeof window&&void 0!==window.document?window.document:{},n=e.exports,i=function(){for(var e,n=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["
2webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],i=0,r=n.length,a={};i<r;i++)if((e=n[i])&&e[1]in t){for(i=0;i<e.length;i++)a[n[0][i]]=e[i];return a}return!1}(),r={change:i.fullscreenchange,error:i.fullscreenerror},a={request:function(e,n){return new Promise(function(r,a){var o=function(){this.off("change",o),r()}.bind(this);this.on("change",o);var s=(e=e||t.documentElement)[i.requestFullscreen](n);s instanceof Promise&&s.then(o).catch(a)}.bind(this))},exit:function(){return new Promise(function(e,n){if(this.isFullscreen){var r=function(){this.off("change",r),e()}.bind(this);this.on("change",r);var a=t[i.exitFullscreen]();a instanceof Promise&&a.then(r).catch(n)}else e()}.bind(this))},toggle:function(e,t){return this.isFullscreen?this.exit():this.request(e,t)},onchange:function(e){this.on("change",e)},onerror:function(e){this.on("error",e)},on:function(e,n){var i=r[e];i&&t.addEventListener(i,n,!1)},off:function(e,n){var i=r[e];i&&t.removeEventListener(i,n,!1)},raw:i};i?(Object.defineProperties(a,{isFullscreen:{get:function(){return Boolean(t[i.fullscreenElement])}},element:{enumerable:!0,get:function(){return t[i.fullscreenElement]}},isEnabled:{enumerable:!0,get:function(){return Boolean(t[i.fullscreenEnabled])}}}),n?e.exports=a:window.screenfull=a):n?e.exports={isEnabled:!1}:window.screenfull={isEnabled:!1}}()),ji.exports;var e}();const Hi=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(Vi);var zi=(e=>(e.NONE="None",e.ANDROID="Android",e.CHROME="Chrome",e.CHROME_IOS="Chrome-iOS",e.FIREFOX="Firefox",e.FIREFOX_IOS="Firefox-iOS",e.EDGE="Edge",e.MSIE="MSIE",e.SAFARI="Safari",e.OPERA="Opera",e.OPERA_MOBILE="Opera-Mobile",e.SILK="Silk",e.WEBKIT="Webkit Browser",e.PLAYSTATION_4_WEBMAF="PlayStation 4 (WebMAF)",e.PLAYSTATION_4_MSE="PlayStation 4 (Media Source API)",e.PLAYSTATION_5="PlayStation 5 (Media Source API)",e.UNKNOWN="Unknown",e))(zi||{}),Ki=(e=>(e.DESKTOP="Desktop",e.ANDROID_PHONE="Android Phone",e.WINDOWS_PHONE="Windows Phone",e.IPHONE="iPhone",e.IPOD="iPod",e.IPAD="iPad",e.KINDLE="Kindle",e.TABLET="Tablet",e.MOBILE="Mobile",e.EMBEDDED="Embedded",e.LG_SMART_TV="LG Smart Tv",e.VIZIO_SMART_TV="Vizio Smart Tv",e.SAMSUNG_SMART_TV="Samsung Smart Tv",e.PHILLIPS_SMART_TV="Phillips Smart Tv",e.COMCAST_X1="Comcast X1",e.XBOX_ONE="Xbox One",e.CHROMECAST="Chromecast",e.PLAYSTATION_4="PlayStation 4",e.PLAYSTATION_5="PlayStation 5",e.SKY_Q="Sky STB",e.SWISSCOM="Swisscom STB",e.FOXTEL="Foxtel",e.ORANGE="Orange STB",e.VIRGIN_MEDIA="Virgin Media STB",e.VESTEL="Vestel Smart Tv",e.VODAFONE="VODAFONE_STB",e.YOUVIEW="YouView",e.FREEVIEWPLAY="FreeviewPlay",e.FETCH="FetchTV",e.FREEBOX="Freebox",e.UNKNOWN="UNKNOWN",e))(Ki||{}),Wi=(e=>(e.OSX="OS X",e.WINDOWS="Windows",e.WINDOWS7="Windows 7",e.WINDOWS8="Windows 8",e.WINDOWS10="Windows 10",e.WINDOWS_VISTA="Windows Vista",e.WINDOWS_PHONE="Windows Phone",e.IOS="iOS",e.ANDROID="Android",e.CHROMIUM="Chromium",e.WEBOS="Web0S",e.SMARTCAST="SmartCast",e.TIZEN="Tizen",e.ORBIS="Orbis OS",e.PROSPERO="Prospero OS",e.TIVO="TiVo OS",e.LINUX="Linux",e.UNKNOWN="Unknown",e))(Wi||{}),Gi=(e=>(e.MAC="Macintosh",e.WINDOWS="Windows",e.LINUX="Linux",e.UNKNOWN="Unknown",e))(Gi||{}),qi=(e=>(e.AVC="avc1.4D401E,mp4a.40.2",e.HEVC="hvc1.2.4.L63.90",e.HEVC_SDR="hvc1.1.6.L63.90",e.DOLBY_VISION="dvhe.05.06",e.DOLBY_DIGITAL_PLUS="ec-3",e.STEREO_AUDIO="aac",e.DOLBY_DIGITAL="ac3",e))(qi||{});const Yi="; codecs=",Qi={video:{HLS:qn.HLS,AVC:qn.MP4_VIDEO+Yi+qi.AVC,HEVC:qn.MP4_VIDEO+Yi+qi.HEVC,HEVC_SDR:qn.MP4_VIDEO+Yi+qi.HEVC_SDR,DOLBY_VISION:qn.MP4_VIDEO+Yi+qi.DOLBY_VISION},audio:{AVC:qn.MP4_AUDIO+Yi+qi.AVC,HEVC:qn.MP4_AUDIO+Yi+qi.HEVC,HEVC_SDR:qn.MP4_AUDIO+Yi+qi.HEVC_SDR,DOLBY_DIGITAL_PLUS:qn.MP4_AUDIO+Yi+qi.DOLBY_DIGITAL_PLUS}},Xi="object"==typeof window?window:null;function Zi(e,t,n,i){const r=e.test(t),a=n.os===Wi.ANDROID?zi.ANDROID:zi.SAFARI;return r&&"Unknown"!==n.os&&/MacIntel|iPhone|iPad/.test(i.platform)?a:null}function Ji(e){const t={majorVersion:null,minorVersion:null,versionString:null};if(gi(e)){t.versionString=e;const n=e.split("."),i=parseInt(n[0],10),r=parseInt(n[1],10);!isNaN(i)&&(t.majorVersion=i),!isNaN(r)&&(t.minorVersion=r)}return t}function $i(e){return e.navigator||{userAgent:""}}function er(e,t){const n=e.document||null,i=$i(e),r=t.os,a=t.platform,o=t.osVersion,s=t.device,l=t.model,c=t.browser,u=t.browserVersion,d=t.userAgent,h=Ji(o),f=Ji(u),p=(()=>{switch(s){case Ki.LG_SMART_TV:case Ki.VIZIO_SMART_TV:case Ki.SAMSUNG_SMART_TV:case Ki.PHILLIPS_SMART_TV:case Ki.COMCAST_X1:case Ki.SKY_Q:case Ki.SWISSCOM:case Ki.FOXTEL:case Ki.VIRGIN_MEDIA:case Ki.VESTEL:case Ki.VODAFONE:case Ki.ORANGE:case Ki.YOUVIEW:case Ki.FREEVIEWPLAY:case Ki.FREEBOX:case Ki.FETCH:return!0;default:return!1}})(),m=s===Ki.DESKTOP,g=(()=>{switch(s){case Ki.PLAYSTATION_4:case Ki.PLAYSTATION_5:case Ki.XBOX_ONE:return!0;default:return!1}})(),v="ReactNative"===i.product,y=!!e.WebKitMediaSource,b=!(!e.MediaSource&&!y),A=t=>{let i=!1;
2if(y?i=e.WebKitMediaSource.isTypeSupported(t):b&&(i=e.MediaSource.isTypeSupported(t)),!i&&n){const e=n.createElement("video");hi(e)&&fi(e.canPlayType)&&("probably"!==e.canPlayType(t)&&"maybe"!==e.canPlayType(t)||(i=!0))}return i},E=s===Ki.CHROMECAST,T=p||g||v||E,w=!!e.WM_videoPlayer,S={supportsHevc:A(Qi.video.HEVC),supportsHevcSdr:A(Qi.video.HEVC_SDR),supportsDolbyDigitalPlus:A(Qi.audio.DOLBY_DIGITAL_PLUS),supportsDolbyVision:A(Qi.video.DOLBY_VISION)};return{isBrowser:c!==zi.NONE&&!w&&!!n&&!v,userAgent:d,browser:c,browserVersionInfo:f,device:s,model:l,os:r,osVersionInfo:h,platform:a,isAndroid:s===Ki.ANDROID_PHONE||r===Wi.ANDROID,isChromecast:E,isDesktop:m,isEmbedded:s===Ki.EMBEDDED,isIos:r===Wi.IOS,isMobile:!(m||p||g||E),isTizen:s===Ki.SAMSUNG_SMART_TV,isTv:p,isConsole:g,isWebkit:y,isWebMaf:w,isWebOs:r===Wi.WEBOS,isXboxOne:s===Ki.XBOX_ONE,hasFullscreenApi:Hi.isEnabled,hasMediaSource:b,hasEncryptedMediaSource:!!(e.MediaKeys||e.WebKitMediaKeys||e.MSMediaKeys),supportsHevc:A(Qi.video.HEVC),supportsMediaDecodeConfigurations:!!i.mediaCapabilities,supportsNativeHls:A(Qi.video.HLS),supportsRequestMediaKeySystemAccess:!!e.MediaKeySystemAccess,supportsUnrestrictedAutoplay:T,supportedMedia:S}}const tr={},nr=function(){if(!Xi)return{global:Xi,isBrowser:!1};const e=$i(Xi),t=e.userAgent||"",n=function(e,t){const n=e.toLowerCase(),i={userAgent:e,os:Wi.UNKNOWN,platform:Gi.UNKNOWN,osVersion:"",device:Ki.UNKNOWN,model:Wi.UNKNOWN};if(n.indexOf("fxios")>=0)return i.os=Wi.IOS,i.platform=Gi.MAC,n.indexOf("iphone")>=0?i.device=Ki.IPHONE:i.device=Ki.IPAD,i;if(n.indexOf("crkey")>=0&&n.indexOf("vizio")<0)return i.platform=Gi.LINUX,i.device=Ki.CHROMECAST,i;const r=/\s(\([^)]+\))/.exec(e);if(r&&r.length&&r.length>1){const n=r[1].replace(/_/gi,"."),a=[(e,n)=>function(e,t,n){const i=new RegExp(Gi.LINUX,"i"),r=n.userAgentData,a=n.platform||(null==r?void 0:r.platform),o=/Linux armv/.test(a),s=/FVC\/(\d+\.\d+)/i,l=e.indexOf(Wi.ANDROID)>=0?Wi.ANDROID:Gi.LINUX,c="VODAFONE",u="YouView";if(i.test(e)||e.indexOf(Wi.ANDROID)>=0||e.indexOf(c)>=0||e.indexOf(u)>=0||s.test(e)){if(t.platform=Gi.LINUX,t.device=Ki.UNKNOWN,e.indexOf(Wi.CHROMIUM)>=0){const n=/Chromium\/([\d+\.]*)\s/.exec(e);t.os=Wi.CHROMIUM,t.osVersion=n&&n[1]||""}else if(s.test(e))t.os=l,t.device=Ki.FREEVIEWPLAY;else if(e.indexOf(u)>=0)t.os=l,t.device=Ki.YOUVIEW;else if(e.indexOf(Wi.ANDROID)>=0){const n=/ Android ([^\s]+);/.exec(e);t.os=Wi.ANDROID,t.osVersion=n&&n[1]||"",t.device=Ki.ANDROID_PHONE}else if(e.indexOf(Wi.WEBOS)>=0)t.os=Wi.WEBOS,t.osVersion="n/a",t.device=Ki.LG_SMART_TV;else if(e.indexOf(Wi.SMARTCAST)>=0)t.os=Wi.SMARTCAST,t.osVersion="n/a",t.device=Ki.VIZIO_SMART_TV;else if(e.indexOf(Wi.TIZEN)>=0){const n=/Tizen ([^\s]+)(;|\))/.exec(e);t.os=Wi.TIZEN,t.osVersion=n&&n[1]||"",t.device=Ki.SAMSUNG_SMART_TV}else if(/Sky|(?=.*Firebolt)(?=.*(?:_sky-|_foxtel))/i.test(e))t.os=Gi.LINUX,t.osVersion="n/a",t.device=Ki.SKY_Q;else if(e.indexOf("Foxtel")>=0)t.os=Gi.LINUX,t.osVersion="n/a",t.device=Ki.FOXTEL;else if(e.indexOf("VirginMedia")>=0)t.os=Gi.LINUX,t.osVersion="n/a",t.device=Ki.VIRGIN_MEDIA;else if(e.indexOf("Philips")>=0)t.os=Gi.LINUX,t.osVersion="n/a",t.device=Ki.PHILLIPS_SMART_TV;else if(e.indexOf("SOPOpenBrowser")>=0)t.os=Gi.LINUX,t.osVersion="n/a",t.device=Ki.ORANGE;else if(e.indexOf("Swisscom")>=0){t.os=Wi.ANDROID;const n=e.match(/IP(\d+)/);t.osVersion=n?"IP ".concat(n[1]):"n/a",t.device=Ki.SWISSCOM}else if(e.indexOf("Vestel")>=0){t.os=Wi.TIVO;const n=e.match(/TiVoOS\/([\d.]+)/);t.osVersion=n?n[1]:"n/a",t.device=Ki.VESTEL}else if(e.indexOf(c)>=0)t.os=l,t.osVersion="n/a",t.device=Ki.VODAFONE;else if(e.indexOf("Freebox")>=0){t.os=l;const n=e.match(/fbx[^/]+\/([^)]+)/);t.osVersion=n?n[1]:"n/a",t.device=Ki.FREEBOX}else"undefined"!=typeof $badger||/ Xfinity/.test(e)||/ WPE/.test(e)?(t.os=Gi.LINUX,t.osVersion="n/a",t.device=Ki.COMCAST_X1):o&&(t.os=Gi.LINUX,t.osVersion="n/a",t.device=Ki.EMBEDDED);return!0}return!1}(e,n,t),(e,n)=>function(e,t,n){if(e.indexOf(Gi.MAC)>=0){t.platform=Gi.MAC,e.match(/(iPad)/)||n.maxTouchPoints>1?(t.device=Ki.IPAD,t.os=Wi.IOS):e.indexOf(Wi.OSX)>=0&&(t.device=Ki.DESKTOP,t.os=Wi.OSX);const i=/Mac OS X ([\d.]+)/.exec(e);
2return t.osVersion=i&&i[1]?i[1]:null,!0}if(-1!==e.indexOf("like Mac OS X")){t.platform=Gi.MAC,t.os=Wi.IOS,t.device=Ki.UNKNOWN;const n=/\sOS\s([^\s]*)\s/.exec(e);n&&n[1]&&(t.osVersion=n[1]);const i=[/\(iPhone;/,/\(iPad;/,/\(iPod;/],r=[Ki.IPHONE,Ki.IPAD,Ki.IPOD];let a=i.length;for(;a--;)if(i[a].test(e))return t.device=r[a],!0;return!0}return!1}(e,n,t),(e,t)=>function(e,t){let n=/Windows NT ([^\s]+)[;\)]/,i=/(Windows Phone |Windows Phone OS )([^\s]+);/.exec(e);if(i&&i[2])return t.platform=Gi.WINDOWS,t.os=Wi.WINDOWS_PHONE,t.osVersion=i[2],t.device=Ki.WINDOWS_PHONE,!0;{const i=n.exec(e);if(i&&i[1]){t.device=Ki.DESKTOP,t.platform=Gi.WINDOWS,t.os=Wi.WINDOWS;const n=i[1];if(/Xbox; Xbox One/.test(e)&&(t.device=Ki.XBOX_ONE),10===parseInt(n))t.os=Wi.WINDOWS10,t.osVersion=n;else switch(n){case"6.0":t.os=Wi.WINDOWS_VISTA;break;case"6.1":t.os=Wi.WINDOWS7,t.osVersion="7";break;case"6.2":t.os=Wi.WINDOWS8,t.osVersion="8"}return!0}}return!1}(e,t)];let o=a.length;for(;o--&&!(0,a[o])(0===o?e:n,i););}return i}(t,e),i=function(e,t,n){const i={[zi.CHROME]:/Chrome\/(\S+)/,[zi.CHROME_IOS]:/CriOS\/(\S+)/,[zi.FIREFOX_IOS]:/FxiOS\/(\S+)/,[zi.EDGE]:/ Edge?\/([^\s]+)/,[zi.FIREFOX]:/Firefox\/(\S+)/,[zi.OPERA]:/Opera|OPR\/(\S+)/,[zi.SAFARI]:/Version\/(\S+).*Safari/,[zi.MSIE]:/MSIE ([^\s]+)[);] Windows/,[zi.ANDROID]:/Android/,[zi.SILK]:/Silk\/(\S+)/,[zi.PLAYSTATION_4_WEBMAF]:/Playstation 4 (WebMAF) (\S+)/,[zi.PLAYSTATION_4_MSE]:/WebMAF\/v3/,[zi.PLAYSTATION_5]:/PlayStation 5/,[zi.WEBKIT]:/ WPE/,[zi.UNKNOWN]:null},r=i[zi.CHROME_IOS].test(e),a=(t,n,i)=>{const r=n&&n.exec(i),a={userAgent:e,browser:t,browserVersion:"0",browserMajorVersion:0};if(r&&r.length&&r.length>1)if(a.browserVersion=r[1]||"",a.browserVersion.indexOf(".")){const e=a.browserVersion.split(".");if(Array.isArray(e)&&e.length){const t=parseInt(e[0]);!isNaN(t)&&(a.browserMajorVersion=t)}}else{const e=parseInt(a.browserVersion);!isNaN(e)&&(a.browserMajorVersion=e)}return a};if((i[zi.CHROME].test(e)||r)&&!i[zi.OPERA].test(e)&&!i[zi.EDGE].test(e)){const t=r?zi.CHROME_IOS:zi.CHROME;return a(t,i[t],e)}const o=function(e,t,n){const i=/Trident.[^\s]+;.*rv:([^\s]+)[);]/;return t.test(n)?{browser:zi.MSIE,re:t}:e.test(n)?{browser:zi.EDGE,re:e}:i.test(n)?{browser:zi.MSIE,re:i}:{browser:zi.UNKNOWN,re:null}}(i[zi.EDGE],i[zi.MSIE],e);if(o.browser!==zi.UNKNOWN)return a(o.browser,o.re,e);for(const r in i)switch(r){case zi.FIREFOX:case zi.FIREFOX_IOS:case zi.SILK:case zi.ANDROID:if(i[r].test(e))return r===zi.SILK&&(t.device=Ki.KINDLE),a(r,i[r],e);break;case zi.WEBKIT:return a(zi.WEBKIT,i[zi.WEBKIT],e);case zi.PLAYSTATION_4_WEBMAF:case zi.PLAYSTATION_4_MSE:case zi.PLAYSTATION_5:if(i[r].test(e)){const n=i[zi.PLAYSTATION_5].test(e);let r;return r=n?zi.PLAYSTATION_5:i[zi.PLAYSTATION_4_MSE].test(e)?zi.PLAYSTATION_4_MSE:zi.PLAYSTATION_4_WEBMAF,t.device=n?Ki.PLAYSTATION_5:Ki.PLAYSTATION_4,t.platform=n?Ki.PLAYSTATION_5:Ki.PLAYSTATION_4,t.os=n?Wi.PROSPERO:Wi.ORBIS,a(r,i[r],e)}break;case zi.SAFARI:if(Zi(i[r],e,t,n))return a(r,i[r],e);break;case zi.OPERA:let o=i[r].exec(e);if(o)return a(o.indexOf("Opera Mini/")>=0||o.indexOf("Opera Mobi")>=0?zi.OPERA_MOBILE:zi.OPERA,i[r],e);case zi.UNKNOWN:}return a(zi.UNKNOWN,i[zi.UNKNOWN],e)}(t,n,e);return ri(tr,Un(Un({},n),i)),Object.assign(er(Xi,tr),{appNamespace:null,document:Xi.document,global:Xi,language:e.language||"en",polyfills:{}})}();function ir(e){const t=String.fromCharCode.apply(null,e);return btoa(t)}const rr="webkitneedkey";class ar{constructor(e,t,n,i,r){this.appCertLoaded=!1,this.webKitNeedKeyCalled=!1,this.webkitNeedKeyHandler=e=>this.onWebkitNeedKey(e),this.onError=r,this.drmInfo=t,this.keySystem=t.keySystem||Li.FAIRPLAY_1_0,this.video=e,this.video.addEventListener(rr,this.webkitNeedKeyHandler),this.logger=n,this.delegate=i}initialize(){return jn(this,null,function*(){const e=yield this.delegate.applyHook(Yn.REQUEST,{url:this.drmInfo.appCertUrl,headers:{}}),t=yield Ri(ri({responseType:Ti.ARRAY_BUFFER},e));this.appCertData=new Uint8Array(t),this.appCertLoaded=!0,this.webKitNeedKeyCalled&&this.initializeFairplayCDM()})}destroy(){this.appCertData=null,this.initData=null,this.onError=null,this.drmInfo=null,this.logger=null,this.video.removeEventListener(rr,this.webkitNeedKeyHandler),this.video=null}onWebkitNeedKey(e){this.initData=e.initData,this.webKitNeedKeyCalled=!0,this.appCertLoaded&&this.initializeFairplayCDM()}onLicenseRequestReady(e,t){const n=this.getDrmVendor(e),i=t.target,r={spc:ir(t.message),contentId:i.contentId},a=n===Mi.IRDETO||n===Mi.UNKNOWN?Ti.ARRAY_BUFFER:Ti.TEXT,o={"Content-Type":"application/x-www-form-urlencoded"},s=this.drmInfo.header;mi(s)||Object.assign(o,s),this.delegate.applyHook(Yn.REQUEST,{url:e,method:Si.POST,responseType:a,headers:o,data:r}).then(e=>{const t=li(e),n=e.headers["Content-Type"];return"application/x-www-form-urlencoded"===n?t.data="spc="+encodeURIComponent(e.data.spc)+"&"+e.data.contentId:"application/json"===n&&(t.data=JSON.stringify(e.data)),Ri(t).then(e=>{const t=function(e){return"string"==typeof e?Zn(e):new Uint8Array(e)}(e);i.update(t)}).catch(e=>{this.throwFatalError(Ui.FAIRPLAY_LIC_ERROR,zn.messages.FAIRPLAY_LICENSE_ERROR)})})}onWebkitKeyAdded(e){this.logger.info(zn.messages.WEBKIT_KEY_ADDED_SUCCESS)}onWebkitError(e){this.throwFatalError(Ui.FAIRPLAY_LIC_ERROR,"".concat(zn.messages.FAIRPLAY_LICENSE_ERROR))}getId(e,t){const n=this.drmInfo.contentIdParam,i=Ai.decode(e);return i[n]||i.ContentId||i.contentId||i.assetId||function(e){return ni(e,{encoding:arguments.length>1&&void 0!==arguments[1]?arguments[1]:Jn}).split("skd://")[1]||""}(t)}initializeFairplayCDM(){const e=mi(this.drmInfo.licenseUrl)?function(e){let t="";for(const n of e)0!==n&&(t+=String.fromCharCode(n));const n=t.match(/skd:\/\/([^"\s]+)/);return n?"https://".concat(n[1]):""}(this.initData):this.drmInfo.licenseUrl,t=this.getId(e,this.initData),n=this.video,i=nr.global,r=zn.messages;if(!t)return void this.throwFatalError(Ui.FAIRPLAY_APP_CERT_ERROR,r.FAIRPLAY_NO_CONTENT_ID);if(!n.webkitKeys){const e=this.keySystem;
2if(!i.WebKitMediaKeys.isTypeSupported(e,"video/mp4"))return void this.throwFatalError(Ui.FAIRPLAY_APP_CERT_ERROR,r.FAIRPLAY_WEBKIT_ERROR);try{n.webkitSetMediaKeys(new i.WebKitMediaKeys(e))}catch(e){return void this.throwFatalError(Ui.FAIRPLAY_APP_CERT_ERROR,e.message)}}const a=function(e,t,n){"string"==typeof t&&(t=function(e){const t=new ArrayBuffer(2*e.length),n=new DataView(t);for(let t=0;t<e.length;t++)n.setUint16(2*t,e.charCodeAt(t),!0);return new Uint16Array(t)}(t));const i=new ArrayBuffer(e.byteLength+4+t.byteLength+4+n.byteLength),r=new DataView(i);let a=0;return new Uint8Array(i,a,e.byteLength).set(e),a+=e.byteLength,r.setUint32(a,t.byteLength,!0),a+=4,new Uint16Array(i,a,t.length).set(t),a+=t.byteLength,r.setUint32(a,n.byteLength,!0),a+=4,new Uint8Array(i,a,n.byteLength).set(n),new Uint8Array(i)}(this.initData,t,this.appCertData),o=n.webkitKeys.createSession("video/mp4",a);o?(o.contentId=t,o.addEventListener("webkitkeymessage",this.onLicenseRequestReady.bind(this,e),!1),o.addEventListener("webkitkeyadded",this.onWebkitKeyAdded.bind(this),!1),o.addEventListener("webkitkeyerror",this.onWebkitError.bind(this),!1)):this.throwFatalError(Ui.FAIRPLAY_APP_CERT_ERROR,r.FAIRPLAY_WEBKIT_ERROR)}getDrmVendor(e){let t=Mi.UNKNOWN;return-1!==e.indexOf(Mi.IRDETO)?t=Mi.IRDETO:-1!==e.indexOf(Mi.DRM_TODAY)&&(t=Mi.DRM_TODAY),t}throwFatalError(e,t){this.logger.error("".concat(e," ").concat(t)),this.onError({code:e,message:t,fatal:!0})}}class or{constructor(){this.muted=!1,this.volume=NaN,this.currentTime=NaN,this.duration=NaN}}function sr(e){return pi(e)&&Number.isFinite(e)&&e>=0}const lr=Object.freeze(Object.defineProperty({__proto__:null,createSimpleVideoInterface:function(){return new or},isBuffered:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.currentTime;const n=e.buffered;for(let e=0,i=n.length;e<i;e++)if(n.start(e)<=t&&n.end(e)>=t)return!0;return!1},isValidPlayheadTime:sr},Symbol.toStringTag,{value:"Module"}));var cr=class e{constructor(t,n){Array.isArray(t)&&(t=t.map(t=>t instanceof e?t:new e(t))),this.value=t,this.params=n}};const ur="Dict";function dr(e,t){return{value:e,src:t}}function hr(e,t,n,i){return new Error("failed to ".concat(e,' "').concat((r=t,Array.isArray(r)?JSON.stringify(r):r instanceof Map?"Map{}":r instanceof Set?"Set{}":"object"==typeof r?JSON.stringify(r):String(r)),'" as ').concat(n),{cause:i});var r}function fr(e,t,n){return hr("parse",e,t,n)}const pr="Inner List",mr="Bare Item",gr="Boolean",vr="Byte Sequence",yr="Date",br="Decimal",Ar="Integer",Er="".concat(Ar," or ").concat(br);function Tr(e){return e<-999999999999999||999999999999999<e}function wr(e){let t,n=1,i="";const r=fr(e,Er);if("-"===e[0]&&(n=-1,e=e.substring(1)),e.length<=0)throw r;const a=/^(\d+)?/g,o=a.exec(e);if(0===o[0].length)throw r;if(i+=o[1],"."===(e=e.substring(a.lastIndex))[0]){if(i.length>12)throw r;const a=/^(\.\d+)?/g,o=a.exec(e);if(e=e.substring(a.lastIndex),0===o[0].length||o[1].length>4)throw r;if(i+=o[1],i.length>16)throw r;t=parseFloat(i)*n}else{if(i.length>15)throw r;if(t=parseInt(i)*n,Tr(t))throw fr(i,Er)}return dr(t,e)}const Sr="String",Cr=/[\x00-\x1f\x7f]+/;var kr=class{constructor(e){this.description=e}};const xr="Token";function Nr(e,t){const n=e[0];if('"'===n)return function(e){let t="",n=0;if('"'!==e[n])throw fr(e,Sr);for(n++;e.length>n;){if("\\"===e[n]){if(e.length<=n+1)throw fr(e,Sr);if(n++,'"'!==e[n]&&"\\"!==e[n])throw fr(e,Sr);t+=e[n]}else{if('"'===e[n])return dr(t,e.substring(++n));if(Cr.test(e[n]))throw fr(e,Sr);t+=e[n]}n++}throw fr(e,Sr)}(e);if(/^[-0-9]/.test(n))return wr(e);if("?"===n)return function(e){let t=0;if("?"!==e[t])throw fr(e,gr);if(t++,"1"===e[t])return dr(!0,e.substring(++t));if("0"===e[t])return dr(!1,e.substring(++t));throw fr(e,gr)}(e);if(":"===n)return function(e){if(":"!==e[0])throw fr(e,vr);if(!1===(e=e.substring(1)).includes(":"))throw fr(e,vr);const t=/(^.*?)(:)/g,n=t.exec(e)[1];return e=e.substring(t.lastIndex),dr(Zn(n),e)}(e);if(/^[a-zA-Z*]/.test(n))return function(e){if(!1===/^[a-zA-Z*]$/.test(e[0]))throw fr(e,xr);const t=/^([!#$%&'*+\-.^_`|~\w:/]+)/g,n=t.exec(e)[1];return e=e.substring(t.lastIndex),dr(Symbol.for(n),e)}(e);if("@"===n)return function(e){let t=0;if("@"!==e[t])throw fr(e,yr);t++;
2const n=wr(e.substring(t));if(!1===Number.isInteger(n.value))throw fr(e,yr);return dr(new Date(1e3*n.value),n.src)}(e);throw fr(e,mr)}function _r(e){let t=0;if(!1===/^[a-z*]$/.test(e[t]))throw fr(e,"Key");let n="";for(;e.length>t;){if(!1===/^[a-z0-9_\-.*]$/.test(e[t]))return dr(n,e.substring(t));n+=e[t],t++}return dr(n,e.substring(t))}function Ir(e,t){let n;for(;e.length>0&&";"===e[0];){const t=_r(e=e.substring(1).trim()),i=t.value;let r=!0;if("="===(e=t.src)[0]){const t=Nr(e=e.substring(1));r=t.value,e=t.src}null==n&&(n={}),n[i]=r}return dr(n,e)}function Or(e,t){const n=Nr(e),i=Ir(e=n.src);return e=i.src,dr(new cr(n.value,i.value),e)}function Dr(e,t){return"("===e[0]?function(e){if("("!==e[0])throw fr(e,pr);e=e.substring(1);const t=[];for(;e.length>0;){if(")"===(e=e.trim())[0]){const n=Ir(e=e.substring(1));return dr(new cr(t,n.value),n.src)}const n=Or(e);if(t.push(n.value)," "!==(e=n.src)[0]&&")"!==e[0])throw fr(e,pr)}throw fr(e,pr)}(e):Or(e)}function Rr(e,t,n){return hr("serialize",e,t,n)}function Pr(e){if(Tr(e))throw Rr(e,Ar);return e.toString()}function Lr(e){const t=ii(e,3);if(Math.floor(Math.abs(t)).toString().length>12)throw Rr(e,br);const n=t.toString();return n.includes(".")?n:"".concat(n,".0")}function Mr(e){return e.description||e.toString().slice(7,-1)}function Fr(e){const t=Mr(e);if(!1===/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(t))throw Rr(t,xr);return t}function Ur(e){switch(typeof e){case"number":if(!Number.isFinite(e))throw Rr(e,mr);return Number.isInteger(e)?Pr(e):Lr(e);case"string":return function(e){if(Cr.test(e))throw Rr(e,Sr);return'"'.concat(e.replace(/\\/g,"\\\\").replace(/"/g,'\\"'),'"')}(e);case"symbol":return Fr(e);case"boolean":return function(e){if("boolean"!=typeof e)throw Rr(e,gr);return e?"?1":"?0"}(e);case"object":if(e instanceof Date)return function(e){return"@".concat(Pr(e.getTime()/1e3))}(e);if(e instanceof Uint8Array)return function(e){if(!1===ArrayBuffer.isView(e))throw Rr(e,vr);return":".concat((t=e,btoa(String.fromCharCode(...t))),":");var t}(e);if(e instanceof kr)return Fr(e);default:throw Rr(e,mr)}}function Br(e){if(!1===/^[a-z*][a-z0-9\-_.*]*$/.test(e))throw Rr(e,"Key");return e}function jr(e){return null==e?"":Object.entries(e).map(e=>{let t=(0,x.A)(e,2),n=t[0],i=t[1];return!0===i?";".concat(Br(n)):";".concat(Br(n),"=").concat(Ur(i))}).join("")}function Vr(e){return e instanceof cr?"".concat(Ur(e.value)).concat(jr(e.params)):Ur(e)}const Hr="event",zr=e=>Math.round(e),Kr=(e,t)=>Array.isArray(e)?e.map(e=>Kr(e,t)):e instanceof cr&&"string"==typeof e.value?new cr(Kr(e.value,t),e.params):(t.baseUrl&&(e=function(e,t){const n=new URL(e),i=new URL(t);if(n.origin!==i.origin)return e;const r=n.pathname.split("/").slice(1),a=i.pathname.split("/").slice(1,-1),o=Math.min(r.length,a.length);for(let e=0;e<o&&r[e]===a[e];e++)r.shift(),a.shift();for(;a.length;)a.shift(),r.unshift("..");return r.join("/")+n.search+n.hash}(e,t.baseUrl)),1===t.version?encodeURIComponent(e):e),Wr=e=>100*zr(e/100),Gr={br:zr,d:zr,bl:Wr,dl:Wr,mtp:Wr,nor:(e,t)=>{let n=e;return t.version>=2&&(e instanceof cr&&"string"==typeof e.value?n=new cr([e]):"string"==typeof e&&(n=[e])),Kr(n,t)},rtp:Wr,tb:zr},qr="request",Yr=["ab","bg","bl","br","bs","bsd","cdn","cid","cs","df","ec","lab","lb","ltc","msd","mtp","pb","pr","pt","sf","sid","sn","st","sta","tab","tb","tbl","tpb","ts","v"],Qr=["e"],Xr=["cmsdd","cmsds","rc","smrt","ttfb","ttfbb","ttlb","url"],Zr=/^[a-zA-Z0-9-.]+-[a-zA-Z0-9-.]+$/;function Jr(e){return Zr.test(e)}const $r=["d","dl","nor","ot","rtp","su"],ea=["bl","br","bs","cid","d","dl","mtp","nor","nrr","ot","pr","rtp","sf","sid","st","su","tb","v"];function ta(e){return ea.includes(e)||Jr(e)}const na={[Hr]:function(e){return Yr.includes(e)||Qr.includes(e)||Xr.includes(e)||Jr(e)},[qr]:function(e){return Yr.includes(e)||$r.includes(e)||Jr(e)}};const ia="CMCD";function ra(e){return e?function(e){return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{whitespace:!0};if("object"!=typeof e||null==e)throw Rr(e,ur);const n=e instanceof Map?e.entries():Object.entries(e),i=(null==t?void 0:t.whitespace)?" ":"";return Array.from(n).map(e=>{let t=(0,x.A)(e,2),n=t[0],i=t[1];i instanceof cr==0&&(i=new cr(i));let r=Br(n);var a;return!0===i.value?r+=jr(i.params):(r+="=",Array.isArray(i.value)?r+="(".concat((a=i).value.map(Vr).join(" "),")").concat(jr(a.params)):r+=Vr(i)),r}).join(",".concat(i))}(e,{whitespace:!1})}(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={};if(null==e||"object"!=typeof e)return n;
2const i=t.version||e.v||1,r=t.reportingMode||qr,a=1===i?ta:na[r];let o=Object.keys(e).filter(a);e.e&&"rr"!==e.e&&(o=o.filter(e=>!function(e){return Xr.includes(e)}(e)));const s=t.filter;"function"==typeof s&&(o=o.filter(s));const l=r===Hr;l&&!o.includes("ts")&&o.push("ts"),i>1&&!o.includes("v")&&o.push("v");const c=Object.assign({},Gr,t.formatters),u={version:i,reportingMode:r,baseUrl:t.baseUrl};return o.sort().forEach(t=>{let r=e[t];const a=c[t];if("function"==typeof a&&(r=a(r,u)),"v"===t){if(1===i)return;r=i}"pr"==t&&1===r||(l&&"ts"===t&&!Number.isFinite(r)&&(r=Date.now()),function(e){return"number"==typeof e?Number.isFinite(e):null!=e&&""!==e&&!1!==e}(r)&&(function(e){return["ot","sf","st","e","sta"].includes(e)}(t)&&"string"==typeof r&&(r=new kr(r)),n[t]=r))}),n}(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})):""}const aa=/CMCD=[^&#]+/;function oa(e,t,n){const i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e?"".concat(ia,"=").concat(function(e){if(!e)return"";const t=ra(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{});return encodeURIComponent(t)}(e,t)):""}(t,n);return i?aa.test(e)?e.replace(aa,i):"".concat(e).concat(e.includes("?")?"&":"?").concat(i):e}const sa=new Set([...ea,...Yr,...$r,...Xr,...Qr]);Array.from(sa);const la={MANIFEST:"m",AUDIO:"a",VIDEO:"v",MUXED:"av",INIT:"i",CAPTION:"c",TIMED_TEXT:"tt",
2KEY:"k",OTHER:"o"},ca={DASH:"d",HLS:"h",SMOOTH:"s",OTHER:"o"};function ua(e){return Array.isArray(e)?e.map(ua):"symbol"==typeof e?Mr(e):e instanceof cr&&!e.params?ua(e.value):"string"==typeof e?decodeURIComponent(e):e}function da(e){if(!e)return{};const t=function(e){try{const t=function(e){const t={};for(;e.length>0;){let n;const i=_r(e),r=i.value;if("="===(e=i.src)[0]){const t=Dr(e.substring(1));n=t.value,e=t.src}else{const t=Ir(e);n=new cr(!0,t.value),e=t.src}if(t[r]=n,0===(e=e.trim()).length)return dr(t,e);if(","!==e[0])throw fr(e,ur);if(0===(e=e.substring(1).trim()).length||","===e[0])throw fr(e,ur)}return dr(t,e)}(e.trim()),n=t.src,i=t.value;if(""!==n)throw fr(n,ur);return i}catch(t){throw fr(e,ur,t)}}(e);return Object.entries(t).reduce((e,t)=>{let n=(0,x.A)(t,2),i=n[0],r=n[1];return e[i]=ua(r.value),e},{})}const ha=Object.freeze(Object.defineProperty({__proto__:null,CMCD_VERSION:1,CmcdObjectType:la,CmcdStreamType:{VOD:"v",LIVE:"l"},CmcdStreamingFormat:ca,appendCmcdQuery:oa,decodeCmcd:da,encodeCmcd:ra,fromCmcdQuery:function(e){return"string"==typeof e&&(e=new URLSearchParams(e)),da(e.get(ia))}},Symbol.toStringTag,{value:"Module"}));function fa(e,t){let n;const i=()=>{clearTimeout(n),n=null},r=function(){for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];i(),n=setTimeout(()=>e(...a),t)};return r.cancel=i,r.flush=e,r.pending=()=>null!=n,r}function pa(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const t=e.match(/^([a-zA-Z]{2,3})(?:[_-]+([a-zA-Z]{3})(?=$|[_-]+))?(?:[_-]+([a-zA-Z]{4})(?=$|[_-]+))?(?:[_-]+([a-zA-Z]{2}|[0-9]{3})(?=$|[_-]+))?/)||[];return{tag:e,language:t[1]||"",extended:t[2]||"",script:t[3]||"",region:t[4]||"",toString(){return this.tag}}}function ma(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const i=e=>new RegExp("^".concat(e),"i"),r=i(t);let a=e.filter(e=>r.test(e.language));if(!n){const n=i(pa(t).language);a=a.concat(e.filter(e=>!r.test(e.language)&&n.test(e.language)))}return a}function ga(e,t,n){let i=e;if(t&&(i=ma(i,t).sort((e,t)=>e.default===t.default?0:!0===e.default?-1:!0===t.default?1:0)),n){const e=i.filter(e=>e.type===n);e.length>0&&(i=e)}return i[0]||e.find(e=>e.default)||e[0]}function va(e,t){return(null==e?void 0:e.length)&&fi(t)}function ya(e,t){if(va(e,t))for(let n=0,i=e.length;n<i;n++)t(e[n],n,e)}const ba={VTT:qn.VTT,XML:qn.TTML,M3U8:qn.HLS,MPD:qn.DASH,TS:qn.TS_VIDEO,MP4:qn.MP4_VIDEO,MPV:qn.MP4_VIDEO,MPA:qn.MP4_AUDIO,WEBM:qn.WEBM_VIDEO,ISM:qn.ISM};function Aa(e){return e.replace(/\?.*/,"").replace(/#.*/,"").split(".").pop()}function Ea(e){if(!e)return qn.UNKNOWN;const t=Aa(e).toUpperCase();return ba[t]}var Ta=(e=>(e.HLS="hls",e.DASH="dash",e.MP4="mp4",e.UNKNOWN="unknown",e))(Ta||{});function wa(e){var t,n,i,r;const a=null==(t=e.overrides)?void 0:t.mimeType;if(a)return a.split(";").shift();const o=null==(i=null==(n=e.ad)?void 0:n.ssai)?void 0:i.format;if(o)switch(o){case Ta.DASH:return qn.DASH;case Ta.HLS:return qn.HLS}return Ea(null==(r=e.location)?void 0:r.mediaUrl)}var Sa=(e=>(e.AD="Ad",e.RESOURCE="Resource",e.PLAYBACK="Playback",e.VIDEO_START="Video start",e.HOOK="Hook",e.API="API",e.EVENT="Event",e.PLUGIN="Plugin",e.ACTION_KEY="Action Key",e))(Sa||{});class Ca extends Error{constructor(e,t){super(e),this.cause=t}}class ka extends Ca{constructor(e,t,n){let i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=arguments.length>4?arguments[4]:void 0;super(t,n),this.code=e,this.fatal=i,this.category=r,this.name="PlayerError"}static eventToError(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Sa.EVENT;if(e instanceof Error||!e.detail&&!e.error)return e;const n=e.detail;if(n instanceof Error)return n;const i=e.error||n.error;
2return i instanceof Error?i:i.code&&i.message?new ka(i.code,i.message,i.cause||e,!0,t):new ka(Ui.UNEXPECTED_CONDITION,Vn.UNEXPECTED_CONDITION,e,!0,t)}}function xa(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"error",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:NaN;return"number"==typeof n&&(i=n),new Promise((r,a)=>{let o;const s=[],l=()=>s.forEach(e=>e()),c=(t,n)=>{const i=e.on?"on":"addEventListener",r=e.off?"off":"removeEventListener",a=(e,n)=>{clearTimeout(o),l(),t(n||e)};e[i](n,a),s.push(()=>e[r](n,a))};c(r,t),"string"==typeof n&&c(e=>a(ka.eventToError(e)),n),i>-1&&(o=setTimeout(()=>{l(),a(new Error("timeout"))},i))})}var Na=(e=>(e.CAPTIONS="captions",e.SUBTITLES="subtitles",e.DESCRIPTIONS="descriptions",e.CHAPTERS="chapters",e.METADATA="metadata",e.FORCED="forced",e))(Na||{});function _a(e,t,n){return Math.max(t,Math.min(n,e))}function Ia(e,t,n){return pi(e)&&e>=t&&e<=n}function Oa(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return(e-t)*((arguments.length>4&&void 0!==arguments[4]?arguments[4]:1)-i)/(n-t)+i}const Da=Object.freeze(Object.defineProperty({__proto__:null,clampValue:_a,inRange:Ia,mapToRange:Oa,roundTo:function(e,t){return Math.round(e*Math.pow(10,t))/Math.pow(10,t)}},Symbol.toStringTag,{value:"Module"}));var Ra=(e=>(e.HVC="hvc1.2",e.HEV="hev1.2",e.DVH="dvh",e))(Ra||{}),Pa=(e=>(e.AUTO="AUTO",e.SD="SD",e.HD="HD",e.UHD="UHD",e.UHD_4K="UHD 4K",e.UHD_8K="UHD 8K",e.SDR="SDR",e.HDR="HDR",e))(Pa||{}),La=(e=>(e.AVC="avc",e.HVC="hvc1.1",e.HEV="hev1.1",e))(La||{});const Ma={[Pa.UHD_8K]:4320,[Pa.UHD_4K]:2160,[Pa.UHD]:1440,[Pa.HD]:720,[Pa.SD]:0};function Fa(e,t){let n=1/0,i=0,r=1/0,a=0;return e.forEach(e=>{e.category.indexOf(t)>=0&&(i=Math.max(i,e.index),n=Math.min(n,e.index),a=Math.max(a,e.bitrate),r=Math.min(r,e.bitrate))}),{maxIndex:i,minIndex:n,minBitrate:r,maxBitrate:a}}function Ua(e){var t;return(null==(t=oi(Ma).find(t=>e>=t[1]))?void 0:t[0])||Pa.SD}function Ba(e){if(!e||e===Pa.AUTO)return 1/0;const t=oi(Ma).find((t,n,i)=>{var r;return(null==(r=i[n+1])?void 0:r[0])===e});return(null==t?void 0:t[1])-1||1/0}function ja(e){const t=e.codec;return t?t.startsWith(La.AVC)?Pa.SDR:ai(Ra).some(e=>t.startsWith(e))?Pa.HDR:Pa.SDR:""}function Va(e){const t=[Ua(e.height),"".concat(e.height,"p"),"".concat(Math.round(e.bitrate/1e3)," kbps"),ja(e)],n=e.frameRate;return Bn(Un({},e),{frameRate:Number.isFinite(n)&&n>0?n:NaN,category:t})}function Ha(e,t){if(t<=e[0].bitrate)return 0;const n=e.length-1;for(let i=1;i<n;i++){const n=e[i].bitrate;if(t===n)return i;if(t<n)return i-1}return n}function za(e,t,n,i,r){let a=!0;if(Number.isFinite(t)&&a&&(a=e.bitrate>=t),Number.isFinite(n)&&a&&(a=e.bitrate<=n),Number.isFinite(i)&&a&&(a=e.height<=i),r){const t=r.width,n=r.height;a&&(a=e.width<=t||e.height<=n)}return a}const Ka=Object.freeze(Object.defineProperty({__proto__:null,QualityMap:Ma,getDynamicRange:ja,getMaxBitrateIndex:Ha,getMaxHeightForQualityCategory:Ba,getMaxIndexForHeight:function(e,t){return e.reduce((n,i,r)=>{if(i.height<=t){const t=e[n];(isNaN(n)||i.height>t.height||i.height===t.height&&i.bitrate>t.bitrate)&&(n=r)}return n},NaN)},getMinAndMaxValuesForCategory:Fa,getMinBitrateIndex:function(e,t){const n=e.length-1;if(t>=e[n].bitrate)return n;for(let i=n-1;i>0;i--){const n=e[i].bitrate;if(t===n)return i;if(t>n)return i+1}return 0},getQualityCategoryForVideoHeight:Ua,processQuality:Va,toKbits:function(e){return Math.round(e/1e3)},validateQualities:function(e,t,n,i,r){return e.some(e=>e.enabled&&za(e,t,n,i,r))},validateQuality:za},Symbol.toStringTag,{value:"Module"}));function Wa(e){return{manifest:{mimeType:wa(e)},fragment:{mimeType:""}}}const Ga=Object.freeze(Object.defineProperty({__proto__:null,getResourceMetadata:Wa,getResourceMimeType:wa},Symbol.toStringTag,{value:"Module"}));function qa(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:" ";t|=0;const i=e.length;return i>t?e:((t-=i)>n.length&&(n+=n.repeat(t/n.length)),n.slice(0,t)+e)}function Ya(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return qa(String(e),t,"0")}function Qa(){const e=()=>Math.floor(65536*(1+Math.random())).toString(16).substring(1);return e()+e()}function Xa(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"h:mm:ss A",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{timezone:"",offset:-(new Date).getTimezoneOffset()/60};if(null!=n.offset&&0!==n.offset&&(e=new Date(e.getTime()+Math.round(60*n.offset*60*1e3))),isNaN(e.getTime()))return"";const i=e.getUTCHours(),r=e.getUTCMinutes(),a=e.getUTCSeconds(),o=e.getUTCMilliseconds(),s=i%12||12,l=i<12?"am":"pm",c={hh:Ya(s),h:s,HH:Ya(i),H:i,mm:Ya(r),m:r,sss:Ya(o,3),ss:Ya(a),s:a,a:l,A:l.toUpperCase(),z:n.timezone};for(const e in c)t=t.replace(e,c[e]);return t}function Za(e){return Xa(new Date(e),"HH:mm:ss:sss",{offset:0})}const Ja=/([a-z\d])([A-Z])/g,$a=/\W+/g,eo=/-([a-z])/g;function to(){return function(){try{return crypto.randomUUID()}catch(e){try{const e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.slice(t.lastIndexOf("/")+1)}catch(e){let t=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const n=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"==e?n:3&n|8).toString(16)})}}}()}function no(e){return e&&(e.match(/\n/g)||[]).length+1}function io(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"{{",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"}}";if(!e)return e;const r=new RegExp("".concat(n,"((?:(?!(").concat(n,"|").concat(i,")).)+)").concat(i),"g");return e.replace(r,(e,n)=>vi(null==t?void 0:t[n])?e:t[n])}function ro(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:30;if(!e)return NaN;const n=e.split(":");let i=0;if(4===n.length)i=parseInt(n.pop())/t;else if(3===n.length&&(n[2]=n[2].replace(",","."),-1!==n[2].indexOf("."))){const e=n[2].split(".");(null!=e?e.length:void 0)>1&&(n[2]=e[0],i=parseInt(e[1])/1e3)}let r=parseInt(n.pop());for(;n.length>0;)r+=Math.pow(60,n.length)*parseInt(n.shift());return r+i}const ao=Object.freeze(Object.defineProperty({__proto__:null,camelToDash:function(e){return e.replace($a,"-").replace(Ja,"$1-$2").toLowerCase()},dashToCamel:function(e){return e.replace(eo,e=>e[1].toUpperCase())},formatTime:Xa,getNumLines:no,hmsToSec:ro,msToHms:Za,padStart:qa,secToHms:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:61;if(null==e||isNaN(e))return"00:00";let n=Ya((e|=0)%60);return n=Ya((e=e/60|0)%60)+":"+n,(e=e/60|0)>0&&(n=Ya(e)+":"+n),t>=3600&&5===n.length&&(n="00:"+n),n},template:io,uid8:Qa,uuid:to,zeroFill:Ya},Symbol.toStringTag,{value:"Module"}));function oo(e,t){if(va(e,t))for(let n=e.length-1;n>-1;n--)t(e[n],n,e)}function so(e,t){try{const n=VTTCue||TextTrackCue;e.addCue(new n(t-.1,t+.1," "))}catch(e){}}function lo(e,t){const n={},i=[];
2return co(e,t),e.activeCues?(Array.from(e.activeCues).forEach(t=>{try{if(!t)return;const r=t.text,a=t.startTime,o=t.endTime,s=t.line;if(!r)return;const l=n[r];if(l){if(l.startTime===a)return l.endTime!==o&&(l.endTime=Math.max(l.endTime,o)),l.line!==s&&(l.line="auto"===l.line||"auto"===s?"auto":l.line),void e.removeCue(t)}else n[r]=t;i.push(t)}catch(e){}}),i):i}function co(e,t){const n={},i=Math.max(0,t-15);e.cues&&Array.from(e.cues).forEach(t=>{try{const r=t,a=r.startTime,o=r.endTime,s=r.text;if(o<i)return;n[s]||(n[s]={});const l=n[s][o];if(l&&l.line===t.line)return void e.removeCue(t);const c=n[s][a];c&&t.line===c.line&&(c.endTime=o,delete n[s][a],e.removeCue(t),t=c),n[s][o]=t}catch(e){}})}function uo(e){return e===Na.CAPTIONS||e===Na.SUBTITLES}function ho(e,t){return jn(this,null,function*(){const n=(yield Ri({url:e,responseType:Ti.DOCUMENT})).querySelectorAll("tt body div p");if(!n.length)throw new Error("No cues found in ".concat(e));const i=nr.browser===zi.SAFARI?"middle":"center",r=nr.browser===zi.SAFARI?-1:0,a=void 0!==nr.global.VTTCue,o=a?nr.global.VTTCue:nr.global.TextTrackCue;n.forEach((e,n,s)=>{if(mi(e.textContent))return;const l=e.textContent.replace(/(.*)<span.*tts:fontStyle="italic">(.*)<\/span>(.*)/g,"$1<i>$2</i>$3").replace(/(.*)<span.*tts:fontWeight="bold">(.*)<\/span>(.*)/g,"$1<b>$2</b>$3").replace(/(.*)<span.*tts:textDecoration="under">(.*)<\/span>(.*)/g,"$1<u>$2</u>$3"),c=no(l);e._lineCountPrev=e._lineCountPrev||0,e._lineCountNext=e._lineCountNext||0;let u=n+1,d=s[u];const h=e.getAttribute("begin");for(;(null==d?void 0:d.getAttribute("begin"))===h;)d._lineCountPrev=c+e._lineCountNext,e._lineCountNext+=no(d.textContent),d=s[++u];const f=new o(ro(h),ro(e.getAttribute("end")),l);try{const t=e.getAttribute("tts:textAlign");f.align=t||i}catch(e){f.align="middle"}if(a){const t=e.querySelector("metadata");if(t){f.snapToLines=!0;const e=parseInt(t.getAttribute("cccol")),n=parseInt(t.getAttribute("ccrow")),a=Math.round(e/35*100);f.position=a;try{f.align=a<45?"start":a>55?"end":i}catch(e){f.align="center"}f.positionAlign=a<45?"line-left":a>55?"line-right":"center",f.line=n-17+r}}try{t.addCue(f)}catch(e){}})})}function fo(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"English";var r;let a=null==(r=e.location)?void 0:r.textTrackUrl;if(!a)return Promise.reject("Invalid text track url");const o=a.indexOf(".vtt")>=0,s=e.cmcd;if(s.enabled&&(a=oa(a,{ot:la.CAPTION,su:!0,sid:s.sessionId,cid:s.contentId,pr:t.playbackRate,v:1})),o){const e=document.createElement("track");return e.kind=Na.CAPTIONS,e.label=i,e.srclang=n,e.id="sidecar-vtt",e.src=a,t.appendChild(e),Promise.resolve(e.track)}{const e=t.addTextTrack(Na.CAPTIONS,i,n);return ho(a,e).then(()=>e)}}const po=Object.freeze(Object.defineProperty({__proto__:null,clearAllCues:function(e){},clearCue:so,createSidecarTextTrack:fo,dedupeCues:lo,findDefaultTrack:ga,findLanguageTracks:ma,isTextTrack:uo,processCues:co,smpteToVtt:ho},Symbol.toStringTag,{value:"Module"}));function mo(){var e,t,n;return 1e6*(null==(n=null==(t=null==(e=nr.global)?void 0:e.navigator)?void 0:t.connection)?void 0:n.downlink)}var go=(e=>(e.METADATA_CUEPOINT="metadataCuepoint",e.TEXT_CUEPOINT="textCuepoint",e.TEXT_TRACK_DISPLAY_MODE_CHANGE="textTrackModeChange",e.TEXT_TRACK_ADDED="textTrackAdded",e.TEXT_TRACK_CHANGE="textTrackChange",e.TEXT_TRACK_AVAILABLE="textTrackAvailable",e))(go||{}),vo=(e=>(e.ABORT="abort",e.CAN_PLAY="canplay",e.CAN_PLAY_THROUGH="canplaythrough",e.DURATION_CHANGE="durationchange",e.ENDED="ended",e.ERROR="error",e.LOADED_METADATA="loadedmetadata",e.LOAD_START="loadstart",e.PAUSE="pause",e.PLAY="play",e.PLAYING="playing",e.PROGRESS="progress",e.RATE_CHANGE="ratechange",e.SEEKED="seeked",e.SEEKING="seeking",e.STALLED="stalled",e.TIME_UPDATE="timeupdate",e.VOLUME_CHANGE="volumechange",e.WAITING="waiting",e))(vo||{}),yo=(e=>(e.SHOWING="showing",e.HIDDEN="hidden",e.DISABLED="disabled",e))(yo||{});function bo(e,t){if(!va(e,t))return null;for(let n=0,i=e.length;n<i;n++)if(t(e[n],n,e))return e[n];return null}function Ao(e){return"undefined"!=typeof TextDecoder?(new TextDecoder).decode(e):String.fromCharCode.apply(null,new Uint8Array(e))}const Eo=Object.freeze(Object.defineProperty({__proto__:null,arrayToString:function(e){const t=new Uint16Array(e.buffer);return String.fromCharCode.apply(null,t)},base64DecodeUint8Array:function(e){const t=atob(e),n=t.length,i=new Uint8Array(new ArrayBuffer(n));for(let e=0;e<n;e++)i[e]=t.charCodeAt(e);return i},base64EncodeUint8Array:ir,bufferToString:Ao,find:bo,forEach:ya,forEac
2hReverse:oo,isValid:va,stringToArray:function(e){const t=new ArrayBuffer(2*e.length),n=new Uint16Array(t);for(let t=0,i=e.length;t<i;t++)n[t]=e.charCodeAt(t);return n}},Symbol.toStringTag,{value:"Module"}));function To(e,t){return t+10<=e.length&&73===e[t]&&68===e[t+1]&&51===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128}function wo(e,t){let n=0;return n=(127&e[t])<<21,n|=(127&e[t+1])<<14,n|=(127&e[t+2])<<7,n|=127&e[t+3],n}function So(e,t){return t+10<=e.length&&51===e[t]&&68===e[t+1]&&73===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128}function Co(e){return function(e,t,n,i){const r=(a=e)instanceof ArrayBuffer?a:a.buffer;var a;let o=1;"BYTES_PER_ELEMENT"in i&&(o=i.BYTES_PER_ELEMENT);const s=(d=e)&&d.buffer instanceof ArrayBuffer&&void 0!==d.byteLength&&void 0!==d.byteOffset?e.byteOffset:0,l=(s+e.byteLength)/o,c=(s+t)/o,u=Math.floor(Math.max(0,Math.min(c,l)));var d;return new i(r,u,Math.floor(Math.min(u+Math.max(n,0),l))-u)}(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,Uint8Array)}function ko(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=t?e.indexOf(0):e.length,i=ni(new DataView(e.buffer,e.byteOffset,n),{encoding:ti});return t?i:i.replace(/\0/g,"")}function xo(e){return"PRIV"===e.type?function(e){if(e.size<2)return;const t=ko(e.data,!0),n=new Uint8Array(e.data.subarray(t.length+1));return{key:e.type,info:t,data:n.buffer}}(e):"W"===e.type[0]?function(e){if("WXXX"===e.type){if(e.size<2)return;let t=1;const n=ko(e.data.subarray(t),!0);t+=n.length+1;const i=ko(e.data.subarray(t));return{key:e.type,info:n,data:i}}const t=ko(e.data);return{key:e.type,info:"",data:t}}(e):"APIC"===e.type?function(e){const t={key:e.type,description:"",data:"",mimeType:null,pictureType:null};if(e.size<2)return;if(3!==e.data[0])return void console.log("Ignore frame with unrecognized character encoding");const n=e.data.subarray(1).indexOf(0);if(-1===n)return;const i=ko(Co(e.data,1,n)),r=e.data[2+n],a=e.data.subarray(3+n).indexOf(0);if(-1===a)return;const o=ko(Co(e.data,3+n,a));let s;var l;return s="--\x3e"===i?ko(Co(e.data,4+n+a)):(l=e.data.subarray(4+n+a))instanceof ArrayBuffer?l:0==l.byteOffset&&l.byteLength==l.buffer.byteLength?l.buffer:new Uint8Array(l).buffer,t.mimeType=i,t.pictureType=r,t.description=o,t.data=s,t}(e):function(e){if(e.size<2)return;if("TXXX"===e.type){let t=1;const n=e.data,i=ko(n.subarray(t),!0);t+=i.length+1;const r=ko(n.subarray(t));return{key:e.type,info:i,data:r}}const t=ko(e.data.subarray(1));return{key:e.type,info:"",data:t}}(e)}function No(e){const t=String.fromCharCode(e[0],e[1],e[2],e[3]),n=wo(e,4);return{type:t,size:n,data:e.subarray(10,10+n)}}function _o(e){let t=0;const n=[];for(;To(e,t);){const i=wo(e,t+6);e[t+5]>>6&1&&(t+=10),t+=10;const r=t+i;for(;t+10<r;){const i=No(e.subarray(t)),r=xo(i);r&&n.push(r),t+=i.size+10}So(e,t)&&(t+=10)}return n}const Io=Object.freeze(Object.defineProperty({__proto__:null,getId3Frames:_o},Symbol.toStringTag,{value:"Module"}));class Oo{constructor(e,t){this.daiId3=/^google_/,this.lastTickTime=-1,this.ignoringTicks=!0,this.useId3TimingCompensation_=!1,this.onTextTrackAdded=e=>{let t=e.track;this.isValidTrack(t)&&(t.mode=yo.HIDDEN)},this.onPlaying=()=>{this.ignoringTicks=!1},this.onSeeking=()=>{this.ignoringTicks=!0,this.lastTickTime=-1},this.onSeeked=()=>{this.lastTickTime=this.video.currentTime-.001,this.ignoringTicks=!1},this.onMetadataCuepoint=t,this.video=e.video,this.useId3TimingCompensation_=!0===e.playerOptions.overrides.useId3TimingCompensation,this.id3OwnerIds=["com.cbsi.live.sg"].concat(e.resource.playback.id3OwnerIds||[]),this.addEvents(),this.logger=e.logger,this.logger.info("MetadataSurface created with useId3TimingCompensation ".concat(this.useId3TimingCompensation_)),ya(this.video.textTracks,e=>this.onTextTrackAdded({track:e}))}destroy(){this.onMetadataCuepoint=null,this.removeEvents(),ya(this.video.textTracks,e=>this.cleanupTrack(e)),this.video=null,this.id3OwnerIds=null,this.logger=null}set useId3TimingCompensation(e){this.useId3TimingCompensation_=e}get useId3TimingCompensation(){return this.useId3TimingCompensation_}onTick(){const e=this.getId3Track();if(!e||this.ignoringTicks)return;const t=e.cues,n=this.video.currentTime,i=this.lastTickTime;if(n!==i){for(let e=0,r=t.length;e<r;e++)try{const r=t[e];if(r.endTime<i)continue;const a=r.startTime;if(a>n)break;a>i&&a<=n&&this.processCue(r)}catch(e){this.logger.warn("Failed to process ID3 metadata",e)}this.lastTickTime=n}}addEvents(){this.video.textTracks.addEventListener(Xn.ADD_TRACK,this.onTextTrackAdded),this.video.addEventListener(vo.SEEKING,this.onSeeking),this.video.addEventListener(vo.SEEKED,this.onSeeked),this.video.addEventListener(vo.PLAYING,this.onPlaying)}removeEvents(){this.video.textTracks.removeEventListener(Xn.ADD_TRACK,this.onTextTrackAdded),this.video.removeEventListener(vo.SEEKING,this.onSeeking),this.video.removeEventListener(vo.SEEKED,this.onSeeked),this.video.removeEventListener(vo.PLAYING,this.onPlaying)}cleanupTrack(e){function t(t){try{t&&e.removeCue(t)}catch(e){}}e.kind===Na.METADATA&&(oo(e.cues,t),oo(e.activeCues,t))}processCue(e){if(!e.value&&e.data){const t=e.data;if(t.constructor===ArrayBuffer)return void _o(new Uint8Array(t)).forEac
2h(t=>{e.value=t,this.processCue(e)})}const t=e.value,n=e.startTime,i=e.endTime,r=t.key,a=t.data,o=t.info,s=void 0===o?"":o;this.processId3(r,{id:void 0,text:"string"==typeof a?a:"",info:s,data:a,startTime:n,endTime:i,source:e})}addId3Metadata(e,t){try{if(!this.isRecognizedOwner(e,t.info,t.text))return;const n=t.startTime,i=t.id,r=t.info,a=t.data,o=t.text,s=new VTTCue(n,n,o);if(s.id=i||e,s.value={key:e,data:a,info:r},this.useId3TimingCompensation){const e=this.getId3Track();null==e||e.addCue(s)}else this.processCue(s)}catch(e){this.logger.warn("Failed to add ID3 metadata",e)}}processId3(e,t){const n=t.info,i=t.data;"TXXX"===e&&this.daiId3.test(t.text)&&mi(n)&&(t.info=t.text);const r=this.getOwnerId(e,t.info,t.text);if(!r)return;let a;t.id=r;try{a=i instanceof ArrayBuffer?Ao(i):i}catch(e){a=""}"PRIV"===e&&this.id3OwnerIds[0]===n&&(t.data=a),t.text=a,this.onMetadataCuepoint(t)}getOwnerId(e,t,n){if("TXXX"===e&&this.daiId3.test(n))return"google_dai";const i=this.id3OwnerIds.find(e=>"*"===e||(null==t?void 0:t.includes(e)));return null!=i?i:null}isRecognizedOwner(e,t,n){return!!this.getOwnerId(e,t,n)}getId3Track(){const e=bo(this.video.textTracks,e=>this.isValidTrack(e));return e||(nr.browser===zi.SAFARI?null:this.video.addTextTrack("metadata","id3"))}isValidTrack(e){return!!e&&e.kind===Na.METADATA&&!e.expired}}class Do{constructor(e,t){var n;this.pTextTracks=null,this.currentTextTrack=null,this.currentTextTrackMode=yo.DISABLED,this.existingTrack=[],this.addedTracks=[],this.ignoreBlankTracks=!1,this.processCues=!0,this.onVideoSeeked=e=>{this.updateForcedNarrative()},this.onVideoTextTrackAdded=e=>{e.track.expired=!1,this.onTextTrackAdded(e)},this.onTextTrackAdded=e=>{const t=e.track,n=t.kind===Na.SUBTITLES&&!t.language&&!t.label;t.kind===Na.METADATA||n||this.addDebounced()},this.onTextTrackChange=e=>{this.processDebounced()},this.onCueChange=e=>{const t=e.target,n=t.kind===Na.FORCED;if(!this.config.textTrackSettings.enabled&&!n)return;const i=this.processCues?lo(t,this.video.currentTime):Array.from(t.activeCues||[]);this.emit(go.TEXT_CUEPOINT,{activeCues:i,forced:n})},this.addTracks=()=>{if(ya(this.pTextTracks,e=>{const t=this.isExpired(e)||this.isDuplicateTrack(e);e.mode=t?yo.DISABLED:yo.HIDDEN,t||this.addTrack(e)}),!this.currentTextTrack){if(this.textTrack=ga(this.textTracks,this.config.textTrackSettings.language),!this.textTrack)return;this.textTrack.mode=this.config.textTrackSettings.mode,this.emit(go.TEXT_TRACK_AVAILABLE)}this.processTracks()},this.processTracks=()=>{const e=this.config.textTrackSettings,t=e.enabled,n=e.native,i=e.enabledMode,r=this.textTracks;if(ya(this.pTextTracks,e=>{this.isExpired(e)&&e.mode!==yo.DISABLED&&(e.mode=yo.DISABLED)}),!n){if(t){const e=r.find(e=>e.mode===yo.SHOWING);e&&(e.mode=i)}else{const e=r.find(e=>e.mode!==yo.DISABLED);e&&(e.mode=yo.DISABLED)}return}const a=r.find(e=>e.mode===yo.SHOWING);if(t){if(a===this.currentTextTrack)return;a?this.textTrack=a:this.textTrackMode=yo.DISABLED}else{if(!a)return;a!==this.currentTextTrack&&(this.textTrack=a),this.textTrackMode=yo.SHOWING}},this.config=e,this.video=e.video,this.pTextTracks=this.video.textTracks,this.currentTextTrackMode=e.textTrackSettings.mode,this.pForcedLanguage=e.textTrackSettings.language,this.ignoreBlankTracks=e.playerOptions.ignoreBlankTextTracks,this.processCues=!1!==(null==(n=e.playerOptions.overrides)?void 0:n.processCues),this.emit=t||(()=>{}),this.processDebounced=fa(this.processTracks,100),this.addDebounced=fa(this.addTracks,25),this.addEvents(),this.logger=e.logger,this.logger.info("TextTrackSurface created"),this.config.resource.location.textTrackUrl&&fo(this.config.resource,this.video)}destroy(){this.processDebounced.cancel(),this.addDebounced.cancel(),this.emit=null,this.removeEvents(),ya(this.pTextTracks,e=>this.cleanupTrack(e)),ya(this.video.querySelectorAll("track"),e=>this.video.removeChild(e))}clearCue(){so(this.currentTextTrack,this.video.currentTime)}cleanupTrack(e){if(this.isTextTrack(e.kind)){oo(e.cues,t),oo(e.activeCues,t),e.expired=!0,e.textTrack1=!0,e.textTrack2=!0,e.isTTML=!0,e.isEmbedded=!1;try{e.mode=yo.DISABLED}catch(e){}}function t(t){try{t&&e.removeCue(t)}catch(e){}}}set textTrackMode(e){this.currentTextTrack?this.setTrackMode(e):this.logger.warn("No text track detected")}set textTrack(e){this.isValidTrack(e)&&e!==this.currentTextTrack&&(this.currentTextTrack&&this.currentTextTrack.mode!==yo.DISABLED&&(this.currentTextTrack.mode=yo.DISABLED),this.currentTextTrack=e,this.setTrackMode(this.currentTextTrackMode).then(()=>{this.logger.info("".concat(e.language," is being set as the current text track")),this.emit
2(go.TEXT_TRACK_CHANGE,e)}))}get textTrack(){return this.currentTextTrack}get textTracks(){return Array.from(this.pTextTracks).filter(e=>this.isValidTrack(e))}set forcedLanguage(e){this.pForcedLanguage=e,this.updateForcedNarrative()}get forcedLanguage(){return this.pForcedLanguage}setTrackMode(e){return new Promise((t,n)=>{const i=e!==this.currentTextTrackMode,r=()=>{this.currentTextTrack.mode=e,this.updateForcedNarrative(),i&&setTimeout(()=>this.emit(go.TEXT_TRACK_DISPLAY_MODE_CHANGE,{mode:e}),0);let n=yo.DISABLED;e===yo.HIDDEN&&(n="enabled for event driven external custom rendering"),e===yo.SHOWING&&(n="enabled for native rendering by the user agent"),this.logger.info("The ".concat(this.currentTextTrack.kind," track for language code ").concat(this.currentTextTrack.language," is being ").concat(n," ")),t()};this.currentTextTrackMode=e,e===yo.SHOWING&&this.currentTextTrack.mode===yo.DISABLED?(this.currentTextTrack.mode=yo.HIDDEN,setTimeout(r,10)):r()})}updateForcedNarrative(){const e=Array.from(this.pTextTracks).filter(e=>e.kind===Na.FORCED);if(e.forEach(e=>e.mode=yo.DISABLED),this.currentTextTrackMode!==yo.DISABLED)return;const t=e.find(e=>e.language===this.pForcedLanguage);t&&(t.addEventListener(Xn.CUE_CHANGE,this.onCueChange),t.mode=this.config.textTrackSettings.enabledMode)}addTrack(e){this.addedTracks.includes(e)||(this.addedTracks.push(e),this.isValidTrack(e)&&(e.addEventListener(Xn.CUE_CHANGE,this.onCueChange),this.logger.info("A ".concat(e.kind," text track was added for ").concat(e.language)),this.emit(go.TEXT_TRACK_ADDED,e)))}addEvents(){this.pTextTracks.addEventListener(Xn.ADD_TRACK,this.onTextTrackAdded),this.pTextTracks.addEventListener(Xn.CHANGE,this.onTextTrackChange),this.video.addEventListener(Xn.ADD_TRACK,this.onVideoTextTrackAdded),this.video.addEventListener(vo.SEEKED,this.onVideoSeeked)}removeEvents(){this.pTextTracks.removeEventListener(Xn.ADD_TRACK,this.onTextTrackAdded),this.pTextTracks.removeEventListener(Xn.CHANGE,this.onTextTrackChange),this.video.removeEventListener(Xn.ADD_TRACK,this.onVideoTextTrackAdded),this.video.removeEventListener(vo.SEEKED,this.onVideoSeeked),ya(this.pTextTracks,e=>e.removeEventListener(Xn.CUE_CHANGE,this.onCueChange))}isDuplicateTrack(e){if(this.existingTrack.includes(e))return!1;const t=this.existingTrack.some(t=>e.language===t.language&&e.label===t.label&&e.kind===t.kind);return t||this.existingTrack.push(e),t}isTextTrack(e){return e===Na.CAPTIONS||e===Na.SUBTITLES}isExpired(e){return e.expired}isValidTrack(e){return!(!e||!this.isTextTrack(e.kind)||this.ignoreBlankTracks&&!e.label&&!e.language||this.isExpired(e))}}class Ro{constructor(e,t){this.waiting=!1,this.time=NaN,this.next=null,this.video=e.video,this.onWaitingChange=t,this.onWaiting=this.onWaiting.bind(this),this.onSeeking=this.onSeeking.bind(this),this.onUpdateTime=this.onUpdateTime.bind(this),this.onTimeUpdate=this.onTimeUpdate.bind(this),this.video.addEventListener(vo.WAITING,this.onWaiting),this.video.addEventListener(vo.SEEKING,this.onSeeking),this.video.addEventListener(vo.ERROR,this.onError)}clearUpdate(){this.video.removeEventListener(vo.TIME_UPDATE,this.onUpdateTime)}destroy(){const e=this.video;this.onWaitingChange=null,e.removeEventListener(vo.WAITING,this.onWaiting),e.removeEventListener(vo.SEEKING,this.onSeeking),e.removeEventListener(vo.TIME_UPDATE,this.onTimeUpdate),e.removeEventListener(vo.ERROR,this.onError),this.clearUpdate()}setWaiting(e){var t;this.waiting=e,null==(t=this.onWaitingChange)||t.call(this,e),e&&this.video.addEventListener(vo.TIME_UPDATE,this.onUpdateTime)}onWaiting(){this.waiting||this.video.seeking||this.setWaiting(!0)}onSeeking(){this.setWaiting(!0)}onUpdateTime(){this.clearUpdate(),this.video.paused?this.setWaiting(!1):(this.time=this.video.currentTime,this.video.addEventListener(vo.TIME_UPDATE,this.onTimeUpdate))}onTimeUpdate(){this.time<this.video.currentTime&&(this.setWaiting(!1),this.time=NaN,this.video.removeEventListener(vo.TIME_UPDATE,this.onTimeUpdate))}onError(){this.waiting&&this.setWaiting(!1)}}class Po{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];var i;this.metadataLoaded=!1,this.suppressErrors=!1,this.segmentDuration=6,this.pauseTime=NaN,this.eventsEnabled=!1,this.startedPlaying=!1,this.liveStreamInfo={isPlayingLive:!1,liveEdgeOffset:NaN,ltsWindowSize:NaN,relativeTime:NaN,relativeDuration:NaN,absoluteStart:NaN,absoluteTime:NaN,absoluteDuration:NaN}
2,this.audioTrack=null,this.audioTracks=[],this.quality=null,this.qualities=null,this.textTrack=null,this.textTracks=[],this.minBitrate=0,this.maxBitrate=1/0,this.maxHeight=1/0,this.qualityCappedToScreenSize=null,this.onTextEvent=(e,t)=>{if(!this.eventsEnabled)return;const n=this.delegate;switch(e){case go.TEXT_CUEPOINT:n.textCuepoints(t.activeCues,t.forced);break;case go.TEXT_TRACK_DISPLAY_MODE_CHANGE:n.textTrackDisplayModeChange(t.mode);break;case go.TEXT_TRACK_ADDED:this.textTracks.push({id:this.textTracks.length.toString(),kind:t.kind,language:t.language,label:t.label||t.language}),n.textTracksChange(this.textTracks);break;case go.TEXT_TRACK_AVAILABLE:n.textTracksChange(this.textTracks);break;case go.TEXT_TRACK_CHANGE:const e=this.textTracks.find(e=>t.language===e.language&&t.kind===e.kind&&(t.label===e.label||t.language===e.label));this.textTrack=e,n.textTrackChange(e)}},this.onCueChange=this.onCueChange.bind(this),this.onMetadataCuepoint=this.onMetadataCuepoint.bind(this),this.onWaitingChange=this.onWaitingChange.bind(this),this.videoEventMap={[vo.PLAYING]:this.onPlaying=this.onPlaying.bind(this),[vo.PAUSE]:this.onPause=this.onPause.bind(this),[vo.SEEKING]:this.onSeeking=this.onSeeking.bind(this),[vo.SEEKED]:this.onSeeked=this.onSeeked.bind(this),[vo.TIME_UPDATE]:this.onTimeUpdate=this.onTimeUpdate.bind(this),[vo.VOLUME_CHANGE]:this.onVolumeChange=this.onVolumeChange.bind(this),[vo.ENDED]:this.onEnded=this.onEnded.bind(this),[vo.ERROR]:this.onVideoError=this.onVideoError.bind(this)};const r=e.video,a=e.playerOptions,o=e.resource,s=e.logger;this.context=e,this.options=t,this.video=r,this.delegate=e.getDelegate(),this.logger=s,this.useId3TimingCompensation=null==(i=a.overrides)?void 0:i.useId3TimingCompensation,this.metadataSurface=this.createMetadataSurface(),this.waitingSurface=this.createWaitingSurface();const l=o.playback;this.isLtsRestricted=this.isValidRestrictionTimestamp(l.lts.restrictionTimestamp),this.qualityCappedToScreenSize=l.abr.capQualityToScreenSize;const c=null==l?void 0:l.abr;c&&(c.maxBitrate&&(this.maxBitrate=c.maxBitrate),c.minBitrate&&(this.minBitrate=c.minBitrate),c.maxHeight&&(this.maxHeight=c.maxHeight)),n&&(this.textTrackSurface=this.createTextTrackSurface())}static canPlay(e,t){const n=e.avia,i=e.resource,r=n.getSystemInfo(),a=wa(i),o=t.includes(a);return r.hasMediaSource&&o}destroy(){var e,t,n;return this.video.removeEventListener(vo.LOADED_METADATA,this.onLoadedMetadata),this.video.removeEventListener(vo.DURATION_CHANGE,this.onDurationChange),this.removeEvents(this.video,this.videoEventMap),this.listenToTextTracks(!1,!0),null==(e=this.metadataSurface)||e.destroy(),this.metadataSurface=null,null==(t=this.textTrackSurface)||t.destroy(),this.textTrackSurface=null,null==(n=this.waitingSurface)||n.destroy(),this.waitingSurface=null,this.context=null,this.options=null,this.delegate=null,this.logger=null,this.video=null,Promise.resolve()}get info(){return{id:"base",version:"n/a"}}
2onTick(){var e;null==(e=this.metadataSurface)||e.onTick()}getIsLiveStream(){return this.video.duration===1/0}setAutoQualitySwitching(e){throw new Error("setAutoQualitySwitching Method not implemented.")}setQuality(e){throw new Error("setQuality Method not implemented.")}setMinBitrate(e){this.minBitrate=e}setMaxBitrate(e){this.maxBitrate=e}setQualityCappedToScreenSize(e){this.qualityCappedToScreenSize=e,this.resize()}setTextTrack(e){if(!this.textTrackSurface)return;const t=Array.from(this.video.textTracks).find(t=>e.language===t.language&&e.kind===t.kind&&e.label===t.label);this.textTrackSurface.textTrack=t}setTextTrackMode(e){this.textTrackSurface&&(this.textTrackSurface.textTrackMode=e)}setAudioTrack(e){throw new Error("setAudioTrack Method not implemented.")}getId(){throw new Error("getId Method not implemented.")}getCurrentTime(){return this.video.currentTime}getDuration(){return this.video.duration}getBuffered(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.video.buffered,n=[],i=e?0:this.getSeekable().start;for(let e=0,r=t.length;e<r;e++)n.push({startTime:t.start(e)-i,endTime:t.end(e)-i});return n}getThroughput(){return mo()}getLiveStreamUtcStart(){return NaN}getLiveStreamUtcTime(){return NaN}isValidRestrictionTimestamp(e){return-1===e||null!==e&&!isNaN(e)&&e>=0}calculateStart(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.video.currentTime,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getSeekable().start,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.getLiveStreamUtcStart(),i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.getLiveStreamUtcTime();var r;if(this.getIsLiveStream()){const a=null==(r=this.context.resource.playback)?void 0:r.lts;if(this.isLtsRestricted&&!this.restrictedStartTime&&e>0){const t=null==a?void 0:a.restrictionTimestamp,r=-1!==t;r&&t>n?(this.restrictedStartTimeUtc=t,this.restrictedStartTime=e-.001*(i-t)):r||(this.restrictedStartTime=e,this.restrictedStartTimeUtc=i),(null==a?void 0:a.startTimestamp)&&this.setLtsStartTime(a.startTimestamp,this.restrictedStartTime,e,i)}else(null==a?void 0:a.startTimestamp)&&e>0&&void 0===this.pendingSeekTime&&this.setLtsStartTime(a.startTimestamp,t,e,i)}const a=!isNaN(this.restrictedStartTime)&&this.restrictedStartTimeUtc>n;return{videoStart:a?this.restrictedStartTime:t,utcStart:a?this.restrictedStartTimeUtc:n}}setLtsStartTime(e,t,n,i){if(void 0===this.pendingSeekTime){const r=Math.max(0,n-t);this.pendingSeekTime=Math.max(0,r-.001*(i-e))}}getLiveStreamInfo(){const e=this.liveStreamInfo,t=this.video.currentTime,n=this.getLiveStreamUtcStart(),i=this.getLiveStreamUtcTime(),r=this.getSeekable(),a=r.start,o=r.end,s=this.calculateStart(t,a,n,i),l=s.videoStart,c=s.utcStart,u=o-l,d=this.getLiveEdgeOffset(),h=Math.max(t-l,0);return e.relativeTime=h,e.relativeDuration=u,e.absoluteStart=c,e.absoluteDuration=c+1e3*u,e.absoluteTime=i,e.ltsWindowSize=Math.floor(u),e.liveEdgeOffset=d,e.isPlayingLive=Math.ceil(t)>=this.calculateLiveBoundary(o),e}getThumbnails(e){return Promise.resolve([])}load(){return this.enableSurfaceEvents(!0),this.suppressErrors=!0,Promise.resolve(Wa(this.context.resource))}play(){const e=this.pauseTime;return this.pauseTime=NaN,Promise.resolve().then(()=>{if(this.getIsLiveStream()&&!isNaN(e))return e<this.getSeekable().start?(this.logger.info("Playhead behind seekable range. Moving to trailing edge of LTS window."),this.seek(0)):this.seek(this.liveStreamInfo.relativeTime)}).then(()=>this.video.play())}pause(){this.getIsLiveStream()&&(this.pauseTime=this.video.currentTime),this.video.pause()}suspend(){}resume(){}seek(e){if(isNaN(e))return Promise.resolve();const t=this.getSeekable();let n=t.start;const i=t.end;if(this.getIsLiveStream()){const t=this.getNoSeekRange(i-n),r=t.startTime,a=t.endTime;Ia(e,r,a)&&(e=e<this.liveStreamInfo.relativeTime?r:a),e=_a(e,this.getLiveEdgeOffset(),a),n=this.calculateStart().videoStart}const r=Oa(e,0,i-n,n,i);return sr(r)?(this.pendingSeekInfo={from:{streamTime:this.video.currentTime,contentTime:null},to:{streamTime:r,contentTime:null}},this.video.currentTime=r,xa(this.video,vo.SEEKED)):Promise.resolve()}resize(){}clearText(){var e;null==(e=this.textTrackSurface)||e.clearCue()}getMetrics(){const e=this.video,t={bandwidth:this.getThroughput(),framerate:NaN,droppedVideoFrames:Number.NaN,totalVideoFrames:Number.NaN};"getVideoPlaybackQuality"in e?Object.assign(t,e.getVideoPlaybackQuality()):"webkitDroppedFrameCount"in e&&"webkitDecodedFrameCount"in e&&(t.droppedVideoFrames=e.webkitDroppedFrameCount,t.totalVideoFrames=e.webkitDroppedFrameCount+e.webkitDecodedFrameCount);const n=e.webkitDecodedFrameCount||e.mozPresentedFrames;return n&&(t.framerate=n/e.currentTime),t}getLiveEdgeOffset(){const e=this.getSegmentDuration(),t=this.context.resource.playback.liveEdgeSyncFragmentCount;return Math.max(e,e*t)}getRefreshInterval(){return 2*this.getSegmentDuration()}calculateLiveBoundary(e){return e-this.getLiveEdgeOffset()-this.getRefreshInterval()}getNoSeekRange(e){const t=this.calculateLiveBoundary(e),n=this.getRefreshInterval();return{startTime:t-n,endTime:t+n}}createMetadataSurface(){return new Oo(this.context,this.onMetadataCuepoint)}createTextTrackSurface(){return new Do(this.context,this.onTextEvent)}createWaitingSurface(){return new Ro(this.context,this.onWaitingChange)}enableSurfaceEvents(e){this.eventsEnabled=!0,this.video.addEventListener(vo.LOADED_METADATA,this.onLoadedMetadata=this.onLoadedMetadata.bind(this)),this.video.addEventListener(vo.DURATION_CHANGE,this.onDurationChange=this.onDurationChange.bind(this))}addEvents(e,t){const n=fi(e.on)?"on":"addEventListener";oi(t).forEach(t=>e[n](t[0],t[1]))}removeEvents(e,t){const n=fi(e.off)?"off":"removeEventListener";oi(t).forEach(t=>{var i,r;null==(r=(i=t[1]).cancel)||r.call(i),e[n](t[0],t[1])})}createVideoElementError(){const e=this.video.error;let t=Object.keys(MediaError)[e.code-1]||zn.messages.UNSPECIFIED_ERROR,n=Ui.UNSPECIFIED_VIDEO_PLAYBACK_ERROR;switch(e.code){case MediaError.MEDIA_ERR_ABORTED:t=e.toString(),n=Ui.MEDIA_ABORTED;break;
2case MediaError.MEDIA_ERR_NETWORK:n=Ui.HTML5_NETWORK_ERROR;break;case MediaError.MEDIA_ERR_DECODE:n=Ui.HTML5_MEDIA_ERROR;break;case MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED:n=Ui.HTML5_SRC_NOT_SUPPORTED;break;default:n=Ui.UNSPECIFIED_VIDEO_PLAYBACK_ERROR}return{code:n,message:t,fatal:!0,cause:e}}onLoadedMetadata(){this.metadataLoaded=!0,this.addEvents(this.video,this.videoEventMap)}onDurationChange(){this.delegate.durationChange()}onPlaying(){return jn(this,null,function*(){if(this.pendingSeekTime){const e=this.pendingSeekTime;this.pendingSeekTime=null,yield this.seek(e)}this.startedPlaying=!0,this.delegate.playing()})}onPause(){this.delegate.paused()}onSeeking(){this.delegate.seeking(this.pendingSeekInfo),this.pendingSeekInfo=null}onSeeked(){this.delegate.seeked()}onTimeUpdate(){this.delegate.timeUpdate()}onVolumeChange(){this.delegate.volumeChange(this.video.volume,this.video.muted)}onEnded(){this.delegate.ended()}onVideoError(){this.suppressErrors||this.error(this.createVideoElementError())}getSegmentDuration(){return this.segmentDuration}getSeekable(){const e={start:0,end:0},t=this.video.seekable,n=t.length-1;return n>=0&&(e.start=t.start(n),e.end=t.end(n)),e}getErrorMessage(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"n/a";return"".concat(e," fatal: ").concat(t," retry: ").concat(n)}createError(e,t,n){return new ka(e,t,n,!(arguments.length>3&&void 0!==arguments[3])||arguments[3])}throwError(e,t,n){let i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];this.error(this.createError(e,t,n,i))}error(e){this.delegate.error(e)}createSidecarTextTrack(){var e;const t=this.context,n=t.resource,i=t.video;(null==(e=n.location)?void 0:e.textTrackUrl)&&fo(n,i)}updateQuality(e){var t;e&&(null==(t=this.quality)?void 0:t.bitrate)!==e.bitrate&&(this.qual
2ity=e,this.delegate.qualityChange(e))}updateQualities(e){if(!(null==e?void 0:e.length))return;e.sort((e,t)=>e.bitrate!==t.bitrate?e.bitrate-t.bitrate:e.height!==t.height?e.height-t.height:e.width!==t.width?e.width-t.width:0);const t=this.qualityCappedToScreenSize&&this.video.getBoundingClientRect();e.forEach(e=>{e.enabled=za(e,this.minBitrate,this.maxBitrate,this.maxHeight,t)}),e.some(e=>e.enabled)||this.logger.warn("Invalid qualities array. None of the values meet the current size/bitrate constraints."),JSON.stringify(this.qualities)!==JSON.stringify(e)&&(this.qualities=e,this.delegate.qualitiesChange(e))}listenToTextTracks(e){const t=e?"addEventListener":"removeEventListener";Array.from(this.context.video.textTracks).forEach(e=>{uo(e.kind)&&e[t](Xn.CUE_CHANGE,this.onCueChange)})}onCueChange(e,t){const n=e.target,i=lo(n,this.video.currentTime),r=!0===e.target.forced;null!=t||(t=n.kind===Na.FORCED||e.forced||r),this.delegate.textCuepoints(i,t)}onMetadataCuepoint(e){this.delegate.metadataCuepoint(e)}onWaitingChange(e){this.delegate.waitingChange(e)}}class Lo extends Po{constructor(e){super(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},!0),this.isNonZeroStartTime=!1,this.onAddAudioEvent=e=>{this.audioTracks=[],this.audioTrack=null,ya(this.domAudioTracks,(e,t)=>{if(!e.label&&!e.language)return;const n=e.kind,i={index:t,id:t.toString(),type:"alternative"===n||"description"===n?Gn.DESCRIPTION:Gn.MAIN,codec:"",language:e.language,label:e.label};this.audioTracks.push(i)}),this.delegate.audioTracksChange(this.audioTracks),this.setAudioTrack(ga(this.audioTracks,this.context.playerOptions.audioLanguage,this.context.playerOptions.audioRole)),this.audioTrack||this.changeAudioDebounced()},this.onChangeAudioEvent=e=>{const t=Array.from(this.domAudioTracks).find(e=>e.enabled);this.audioTrack=this.audioTracks.find(e=>e.id===t.id),this.delegate.audioTrackChange(this.audioTrack)},this.onFairPlayError=e=>{this.delegate.error(e)};const t=this.context.resource.location.drm.fairplay;t.appCertUrl&&(this.fairplay=new ar(this.video,t,this.logger,this.delegate,this.onFairPlayError),this.fairplay.initialize(),this.delegate.drmKeySystemCreated(this.fairplay.keySystem));const n=this.domAudioTracks;n&&(this.addAudioDebounced=fa(this.onAddAudioEvent,100),this.changeAudioDebounced=fa(this.onChangeAudioEvent,100),n.addEventListener(Xn.ADD_TRACK,this.addAudioDebounced),n.addEventListener(Xn.CHANGE,this.changeAudioDebounced))}static get ID(){return Kn}static get config(){return{id:Lo.ID,role:[Wn.PLAYBACK],factory:function(e){return new Lo(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})},isSupported:e=>{var t;const n=wa(e.resource);return""!==(null==(t=e.video)?void 0:t.canPlayType(n))}}}get domAudioTracks(){return this.video.audioTracks}getId(){return Lo.ID}get info(){return{id:this.getId(),version:"n/a"}}destroy(){const e=this.domAudioTracks;return e&&(this.addAudioDebounced.cancel(),this.changeAudioDebounced.cancel(),e.removeEventListener(Xn.ADD_TRACK,this.addAudioDebounced),e.removeEventListener(Xn.CHANGE,this.changeAudioDebounced)),this.fairplay&&(this.fairplay.destroy(),this.fairplay=null),this.destroyMediaElement(),super.destroy()}destroyMediaElement(){const e=this.video;e.removeAttribute("src"),e.load()}applySrc(e,t){this.video.src=e}load(){return this.suppressErrors=!0,super.load().then(()=>this.loadResource())}loadResource(){return jn(this,null,function*(){var e;const t=this.context.resource;let n=t.location.mediaUrl;const i=(null==(e=t.overrides)?void 0:e.mimeType)||Ea(n),r=t.cmcd;return r.enabled&&(n=oa(n,{ot:la.MANIFEST,sf:(e=>{switch(e){case qn.HLS:case qn.HLS_ALT:return ca.HLS;case qn.DASH:return ca.DASH;default:return ca.OTHER}})(i),su:!0,sid:r.sessionId,cid:r.contentId,pr:this.video.playbackRate,v:1})),this.delegate.applyHook(Yn.REQUEST,{url:n},{objectType:Qn.MANIFEST}).then(e=>(this.applySrc(e.url,i),xa(this.video,vo.LOADED_METADATA).then(()=>{const e=t.playback.startTime;if(sr(e)&&e>0){this.isNonZeroStartTime=!0;const t=()=>{this.video.removeEventListener(vo.PLAYING,t),this.seek(e)};this.video.addEventListener(vo.PLAYING,t)}}).then(()=>(this.suppressErrors=!1,{manifest:{mimeType:i},fragment:{mimeType:void 0}})).catch(()=>{throw this.createVideoElementError()})))})}setAudioTrack(e){e&&(ya(this.domAudioTracks,(t,n)=>{t.enabled=e.index===n}),this.textTrackSurface.forcedLanguage=e.language)}setQuality(e){this.logger.info(zn.messages.MANUAL_ABR_SWITCHING_UNAVAILABLE)}setAutoQualitySwitching(e){this.logger.info(zn.messages.MANUAL_ABR_SWITCHING_UNAVAILABLE)}setMinBitrate(e){this.logger.info(zn.messages.MANUAL_ABR_SWITCHING_UNAVAILABLE)}setMaxBitrate(e){this.logger.info(zn.messages.MANUAL_ABR_SWITCHING_UNAVAILABLE)}setTextTrackMode(e){this.textTrackSurface&&(this.isNonZeroStartTime&&!this.startedPlaying?(this.isNonZeroStartTime=!1,xa(this.video,vo.SEEKED).then(()=>this.textTrackSurface.textTrackMode=e)):this.textTrackSurface.textTrackMode=e)}calculateUtcTime(e){const t=this.video;
2if(!t.getStartDate)return NaN;const n=t.getStartDate().getTime(),i=1e3*e;return Math.round(n+i)}getLiveStreamUtcStart(){return this.calculateUtcTime(this.getSeekable().start)}getLiveStreamUtcTime(){return this.calculateUtcTime(this.video.currentTime)}}const Mo=1e6,Fo="dom-video-adapter",Uo=Object.freeze({env:"__ENV__",playerVersion:"2.60.0",playerName:"@cbsinteractive/avia-js",buildTime:"2026-04-28T23:27:43.106Z"});var Bo=(e=>(e.HOTKEY_ACTION="hotkeyaction",e.ACTION_KEY="actionkey",e.ACTION_KEY_METADATA="actionkeymetadata",e.READY="ready",e.AD_SKIPPABLE_STATE_CHANGE="adskippablestatechange",e.AD_CUEPOINTS_AVAILABLE="adcuepointsavailable",e.AD_BREAK_START="adbreakstart",e.AD_BREAK_METADATA="adbreakmetadata",e.AD_BREAK_COMPLETE="adbreakcomplete",e.AD_START="adstart",e.AD_COMPLETE="adcomplete",e.AD_FIRST_QUARTILE="adfirstquartile",e.AD_MIDPOINT="admidpoint",e.AD_THIRD_QUARTILE="adthirdquartile",e.AD_SEGMENT_START="adsegmentstart",e.AD_SEGMENT_END="adsegmentend",e.AD_SEGMENT_REENTERED="adsegmentreentered",e.AD_SKIPPED="adskipped",e.AD_PROGRESS="adprogress",e.AD_PAUSED="adpaused",e.AD_PLAYING="adplaying",e.AD_STALLED="adstalled",e.AD_BREAK_DISCARDED="adbreakdiscarded",e.AD_CLICK="adclick",e.SHOW_AD_UI="showadui",e.HIDE_AD_UI="hideadui",e.SQUEEZEBACK_START="squeezebackstart",e.SQUEEZEBACK_END="squeezebackend",e.COMPANION_AD_RENDERED="companionadrendered",e.PAUSE_ON_COMPANION_AD_EXPANDED="pauseoncompanionadexpanded",e.PLAY_ON_COMPANION_AD_COLLAPSED="playoncompanionadcollapsed",e.COMPANION_AD_CLOSED="companionadclosed",e.AUDIO_TRACK_CHANGE="audiotrackchange",e.AUDIO_TRACKS_CHANGE="audiotrackschange",e.QUALITY_CHANGE="qualitychange",e.QUALITIES_CHANGE="qualitieschange",e.CDN_CHANGE="cdnchange",e.CLOCK="aviaclock",e.CONTENT_START="contentstart",e.CONTENT_DURATION_AVAILABLE="contentdurationavailable",e.CONTENT_SEGMENT_START="contentsegmentstart",e.CONTENT_PLAYING="contentplaying",e.CONTENT_PROGRESS="contentprogress",e.CONTENT_PAUSED="contentpaused",e.CONTENT_SEGMENT_END="contentsegmentend",e.CONTENT_COMPLETE="contentcomplete",e.CONTENT_IS_PLAYING_LIVE="contentisplayinglive",e.STREAM_TYPE_CHANGE="streamtypechange",e.STREAM_METADATA="streammetadata",e.STREAM_ID_AVAILABLE="streamidavailable",e.DRM_KEY_SYSTEM_CREATED="drmkeysystemcreated",e.ERROR="error",e.PLAYBACK_STARTED="playbackstarted",e.PLAYBACK_SUSPENDED="playbacksuspended",e.PLAYBACK_RESUMED="playbackresumed",e.RESOURCE_START="resourcestart",e.RESOURCE_END="resourceend",e.RESOURCE_BUFFERING="resourcebuffering",e.WAITING_CHANGE="waitingchange",e.SEEK_COMPLETE="seekcomplete",e.SEEK_START="seekstart",e.SEEK_REDIRECT_START="seekredirectstart",e.SEEK_REDIRECT_COMPLETE="seekredirectcomplete",e.METADATA_CUEPOINT="metadatacuepoint",e.TEXT_CUEPOINT="textcuepoint",e.TEXT_TRACK_CHANGE="texttrackchange",e.TEXT_TRACKS_CHANGE="texttrackschange",e.TEXT_TRACK_ENABLED_CHANGE="texttrackenabledchange",e.TEXT_TRACK_AVAILABLE="texttrackavailable",e.THUMBNAIL_TRACK_AVAILABLE="thumbnailtrackavailable",e.LIVE_PRESENTATION_STOPPED="livepresentationstopped",e.PRESENTATION_SIZE_CHANGE="presentationsizechange",e.FULLSCREEN_CHANGE="fullscreenchange",e.LOG_EVENT="logevent",e.PLUGIN_EVENT="pluginevent",e.LANGUAGE_CHANGE="languagechange",e.AUTOPLAY_BLOCKED="autoplayblocked",e.VOLUME_CHANGE="volumechange",e.MUTE_CHANGE="mutechange",e.ACTIVE_STATE_CHANGE="activestatechange",e.PLAYBACK_STATE_CHANGE="playbackstatechange",e.METRIC="metric",e.VIDEO_ELEMENT_ADDED="videoelementadded",e.VIDEO_ELEMENT_REMOVED="videoelementremoved",e))(Bo||{});const jo=class e{static warn(e){Jo.deprecated(e)}static registerPlugins(){e.warn("The callback argument of the registerPlugins function is deprecated. Please use the promise returned by registerPlugins instead. Access to the info property will be removed July 1st, 2024.")}static checkEventName(t){e.events.includes(t)&&e.warn('The "'.concat(t,'" event has been deprecated. This check will be removed July 1st, 2024'))}static checkPlayerOptions(t){const n=e.playerOptions;Object.keys(t).forEach(t=>{const i=n.old.indexOf(t);i>-1&&e.warn('The "'.concat(t,'" player option has been deprecated. Please use "').concat(n.new[i],'". This check will be removed July 1st, 2024'))})}static log(){e.warn('The "log" method is deprecated. Please use the specific log level methods instead, i.e `logger.debug`, `logger.info`, etc.. This check will be removed July 1st, 2026')}static dir(){e.warn('The "dir" method is deprecated. Please use the specific log level methods instead, i.e `logger.debug`, `logger.info`, etc.. This check will be removed July 1st, 2026')}static clearOutOfBoundsLtsBuffer(){e.warn('The "resource.playback.lts.clearOutOfBoundsLtsBuffer" setting is deprecated and has no effect. The player now always seeks to the trailing edge when the LTS window moves past the paused position. This check will be removed July 1st, 2026')}static selectAudioLanguage(){e.warn('The `type` argument of the "selectAudioLanguage" method is deprecated. Please use the "selectAudioLanguage" method with the `options` parameter instead. This check will be removed July 1st, 2026')}};jo.events=[Bo.HOTKEY_ACTION],jo.playerOptions={old:["keyboardScope","networkTimeout","networkErrorRecovery"],new:["keyboard.scope","network.timeout","network.retryAttempts"]};let Vo=jo;var Ho=(e=>(e.OFF="off",e.ERROR="error",e.WARN="warn",e.INFO="info",e.DEBUG="debug",e.VERBOSE="verbose",e))(Ho||{}),zo=(e=>(e.LOG_EVENT="logevent",e.TIME_EVENT="logtimeevent",e.TIME_END_EVENT="logtimeendevent",e))(zo||{});const Ko=e=>{var t;return(null==(t=e.parent)?void 0:t.id)?"".concat(Ko(e.parent),"/").concat(e.id):e.id},Wo={[Ho.OFF]:0,[Ho.ERROR]:100,[Ho.WARN]:200,[Ho.INFO]:300,[Ho.DEBUG]:400,[Ho.VERBOSE]:500},Go=console?console.log.bind(console):()=>{},qo=console?console.info.bind(console):Go,Yo=console?console.warn.bind(console):Go,Qo=console?console.error.bind(console):Yo,Xo={[Ho.OFF]:()=>{}
2,[Ho.ERROR]:Qo,[Ho.WARN]:Yo,[Ho.INFO]:qo,[Ho.DEBUG]:Go,[Ho.VERBOSE]:qo},Zo=class e extends _i{constructor(e){super(e),this.startTime_={},this.parent_=this.opts.parent,this.id_=e.id||""===e.id&&!this.parent_?e.id:Qa(),this.logLevel=this.opts.logLevel?this.opts.logLevel:this.opts.debug?Ho.DEBUG:null,this.path_=Ko(this)}static error(e){Qo(e)}static warn(e){Yo(e)}static log(e){Go(e)}static deprecated(t){e.deprecatedCounts[t]>=e.maxDeprecatedWarnings||(e.warn(t),e.deprecatedCounts[t]=(e.deprecatedCounts[t]||0)+1)}destroy(){this.parent_=null,this.startTime_=null,super.destroy()}get id(){return this.id_}get path(){return this.path_}get parent(){return this.parent_}get logLevel(){var e;return this.logLevel_||(null==(e=this.parent)?void 0:e.logLevel)||Ho.OFF}set logLevel(e){this.logLevel_=e,this.level_=Wo[this.logLevel]}emit(e,t){var n;super.emit(e,t),null==(n=this.parent)||n.emit(e,t)}create(t){return null!=t.parent||(t.parent=this),new e(t)}assert(e,t){e||this.error('Assertion failed! - "'.concat(t||"",'"'))}log(e){Vo.log();for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];this.log_(e,...n)}dir(e,t,n){if(Vo.dir(),!this.shouldLog(e))return;const i=n||"Unnamed Object";this.emit(zo.LOG_EVENT,this.assembleEvent(t,e,i)),console.log(this.getStamp(),"Object:",i),console.dir(t)}error(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.log_(Ho.ERROR,...t)}warn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.log_(Ho.WARN,...t)}info(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.log_(Ho.INFO,...t)}debug(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.log_(Ho.DEBUG,...t)}verbose(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.log_(Ho.VERBOSE,...t)}time(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:performance.now();this.startTime_[e]?this.warn("Timer ".concat(e," already exists")):(this.startTime_[e]=t,this.emit(zo.TIME_EVENT,this.assembleEvent({startTime:t},Ho.INFO,e)))}timeEnd(e){if(!this.startTime_[e])return void this.warn("Timer ".concat(e," does not exist"));const t=this.startTime_[e];delete this.startTime_[e];const n=performance.now()-t;this.emit(zo.TIME_END_EVENT,this.assembleEvent({startTime:t,duration:n},Ho.INFO,e)),this.info("Timer: ".concat(e," ").concat(Math.round(n),"ms"))}log_(e){if(this.shouldLog(e)){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];1===n.length&&"function"==typeof n[0]&&(n[0]=n[0]());for(let t=0,i=n.length;t<i;t++)this.emit(zo.LOG_EVENT,this.assembleEvent(n[t],e));Xo[e](this.getStamp(),...n)}}assembleEvent(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return{id:this.id,item:e,level:t,label:n}}shouldLog(e){return this.level_>=Wo[e]}getStamp(){return"[".concat(this.path_,"] ").concat(Za(performance.now())," >")}};Zo.maxDeprecatedWarnings=1,Zo.deprecatedCounts={};let Jo=Zo;class $o{constructor(e,t,n){this.key=e,this.value=t,this.type=n,this.timeStamp=Date.now()}}function es(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;return new Promise((n,i)=>{const r=setInterval(()=>{try{e()&&(clearInterval(r),n())}catch(e){clearInterval(r),i(e)}},t)})}function ts(e,t,n){return n||(n=e instanceof HTMLVideoElement?"currentTime":"contentTime"),es(()=>e[n]>=t)}function ns(e){let t,n=!1,i=!1;return{run(r){return jn(this,null,function*(){i=!0;let a=r;for(let i=0;i<e.length&&(t=e[i](a),a=yield t,!n);i++);return t=null,i=!1,a})},get running(){return i},cancel(){return jn(this,null,function*(){return n=!0,yield t})}}}function is(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:NaN;return new Promise((i,r)=>{let a;const o=[],s=()=>o.forEach(e=>e()),l=e=>t=>{let n=t.target,i=t.events;const r=n,l=r.on?"on":"addEventListener",c=r.off?"off":"removeEventListener",u=(t,n)=>{clearTimeout(a),s(),e(n||t)};i.forEach(e=>{r[l](e,u),o.push(()=>r[c](e,u))})};e.forEach(l(i)),t.forEach(l(r)),n>-1&&(a=setTimeout(()=>{s(),r(new Error("timeout"))},n))})}const rs=Object.freeze(Object.defineProperty({__proto__:null,getFileExtension:Aa,getMimeType:Ea},Symbol.toStringTag,{value:"Module"})),as=Object.freeze(Object.defineProperty({__proto__:null,debounce:fa,throttle:function(e,t){let n,i=!1,r=null;const a=()=>{clearTimeout(n),n=null,i=!1,r=null},o=function(){for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];i?r=l:(a(),i=!0,e(...l),n=setTimeout(()=>{if(i=!1,null!=r){const e=r;r=null,o(...e)}
2},t))};return o.cancel=a,o.flush=e,o.pending=()=>i,o}},Symbol.toStringTag,{value:"Module"})),os=Object.freeze(Object.defineProperty({__proto__:null,compareLanguageTags:function(e,t){if(e===t)return!0;const n=pa(e),i=pa(t);if(n.language.slice(0,2).toLowerCase()===i.language.slice(0,2).toLowerCase()){const e=n.region.toUpperCase(),t=i.region.toUpperCase();return e===t||!!e&&!t||!e&&!!t}return!1},parseLanguageTag:pa},Symbol.toStringTag,{value:"Module"})),ss=new Jo({id:"",logLevel:Ho.OFF}),ls={};function cs(){return ls}function us(e,t){if(!e)throw new Ca(t)}var ds=(e=>(e.CREATE_PLAYER="createplayer",e.REMOVE_PLAYER="removeplayer",e.DEVICE_CAPABILITIES="devicecapabilities",e.SCRIPT_LOAD="scriptload",e))(ds||{});class hs extends ka{constructor(e,t,n){super(hs.getErrorCode(e),t,n,!0,Sa.HOOK),this.type=e,this.name="HookError"}static getErrorCode(e){switch(e){case ds.CREATE_PLAYER:return Ui.CREATE_PLAYER_HOOK;case ds.REMOVE_PLAYER:return Ui.REMOVE_PLAYER_HOOK;case ds.DEVICE_CAPABILITIES:return Ui.DEVICE_CAPABILITIES;case ds.SCRIPT_LOAD:return Ui.SCRIPT_LOAD;case Yn.AD:return Ui.AD_HOOK;case Yn.AD_BREAK:return Ui.AD_BREAK_HOOK;case Yn.ATTACH_RESOURCE:return Ui.ATTACH_RESOURCE_HOOK;case Yn.EVENT:return Ui.EVENT_HOOK;case Yn.REQUEST:return Ui.REQUEST_HOOK;case Yn.RESPONSE:return Ui.RESPONSE_HOOK;default:return Ui.HOOK_ERROR}}}class fs{constructor(e,t,n){this.hookMap={},this.hookConfig=null,this.context=null,this.player=null,this.hookConfig=e,this.context=t,this.player=n}destroy(){this.hookMap=null,this.hookConfig=null,this.context=null,this.player=null}hasHook(e){const t=this.hookMap[e];return(null==t?void 0:t.length)>0}defineHook(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{multiple:!0};us(!this.hookConfig[e],"Hook type already exists: ".concat(e)),this.hookConfig[e]=t}validateHookType(e){us(e in this.hookConfig,"Invalid hook type: ".concat(e))}registerHook(e,t){var n;this.validateHookType(e),this.hookMap[e]||(this.hookMap[e]=[]),!1===(null==(n=this.hookConfig[e])?void 0:n.multiple)&&this.hookMap[e].length||this.hookMap[e].includes(t)||this.hookMap[e].push(t)}removeHook(e,t){this.validateHookType(e),this.hookMap[e]&&(this.hookMap[e]=this.hookMap[e].filter(e=>e!==t))}applyHook(e,t,n){return jn(this,null,function*(){var i,r=this;const a=null==(i=this.hookMap)?void 0:i[e];if(!a||0===a.length)return t;let o=!1;const s=Bn(Un({type:e,value:null,metadata:n,cancel:()=>o=!0},this.context),{player:this.player}),l=function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return jn(r,null,function*(){if(n>=a.length)return t;const i=a[n];if("function"!=typeof i)throw new hs(e,"Hook must be a valid function");s.value=t;try{yield i(s)}catch(t){throw new hs(e,t.toString(),t)}return o?null:l(s.value,++n)})};return l(t)})}}const ps={[Yn.EVENT]:{multiple:!0},[Yn.AD_BREAK]:{multiple:!1},[Yn.AD]:{multiple:!1},[Yn.ATTACH_RESOURCE]:{multiple:!0},[Yn.REQUEST]:{multiple:!0},[Yn.RESPONSE]:{multiple:!0},[Yn.SEEK]:{multiple:!0}},ms=Bn(Un({},ps),{[ds.CREATE_PLAYER]:{multiple:!0},[ds.REMOVE_PLAYER]:{multiple:!0},[ds.DEVICE_CAPABILITIES]:{multiple:!0},[ds.SCRIPT_LOAD]:{multiple:!0}}),gs={get avia(){return nr.appNamespace},logger:ss,buildInfo:Uo,system:nr},vs=new fs(ms,gs);function ys(e){return vs.hasHook(e)}function bs(e,t,n){return vs.applyHook(e,t,n)}const As=class e extends Ii{static load(t){return new Promise((n,i)=>{t.onComplete=e=>{let t=e.detail;return t.error||t.timedOut?i(t):n(t)},new e(t)})}constructor(t){const n=Object.assign({timeout:wi.TIMEOUT},t||{});n.timeout||(n.timeout=wi.TIMEOUT),super(n),this.timeoutHandles={},this.map={};const i=this.hasListenerFor(e.event.COMPLETE);if(this.opts.url&&i)this.loadScript(this.opts.url);else{if(!this.opts.urls||!i)throw new Error("Script load error: Missing url or listener. url: ".concat(this.opts.url||this.opts.urls,", hasListener: ").concat(i));this.loadScripts(this.opts.urls)}}destroy(){if(this.timeoutHandles){for(const e in this.timeoutHandles)clearTimeout(this.timeoutHandles[e]);this.timeoutHandles=null,super.destroy()}}loadScript(t,n){const i=document.createElement("script"),r="https:"===window.location.protocol?t.replace("http:","https:"):t;this.map[r]={hLoad:()=>this.hLoadOrError(r),hError:()=>this.hLoadOrError(r,!0,!1),scriptEl:i};const a=this.map[r];n&&this.on(e.event.COMPLETE,n),i.async=!0,i.addEventListener("load",a.hLoad),i.addEventListener("error",a.hError),this.timeoutHandles[r]=setTimeout(()=>this.hLoadOrError(r,!0,!0),this.opts.timeout),document.head.appendChild(i),i.src=r}loadScripts(t,n){n&&this.on(e.event.COMPLETE,n);for(let e=0,n=t.length;e<n;e++)this.loadScript(t[e])}hLoadOrError(t,n,i){clearTimeout(this.timeoutHandles[t]),delete this.timeoutHandles[t];const r=this.map[t];r.scriptEl.removeEventListener("load",r.hLoad),r.scriptEl.removeEventListener("error",r.hError);for(const e in r)delete r[e];delete this.map[t],n&&this.shouldRetry()?(this.incrementAttempts(),setTimeout(()=>{this.loadScript(t)}
2,this.retryInterval)):this.emit(e.event.COMPLETE,{url:t,error:n,timedOut:!0===i})}};As.event={COMPLETE:"complete"};let Es=As;function Ts(e){const t=new URL(e,window.location.toString());return(nr.isWebOs||"file:"===t.protocol&&/^\/\//.test(e))&&(t.protocol="https:"),t.toString()}const ws=Object.freeze(Object.defineProperty({__proto__:null,applyRequestToXhr:function(e,t){oi(e.headers).forEach(e=>{let n=(0,x.A)(e,2),i=n[0],r=n[1];t.setRequestHeader(i,r)}),t.withCredentials=e.credentials===Ei.INCLUDE},createRequest:function(e){return{url:e,headers:arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},credentials:arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ei.SAME_ORIGIN}},getHeader:function(e,t){var n;if(!e||!t)return null;const i=new RegExp("".concat(e,":([^\\n\\r]+)"),"i");return null==(n=t.match(i))?void 0:n[1].trim()},loadScript:function(e,t,n){return jn(this,null,function*(){const i=ri({network:{}},cs(),t),r=i.overrides,a=i.network;yield Es.load({url:Ts(e.url),timeout:(null==r?void 0:r.streamingLibLoaderTimeout)||a.timeout,errorRecovery:ri({},a,e.errorRecovery)});const o=(null==n?void 0:n())||{},s={url:e.url};return bs(ds.SCRIPT_LOAD,o,s)})},makeUrl:Ts},Symbol.toStringTag,{value:"Module"}));function Ss(e,t){(null==e?void 0:e.style)&&(null==t?void 0:t.style)&&Object.assign(t.style,e.style)}function Cs(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;const a={};return e&&(a.backgroundImage="url(".concat(e,")")),t&&(a.width="".concat(t,"px")),n&&(a.height="".concat(n,"px")),0!==i&&(a.backgroundPositionX="-".concat(i,"px")),0!==r&&(a.backgroundPositionY="-".concat(r,"px")),a}const ks=Object.freeze(Object.defineProperty({__proto__:null,createThumbnailStyles:Cs,renderThumbnail:Ss},Symbol.toStringTag,{value:"Module"})),xs=Object.freeze(Object.defineProperty({__proto__:null,stringToXml:function(e){return(new DOMParser).parseFromString(e,"text/xml")},xmlToJson:function e(t){let n={};if(1===t.nodeType&&t.attributes.length>0)for(let e=0,i=t.attributes.length;e<i;e++){const i=t.attributes.item(e);n[i.nodeName]=i.nodeValue}else 3===t.nodeType&&(n=t.nodeValue);if("p"===t.nodeName&&(n.text="",t.childNodes.forEach(e=>{if("metadata"===e.nodeName)return;const t=(new XMLSerializer).serializeToString(e);
21===e.nodeType&&(n.text+="br"===e.tagName?"\n":t),3===e.nodeType&&(n.text+=t)})),t.hasChildNodes())for(let i=0,r=t.childNodes.length;i<r;i++){const r=t.childNodes.item(i),a=r.nodeName;if(vi(n[a]))n[a]=e(r);else{if(vi(n[a].push)){const e=n[a];n[a]=[],n[a].push(e)}n[a].push(e(r))}}return n},xmlToString:function(e){return(new XMLSerializer).serializeToString(e)}},Symbol.toStringTag,{value:"Module"})),Ns=Un(Un(Un(Un(Un(Un(Un(Bn(Un(Un(Un(Un(Un(Un(Un(Bn(Un({},Eo),{eventsToPromise:is}),rs),as),os),ws),Da),di),Ka),{request:Ri}),Ga),ao),ks),po),bi),lr),xs);var _s=(e=>(e.ENTER_FULLSCREEN="mediaenterfullscreen",e.INCREASE_VOLUME="mediaincreasevolume",e.DECREASE_VOLUME="mediadecreasevolume",e.SEEK_BACK="mediaskipbackward",e.SEEK_FORWARD="mediaskipforward",e.TOGGLE_PLAY="mediaplaypause",e.TOGGLE_TT="mediatexttrack",e.TOGGLE_MUTE="mediamuteunmute",e.PLAYLIST_NEXT="mediaplaylistnext",e.PLAYLIST_PREV="mediaplaylistprevious",e.STOP="mediastop",e))(_s||{}),Is=(e=>(e.NONE="none",e.PLAY="play",e.PAUSE="pause",e.PLAY_PAUSE="playpause",e.STOP="stop",e.FAST_FORWARD="fastforward",e.REWIND="rewind",e.FULLSCREEN="fullscreen",e.SKIP_FORWARD="skipforward",e.SKIP_BACKWARD="skipbackward",e.CAPTIONS="texttrack",e.TEXT_TRACK="texttrack",e.INFO="info",e.INCREASE_VOLUME="increasevolume",e.DECREASE_VOLUME="decreasevolume",e.MUTE_UNMUTE="muteunmute",e.PLAYLIST_NEXT="playlistnext",e.PLAYLIST_PREVIOUS="playlistprevious",e.LEFT="left",e.RIGHT="right",e.UP="up",e.DOWN="down",e.SELECT="select",e.CANCEL="cancel",e.SPACE="space",e.BACK="back",e.RECORD="record",e.LIVE="live",e))(Is||{}),Os=(e=>(e.DEFAULT="default",e.HOTKEY="hotkey",e.AD="ad",e))(Os||{}),Ds=(e=>(e.ACTIVE="active",e.INACTIVE="inactive",e.IDLE="idle",e))(Ds||{}),Rs=(e=>(e.PRE="PRE",e.MID="MID",e.POST="POST",e))(Rs||{}),Ps=(e=>(e.SSAI="ssai",e.CSAI="csai",e.POD_SERVING="ssai_podserving",e))(Ps||{}),Ls=(e=>(e.PLAY="play",e.PAUSE="pause",e.SEEK="seek",e.GO_LIVE="go_live",e))(Ls||{}),Ms=(e=>(e.MAIN="main",e.DESCRIPTION="description",e.ALTERNATE="alternate",e))(Ms||{}),Fs=(e=>(e.NONE="none",e.ATTEMPT_MUTED="attemptMuted",e.ATTEMPT_UNMUTED="attemptUnmuted",e.ATTEMPT_UNMUTED_THEN_MUTED="attemptUnmutedThenMuted",e))(Fs||{}),Us=(e=>(e.UNKNOWN="unknown",e.DETECTED="detected",e.INFERRED="inferred",e))(Us||{}),Bs=(e=>(e.SW_SECURE_CRYPTO="SW_SECURE_CRYPTO",e.SW_SECURE_DECODE="SW_SECURE_DECODE",e.HW_SECURE_CRYPTO="HW_SECURE_CRYPTO",e.HW_SECURE_DECODE="HW_SECURE_DECODE",e.HW_SECURE_ALL="HW_SECURE_ALL",e.UNKNOWN="unknown",e))(Bs||{}),js=(e=>(e.USABLE="usable",e.OUTPUT_RESTRICTED="output-restricted",e.UNKNOWN="unknown",e))(js||{}),Vs=(e=>(e.MULTI_CDN="x-cdn",e))(Vs||{}),Hs=(e=>(e.DOWN="keydown",e.UP="keyup",e.PRESS="keypress",e))(Hs||{}),zs=(e=>(e.NONE="none",e.DOCUMENT="document",e.PLAYER="player",e))(zs||{});const Ks={ALT:18,BACKSPACE:8,CAPS_LOCK:20,CONTROL:17,END:35,ENTER:13,TAB:9,SHIFT:16,ESCAPE:27,PAGE_UP:33,PAGE_DOWN:34,LEFT_ARROW:37,UP_ARROW:38,RIGHT_ARROW:39,DOWN_ARROW:40,INSERT:45,DELETE:46,SPACE:32,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,NUM_0:96,NUM_1:97,NUM_2:98,NUM_3:99,NUM_4:100,NUM_5:101,NUM_6:102,NUM_7:103,NUM_8:104,NUM_9:105,MULTIPLY:106,ADD:107,SUBTRACT:109,DECIMAL:110,DIVIDE:111,SEMICOLON:186,EQUAL:187,COMMA:188,DASH:189,PERIOD:190,FORWARD_SLASH:191,BACKSLASH:220,GRAVE_ACCENT:192,OPEN_BRACKET:219,CLOSE_BRACKET:221,SINGLE_QUOTE:222,MINUS:173,PAUSE:19,MEDIA_PLAY_PAUSE:179,MEDIA_STOP:178,MEDIA_INCREASE_VOLUME:175,MEDIA_INCREASE_VOLUME_ALT:183,MEDIA_DECREASE_VOLUME:174,MEDIA_DECREASE_VOLUME_ALT:182,MEDIA_TRACK_NEXT:176,MEDIA_TRACK_PREVIOUS:177,MEDIA_REWIND:9e3,MEDIA_FAST_FORWARD:9001,MEDIA_RECORD:9002,MEDIA_PLAY:9003,MEDIA_PAUSE:9004,MEDIA_CAPTIONS:9005,MEDIA_INFO:9006,MEDIA_LIVE:9007};var Ws=(e=>(e.MEDIA_PLAYER="media-player",e.LEARN_MORE="learn-more",e))(Ws||{}),Gs=(e=>(e.EN="English",e.ES="Español",e.FR="Français",e.PT="Português",e.DE="Deutsche",e.PL="Polski",e.JA="æ¥æ¬äºº",e.KO="íêµì´",e.ZH="ç®ä½ä¸æ",e.IT="Italiano",e.RU="Ð ÑÑÑкий",e))(Gs||{}),qs=(e=>(e.PLAYER_CREATION="player-creation",e.RESOURCE_ATTACHMENT="resource-attachment",e.AD_ADAPTER_CREATION="ad-adapter-creation",e.AD_RESOURCE_CREATION="ad-resource-creation",e.PLAYBACK_ADAPTER_CREATION="playback-adapter-creation",e.RESOURCE_LOAD="resource-load",e.RESOURCE_PLAYBACK="resource-playback",e.FIRST_FRAME="first-frame",e))(qs||{}),Ys=(e=>(e.ENTER_FULLSCREEN="mediaenterfullscreen",e.INCREASE_VOLUME="mediaincreasevolume",e.DECREASE_VOLUME="mediadecreasevolume",e.SEEK_BACK="mediaskipbackward",e.SEEK_FORWARD="mediaskipforward",e.TOGGLE_PLAY="mediaplaypause",e.TOGGLE_TT="mediatexttrack",e.TOGGLE_MUTE="mediamuteunmute",e.PLAYLIST_NEXT="mediaplaylistnext",e.PLAYLIST_PREV="mediaplaylistprevious",e.STOP="mediastop",e))(Ys||{}),Qs=(e=>(e.API="api",e.UI="ui",e.MARK="mark",e.MEASURE="measure",e))(Qs||{}),Xs=(e=>(e.AUTO="auto",e.DESKTOP="desktop",e.MOBILE="mobile",e.TV="tv",e.LOW="low",e))(Xs||{}),Zs=(e=>(e.IDLE="idle",e.STOPPED="stopped",e.PLAYING="playing",e.PAUSED="paused",e.WAITING="waiting",e))(Zs||{}),Js=(e=>(e.LOW="low",e.HIGH="high",e))(Js||{}),$s=(e=>(e[e.DEFINITION=0]="DEFINITION",e[e.HEIGHT=1]="HEIGHT",e[e.BITRATE=2]="BITRATE",e[e.CUSTOM=3]="CUSTOM",e))($s||{}),el=(e=>(e.AUTO="auto",e.MANUAL="manual",e.UNAVAILABLE="unavailable",e))(el||{});
2const tl={VOD:"VOD",LIVE:"LIVE",LTS:"DVR",DVR:"DVR"};["VOD","LIVE","LTS","DVR"].forEach(e=>{Object.defineProperty(tl,e,{get:()=>("DVR"===e&&Vo.warn('StreamType.DVR is deprecated in favor of StreamType.LTS; "DVR" will be removed April 1, 2025.'),"LTS"===e?"DVR":e)})});var nl=(e=>(e.SEEK_BY="seek_by",e))(nl||{});class il extends ka{constructor(e,t){super(Ui.ACTION_KEY,e,t,!1,Sa.ACTION_KEY)}}class rl extends ka{constructor(e){super(Ui.INVALID_ARGUMENT,e,null,!1,Sa.API),this.name="InvalidArgumentError"}}class al extends ka{constructor(e,t,n,i){super(e,t,i,!0,Sa.PLUGIN),this.name="PluginError",this.config=n}}const ol=class e extends _i{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:250;super({}),this.timer=NaN,this.pCount=0,this.pInterval=e}destroy(){this.stop(),super.destroy()}start(){this.running||(this.timer=setInterval(()=>{this.pCount++,this.emit(e.TIC_EVENT,{count:this.pCount})},this.pInterval))}stop(){clearInterval(this.timer),this.timer=NaN,this.pCount=0}get running(){return!isNaN(this.timer)}get interval(){return this.pInterval}get count(){return this.pCount}};ol.TICK="tic",ol.TIC_EVENT=ol.TICK;let sl=ol;const ll={[Ks.ENTER]:Is.SELECT,[Ks.ESCAPE]:Is.CANCEL,[Ks.UP_ARROW]:Is.UP,[Ks.DOWN_ARROW]:Is.DOWN,[Ks.LEFT_ARROW]:Is.LEFT,[Ks.RIGHT_ARROW]:Is.RIGHT,[Ks.MEDIA_PLAY]:Is.PLAY,[Ks.MEDIA_PAUSE]:Is.PAUSE,[Ks.PAUSE]:Is.PAUSE,[Ks.MEDIA_PLAY_PAUSE]:Is.PLAY_PAUSE,[Ks.MEDIA_STOP]:Is.STOP,[Ks.MEDIA_INCREASE_VOLUME]:Is.INCREASE_VOLUME,[Ks.MEDIA_INCREASE_VOLUME_ALT]:Is.INCREASE_VOLUME,[Ks.MEDIA_DECREASE_VOLUME]:Is.DECREASE_VOLUME,[Ks.MEDIA_DECREASE_VOLUME_ALT]:Is.DECREASE_VOLUME,[Ks.MEDIA_TRACK_NEXT]:Is.PLAYLIST_NEXT,[Ks.MEDIA_TRACK_PREVIOUS]:Is.PLAYLIST_PREVIOUS,[Ks.MEDIA_CAPTIONS]:Is.TEXT_TRACK,[Ks.MEDIA_INFO]:Is.INFO,[Ks.MEDIA_FAST_FORWARD]:Is.FAST_FORWARD,[Ks.MEDIA_REWIND]:Is.REWIND,[Ks.MEDIA_RECORD]:Is.RECORD,[Ks.BACKSPACE]:Is.BACK,[Ks.MEDIA_LIVE]:Is.LIVE},cl={[Ks.F]:Is.FULLSCREEN,[Ks.UP_ARROW]:Is.INCREASE_VOLUME,[Ks.DOWN_ARROW]:Is.DECREASE_VOLUME,[Ks.LEFT_ARROW]:Is.SKIP_BACKWARD,[Ks.RIGHT_ARROW]:Is.SKIP_FORWARD,[Ks.SPACE]:Is.PLAY_PAUSE,[Ks.M]:Is.MUTE_UNMUTE,[Ks.SUBTRACT]:Is.MUTE_UNMUTE,[Ks.MINUS]:Is.MUTE_UNMUTE,[Ks.C]:Is.TEXT_TRACK},ul={[Ks.LEFT_ARROW]:Is.NONE,[Ks.RIGHT_ARROW]:Is.NONE,[Ks.MEDIA_FAST_FORWARD]:Is.NONE,[Ks.MEDIA_REWIND]:Is.NONE},dl={[Os.DEFAULT]:ll,[Os.HOTKEY]:cl,[Os.AD]:ul};function hl(e){return dl[e]}const fl=nr.language||"en",pl={},ml={en:{[Ws.MEDIA_PLAYER]:"Media Player",[Ws.LEARN_MORE]:"Learn More"},es:{[Ws.MEDIA_PLAYER]:"Reproductor multimedia",[Ws.LEARN_MORE]:"Aprende más"}};class gl{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.localizationData_=new Set,this.locale_={},this.parent_=e.parent,this.logger_=e.logger||ss}get defaultLanguage(){return fl}get parent(){return this.parent_}get language(){return this.language_||fl}get languageTag(){return this.languageTag_}getValue(e){const t=t=>{var n;return((null==(n=this.locale_)?void 0:n[t])||{})[e]};return t(arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.language)||t(this.languageTag_.language)}changeLanguage(e){this.language_=e,this.languageTag_=pa(this.language);const t=new RegExp("^".concat(this.languageTag_.language),"i"),n=e=>{let t=(0,x.A)(e,2),n=t[0],i=t[1];return(r=i,null==pl[r]&&(pl[r]=Ri({url:r,responseType:Ti.JSON})),pl[r]).then(e=>[n,e]).catch(e=>(this.logger_.error("Could not load locale file ".concat(i),e),[n,{}]));var r},i=Array.from(this.localizationData_).map(e=>{const i=oi(e).filter(e=>t.test(e[0])).map(e=>"string"==typeof e[1]?n(e):e);return Promise.all(i)});return Promise.all(i).then(e=>{const t=ri(...e.map(e=>si(e)));return this.locale_=t})}create(e){return null!=e.parent||(e.parent=this),new gl(e)}registerLocalizationData(e){mi(e)||(this.localizationData_.add(e),this.changeLanguage(this.language))}localize(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.language;var i;return io(this.getValue(e,n)||(null==(i=this.parent)?void 0:i.localize(e,t,n))||e,t)}destroy(){this.parent_=null,this.locale_=null,this.languageTag_=null,this.localizationData_=null}}const vl=new gl;vl.registerLocalizationData(ml);var yl=(e=>(e.Logging="Logging",e.Tracking="Tracking",e.TrackingService="TrackingService",e.AutoplayCapabilities="AutoplayCapabilities",e))(yl||{}),bl=(e=>(e.AdDataProxy="AdDataProxy",e.ContentPlaybackStateProxy="ContentPlaybackStateProxy",e.VideoProxy="VideoProxy",e.PlayerDomProxy="PlayerDomProxy",e.ModelCollectionProxy="ModelCollectionProxy",e.ResourceProxy="ResourceProxy",e.TrackingConfigProxy="TrackingConfigProxy",e.PerformanceProxy="PerformanceProxy",e.TextTrackProxy="TextTrackProxy",e.LocalizationProxy="LocalizationProxy",e.AdapterProxy="AdapterProxy",e.HookProxy="HookProxy",e))(bl||{});class Al{constructor(){}}const El=class e{constructor(t){e.serviceContainerMap[t]?Jo.error(Al.E
2RROR_KEY_EXISTS.replace("$ACTOR_NAME$","ServiceContainer")):(this.multiCoreKey=t,this.serviceMap={})}static getInstance(t){return t?(null==this.serviceContainerMap[t]&&(this.serviceContainerMap[t]=new e(t)),this.serviceContainerMap[t]):null}static removeServiceContainer(e){this.serviceContainerMap[e]&&this.serviceContainerMap[e].destroy(),delete this.serviceContainerMap[e]}destroy(){for(const e in this.serviceMap)this.removeService(e);this.serviceMap=null}registerService(e){this.serviceMap[e.name]=e,e.onRegister(this.multiCoreKey)}retrieveService(e){return this.serviceMap[e]||null}hasService(e){return null!=this.serviceMap[e]}removeService(e){this.serviceMap[e]&&this.serviceMap[e].destroy(),delete this.serviceMap[e]}};El.serviceContainerMap={};let Tl=El;class wl{constructor(e,t){this.setNotifyMethod(e),this.setNotifyContext(t)}destroy(){this.context=null,this.notify=null}setNotifyMethod(e){this.notify=e}setNotifyContext(e){this.context=e}getNotifyMethod(){return this.notify}getNotifyContext(){return this.context}notifyObserver(e){this.getNotifyMethod().call(this.getNotifyContext(),e)}compareNotifyContext(e){return e===this.context}}const Sl=class e{constructor(t){null==e.viewMap[t]?(this.multiCoreKey=t,this.mediatorMap={},this.observerMap={},e.viewMap[this.multiCoreKey]=this,this.initializeView()):Jo.error(Al.ERROR_KEY_EXISTS.replace("$ACTOR_NAME$","View"))}static getInstance(t){return t?(this.viewMap[t]||(this.viewMap[t]=new e(t)),this.viewMap[t]):null}static removeView(e){this.viewMap[e]&&this.viewMap[e].destroy(),delete this.viewMap[e]}destroy(){for(const e in this.mediatorMap)this.removeMediator(this.mediatorMap[e].name);this.mediatorMap=null,this.observerMap=null}registerObserver(e,t){null!=this.observerMap[e]?this.observerMap[e].push(t):this.observerMap[e]=[t]}notifyObservers(e){let t,n;if(null!=this.observerMap[e.name]){const i=this.observerMap[e.name],r=[];let a;for(t=0,n=i.length;t<n;t++)a=i[t],r.push(a);for(t=0,n=r.length;t<n;t++)a=r[t],a.notifyObserver(e)}}removeObserver(e,t){if(!this.observerMap)return;const n=this.observerMap[e];let i=n.length;for(;i--;)if(!0===n[i].compareNotifyContext(t)){n.splice(i,1);break}0===n.length&&delete this.observerMap[e]}registerMediator(e){const t=e.name;let n,i,r;if(this.mediatorMap[t])return;e.initializeNotifier(this.multiCoreKey),this.mediatorMap[t]=e;const a=e.listNotificationInterests();if(a.length>0)for(r=new wl(e.handleNotification,e),n=0,i=a.length;n<i;n++)this.registerObserver(a[n],r);e.onRegister()}retrieveMediator(e){return this.mediatorMap[e]}removeMediator(e){const t=this.mediatorMap[e];if(t){const n=t.listNotificationInterests();let i=n.length;for(;i--;)this.removeObserver(n[i],t);delete this.mediatorMap[e],t.onRemove()}}hasMediator(e){return null!=this.mediatorMap[e]}initializeView(){}};Sl.viewMap={};let Cl=Sl;const kl=class e{constructor(t){e.controllerMap[t]?Jo.error(Al.ERROR_KEY_EXISTS.replace("$ACTOR_NAME$","Controller")):(this.multiCoreKey=t,e.controllerMap[this.multiCoreKey]=this,this.commandMap={},this.view=null,this.initializeController())}static getInstance(t){return t?(this.controllerMap[t]||(this.controllerMap[t]=new e(t)),this.controllerMap[t]):null}static removeController(e){this.controllerMap[e]&&this.controllerMap[e].destroy(),delete this.controllerMap[e]}destroy(){for(const e in this.commandMap)this.removeCommand(e);this.commandMap=null,this.view=null}initializeController(){this.view=Cl.getInstance(this.multiCoreKey)}executeCommand(e){const t=this.commandMap[e.name];if(!t)return;const n=new t;n.initializeNotifier(this.multiCoreKey),n.execute(e)}registerCommand(e,t){this.commandMap[e]||this.view.registerObserver(e,new wl(this.executeCommand,this)),this.commandMap[e]=t}hasCommand(e){return!!this.commandMap[e]}removeCommand(e){this.hasCommand(e)&&(this.view.removeObserver(e,this),this.commandMap[e]=null)}};kl.controllerMap={};let xl=kl;const Nl=class e{constructor(t){this.proxyMap=null,e.modelMap[t]?Jo.error(Al.ERROR_KEY_EXISTS.replace("$ACTOR_NAME$","Model")):(this.multiCoreKey=t,e.modelMap[t]=this,this.proxyMap={},this.initializeModel())}static getInstance(t){return t?(null==this.modelMap[t]&&(this.modelMap[t]=new e(t)),this.modelMap[t]):null}static removeModel(e){this.modelMap[e]&&this.modelMap[e].destroy(),delete this.modelMap[e]}destroy(){for(const e in this.proxyMap)this.removeProxy(e);this.proxyMap=null}initializeModel(){}registerProxy(e){this.proxyMap[e.name]=e,e.initializeNotifier(this.multiCoreKey),e.onRegister()}retrieveProxy(e){return this.proxyMap[e]||null}hasProxy(e){return null!=this.proxyMap[e]}removeProxy(e){const t=this.proxyMap[e];t&&(t.onRemove(),this.proxyMap[e]=null)}};Nl.modelMap={};let _l=Nl;class Il{constructor(e,t,n){this.pName=e,this.pBody=t,this.pType=n}get name(){return this.pName}get body(){return this.pBody}get type(){return this.pType||null}toString(){const e="\nBody: ".concat(null==this.pBody?"null":JSON.stringify(this.body)),t="\nType: ".concat(null==this.pType?"null":this.t
2ype);return"Notification Name: ".concat(this.name+e+t)}}const Ol=class e{constructor(e,t){this.model=null,this.view=null,this.controller=null,this.serviceContainer=null,this.initialized=!1,this.multiCoreKey=e,this.initializeFacade(),this.registerCommands(t)}static removeCore(e){this.facadeMap[e]&&(_l.removeModel(e),Cl.removeView(e),xl.removeController(e),Tl.removeServiceContainer(e),this.facadeMap[e].destroy(),delete this.facadeMap[e])}static hasCore(t){return null!=e.facadeMap[t]}static getInstance(e){if(!e)throw new Error(Al.ERROR_NO_KEY);return this.facadeMap[e]}static createFacade(t,n){if(!t)throw new Error(Al.ERROR_NO_KEY);if(this.facadeMap[t]){const e=new Error('Not creating facade - key "'.concat(t,'" already exists!'));throw e.key=t,e}return this.facadeMap[t]=new e(t,n),this.facadeMap[t]}destroy(){this.model=null,this.view=null,this.controller=null,this.serviceContainer=null}get key(){return this.multiCoreKey}get appId(){return this.multiCoreKey}get logger(){return this.retrieveService(yl.Logging).logger}registerCommand(e,t){this.controller.registerCommand(e,t)}removeCommand(e){this.controller.removeCommand(e)}hasCommand(e){return this.controller.hasCommand(e)}registerProxy(e){this.model.registerProxy(e)}retrieveProxy(e){return this.model?this.model.retrieveProxy(e):null}removeProxy(e){this.model&&this.model.removeProxy(e)}hasProxy(e){return this.model.hasProxy(e)}registerMediator(e){this.view.registerMediator(e)}retrieveMediator(e){return this.view?this.view.retrieveMediator(e):null}removeMediator(e){this.view&&this.view.removeMediator(e)}hasMediator(e){return this.view.hasMediator(e)}registerService(e){this.serviceContainer.registerService(e)}retrieveService(e){return this.serviceContainer?this.serviceContainer.retrieveService(e):null}removeService(e){this.model&&this.serviceContainer.removeService(e)}hasService(e){return this.serviceContainer.hasService(e)}registerGlobalServices(e){for(const t in e)this.registerService(e[t])}sendNotification(e,t,n){let i;i="string"==typeof t?new Il(e,{},t):new Il(e,t,n),this.notifyObservers(i)}notifyObservers(e){null!=this.view&&this.view.notifyObservers(e)}registerCommands(e){if(e)for(const t in e)e[t]&&this.registerCommand(t,e[t])}initializeServiceContainer(){this.serviceContainer=Tl.getInstance(this.multiCoreKey)}initializeController(){this.controller=xl.getInstance(this.multiCoreKey)}initializeModel(){this.model=_l.getInstance(this.multiCoreKey)}initializeView(){this.view=Cl.getInstance(this.multiCoreKey)}initializeFacade(){if(this.initialized)throw new Error("Unexpected Condition: Facade already initialized");this.initializeModel(),this.initializeController(),this.initializeView(),this.initializeServiceContainer(),this.initialized=!0}};Ol.facadeMap={};let Dl=Ol;class Rl{constructor(e){this.pName=e}get name(){return this.pName}destroy(){}onRegister(e){this.facadeKey=e}getLogger(){return this.getService(yl.Logging).logger}getService(e){return Dl.getInstance(this.facadeKey).retrieveService(e)}getModel(e){return this.getModelCollection().getModel(e)}getModelCollection(){var e;return null==(e=Dl.getInstance(this.facadeKey))?void 0:e.retrieveProxy(bl.ModelCollectionProxy)}}class Pl extends Rl{constructor(){super(yl.AutoplayCapabilities),this.testDom=null,this.checkCompleted=!1,this.testVideoSrc=zn.blankDataUrl,this.isMobile=null,this.info={supportsUnmutedAutoplay:null,supportsMutedAutoplay:null},nr.supportsUnrestrictedAutoplay&&(this.setInfo(!0,!0),this.checkCompleted=!0)}static getInstance(){return this.instance||(this.instance=new Pl),this.instance}get autoplayInfo(){return this.info}destroy(){clearTimeout(this.timeout),super.destroy()}detectCapabilities(e){return this.detecting?this.detecting:(e&&(this.testVideoSrc=e),this.detecting=new Promise(e=>{this.checkCompleted?e(this.info):(this.createTestDom(),this.internalCallback=()=>e(this.info),this.checkUnmutedAutoplay())}))}finishCheck(e,t){this.setInfo(e,t),this.checkCompleted=!0,this.internalCallback(),this.timeout=setTimeout(()=>this.cleanUp(),100)}setInfo(e,t){this.info.supportsUnmutedAutoplay=e,this.info.supportsMutedAutoplay=t}cleanUp(){this.testDom&&this.testDom.parentNode.removeChild(this.testDom),this.testDom=null}checkUnmutedAutoplay(){const e=this.createVideoElement(!1);if(!e)return void this.finishCheck(!0,!0);e.load();const t=e.play();void 0===t?this.isMobile?this.detectMobileCapabilities():this.finishCheck(!0,!0):t.then(()=>{this.finishCheck(!0,!0)}).catch(e=>{this.checkMutedAutoplay()})}checkMutedAutoplay(){if(this.isEarlySafari11())return void this.finishCheck(!1,!1);const e=this.createVideoElement(!0);e.load(),e.play().then(()=>{this.finishCheck(!1,!0)}).catch(t=>{if(e.error&&this.testVideoSrc!==zn.blankDataUrl)return this.testVideoSrc=zn.blankDataUrl,void this.checkUnmutedAutoplay();this.finishCheck(!1,!1)})}isEarlySafari11(){const e=nr.browser===zi.SAFARI&&nr.device===Ki.DESKTOP,t=e?nr.browserVersionInfo.majorVersion:null,n=e?nr.browserVersionInfo.minorVersion:null,i=11===t&&0===n,r=nr.browserVersionInfo.versionString,a=r?r.split("."):null;return i&&(!a[2]||parseInt(a[2])<3)}detectMobileCapabilities(){const e=this.isAutoplayEligibleAndroid()||this.isAutoplayEligibleIos();this.finishCheck(!1,e)}isAutoplayEligibleAndroid(){return nr.os===Wi.ANDROID&&nr.browser===zi.CHROME&&this.isChromeAutoplayEligible()}isAutoplayEligibleIos(){const e=nr.os===Wi.IOS&&nr.browserVersionInfo.majorVersion>=10,t=e&&nr.browser===zi.SAFARI,n=e&&!t&&(nr.browser===zi.CHROME_IOS||nr.browser===zi.CHROME)&&this.isChromeAutoplayEligible();return t||n}isChromeAutoplayEligible(){return nr.browserVersionInfo.majorVersion>=54}createVideoElement(e){const t=this.document;if(!t)return null;const n=t.createElement("video");
2return e&&(n.muted=!0,n.playsInline=!0),n.volume=.005,n.style.width="100%",n.style.height="100%",n.src=this.testVideoSrc,this.testDom.appendChild(n),n}createTestDom(){const e=this.document;if(!this.document)return null;const t=e.createElement("div"),n=t.style,i="-1000px";return n.position="absolute",n.top=i,n.left=i,n.width="400px",n.height="225px",e.body.appendChild(t),this.testDom=t,t}get document(){return nr.document||null}}let Ll=class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t,n;this.plugins=[],this.autoplay=Fs.NONE,this.network={retryAttempts:0,retryIntervals:[],timeout:wi.TIMEOUT},this.performanceMode=Xs.AUTO,this.renderTextTrackNatively=!0,this.useNativeFullscreen=!0,this.playsInline=!0,this.useNativeControls=!1,this.overrides={},this.enableOm=!1,this.enableMoat=!1,this.keyboard={},this.language=nr.language,this.localization={},this.idleDelay=3e3,this.ignoreBlankTextTracks=!1;const i=e,r=i.container,a=((e,t)=>{var n={};for(var i in e)Ln.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&Pn)for(var i of Pn(e))t.indexOf(i)<0&&Mn.call(e,i)&&(n[i]=e[i]);return n})(i,["container"]),o=cs();if(Vo.checkPlayerOptions(a),a.network=ri({},o.network,{timeout:a.networkTimeout,retryAttempts:null==(t=a.networkErrorRecovery)?void 0:t.retryAttempts,retryIntervals:null==(n=a.networkErrorRecovery)?void 0:n.retryIntervals},a.network),a.keyboard=ri({},o.keyboard,{scope:a.keyboardScope},a.keyboard),nr.isBrowser&&(null==r||!(r.constructor===HTMLDivElement||"object"==typeof r&&"function"==typeof r.getBoundingClientRect||"string"==typeof r&&null!=document.querySelector(r))))throw new Error("Invalid player configuration: Missing presentation container.");ri(this,a),null!=this.id||(this.id=Qa()),this.container=r,null!=this.audioLanguage||(this.audioLanguage=this.language),null!=this.textLanguage||(this.textLanguage=this.language),null!=this.localizationLanguage||(this.localizationLanguage=this.language),null!=this.reuseVideoElement||(this.reuseVideoElement=nr.isIos)}};class Ml{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t;this.sessionId=null,this.contentId=null,this.ad={adapter:null,showPrerollOnNonZeroStart:!1,viewabilityTracking:{partner:null,viewGuid:null,pageType:null},csai:null,ssai:null},this.location={mediaUrl:null,textTrackUrl:null,thumbnailTrackUrl:null,posterImageUrl:null,drm:{playready:{url:null,header:null,priority:null,audioRobustness:null,videoRobustness:null},widevine:{url:null,header:null,priority:null,audioRobustness:null,videoRobustness:null},fairplay:{appCertUrl:null,licenseUrl:null,header:null},aes:{header:null,provider:null}}},this.playback={id3OwnerIds:null,startTime:NaN,enableAdvancedCodecs:!1,liveEdgeSyncFragmentCount:3,abr:{maxBitrate:NaN,minBitrate:NaN,startBitrate:NaN,maxHeight:1/0,maxCategory:null,capQualityToScreenSize:!0,ignoreDevicePixelRatio:!0,throughputEstimate:NaN},lts:{restrictionTimestamp:NaN,threshold:1800,clearOutOfBoundsLtsBuffer:!1}},this.metadata={},this.tracking={},this.cmcd={enabled:!0,sessionId:null,contentId:null,useHeaders:!1},this.overrides={},ri(this,e);const n=this.playback,i=n.abr;if(!Number.isFinite(i.throughputEstimate)){const e=mo();i.throughputEstimate=Number.isFinite(e)&&e>0?e:Mo}const r=i.maxCategory,a=i.maxHeight;r&&!Number.isFinite(a)&&(i.maxHeight=Ba(r)),n.enableAdvancedCodecs&&(Ns.isEmpty(n.preferredVideoCodecs)&&(n.preferredVideoCodecs=["hev1.2","hvc1.2","dvhe"]),Ns.isEmpty(n.preferredAudioCodecs)&&(n.preferredAudioCodecs=["ec-3","ac-3"]));const o=null==(t=e.playback)?void 0:t.lts;o&&Object.prototype.hasOwnProperty.call(o,"clearOutOfBoundsLtsBuffer")&&Vo.clearOutOfBoundsLtsBuffer()}static validate(e){if(mi(e))throw new Error(zn.messages.RESOURCE_MISSING);const t=[];if(Object.keys(Fl).forEach(n=>{n in e||t.push(n)}),t.length)throw new Error("One or more configuration properties not found: ".concat(t.join(", ")))}}const Fl=new Ml;var Ul=(e=>(e.APPLICATION="AppMediator",e.FULLSCREEN="FullscreenMediator",e.TRACKING_MEDIATOR="TrackingMediator",e.TIMER_MEDIATOR="TimerMediator",e.PRESENTATION_MEDIATOR="PresentationMediator",e.PLUGIN_MEDIATOR="PluginMediator",e.KEY_COMMAND="KeyCommandMediator",e.ACTIVITY="ActivityMediator",e))(Ul||{}),Bl=(e=>(e.AdBreakInfo="AdBreakInfo",e.AdItem="AdItem",e.ContentPlaybackState="ContentPlaybackState",e.PlayerDom="PlayerDom",e.PlayerOptions="PlayerOptions",e.PresentationState="PresentationState",e))(Bl||{}),jl=(e=>(e.DEFAULT="default",e.BOOT_APP="bootApp",e.PREP_TRACKING="prepTracking",e.PREP_SERVICE="prepService",e.TIMER_TIC="timerTic",e.PREP_RESOURCE_COLLECTION="prepResourceCollection",e.PLAY_RESOURCE="playResource",e.PREP_PLUGINS="prepPlugins",e.LOAD_PLUGINS="loadPlugins",e.REMOVE_PLUGIN="removePlugin",e.START_PRESENTATION="startPresentation",e.RESOURCE_COMPLETE="resourceComplete",e.KILL_RESOURCE_PRESENTATION="killResourcePresentation",e.SUSPEND_PLAYBACK="suspendPlayback",e.RESUME_PLAYBACK="resumePlayback",e.AUTO_QUALITY_SWITCHING="autoQualitySwitching",e.MIN_BITRATE="minBitrate",e.MAX_BITRATE="maxBitrate",e.PLAY_ON_USER_GESTURE="playOnUSerGesture",e.PLAY="play",e.PAUSE="pause",e.SEEK="seek",e.SWITCH_BITRATE="switchBitrate",e.SWITCH_QUALITY_CATEGORY="switchQualityCategory",e.SWITCH_AUDIO_TRACK="switchAudioTrack",e.SWITCH_TEXT_TRACK="switchTextTrack",e.SWITCH_TEXT_MODE="switchTextMode",e.VIDEO_LOAD_START="videoLoadStart",e.FULLSCREEN_AVAILABLE="fullscreenAvailable",e.FULLSCREEN_CHANGE="fullscreenChange",e.ENTER_FULLSCREEN_REQUEST="enterFullscreenRequest",e.EXIT_FULLSCREEN_REQUEST="exitFullscreenRequest",e.TIMED_TEXT_OFFSET_REQUEST="timedTextOffsetRequest",e.CHANGE_LANGUAGE="changeLanguage",e.LOCALIZATION_CHANGE="localizationChange",e.PLAYER_ERROR="playererror",e.VIDEO_PLAYBACK_ERROR="videoplaybackerror",e.VIDEO_START_ERROR="videostarterror",e.RESOURCE_ERROR="resourceerror",e.AD_ERROR="aderror",e.AD_STALLED="adstalled",e))(jl||{}),Vl=(e=>(e.EXTERNAL="external",e.INTERNAL="internal",e))(Vl||{});class Hl{constructor(){this.multiCoreKey=null}destroy(){}onRemove(){this.multiCoreKey=null}get facade(){return Dl.getInstance(this.multiCoreKey)}sendNotification(e,t,n){const i=this.facade;i&&i.sendNotification(e,t,n)}initializeNotifier(e){this.multiCoreKey=e}}class zl extends Hl{constructor(e,t){super(),this.proxyName=null,this.pData=null,this.proxyName=e,this.pData=t||{}}get name(){return this.proxyName}get data(){return this.pData}
2onRegister(){}onRemove(){this.pData=null,super.onRemove()}}class Kl extends zl{constructor(e){super(bl.HookProxy,null),this.pHookManager=null,this.pHookManager=new fs(ps,gs,e)}onRemove(){var e;null==(e=this.pHookManager)||e.destroy(),this.pHookManager=null,super.onRemove()}defineHook(e,t){this.pHookManager.defineHook(e,t)}hasHook(e){return this.pHookManager.hasHook(e)||ys(e)}registerHook(e,t){this.pHookManager.registerHook(e,t)}removeHook(e,t){this.pHookManager.removeHook(e,t)}applyHook(e,t,n){return jn(this,null,function*(){const i=yield bs(e,t,n);return this.pHookManager.applyHook(e,i,n)})}}class Wl extends Rl{constructor(e,t){super(e),this.pLogger=t}destroy(){this.pLogger.destroy(),this.pLogger=null}get logger(){return this.pLogger}}class Gl extends _i{constructor(e){super(e||{}),this.pAppId=e.id,this.pFacade=Dl.createFacade(this.pAppId,e.commandMap||null);const t=e.logger;this.pFacade.registerService(new Wl(yl.Logging,t)),ai(zo).forEach(e=>t.on(e,e=>this.sendEvent(e.type,e.detail)))}destroy(){super.destroy(),Dl.removeCore(this.pAppId),this.mdlCollProxy=null,this.pFacade=null}get appId(){return this.pAppId}sendNotification(e,t,n){this.pFacade.sendNotification(e,t,n)}registerGlobalServices(e){const t=this.pFacade;for(const n in e)t.registerService(e[n])}get facade(){return this.pFacade}get modelCollectionProxy(){return this.mdlCollProxy||(this.mdlCollProxy=this.facade.retrieveProxy(bl.ModelCollectionProxy)),this.mdlCollProxy}get appMediator(){return this.pFacade.retrieveMediator(Ul.APPLICATION)}}function ql(e,t,n){hi(e.__apiDescriptors)||(e.__apiDescriptors={}),e.__apiDescriptors[t]=n}function Yl(){return ql}function Ql(){return ql}function Xl(e,t){const n={},i={};let r=t;const a=t=>()=>{throw new ka(Ui.CALL_AFTER_DESTROY,'Calling "'.concat(t,'" on player "').concat(e,'" after it has been destroyed'),void 0,!0,Sa.API)};for(const e in t.__apiDescriptors){const o=t.__apiDescriptors[e],s=a(e);o.value?(n[e]=function(){return r[e].apply(r,arguments)},i[e]=s):(Object.defineProperty(n,e,{get:o.get?()=>r[e]:void 0,set:o.set?t=>r[e]=t:void 0}),Object.defineProperty(i,e,{get:o.get?s:void 0,set:o.set?s:void 0}))}return{api:n,destroy:()=>{r=i,t.__apiDescriptors=null}}}class Zl extends Hl{constructor(){super()}get system(){return nr}getModel(e){return this.getModelCollection().getModel(e)}getProxy(e){return this.facade?this.facade.retrieveProxy(e):null}getService(e){return this.facade?this.facade.retrieveService(e):null}getModelCollection(){return this.facade?this.facade.retrieveProxy(bl.ModelCollectionProxy):null}}class Jl extends Zl{constructor(){super()}get logger(){return this.facade.logger}}class $l extends Jl{execute(e){const t=this.facade.retrieveMediator(Ul.PRESENTATION_MEDIATOR),n=this.facade.retrieveProxy(bl.ContentPlaybackStateProxy),i=t.adapter,r=e.body.value;if(n.isAbrSwitchingAvailable)switch(e.name){case jl.SWITCH_BITRATE:const e=Ha(n.qualities,r);this.switchToIndex(e,n,i);break;case jl.SWITCH_QUALITY_CATEGORY:n.userQualityCategory=r,this.switchQualityCategory(n,r,i);break;case jl.AUTO_QUALITY_SWITCHING:i.setAutoQualitySwitching(r),n.qualitySwitchingMode=this.getAbrMode(r);break;case jl.MIN_BITRATE:n.minBitrate=r,i.setMinBitrate(r);break;case jl.MAX_BITRATE:n.maxBitrate=r,i.setMaxBitrate(r)}else n.qualitySwitchingMode=el.UNAVAILABLE}switchToIndex(e,t,n){const i=t.minIndex,r=t.maxIndex;Ia(e,i,r)?(n.setAutoQualitySwitching(!1),t.qualitySwitchingMode=this.getAbrMode(!1),n.setQuality(t.qualities[e])):this.logger.warn(e>=r?zn.messages.ABR_MANUAL_SWITCHING_REACHED_UPPER_BOUNDS:zn.messages.ABR_MANUAL_SWITCHING_REACHED_LOWER_BOUNDS)}switchQualityCategory(e,t,n){if(t===Pa.AUTO)return n.setAutoQualitySwitching(!0),n.setMinBitrate(NaN),void n.setMaxBitrate(NaN);const i=Fa(e.qualities,t),r=i.minBitrate,a=i.maxBitrate,o=i.minIndex;o===i.maxIndex?this.switchToIndex(o,e,n):(n.setMinBitrate(r),n.setMaxBitrate(a))}getAbrMode(e){return e?el.AUTO:el.MANUAL}}class ec extends Hl{constructor(){super(),this.subCommands=null,this.subCommands=[],this.initializeMacroCommand()}addSubCommand(e){this.subCommands.push(e)}execute(e){let t,n;for(;this.subCommands.length>0;)t=this.subCommands.shift(),n=new t,n.initializeNotifier(this.multiCoreKey),n.execute(e)}}var tc=(e=>(e.MAIN_CONTAINER="main",e.VIDEO_UNDERLAY_CONTAINER="videoUnderlayContainer",e.VIDEO_EL="video",e.VIDEO_OVERLAY_CONTAINER="videoOverlayContainer",e.VIDEO_CONTAINER="videoContainer",e.CC_CONTAINER="ccContainer",e.AD_CONTAINER="adContainer",e.AD_CLICK_EL="adClickEl",e.STYLE="style",e))(tc||{});const nc={position:"absolute",width:"100%",height:"100%",padding:"0",margin:"0",overflow:"hidden"};function ic(e,t,n){const i=e.querySelector("video");return i&&ac(i,t,n),i||rc(t,n)}function rc(e,t){const n=document.createElement("video");return ac(n,e,t),n}function ac(e,t,n){e.style.height="100%",e.style.width="100%",e.style.backgroundColor="#000";const i=Qa();e.dataset.elementId=i,e.dataset.playerId=n,e.setAttribute("id","".concat(n,"_").concat(i)),e.controls=!0===t.useNativeControls,e.playsInl
2ine=!1!==t.playsInline}function oc(){const e=sc(tc.AD_CONTAINER,nc);return e.dataset.elementId=Qa(),e}function sc(e,t){const n=document.createElement("div");return n.setAttribute("data-role",e),Object.assign(n.style,t),n}function lc(){const e=sc("adClickEl",{display:"none",padding:"4px 8px",fontSize:"12px",background:"#dedede",lineHeight:"14px",color:"#000",position:"absolute",right:"2px",top:"2px",textAlign:"center"});return e.innerHTML="Learn More",e}class cc extends Jl{execute(e){const t=e.body.playerOptions.container,n=this.system,i=this.getModel(Bl.PlayerOptions);if(!n.isBrowser||!t)return;const r="string"==typeof t?n.document.querySelector(t):t;let a=[];i.useNativeControls&&(a=[tc.CC_CONTAINER]);const o=function(e,t,n,i){const r={[tc.MAIN_CONTAINER]:e,[tc.VIDEO_EL]:null},a=e,o=[tc.AD_CONTAINER,tc.CC_CONTAINER,tc.VIDEO_OVERLAY_CONTAINER,tc.VIDEO_CONTAINER,tc.VIDEO_UNDERLAY_CONTAINER],s=a.style;s.position=s.position||"relative",s.padding=s.padding||"0",s.margin=s.margin||"0",s.width=s.width||"100%",s.height=s.height||"100%",s.backgroundColor=s.backgroundColor||"#000",s.overflow=s.overflow||"hidden",a.classList.add("avia-container");const l=document.createElement("style");a.parentElement.insertAdjacentElement("beforebegin",l),l.innerText=":root{--avia-timed-text-offset: 60px;}.avia-container.avia-cc-offset video::-webkit-media-text-track-container{bottom: var(--avia-timed-text-offset);height: auto;}";let c,u=a.hasChildNodes()?a.firstChild:null;if(o.forEach(e=>{t.includes(e)||(e===tc.AD_CONTAINER?c=oc():(c=sc(e,nc),e!==tc.VIDEO_OVERLAY_CONTAINER&&e!==tc.VIDEO_UNDERLAY_CONTAINER||c.setAttribute("id","".concat(e,"_").concat(i))),r[e]=c,u?a.insertBefore(c,u):a.appendChild(c),u=c)}),!0===n.reuseVideoElement){const e=ic(a,n,i);r[tc.VIDEO_CONTAINER].appendChild(e),r[tc.VIDEO_EL]=e}return r[tc.AD_CLICK_EL]=lc(),a.appendChild(r[tc.AD_CLICK_EL]),{[tc.MAIN_CONTAINER]:r[tc.MAIN_CONTAINER],[tc.VIDEO_EL]:r[tc.VIDEO_EL],[tc.VIDEO_UNDERLAY_CONTAINER]:r[tc.VIDEO_UNDERLAY_CONTAINER],[tc.VIDEO_OVERLAY_CONTAINER]:r[tc.VIDEO_OVERLAY_CONTAINER],[tc.VIDEO_CONTAINER]:r[tc.VIDEO_CONTAINER],[tc.CC_CONTAINER]:r[tc.CC_CONTAINER],[tc.AD_CONTAINER]:r[tc.AD_CONTAINER],[tc.AD_CLICK_EL]:r[tc.AD_CLICK_EL],[tc.STYLE]:l}}(r,a,i,this.facade.appId),s=this.facade.retrieveProxy(bl.PlayerDomProxy);s.setModel(o),s.showAdContainer(!1),this.logger.info("Player DOM created.")}}class uc extends zl{constructor(e){super(bl.AdapterProxy,e),this.adapterMap={},this.defaultAdapters={[Wn.PLAYBACK]:Lo.config}}onRemove(){this.adapterMap=null,super.onRemove()}cloneConfig(e){return Object.assign({isSupported:()=>!0},e)}hasAdapterForRole(e){let t=!1;return Object.keys(this.adapterMap).forEach(n=>{this.adapterMap[n].role.includes(e)&&(t=!0)}),t}registerDefaultAdapter(e,t){this.defaultAdapters[e]=this.cloneConfig(t)}registerAdapter(e){const t=e.id;this.adapterMap[t]=this.cloneConfig(e)}retrieveAdapter(e){return this.adapterMap[e]}removeAdapter(e){delete this.adapterMap[e]}getAdaptersByRole(e){const t=ai(this.adapterMap).filter(t=>t.role.includes(e)),n=this.defaultAdapters[e];return n&&t.push(n),t}createContext(e,t,n){const i=this.facade.retrieveMediator(Ul.PLUGIN_MEDIATOR).createPluginServices(e),r=i.dom,a=i.system,o=this.facade.retrieveProxy(bl.ModelCollectionProxy).getModel(Bl.PresentationState),s=this.facade.retrieveProxy(bl.TextTrackProxy),l=this.facade.retrieveProxy(bl.PerformanceProxy);return Object.assign(i,{resource:t,video:a.isWebMaf?a.webMafPlayer:r.video,container:r.main,autoplay:o.isAutoplay,muted:o.isMuteAtPlayStart,performanceSettings:l,textTrackSettings:s,getDelegate:n})}createAdapter(e,t,n){return jn(this,null,function*(){var i;const r=this.getAdaptersByRole(e),a=(null==(i=t[e])?void 0:i.adapter)||{},o=a.id,s=a.options,l=void 0===s?{}:s,c=o?r.filter(e=>e.id===o):r;for(const e of c){const i=this.createContext(e,t,n),r=ri({},e.options,l,a[e.id]);if(!o&&!(yield e.isSupported(i,r)))continue;const s=yield e.factory(i,r);if(s)return this.facade.logger.info("".concat(e.id," adapter created")),s}let u="Could not find adapter for role: ".concat(e);
2throw o&&(u+=", with id: ".concat(o)),new ka(Ui.ADAPTER_NOT_FOUND,u)})}}var dc=Object.defineProperty,hc=Object.getOwnPropertyDescriptor,fc=(e,t,n,i)=>{for(var r,a=hc(t,n),o=e.length-1;o>=0;o--)(r=e[o])&&(a=r(t,n,a)||a);return a&&dc(t,n,a),a};class pc extends zl{constructor(e){super(e,{})}onRegister(){this.localization=vl.create({logger:this.facade.logger}),this.delegate=Xl("".concat(this.facade.appId,".localization"),this)}onRemove(){this.localization.destroy(),this.localization=null,this.delegate.destroy(),this.delegate=null}getApi(){return this.delegate.api}get defaultLanguage(){return this.localization.defaultLanguage}get language(){return this.localization.language}get languageTag(){return this.localization.languageTag}changeLanguage(e){return this.localization.changeLanguage(e)}registerLocalizationData(e){return this.localization.registerLocalizationData(e)}localize(e,t,n){return this.localization.localize(e,t,n)}}fc([Ql()],pc.prototype,"defaultLanguage"),fc([Ql()],pc.prototype,"language"),fc([Yl()],pc.prototype,"languageTag"),fc([Yl()],pc.prototype,"changeLanguage"),fc([Yl()],pc.prototype,"registerLocalizationData"),fc([Yl()],pc.prototype,"localize");class mc extends zl{constructor(){super(...arguments),this.resettables=[Bl.ContentPlaybackState]}onRemove(){this.resettables=null,super.onRemove()}get collection(){return this.data}getModel(e){return this.data.getModel(e)}reset(){const e=this.resettables;let t=e.length;for(;t--;)this.getModel(e[t]).reset();const n=this.getModel(Bl.PresentationState);n.isAutoplay=!0,n.isTrackingAd=!1,n.adSegmentEntered=!1,n.started=!1,n.streamDuration=NaN,n.streamTime=NaN}}class gc extends Hl{constructor(e,t){super(),this.pViewControl=null,this.mediatorName=e,t&&(this.viewControl=t)}get name(){return this.mediatorName}set viewControl(e){this.pViewControl=e}get viewControl(){return this.pViewControl}get system(){return nr}getService(e){return this.facade?this.facade.retrieveService(e):null}getModel(e){return this.getModelCollection().getModel(e)}getProxy(e){return this.facade?this.facade.retrieveProxy(e):null}getModelCollection(){return this.facade?this.facade.retrieveProxy(bl.ModelCollectionProxy):null}listNotificationInterests(){return[]}onRegister(){}onRemove(){this.pViewControl=null,super.onRemove()}}class vc extends gc{get logger(){return this.facade.logger}}const yc=class e extends vc{constructor(t){super(t),this.timer=new sl(e.INTERVAL),this.timer.on(sl.TIC_EVENT,e=>this.onTic(e))}killTimer(){var e;null==(e=this.timer)||e.stop()}listNotificationInterests(){return[Bo.RESOURCE_START]}handleNotification(e){var t;e.name===Bo.RESOURCE_START&&(null==(t=this.timer)||t.start())}onRegister(){super.onRegister()}onRemove(){this.timer.destroy(),this.timer=null,super.onRemove()}onTic(e){var t,n;null==(t=this.facade)||t.sendNotification(jl.TIMER_TIC,e.detail,Vl.INTERNAL),null==(n=this.facade)||n.sendNotification(Bo.CLOCK,{count:e.detail.count},Vl.INTERNAL)}};yc.INTERVAL=100;let bc=yc;class Ac extends zl{onRegister(){const e=this.facade.retrieveProxy(bl.ModelCollectionProxy).getModel(Bl.PlayerOptions);this.pOverrides=e.overrides,this.pMode=e.performanceMode===Xs.AUTO?this.calculatePerformanceMode():e.performanceMode}calculatePerformanceMode(){switch(!0){case nr.isTv:case nr.isEmbedded:return Xs.TV;case nr.isMobile:return Xs.MOBILE;default:return Xs.DESKTOP}}get mode(){return this.pMode}get forwardBufferLength(){switch(this.pMode){case Xs.MOBILE:case Xs.TV:return 20;case Xs.LOW:return 10;default:return}}get backBufferLength(){switch(this.pMode){case Xs.MOBILE:case Xs.TV:return 30;case Xs.LOW:return 12;default:return 60}}get topQualityForwardBufferLength(){switch(this.pMode){case Xs.MOBILE:case Xs.TV:return 60;case Xs.LOW:return 30;default:return}}get bufferingSampleRate(){var e;const t=null==(e=this.pOverrides)?void 0:e.bufferingSampleRate;if(t)return t;switch(this.pMode){case Xs.TV:case Xs.LOW:return 300;default:return bc.INTERVAL}}}class Ec extends zl{constructor(e,t,n){super(e,t),this.controlVisCssClass="cvui-ctrlbar-vis",this.useInitialVideo=!1,this.adapterConfig={id:Fo,role:[Wn.VIDEO],factory:()=>({getId:()=>Fo,createVideo:()=>this.useInitialVideo?(this.useInitialVideo=!1,this.video):(this.recreateVideo(),this.video)})},this.playerOptions=n}setModel(e){for(const t in e)t===tc.VIDEO_EL&&e[t]?(this.useInitialVideo=!0,this.video=e[t]):this.model[t]=e[t]}
2onRegister(){super.onRegister(),this.facade.retrieveProxy(bl.AdapterProxy).registerDefaultAdapter(Wn.VIDEO,this.adapterConfig)}onRemove(){var e;const t=this.getMain(),n=t.childNodes;let i=n.length;for(;i--;)t.removeChild(n[i]);const r=this.getElement(tc.STYLE);null==(e=null==r?void 0:r.parentElement)||e.removeChild(r),super.onRemove()}setControlVisibility(e){const t=this.getMain();if(!t)return;const n=e?"add":"remove";t.classList[n](this.controlVisCssClass)}getElement(e){return this.model[e]||null}getSafeZIndex(){const e=this.getElement(tc.AD_CONTAINER);return e?Number(e.style.zIndex)+10:10}getTextTrackContainer(){return this.getElement(tc.CC_CONTAINER)}getMain(){return this.getElement(tc.MAIN_CONTAINER)}showAdClickElement(e){const t=this.getElement(tc.AD_CLICK_EL);if(t){const n=this.facade.retrieveProxy(bl.LocalizationProxy).localize(Ws.LEARN_MORE);n&&(t.innerHTML=n),t.style.display=!1!==e?"block":"none"}}getDimensions(){const e=this.getPresentationRect();return e?{width:e.width,height:e.height}:null}showContainer(e,t){const n=this.getElement(e);n&&(n.style.display=t?"inline-block":"none")}showAdContainer(e){this.showContainer(tc.AD_CONTAINER,e)}getPresentationRect(){const e=this.getMain();return e&&e.getBoundingClientRect()||null}primeVideo(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:zn.blankDataUrl;return Promise.resolve().then(()=>{const t=this.video;if(t)return t.src=e,t.load(),t.play().catch(e=>{if(t.error&&t.src!==zn.blankDataUrl)return this.primeVideo(zn.blankDataUrl)})})}recreateVideo(){const e=this.video,t=this.getElement(tc.VIDEO_CONTAINER),n=this.facade.retrieveProxy(bl.ModelCollectionProxy).getModel(Bl.PresentationState);let i,r,a;if(e){const n=["src","data-element-id"];i=rc(this.playerOptions,this.facade.appId),r=e.volume,a=e.muted,Array.from(e.attributes).filter(e=>!n.includes(e.name)).forEach(e=>i.setAttribute(e.name,e.value)),t.replaceChild(i,e)}else i=ic(this.getElement(tc.MAIN_CONTAINER),this.playerOptions,this.facade.appId),r=n.volume,a=n.isMuted,t.appendChild(i);n.volume=r,i.muted=a,i.volume=r,this.recreateAdElements(),this.video=i}recreateAdElements(){const e=oc(),t=lc(),n=this.getMain(),i=this.getElement(tc.AD_CONTAINER),r=this.getElement(tc.AD_CLICK_EL);n.replaceChild(e,i),n.replaceChild(t,r),this.setModel({[tc.AD_CONTAINER]:e,[tc.AD_CLICK_EL]:t})}get model(){return this.data}}class Tc extends zl{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(e,{native:!1!==t.native,mode:yo.DISABLED,language:t.language})}set mode(e){this.data.mode=e}get mode(){return this.data.mode}set enabled(e){this.mode=e?this.enabledMode:yo.DISABLED}get enabled(){return this.data.mode!==yo.DISABLED}get enabledMode(){return this.data.native?yo.SHOWING:yo.HIDDEN}get native(){return this.data.native}set language(e){this.data.language=e}get language(){return this.data.language}}class wc extends zl{constructor(e,t){super(e,t)}onRemove(){this.setVideo(null),this.adapter=null,this.data.logger=null,super.onRemove()}initVideo(e){return jn(this,null,function*(){var t,n;(null==(t=this.adapter)?void 0:t.destroy)&&(yield this.adapter.destroy());const i=this.facade.retrieveProxy(bl.AdapterProxy);this.adapter=yield i.createAdapter(Wn.VIDEO,e,null);const r=yield null==(n=this.adapter)?void 0:n.createVideo();return this.setVideo(r),r})}getAdapter(){return this.adapter}getVideo(){return this.data.video}setVideo(e){if(this.data.video&&(this.applyProps(this.data.video,{player:null,avia:null}),this.sendNotification(Bo.VIDEO_ELEMENT_REMOVED,{video:this.data.video})),this.data.video=e,e){const t=this.facade.retrieveMediator(Ul.APPLICATION);this.applyProps(e,{player:t.getAppApi(),avia:nr.appNamespace}),this.sendNotification(Bo.VIDEO_ELEMENT_ADDED,{video:this.data.video})}}setVideoVolume(e){const t=this.getVideo();t&&this.getVideoVolume()!==e&&(t.volume=e)}getVideoVolume(){const e=this.getVideo();return e?e.volume:null}muteVideo(e){const t=this.getVideo();t&&(t.muted=e)}applyProps(e,t){for(const n in t)try{e[n]=t[n]}catch(e){this.facade.logger.debug("Error applying video property ".concat(n),e)}}}class Sc{constructor(){}static checkType(e,t,n){return"string"==typeof t&&(t=[t]),!(!n||null!==e)||t.some(t=>typeof e===t)}static notEmpty(e){return!mi(e)}static isArray(e){return Array.isArray(e)}static validNumber(e,t){return"number"!=typeof e?t:e}static isTypedArray(e,t){if(this.isArray(e)&&this.notEmpty(e)){let n=e.length;for(;n--;)if(typeof e[n]!==t)return!1;return!0}return!1}static isType(e,t){return e instanceof t}static isPositiveNumber(e){return"number"==typeof e&&e>=0}}const Cc={qualities:{type:"object",defaultValue:[]},quality:{type:"object",defaultValue:null}
2,qualityMode:{type:"string",defaultValue:el.AUTO},qualityCappedToScreenSize:{type:"boolean",defaultValue:!0},audioTracks:{type:"object",defaultValue:[]},audioTrack:{type:"object",defaultValue:null},textTracks:{type:"object",defaultValue:[]},textTrack:{type:"object",defaultValue:null},streamType:{type:"string",defaultValue:tl.VOD},liveStreamInfo:{type:"object",defaultValue:null},bufferLength:{type:"number",defaultValue:0},cdn:{type:"string",defaultValue:null,validator:Sc.notEmpty},drmType:{type:"string",defaultValue:null,validator:Sc.notEmpty},contentSegment:{type:"number",defaultValue:NaN},maxBandwidth:{type:"number",defaultValue:NaN},time:{type:"number",defaultValue:0},state:{type:"string",defaultValue:Zs.IDLE},duration:{type:"number",defaultValue:NaN},bitrate:{type:"number",defaultValue:NaN},started:{type:"boolean",defaultValue:!1},averageDroppedFps:{type:"number",defaultValue:NaN},framerate:{type:"number",defaultValue:NaN}},kc={container:{type:["object","string"],defaultValue:null},plugins:{type:"object",defaultValue:null},autoplay:{type:"string",defaultValue:Fs.NONE},id:{type:"string",defaultValue:null},network:{type:"object",defaultValue:null},performanceMode:{type:"string",defaultValue:Xs.AUTO},renderTextTrackNatively:{type:"boolean",defaultValue:!0},useNativeFullscreen:{type:"boolean",defaultValue:!0},playsInline:{type:"boolean",defaultValue:!0},useNativeControls:{type:"boolean",defaultValue:!1},overrides:{type:"object",defaultValue:{}},logLevel:{type:"string",defaultValue:Ho.OFF},keyboard:{type:"object",defaultValue:null},language:{type:"string",defaultValue:null},audioLanguage:{type:"string",defaultValue:null},audioRole:{type:"string",defaultValue:Ms.MAIN},textLanguage:{type:"string",defaultValue:null},localizationLanguage:{type:"string",defaultValue:null},localization:{type:"object",defaultValue:null},idleDelay:{type:"number",defaultValue:3e3},enableOm:{type:"boolean",defaultValue:!1},enableMoat:{type:"boolean",defaultValue:!1},reuseVideoElement:{type:"boolean",defaultValue:!1},ignoreBlankTextTracks:{type:"boolean",defaultValue:!1},sizeCheckInterval:{type:"number",defaultValue:1e3}};class xc{constructor(){}static clampValue(e,t,n){return"number"!=typeof e?null:Math.max(t,Math.min(e,n))}static lowerCase(e){return"string"==typeof e?e.toLowerCase():e}static strToNum(e){if("number"==typeof e)return e;if("string"==typeof e){const t=parseFloat(e);return isNaN(t)?e:t}return e}}const Nc={content_playback_state_config:Cc,player_dom_config:{main:{type:"object",defaultValue:null},video:{type:"object",defaultValue:null},videoContainer:{type:"object",defaultValue:null},ccContainer:{type:"object",defaultValue:null},adContainer:{type:"object",defaultValue:null},panelContainer:{type:"object",defaultValue:null},adClickEl:{type:"object",defaultValue:null}},player_options_config:kc,presentation_state_config:{streamTime:{type:"number",defaultValue:0,setterTransformer:e=>Sc.isPositiveNumber(e)?e:0},streamDuration:{type:"number",defaultValue:NaN,setterTransformer:e=>Sc.isPositiveNumber(e)?e:NaN},adTime:{type:"number",defaultValue:NaN,setterTransformer:e=>Sc.isPositiveNumber(e)?e:NaN},adDuration:{type:"number",defaultValue:NaN,setterTransformer:e=>Sc.isPositiveNumber(e)?e:NaN},breakTime:{type:"number",defaultValue:NaN,setterTransformer:e=>Sc.isPositiveNumber(e)?e:NaN},breakDuration:{type:"number",defaultValue:NaN,setterTransformer:e=>Sc.isPositiveNumber(e)?e:NaN},isAutoplay:{type:"boolean",defaultValue:!1},isTrackingAd:{type:"boolean",defaultValue:!1},adSegmentEntered:{type:"boolean",defaultValue:!1},isFullscreen:{type:"boolean",defaultValue:!1},isMuted:{type:"boolean",defaultValue:!1},isMuteAtPlayStart:{type:"boolean",defaultValue:!1},started:{type:"boolean",defaultValue:!1},userHasUnmuted:{type:"boolean",defaultValue:!1},volume:{type:"number",defaultValue:1,setterTransformer:e=>xc.clampValue(e,0,1)},usesSsai:{type:"boolean",defaultValue:!1},streamId:{type:"string",defaultValue:null},suspended:{type:"boolean",defaultValue:!1}}};class _c{constructor(){}static generateModel(e,t,n,i){for(const r in t)this.createProperty(r,t[r],e,n,i)}static createProperty(e,t,n,i,r){const a=t.validator,o=t.type,s=t.defaultValue,l=!1!==t.enumerable,c=this.getTransformer(t,"setter",n
2),u=this.getTransformer(t,"getter",n);!1===t.writable?(Object.defineProperty(n,e,{enumerable:l,value:s,writable:!1}),i[e]=s):(Object.defineProperty(n,e,{enumerable:l,set:function(t){const n=c(t);!a||a(n)?Sc.checkType(n,o,null==s)?i[e]=n:Jo.warn("Invalid type supplied for property ".concat(e)):Jo.warn("Invalid value '".concat(n,"' for property ").concat(e))},get:function(){return u(i[e])}}),i[e]=s),r[e]=s}static getTransformer(e,t,n){const i=e[t+"Transformer"];return i&&"function"==typeof i?i.bind(n):this.blankTransformer}static blankTransformer(e){return e}}class Ic{constructor(e){this.pData={},this.defaultValues={},_c.generateModel(this,e,this.pData,this.defaultValues)}get data(){return Object.assign({},this.pData)}reset(){for(const e in this.defaultValues)this.pData[e]=this.defaultValues[e]}}class Oc{constructor(e){this.model=new Ic(e)}static get modelName(){return"ContentPlaybackState"}get data(){return this.model.data}reset(){this.model.reset()}set qualities(e){this.model.qualities=e}get qualities(){return this.model.qualities}set quality(e){this.model.quality=e}get quality(){return this.model.quality}set qualityMode(e){this.model.qualityMode=e}get qualityMode(){return this.model.qualityMode}set qualityCappedToScreenSize(e){this.model.qualityCappedToScreenSize=e}get qualityCappedToScreenSize(){return this.model.qualityCappedToScreenSize}set audioTracks(e){this.model.audioTracks=e}get audioTracks(){return this.model.audioTracks}set audioTrack(e){this.model.audioTrack=e}get audioTrack(){return this.model.audioTrack}set textTracks(e){this.model.textTracks=e}get textTracks(){return this.model.textTracks}set textTrack(e){this.model.textTrack=e}get textTrack(){return this.model.textTrack}set streamType(e){this.model.streamType=e}get streamType(){return this.model.streamType}set liveStreamInfo(e){this.model.liveStreamInfo=e}get liveStreamInfo(){return this.model.liveStreamInfo}set bufferLength(e){this.model.bufferLength=e}get bufferLength(){return this.model.bufferLength}set cdn(e){this.model.cdn=e}get cdn(){return this.model.cdn}set drmType(e){this.model.drmType=e}get drmType(){return this.model.drmType}set contentSegment(e){this.model.contentSegment=e}get contentSegment(){return this.model.contentSegment}set maxBandwidth(e){this.model.maxBandwidth=e}get maxBandwidth(){return this.model.maxBandwidth}set time(e){this.model.time=e}get time(){return this.model.time}set state(e){this.model.state=e}get state(){return this.model.state}set duration(e){this.model.duration=e}get duration(){return this.model.duration}set bitrate(e){this.model.bitrate=e}get bitrate(){return this.model.bitrate}set started(e){this.model.started=e}get started(){return this.model.started}set averageDroppedFps(e){this.model.averageDroppedFps=e}get averageDroppedFps(){return this.model.averageDroppedFps}set framerate(e){this.model.framerate=e}get framerate(){return this.model.framerate}get minBitrate(){return this.model.minBitrate}set minBitrate(e){this.model.minBitrate=e}get maxBitrate(){return this.model.maxBitrate}set maxBitrate(e){this.model.maxBitrate=e}get maxHeight(){return this.model.maxHeight}set maxHeight(e){this.model.maxHeight=e}}class Dc{constructor(e){this.model=new Ic(e)}static get modelName(){return"PlayerDom"}get data(){return this.model.data}reset(){this.model.reset()}set main(e){this.model.main=e}get main(){return this.model.main}set video(e){this.model.video=e}get video(){return this.model.video}set videoContainer(e){this.model.videoContainer=e}get videoContainer(){return this.model.videoContainer}set ccContainer(e){this.model.ccContainer=e}get ccContainer(){return this.model.ccContainer}set videoOverlayContainer(e){this.model.videoOverlayContainer=e}get videoOverlayContainer(){return this.model.videoOverlayContainer}set videoUnderlayContainer(e){this.model.videoUnderlayContainer=e}get videoUnderlayContainer(){return this.model.videoUnderlayContainer}set adContainer(e){this.model.adContainer=e}get adContainer(){return this.model.adContainer}set panelContainer(e){this.model.panelContainer=e}get panelContainer(){return this.model.panelContainer}set adClickEl(e){this.model.adClickEl=e}get adClickEl(){return this.model.adClickEl}set style(e){this.model.style=e}get style(){return this.model.style}}class Rc{constructor(e){this.model=new Ic(e)}static get modelName(){return"PlayerOptions"}get data(){return this.model.data}reset(){this.model.reset()}set container(e){this.model.container=e}get container(){return this.model.container}set plugins(e){this.model.plugins=e}get plugins(){return this.model.plugins}
2set autoplay(e){this.model.autoplay=e}get autoplay(){return this.model.autoplay}set id(e){this.model.id=e}get id(){return this.model.id}set network(e){this.model.network=e}get network(){return this.model.network}set performanceMode(e){this.model.performanceMode=e}get performanceMode(){return this.model.performanceMode}set renderTextTrackNatively(e){this.model.renderTextTrackNatively=e}get renderTextTrackNatively(){return this.model.renderTextTrackNatively}set useNativeFullscreen(e){this.model.useNativeFullscreen=e}get useNativeFullscreen(){return this.model.useNativeFullscreen}set keyboard(e){this.model.keyboard=e}get keyboard(){return this.model.keyboard}set playsInline(e){this.model.playsInline=e}get playsInline(){return this.model.playsInline}set useNativeControls(e){this.model.useNativeControls=e}get useNativeControls(){return this.model.useNativeControls}set overrides(e){this.model.overrides=e}get overrides(){return this.model.overrides}set logLevel(e){this.model.logLevel=e}get logLevel(){return this.model.logLevel}set language(e){this.model.language=e}get language(){return this.model.language}set audioLanguage(e){this.model.audioLanguage=e}get audioLanguage(){return this.model.audioLanguage}set audioRole(e){this.model.audioRole=e}get audioRole(){return this.model.audioRole}set textLanguage(e){this.model.textLanguage=e}get textLanguage(){return this.model.textLanguage}set localizationLanguage(e){this.model.localizationLanguage=e}get localizationLanguage(){return this.model.localizationLanguage}set localization(e){this.model.localization=e}get localization(){return this.model.localization}set idleDelay(e){this.model.idleDelay=e}get idleDelay(){return this.model.idleDelay}set enableOm(e){this.model.enableOm=e}get enableOm(){return this.model.enableOm}set enableMoat(e){this.model.enableMoat=e}get enableMoat(){return this.model.enableMoat}set reuseVideoElement(e){this.model.reuseVideoElement=e}get reuseVideoElement(){return this.model.reuseVideoElement}set ignoreBlankTextTracks(e){this.model.ignoreBlankTextTracks=e}get ignoreBlankTextTracks(){return this.model.ignoreBlankTextTracks}set sizeCheckInterval(e){this.model.sizeCheckInterval=e}get sizeCheckInterval(){return this.model.sizeCheckInterval}}class Pc{constructor(e){this.model=new Ic(e)}static get modelName(){return"PresentationState"}get data(){return this.model.data}reset(){this.model.reset()}set streamTime(e){this.model.streamTime=e}get streamTime(){return this.model.streamTime}set adTime(e){this.model.adTime=e}get adTime(){return this.model.adTime}set adDuration(e){this.model.adDuration=e}get adDuration(){return this.model.adDuration}set breakTime(e){this.model.breakTime=e}get breakTime(){return this.model.breakTime}set breakDuration(e){this.model.breakDuration=e}get breakDuration(){return this.model.breakDuration}set streamDuration(e){this.model.streamDuration=e}get streamDuration(){return this.model.streamDuration}set isAutoplay(e){this.model.isAutoplay=e}get isAutoplay(){return this.model.isAutoplay}set isTrackingAd(e){this.model.isTrackingAd=e}get isTrackingAd(){return this.model.isTrackingAd}set adSegmentEntered(e){this.model.adSegmentEntered=e}get adSegmentEntered(){return this.model.adSegmentEntered}set isFullscreen(e){this.model.isFullscreen=e}get isFullscreen(){return this.model.isFullscreen}set isMuted(e){this.model.isMuted=e}get isMuted(){return this.model.isMuted}
2set isMuteAtPlayStart(e){this.model.isMuteAtPlayStart=e}get isMuteAtPlayStart(){return this.model.isMuteAtPlayStart}set started(e){this.model.started=e}get started(){return this.model.started}set userHasUnmuted(e){this.model.userHasUnmuted=e}get userHasUnmuted(){return this.model.userHasUnmuted}set volume(e){this.model.volume=e}get volume(){return this.model.volume}set usesSsai(e){this.model.usesSsai=e}get usesSsai(){return this.model.usesSsai}set streamId(e){this.model.streamId=e}get streamId(){return this.model.streamId}set suspended(e){this.model.suspended=e}get suspended(){return this.model.suspended}}class Lc{constructor(){this.mdlCollection={},this.createModels()}destroy(){for(const e in this.mdlCollection)delete this.mdlCollection[e];this.mdlCollection=null}getModel(e){return this.mdlCollection[e]}get ContentPlaybackState(){return this.mdlCollection.ContentPlaybackState}get PlayerDom(){return this.mdlCollection.PlayerDom}get PlayerOptions(){return this.mdlCollection.PlayerOptions}get PresentationState(){return this.mdlCollection.PresentationState}createModels(){const e=[Oc,Dc,Rc,Pc];let t=e.length;for(;t--;){const n=e[t],i=n.modelName,r=Nc[this.classToCfgName(i)];this.mdlCollection[i]=new n(r)}}classToCfgName(e){return e.replace(/(?:^|\.?)([A-Z])/g,function(e,t){return"_"+t.toLowerCase()}).replace(/^_/,"")+"_config"}}class Mc extends Jl{execute(e){const t=this.system,n=new Lc,i=new mc(bl.ModelCollectionProxy,n),r=e.body.playerOptions;this.facade.registerProxy(i),this.setPlayerOptions(i,r),this.facade.registerProxy(new uc),this.facade.registerProxy(new Ac(bl.PerformanceProxy));const a=new pc(bl.LocalizationProxy);this.facade.registerProxy(a),this.facade.registerProxy(new Tc(bl.TextTrackProxy,{native:r.renderTextTrackNatively,language:r.textLanguage})),this.facade.registerProxy(new wc(bl.VideoProxy,{video:null})),t.isBrowser&&this.createDomProxy(i,r),this.logger.debug("Model prepared")}setPlayerOptions(e,t){const n=e.getModel(Bl.PlayerOptions);for(const e in t)!vi(n[e])&&(n[e]=t[e])}createDomProxy(e,t){const n=e.getModel(Bl.PlayerDom),i=new Ec(bl.PlayerDomProxy,n,t);this.facade.registerProxy(i)}}class Fc{constructor(e){this.event={dispatchPluginEvent:e=>{this.options.dispatch(e)}},this.util={queryStrFromObj:(e,t)=>Ai.encode(e)},this.options=e}get player(){return this.options.player}get logger(){return this.options.logger}get system(){return nr}get appNamespace(){return this.system.appNamespace}get avia(){return this.system.appNamespace}get playerOptions(){return this.options.playerOptions}get buildInfo(){return Uo}get localization(){return this.options.localization}get dom(){const e=this.options,t=e.domProxy,n=e.videoProxy;return{main:null==t?void 0:t.getMain(),get video(){return n.getVideo()},videoOverlayContainer:null==t?void 0:t.getElement(tc.VIDEO_OVERLAY_CONTAINER),videoUnderlayContainer:null==t?void 0:t.getElement(tc.VIDEO_UNDERLAY_CONTAINER),videoContainer:null==t?void 0:t.getElement(tc.VIDEO_CONTAINER),ccContainer:null==t?void 0:t.getElement(tc.CC_CONTAINER),adContainer:null==t?void 0:t.getElement(tc.AD_CONTAINER),adClickEl:null==t?void 0:t.getElement(tc.AD_CLICK_EL),style:null==t?void 0:t.getElement(tc.STYLE)}}get hookManager(){return this.options.hookManager}}class Uc extends vc{constructor(e){super(e),this.plugins={},this.pendingLoads=null,this.services=null}destroy(){return jn(this,null,function*(){yield Promise.all(Object.keys(this.plugins).map(e=>jn(this,null,function*(){try{yield this.killPlugin(e)}catch(t){this.logger.warn("Error destroying plugin ".concat(e,": ").concat(t))}})))})}onRemove(){this.plugins=null,this.pendingLoads=null,this.services=null,super.onRemove()}removePlugin(e){this.killPlugin(e)}getPlugin(e){return this.plugins[e]||null}loadPlugin(e){return this.createPlugin(e)}listNotificationInterests(){return[jl.LOAD_PLUGINS,Bo.AD_BREAK_START,Bo.CONTENT_START,jl.REMOVE_PLUGIN]}handleNotification(e){switch(e.name){case jl.LOAD_PLUGINS:this.loadPlugins(e.body);break;case jl.REMOVE_PLUGIN:this.removePlugin(e.body.name);break;case Bo.AD_BREAK_START:case Bo.CONTENT_START:this.loadPendingPlugins()}}createPluginServices(e){const t=e.id,n=e.options,i=void 0===n?{}:n;return new Fc(Bn(Un({},this.services),{logger:this.logger.create({id:t,debug:i.debug,logLevel:i.logLevel})}))}get playerOptions(){return this.getModel(Bl.PlayerOptions).data}initPluginServices(){if(this.services)return;const e=this.facade.retrieveMediator(Ul.APPLICATION);this.services={player:e.getAppApi(),domProxy:this.facade.retrieveProxy(bl.PlayerDomProxy),videoProxy:this.facade.retrieveProxy(bl.VideoProxy),localization:this.facade.retrieveProxy(bl.LocalizationProxy).getApi(),playerOptions:this.playerOptions,dispatch:t=>{e.dispatchPluginEvent(t)},hookManager:this.facade.retrieveProxy(bl.HookProxy),logger:null}}createPlugins(e){return Promise.all(e.map(e=>this.createPlugin(e)))}createPlugin(e){return jn(this,null,function*(){var t;const n=e.id,i=e.factory,r=e.options;if(!fi(i))throw new al(Ui.PLUGIN_FACTORY_ERROR,Vn.PLUGIN_FACTORY_ERROR,e);let a;try{const t=this.createPluginServices(e);a=yield i(t,r)}catch(t){throw new al(Ui.PLUGIN_LOAD_ERROR,Vn.PLUGIN_LOAD_ERROR,e,t)}if(a){if(!(null==(t=a.getId)?void 0:t.call(a)))throw new al(Ui.PLUGIN_ID_ERROR,Vn.PLUGIN_ID_ERROR,e);return this.plugins[n]=a,this.logger.info("Created plugin '".concat(n,"'")),a}})}killPlugin(e){return jn(this,null,function*(){const t=this.plugins[e];t&&(fi(t.destroy)&&(yield t.destroy()),delete this.plugins[e])})}loadPendingPlugins(){this.pendingLoads&&(this.createPlugins(this.pendingLoads).catch(e=>{this.sendNotification(jl.PLAYER_ERROR,e)}),this.pendingLoads=null)}loadPlugins(e){this.initPluginServices();const t=e.callback,n=e.plugins;if(!(null==n?void 0:n.length))return void t();const i=!this.getModel(Bl.PresentationState).started,r=n.filter(e=>null!=e),a=r.filter(e=>e.priority===Js.LOW),o=r.filter(e=>e.priority!==Js.LOW);i&&(this.pendingLoads=a);const s=i?o:a.concat(o);this.createPlugins(s).then(()=>t()).catch(e=>t(e))}}class Bc extends Jl{execute(e){this.facade.registerMediator(new Uc(Ul.PLUGIN_MEDIATOR)),this.logger.debug("Plugins Prepared")}}class jc extends Jl{execute(e){this.facade.registerMediator(new bc(Ul.TIMER_MEDIATOR)),this.logger.debug("Timer mediator registered")}}function Vc(e){const t=e.player,n=e.metadata,i=_a(t.volume+.05,0,1);n.volume=i,t.volume=i}function Hc(e){const t=e.player,n=e.metadata,i=_a(t.volume-.05,0,1);n.volume=i,t.volume=i}function zc(e){const t=e.player,n=e.metadata,i=t.contentDuration,r=_a(t.contentTime-.05*i,
20,i);n.position=r,n.duration=i,t.seek(r)}function Kc(e){const t=e.player,n=e.metadata,i=t.contentDuration,r=_a(t.contentTime+.05*i,0,i);n.position=r,n.duration=i,t.seek(r)}function Wc(e){const t=e.player;t.isFullscreen?t.exitFullscreen():t.enterFullscreen()}function Gc(e){const t=e.player;t.streamType!==tl.LIVE&&t.togglePlayPause()}function qc(e){const t=e.player,n=e.metadata;t.muted=!t.muted,n.muted=t.muted}function Yc(e){const t=e.player;t.textTrackEnabled=!t.textTrackEnabled}function Qc(e){e.player.play()}function Xc(e){e.player.pause()}function Zc(e){e.player.pause()}function Jc(e){const t=e.player;t.streamType===tl.LIVE&&t.goLive()}class $c extends vc{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:zs.NONE;super(e),this.scope=null,this.disabled=!1,this.contextStack=[],this.onKeydown=e=>jn(this,null,function*(){if(e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)return;if(this.disabled)return;const t=e.target;if(!this.inScope(t))return;const n=this.getKeyCode(e.keyCode),i=this.getActionKey(n);if(!i||i===Is.NONE)return;e.preventDefault();const r=this.createDetail(i),a=new ki(Bo.ACTION_KEY,this.player,r);this.sendNotification(Bo.ACTION_KEY,a,Vl.INTERNAL);const o=new CustomEvent(Bo.ACTION_KEY,{bubbles:!0,cancelable:!0,composed:!0,detail:r});a.defaultPrevented&&o.preventDefault(),t.dispatchEvent(o),this.sendNotification(Bo.HOTKEY_ACTION,Un({action:r.action},r.metadata),Vl.INTERNAL),this.sendNotification(Bo.ACTION_KEY_METADATA,r,Vl.INTERNAL)}),this.onActionKeyDefault=e=>{if(e.defaultPrevented)return;const t=e.detail.action,n={[Is.PLAY]:Qc,[Is.PAUSE]:Xc,[Is.PLAY_PAUSE]:Gc,[Is.TEXT_TRACK]:Yc,[Is.SKIP_BACKWARD]:zc,[Is.SKIP_FORWARD]:Kc,[Is.STOP]:Zc,[Is.LIVE]:Jc,[Is.INCREASE_VOLUME]:Vc,[Is.DECREASE_VOLUME]:Hc,[Is.MUTE_UNMUTE]:qc,[Is.FULLSCREEN]:Wc}[t];if(n)try{n(e.detail)}catch(e){this.sendNotification(Bo.ERROR,{error:new il(e.message,e)})}},this.setScope(t),this.enterActionKeyContext(Os.DEFAULT),this.enterActionKeyContext(Os.HOTKEY)}onRegister(){this.defaultKeyEventType=this.getKeyboardOption("eventType",Hs.DOWN);const e=this.facade.retrieveMediator(Ul.APPLICATION);this.player=e.getAppApi()}onRemove(){this.removeListeners(),this.player=null,super.onRemove()}handleNotification(e){}initialize(){this.addListeners()}disable(){this.disabled=!0}enable(){this.hasScope?this.disabled=!1:this.logger.warn("Attempted to enable key command mediator that has scope of NONE.")}getKeyEventTarget(){if("string"!=typeof this.scope)return this.scope;switch(this.scope){case zs.PLAYER:return this.playerContainer;case zs.DOCUMENT:return nr.global.document;case zs.NONE:return null;default:return nr.global.document.querySelector(this.scope)}}enterActionKeyContext(e){this.contextStack[0]!==e&&this.contextStack.unshift(e)}getActionKeyContext(){return this.contextStack}exitActionKeyContext(e){this.contextStack=this.contextStack.filter(t=>t!==e)}setScope(e){this.scope=e,this.hasScope?this.enable():this.disable()}inScope(e){var t;return null==(t=this.getKeyEventTarget())?void 0:t.contains(e)}getKeyCode(e){var t;return null!=(t=this.getKeyboardOption("map",{})[e])?t:e}getActionKey(e){for(const t of this.getActionKeyContext()){const n=hl(t);if(null==n?void 0:n[e])return n[e]}return null}getKeyboardOption(e,t){var n,i,r,a;return null!=(a=null!=(r=null==(n=this.playerOptions.keyboard)?void 0:n[e])?r:null==(i=cs().keyboard)?void 0:i[e])?a:t}get playerOptions(){return this.playerOptions_||(this.playerOptions_=this.getModel(Bl.PlayerOptions)),this.playerOptions_}addListeners(){document.addEventListener(this.defaultKeyEventType,this.onKeydown),document.addEventListener(Bo.ACTION_KEY,this.onActionKeyDefault)}removeListeners(){document.removeEventListener(this.defaultKeyEventType,this.onKeydown),document.removeEventListener(Bo.ACTION_KEY,this.onActionKeyDefault)}get hasScope(){return this.scope&&this.scope!==zs.NONE}createDetail(e){return{action:e,avia:nr.appNamespace,player:this.player,system:nr,buildInfo:Uo,metadata:{},logger:this.facade.logger}}get playerContainer(){var e;const t=null==(e=this.facade)?void 0:e.retrieveProxy(bl.PlayerDomProxy);return null==t?void 0:t.getMain()}}class eu extends vc{constructor(e,t){super(e),this.data={},this.mouseDown=!1,this.mouseOver=!1,this.idleEvents=["mousemove","mousedown","keypress","DOMMouseScroll","mousewheel","touchmove","touchstart","MSPointerMove","MSPointerDown","pointermove","pointerdown"],this.data={activeState:Ds.INACTIVE,idleDelay:t.idleDelay},this.container=t.container,this.document=t.document}handleNotification(e){}onRegister(){this.onMouseDown=this.onMouseDown.bind(this),this.onMouseUp=this.onMouseUp.bind(this),this.onMouseEnter=this.onMouseEnter.bind(this),this.onMouseLeave=this.onMouseLeave.bind(this),this.onFocusOut=this.onFocusOut.bind(this),this.reset=this.reset.bind(this),this.idle=this.idle.bind(this),this.container.addEventListener("mouseenter",this.onMouseEnter),this.container.addEventListener("mouseleave",this.onMouseLeave),this.container.addEventListener("mousedown",this.onMouseDown),this.document.addEventListener("mouseup",this.onMouseUp),this.document.addEventListener("focusout",this.onFocusOut)}onRemove(){this.container.removeEventListener("mouseenter",this.onMouseEnter),this.container.removeEventListener("mouseleave",this.onMouseLeave),this.container.removeEventListener("mousedown",this.onMouseDown),this.document.removeEventListener("mouseup",this.onMouseUp),this.document.removeEventListener("focusout",this.onFocusOut),this.stop(),this.container=null,this.document=null,super.onRemove()}applyListeners(){const e=arguments.length>0&&void 0!==arguments[0]&&!arguments[0]?"remove":"add";
2this.idleEvents.forEach(t=>this.container["".concat(e,"EventListener")](t,this.reset,{passive:!0}))}start(){this.stop(),this.applyListeners(),this.timeout=setTimeout(this.idle,this.idleDelay)}stop(){clearTimeout(this.timeout),this.applyListeners(!1)}idle(){this.activeState=this.mouseOver?Ds.IDLE:Ds.INACTIVE}reset(){this.activeState=Ds.ACTIVE,this.start()}onMouseEnter(){this.reset(),this.mouseOver=!0,this.activeState=Ds.ACTIVE,this.start()}onMouseLeave(){this.reset(),this.mouseOver=!1,this.activeState=Ds.INACTIVE}onMouseDown(){this.mouseDown=!0}onMouseUp(){this.mouseDown&&(this.mouseDown=!1,this.start())}onFocusOut(e){const t=e.relatedTarget,n=this.container.contains(t);n&&this.stop(),this.activeState=n?Ds.ACTIVE:Ds.INACTIVE}set activeState(e){this.mouseDown&&(e=Ds.ACTIVE),e!==this.data.activeState&&(this.data.activeState=e,this.sendNotification(Bo.ACTIVE_STATE_CHANGE,{activeState:e}))}get activeState(){return this.data.activeState}get idleDelay(){return this.data.idleDelay}}class tu extends vc{constructor(e,t){super(e),this.app=t}get presentationMediator(){return this.facade.retrieveMediator(Ul.PRESENTATION_MEDIATOR)}get actionKeyMediator(){return this.facade.retrieveMediator(Ul.KEY_COMMAND)}getBuffered(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];var t;return(null==(t=this.presentationMediator)?void 0:t.getBuffered(e))||[]}primeVideoElement(){var e;const t=this.facade.retrieveProxy(bl.PlayerDomProxy),n=this.getModel(Bl.PlayerOptions);return t.primeVideo(null==(e=n.overrides)?void 0:e.blankVideoUrl)}offsetTimedText(e){var t;null==(t=this.presentationMediator)||t.offsetTimedText(e)}setFullscreenElement(e){this.facade.retrieveMediator(Ul.FULLSCREEN).fullscreenElement=e}getFullscreenElement(){return this.facade.retrieveMediator(Ul.FULLSCREEN).fullscreenElement}getSessionTime(){var e;return(null==(e=this.presentationMediator)?void 0:e.getSessionTime())||null}getPlaybackTime(){var e;return(null==(e=this.presentationMediator)?void 0:e.getPlaybackTime())||null}updateDimensions(){var e;null==(e=this.presentationMediator)||e.checkSize()}onRemove(){this.app=null,super.onRemove()}getAppApi(){return this.app.getApi()}getConfigAsJson(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2;const t=this.getProxy(bl.ModelCollectionProxy).getModel(Bl.PlayerOptions).data;return JSON.stringify({resource:this.getCurrentResource(),playerOptions:t,buildInfo:Uo},(e,t)=>t instanceof HTMLElement?void 0:t,e)}validateSeek(e,t){if(isNaN(e))return this.logger.warn("Invalid seek() time [".concat(e,"] supplied")),null;const n=this.getModel(Bl.PresentationState),i=this.getProxy(bl.ContentPlaybackStateProxy),r=i&&i.model.streamType===tl.LIVE;return!n||!i||n.isTrackingAd||r?(this.logger.warn("seek() may not be called in the current context"),null):_a(e,0,t)}isPlaybackSuspended(){return this.getModel(Bl.PresentationState).suspended}getContainerRect(){const e=this.getProxy(bl.PlayerDomProxy);return e?e.getPresentationRect():null}getCurrentResource(){const e=this.getProxy(bl.ResourceProxy);return(null==e?void 0:e.resource)||null}killCurrentResource(){const e=this.getProxy(bl.ResourceProxy);if(!e)return Promise.resolve();const t=e.resource,n=this.getProxy(bl.ContentPlaybackStateProxy),i=n.model.streamType===tl.LIVE||n.model.streamType===tl.LTS,r=this.presentationMediator;return this.logger.info("Killing current resource"),r?r.close().then(()=>{i&&this.sendNotification(Bo.LIVE_PRESENTATION_STOPPED,{resource:t})}).catch(e=>{this.logger.error(e)}):Promise.resolve()}skipAd(){this.presentationMediator.skipAd()}getPlugin(e){const t=this.facade.retrieveMediator(Ul.PLUGIN_MEDIATOR);return t?t.getPlugin(e):null}dispatchPluginEvent(e){this.app.sendEvent(Bo.PLUGIN_EVENT,e)}getMuteState(){const e=this.getModel(Bl.PresentationState);return e?e.isMuted:null}getVolume(){const e=this.getModel(Bl.PresentationState);return e?e.volume:NaN}getDimensions(){const e=this.getProxy(bl.PlayerDomProxy);return e?e.getDimensions():null}getAdBreakTimes(){var e;return(null==(e=this.presentationMediator)?void 0:e.getAdBreakTimes())||null}grabFrame(){const e=this.getProxy(bl.VideoProxy),t=null==e?void 0:e.getVideo();if(!t)return null;const n=document.createElement("canvas"),i=n.getContext("2d"),r=n.width=t.videoWidth,a=n.height=t.videoHeight;i.drawImage(t,0,0,r,a);const o=n.toDataURL(),s=document.createElement("img");return s.setAttribute("src",o),s}getKeyEventTarget(){var e;return null==(e=this.actionKeyMediator)?void 0:e.getKeyEventTarget()}disableKeyCommands(){var e,t;arguments.length>0&&void 0!==arguments[0]&&!arguments[0]?null==(t=this.actionKeyMediator)||t.enable():null==(e=this.actionKeyMediator)||e.disable()}enterActionKeyContext(e){var t;null==(t=this.actionKeyMediator)||t.enterActionKeyContext(e)}getActionKeyContext(){var e;return null==(e=this.actionKeyMediator)?void 0:e.getActionKeyContext()}exitActionKeyContext(e){var t;null==(t=this.actionKeyMediator)||t.exitActionKeyContext(e)}listNotificationInterests(){return ai(Bo)}sendErrorEvent(e,t){this.app.sendEvent(e,t)}handleNotification(e){this.app.sendEvent(e.name,e.body)}
2onRegister(){super.onRegister()}}class nu extends vc{constructor(e,t){super(e,t),this.isFullscreen=!1,this.fsElement=null,this.enabled=!1,this.pIsAndroidFirefox=null,this.fsApiSupported=!0,this.fsMgr=null,this.useCustomFullscreen=!0,this.metadataLoadedDelayHandle=null,this.iosPropNames={ENTER_EVENT:"webkitbeginfullscreen",EXIT_EVENT:"webkitendfullscreen",ENTER_METHOD:"webkitEnterFullscreen",EXIT_METHOD:"webkitExitFullscreen",SUPPORTED:"webkitSupportsFullscreen"},this.fsMgr=Hi,this.changeHandler=e=>this.hChange(e)}set fullscreenElement(e){if(!(e instanceof HTMLElement))return;const t=this.system;t.isIos||t.isAndroid||(this.fsElement=e)}get fullscreenElement(){return this.fsElement}onRemove(){clearTimeout(this.metadataLoadedDelayHandle),!this.fsApiSupported&&this.fsElement&&(this.fsElement.removeEventListener(this.iosPropNames.ENTER_EVENT,this.changeHandler),this.fsElement.removeEventListener(this.iosPropNames.EXIT_EVENT,this.changeHandler)),this.fsMgr&&fi(this.fsMgr.off)&&this.fsMgr.off("change",this.changeHandler),this.fsElement=null,this.fsMgr=null,super.onRemove()}enter(){if(this.enabled)return this.useCustomFullscreen?(this.isFullscreen=!0,void this.sendFullscreenNotification()):void(this.fsApiSupported?this.fsMgr.request(this.fsElement):this.enterFsIos())}exit(){if(this.enabled)return this.useCustomFullscreen?(this.isFullscreen=!1,void this.sendFullscreenNotification()):void(this.fsApiSupported?this.fsMgr.exit():this.exitFsIos())}isFullScreenPermitted(){return this.enabled}isFullScreen(){return this.isFullscreen}get isAndroidFirefox(){if(null==this.pIsAndroidFirefox){const e=this.system;this.pIsAndroidFirefox=e.os===Wi.ANDROID&&e.browser===zi.FIREFOX}return this.pIsAndroidFirefox}handleNotification(e){const t=e.name;t!==Bo.VIDEO_ELEMENT_ADDED?t!==Bo.STREAM_METADATA?this.enabled&&(t===jl.ENTER_FULLSCREEN_REQUEST?this.enter():this.exit()):this.metadataLoadedDelayHandle=setTimeout(()=>this.handleMetadataLoaded(),20):this.onRegister()}listNotificationInterests(){return[Bo.VIDEO_ELEMENT_ADDED,Bo.STREAM_METADATA,jl.ENTER_FULLSCREEN_REQUEST,jl.EXIT_FULLSCREEN_REQUEST]}handleMetadataLoaded(){this.enabled=this.enabled||this.webkitIosEnabled(),this.enabled&&this.sendNotification(jl.FULLSCREEN_AVAILABLE,null)}hChange(e){this.isFullscreen=this.fsApiSupported?Hi.isFullscreen:this.checkWebkitIosState(e),this.isAndroidFirefox&&(this.isFullscreen&&this.fsElement.setAttribute("controls",""),!this.isFullscreen&&this.fsElement.removeAttribute("controls")),this.sendFullscreenNotification()}sendFullscreenNotification(){this.sendNotification(jl.FULLSCREEN_CHANGE,{isFullscreen:this.isFullscreen},Vl.INTERNAL)}enterFsIos(){this.fsElement[this.iosPropNames.ENTER_METHOD]()}exitFsIos(){this.fsElement[this.iosPropNames.EXIT_METHOD]()}webkitIosEnabled(){return this.system.isIos&&this.fsElement[this.iosPropNames.SUPPORTED]}checkWebkitIosState(e){return e.type===this.iosPropNames.ENTER_EVENT}onRegister(){if(this.useCustomFullscreen=!this.getModel(Bl.PlayerOptions).useNativeFullscreen,this.useCustomFullscreen)return void(this.enabled=!0);const e=this.facade.retrieveProxy(bl.PlayerDomProxy),t=this.facade.retrieveProxy(bl.VideoProxy);this.fsMgr.isEnabled?this.fsElement=e.getMain():(this.fsApiSupported=!1,this.fsElement=t.getVideo()),this.fsApiSupported&&this.fsElement&&this.fsMgr.isEnabled?(this.enabled=!0,this.fsMgr.on("change",this.changeHandler)):this.fsElement&&!this.fsApiSupported&&(this.fsElement.addEventListener(this.iosPropNames.ENTER_EVENT,this.changeHandler),this.fsElement.addEventListener(this.iosPropNames.EXIT_EVENT,this.changeHandler))}}class iu extends Jl{execute(e){const t=this.facade,n=e.body.app;t.registerMediator(new tu(Ul.APPLICATION,n));const i=this.system;if(!i.isBrowser)return void this.logger.info("Skipping view creation");i.isTv||t.registerMediator(new nu(Ul.FULLSCREEN));const r=e.body.playerOptions,a=this.facade.retrieveProxy(bl.PlayerDomProxy),o=this.getScope(i,r),s=new $c(Ul.KEY_COMMAND,o);t.registerMediator(s),this.logger.info('Key handling scope is "'.concat(o,'"'));const l=s.getKeyEventTarget(),c=a.getMain();this.facade.registerMediator(new eu(Ul.ACTIVITY,{container:l&&l!==i.document?l:c,document:i.document,idleDelay:r.idleDelay})),this.logger.debug("View prepared")}getScope(e,t){var n;let i={};(null==(n=t.keyboard)?void 0:n.scope)?i=t.keyboard:t.keyboardScope&&(i={scope:t.keyboardScope});const r=ri({},cs().keyboard||{},i).scope;return e.isBrowser?r||zs.DOCUMENT:zs.NONE}}class ru extends Jl{execute(e){if(!this.facade.retrieveMediator(Ul.APPLICATION))return;const t=e.name,n=e.body,i=n.error||n;this.setDetails(t,i),i.fatal?this.logger.error(i.message):this.logger.warn(i.message),this.sendNotification(Bo.ERROR,{error:i})}setDetails(e,t){let n=null,i=null;switch(e){case jl.RESOURCE_ERROR:n=Sa.RESOURCE;break;case jl.VIDEO_START_ERROR:n=Sa.VIDEO_START;break;case jl.VIDEO_PLAYBACK_ERROR:n=Sa.PLAYBACK;break;case jl.AD_ERROR:n=Sa.AD;break;case jl.AD_STALLED:n=Sa.AD,i=Vn.AD_STALLED}i&&(t.message=i),n&&(t.category=n)}}function au(e,t){return e.id&&e.name?"".concat(e.id,":").concat(e.name):t}const ou="Performance API error";class su extends Jl{execute(e){var t;const n=this.facade.retrieveMediator(Ul.PRESENTATION_MEDIATOR),i=this.facade.retrieveProxy(bl.ResourceProxy),r=null==i?void 0:i.resource;if((null==(t=this.contentPlaybackStateProxy)?void 0:t.model)&&r)switch(e.name){case jl.PLAY:const t=!!n,i=t&&this.getModel(Bl.PresentationState).started;t&&e.type===Vl.EXTERNAL&&!i?this.invokePlayOnUserGesture(n):i&&(null==n||n.play());break;case jl.PAUSE:null==n||n.pause();break;case jl.SEEK:n.seek(e.body.value);break;case jl.SWITCH_AUDIO_TRACK:n.adapter.setAudioTrack(e.body.value);break;case jl.SWITCH_TEXT_TRACK:const r=e.body.value;if(r){this.facade.retrieveProxy(bl.TextTrackProxy).language=r.language;const e=this.contentPlaybackStateProxy.getTextTrackById(r.id);n.adapter.setTextTrack(e)}break;case jl.SWITCH_TEXT_MODE:const a=e.body.value,o=this.facade.retrieveProxy(bl.TextTrackProxy);o.enabled=a,(null==n?void 0:n.adapter)&&n.adapter.setTextTrackMode(o.mode);break;case Bo.MUTE_CHANGE:n.mute(e.body.muted);break;case Bo.VOLUME_CHANGE:const s=e.body.volume;!isNaN(s)&&n.setVolume(s)}else this.logger.debug("play() can not be invoked in this context.")}get contentPlaybackStateProxy(){return this.facade.retrieveProxy(bl.ContentPlaybackStateProxy)}invokePlayOnUserGesture(e){const t=this.facade.retrieveProxy(bl.PlayerDomProxy),n=this.getModel(Bl.PlayerOptions).overrides,i=this.system,r=!t||i.supportsUnrestrictedAutoplay||!0===(null==n?void 0:n.skipPriming);e.beforePlayOnUserGesture(),r?e&&e.playOnUserGesture():t.primeVideo(null==n?void 0:n.blankVideoUrl).then(()=>
2{if(i.device===Ki.IPHONE){const t="timeupdate",n=this.facade.retrieveProxy(bl.VideoProxy).getVideo(),i=r=>{n.removeEventListener(t,i),setTimeout(()=>e.playOnUserGesture(),200)};n.addEventListener(t,i)}else e.playOnUserGesture()}).catch(e=>{this.logger.error("ERROR - PlaybackCommand: Priming FAILED. ".concat(e.message)),this.facade.sendNotification(Bo.AUTOPLAY_BLOCKED,e,Vl.INTERNAL)})}}class lu extends zl{constructor(){super(...arguments),this.isReady=!1,this.pUserQualityCategory=Pa.AUTO}onRegister(){super.onRegister();const e=this.facade.retrieveProxy(bl.ModelCollectionProxy);this.contentPlaybackState=e.getModel(Oc.modelName),this.isReady=!0}onRemove(){this.contentPlaybackState=null,this.thumbnailTrack=null,super.onRemove()}processQualityProfile(e){const t=ci(e.map(e=>Va(e)));this.contentPlaybackState.qualities=t,this.qualitySwitchingMode!==el.MANUAL&&(this.qualitySwitchingMode=e.length?el.AUTO:el.UNAVAILABLE)}addTextTracks(e){this.contentPlaybackState.textTracks=e}getTextTrackById(e){return this.contentPlaybackState.textTracks.find(t=>t.id===e)}getThumbnail(e){var t;return null==(t=this.thumbnailTrack)?void 0:t.getCueAt(e)}get textTracks(){return this.contentPlaybackState.textTracks}set textTrack(e){this.contentPlaybackState.textTrack=e}get textTrack(){return this.contentPlaybackState.textTrack}get isAbrSwitchingAvailable(){return!!this.qualities&&this.qualities.length>1}set userQualityCategory(e){this.pUserQualityCategory=e}get userQualityCategory(){return this.pUserQualityCategory}set qualitySwitchingMode(e){this.contentPlaybackState.qualityMode=e}get qualitySwitchingMode(){return this.contentPlaybackState.qualityMode}set qualities(e){this.contentPlaybackState.qualities=e}get qualities(){return this.contentPlaybackState.qualities}set maxBandwidth(e){this.contentPlaybackState.maxBandwidth=isNaN(this.contentPlaybackState.maxBandwidth)?e:Math.max(e,this.contentPlaybackState.maxBandwidth)}get model(){return this.contentPlaybackState}get minIndex(){return this.contentPlaybackState.qualities.findIndex(e=>e.enabled)}get maxIndex(){return this.contentPlaybackState.qualities.reduce((e,t,n)=>t.enabled?n:e,0)}get minBitrate(){return this.contentPlaybackState.minBitrate}set minBitrate(e){this.contentPlaybackState.minBitrate=e}get maxBitrate(){return this.contentPlaybackState.maxBitrate}set maxBitrate(e){this.contentPlaybackState.maxBitrate=e}get maxHeight(){return this.contentPlaybackState.maxHeight}set maxHeight(e){this.contentPlaybackState.maxHeight=e}get quality(){return this.contentPlaybackState.quality}set quality(e){this.contentPlaybackState.quality=e}set qualityCappedToScreenSize(e){this.contentPlaybackState.qualityCappedToScreenSize=e}get qualityCappedToScreenSize(){return this.contentPlaybackState.qualityCappedToScreenSize}get audioTracks(){return this.contentPlaybackState.audioTracks}set audioTracks(e){this.contentPlaybackState.audioTracks=e}get audioTrack(){return this.contentPlaybackState.audioTrack}set audioTrack(e){this.contentPlaybackState.audioTrack=e}}class cu extends zl{mock(e){this.pResource=e}onRemove(){this.pResource=null,super.onRemove()}onRegister(){super.onRegister(),this.pResource=this.data}get resource(){return this.pResource}get location(){return this.pResource.location}get playback(){return this.pResource.playback}get metadata(){return this.pResource.metadata}get ad(){return this.pResource.ad}get adTrackingSettings(){return this.pResource.ad.viewabilityTracking}get hasValidMediaUrl(){return!mi(this.location.mediaUrl)}}class uu{static parseCaption(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=e.trim().split("\n"),r=/([0-9:.]+)\s*-->\s*([0-9:.]+)([^\n]*)/,a=/\s*([A-Za-z]+)\s*:\s*([\w\-%]+)/g;try{r.test(i[0])||(t=parseInt(i.shift()));const e=i[0].match(r).slice(1),o=e[2],s=ro(e[0]),l=ro(e[1]),c=i.slice(1).join("\n");return null!=o&&o.replace(a,(e,t,i)=>n[t]=i),Un({id:t,startTime:s,endTime:l,text:c},n)}catch(e){return null}}static parse(e){const t=(e=e.replace(/\r/g,"")).split("\n\n"),n=/^(WEBVTT|NOTE|STYLE)/;return t.reduce((e,t)=>
2{if(!n.test(t)&&t){const n=this.parseCaption(t,e.length);n&&e.push(n)}return e},[])}}class du{constructor(e,t){this.url=e,this.cues=t}getCueAt(e){return this.cues.find(t=>t.startTime<=e&&t.endTime>=e)}renderCueAt(e,t){Ss(this.getCueAt(e),t)}static create(e,t){const n=document.createElement("a");n.href=e;const i=n.protocol+"//"+n.hostname,r=i+n.pathname.split("/").slice(0,-1).join("/")+"/";return t.applyHook(Yn.REQUEST,{url:e},{objectType:Qn.OTHER}).then(e=>Ri(e)).then(n=>t.applyHook(Yn.RESPONSE,{url:e,data:n},{objectType:Qn.OTHER})).then(e=>e.data).then(t=>{const n=uu.parse(t);return n.forEach(e=>{const t=e.text.split("#"),n=(0,x.A)(t,2),a=n[0],o=n[1];let s=a;/^(https?:)?\/\//.test(s)||(s=/^\//.test(s)?i+s:r+s);const l=o.split("="),c=l[0],u=l[1].split(","),d={backgroundImage:"url(".concat(s,")")},h={url:s};ya(c,(e,t)=>{const n=u[t];switch(e){case"w":h.width=parseInt(n),d.width="".concat(n,"px");break;case"h":h.height=parseInt(n),d.height="".concat(n,"px");break;case"x":h.x=parseInt(n),d.backgroundPositionX="-".concat(n,"px");break;case"y":h.y=parseInt(n),d.backgroundPositionY="-".concat(n,"px")}}),e.style=d,e.data=h}),new du(e,n)})}}class hu extends vc{constructor(){var e;super(...arguments),e=this,this.loaded=!1,this.startedPlaying=!1,this.preloadContent=!0,this.minLtsThreshold=1800,this.sizeCheckInterval=1e3,this.lastSizeCheckTime=null,this.adapterTask=Promise.resolve(),this.seeking_=!1,this.paused_=!1,this.previousPlaybackState={state:null,overrides:{},buffer:NaN},this.contentIsBuffering=!1,this.endFreezeTimeoutHandle=null,this.timedTextOffset=0,this.isMonitoringCueEvents=!1,this.endFreezeThreshold=.75,this.endFreezeDebounceDelay=200,this.shouldSendTextTrackAvailable=!1,this.onLoadError=e=>{const t=e.message,n=e.cause;this.sendErrorNotification(t,n||e)},this.qualityChange=e=>{var t,n;if(!e)return void this.logger.warn("Invalid quality change");const i=this.contentPlaybackStateProxy;if(!(null==(t=i.qualities)?void 0:t.length))return void this.logger.warn("Invalid qualities list. Make sure qualitiesChange is called before qualityChange");if(!1===e.enabled){const t=i.qualities.map(t=>Bn(Un({},t),{enabled:t.enabled||t.index===e.index}));this.qualitiesChange(t)}
2const r=i.qualities.find(t=>t.index===e.index);r&&(null==(n=i.quality)?void 0:n.bitrate)!==r.bitrate&&(i.quality=r,i.model.bitrate=r.bitrate,this.respondToQualityChange(r))},this.qualitiesChange=e=>{const t=this.contentPlaybackStateProxy,n=t.model;this.contentPlaybackStateProxy.processQualityProfile(e),t.isAbrSwitchingAvailable||this.logger.info(zn.messages.ABR_UNAVAILABLE),this.logger.info("Qualities: ",n.qualities),this.notify(Bo.QUALITIES_CHANGE,{qualities:n.qualities})},this.error=e=>{e.fatal&&(this.adapterTask=Promise.resolve()),this.respondToError(e)},this.audioTrackChange=e=>{e=li(e,!0),this.contentPlaybackStateProxy.audioTrack=e,this.notify(Bo.AUDIO_TRACK_CHANGE,{audioTrack:e})},this.audioTracksChange=e=>{e=li(e,!0),this.contentPlaybackStateProxy.audioTracks=e,this.notify(Bo.AUDIO_TRACKS_CHANGE,{audioTracks:e})},this.cdnChange=e=>{const t=this.contentPlaybackStateProxy;e!==t.model.cdn&&(t.model.cdn=e,this.notify(Bo.CDN_CHANGE,{cdn:e}))},this.drmKeySystemCreated=e=>{this.contentPlaybackStateProxy.model.drmType=e,this.notify(Bo.DRM_KEY_SYSTEM_CREATED,{keysystem:e})},this.timeUpdate=()=>{if(!this.pAdapter)return;const e=this.pAdapter.getCurrentTime(),t=this.presoModel.streamDuration;this.updateLiveStreamInfo(),!this.pAdapter.getIsLiveStream()&&!isNaN(t)&&t-e<=this.endFreezeThreshold&&this.respondToVideoEndDebounced(),this.respondToVideoTimeUpdate(e)},this.playing=()=>{this.paused_=!1,this.updateLiveStreamInfo(),this.respondToVideoPlaying()},this.paused=()=>{this.paused_=!0,this.respondToVideoPaused()},this.seeking=e=>{this.seeking_||(this.seeking_=!0,this.respondToVideoSeeking(e),this.respondToWaiting("seeking",!0))},this.seeked=()=>{this.seeking_=!1,this.respondToVideoSeeked(),this.respondToWaiting("seeking",!1)},this.ended=()=>{this.respondToVideoEndDebounced.cancel(),this.respondToVideoEnd()},this.durationChange=()=>{const e=this.pAdapter.getDuration();e>0&&this.respondToDurationChange(e),this.updateLiveStreamInfo()},this.volumeChange=(e,t)=>
2{e!==this.presoModel.volume&&this.notify(Bo.VOLUME_CHANGE,{volume:e}),null!=t&&t!==this.presoModel.isMuted&&this.notify(Bo.MUTE_CHANGE,{muted:t})},this.metadataCuepoint=e=>{this.respondToId3Data(e)},this.textCuepoints=function(t){let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(e.textTrackProxy.enabled||n)&&(e.isMonitoringCueEvents&&t.forEach(t=>e.respondToTtCue(t)),e.notify(Bo.TEXT_CUEPOINT,{activeCues:t,forced:n}))},this.textTrackDisplayModeChange=e=>{const t=e!==yo.DISABLED;this.textTrackProxy.mode=e,this.notify(Bo.TEXT_TRACK_ENABLED_CHANGE,{textTrackEnabled:t}),this.respondToTextTrackModeChange(t)},this.textTracksChange=e=>{e=li(e,!0),this.contentPlaybackStateProxy.addTextTracks(e),this.notify(Bo.TEXT_TRACKS_CHANGE,{textTracks:e}),this.shouldSendTextTrackAvailable=!0,this.respondToTextTrackInfoChange()},this.textTrackChange=e=>{e=li(e,!0),this.contentPlaybackStateProxy.textTrack=e,this.notify(Bo.TEXT_TRACK_CHANGE,{textTrack:e}),this.respondToTextTrackInfoChange()},this.waitingChange=e=>{this.respondToWaiting("waiting",e),this.notify(Bo.WAITING_CHANGE,{waiting:e})}}get adapter(){return this.pAdapter}get timedTextContainer(){if(!this.timedTextContainer_){const e=this.facade.retrieveProxy(bl.PlayerDomProxy);this.timedTextContainer_=e.getElement(tc.CC_CONTAINER)}return this.timedTextContainer_}onRemove(){var e;null==(e=this.respondToVideoEndDebounced)||e.cancel(),this.pAdapter=null,this.contentPlaybackStateProxy=null,this.resourceProxy=null,this.textTrackProxy=null,this.presoModel=null,this.playerOptions=null,super.onRemove()}setVolume(e){this.presoModel.volume=e}load(){return this.loadVideo().catch(e=>{const t=e.type?e.data||e.detail:null,n=t?t.error||t:e;throw new Ca(jl.VIDEO_START_ERROR,n)})}play(){return this.playVideo()}pause(){this.pauseVideo()}suspend(){this.pAdapter.suspend()}resume(){this.pAdapter.resume()}offsetTimedText(e){const t=e>0;if(this.timedTextOffset=e,this.playerOptions.renderTextTrackNatively&&this.system.browser===zi.FIREFOX)this.monitorTtCues(t);else if(!1===this.playerOptions.renderTextTrackNatively&&this.timedTextContainer)this.timedTextContainer.style.bottom="".concat(e,"px");else{const n=this.facade.retrieveProxy(bl.PlayerDomProxy).getMain();null==document||document.documentElement.style.setProperty("--avia-timed-text-offset","".concat(e,"px")),null==n||n.classList[t?"add":"remove"]("avia-cc-offset")}}getBuffered(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];var t;return(null==(t=this.pAdapter)?void 0:t.getBuffered(e))||[]}loadVideo(){return this.pendingLoad?this.pendingLoad:this.loaded?Promise.resolve():(this.respondToWaiting("loading",!0),this.logger.time(qs.RESOURCE_LOAD),this.pendingLoad=this.pAdapter.load().then(e=>{this.loaded=!0,this.respondToWaiting("loading",!1),this.pendingLoad=null;const t=this.resourceProxy.resource;this.notify(Bo.STREAM_METADATA,{streamMetadata:e});const n=t.location.thumbnailTrackUrl;!this.contentPlaybackStateProxy.thumbnailTrack&&n&&du.create(n,this.getProxy(bl.HookProxy)).then(e=>{this.contentPlaybackStateProxy.thumbnailTrack=e,this.notify(Bo.THUMBNAIL_TRACK_AVAILABLE,{thumbnailTrack:e})}).catch(e=>this.logger.warn("Could not load thumbnail track",e)),this.logger.timeEnd(qs.RESOURCE_LOAD)}))}playVideo(){return this.logger.time(qs.RESOURCE_PLAYBACK),this.pAdapter.play().then(()=>{this.startedPlaying=!0,this.logger.timeEnd(qs.RESOURCE_PLAYBACK)}).catch(e=>{0===e.code?this.sendNotification(Bo.AUTOPLAY_BLOCKED,e):this.logger.warn("Video element play() error: ".concat(e))})}pauseVideo(){var e;null==(e=this.pAdapter)||e.pause()}muteVideo(e){e||this.presoModel.userHasUnmuted||(this.presoModel.userHasUnmuted=!0),this.presoModel.isMuted=e}seekVideo(e){return this.pAdapter.seek(e)}checkVideoBuffering(e){const t=Math.max(Math.floor(this.bufferingSampleRate/bc.INTERVAL),1);if(isFinite(t)&&e%t)return;let n=!1;if(!this.paused_){const e=this.previousPlaybackState.buffer+.001,t=this.video.currentTime;this.previousPlaybackState.buffer=t,n=t<e&&!this.seeking_}this.contentIsBuffering!==n&&(this.contentIsBuffering=n,this.notify(Bo.RESOURCE_BUFFERING,{buffering:n}))}get video(){return this.viewControl}notify(e,t){this.sendNotification(e,t,Vl.INTERNAL)}respondToIsPlayingLiveChange(e){this.notify(Bo.CONTENT_IS_PLAYING_LIVE,{isLive:e})}respondToStreamTypeChange(e){if(this.streamType===e)return;const t=this.contentPlaybackStateProxy.model;this.streamType=e,t.streamType=e,this.notify(Bo.STREAM_TYPE_CHANGE,{streamType:e})}respondToWaiting(e,t){this.previousPlaybackState.overrides[e]=t;const n=!this.previousPlaybackState.state||ai(this.previousPlaybackState.overrides).includes(!0);this.respondToPlaybackStateChange(n?Zs.WAITING:this.previousPlaybackState.state)}respondToPlaybackStateChange(e){const t=this.contentPlaybackStateProxy.model,n=e!==Zs.WAITING;if(t.state!==e){if(e!==Zs.IDLE&&n&&(this.previousPlaybackState.state=e),this.seeking_&&n)return;t.state=e,this.notify(Bo.PLAYBACK_STATE_CHANGE,{playbackState:e})}}monitorTtCues(e){const t=Array.from(this.video.textTracks).find(e=>uo(e.kind)&&e.mode===yo.SHOWING),n=null==t?void 0:t.activeCues;if(this.isMonitoringCueEvents=e,n)for(let e=0,t=n.length||0;e<t;e++)this.respondToTtCue(n[e])}respondToTtCue(e){e.line=this.isMonitoringCueEvents?.21875*this.timedTextOffset:"auto"}handleNotification(e){var t,n;switch(e.name){case jl.TIMER_TIC:null==(n=null==(t=this.pAdapter)?void 0:t.onTick)||n.call(t),this.respondToBufferingStatusCheck(e.body.count),this.lastSizeCheckTime&&!this.shouldCheckSize()||(this.lastSizeCheckTime=Date.now(),this.checkSize());break;case jl.FULLSCREEN_CHANGE:const i=e.body;this.presoModel.isFullscreen=i.isFullscreen,this.respondToFullscreenChange(i.isFullscreen)}}listNotificationInterests(){return[jl.TIMER_TIC,jl.FULLSCREEN_CHANGE]}onRegister(){var e,t;
2super.onRegister(),this.contentPlaybackStateProxy=this.facade.retrieveProxy(bl.ContentPlaybackStateProxy),this.resourceProxy=this.facade.retrieveProxy(bl.ResourceProxy),this.performanceProxy=this.facade.retrieveProxy(bl.PerformanceProxy),this.textTrackProxy=this.facade.retrieveProxy(bl.TextTrackProxy),this.presoModel=this.getModel(Bl.PresentationState),this.playerOptions=this.getModel(Bl.PlayerOptions),void 0!==this.playerOptions.sizeCheckInterval&&(this.sizeCheckInterval=this.playerOptions.sizeCheckInterval);const n=null==(e=this.resourceProxy.resource.playback)?void 0:e.lts;!isNaN(null==n?void 0:n.threshold)&&pi(null==n?void 0:n.threshold)&&(this.minLtsThreshold=n.threshold);const i=null==(t=this.resourceProxy.resource.playback)?void 0:t.abr,r=i.minBitrate,a=i.maxBitrate,o=i.maxHeight;this.contentPlaybackStateProxy.minBitrate=r,this.contentPlaybackStateProxy.maxBitrate=a,this.contentPlaybackStateProxy.maxHeight=o;const s=this.playerOptions.overrides;(null==s?void 0:s.endFreezeThreshold)&&(this.endFreezeThreshold=s.endFreezeThreshold),(null==s?void 0:s.endFreezeDebounceDelay)&&(this.endFreezeDebounceDelay=s.endFreezeDebounceDelay),this.respondToVideoEndDebounced=fa(()=>this.respondToVideoEnd(),this.endFreezeDebounceDelay),this.presoModel.isMuteAtPlayStart&&!this.presoModel.userHasUnmuted&&(this.muteVideo(!0),this.presoModel.isMuted=!0),this.bufferingSampleRate=this.performanceProxy.bufferingSampleRate}prepareForPlayback(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.initializing)return;const t={system:this.system,playerOptions:this.playerOptions,resource:this.resourceProxy.resource,performanceSettings:this.performanceProxy,textTrackSettings:this.textTrackProxy,video:this.viewControl,logger:this.logger};this.adapterTask=this.initializeAdapter(t,e).catch(this.onLoadError)}sendErrorNotification(e,t){this.notify(e,t)}createAdapter(e){return jn(this,null,function*(){const t=this.facade.retrieveProxy(bl.AdapterProxy);return yield t.createAdapter(Wn.PLAYBACK,e.resource,()=>this)})}initializeAdapter(e,t){return jn(this,null,function*(){try{if(this.logger.time(qs.PLAYBACK_ADAPTER_CREATION),this.initializing=!0,this.closing)return;try{if(this.pAdapter=yield this.createAdapter(e),this.closing)return}catch(t){const n=wa(e.resource);throw n&&(t.message+=". Attempting to play a stream of type ".concat(n)),new Ca(jl.RESOURCE_ERROR,t)}this.logger.timeEnd(qs.PLAYBACK_ADAPTER_CREATION),this.preloadContent&&(yield this.load());try{if(this.closing)return;if(!this.presoModel.isAutoplay&&!t)return;yield this.play()}catch(e){throw new Ca(jl.VIDEO_PLAYBACK_ERROR,e)}}finally{this.initializing=!1}})}respondToTextTrackInfoChange(){const e=this.contentPlaybackStateProxy,t=e.textTrack,n=e.textTracks;this.shouldSendTextTrackAvailable&&t&&n.length&&(this.notify(Bo.TEXT_TRACK_AVAILABLE),this.shouldSendTextTrackAvailable=!1)}calculateStreamType(){if(this.pAdapter.getIsLiveStream()){const e=this.pAdapter.getLiveStreamInfo().ltsWindowSize;return e<this.minLtsThreshold||isNaN(e)?tl.LIVE:tl.LTS}return tl.VOD}updateLiveStreamInfo(){if(!this.pAdapter.getIsLiveStream())return void this.respondToStreamTypeChange(tl.VOD);const e=this.contentPlaybackStateProxy.model,t=this.pAdapter.getLiveStreamInfo();e.liveStreamInfo=t;const n=this.calculateStreamType();this.respondToStreamTypeChange(n);const i=n===tl.LIVE||t.isPlayingLive;this.isPlayingLive!==i&&(this.isPlayingLive=i,this.respondToIsPlayingLiveChange(i)),e.streamType===tl.LTS&&this.respondToDurationChange(t.relativeDuration)}shouldCheckSize(){return this.playerOptions.sizeCheckInterval>0&&(!this.lastSizeCheckTime||Date.now()-this.lastSizeCheckTime>=this.sizeCheckInterval)}hasHook(e){return this.getProxy(bl.HookProxy).hasHook(e)}applyHook(e,t,n){return this.getProxy(bl.HookProxy).applyHook(e,t,n).catch(e=>{throw this.error(e),e})}}class fu extends hu{constructor(){super(...arguments),this.contentDurationReleased=!1,this.resumeTimeMaxProximityToAdBreak=5,this.isClickToPlay=!1,this.fullscreenRestrictedDuringAdPlay=!1,this._hasContent=!0,this.contentComplete=!1,this.timeSpent={startTime:null,lastTime:0,sessionTime:0,playbackTime:0,elapsedTime:0}}onRemove(){super.onRemove()}start(){const e=this.resourceProxy.location.mediaUrl;this._hasContent=gi(e)&&!mi(e)}get hasContent(){return this._hasContent}startSession(){this.updateTimeSpent()}close(){var e;if(this.closing)return this.closing;const t=null==(e=this.contentPlaybackStateProxy)?void 0:e.model,n=(null==t?void 0:t.t
2ime)||0,i=(null==t?void 0:t.duration)||0,r=this.isAdPlaying(),a=this.resourceProxy.resource;return this.respondToPlaybackStateChange(Zs.STOPPED),this.contentPlaybackStateProxy.isReady=!1,this.closing=this.adapterTask.then(()=>{this.startedPlaying&&this.pause(),this.logger.info("Closing Presentation"),this.closeAds()}).then(()=>this.destroyAdapters()).then(()=>{const e=!r&&this.hasContent&&!this.isContentComplete(),t=r;this.notify(Bo.RESOURCE_END,{resource:a,contentTime:n,contentDuration:i,contentInterrupted:e,adInterrupted:t,interrupted:e||t})}).catch(e=>{throw Jo.error(e),e}).then(()=>{this.closing=null})}destroyAdapters(){return jn(this,null,function*(){var e;yield null==(e=this.adapter)?void 0:e.destroy()})}getPlayerVersionInfo(){return"".concat(Uo.playerName,"_").concat(Uo.playerVersion)}startContentSegment(){}closeAds(){}beforePlayOnUserGesture(){}playOnUserGesture(){this.notify(jl.VIDEO_LOAD_START),this.prepareForPlayback(!0)}mute(e){this.muteVideo(e)}play(){return this.contentComplete&&(this.contentComplete=!1),super.play()}seek(e){return this.contentComplete&&(this.contentComplete=!1),this.seekVideo(e)}setVolume(e){this.videoProxy.setVideoVolume(e),super.setVolume(e)}getAdBreakTimes(){return[]}getSessionTime(){return null==this.timeSpent.startTime?null:this.updateTimeSpent().sessionTime}getPlaybackTime(){return null==this.timeSpent.startTime?null:this.updateTimeSpent().playbackTime}checkSize(){if(!this.domProxy)return;const e=this.domProxy.getPresentationRect();e.width===this.currentRect.width&&e.height===this.currentRect.height||(this.currentRect=e,this.respondToSizeChange(),this.notify(Bo.PRESENTATION_SIZE_CHANGE,{width:this.currentRect.width,height:this.currentRect.height}))}releaseContentDuration(e){this.contentDurationReleased=!0,this.notify(Bo.CONTENT_DURATION_AVAILABLE,{contentDuration:e})}updateTimeSpent(){const e=performance.now();if(null==this.timeSpent.startTime){this.timeSpent.startTime=e;const t=qs.FIRST_FRAME,n={id:this.facade.appId,name:t,startTime:e};this.sendNotification(Bo.METRIC,{metric:new $o(t,n,Qs.MARK)}),this.sendNotification(Bo.PLAYBACK_STARTED)}null==this.timeSpent.lastTime&&(this.timeSpent.lastTime=e);const t=e-this.timeSpent.startTime;return this.timeSpent.elapsedTime=t,this.timeSpent.sessionTime=t/1e3,this.contentPlaybackStateProxy.model.state!==Zs.PAUSED&&(this.timeSpent.playbackTime+=(e-this.timeSpent.lastTime)/1e3,this.timeSpent.lastTime=e),this.timeSpent}adjustStartTimeForAdBreakProximity(e,t){for(let n=0,i=t.length;n<i;n++){const i=t[n].startTime-e;if(i>=0&&i<this.resumeTimeMaxProximityToAdBreak)return e-this.resumeTimeMaxProximityToAdBreak}return e}get domProxy(){return this.facade.retrieveProxy(bl.PlayerDomProxy)}get videoProxy(){return this.facade.retrieveProxy(bl.VideoProxy)}muteVideo(e){super.muteVideo(e),this.videoProxy.muteVideo(e)}respondToPlaybackStateChange(e){super.respondToPlaybackStateChange(e),this.timeSpent.lastTime=null}respondToFullscreenChange(e){this.checkSize(),this.notify(Bo.FULLSCREEN_CHANGE,{fullscreen:e})}respondToVideoPaused(){this.respondToPlaybackStateChange(Zs.PAUSED)}respondToVideoPlaying(){this.presoModel.started||(this.presoModel.started=!0),this.respondToPlaybackStateChange(Zs.PLAYING)}respondToVideoSeeking(e){e&&(null===e.from.contentTime&&(e.from.contentTime=e.from.streamTime),null===e.to.contentTime&&(e.to.contentTime=e.to.streamTime)),this.notify(Bo.SEEK_START,e)}respondToVideoSeeked(){this.notify(Bo.SEEK_COMPLETE)}respondToQualityChange(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.notify(Bo.QUALITY_CHANGE,{quality:e})}respondToError(e){e.message||(e.message=zn.messages.UNSPECIFIED_ERROR),e.code||(e.code=Ui.UNSPECIFIED_VIDEO_PLAYBACK_ERROR);const t=this.startedPlaying||!e.category?jl.VIDEO_PLAYBACK_ERROR:jl.PLAYER_ERROR;this.sendErrorNotification(t,e)}respondToVideoEnd(){this.notify(jl.RESOURCE_COMPLETE)}respondToBufferingStatusCheck(e){const t=this.presoModel.streamTime;!isNaN(t)&&t>0&&this.checkVideoBuffering(e)}respondToId3Data(e){this.notify(Bo.METADATA_CUEPOINT,{cue:e})}updateContentProgress(e){const t=this.contentPlaybackStateProxy.model,n=t.duration,i=t.liveStreamInfo,r=t.streamType,a={contentTime:t.time,contentDuration:n,streamTime:e,streamDuration:this.presoModel.streamDuration,sessionTime:this.timeSpent.sessionTime,playbackTime:this.timeSpent.playbackTime};if(r!==tl.VOD){const e=i.relativeTime,n=i.relativeDuration;a.contentTime=e,a.contentDuration=n,a.streamTime=e,a.streamDuration=n,a.elapsedTimeMs=this.timeSpent.elapsedTime,this.presoModel.streamTime=e,this.presoModel.streamDuration=n,t.time=e,t.duration=n}return a}respondToVideoTimeUpdate(e){this.updateTimeSpent();const t=this.updateContentProgress(e);this.notify(Bo.CONTENT_PROGRESS,t)}respondToSizeChange(){this.adapter&&this.adapter.resize()}respondToDurationChange(e){}respondToTextTrackModeChange(e){}setForClickToPlay(){if(this.getModel(Bl.PlayerOptions).useNativeControls){const e=this.domProxy.getMain(),t=()=>{e.removeEventListener("click",t),this.notify(jl.PLAY_ON_USER_GESTURE)};e.addEventListener("click",t)}}isContentComplete(){if(this.contentComplete)return!0;const e=this.contentPlaybackStateProxy.model;return e.streamType!==tl.LIVE&&e.streamType!==tl.LTS&&!(isNaN(e.time)||e.time<e.duration)}isAdPlaying(){return this.presoModel.isTrackingAd}handleNotification(e){super.handleNotification(e)}listNotificationInterests(){return super.listNotificationInterests().concat([])}
2onRegister(){super.onRegister();const e=this.playerOptions.overrides;e.resumeTimeMaxProximityToAdBreak&&(this.resumeTimeMaxProximityToAdBreak=e.resumeTimeMaxProximityToAdBreak),this.isClickToPlay=!this.presoModel.isAutoplay;const t=this.system;this.fullscreenRestrictedDuringAdPlay=t.isIos||t.isAndroid,this.domProxy&&(this.currentRect=this.domProxy.getPresentationRect())}}var pu=Object.defineProperty,mu=Object.getOwnPropertyDescriptor,gu=(e,t,n,i)=>{for(var r,a=mu(t,n),o=e.length-1;o>=0;o--)(r=e[o])&&(a=r(t,n,a)||a);return a&&pu(t,n,a),a};class vu extends fu{constructor(e,t){super(e,t),this.adAdapter_=null,this.squeezeBackAdapter_=null,this.adAdapterStarted=!1,this.contentSegmentStarted=!1,this.contentStartReleased=!1,this.contentCompleteReleased=!1,this.fatalContentErrorReceived=!1,this.hasMidRolls=!1,this.pendingSeekTime=null,this.currentAd=null,this.currentBreak=null,this.pointerLocked=!1,this.isPreloading=!1,this.cancelPointerLock=()=>{var e;document.removeEventListener("mousemove",this.cancelPointerLock),null==(e=document.exitPointerLock)||e.call(document),this.pointerLocked=!1},this.setPointerState=()=>jn(this,null,function*(){var e;if(!this.pointerLocked||this.isFullScreenAd()){if(!this.pointerLocked&&this.isFullScreenAd()){const t=null==(e=this.domProxy)?void 0:e.getMain();if(!t||!t.requestPointerLock)return;try{this.pointerLocked=!0,yield t.requestPointerLock(),this.cancelTimeout=setTimeout(()=>null==document?void 0:document.addEventListener("mousemove",this.cancelPointerLock),100)}catch(e){this.pointerLocked=!1,this.logger.warn(e)}}}else this.cancelPointerLock()}),this.hMovement=e=>{this.presoModel.isFullscreen&&this.pointerLockDebouncer()},this.preloadContent=!1}set adAdapter(e){this.adAdapter_=e}get adAdapter(){return this.adAdapter_}set squeezeBackAdapter(e){this.squeezeBackAdapter_=e}get squeezeBackAdapter(){return this.squeezeBackAdapter_}get adInProgress(){return this.presoModel.isTrackingAd}get appMediator(){return this.facade.retrieveMediator(Ul.APPLICATION)}destroyAdapters(){return Promise.resolve().then(()=>this.killAdapters()).then(()=>super.destroyAdapters())}onRemove(){clearTimeout(this.playingTimeout),this.killAdapters(),this.domProxy&&(this.cancelPointerLock(),this.pointerLockDebouncer.cancel(),clearTimeout(this.cancelTimeout),this.monitorActivity(!1)),this.delegate.destroy(),this.delegate=null,super.onRemove()}closeAds(){var e;null==(e=this.domProxy)||e.showAdContainer(!1),this.killAdapters()}beforePlayOnUserGesture(){var e;null==(e=this.adAdapter)||e.playClicked()}playOnUserGesture(){this.hasContent?super.playOnUserGesture():this.play()}start(){var e,t,n;const i=this.resourceProxy.playback.startTime,r=this.resourceProxy.ad.showPrerollOnNonZeroStart,a=!isNaN(i)&&i>0;if(super.start(),this.mute(this.presoModel.isMuted),a&&r&&(this.pendingSeekTime=i),this.isClickToPlay)this.setForClickToPlay();else{const i=this.resourceProxy.resource;(null==(t=null==(e=i.ad)?void 0:e.csai)?void 0:t.adCallUrl)&&!(null==(n=i.location)?void 0:n.mediaUrl)?this.play():(this.notify(jl.VIDEO_LOAD_START),this.prepareForPlayback())}}getAdBreakTimes(){var e;const t=[];return null==(e=this.breakSchedule)||e.forEach(e=>{t.push(Un({start:e.startTime,streamTimeStart:e.streamStartTime,end:e.endTime,streamTimeEnd:e.streamStartTime+e.duration,played:e.hasPlayed},e))}),t}createDelegate(e){this.delegate=Xl("".concat(e,".adAdapterDelegate"),this)}getDelegate(){return this.delegate.api}play(){var e;return this.presoModel.started?this.adInProgress&&(null==(e=this.adAdapter)?void 0:e.resume)?Promise.resolve(this.adAdapter.resume()):this.playVideo():(this.presoModel.started=!0,this.adAdapterStarted=!0,Promise.resolve((this.adAdapter||this.squeezeBackAdapter).start()))}pause(){var e;this.adInProgress&&(null==(e=this.adAdapter)?void 0:e.pause)?this.adAdapter.pause():this.pauseVideo()}getBuffered(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=super.getBuffered(e);return!0===e?t:t.map(e=>({startTime:this.contentTimeForStreamTime(e.startTime),endTime:this.contentTimeForStreamTime(e.endTime)}))}mute(e){var t;null==(t=this.adAdapter)||t.setMuteState(e),super.mute(e)}setVolume(e){var t;null==(t=this.adAdapter)||t.setVolume(e),super.setVolume(e)}seek(e){const t=this.streamTimeForContentTime(e),n=this.getPermittedSeekTime(e);return this.hasMidRolls&&this.adAdapter&&n!==t&&(this.pendingSeekTime=t,this.notify(Bo.SEEK_REDIRECT_START,{requestedSeekTime:e,actualSeekTime:this.contentTimeForStreamTime(n)})),this.contentComplete&&!this.contentSegmentStarted&&(this.contentSegmentStarted=!0),super.seek(n)}skipAd(){var e;null==(e=this.adAdapter)||e.skipAd()}pauseContent(){var e;this.pauseVideo(),null==(e=this.domProxy)||e.showAdContainer(!0)}resumeContent(){var e,t;if(this.currentAd=null,this.currentBreak=null,null==(e=this.domProxy)||e.showAdClickElement(!1),null==(t=this.domProxy)||t.showAdContainer(!1),!this.fatalContentErrorReceived)if(this.hasContent&&!this.contentComplete){if(!this.contentStartReleased){const e=this.resourceProxy.playback.startTime;if(!isNaN(e)&&e>0){const t=this.getAdBreakTimes(),n=this.adjustStartTimeForAdBreakProximity(e,t);this.resourceProxy.playback.startTime=n}return void this.load().then(()=>{this.resumeContentPlayComplete()}).catch(this.onLoadError)}this.resumeContentPlayComplete()}else super.respondToVideoEnd()}streamIdAvailable(e){this.notify(Bo.STREAM_ID_AVAILABLE,{sessionId:this.resourceProxy.resource.sessionId||"",streamId:e})}applyHook(e,t,n){return super.applyHook(e,t,n)}adSkippableStateChanged(){this.notify(Bo.AD_SKIPPABLE_STATE_CHANGE)}adSegmentStarted(){this.endContentSegment(),this.presoModel.adSegmentEntered=!0,this.notify(Bo.AD_SEGMENT_START)}adSegmentReentered(){this.notify(Bo.AD_SEGMENT_REENTERED)}adSegmentEnded(){this.contentSegmentStarted=!1,this.presoModel&&(this.presoModel.isTrackingAd=!1,this.presoModel.adSegmentEntered=!1),this.notify(Bo.AD_SEGMENT_END)}adBreaksAvailable(e){this.hasMidRolls=e.some(e=>e.type===Rs.MID),this.breakSchedule=e;const t=e.map(e=>e.startTime);this.notify(Bo.AD_CUEPOINTS_AVAILABLE,{cuepoints:t,adBreaks:e})}seekToStreamTime(e){this.seekVideo(e)}adBreakStart(){var e;this.endContentSegment(),this.updateSize(),null==(e=this.domProxy)||e.showAdContainer(!0),this.presoModel.isTrackingAd=!0,null===this.timeSpent.startTime&&this.startSession(),this.enterAdActionKeyContext(!0),this.notify(Bo.AD_BREAK_START)}adBreakMetadata(e){this.currentBreak=e,this.notify(Bo.AD_BREAK_METADATA,{adBreakInfo:e})}adLoaded(){}adStart(e){this.currentAd=e,this.respondToPlaybackStateChange(Zs.PLAYING),this.notify(Bo.AD_START,{adInfo:e})}squeezebackStart(e){this.notify(Bo.SQUEEZEBACK_START,{adInfo:e})}squeezebackEnd(){this.notify(Bo.SQUEEZEBACK_END)}
2adProgress(e,t,n,i){const r=this.presoModel,a=r.streamTime,o=r.streamDuration;this.presoModel.adTime=e,this.presoModel.adDuration=t,this.presoModel.breakTime=n,this.presoModel.breakDuration=i,this.notify(Bo.AD_PROGRESS,{currentTime:e,duration:t,breakTime:n,breakDuration:i,streamTime:a,streamDuration:o}),this.checkPreload(e,t)}adFirstQuartile(){this.notify(Bo.AD_FIRST_QUARTILE)}adMidpoint(){this.notify(Bo.AD_MIDPOINT)}adThirdQuartile(){this.notify(Bo.AD_THIRD_QUARTILE)}adComplete(){this.currentAd=null,this.notify(Bo.AD_COMPLETE)}adBreakComplete(){var e,t;if(this.currentBreak=null,this.currentAd=null,this.isPreloading=!1,null==(e=this.domProxy)||e.showAdContainer(!1),null==(t=this.domProxy)||t.showAdClickElement(!1),this.presoModel.isTrackingAd=!1,this.presoModel.adSegmentEntered=!1,this.notify(Bo.AD_BREAK_COMPLETE),this.enterAdActionKeyContext(!1),this.isContentComplete())super.respondToVideoEnd();else if(this.pendingSeekTime&&this.contentStartReleased){const e=this.pendingSeekTime;this.pendingSeekTime=null,this.contentPlaybackStateProxy.model.started&&this.notify(Bo.SEEK_REDIRECT_COMPLETE),this.seekVideo(e)}}adClicked(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";var t,n;(null==(n=null==(t=this.contentPlaybackStateProxy)?void 0:t.model)?void 0:n.state)!==Zs.PLAYING||this.isLiveOrLts||this.pause(),this.notify(Bo.AD_CLICK,{clickThroughUrl:e})}adError(e){this.currentAd=null,e.message||(e.message=zn.messages.UNSPECIFIED_ERROR),this.notify(jl.AD_ERROR,e)}adPaused(){this.respondToPlaybackStateChange(Zs.PAUSED),this.notify(Bo.AD_PAUSED)}adResumed(){this.notify(Bo.RESOURCE_BUFFERING,{buffering:!1}),this.respondToPlaybackStateChange(Zs.PLAYING),this.notify(Bo.AD_PLAYING)}adStalled(e){this.logger.dir(Ho.WARN,e,"Stalled Ad Info"),this.notify(Bo.AD_STALLED,new ka(Ui.AD_STALLED,Vn.AD_STALLED,e,!1,Sa.AD))}adBreakDiscarded(){this.notify(Bo.AD_BREAK_DISCARDED)}adSkipped(){this.notify(Bo.AD_SKIPPED)}onShowAdUi(e){this.notify(Bo.SHOW_AD_UI,{adUi:e})}onHideAdUi(){this.notify(Bo.HIDE_AD_UI)}allAdsComplete(){}adBuffering(e){}displayAdClickElement(e){var t;null==(t=this.domProxy)||t.showAdClickElement(e)}setContentDuration(e){e&&!isNaN(e)&&e>0&&(this.contentPlaybackStateProxy.model.duration=e,this.releaseContentDuration(e))}killAdapters(){var e,t,n,i;null==(t=null==(e=this.adAdapter)?void 0:e.destroy)||t.call(e),this.adAdapter_=null,null==(i=null==(n=this.squeezeBackAdapter_)?void 0:n.destroy)||i.call(n),this.squeezeBackAdapter_=null}enterAdActionKeyContext(e){e?this.appMediator.enterActionKeyContext(Os.AD):this.appMediator.exitActionKeyContext(Os.AD)}resumeContentPlayComplete(){return jn(this,null,function*(){this.pendingSeekTime&&this.contentStartReleased&&(yield this.seekVideo(this.pendingSeekTime).catch(e=>{this.logger.warn("APM#resumeContentPlayComplete; A seek() call failed."),this.logger.debug(e,"Error")}),this.notify(Bo.SEEK_REDIRECT_COMPLETE),this.pendingSeekTime=null),this.play()})}isFullScreenAd(){return this.presoModel.isFullscreen&&this.adInProgress}monitorActivity(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];var t,n;if(!nr.isDesktop||!nr.isBrowser)return;const i=e?"addEventListener":"removeEventListener";null==(n=null==(t=this.domProxy)?void 0:t.getMain())||n[i]("mousemove",this.hMovement)}handleNotification(e){var t,n,i;const r=e.name,a=e.body;let o=!1;switch(r){case Bo.FULLSCREEN_CHANGE:null==(t=this.adAdapter)||t.setFullscreenState(a.fullscreen),o=!0;break;case Bo.QUALITY_CHANGE:const e=(null==(n=a.quality)?void 0:n.bitrate)?Math.round(.001*a.quality.bitrate):-1;null==(i=this.adAdapter)||i.setContentBitrate(e)}super.handleNotification(e),o&&this.monitorActivity(a.fullscreen)}updateSize(){var e,t;const n=null==(e=this.domProxy)?void 0:e.getPresentationRect();n&&(null==(t=this.adAdapter)||t.updateSize(n))}respondToSizeChange(){this.updateSize(),super.respondToSizeChange()}respondToId3Data(e){var t,n;null==(t=this.adAdapter)||t.handleTimedMetadata(e),null==(n=this.squeezeBackAdapter)||n.handleTimedMetadata(e),super.respondToId3Data(e)}respondToVideoSeeking(e){e&&(e.from.contentTime=this.contentTimeForStreamTime(e.from.streamTime),e.to.contentTime=this.contentTimeForStreamTime(e.to.streamTime)),super.respondToVideoSeeking(e)}respondToVideoPaused(){super.respondToVideoPaused(),this.adInProgress?this.notify(Bo.AD_PAUSED):(this.respondToPlaybackStateChange(Zs.PAUSED),this.notify(Bo.CONTENT_PAUSED))}respondToPlaybackStateChange(e){this.isPreloading&&e===Zs.WAITING||super.respondToPlaybackStateChange(e)}respondToVideoPlaying(){super.respondToVideoPlaying(),this.signalPlaying()}respondToVideoTimeUpdate(e){var t,n;const i=this.contentPlaybackStateProxy.model,r=e>.75;this.presoModel.streamTime=e,null==(t=this.adAdapter)||t.setStreamTime(e),null==(n=this.squeezeBackAdapter)||n.setStreamTime(e),i.time=this.contentTimeForStreamTime(e),this.adInProgress?this.updateContentProgress(e):this.isContentComplete()||this.fatalContentErrorReceived||(!r||this.presoModel.adSegmentEntered||this.contentSegmentStarted||this.startContentSegment(),(r&&this.contentSegmentStarted||this.presoModel.adSegmentEntered)&&super.respondToVideoTimeUpdate(e),i.streamType!==tl.LIVE&&i.time>=i.duration&&!this.contentCompleteReleased&&this.signalContentComplete())}endContentSegment(){this.contentSegmentStarted&&(this.contentSegmentStarted=!1,(this.hasMidRolls||this.isLiveOrLts())&&this.notify(Bo.CONTENT_SEGMENT_END))}isLiveOrLts(){const e=this.contentPlaybackStateProxy.model.streamType;return e===tl.LIVE||e===tl.LTS}respondToVideoEnd(){var e,t,n;this.contentCompleteReleased||this.signalContentComplete(),null==(e=this.adAdapter)||e.contentComplete(),null==(t=this.squeezeBackAdapter)||t.contentComplete();const i=null==(n=this.breakSchedule)?void 0:n.find(e=>e.type===Rs.POST);i||super.respondToVideoEnd()}respondToDurationChange(e){var t,n;if(e&&!isNaN(e)&&e>0){null==(t=this.adAdapter)||t.setStreamDuration(e),null==(n=this.squeezeBackAdapter)||n.setStreamDuration(e),this.presoModel.streamDuration=e;const i=this.contentTimeForStreamTime(e);this.contentPlaybackStateProxy.model.duration=i,this.contentDurationReleased||this.releaseContentDuration(i)}}respondToError(e){this.fatalContentErrorReceived=e.fatal,super.respondToError(e)}isContentComplete(){return this.contentComplete}checkVideoBuffering(e){var t,n;super.checkVideoBuffering(e),null==(n=null==(t=this.adAdapter)?void 0:t.setBuffering)||n.call(t,this.contentIsBuffering)}startContentSegment(){var e,t;const n=this.contentPlaybackStateProxy.model;this.contentSegmentStarted=!0,n.started=!0,null==(e=this.domProxy)||e.showAdClickElement(!1),null==(t=this.domProxy)||t.showAdContainer(!1),this.contentStartReleased||this.signalContentStart(),(this.hasMidRolls||n.streamType===tl.LIVE||n.streamType===tl.LTS)&&this.notify(Bo.CONTENT_SEGMENT_START)}checkPreload(e,t){var n,i,r,a,o,s;if(!this.isPreloading&&!0===(null==(a=null==(r=null==(i=null==(n=this.resourceProxy)?void 0:n.resource)?void 0:i.ad)?void 0:r.csai)?void 0:a.preloadContentAtEndOfPreRoll)&&(null==(o=this.currentAd)?void 0:o.adPosition)===(null==(s=this.currentBreak)?void 0:s.adTotal)&&!this.system.isIos){const n=_a(Math.ceil(t/4),2,10);Math.round(e)>=n&&(this.isPreloading=!0,this.load().catch(this.onLoadError))}}signalPlaying(){return jn(this,null,function*(){if(clearTimeout(this.playingTimeout),this.adAdapter&&!this.adAdapterStarted?(this.adAdapterStarted=!0,yield this.adAdapter.start()):this.adAdapter||!this.squeezeBackAdapter||this.adAdapterStarted||(this.adAdapterStarted=!0,yield this.squeezeBackAdapter.start()),this.adInProgress)this.notify(Bo.AD_PLAYING);else{const e=this.contentPlaybackStateProxy.model.time;if(!this.isLiveOrLts()&&e<.5)return void(this.playingTimeout=setTimeout(()=>this.respondToVideoPlaying(),1e3*(.5-e)));this.notify(Bo.CONTENT_PLAYING)}})}signalContentStart(){this.contentStartReleased=!0,this.notify(Bo.CONTENT_START)}signalContentComplete(){this.contentComplete=!0,this.contentSegmentStarted&&this.endContentSegment(),this.contentCompleteReleased=!0,this.notify(Bo.CONTENT_COMPLETE)}contentTimeForStreamTime(e){var t,n,i;return null!=(i=null==(n=null==(t=this.adAdapter)?void 0:t.contentTimeForStreamTime)?void 0:n.call(t,e))?i:e}streamTimeForContentTime(e){var t,n,i;return null!=(i=null==(n=null==(t=this.adAdapter)?void 0:t.streamTimeForContentTime)?void 0:n.call(t,e))?i:e}getPermittedSeekTime(e){var t,n,i;const r=(null==(t=this.adAdapter)?void 0:t.getPermittedSeekTime)?this.adAdapter.getPermittedSeekTime(e):e,a="fw"===(null==(i=null==(n=this.adAdapter)?void 0:n.info)?void 0:i.id),o=this.facade.retrieveMediator(Ul.PLUGIN_MEDIATOR).getPlugin("adholiday"),s=a&&o;return this.streamTimeForContentTime(e)===r||s||(this.presoModel.isTrackingAd=!0),r}listNotificationInterests(){return super.listNotificationInterests().concat([Bo.FULLSCREEN_CHANGE,Bo.QUALITY_CHANGE])}
2onRegister(){if(super.onRegister(),this.domProxy){const e=this.facade.retrieveMediator(Ul.ACTIVITY).idleDelay;this.pointerLockDebouncer=fa(this.setPointerState,e),this.domProxy.showAdContainer(!1),this.domProxy.showAdClickElement(!1)}}}gu([Yl()],vu.prototype,"pauseContent"),gu([Yl()],vu.prototype,"resumeContent"),gu([Yl()],vu.prototype,"streamIdAvailable"),gu([Yl()],vu.prototype,"applyHook"),gu([Yl()],vu.prototype,"adSkippableStateChanged"),gu([Yl()],vu.prototype,"adSegmentStarted"),gu([Yl()],vu.prototype,"adSegmentReentered"),gu([Yl()],vu.prototype,"adSegmentEnded"),gu([Yl()],vu.prototype,"adBreaksAvailable"),gu([Yl()],vu.prototype,"seekToStreamTime"),gu([Yl()],vu.prototype,"adBreakStart"),gu([Yl()],vu.prototype,"adBreakMetadata"),gu([Yl()],vu.prototype,"adLoaded"),gu([Yl()],vu.prototype,"adStart"),gu([Yl()],vu.prototype,"squeezebackStart"),gu([Yl()],vu.prototype,"squeezebackEnd"),gu([Yl()],vu.prototype,"adProgress"),gu([Yl()],vu.prototype,"adFirstQuartile"),gu([Yl()],vu.prototype,"adMidpoint"),gu([Yl()],vu.prototype,"adThirdQuartile"),gu([Yl()],vu.prototype,"adComplete"),gu([Yl()],vu.prototype,"adBreakComplete"),gu([Yl()],vu.prototype,"adClicked"),gu([Yl()],vu.prototype,"adError"),gu([Yl()],vu.prototype,"adPaused"),gu([Yl()],vu.prototype,"adResumed"),gu([Yl()],vu.prototype,"adStalled"),gu([Yl()],vu.prototype,"adBreakDiscarded"),gu([Yl()],vu.prototype,"adSkipped"),gu([Yl()],vu.prototype,"onShowAdUi"),gu([Yl()],vu.prototype,"onHideAdUi"),gu([Yl()],vu.prototype,"allAdsComplete"),gu([Yl()],vu.prototype,"adBuffering"),gu([Yl()],vu.prototype,"displayAdClickElement"),gu([Yl()],vu.prototype,"setContentDuration");class yu extends fu{start(){this.isClickToPlay?this.setForClickToPlay():this.notify(jl.VIDEO_LOAD_START)}respondToVideoPlaying(){let e=!1;this.contentPlaybackStateProxy.model.started=!0,this.presoModel.started||(e=!0),super.respondToVideoPlaying(),e&&this.notify(Bo.CONTENT_START),this.notify(Bo.CONTENT_PLAYING)}respondToVideoTimeUpdate(e){if(this.contentComplete)return;const t=this.contentPlaybackStateProxy.model;this.presoModel.streamTime=e,t.time=e,this.presoModel.started&&super.respondToVideoTimeUpdate(e)}respondToVideoPaused(){super.respondToVideoPaused(),this.notify(Bo.CONTENT_PAUSED)}respondToIsPlayingLiveChange(e){super.respondToIsPlayingLiveChange(e)}respondToVideoEnd(){this.contentComplete=!0,this.notify(Bo.CONTENT_COMPLETE),super.respondToVideoEnd()}respondToDurationChange(e){this.presoModel.streamDuration=e,this.contentPlaybackStateProxy.model.duration=e,this.contentDurationReleased||this.releaseContentDuration(e)}onRegister(){super.onRegister(),this.domProxy&&this.domProxy.showAdContainer(!1),!this.isClickToPlay&&this.prepareForPlayback()}}class bu extends Jl{execute(e){var t,n;const i=this.facade;switch(e.name){case jl.RESOURCE_COMPLETE:if(!1===(null==(t=this.getModel(Bl.PlayerOptions).overrides)?void 0:t.closeOnEnded))return;const r=i.retrieveMediator(Ul.PRESENTATION_MEDIATOR);return void(null==r||r.close());case Bo.RESOURCE_END:i.retrieveMediator(Ul.TIMER_MEDIATOR).killTimer(),this.sendNotification(jl.KILL_RESOURCE_PRESENTATION,null,Vl.INTERNAL);break;case Bo.RESOURCE_BUFFERING:const a=i.retrieveProxy(bl.PlayerDomProxy),o=null==a?void 0:a.getMain();null==o||o.setAttribute("aria-busy",e.body.buffering.toString());break;case Bo.AD_BREAK_START:const s=i.retrieveMediator(Ul.PRESENTATION_MEDIATOR);null==(n=null==s?void 0:s.adapter)||n.clearText()}}}const Au={[jl.DEFAULT]:null,[jl.BOOT_APP]:class extends ec{initializeMacroCommand(){this.addSubCommand(Mc),this.addSubCommand(cc),this.addSubCommand(jc),this.addSubCommand(iu),this.addSubCommand(Bc)}},[Bo.READY]:class extends Jl{execute(){const e=this.facade.retrieveProxy(bl.PlayerDomProxy);if(e){const t=e.getMain();t.setAttribute("role","region");const n=t.getAttribute("tabindex")||"0";t.setAttribute("tabindex",n),this.facade.retrieveMediator(Ul.KEY_COMMAND).initialize()}}},[Bo.MUTE_CHANGE]:su,[Bo.VOLUME_CHANGE]:su,[Bo.RESOURCE_END]:bu,[Bo.RESOURCE_BUFFERING]:bu,[Bo.AD_BREAK_START]:bu,[Bo.METRIC]:class extends Jl{execute(e){var t,n;
2const i=e.body.metric,r=i.key,a=i.type,o=i.value;if(performance)switch(a){case Qs.MARK:try{null==(t=performance.mark)||t.call(performance,au(o,r),{startTime:o.startTime})}catch(e){this.logger.warn("".concat(ou,": ").concat(e))}break;case Qs.MEASURE:try{const e=au(o,r);null==(n=null==performance?void 0:performance.measure)||n.call(performance,e,e+":start",e+":end")}catch(e){this.logger.warn("".concat(ou,": ").concat(e))}}}},[jl.RESOURCE_COMPLETE]:bu,[jl.PLAY_ON_USER_GESTURE]:su,[jl.PLAY]:su,[jl.PAUSE]:su,[jl.SEEK]:su,[jl.SWITCH_AUDIO_TRACK]:su,[jl.SWITCH_TEXT_TRACK]:su,[jl.SWITCH_TEXT_MODE]:su,[jl.SUSPEND_PLAYBACK]:class extends Jl{execute(e){const t=this.getModel(Bl.PresentationState);this.facade.retrieveMediator(Ul.PRESENTATION_MEDIATOR).suspend(),t.suspended=!0;const n=this.getProxy(bl.ContentPlaybackStateProxy);this.sendNotification(Bo.PLAYBACK_SUSPENDED,{contentTime:n.model.time})}},[jl.RESUME_PLAYBACK]:class extends Jl{execute(e){const t=this.getModel(Bl.PresentationState),n=this.facade.retrieveMediator(Ul.PRESENTATION_MEDIATOR);t.suspended=!1,n.resume();const i=this.getProxy(bl.ContentPlaybackStateProxy);this.sendNotification(Bo.PLAYBACK_RESUMED,{contentTime:i.model.time})}},[jl.SWITCH_BITRATE]:$l,[jl.SWITCH_QUALITY_CATEGORY]:$l,[jl.AUTO_QUALITY_SWITCHING]:$l,[jl.MIN_BITRATE]:$l,[jl.MAX_BITRATE]:$l,[jl.PREP_RESOURCE_COLLECTION]:class extends Jl{execute(e){e.body.resource?this.getProxy(bl.HookProxy).applyHook(Yn.ATTACH_RESOURCE,new Ml(e.body.resource)).then(e=>{try{Ml.validate(e)}catch(e){this.invalidResource(e.message)}e.sessionId||(e.sessionId=to()),e.cmcd.sessionId||(e.cmcd.sessionId=e.sessionId),e.contentId&&!e.cmcd.contentId&&(e.cmcd.contentId=e.contentId),this.facade.sendNotification(jl.PLAY_RESOURCE,e,Vl.INTERNAL)}).catch(e=>{this.facade.sendNotification(jl.RESOURCE_ERROR,e.cause||e,Vl.INTERNAL)}):this.invalidResource(zn.messages.RESOURCE_MISSING)}invalidResource(e){this.facade.sendNotification(jl.RESOURCE_ERROR,{message:"".concat(zn.messages.INVALID_RESOURCE,": ").concat(e),code:Ui.INVALID_RESOURCE_FORMAT,fatal:!0},Vl.INTERNAL)}},[jl.START_PRESENTATION]:class extends Jl{execute(e){const t=this.facade.retrieveMediator(Ul.PRESENTATION_MEDIATOR),n=this.facade.retrieveProxy(bl.ResourceProxy);this.sendNotification(Bo.RESOURCE_START,{resource:n.resource}),t.start()}},[jl.PLAY_RESOURCE]:class extends Jl{execute(e){var t,n,i;const r=this.system,a=e.body;if(nr.isBrowser&&!(null==(t=r.global)?void 0:t.document))return void this.sendNotification(jl.VIDEO_START_ERROR,{error:zn.messages.ENVIRONMENT_NOT_SUPPORTED,fatal:!0});const o=this.getModel(Bl.PresentationState),s=this.getModel(Bl.PlayerOptions),l=new lu(bl.ContentPlaybackStateProxy);this.facade.registerProxy(l),!1===(null==(i=null==(n=a.playback)?void 0:n.abr)?void 0:i.capQualityToScreenSize)&&(l.qualityCappedToScreenSize=!1),this.checkAutoplay(s).then(e=>{this.processAutoplaySupport(e,o,s),this.createPresentation(a,s)})}createPresentation(e,t){return jn(this,null,function*(){const n=yield this.getPresentationMediator(e,t);n&&(this.facade.registerMediator(n),this.sendNotification(jl.START_PRESENTATION))})}getPresentationMediator(e,t){return jn(this,null,function*(){var n,i;const r=yield this.getVideo(t,e);let a=null;if(!r)return this.sendNotification(jl.RESOURCE_ERROR,{code:Ui.UNEXPECTED_CONDITION,message:zn.messages.VIDEO_PLAYBACK_UNAVAILABLE,fatal:!0}),a;const o=Ul.PRESENTATION_MEDIATOR,s=(null==e?void 0:e.ad)&&(e.ad.csai||e.ad.ssai||(null==(n=e.ad.adapter)?void 0:n.id)),l=this.facade.retrieveProxy(bl.AdapterProxy),c=l.hasAdapterForRole(Wn.SQUEEZEBACK);if(s||c){let t;try{this.logger.time(qs.AD_ADAPTER_CREATION);const n=new vu(o,r);if(n.createDelegate(this.facade.appId),c){const t=yield l.createAdapter(Wn.SQUEEZEBACK,e,()=>n.getDelegate());n.squeezeBackAdapter=t}if(s){const r=yield l.createAdapter(Wn.AD,e,()=>n.getDelegate());n.adAdapter=r,this.logger.timeEnd(qs.AD_ADAPTER_CREATION),this.logger.time(qs.AD_RESOURCE_CREATION),t=yield null==(i=r.getResource)?void 0:i.call(r),this.logger.timeEnd(qs.AD_RESOURCE_CREATION)}t&&(e=t),a=n}catch(e){this.sendNotification(jl.AD_ERROR,{code:e.code||Ui.AD_ADAPTER_ERROR,message:e.message,cause:e,fatal:!0})}}else a=new yu(o,r);return this.createResourceProxy(e),a})}createResourceProxy(e){const t=new cu(bl.ResourceProxy,e);this.facade.registerProxy(t)}getVideo(e,t){return jn(this,null,function*(){const n=this.system;if(n.isWebMaf)return n.webMafPlayer;const i=this.facade.retrieveProxy(bl.VideoProxy);return i.getVideo()&&!0===e.reuseVideoElement||(yield i.initVideo(t)),i.getVideo()})}processAutoplaySupport(e,t,n){if(t.isAutoplay)return;const i=n.autoplay,r=e.supportsMutedAutoplay,a=e.supportsUnmutedAutoplay,o=i===Fs.ATTEMPT_MUTED||i===Fs.ATTEMPT_UNMUTED_THEN_MUTED,s=i===Fs.ATTEMPT_UNMUTED;(o&&!r||s&&!a)&&this.sendNotification(Bo.AUTOPLAY_BLOCKED,new Error("Autoplay capability conflict."),Vl.INTERNAL),t.isMuteAtPlayStart=i===Fs.ATTEMPT_MUTED&&r||i===Fs.ATTEMPT_UNMUTED_THEN_MUTED&&!a&&r,t.isAutoplay=this.shouldAutoplay(i,e)}shouldAutoplay(e,t){if(mi(e)||e===Fs.NONE)return!1;const n=t.supportsMutedAutoplay,i=t.supportsUnmutedAutoplay,r=e===Fs.ATTEMPT_MUTED&&n,a=e===Fs.ATTEMPT_UNMUTED&&i,o=!a&&e===Fs.ATTEMPT_UNMUTED_THEN_MUTED&&n;return r||a||o}checkAutoplay(e){var t;
2return this.getService(yl.AutoplayCapabilities).detectCapabilities(null==(t=e.overrides)?void 0:t.blankVideoUrl)}},[jl.KILL_RESOURCE_PRESENTATION]:class extends Jl{execute(e){this.facade.removeMediator(Ul.PRESENTATION_MEDIATOR),this.facade.removeProxy(bl.ResourceProxy),this.facade.removeProxy(bl.ContentPlaybackStateProxy),this.facade.retrieveProxy(bl.ModelCollectionProxy).reset()}},[jl.CHANGE_LANGUAGE]:class extends Jl{execute(e){const t=e.name,n=e.body;if(t===jl.CHANGE_LANGUAGE){const e=this.facade.retrieveProxy(bl.LocalizationProxy),t=n.language;e.changeLanguage(t).then(n=>{const i=this.facade.retrieveProxy(bl.PlayerDomProxy);if(i){const t=i.getMain();t.setAttribute("aria-label",e.localize(Ws.MEDIA_PLAYER)),t.setAttribute("lang",e.language)}this.sendNotification(Bo.LANGUAGE_CHANGE,{language:t}),this.sendNotification(jl.LOCALIZATION_CHANGE,{localeData:n})})}}},[jl.PLAYER_ERROR]:ru,[jl.VIDEO_START_ERROR]:ru,[jl.VIDEO_PLAYBACK_ERROR]:ru,[jl.RESOURCE_ERROR]:ru,[jl.AD_ERROR]:ru,[jl.AD_STALLED]:ru};var Eu=Object.defineProperty,Tu=Object.getOwnPropertyDescriptor,wu=(e,t,n,i)=>{for(var r,a=Tu(t,n),o=e.length-1;o>=0;o--)(r=e[o])&&(a=r(t,n,a)||a);return a&&Eu(t,n,a),a};class Su extends Gl{constructor(e){super(Object.assign({commandMap:Au,id:e.playerOptions.id||null},e)),this.pIsReady=!1,this.seekTime=NaN,this.hSeekRedirect=e=>{e.type!==Bo.SEEK_REDIRECT_START||isNaN(e.detail.actualSeekTime)?e.type===Bo.SEEK_REDIRECT_COMPLETE&&(this.seekTime=NaN):this.seekTime=e.detail.actualSeekTime},this.delegate=Xl(this.appId,this),this.target=this.delegate.api,this.logger=e.logger,this.init(e)}initialize(){const e=this.modelCollectionProxy.getModel(Bl.PlayerOptions),t=e.plugins||[],n=this.getApi(),i={name:jl.CHANGE_LANGUAGE,body:{language:e.localizationLanguage},type:Vl.INTERNAL};return this.on(Bo.SEEK_REDIRECT_START,this.hSeekRedirect),this.on(Bo.SEEK_REDIRECT_COMPLETE,this.hSeekRedirect),n.registerPlugins(t).then(()=>(this.localization.registerLocalizationData(e.localization),this.sendAsyncNotification(i,[Bo.LANGUAGE_CHANGE]))).then(()=>(this.pIsReady=!0,this.sendNotification(Bo.READY,n),n)).catch(e=>{throw this.logger.error(e),e})}destroy(){this.off(Bo.SEEK_REDIRECT_START,this.hSeekRedirect),this.off(Bo.SEEK_REDIRECT_COMPLETE,this.hSeekRedirect),this.disableKeyCommands();const e=super.destroy.bind(this),t=this.logger;return this.killCurrentResource().then(()=>this.plugins.destroy()).then(()=>{e(),this.delegate.destroy(),this.delegate=null}).catch(e=>{throw t.error(e),e}).then(()=>{t.destroy()})}getApi(){return this.delegate.api}killCurrentResource(){return this.appMediator.killCurrentResource()}hasListenerFor(e){if(!gi(e))throw this.invalidArgException("hasListenerFor(type)",e);return super.hasListenerFor(e)}on(e,t){if(!gi(e)||"function"!=typeof t)throw this.invalidArgException("on(type, func)",e,t);Vo.checkEventName(e),super.on(e,t)}once(e,t){if(!gi(e)||"function"!=typeof t)throw this.invalidArgException("on(type, func)",e,t);super.once(e,t)}off(e,t){if(!gi(e))throw this.invalidArgException("on(type, func)",e,t);super.off(e,t)}get isReady(){return this.pIsReady}get id(){return this.appId}get dimensions(){return this.appMediator.getDimensions()||null}get video(){return this.videoProxy.getVideo()}get isAutoplay(){return this.presentationState.isAutoplay}get isFullscreen(){return this.presentationState.isFullscreen}get isAd(){const e=this.presentationState,t=e.isTrackingAd,n=e.adSegmentEntered;return t||n}get muted(){return this.appMediator.getMuteState()}set muted(e){if("boolean"!=typeof e)throw this.invalidArgException("player.muted = boolean",e);this.muted!==e&&this.transmitExtRequest(Bo.MUTE_CHANGE,{muted:e})}get options(){var e;const t=null==(e=this.modelCollectionProxy.getModel(Bl.PlayerOptions))?void 0:e.model;return t?li(t):null}get volume(){return this.appMediator.getVolume()}set volume(e){if(!pi(e)||!Ia(e,0,1))throw this.invalidArgException("player.volume = number [0,1]",e);this.volume!==e&&this.transmitExtRequest(Bo.VOLUME_CHANGE,{volume:e})}get language(){return this.localization.language}get contentTime(){return this.contentPlaybackStateProxy?this.contentPlaybackStateProxy.model.time:0}get sessionTime(){const e=this.appMediator.getSessionTime();return null==e?0:e}get playbackTime(){const e=this.appMediator.getPlaybackTime();return null==e?0:e}get contentDuration(){return this.contentPlaybackStateProxy?this.contentPlaybackStateProxy.model.duration:NaN}get streamTime(){return this.presentationState.streamTime}get streamDuration(){return this.presentationState.streamDuration}get adTime(){return this.presentationState.adTime}get adDuration(){return this.presentationState.adDuration}get breakTime(){return this.presentationState.breakTime}get breakDuration(){return this.presentationState.breakDuration}get playbackState(){var e;return(null==(e=this.contentPlaybackStateProxy)?void 0:e.model.state)||Zs.IDLE}get autoQualitySwitching(){var e;return(null==(e=this.contentPlaybackStateProxy)?void 0:e.qualitySwitchingMode)===el.AUTO||!1}set autoQualitySwitching(e){if(!yi(e))throw this.invalidArgException("player.autoQualitySwitching = boolean",e);this.contentPlaybackStateReady?this.transmitExtRequest(jl.AUTO_QUALITY_SWITCHING,{value:e}):this.logger.debug(zn.messages.CONTENT_PLAYBACK_SETTING_IGNORED)}get quality(){var e;return(null==(e=this.contentPlaybackStateProxy)?void 0:e.quality)||null}get qualities(){var e;return(null==(e=this.contentPlaybackStateProxy)?void 0:e.qualities)||[]}
2get qualityMode(){var e;return(null==(e=this.contentPlaybackStateProxy)?void 0:e.qualitySwitchingMode)||el.AUTO}get qualityCappedToScreenSize(){var e;return!0===(null==(e=this.contentPlaybackStateProxy)?void 0:e.qualityCappedToScreenSize)}set qualityCappedToScreenSize(e){var t;if(!yi(e))throw this.invalidArgException("player.qualityCappedToScreenSize = boolean",e);this.contentPlaybackStateProxy?(this.contentPlaybackStateProxy.qualityCappedToScreenSize=e,null==(t=this.getAdapter(Wn.PLAYBACK))||t.setQualityCappedToScreenSize(e)):this.logger.debug(zn.messages.CONTENT_PLAYBACK_SETTING_IGNORED)}get bitrate(){const e=this.quality||{bitrate:NaN};return null!=e.bitrate?e.bitrate:NaN}set bitrate(e){if(!pi(e))throw this.invalidArgException("player.bitrate = number",e);this.contentPlaybackStateReady?this.transmitExtRequest(jl.SWITCH_BITRATE,{value:e}):this.logger.debug(zn.messages.CONTENT_PLAYBACK_SETTING_IGNORED)}get qualityCategory(){return this.contentPlaybackStateProxy?this.contentPlaybackStateProxy.userQualityCategory:null}set qualityCategory(e){if(!gi(e))throw this.invalidArgException("player.qualityCategory = string",e);this.contentPlaybackStateReady?this.transmitExtRequest(jl.SWITCH_QUALITY_CATEGORY,{value:e}):this.logger.debug(zn.messages.CONTENT_PLAYBACK_SETTING_IGNORED)}get minBitrate(){return this.contentPlaybackStateProxy?this.contentPlaybackStateProxy.minBitrate:NaN}set minBitrate(e){if(!pi(e))throw this.invalidArgException("player.minBitrate = number",e);this.contentPlaybackStateReady?this.transmitExtRequest(jl.MIN_BITRATE,{value:e}):this.logger.debug(zn.messages.CONTENT_PLAYBACK_SETTING_IGNORED)}get maxBitrate(){return this.contentPlaybackStateProxy?this.contentPlaybackStateProxy.maxBitrate:NaN}set maxBitrate(e){if(!pi(e))throw this.invalidArgException("player.maxBitrate = number",e);this.contentPlaybackStateReady?this.transmitExtRequest(jl.MAX_BITRATE,{value:e}):this.logger.debug(zn.messages.CONTENT_PLAYBACK_SETTING_IGNORED)}get audioTracks(){var e;return(null==(e=this.contentPlaybackStateProxy)?void 0:e.audioTracks)||[]}get audioTrack(){return this.contentPlaybackStateProxy?this.contentPlaybackStateProxy.audioTrack:null}set audioTrack(e){if(!e)throw this.invalidArgException("player.audioTrack = AudioTrackInterface",e);this.contentPlaybackStateReady?this.transmitExtRequest(jl.SWITCH_AUDIO_TRACK,{value:e}):this.logger.debug(zn.messages.CONTENT_PLAYBACK_SETTING_IGNORED)}attachResource(e){return this.logger.time(qs.RESOURCE_ATTACHMENT),this.stop().then(()=>{if(!e||mi(e))throw this.invalidArgException("attachResource(resource)",e)}).then(()=>this.sendAsyncNotification({name:jl.PREP_RESOURCE_COLLECTION,body:{resource:e,start:!0}},[Bo.RESOURCE_START])).then(()=>(this.logger.timeEnd(qs.RESOURCE_ATTACHMENT),this.resource)).catch(e=>{throw ka.eventToError(e,Sa.RESOURCE)})}get resource(){return this.appMediator.getCurrentResource()}get textTrackEnabled(){return this.facade.retrieveProxy(bl.TextTrackProxy).enabled}set textTrackEnabled(e){if(!yi(e))throw this.invalidArgException("player.textTrackEnabled = boolean",e);this.transmitExtRequest(jl.SWITCH_TEXT_MODE,{value:e})}get textTrack(){var e;return(null==(e=this.contentPlaybackStateProxy)?void 0:e.textTrack)||null}set textTrack(e){if(!e||!e.kind)throw this.invalidArgException("player.textTrack = TextTrackInterface",e);this.contentPlaybackStateReady?this.transmitExtRequest(jl.SWITCH_TEXT_TRACK,{value:e}):this.logger.debug(zn.messages.CONTENT_PLAYBACK_SETTING_IGNORED)}get textTracks(){var e;return(null==(e=this.contentPlaybackStateProxy)?void 0:e.textTracks)||[]}get streamType(){return this.contentPlaybackStateProxy?this.contentPlaybackStateProxy.model.streamType:null}get isPlayingLive(){const e=this.contentPlaybackStateProxy?this.contentPlaybackStateProxy.model.liveStreamInfo:null;return!0===(null==e?void 0:e.isPlayingLive)}get liveStreamUtcStart(){const e=this.contentPlaybackStateProxy?this.contentPlaybackStateProxy.model.liveStreamInfo:null;return e?e.absoluteStart:NaN}get liveStreamUtcTime(){const e=this.contentPlaybackStateProxy?this.contentPlaybackStateProxy.model.liveStreamInfo:null;return e?e.absoluteTime:NaN}get liveStreamUtcDuration(){const e=this.contentPlaybackStateProxy?this.contentPlaybackStateProxy.model.liveStreamInfo:null;return e?e.absoluteDuration:NaN}get isSuspended(){return this.appMediator.isPlaybackSuspended()}get fullscreenElement(){return this.appMediator.getFullscreenElement()}set fullscreenElement(e){var t,n;if(!e||!/element/.test(null==(n=null==(t=e.constructor)?void 0:t.name)?void 0:n.toLowerCase()))throw this.invalidArgException("player.fullscreenElement = HTMLElement",e);this.appMediator.setFullscreenElement(e)}get pausable(){var e;return!1!==(null==(e=this.opts.playerOptions.overrides)?void 0:e.liveStreamPausable)||this.streamType!==tl.LIVE}updateDimensions(){this.appMediator.updateDimensions()}enterFullscreen(){this.transmitExtRequest(jl.ENTER_FULLSCREEN_REQUEST)}exitFullscreen(){this.transmitExtRequest(jl.EXIT_FULLSCREEN_REQUEST)}play(){this.recordMetric(Qs.API,Ls.PLAY),this.appMediator.isPlaybackSuspended()&&this.transmitExtRequest(jl.RESUME_PLAYBACK);const e={name:jl.PLAY,type:Vl.EXTERNAL};return this.sendAsyncNotification(e,[Bo.CONTENT_PLAYING,Bo.AD_PLAYING])}pause(){if(this.recordMetric(Qs.API,Ls.PAUSE),this.pausable){if(this.playbackState===Zs.PAUSED)return Promise.resolve();const e={name:jl.PAUSE,type:Vl.EXTERNAL};return this.sendAsyncNotification(e,[Bo.CONTENT_PAUSED,Bo.AD_PAUSED])}return this.logger.debug(zn.messages.PAUSING_LINEAR_LIVE_STREAM_NOT_ALLOWED),this.stop()}togglePlayPause(){return this.playbackState===Zs.PLAYING?this.pause():this.play()}toggleMuted(){return this.muted=!this.muted}toggleFullscreen(){this.isFullscreen?this.exitFullscreen():this.enterFullscreen()}toggleTextTrack(){return this.textTrackEnabled=!this.textTrackEnabled}seek(e){return this.recordMetric(Qs.API,Ls.SEEK,e),this.hooks.applyHook(Yn.SEEK,{position:e,contentTime:this.contentTime,contentDuration:this.contentDuration,streamTime:this.streamTime,streamDuration:this.streamDuration}).then(e=>{if(null==e)return;const t=this.appMediator.validateSeek(e.position,this.contentDuration);return null==t?Promise.reject(this.invalidArgException("seek(position)",e)):this.seekInternal(t)})}jump(e){const t=this.seekPending&&!isNaN(this.seekTime)?this.seekTime:this.contentTime;return this.seek(t+e)}getAdBreakTimes(){return this.appMediator.getAdBreakTimes()||[]}grabFrame(){return this.appMediator.grabFrame()}getThumbnails(e){var t;if(!pi(e))throw this.invalidArgException("getThumbnails(time)",e);return Promise.resolve(null==(t=this.getAdapter(Wn.PLAYBACK))?void 0:t.getThumbnails(e)).then(e=>e||[]).then(t=>{var n;const i=null==(n=this.contentPlaybackStateProxy)?void 0:n.getThumbnail(e);
2return i&&t.push(i.data),t})}getThroughput(){var e;return(null==(e=this.getAdapter(Wn.PLAYBACK))?void 0:e.getThroughput())||NaN}getContainerRect(){return this.appMediator.getContainerRect()}registerPlugins(e,t){return Array.isArray(e)?(t&&Vo.registerPlugins(),new Promise((n,i)=>{this.transmitExtRequest(jl.LOAD_PLUGINS,{plugins:e,callback:e=>("function"==typeof t&&t(e),e?i(e):n())})})):Promise.reject(this.invalidArgException("registerPlugins(cfgArray, callback?)",e,t))}removePlugin(e){if(!gi(e))throw this.invalidArgException("removePlugin(name)",e);this.transmitExtRequest(jl.REMOVE_PLUGIN,{name:e})}registerAdapter(e){if(mi(e))throw this.invalidArgException("registerAdapter(adapterConfig)",e);return this.adapters.registerAdapter(e)}retrieveAdapter(e){if(!gi(e))throw this.invalidArgException("retrieveAdapter(id)",e);return this.adapters.retrieveAdapter(e)}removeAdapter(e){return gi(e)||this.invalidArgException("removeAdapter(id)",e),this.adapters.removeAdapter(e)}registerHook(e,t){if(!gi(e)||"function"!=typeof t)throw this.invalidArgException("registerHook(type, hook)",e,t);return this.hooks.registerHook(e,t)}removeHook(e,t){if(!gi(e)||"function"!=typeof t)throw this.invalidArgException("removeHook(type, hook)",e,t);return this.hooks.removeHook(e,t)}getPlugin(e){if(!gi(e))throw this.invalidArgException("getPlugin(name)",e);return this.appMediator.getPlugin(e)}getAdapter(e){const t=this.presentationMediator;if(!gi(e))throw this.invalidArgException("getAdapter(role)",e);if(!t)return null;switch(e){case Wn.AD:return t.adAdapter||null;case Wn.PLAYBACK:return t.adapter||null;case Wn.VIDEO:return this.videoProxy.getAdapter()||null;default:return null}}stop(){var e;return(null==(e=this.contentPlaybackStateProxy)?void 0:e.model)&&this.presentationMediator?this.appMediator.killCurrentResource():Promise.resolve()}goLive(){return this.recordMetric(Qs.API,Ls.GO_LIVE),this.streamType&&this.streamType!==tl.VOD?this.seekInternal(this.contentDuration):Promise.reject("goLive() can not be invoked on streams of type ".concat(this.streamType))}skipAd(){this.appMediator.skipAd()}focus(e){var t;const n=null==(t=this.dom)?void 0:t.getMain();n&&n.focus(e)}blur(){const e=this.dom.getMain();e&&e.blur()}getKeyEventTarget(){return this.appMediator.getKeyEventTarget()}disableKeyCommands(e){this.appMediator.disableKeyCommands(e)}enterActionKeyContext(e){this.appMediator.enterActionKeyContext(e)}getActionKeyContext(){return this.appMediator.getActionKeyContext()}exitActionKeyContext(e){this.appMediator.exitActionKeyContext(e)}getConfigAsJson(e){return this.appMediator.getConfigAsJson(e)}suspendPlayback(){this.appMediator.isPlaybackSuspended()||this.pause().then(()=>{this.transmitExtRequest(jl.SUSPEND_PLAYBACK)})}resumePlayback(){this.play()}recordMetric(e,t,n){if(!gi(e)||!gi(t))throw this.invalidArgException("recordMetric(type, key, value?)",e,t,n);this.sendNotification(Bo.METRIC,{metric:new $o(t,n,e)})}offsetTimedText(e){if(!pi(e))throw this.invalidArgException("offsetTimedText(pixelOffset)",e);this.appMediator.offsetTimedText(e)}primeVideoElement(){return this.appMediator.primeVideoElement()}selectAudioLanguage(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!gi(e))throw this.invalidArgException("player.selectAudioLanguage(language)",e);if(this.modelCollectionProxy.getModel(Bl.PlayerOptions).audioLanguage=e,!this.contentPlaybackStateReady)return Promise.resolve(null);gi(t)&&(Vo.selectAudioLanguage(),t={type:t});const n=t,i=n.type,r=n.spatialAudio,a=(this.resource.playback||{}).preferSpatialAudio,o=null!=r?r:a;let s=ma(this.audioTracks,e).filter(e=>void 0===i||e.type===i);s.length>1&&void 0!==o&&(s=s.filter(e=>e.spatialAudio===o));const l=s[0]||ga(this.audioTracks,e);if(!l||l===this.audioTrack)return Promise.resolve(l);const c={name:jl.SWITCH_AUDIO_TRACK,body:{value:l},type:Vl.EXTERNAL};return this.sendAsyncNotification(c,[Bo.AUDIO_TRACK_CHANGE]).then(e=>l)}selectTextLanguage(e,t){if(!gi(e))throw this.invalidArgException("player.selectTextLanguage(language)",e);if(this.modelCollectionProxy.getModel(Bl.PlayerOptions).textLanguage=e,this.facade.retrieveProxy(bl.TextTrackProxy).language=e,!this.contentPlaybackStateReady)return Promise.resolve(null);const n=ga(this.textTracks,e);if(!n||n===this.textTrack)return Promise.resolve(n);const i={name:jl.SWITCH_TEXT_TRACK,body:{value:n},type:Vl.EXTERNAL};return this.sendAsyncNotification(i,[Bo.TEXT_TRACK_CHANGE]).then(e=>n)}selectLocalizationLanguage(e){if(!gi(e))throw this.invalidArgException("player.selectLocalizationLanguage(language)",e);this.modelCollectionProxy.getModel(Bl.PlayerOptions).language=e;const t={name:jl.CHANGE_LANGUAGE,body:{language:e},type:Vl.EXTERNAL};return this.sendAsyncNotification(t,[Bo.LANGUAGE_CHANGE]).then(e=>e.localeData)}waitForEvent(e,t,n){return xa(this,e,t,n)}waitForTime(e,t){return ts(this,e,t)}getBuffered(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.appMediator.getBuffered(e)||[]}localize(e,t,n){return this.localization.localize(e,t,n)}registerLocalizationData(e){return this.localization.registerLocalizationData(e)}sendEvent(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};
2t instanceof ki?this.dispatchEvt(t):this.emit(e,t)}get contentPlaybackStateProxy(){return this.facade.retrieveProxy(bl.ContentPlaybackStateProxy)}get contentPlaybackStateReady(){var e;return(null==(e=this.contentPlaybackStateProxy)?void 0:e.isReady)||!1}get localization(){return this.facade.retrieveProxy(bl.LocalizationProxy)}get dom(){return this.facade.retrieveProxy(bl.PlayerDomProxy)}get videoProxy(){return this.facade.retrieveProxy(bl.VideoProxy)}get adapters(){return this.facade.retrieveProxy(bl.AdapterProxy)}get plugins(){return this.facade.retrieveMediator(Ul.PLUGIN_MEDIATOR)}get presentationState(){return this.modelCollectionProxy.getModel(Bl.PresentationState)}get presentationMediator(){return this.facade.retrieveMediator(Ul.PRESENTATION_MEDIATOR)}get hooks(){return this.facade.retrieveProxy(bl.HookProxy)}transmitExtRequest(e,t){this.sendNotification(e,t,Vl.EXTERNAL)}init(e){const t=new Kl(this.getApi());this.facade.registerProxy(t);const n=this.opts.globalServices;this.logger.info("".concat(Uo.playerName,"@").concat(Uo.playerVersion," ").concat(Uo.buildTime)),this.registerGlobalServices(n),delete this.opts.globalServices,this.sendNotification(jl.BOOT_APP,Bn(Un({},this.opts),{app:this}),Vl.INTERNAL),this.logger.on(zo.TIME_EVENT,e=>{const t=e.detail,n=t.id,i=t.label,r=t.item,a="".concat(i,":start");this.recordMetric(Qs.MARK,a,{id:n,name:a,startTime:r.startTime})}),this.logger.on(zo.TIME_END_EVENT,e=>{const t=e.detail,n=t.id,i=t.label,r=t.item,a=r.startTime,o=r.duration,s="".concat(i,":end");this.recordMetric(Qs.MARK,s,{id:n,name:s,startTime:a+o}),this.recordMetric(Qs.MEASURE,i,{id:n,name:i,startTime:a,duration:o})})}sendAsyncNotification(e,t){const n=is([{target:this,events:t}],[{target:this,events:[Bo.ERROR]}]);return this.sendNotification(e.name,e.body,e.type),n}invalidArgException(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];const r=null==n?void 0:n.map(e=>void 0===e?"undefined":e),a=(null==r?void 0:r.toString())||null,o="".concat(e,"; ").concat(zn.messages.API_INVALID_ARG,"; supplied arg(s): ").concat(a);return this.logger.debug(o),new rl(o)}seekInternal(e){if(this.seekTime=e,this.seekPending)return this.seekPending.then(()=>this.seekTime===e?this.seekInternal(this.seekTime):void 0);const t={name:jl.SEEK,body:{value:e},type:Vl.EXTERNAL};return this.seekPending=this.sendAsyncNotification(t,[Bo.SEEK_COMPLETE]),this.seekPending.then(()=>{Math.abs(e-this.seekTime)<=1&&(this.seekTime=NaN),this.seekPending=null}).catch(t=>{throw this.seekPending=null,new ka(Ui.UNEXPECTED_CONDITION,(null==t?void 0:t.message)||"An error occurred on seek to ".concat(e),t||null,!1,Sa.API)}).then(()=>{this.seekPending=null})}}wu([Yl()],Su.prototype,"hasListenerFor"),wu([Yl()],Su.prototype,"on"),wu([Yl()],Su.prototype,"once"),wu([Yl()],Su.prototype,"off"),wu([Ql()],Su.prototype,"isReady"),wu([Ql()],Su.prototype,"id"),wu([Ql()],Su.prototype,"dimensions"),wu([Ql()],Su.prototype,"video"),wu([Ql()],Su.prototype,"isAutoplay"),wu([Ql()],Su.prototype,"isFullscreen"),wu([Ql()],Su.prototype,"isAd"),wu([Ql()],Su.prototype,"muted"),wu([Ql()],Su.prototype,"options"),wu([Ql()],Su.prototype,"volume"),wu([Ql()],Su.prototype,"language"),wu([Ql()],Su.prototype,"contentTime"),wu([Ql()],Su.prototype,"sessionTime"),wu([Ql()],Su.prototype,"playbackTime"),wu([Ql()],Su.prototype,"contentDuration"),wu([Ql()],Su.prototype,"streamTime"),wu([Ql()],Su.prototype,"streamDuration"),wu([Ql()],Su.prototype,"adTime"),wu([Ql()],Su.prototype,"adDuration"),wu([Ql()],Su.prototype,"breakTime"),wu([Ql()],Su.prototype,"breakDuration"),wu([Ql()],Su.prototype,"playbackState"),wu([Ql()],Su.prototype,"autoQualitySwitching"),wu([Ql()],Su.prototype,"quality"),wu([Ql()],Su.prototype,"qualities"),wu([Ql()],Su.prototype,"qualityMode"),wu([Ql()],Su.prototype,"qualityCappedToScreenSize"),wu([Ql()],Su.prototype,"bitrate"),wu([Ql()],Su.prototype,"qualityCategory"),wu([Ql()],Su.prototype,"minBitrate"),wu([Ql()],Su.prototype,"maxBitrate"),wu([Ql()],Su.prototype,"audioTracks"),wu([Ql()],Su.prototype,"audioTrack"),wu([Yl()],Su.prototype,"attachResource"),wu([Ql()],Su.prototype,"resource"),wu([Ql()],Su.prototype,"textTrackEnabled"),wu([Ql()],Su.prototype,"textTrack"),wu([Ql()],Su.prototype,"textTracks"),wu([Ql()],Su.prototype,"streamType"),wu([Ql()],Su.prototype,"isPlayingLive"),wu([Ql()],Su.prototype,"liveStreamUtcStart"),wu([Ql()],Su.prototype,"liveStreamUtcTime"),wu([Ql()],Su.prototype,"liveStreamUtcDuration"),wu([Ql()],Su.prototype,"isSuspended"),wu([Ql()],Su.prototype,"fullscreenElement"),wu([Ql()],Su.prototype,"pausable"),wu([Yl()],Su.prototype,"updateDimensions"),wu([Yl()],Su.prototype,"enterFullscreen"),wu([Yl()],Su.prototype,"exitFullscreen"),wu([Yl()],Su.prototype,"play"),wu([Yl()],Su.prototype,"pause"),wu([Yl()],Su.prototype,"togglePlayPause"),wu([Yl()],Su.prototype,"toggleMuted"),wu([Yl()],Su.prototype,"toggleFullscreen"),wu([Yl()],Su.prototype,"toggleTextTrack"),wu([Yl()],Su.prototype,"seek"),wu([Yl()],Su.prototype,"jump"),wu([Yl()],Su.prototype,"getAdBreakTimes"),wu([Yl()],Su.prototype,"grabFrame"),wu([Yl()],Su.prototype,"getThumbnails"),wu([Yl()],Su.prototype,"getThroughput"),wu([Yl()],Su.prototype,"getContainerRect"),wu([Yl()],Su.prototype,"registerPlugins"),wu([Yl()],Su.prototype,"removePlugin"),wu([Yl()],Su.prototype,"registerAdapter"),wu([Yl()],Su.prototype,"retrieveAdapter"),wu([Yl()],Su.prototype,"removeAdapter"),wu([Yl()],Su.prototype,"registerHook"),wu([Yl()],Su.prototype,"removeHook"),wu([Yl()],Su.prototype,"getPlugin"),wu([Yl()],Su.prototype,"getAdapter"),wu([Yl()],Su.prototype,"stop"),wu([Yl()],Su.prototype,"goLive"),wu([Yl()],Su.prototype,"skipAd"),wu([Yl()],Su.prototype,"focus"),wu([Yl()],Su.prototype,"blur"),wu([Yl()],Su.prototype,"getKeyEventTarget"),wu([Yl()],Su.prototype,"disableKeyCommands"),wu([Yl()],Su.prototype,"enterA
2ctionKeyContext"),wu([Yl()],Su.prototype,"getActionKeyContext"),wu([Yl()],Su.prototype,"exitActionKeyContext"),wu([Yl()],Su.prototype,"getConfigAsJson"),wu([Yl()],Su.prototype,"suspendPlayback"),wu([Yl()],Su.prototype,"resumePlayback"),wu([Yl()],Su.prototype,"recordMetric"),wu([Yl()],Su.prototype,"offsetTimedText"),wu([Yl()],Su.prototype,"primeVideoElement"),wu([Yl()],Su.prototype,"selectAudioLanguage"),wu([Yl()],Su.prototype,"selectTextLanguage"),wu([Yl()],Su.prototype,"selectLocalizationLanguage"),wu([Yl()],Su.prototype,"waitForEvent"),wu([Yl()],Su.prototype,"waitForTime"),wu([Yl()],Su.prototype,"getBuffered"),wu([Yl()],Su.prototype,"localize"),wu([Yl()],Su.prototype,"registerLocalizationData"),wu([Yl()],Su.prototype,"sendEvent");let Cu,ku=!1,xu=null;const Nu={},_u={},Iu={};function Ou(){if(ku)return;ku=!0;const e={"Array.from":()=>Array.from,"Array.prototype.find":()=>Array.prototype.find,"Array.prototype.findIndex":()=>Array.prototype.findIndex,"Array.prototype.includes":()=>Array.prototype.includes,Map:()=>"undefined"!=typeof Map,"Object.assign":()=>Object.assign,"Object.entries":()=>Object.entries,"Object.values":()=>Object.values,Promise:()=>"undefined"!=typeof Promise,Set:()=>"undefined"!=typeof Set,"String.prototype.includes":()=>String.prototype.includes,"String.prototype.repeat":()=>String.prototype.repeat};Object.keys(e).forEach(t=>{let n=!1;try{n=!!e[t]()}catch(e){n=!1}finally{n||ss.warn("Polyfill warning: ".concat(t," is not defined"))}})}function Du(e){const t=performance.now(),n=new Ll(e),i=n.id,r=ss.create({logLevel:n.logLevel||ss.logLevel,id:i});return _u[i]=function(e){if(Cu)return Cu;Ou();const t=Pl.getInstance(),n=e.overrides,i=!1!==(null==n?void 0:n.deferAutoplayDetection);return Cu=Promise.all([!i&&t.detectCapabilities(null==n?void 0:n.blankVideoUrl)]).then(()=>{xu={[yl.AutoplayCapabilities]:t}})}(n).then(()=>jn(null,null,function*(){try{const e=yield bs(ds.CREATE_PLAYER,n),i=new Su({globalServices:xu,playerOptions:e,logger:r});return r.time(qs.PLAYER_CREATION,t),i.initialize().then(e=>({api:e,player:i}))}catch(e){throw e.key&&(e.message='A player with id "'.concat(e.key,'" a already exists')),e}})).then(e=>{let t=e.api,n=e.player;return Nu[i]=n,delete _u[i],r.timeEnd(qs.PLAYER_CREATION),t})}function Ru(e){return Iu[e]||Promise.resolve().then(()=>_u[e]?_u[e]:null).then(()=>jn(null,null,function*(){const t=Nu[e];if(!t)return Promise.resolve();const n=t.options.logLevel;return delete Nu[e],yield bs(ds.REMOVE_PLAYER,t),Iu[e]=t.destroy().then(()=>{delete Iu[e],n!==Ho.INFO&&n!==Ho.DEBUG||ss.info('[Avia] Player with id "'.concat(e,'" removed.'))})}))}const Pu=Object.freeze(Object.defineProperty({__proto__:null,AccessibilityAction:_s,ActionKey:Is,ActionKeyContext:Os,ActionKeyError:il,ActiveState:Ds,AdBreakType:Rs,AdTechnology:Ps,AdapterRole:Wn,ApiMetric:Ls,AudioRole:Ms,AudioTrackType:Gn,Autoplay:Fs,AviaHookType:ds,Browser:zi,CoreEvent:ki,DEFAULT_LANGUAGE:fl,DEFAULT_THROUGHPUT:M
2o,DOM_VIDEO:Fo,Device:Ki,DrmKeySystemAvailability:Us,DrmRobustness:Bs,DrmType:Li,Emitter:_i,ErrorCategory:Sa,ErrorCode:Ui,ErrorMessage:Vn,FileExtensionToMimeType:ba,GOOGLE_DAI_SCHEME_ID_URI:"urn:google:dai:2018",HTML5:Kn,HdcpStatus:js,Header:Vs,HookError:hs,Html5Adapter:Lo,ID3_SCHEME_ID_URI:"https://aomedia.org/emsg/ID3",InvalidArgumentError:rl,KeyCode:Ks,KeyboardEventType:Hs,KeyboardScope:zs,Localization:gl,LocalizationId:Ws,LocalizedLanguage:Gs,LogLevel:Ho,Logger:Jo,LoggerEvent:zo,Measurement:qs,MediaAction:Ys,Metric:$o,MetricType:Qs,MimeType:qn,Os:Wi,PerformanceMode:Xs,Platform:Gi,PlaybackAdapterBase:Po,PlaybackState:Zs,PlayerError:ka,PlayerEvent:Bo,PlayerHookType:Yn,PluginError:al,PluginPriority:Js,QualityCategory:Pa,QualityLabel:$s,QualityMode:el,QueryString:Ai,RequestCredentials:Ei,RequestMethod:Si,RequestObjectType:Qn,ResponseType:Ti,StreamType:tl,System:nr,TextTrackEvent:Xn,TextTrackKind:Na,TextTrackMode:yo,Timer:sl,UiMetric:nl,Util:Ns,VideoFormat:Ta,WILDCARD:"*",applyHook:bs,buildInfo:Uo,changeLanguage:function(e){return vl.changeLanguage(e)},checkPolyfills:Ou,cmcd:ha,configure:function(e){var t;ri(ls,e),e.system&&(t=e.system,ri(nr,er(Xi,Object.assign(tr,t)))),e.logLevel&&(ss.logLevel=e.logLevel)},createResourceConfig:function(e){return new Ml(e)},createThumbnailStyles:Cs,createVideoPlayer:Du,defineHook:function(e,t){vs.defineHook(e,t)},eventsToPromise:is,extensionContext:gs,getAutoplayCapabilities:function(e){return Pl.getInstance().detectCapabilities(e)},getConfiguration:cs,getDeviceCapabilities:function(){return jn(this,null,function*(){return yield bs(ds.DEVICE_CAPABILITIES,Un({drm:{keySystemStatus:[],hdcpStatus:[]}},nr.supportedMedia))})},getSystemInfo:function(){return nr},getThroughput:mo,getVideoPlayerIds:function(){return Object.keys(_u).concat(Object.keys(Nu)).reduce((e,t)=>(e.includes(t)||e.push(t),e),[])},hasHook:ys,id3:Io,localization:vl,localize:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.language;return vl.localize(e,t,n)},logger:ss,queue:ns,registerActionKeyContext:function(e,t){if(!e)throw new il("Invalid action key context ".concat(e));dl[e]||(dl[e]={}),Object.assign(dl[e],t)},registerHook:function(e,t){vs.registerHook(e,t)},registerLocalizationData:function(e){return vl.registerLocalizationData(e)},removeActionKeyContext:function(e){const t=dl[e];return delete dl[e],t},removeHook:function(e,t){vs.removeHook(e,t)},removeVideoPlayer:Ru,renderThumbnail:Ss,request:Ri,retrieveActionKeyContext:hl,retrieveVideoPlayer:function(e){const t=Nu[e];if(t)return Promise.resolve(t);const n=Iu[e];if(n)return n.then(()=>null);return _u[e]||Promise.resolve(null)},use:function(e){return jn(this,null,function*(){Array.isArray(e)||(e=[e]);for(const t of e)yield t(gs)})},waitFor:function(e){return new Promise(t=>setTimeout(t,e))},waitForEvent:xa,waitForTime:ts,waitUntil:es},Symbol.toStringTag,{value:"Module"}));nr.appNamespace=Pu;var Lu=Object.defineProperty,Mu=Object.getOwnPropertySymbols,Fu=Object.prototype.hasOwnProperty,Uu=Object.prototype.propertyIsEnumerable,Bu=(e,t,n)=>t in e?Lu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ju=(e,t,n)=>new Promise((i,r)=>{var a=e=>{try{s(n.next(e))}catch(e){r(e)}},o=e=>{try{s(n.throw(e))}catch(e){r(e)}},s=e=>e.done?i(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())});const Vu=/&(?:amp|lt|gt|quot|apos|nbsp|lrm|rlm|#[xX]?[0-9a-fA-F]+);/g;function Hu(e){return-1===e.indexOf("&")?e:e.replace(Vu,e=>{switch(e){case"&":return"&";case"<":return"<";case">":return">";case""":return'"';case"'":return"'";case" ":return"Â ";case"‎":return"â";case"‏":return"â";default:if("#"===e[1]){const t="x"===e[2]||"X"===e[2]?parseInt(e.slice(3),16):parseInt(e.slice(2),10);return String.fromCodePoint(t)}return e}})}function zu(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(!e)return n;if(e.nodeName===t&&n.push(e),e.childNodes)for(const i of e.childNodes)zu(i,t,n);return n}function Ku(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.pos||0;const i=e.length,r=!!t.keepComments,a=!!t.keepWhitespace,o="<".charCodeAt(0),s=">".charCodeAt(0),l="-".charCodeAt(0),c="/".charCodeAt(0),u="?".charCodeAt(0),d="!".charCodeAt(0),h="'".charCodeAt(0),f='"'.charCodeAt(0),p="[".charCodeAt(0),m="]".charCodeAt(0);function g(e){return{nodeName:arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#text",nodeValue:e,attributes:{},childNodes:[]}}function v(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const h=[];for(;e[n];)if(e.charCodeAt(n)==o){if(e.charCodeAt(n+1)===c){const i=n+2;if(n=e.indexOf(">",n),!e.startsWith(t,i)){const t=e.substring(0,n).split("\n");throw new Error("Unexpected close tag\nLine: "+(t.length-1)+"\nColumn: "+(t[t.length-1].length+1)+"\nChar: "+e[n])}return n+1&&(n+=1),h}if(e.charCodeAt(n+1)===u){n=e.indexOf(">",n),n++;continue}if(e.charCodeAt(n+1)===d){if(e.charCodeAt(n+2)==l){const t=n;for(;-1!==n&&(e.charCodeAt(n)!==s||e.charCodeAt(n-1)!=l||e.charCodeAt(n-2)!=l||-1==n);)n=e.indexOf(">",n+1);-1===n&&(n=i),r&&h.push(g(e.substring(t,n+1),"#comment"))}else{if(e.charCodeAt(n+2)===p&&e.charCodeAt(n+8)===p&&e.startsWith("
2CDATA",n+3)){const t=e.indexOf("]]>",n);-1==t?(h.push(g(e.substr(n+9),"#cdata")),n=i):(h.push(g(e.substring(n+9,t),"#cdata")),n=t+3);continue}{const t=n+1;n+=2;let i=!1;for(;(e.charCodeAt(n)!==s||!0===i)&&e[n];)e.charCodeAt(n)===p?i=!0:!0===i&&e.charCodeAt(n)===m&&(i=!1),n++;h.push(g(e.substring(t,n),"#doctype"))}}n++;continue}const a=A();h.push(a)}else{const e=y();if(a)e.length>0&&h.push(g(e));else{const t=e.trim();t.length>0&&h.push(g(t))}n++}return h}function y(){const t=n;return n=e.indexOf("<",n)-1,-2===n&&(n=i),Hu(e.slice(t,n+1))}function b(){const t=n;for(;-1==="\r\n\t>/= ".indexOf(e[n])&&e[n];)n++;return e.slice(t,n)}function A(){n++;const t=b();let i=t,r=null;const a=t.indexOf(":");-1!==a&&(r=t.slice(0,a),i=t.slice(a+1));const o=function(){const t={};for(;e.charCodeAt(n)!==s&&e[n];){const i=e.charCodeAt(n);if(i>64&&i<91||i>96&&i<123){const i=b();let r="",a=e.charCodeAt(n);for(;a!==h&&a!==f;)n++,a=e.charCodeAt(n);if(a===h||a===f){if(r=E(),-1===n)throw new Error("Missing closing quote")}else n--;t[i]=Hu(r)}n++}return t}();let l=[];const u=e.charCodeAt(n-1);return n++,u!==c&&(l=v(t)),{nodeName:t,nodeValue:null,attributes:o,childNodes:l,prefix:r,localName:i}}function E(){const t=e[n],i=n+1;return n=e.indexOf(t,i),e.slice(i,n)}return{nodeName:"#document",nodeValue:null,childNodes:v(""),attributes:{}}}function Wu(e,t){return e.find(e=>e.nodeName===t)}function Gu(e){const t=e.nodeName,n=e.attributes,i=e.childNodes;if("#document"===t)return'<?xml version="1.0" encoding="UTF-8"?>'.concat(Gu(i[0]));if("#text"===t)return e.nodeValue||"";let r="<".concat(t);if(n)for(const e in n)r+=" ".concat(e,"=").concat(JSON.stringify(n[e]));let a="";for(let e=0,t=i.length;e<t;e++)a+=Gu(i[e]);return r+=a?">".concat(a,"</").concat(t,">"):" />",r}function qu(e){const t=Ku(e),n=zu(t,"MPD")[0];return"static"!==(n?n.attributes.type:null)?e:([...zu(t,"Representation"),...zu(t,"AdaptationSet")].forEach(e=>{const t=e.attributes.codecs;(null==t?void 0:t.includes("hev"))&&(e.attributes.codecs=t.replace("hev","hvc"))}),Gu(t))}const Yu="shaka";function Qu(e){const t=e.avia,n=t.MimeType;return t.PlaybackAdapterBase.canPlay(e,[n.DASH])}function Xu(e,t){return ju(this,null,function*(){var n;const i=e.avia,r=e.resource,a=e.system,o=e.textTrackSettings,s=e.playerOptions,l=r.playback,c=l.startTime,u=i.AudioTrackType,d=i.DrmType,h=i.ErrorCode,f=i.LogLevel,p=i.MimeType,m=i.PlaybackAdapterBase,g=i.PlayerError,v=i.Util;if(!a.global.shaka)try{const e=t.debug?".debug":"";yield v.loadScript({url:(null==(n=t.dependencies)?void 0:n.shaka)||"//cdn.jsdelivr.net/npm/[email protected]/dist/shaka-player.compiled".concat(e,".js")},s,()=>a.global.shaka)}catch(e){throw new g(h.SHAKA_SDK_MISSING,"Could not load Shaka Player SDK",e)}const y=i.ErrorMessage,b=i.Header,A=i.PlayerHookType,E=i.PerformanceMode,T=i.RequestObjectType,w=i.TextTrackKind,S=a.global.shaka,C=e=>e.active,k=(e,t)=>JSON.stringify(e)===JSON.stringify(t),x=e=>"und"===(null==e?void 0:e.language);return new class extends m{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var n,i,a;super(e,t,!1),this.cachedCuepoints=null,this.cleanUpVtt=!1,this.isLiveStream=!1,this.renderTextTrackNatively=!0,this.domTextTrack=null,this.audioSwitching=!1,this.playerEventMap={error:e=>this.onError(e),streaming:()=>this.onStreaming(),variantchanged:()=>this.onVariantChanged(),adaptation:()=>this.onVariantChanged(),manifestupdated:e=>this.onManifestUpdated(e),emsg:e=>this.onEmsg(e),metadata:e=>this.onMetadata(e),trackschanged:v.debounce(()=>this.onTracksChanged(),25),drmsessionupdate:()=>this.onDrmSessionUpdate(),timelineregionenter:e=>this.onTimelineRegionEnter(e)},this.responseHook=e=>{if(e.metadata.objectType===T.MANIFEST&&!this.isLiveStream)try{e.value.data=qu(e.value.data)}catch(e){this.logger.warn("Unable to update HEVC codecs in manifest.")}},this.onRequest=(e,t)=>{var n,i;const r=this.context.resource.location.drm;e===S.net.NetworkingEngine.RequestType.LICENSE&&((null==(n=r.widevine)?void 0:n.header)&&Object.assign(t.headers,r.widevine.header),(null==(i=r.playready)?void 0:i.header)&&Object.assign(t.headers,r.playready.header))},this.onResponse=(e,t)=>{const n=t.headers[b.MULTI_CDN];null!=n&&this.delegate.cdnChange(n)},this.onManifest=(e,t)=>
2{const n=t.uri.includes(".m3u8");if(e===S.net.NetworkingEngine.RequestType.MANIFEST&&!n){const e=this.context.avia.Util.bufferToString(t.data);this.cachedCuepoints=function(e){let t;try{t=Ku(e)}catch(e){return null}const n=Wu(t.childNodes,"MPD");if("static"===n.attributes.type){const e=Wu(n.childNodes,"Period");if(e){const t=Wu(e.childNodes,"EventStream");return t?function(e){const t=parseInt(e.attributes.timescale),n=e.attributes.schemeIdUri;return t&&!isNaN(t)&&n?e.childNodes.filter(e=>{const n=parseInt(e.attributes.presentationTime)/t;return"Event"===e.nodeName&&n<1}).map(e=>function(e,t,n){const i=e.attributes,r=i.duration,a=i.messageData,o=i.presentationTime,s=a||"",l=(parseInt(o)||0)/t;return{id:n,info:s,text:s,data:s,source:{},startTime:l,endTime:l+parseFloat(r)}}(e,t,n)):(this.logger.info("shaka adapter encountered invalid EventStream node."),null)}(t):null}return null}return null}(e),this.player.getNetworkingEngine().unregisterResponseFilter(this.onManifest)}};let u=null!=(n=t.safeMargin)?n:2;(!Number.isFinite(u)||u<0)&&(u=2),this.safeMargin=u,!1===t.debounceTracksChanged&&(this.playerEventMap.trackschanged=()=>{clearTimeout(this.tracksChangedTimeout),this.tracksChangedTimeout=setTimeout(()=>this.onTracksChanged(),25)}),this.logger.info("Shaka Player version: ".concat(S.Player.version)),"undefined"==typeof VTTCue&&(this.cleanUpVtt=!0),S.polyfill.installAll();const h=null==(i=S.log)?void 0:i.Level;if(t.logLevel&&h){let e;switch(t.logLevel){case f.OFF:e=h.OFF;break;case f.ERROR:e=h.ERROR;break;case f.WARN:e=h.WARNING;break;case f.INFO:e=h.INFO;break;case f.DEBUG:e=h.DEBUG;break;case f.VERBOSE:e=h.V1}S.log.setLevel(e)}this.player=new S.Player,this.player.attach(this.video);const m=this.playerConfig=this.player.getConfiguration();this.addEvents(this.player,this.playerEventMap);let g=this.playerConfig.streaming.retryParameters;g.maxAttempts=4,g.baseDelay=1e3,g.backoffFactor=2,g.fuzzFactor=0,g=this.playerConfig.manifest.retryParameters,g.maxAttempts=2,g.baseDelay=1e3;const y=this.player.getNetworkingEngine();y.registerRequestFilter(this.onRequest),y.registerResponseFilter(this.onResponse),t.skipEventStreamParsing||0!==c&&v.isValidPlayheadTime(c)||y.registerResponseFilter(this.onManifest);const w=r.location.drm,C=w.playready,k=w.widevine,x=d.PLAYREADY,N=(e,t)=>{const n=e.keySystem,i=void 0===n?t:n;(null==e?void 0:e.url)&&(m.drm.servers[i]=e.url,m.drm.advanced[i]={},e.audioRobustness&&(m.drm.advanced[i].audioRobustness=e.audioRobustness),e.videoRobustness&&(m.drm.advanced[i].videoRobustness=e.videoRobustness),m.drm.preferredKeySystems.push([i,e.priority]))};N(k,d.WIDEVINE),N(C,x),m.drm.preferredKeySystems=this.playerConfig.drm.preferredKeySystems.sort((e,t)=>e[1]-t[1]).map(e=>e[0]);const _=l.abr,I=this.playerConfig,O=I.restrictions,D=I.abr;!0===_.ignoreDevicePixelRatio&&(D.ignoreDevicePixelRatio=_.ignoreDevicePixelRatio),_.minBitrate&&!isNaN(_.minBitrate)&&(this.minBitrate=_.minBitrate,O.minBandwidth=_.minBitrate),_.maxBitrate&&!isNaN(_.maxBitrate)&&(this.maxBitrate=_.maxBitrate,O.maxBandwidth=_.maxBitrate),isNaN(_.startBitrate)?D.defaultBandwidthEstimate=_.throughputEstimate:D.defaultBandwidthEstimate=1.15*_.startBitrate,_.maxHeight&&!isNaN(_.maxHeight)&&(D.restrictions.maxHeight=_.maxHeight),D.restrictToElementSize=_.capQualityToScreenSize;const R=e.performanceSettings;null!=R.forwardBufferLength&&(m.streaming.bufferingGoal=R.forwardBufferLength),null!=R.backBufferLength&&(m.streaming.bufferBehind=R.backBufferLength),R.mode,E.LOW,this.renderTextTrackNatively=o.native;const P=l.enableAdvancedCodecs;m.restrictions.maxChannelsCount&&(m.restrictions.maxChannelsCount=P?1/0:2),m.preferredVideoCodecs=["avc"],m.preferredAudioCodecs=["mp4"],P&&(m.preferredVideoCodecs=l.preferredVideoCodecs,m.preferredAudioCodecs=l.preferredAudioCodecs),m.preferredTextLanguage=o.language,m.preferredAudioLanguage=s.audioLanguage,m.preferredVariantRole=s.audioRole,"preferSpatialAudio"in m&&(m.preferSpatialAudio=l.preferSpatialAudio||!1),m.manifest.hls.useSafariBehaviorForLive=!1,m.manifest.dash.disableXlinkProcessing=!0;const L=r.cmcd;L.enabled&&(m.cmcd={enabled:!0,contentId:L.contentId||"",sessionId:L.sessionId||"",useHeaders:L.useHeaders}),(null==(a=S.text)?void 0:a.SimpleTextDisplayer)&&(m.textDisplayFactory=()=>new S.text.SimpleTextDisplayer(this.video,"Shaka Player TextTrack")),!0===t.flattenCues&&(m.textDisplayFactory=()=>{const e=new S.text.SimpleTextDisplayer(this.video,"Shaka Player TextTrack"),t=e.append.bind(e),n=e=>e.reduce((e,t)=>
2(t.payload&&e.push(Object.assign({},t,{nestedCues:[]})),t.nestedCues.length&&(e=e.concat(n(t.nestedCues))),e),[]);return e.append=e=>t(n(e)),e}),v.merge(m,t.config),this.configure();const M=e.resource.location.drm.aes;!v.isEmpty(M)&&M.header&&M.provider&&this.player.getNetworkingEngine().registerRequestFilter((e,t)=>{const n=S.net.NetworkingEngine.RequestType,i=t.uris[0];e===n.KEY&&i.includes(M.provider)&&Object.assign(t.headers,M.header)}),!1!==t.normalizeHevcCodecs&&P&&v.getResourceMimeType(r)===p.DASH&&e.player.registerHook(A.RESPONSE,this.responseHook);const F=S.net.NetworkingEngine.RequestType;function U(e){let t;switch(e){case F.MANIFEST:t=T.MANIFEST;break;case F.SEGMENT:t=T.SEGMENT;break;case F.LICENSE:case F.SERVER_CERTIFICATE:case F.KEY:t=T.KEY;break;default:t=T.OTHER}return t}this.player.getNetworkingEngine().registerRequestFilter((e,t)=>{if(!this.delegate.hasHook(A.REQUEST))return;const n=v.createRequest(t.uris[0],t.headers),i={objectType:U(e)};return this.delegate.applyHook(A.REQUEST,n,i).then(e=>{t.uris[0]=e.url,t.headers=e.headers,t.allowCrossSiteCredentials="include"===e.credentials})}),this.player.getNetworkingEngine().registerResponseFilter((e,t)=>{if(!this.delegate.hasHook(A.RESPONSE))return;const n=e===S.net.NetworkingEngine.RequestType.MANIFEST;let i=t.data;n&&(i=this.context.avia.Util.bufferToString(i));const r={objectType:U(e)};return this.delegate.applyHook(A.RESPONSE,{url:t.uri,data:i},r).then(e=>{t.uri=e.url,t.data=n&&"undefined"!=typeof TextEncoder?(new TextEncoder).encode(e.data):e.data}).catch(e=>{console.error(e),t.data=i})})}destroy(){var e,t;return null==(t=(e=this.playerEventMap.trackschanged).cancel)||t.call(e),this.removeEvents(this.player,this.playerEventMap),clearTimeout(this.textTimeout),clearTimeout(this.tracksChangedTimeout),this.context.player.removeHook(A.RESPONSE,this.responseHook),this.player.destroy().then(()=>(this.player=null,this.playerConfig=null,this.domTextTrack=null,this.cleanUpVtt&&delete window.VTTCue,super.destroy()))}getId(){return Yu}get info(){return{id:this.getId(),version:S.Player.version}}load(){return super.load().then(e=>ju(this,null,function*(){var t;try{yield this.player.load(r.location.mediaUrl,v.isValidPlayheadTime(c)?c:void 0),this.isLiveStream=this.player.isLive(),this.manifestVariants=this.player.getVariantTracks();const n=r.location.textTrackUrl;if(!v.isEmpty(n)){const e=v.getMimeType(n);yield this.player.addTextTrackAsync(n,"en",w.CAPTIONS,e)}return this.suppressErrors=!1,e.fragment.mimeType=(null==(t=this.getActiveVariantTrack())?void 0:t.mimeType)||"",e}catch(e){throw this.createPlayerError(e)}}))}resize(){const e=this.playerConfig.abr;e.restrictToElementSize!==this.qualityCappedToScreenSize&&(e.restrictToElementSize=this.qualityCappedToScreenSize,this.configure())}suspend(){this.playerConfig.streaming.bufferingGoal=1,this.playerConfig.streaming.rebufferingGoal=1,this.configure()}resume(){this.playerConfig.streaming.bufferingGoal=10,this.playerConfig.streaming.rebufferingGoal=10,this.configure()}getIsLiveStream(){return this.isLiveStream}clearText(){this.domTextTrack&&v.clearCue(this.domTextTrack,this.video.currentTime)}setMinBitrate(e){super.setMinBitrate(e),isNaN(e)&&(e=-1/0),this.playerConfig.restrictions.minBandwidth=e,this.configure()}setMaxBitrate(e){super.setMaxBitrate(e),isNaN(e)&&(e=1/0);const t=this.manifestVariants.reduce((e,t)=>Math.max(t.audioBandwidth,e),0);this.playerConfig.restrictions.maxBandwidth=e+t,this.configure()}setAutoQualitySwitching(e){this.playerConfig.abr.enabled=e,this.configure()}setQuality(e){const t=this.player.getVariantTracks().find(t=>t.id===e.index);t?this.player.selectVariantTrack(t,!0):this.logger.warn("Quality track not found, will not set.")}roleToType(e){return"description"===e||"alternate"===e?u.DESCRIPTION:u.MAIN}getShakaAudioTracks(){const e=this.manifestVariants,t=this.getActiveVariantTrack();return e.filter(e=>e.originalVideoId===t.originalVideoId&&e.audioCodec)}findShakaTrack(e,t){return e.find(e=>e.language===t.language&&e.audioCodec===t.codec&&e.spatialAudio===t.spatialAudio&&this.roleToType(this.getAudioRoles(e.audioRoles))===t.type)}setAudioTrack(e){if(!e)return void this.logger.info("Audio track is null, will not set.");this.audioSwitching=!0;const t=this.findShakaTrack(this.getShakaAudioTracks(),e);this.player.selectVariantTrack(t,!0,this.safeMargin)}setTextTrack(e){var t;e&&e.id!==(null==(t=this.textTrack)?void 0:t.id)&&(this.textTrack=e,this.delegate.textTrackChange(e),this.updateTextTrack())}setTextTrackMode(e){this.updateTextTrack(),this.delegate.textTrackDisplayModeChange(e)}getMetrics(){const e=this.getActiveVariantTrack(),t=this.player.getStats();return{droppedVideoFrames:t.droppedFrames,framerate:e.frameRate||Number.NaN,bandwidth:t.estimatedBandwidth}}getThumbnails(e){return super.getThumbnails(e).then(t=>{if(this.getIsLiveStream()){const t=this.player.seekRange(),n=t.start,i=t.end;e=v.mapToRange(e,0,i-n,n,i)}return Promise.all(this.player.getImageTracks().map(t=>this.player.getThumbnails(t.id,e))).then(e=>(e.filter(e=>
2!!e).forEach(e=>{const n=e.width,i=e.height,r=e.positionX,a=e.positionY,o=e.uris[0];t.push({x:r,y:a,width:n,height:i,url:o})}),t))})}getThroughput(){const e=this.player.getStats().estimatedBandwidth;return Number.isFinite(e)?e:super.getThroughput()}getSeekable(){return this.player.seekRange()}getLiveStreamUtcStart(){const e=1e3*(this.getCurrentTime()-this.player.seekRange().start),t=this.getLiveStreamUtcTime();return Math.round(t-e)}getLiveStreamUtcTime(){return this.player.getPlayheadTimeAsDate().getTime()}configure(){this.player.configure(this.playerConfig)}getActiveVariantTrack(){return this.player.getVariantTracks().find(C)||{}}getAudioTrackIndex(){const e=this.getActiveVariantTrack(),t=this.roleToType(this.getAudioRoles(e.audioRoles));return this.audioTracks.findIndex(n=>n.language===e.language&&n.type===t&&n.spatialAudio===e.spatialAudio)}getAudioTrack(){const e=this.getActiveVariantTrack(),t=this.getAudioRoles(e.audioRoles);return{language:e.language,role:t,spatialAudio:e.spatialAudio}}getAudioRoles(e){return(null==e?void 0:e.join(","))||""}updateAudioTracks(){let e=this.getShakaAudioTracks().map((e,t)=>{const n=this.getAudioRoles(e.audioRoles);return{index:t,id:t.toString(),type:this.roleToType(n),codec:e.audioCodec||"",language:e.language,label:e.label||e.language,default:e.primary,spatialAudio:e.spatialAudio}});e=e.filter(e=>!x(e)),k(e,this.audioTracks)||(this.audioTracks=e,this.delegate.audioTracksChange(this.audioTracks));let t=e[this.getAudioTrackIndex()];x(t)&&(t=e.find(e=>!x(e))||e[0]),k(t,this.audioTrack)||this.updateAudioTrack(t)}updateAudioTrack(e){this.audioTrack=e,this.delegate.audioTrackChange(e),this.updateTextTrack()}updateTextTrack(){var e;const t=parseInt(null==(e=this.textTrack)?void 0:e.id),n=this.player.getTextTracks(),i=n.find(e=>e.id===t),r=n.find(e=>{var t;return e.forced&&e.language===(null==(t=this.audioTrack)?void 0:t.language)}),a=o.enabled?i:r,s=o.enabled?!!i:!!r;a&&this.player.selectTextTrack(a),this.player.setTextTrackVisibility(s),!this.renderTextTrackNatively&&this.domTextTrack&&(this.textTimeout=setTimeout(()=>this.domTextTrack.mode="hidden",0))}updateTextTracks(){const e=this.player.getTextTracks().filter(e=>!e.forced),t=e.map(e=>{const t=/subtitle/.test(e.kind)?w.SUBTITLES:e.kind;return{id:e.id.toString(),language:e.language,kind:t,label:e.label||e.language}});k(t,this.textTracks)||(this.textTracks=t,this.delegate.textTracksChange(this.textTracks)),this.domTextTrack||(this.domTextTrack=Array.from(this.video.textTracks).find(e=>"Shaka Player TextTrack"===e.label),this.domTextTrack&&this.listenToTextTracks(!0));const n=e.find(C),i=null==n?void 0:n.id.toString();if(!this.textTrack||this.textTrack.id!==i){let e=this.textTracks.find(e=>e.id===i);return e||(e=v.findDefaultTrack(this.textTracks,o.language)),void this.setTextTrack(e)}this.player.setTextTrackVisibility(o.enabled)}updateQualityVariant(){if(!this.qualities)return;const e=this.getActiveVariantTrack();if(!e)return;const t=e.id,n=this.qualities.find(e=>e.index===t);n&&this.updateQuality(n)}normalizeQuality(e){const t=e.id,n=e.bandwidth,i=e.width,r=e.height;return{index:t,bitrate:n,codec:e.codecs,enabled:!0,category:[],frameRate:e.frameRate,width:i,height:r}}createQualities(){if(!this.manifestVariants)return[];const e=this.getAudioTrack();return this.manifestVariants.filter(t=>this.getAudioRoles(t.audioRoles)===e.role&&v.compareLanguageTags(t.language,e.language)&&t.spatialAudio===e.spatialAudio).map(this.normalizeQuality)}refreshQualities(){this.updateQualities(this.createQualities()),isFinite(this.maxBitrate)&&this.setMaxBitrate(this.maxBitrate)}createPlayerError(e){var t=this;const n=S.util.Error,i=n.Category,r=n.Code,a=function(n,i,a){let o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];for(const t in r){const n=r[t];if(n===e.code){i+=" : ".concat(t," / ").concat(n);break}}return t.createError(n,i,a,o)};switch(e.category){case i.NETWORK:return a(h.SHAKA_NETWORK_ERROR,y.FATAL_PLAYBACK_NETWORK_ERROR,e);case i.MANIFEST:return a(h.SHAKA_PARSE_ERROR,y.FATAL_PLAYBACK_MEDIA_ERROR,e);case i.MEDIA:return a(e.code===r.VIDEO_ERROR&&e.data[0]===MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED?h.SHAKA_SRC_NOT_SUPPORTED:h.SHAKA_MEDIA_ERROR,y.FATAL_PLAYBACK_MEDIA_ERROR,e);case i.DRM:return a(h.SHAKA_DRM_ERROR,y.FATAL_PLAYBACK_MEDIA_ERROR,e);default:return a(h.UNSPECIFIED_SHAKA_ERROR,y.UNSPECIFIED_ERROR,e,!1)}}onCueChange(e){const t=this.player.getTextTracks().find(e=>e.active);t&&super.onCueChange(e,t.forced)}onError(e){const t=this.createPlayerError(e.detail),n=t.code,i=t.message,r=t.cause,a=t.fatal;this.throwError(n,i,r,a)}onStreaming(){this.segmentDuration=this.player.getStats().maxSegmentDuration}onManifestUpdated(e){return ju(this,null,function*(){var t;const n=v.getResourceMimeType(r),a=n===i.MimeType.HLS||n===i.MimeType.HLS_ALT;if(e.isLive||a||(null==(t=r.overrides)?void 0:t.skipLiveToVodManifestUpdate))return;const o=this.liveStreamInfo,s=o.relativeTime,c=o.relativeDuration;
2l.startTime=s/c*this.getSeekable().end,this.isLiveStream=!1,yield this.load(),this.video.play()})}onVariantChanged(){if(this.audioSwitching){this.audioSwitching=!1;const e=this.getAudioTrack(),t=e.language,n=e.role,i=e.spatialAudio,r=this.roleToType(n),a=this.audioTracks.find(e=>e.language===t&&e.type===r&&e.spatialAudio===i);return void this.updateAudioTrack(a)}null!=this.qualities&&(this.refreshQualities(),this.updateQualityVariant())}onTracksChanged(){this.player&&this.manifestVariants&&(this.updateAudioTracks(),this.updateTextTracks(),this.refreshQualities(),this.quality||this.updateQualityVariant())}onDrmSessionUpdate(){this.delegate.drmKeySystemCreated(this.player.keySystem())}onEmsg(e){const t=e.detail,n=t||{},r=n.schemeIdUri,a=n.messageData,o=n.startTime,l=n.endTime,c=n.value,u=(s.overrides||{}).emsgAltId3SchemeIdUris;if("https://aomedia.org/emsg/ID3"!==t.schemeIdUri||this.useId3TimingCompensation){if(this.useId3TimingCompensation||(null==u?void 0:u.includes(r)))return void i.id3.getId3Frames(a).forEach(n=>{this.metadataSurface.addId3Metadata(n.key,{id:e.id,startTime:o,endTime:o+(t.duration||0),source:t,data:n.data,info:n.info,text:n.info})});this.delegate.metadataCuepoint({id:r,info:c,text:c,data:a,source:t,startTime:o,endTime:l})}}onMetadata(e){if(this.useId3TimingCompensation)return;const t=e.payload,n=t.description,i=t.data;this.metadataSurface.addId3Metadata(t.key,{id:"",info:n,text:i,data:i,source:e,startTime:e.startTime,endTime:e.endTime})}onTimelineRegionEnter(e){var t,n;if(this.video.seeking)return;const i=e.detail,r=i.startTime,a=i.endTime,o=i.schemeIdUri,s=i.value,l=i.eventNode,c=i.eventElement;let u;if(l)u=null==(t=l.attributes)?void 0:t.messageData;else if(null==c?void 0:c.getAttribute)try{u=c.getAttribute("messageData")}catch(e){this.logger.warn("Unable to obtain messageData from TimelineRegionInfo.eventElement")}const d=s||u,h=u;(null==(n=this.cachedCuepoints)?void 0:n.find(e=>e.id===o&&e.startTime===r&&e.endTime===a&&e.data===h))||this.delegate.metadataCuepoint({id:o,info:d,text:d,data:h,source:i,startTime:r,endTime:a})}onTimeUpdate(){var e;if(null==(e=this.cachedCuepoints)?void 0:e.find(e=>!e.emitted)){const e=this.video.currentTime;this.cachedCuepoints.forEach(t=>{if(!t.emitted&&e>=t.startTime){const e=((e,t)=>{for(var n in t||(t={}))Fu.call(t,n)&&Bu(e,n,t[n]);if(Mu)for(var n of Mu(t))Uu.call(t,n)&&Bu(e,n,t[n]);return e})({},t);t.emitted=!0,this.delegate.metadataCuepoint(e)}})}super.onTimeUpdate()}}(e,t)})}function Zu(e,t){const n=e.avia,i=e.logger,r=e.player;return"undefined"==typeof TextDecoder&&i.warn("Polyfill warning: TextDecoder is not defined"),r.registerAdapter({id:Yu,role:[n.AdapterRole.PLAYBACK],options:t,factory:Xu,isSupported:Qu}),{getId:()=>Yu,destroy(){}}}const Ju="dash";function $u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=[Zu(e,(e=>{var n;const i=null==(n=t.adapter)?void 0:n[e],r=t.dependencies||{};return Object.assign({debug:t.debug},i,{dependencies:r})})(Yu))];return{getId:()=>Ju,destroy(){n.map(e=>{var t;return null==(t=e.destroy)?void 0:t.call(e)})}}}var ed=(e,t,n)=>new Promise((i,r)=>{var a=e=>{try{s(n.next(e))}catch(e){r(e)}},o=e=>{try{s(n.throw(e))}catch(e){r(e)}},s=e=>e.done?i(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())});const td="hlsjs",nd="avia-load-error";function id(e){var t,n;const i=e.avia,r=e.resource,a=e.system,o=i.Browser,s=i.MimeType,l=i.Os,c=i.PlaybackAdapterBase,u=i.Util,d=a.browser===o.SAFARI,h=u.getResourceMimeType(r),f=[s.HLS,s.HLS_ALT],p=f.includes(h),m=!u.isEmpty(null==(n=null==(t=r.location.drm)?void 0:t.fairplay)?void 0:n.appCertUrl);if(p&&m)return!1;const g=a.os===l.IOS;return!(p&&g&&!d)&&c.canPlay(e,f)}function rd(e,t){return ed(this,null,function*(){var n;const i=e.avia,r=e.resource,a=e.system,o=e.playerOptions,s=i.AudioTrackType,l=i.ErrorCode,c=i.PlayerHookType,u=i.PlayerError,d=i.PlaybackAdapterBase,h=i.RequestObjectType,f=i.Util;if(!a.global.Hls)try{yield f.loadScript({url:(null==(n=t.dependencies)?void 0:n.hlsjs)||"//cdn.jsdelivr.net/npm/[email protected]/dist/hls.min.js"},e.playerOptions,()=>a.global.Hls)}catch(e){throw new u(l.HLS_SDK_MISSING,"Could not load hls.js SDK",e)}const p=a.global.Hls,m=i.Browser,g=i.ErrorMessage,v=i.Header,y=i.PerformanceMode,b=i.RequestCredentials,A=i.TextTrackMode,E=i.waitForEvent;return new class extends d{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var n;super(e,t,!1),this.isLiveStream=!1,this.totalDuration=0,this.framerate=NaN,this.bandwidth=NaN,this.qual
2ityInterval=NaN,this.withCredentials=!1,this.minAutoLevel=NaN,this.maxAutoLevel=NaN,this.isNetworkOffline=!1,this.fatalNetworkErrorTimeout=null,this.fatalNetworkErrorDelay=0,this.failedTokens=new Set,this.normalizeQuality=(e,t)=>({index:t,bitrate:e.bitrate,width:e.width,height:e.height,codec:e.attrs?e.attrs.CODECS:void 0,frameRate:e.frameRate,enabled:f.validateQuality(e,this.minBitrate,this.maxBitrate,this.maxHeight,this.player.capLevelToPlayerSize&&this.video),category:[]}),this.onNetworkOffline=()=>{this.isNetworkOffline=!0,clearTimeout(this.fatalNetworkErrorTimeout)},this.onNetworkOnline=()=>{this.isNetworkOffline&&(this.logger.info("Network is back online. Resuming playback after delay of ".concat(this.fatalNetworkErrorDelay,"ms.")),this.isNetworkOffline=!1,clearTimeout(this.fatalNetworkErrorTimeout),this.player.startLoad())},this.onLevelLoaded=(e,t)=>{const n=t.details;this.isLiveStream=n.live,this.segmentDuration=n.averagetargetduration,this.totalDuration=n.totalduration},this.onLevelSwitched=(e,t)=>{const n=t.level,i=Math.min(n,this.player.maxAutoLevel);this.updateQuality(this.qualities.find(e=>e.index===i))},this.onFragLoaded=(e,t)=>{const n=t.frag.stats;this.bandwidth=n.bwEstimate},this.onSubtitleTracksUpdated=(e,t)=>{const n=t.subtitleTracks.filter(e=>!e.forced).map((e,t)=>{var n;return{id:(null==(n=e.id)?void 0:n.toString())||t.toString(),language:e.lang,kind:e.type.toLowerCase(),label:e.name||e.lang,default:e.default}});this.textTracks=n,n.find(e=>e.default)||this.selectSubtitles(f.findDefaultTrack(n,this.context.textTrackSettings.language)),this.delegate.textTracksChange(this.textTracks)},this.onSubtitleTrackSwitch=(e,t)=>{const n=t.id.toString(),i=this.textTracks.find(e=>e.id===n);-1!==t.id&&i&&this.textTrack!==i&&this.selectSubtitles(i)},this.onAudioTracksUpdated=(e,t)=>{if(this.audioTracks=this.player.audioTracks.map((e,t)=>{var n;return{index:t,id:(null==(n=e.id)?void 0:n.toString())||t.toString(),type:"public.accessibility.describes-video"===e.attrs.CHARACTERISTICS?s.DESCRIPTION:s.MAIN,language:e.lang,codec:e.audioCodec,label:e.name||e.lang,default:e.default}}),this.audioTrack=this.audioTracks[this.player.audioTrack],this.delegate.audioTracksChange(this.audioTracks),-1===this.player.audioTrack){const e=f.findDefaultTrack(this.audioTracks,o.audioLanguage,o.audioRole);e&&(this.player.audioTrack=e.index)}},this.onAudioTrackSwitched=(e,t)=>{this.delegate.audioTrackChange(this.audioTracks[t.id])},this.onLoadError=(e,t)=>{const n=t.fatal,i=this.processError(t);n?this.player.emit(nd,nd,i):this.error(i)},this.onError=(e,t)=>{this.error(this.processError(t))},this.logger.info("hls.js version: ".concat(p.version));const i=e.performanceSettings,l=e.textTrackSettings,c=r.playback,u=p.DefaultConfig,d=a.browser===m.PLAYSTATION_4_MSE?1/0:i.backBufferLength,g=f.merge({debug:t.debug,autoStartLoad:!1,liveSyncDurationCount:c.liveEdgeSyncFragmentCount,maxBufferLength:i.forwardBufferLength||u.maxBufferLength,backBufferLength:d,maxMaxBufferLength:i.topQualityForwardBufferLength||u.maxMaxBufferLength,manifestLoadingMaxRetry:2,manifestLoadingRetryDelay:1e3,levelLoadingRetryDelay:500,fragLoadingRetryDelay:500,cmcd:r.cmcd.enabled?r.cmcd:null,capLevelToPlayerSize:!Number.isFinite(this.maxHeight)&&this.qualityCappedToScreenSize,pLoader:this.createLoader(this,h.MANIFEST),fLoader:this.createLoader(this,h.SEGMENT),loader:this.createLoader(this,h.OTHER),ignoreDevicePixelRatio:c.abr.ignoreDevicePixelRatio,minAutoBitrate:c.abr.minBitrate,abrEwmaDefaultEstimate:c.abr.throughputEstimate},t.config);i.mode===y.LOW&&(Object.assign(g,{maxBufferSize:2e7,liveSyncDurationCount:6,stretchShortVideoTrack:!0,maxBufferHole:2.5,maxStarvationDelay:10,highBufferWatchdogPeriod:5,maxFragLookUpTolerance:2.5,nudgeOffset:.25,nudgeMaxRetry:5}),c.liveEdgeSyncFragmentCount=g.liveSyncDurationCount);const v=g.xhrSetup;g.xhrSetup=(e,t)=>{e.withCredentials=this.withCredentials,null==v||v(e,t)};const b=this.player=new p(g);b.subtitleDisplay=l.native;const A=p.Events;b.on(A.LEVEL_LOADED,this.onLevelLoaded),b.on(A.LEVEL_SWITCHED,this.onLevelSwitched),b.on(A.FRAG_LOADED,this.onFragLoaded),b.on(A.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUp
2dated),b.on(A.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch),b.on(A.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated),b.on(A.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched),"undefined"!=typeof window&&(window.addEventListener("online",this.onNetworkOnline),window.addEventListener("offline",this.onNetworkOffline)),this.fatalNetworkErrorDelay=null!=(n=t.playbackRecoveryTimeout)?n:0}getId(){return td}get info(){return{id:this.getId(),version:p.version}}destroy(){"undefined"!=typeof window&&(window.removeEventListener("online",this.onNetworkOnline),window.removeEventListener("offline",this.onNetworkOffline)),a.global.clearInterval(this.qualityInterval),clearTimeout(this.fatalNetworkErrorTimeout);const e=E(this.player,p.Events.MEDIA_DETACHING);return this.player.destroy(),e.then(()=>(this.player=null,super.destroy()))}createLoader(e,t){const n=p.DefaultConfig.loader;return class extends n{load(n,i,r){const a=n.url,o=n.headers,s=void 0===o?{}:o,l=e.context.resource.location.drm.aes,u=!f.isEmpty(l)&&a.includes(l.provider)&&l.header,d={objectType:u?h.KEY:t};return Promise.resolve().then(()=>{const e=a.includes("akamaihd")&&a.includes("csmil")?b.INCLUDE:b.SAME_ORIGIN,t=f.createRequest(a,s,e);return u&&Object.assign(s,l.header),t}).then(t=>e.delegate.hasHook(c.REQUEST)?e.delegate.applyHook(c.REQUEST,t,d):t).then(t=>{Object.assign(n,t),e.withCredentials=t.credentials===b.INCLUDE;const i=r.onSuccess;r.onSuccess=(t,n,r,a)=>ed(null,null,function*(){if(e.delegate){if(e.delegate.hasHook(c.RESPONSE)&&(t=yield e.delegate.applyHook(c.RESPONSE,t,d)),t.url.includes(".ts")){const t=f.getHeader(v.MULTI_CDN,a.getAllResponseHeaders());null!=t&&e.delegate.cdnChange(t)}i(t,n,r,a)}});const a=r.onError;r.onError=(t,n,i,r)=>{if(e.delegate){if(u){const t=(null==s?void 0:s.Authorization)||(null==s?void 0:s.authorization);t&&e.failedTokens.add(t)}a(t,n,i,r)}}}).then(()=>{if(u){const t=(null==s?void 0:s.Authorization)||(null==s?void 0:s.authorization);if(t&&e.failedTokens.has(t))return e.player.stopLoad(),void r.onError({code:0,text:"Key request failed"},n,null,null)}super.load(n,i,r)})}}}load(){return super.load().then(e=>ed(this,null,function*(){this.player.on(p.Events.ERROR,this.onLoadError),this.player.attachMedia(this.video),yield E(this.player,p.Events.MEDIA_ATTACHED,nd),this.player.loadSource(r.location.mediaUrl);const t=yield E(this.player,p.Events.MANIFEST_LOADED,nd);this.initQualityInfo(),this.initNativeTextTracks(t);const n=r.playback.startTime;this.player.startLoad(f.isValidPlayheadTime(n)?n:-1),this.setBitrateRestrictionAtStartup();const i=yield E(this.player,p.Events.FRAG_LOADING,nd);return this.player.off(p.Events.ERROR,this.onLoadError),this.player.on(p.Events.ERROR,this.onError),this.suppressErrors=!1,e.fragment.mimeType=f.getMimeType(i.frag.url),e}))}suspend(){this.player.stopLoad()}resume(){this.player.startLoad()}setTextTrack(e){e&&(this.textTrackSurface?super.setTextTrack(e):this.player.subtitleTrack=parseInt(e.id))}setTextTrackMode(e){this.textTrackSurface?super.setTextTrackMode(e):(this.enabledSubtitles(e),this.delegate.textTrackDisplayModeChange(e))}setMinBitrate(e){super.setMinBitrate(e),this.player.config.minAutoBitrate=e-1,this.updateQualityInfo()}setMaxBitrate(e){super.setMaxBitrate(e);const t=isNaN(e)||!Number.isFinite(e);this.player.capLevelToPlayerSize=!!t&&this.qualityCappedToScreenSize,this.player.autoLevelCapping=t?-1:f.getMaxBitrateIndex(this.player.levels,e),this.updateQualityInfo()}setAutoQualitySwitching(e){this.player.loadLevel=e?-1:this.player.nextLoadLevel}setQuality(e){this.player.loadLevel=e.index}setAudioTrack(e){e?(this.player.audioTrack=e.index,this.enabledSubtitles()):this.logger.info("hls.js: Audio track is null, will not set.")}getIsLiveStream(){return this.isLiveStream}getMetrics(){return{droppedVideoFrames:NaN,framerate:this.framerate,bandwidth:this.bandwidth}}resize(){this.setBitrateRestrictionAtStartup()}getThroughput(){const e=this.player.bandwidthEstimate;return Number.isFinite(e)?e:super.getThroughput()}getSeekable(){const e=this.video.duration;return{start:this.getIsLiveStream()?e-this.totalDuration:0,end:e}}getLiveStreamUtcStart(){var e,t,n;const i=this.player;return(null==(n=null==(t=null==(e=i.levels[i.currentLevel])?void 0:e.details)?void 0:t.fragments[0])?void 0:n.programDateTime)||NaN}getLiveStreamUtcTime(){var e;return(null==(e=this.player.playingDate)?void 0:e.getTime())||NaN}onCueChange(e){var t;super.onCueChange(e,null==(t=this.player.subtitleTracks[this.player.subtitleTrack])?void 0:t.forced)}onMetadataCuepoint(e){const t=e.source;t.endTime>=Number.MAX_VALUE&&(t.endTime=this.video.duration,e.endTime=t.endTime),super.onMetadataCuepoint(e)}
2initQualityInfo(){this.qualityInterval=a.global.setInterval(()=>{const e=this.player,t=e.minAutoLevel,n=e.maxAutoLevel;t===this.minAutoLevel&&n===this.maxAutoLevel||(this.minAutoLevel=t,this.maxAutoLevel=n,this.updateQualityInfo())},250),this.updateQualityInfo()}updateQualityInfo(){this.updateQualities(this.player.levels.map(this.normalizeQuality))}initNativeTextTracks(e){var t;const n=null==(t=e.subtitles)?void 0:t.length,i=this.context.resource.location.textTrackUrl;if(n)return i&&this.logger.warn("Detected subtitles in the manifest. Ignoring resource's textTrackUrl"),void(e.captions&&this.logger.warn("Detected subtitles in the manifest. Ignoring manifest captions"));this.textTrackSurface=this.createTextTrackSurface()}selectSubtitles(e){this.textTrack=e,this.delegate.textTrackChange(e),this.enabledSubtitles()}enabledSubtitles(){if((arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.context.textTrackSettings.mode)!==A.DISABLED)this.listenToTextTracks(!0),this.setTextTrack(this.textTrack);else{const e=this.player.audioTracks[this.player.audioTrack];let t=-1;if(e){const n=e.lang;t=this.player.subtitleTracks.findIndex(e=>e.forced&&e.lang===n)}this.listenToTextTracks(-1!==t),this.player.subtitleTrack=t}}setBitrateRestrictionAtStartup(){const e=e=>Number.isFinite(e),t=r.playback.abr.startBitrate,n=e(t),i=e(this.minBitrate),a=e(this.maxBitrate),o=e(this.maxHeight);if(i&&this.setMinBitrate(Math.max(this.minBitrate-1,0)),a&&this.setMaxBitrate(this.maxBitrate),n&&(this.player.config.startLevel=f.getMaxBitrateIndex(this.player.levels,t)),o){const e=f.getMaxIndexForHeight(this.player.levels,this.maxHeight);isNaN(e)||(this.player.capLevelToPlayerSize=!1,this.player.autoLevelCapping=e)}a||o||(this.player.capLevelToPlayerSize=this.qualityCappedToScreenSize),this.updateQualityInfo()}processError(e){let t=l.UNSPECIFIED_HLSJS_ERROR;switch(e.type){case p.ErrorTypes.NETWORK_ERROR:return this.processNetworkErrors(e);case p.ErrorTypes.MEDIA_ERROR:return this.processMediaErrors(e);case p.ErrorTypes.MUX_ERROR:t=l.HLSJS_MUX_ERROR;default:const n=this.getErrorMessage("".concat(e.details),e.fatal);return this.createError(t,n,e,e.fatal)}}processNetworkErrors(e){const t=p.ErrorDetails,n=e.fatal?g.FATAL_PLAYBACK_NETWORK_ERROR:g.NONFATAL_PLAYBACK_NETWORK_ERROR;if(e.fatal&&this.fatalNetworkErrorDelay>0)return this.delayFatalNetworkError(e),this.createError(l.HLSJS_NETWORK_ERROR,n,e,!1);switch(e.details){case t.KEY_LOAD_ERROR:case t.LEVEL_LOAD_ERROR:case t.FRAG_LOAD_ERROR:return this.createError(l.HLSJS_NETWORK_ERROR,n,e,e.fatal);case t.MANIFEST_PARSING_ERROR:return this.createError(l.HLSJS_PARSE_ERROR,"".concat(n," : ").concat(e.details),e,e.fatal);default:return this.createError(l.HLSJS_NETWORK_ERROR,"".concat(n," : ").concat(e.details),e,e.fatal)}}delayFatalNetworkError(e){clearTimeout(this.fatalNetworkErrorTimeout),this.fatalNetworkErrorDelay>0?(this.logger.info("Delaying fatal network error by ".concat(this.fatalNetworkErrorDelay,"ms due to network offline status.")),this.fatalNetworkErrorTimeout=setTimeout(()=>{this.isNetworkOffline&&this.error(this.createError(l.HLSJS_NETWORK_ERROR,g.FATAL_PLAYBACK_NETWORK_ERROR,e,!0))},this.fatalNetworkErrorDelay)):this.error(this.createError(l.HLSJS_NETWORK_ERROR,g.FATAL_PLAYBACK_NETWORK_ERROR,e,!0))}processMediaErrors(e){const t=p.ErrorDetails,n=e.fatal?g.FATAL_PLAYBACK_MEDIA_ERROR:g.NONFATAL_PLAYBACK_MEDIA_ERROR;return e.details===t.MANIFEST_INCOMPATIBLE_CODECS_ERROR?this.createError(l.HLSJS_SRC_NOT_SUPPORTED,"".concat(n," : ").concat(e.details),e,e.fatal):this.createError(l.HLSJS_MEDIA_ERROR,"".concat(n," : ").concat(e.details),e,e.fatal)}}(e,t)})}function ad(e,t){const n=e.avia;return e.player.registerAdapter({id:td,role:[n.AdapterRole.PLAYBACK],options:t,factory:rd,isSupported:id}),{getId:()=>td,destroy(){}}}function od(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=[ad(e,(e=>{var n;const i=null==(n=t.adapter)?void 0:n[e],r=t.dependencies||{};return Object.assign({debug:t.debug},i,{dependencies:r})})(td))];return{getId:()=>"hls",destroy(){n.map(e=>{var t;return null==(t=e.destroy)?void 0:t.call(e)})}}}function sd(e){const t=(0,v.useRef)(e),n=(0,v.useRef)(0);return JSON.stringify(e)!==JSON.stringify(t.current)&&(t.current=e,n.current+=1),(0,v.useMemo)(()=>t.current,[n.current])}function ld(e){return t=>({plugin:t.plugin,options:e})}function cd(e,t){const n={debug:e};
2return"boolean"==typeof t?n:Ns.merge(n,t)}const ud=(0,v.forwardRef)(function(e,t){const i=e,r=i.options,a=i.resource,o=i.controls,s=i.debug,l=void 0!==s&&s,c=i.dash,u=void 0===c||c,d=i.hls,h=void 0===d||d,f=i.gam,p=void 0!==f&&f,m=i.fw,g=void 0!==m&&m,y=i.onError,b=i.onPlayerChange,A=i.children,E=i.globalName,T=void 0===E?"player":E,w=((e,t)=>{var n={};for(var i in e)xn.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&kn)for(var i of kn(e))t.indexOf(i)<0&&Nn.call(e,i)&&(n[i]=e[i]);return n})(i,["options","resource","controls","debug","dash","hls","gam","fw","onError","onPlayerChange","children","globalName"]),S=(0,v.useState)((null==r?void 0:r.id)||Ns.uid8()),C=(0,x.A)(S,1)[0],k=(0,v.useRef)(null),N=(0,v.useState)(null),_=(0,x.A)(N,2),I=_[0],O=_[1];(0,v.useImperativeHandle)(t,()=>I);const D=(0,v.useRef)(e=>null==y?void 0:y(e)),R=(0,v.useRef)(e=>null==b?void 0:b(e)),P=(0,v.useRef)(null),L=(0,v.useRef)(null),M=sd(r),F=sd(a);return(0,v.useEffect)(()=>{if(!k.current||!M)return;const e=D.current,t=P.current,i=L.current;P.current=ns([()=>null==i?void 0:i.cancel(),()=>null==t?void 0:t.cancel(),()=>Ru(C),()=>In(null,null,function*(){if(!k.current)return P.current.cancel();const e=Object.assign({logLevel:l?Ho.DEBUG:Ho.OFF},M,{id:C,container:k.current,plugins:[...M.plugins||[]]});return u&&e.plugins.push(function(){return{id:Ju,factory:$u,options:arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}}}(cd(l,u))),h&&e.plugins.push(function(){return{id:"hls",factory:od,options:arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}}}(cd(l,h))),(yield Promise.all([g&&n.e(974).then(n.bind(n,974)).then(ld(g)),p&&n.e(552).then(n.bind(n,552)).then(ld(p)),o&&Promise.resolve().then(n.bind(n,778)).then(ld(o))])).forEach(t=>{t&&e.plugins.push(t.plugin(cd(l,t.options)))}),e}),t=>In(null,null,function*(){const n=yield Du(t);window[T]=n,n.on(Bo.ERROR,t=>e(t.detail.error)),Promise.resolve().then(()=>O(n))})]),P.current.run()},[M,l,o,u,h,p,g,C,T]),(0,v.useEffect)(()=>{var e;if(!I||!F||(null==(e=P.current)?void 0:e.running))return;R.current(I);const t=L.current;L.current=ns([()=>null==t?void 0:t.cancel(),()=>In(null,null,function*(){var e,t;const i=null==(t=null==(e=F.playback)?void 0:e.adapter)?void 0:t.id;if(i&&!I.getPlugin(i)){let e;switch(i){case"dashjs":e=yield n.e(814).then(n.bind(n,814));break;case"cmaf":e=yield n.e(242).then(n.bind(n,242))}e&&I.registerPlugins([e.plugin({debug:l})])}}),()=>In(null,null,function*(){F&&(yield I.attachResource(F))})]),L.current.run()},[I,F,l]),function(e){const t=(0,v.useRef)();(0,v.useEffect)(()=>(clearTimeout(t.current),()=>{clearTimeout(t.current),t.current=setTimeout(e,50)}))}(()=>{var e,t;null==(e=P.current)||e.cancel(),null==(t=L.current)||t.cancel(),Ru(C).catch(D.current)}),v.createElement("div",((e,t)=>{for(var n in t||(t={}))xn.call(t,n)&&_n(e,n,t[n]);if(kn)for(var n of kn(t))Nn.call(t,n)&&_n(e,n,t[n]);return e})({ref:k},w),A)});var dd=n(778),hd=n(723);const fd=32.5,pd=2*Math.PI*fd;function md(e){let t=e.portalTarget,n=void 0===t?null:t,i=e.progress,r=e.remainingSeconds;const a=pd*(1-i),o=(0,wn.jsxs)("div",{className:"cbs-avia-ad-countdown",role:"status","aria-live":"polite","aria-label":"Advertisement, ".concat(r," seconds remaining"),children:[(0,wn.jsxs)("div",{className:"cbs-avia-ad-countdown__ring",children:[(0,wn.jsxs)("svg",{className:"cbs-avia-ad-countdown__svg",viewBox:"0 0 ".concat(70," ").concat(70),width:"100%",height:"100%","aria-hidden":!0,children:[(0,wn.jsx)("circle",{className:"cbs-avia-ad-countdown__track",cx:35,cy:35,r:fd,strokeWidth:5}),(0,wn.jsx)("circle",{className:"cbs-avia-ad-countdown__progress",cx:35,cy:35,r:fd,strokeWidth:5,strokeDasharray:pd,strokeDashoffset:a})]}),(0,wn.jsx)("span",{className:"cbs-avia-ad-countdown__seconds","aria-hidden":!0,children:r})]}),(0,wn.jsx)("span",{className:"cbs-avia-ad-countdown__label",children:"Advertisement"})]});return n?(0,hd.createPortal)(o,n):o}const gd="off",vd={en:"English","en-us":"English (U.S.)","en-gb":"English (U.K.)","en-uk":"English (U.K.)","en-au":"English (Australia)","en-ca":"English (Canada)","en-ie":"English (Ireland)","en-nz":"English (New Zealand)",es:"Spanish","es-es":"Spanish","es-mx":"Spanish (Mexico)",fr:"French","fr-ca":"French (Canadian)",pt:"Portuguese","pt-br":"Portuguese (Brazil)"};function yd(e){return e.trim().toLowerCase().replace(/_/g,"-")}function bd(e){const t=yd(e);if(vd[t])return vd[t];const n=t.split("-")[0];return vd[n]?vd[n]:void 0}function Ad(e){var t,n;const i=null===(t=e.label)||void 0===t?void 0:t.trim();if(i&&!function(e){const t=e.trim();return!!t&&(!!bd(t)||/^[a-z]{2,3}([-_][a-z0-9]{2,8})*$/i.test(t))}(i))return i;const r=(null===(n=e.language)||void 0===n?void 0:n.trim())||i||"";return bd(r)||r||e.language}function Ed(e){var t,n;if(e.id===gd)return 0;const i=yd(null!==(t=null===(n=e.track)||void 0===n?void 0:n.language)&&void 0!==t?t:e.label);return"en"===i||"en-us"===i?1:e.label.toLowerCase()}const Td=/<\/?(?:i|b|u|c(?:\.[^\s>]+)?|v(?:\s[^>]+)?|ruby|rt|lang(?:\s[^>]+)?)>/gi;function wd(e){if(!e)return"";const t=[],n=function(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}(e.replace(Td,e=>{const n="__CBS_AVIA_CAPTION_TAG_".concat(t.length,"__");return t.push(function(e){const t=/^<c\.([^>]+)>$/i.exec(e);if(t){const e=function(e){return e.replace(/[^a-zA-Z0-9_-]/g,"")}(t[1]);return'<span class="cbs-avia-captions__class cbs-avia-captions__class--'.concat(e,'">')}return/^<\/c>$/i.test(e)?"</span>":/^<v\s.+>$/i.test(e)?'<span class="cbs-avia-captions__voice">':/^<\/v>$/i.test(e)?"</span>":e.toLowerCase()}(e)),n}));
2return t.reduce((e,t,n)=>e.replace("__CBS_AVIA_CAPTION_TAG_".concat(n,"__"),t),n)}function Sd(e){let t=e.cueText,n=e.playerRoot;const i=(0,v.useState)(null),r=(0,x.A)(i,2),a=r[0],o=r[1];return(0,v.useEffect)(()=>{o(n?n.querySelector('[data-role="ccContainer"]'):null)},[n,t]),a&&t?(0,hd.createPortal)((0,wn.jsx)("div",{className:"cbs-avia-captions",children:(0,wn.jsx)("div",{className:"cbs-avia-captions__cue",dangerouslySetInnerHTML:{__html:wd(t)}})}),a):null}function Cd(e){var t,n,i,r,a,o;return(null===(t=e.liveStreamMetadata)||void 0===t||null===(n=t.contentUrl)||void 0===n?void 0:n.trim())||(null===(i=e.apiMetadata)||void 0===i||null===(r=i.url)||void 0===r?void 0:r.trim())||(null===(a=e.apiMetadata)||void 0===a||null===(o=a.videoPageUrl)||void 0===o?void 0:o.trim())||""}function kd(e){const t=document.cookie.match(new RegExp("(?:^|;\\s*)".concat(e,"=([^;]+)")));return t?decodeURIComponent(t[1]):null}function xd(){var e,t,n,i;return null!==(e=null===(t=window.CBS)||void 0===t||null===(n=t.Registry)||void 0===n||null===(i=n.region)||void 0===i?void 0:i.prefix)&&void 0!==e?e:""}function Nd(){var e,t;return null!==(e=null===(t=document.querySelector('input[name="tk_vid"]'))||void 0===t?void 0:t.value)&&void 0!==e?e:""}function _d(){try{const e=kd("mvpd_authz");if(e){const t=JSON.parse(e);if(t.mvpd_name&&t.mvpd_name.length>1)return t.mvpd_name}}catch(e){}return""}function Id(e){var t,n,i,r;return{lat:Number(null!==(t=null===(n=e.coords)||void 0===n?void 0:n.latitude)&&void 0!==t?t:0).toFixed(2),long:Number(null!==(i=null===(r=e.coords)||void 0===r?void 0:r.longitude)&&void 0!==i?i:0).toFixed(2)}}async function Od(){const e=window.CBS;if("dev"===(null==e?void 0:e.AppMode)){const e=function(){const e=kd("latlon");if(!e)return null;const t=e.split(","),n=(0,x.A)(t,2),i=n[0],r=n[1];return i&&r?{lat:i,long:r}:null}();if(e)return e}const t=function(){try{var e;const t=JSON.parse(window.sessionStorage.getItem("geo_cache")||"null");if(null!=t&&null!==(e=t.pos)&&void 0!==e&&e.coords&&t.expires&&t.expires>Date.now())return Id(t.pos)}catch(e){}return null}();return t||new Promise((e,t)=>{navigator.geolocation?navigator.geolocation.getCurrentPosition(t=>{const n=Id(t);!function(e){window.sessionStorage.setItem("geo_cache",JSON.stringify({pos:{coords:{latitude:Number(e.lat),longitude:Number(e.long)}},expires:Date.now()+36e5}))}(n),e(n)},()=>{const n=function(){var e,t,n;const i=null===(e=window.CBS)||void 0===e?void 0:e.Registry;return null!=i&&i.defaultGeolocation?{lat:"40.71",long:"-74.01"}:null!=(null==i||null===(t=i.geoLoc)||void 0===t?void 0:t.lat)&&null!=(null==i||null===(n=i.geoLoc)||void 0===n?void 0:n.lng)?{lat:Number(i.geoLoc.lat).toFixed(2),long:Number(i.geoLoc.lng).toFixed(2)}:null}();n?e(n):t(new Error("Unable to determine viewer location"))},{timeout:1e4,maximumAge:36e5,enableHighAccuracy:!1}):t(new Error("Geolocation is not supported"))})}async function Dd(e,t){const n=new FormData;for(const e of Object.entries(t)){var i=(0,x.A)(e,2);const t=i[0],r=i[1];null!=r&&n.append(t,String(r))}const r=await fetch(e,{method:"POST",headers:{"X-Requested-With":"XMLHttpRequest"},body:n});if(!r.ok)throw new Error(r.statusText||"Request failed");return r.json()}function Rd(e){const t={lat:e.lat,long:e.long,mvpd_name:_d()},n=kd("mvpd_authz");return n&&(t.mvpd_authz=n),t}function Pd(e){var t;return!(!e.isLive||null!==(t=e.assetURL)&&void 0!==t&&t.trim())&&("live-tv/stream"===Cd(e)||!0===e.isAffiliateFeed)}const Ld="1023",Md="7f077.v.fwmrm.net/ad/g/1",Fd="520311",Ud="+amcb+emcr+dtrd+slcb+vicb+fbad+sync+nucr+aeti",Bd="520311:GoogleDAICSAI_v01",jd="520311:FWCSAI_v01",Vd="https://7f077.v.fwmrm.net/ad/g/1?",Hd="vcbs_cbs_desktop_web_vod";function zd(e){return!function(e){var t;if(!e.isLive)return!1;if(function(e){var t,n,i;if(null!==(t=e.pid)&&void 0!==t&&t.trim())return!0;const r=Cd(e);return!(!(null===(n=e.liveStreamMetadata)||void 0===n||null===(i=n.pid)||void 0===i?void 0:i.trim())||"live-tv/stream"===r)}(e))return!1;if("live-tv/stream"===Cd(e))return!0;const n=null===(t=e.assetURL)||void 0===t?void 0:t.trim();return!(!n||/dai\.google\.com/i.test(n))}(e)&&!0===e.freeWheelAds}function Kd(e){var t,n,i,r,a,o;return(null===(t=e._contentID)||void 0===t?void 0:t.trim())||(null===(n=e.apiMetadata)||void 0===n||null===(i=n.contentId)||void 0===i?void 0:i.trim())||(null===(r=e.metaData)||void 0===r||null===(a=r.contentId)||void 0===a?void 0:a.trim())||(null===(o=e.pid)||void 0===o?void 0:o.trim())||void 0}function Wd(e){var t,n,i;const r=null!==(t=null===(n=e.apiMetadata)||void 0===n?void 0:n.duration)&&void 0!==t?t:null===(i=e.metaData)||void 0===i?void 0:i.videoLength;return"number"==typeof r&&Number.isFinite(r)&&r>0?Math.round(r):3600}function Gd(e){var t;return null!==(t=e.csid)&&void 0!==t&&t.trim()?e.csid.trim():e.isLive?"vcbs_cbs_desktop_web_live":Hd}function qd(e){var t,n,i;const r=null===(t=e.paramsVO)||void 0===t||null===(n=t.adCallParams)||void 0===n||null===(i=n.standardParams)||void 0===i?void 0:i.tfcd;return 0===r||1===r?r:0}function Yd(e){var t,n,i,r,a,o;const s=(null===(t=e.apiMetadata)||void 0===t||null===(n=t.videoPageUrl)||void 0===n?void 0:n.trim())||(null===(i=e.metaData)||void 0===i||null===(r=i.videoPageURL)||void 0===r?void 0:r.trim())||(null===(a=e.metaData)||void 0===a||null===(o=a.contentUrl)||void 0===o?void 0:o.trim())||"";if(!s)return"undefined"!=typeof window?window.location.href:"";if(/^https?:\/\//i.test(s))return s;if("undefined"!=typeof window){const e=s.startsWith("/")?s:"/".concat(s);return"".concat(window.location.origin).concat(e)}return s}function Qd(e,t){return t&&0!==Object.keys(t).length?a(a({},e),{},{fmsParams:a(a({},e.fmsParams),t)}
2):e}const Xd=new Set(["_fw_app_bundle","_fw_atts","_fw_did","_fw_is_lat","_fw_nielsen_app_id","fms_idfv","fms_ifa","imafw__fw_app_bundle","imafw__fw_atts","imafw__fw_did","imafw__fw_is_lat","region","imafw_region"]);function Zd(){var e;if("undefined"!=typeof window)return null===(e=window.CBS)||void 0===e?void 0:e.Registry}function Jd(e){if("undefined"==typeof document)return;const t=document.cookie.match(new RegExp("(?:^|; )".concat(e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"=([^;]*)"))),n=null==t?void 0:t[1];return null!=n&&""!==n?decodeURIComponent(n):void 0}function $d(e,t){if(null!=e&&e.trim())for(const n of e.split(",")){const e=n.split("|"),i=(0,x.A)(e,2),r=i[0],a=i[1];if((null==r?void 0:r.trim())===t&&null!=a&&a.trim())return a.trim()}}function eh(){var e,t;if("undefined"==typeof window)return;try{const e=window.localStorage.getItem("avia:audioTrackLanguage")||window.localStorage.getItem("language_selection");if(null!=e&&e.trim()){const t=e.trim(),n=t.indexOf("-");return n>0?t.substring(0,n):t}}catch(e){}const n=null===(e=Zd())||void 0===e||null===(t=e.region)||void 0===t?void 0:t.property;if(null!=n&&n.includes("|")){var i;const e=null===(i=n.split("|")[0])||void 0===i?void 0:i.trim();if(e)return e.toLowerCase()}return"en"}function th(e,t,n){null!=n&&""!==n&&(e[t]=String(n))}function nh(e){var t,n,i,r,a,o,s,l,c,u;return(null===(t=e.resource)||void 0===t||null===(n=t.ad)||void 0===n||null===(i=n.ssai)||void 0===i||null===(r=i.assetKey)||void 0===r?void 0:r.trim())||(null===(a=e.apiMetadata)||void 0===a||null===(o=a.daistreamKey)||void 0===o?void 0:o.trim())||(null===(s=e.liveStreamMetadata)||void 0===s||null===(l=s.daistreamKey)||void 0===l?void 0:l.trim())||(null===(c=e.metaData)||void 0===c||null===(u=c.daistreamKey)||void 0===u?void 0:u.trim())||void 0}function ih(e){return!0===e.isLive&&!!nh(e)}async function rh(){var e;if("undefined"==typeof window)return{};const t=null===(e=Zd())||void 0===e?void 0:e.fwGPDRPromise;if(!t)return{};try{const e=await t,n={};return null!=(null==e?void 0:e.gdpr)&&(n.imafw__fw_gdpr=String(e.gdpr)),null!=e&&e.gdpr_consent&&(n.imafw__fw_gdpr_consent=e.gdpr_consent),n}catch(e){return{}}}function ah(e){var t,n,i,r,a,o,s,l,c,u,d,h;const f={},p=Zd(),m=(null===(t=e.userCountry)||void 0===t?void 0:t.trim().toLowerCase())||(null==p||null===(n=p.region)||void 0===n||null===(i=n.property)||void 0===i?void 0:i.toLowerCase())||"us",g=function(e){var t,n;const i=null===(t=Zd())||void 0===t||null===(n=t.user)||void 0===n?void 0:n.profile_type;return"KIDS"===i||"YOUNGER_KIDS"===i?"1":String(qd(e))}(e);return th(f,"imafw_csid",Gd(e).toLowerCase()),th(f,"imafw__fw_ae",null===(r=e.mvpdId)||void 0===r?void 0:r.trim()),th(f,"imafw__fw_us_privacy",Jd("usprivacy")),th(f,"imafw__fw_vcid2",(null===(a=e.fmsParams)||void 0===a?void 0:a.imafw__fw_vcid2)||(null===(o=e.fmsParams)||void 0===o?void 0:o._fw_vcid2)),th(f,"imafw_region",m),th(f,"imafw_description_url","undefined"!=typeof window&&/paramountplus/i.test(window.location.hostname)?"https://www.paramountplus.com":"https://www.cbs.com"),th(f,"imafw_host",(null==p?void 0:p.host)||("undefined"!=typeof window?window.location.host:void 0)),th(f,"imafw_packageSource",null===(s=e.packageSource)||void 0===s?void 0:s.trim()),th(f,"imafw_partner",(null===(l=e.partner)||void 0===l?void 0:l.trim())||"cbs"),th(f,"imafw_ptype",null===(c=window.utag_data)||void 0===c?void 0:c.pageType),th(f,"imafw_session",Jd("CBS_ADV_VAL")),th(f,"imafw_sub",null!=e.gusr?String(e.gusr):void 0),th(f,"imafw_subses",Jd("CBS_ADV_SUBSES_VAL")),th(f,"imafw_sz","640x480"),th(f,"tfcd",g),th(f,"imafw_tfcd",g),th(f,"imafw_tve",$d(e.userStatus,"tve")),th(f,"imafw_user",(null==p||null===(u=p.user)||void 0===u?void 0:u.profile_type)||"ADULT"),th(f,"imafw_vguid",window.__page_uuid),th(f,"imafw_gpp",null==p||null===(d=p.gpp)||void 0===d?void 0:d.gppString),th(f,"imafw_gpp_sid",null==p||null===(h=p.gpp)||void 0===h?void 0:h.gppSid),th(f,"imafw__fw_h_x_country",m),th(f,"imafw_device_region_language",eh()),th(f,"imafw_language_selection",eh()),th(f,"imafw__fw_h_referer","undefined"!=typeof document?document.referrer:void 0),th(f,"imafw_sb",$d(e.userStatus,"sb")),th(f,"imafw_tsb",$d(e.userStatus,"tsb")),function(e,t){if(t)for(const i of Object.entries(t)){var n=(0,x.A)(i,2);const t=n[0],r=n[1];if(null==r||""===r||Xd.has(t))continue;const a=t.startsWith("imafw_")?t:"imafw_".concat(t);null!=e[a]&&""!==e[a]||(e[a]=String(r))}}(f,e.fmsParams),f}async function oh(e){var t,n,i,r,a;if("undefined"==typeof window)return null;const o=null===(t=window.CBS)||void 0===t?void 0:t.Registry;if(null!=o&&o.fms&&Object.keys(o.fms).length>0)return o.fms;if(null!=o&&o.fmsPromise)try{if(await o.fmsPromise,o.fms&&Object.keys(o.fms).length>0)return o.fms}catch(e){}const s=null!==(n=null==o||null===(i=o.region)||void 0===i?void 0:i.prefix)&&void 0!==n?n:"",l=e.dai?1:0,c=await fetch("".concat(s,"/freewheel/fms.json?dai=").concat(l));if(!c.ok)throw new Error("FMS fetch failed: ".concat(c.statusText));const u=await c.json();if(!u.success)throw new Error("FMS fetch unsuccessful");return null!==(r=null===(a=u.data)||void 0===a?void 0:a.fms_params)&&void 0!==r?r:null}function sh(e){var t,n,i,r;const a={csid:Gd(e),tfcd:String(qd(e)),partner:(null===(t=e.partner)||void 0===t?void 0:t.trim())||"cbs"},o=Kd(e);if(o&&(a.vid=o),null!==(n=e.ppid)&&void 0!==n&&n.trim()&&(a.ppid=e.ppid.trim()),null!=e.gusr&&(a.sub=String(e.gusr)),null!==(i=e.userCountry)&&void 0!==i&&i.trim()&&(a.region=e.userCountry.trim().toLowerCase()),null!==(r=e.packageSource)&&void 0!==r&&r.trim()&&(a.packageSource=e.packageSource.trim()),!0===e.cpPre&&(a.cpPre="1"),!0===e.contPlay&&(a._fw_continuous_play="1"),function(e,t){null!=t&&t.trim()&&t.split(",").forEach(t=>{const n=t.split("|"),i=(0,x.A)(n,2),r=i[0],a=i[1];r&&a&&(e[r.trim()]=a.trim())})}(a,e.userStatus),e.fmsParams)for(const t of Object.entries(e.fmsParams)){var s=(0,x.A)(t,2);const e=s[0],n=s[1];null!=n&&""!==n&&(a[e]=String(n))}return a}function lh(e){var t;const n=Kd(e);if(!n)throw new Error("CbsAviaPlayer: content id is required for FreeWheel ads (_contentID, apiMetadata.contentId, or metaData.contentId)");return{networkId:Fd,server:Vd,profile:jd,siteSection:{id:Gd(e),networkId:Fd},videoAsset:{id:n,duration:Wd(e)},adBreakTimes:[0],customParameters:sh(e),descriptionUrl:Yd(e),continuousPlayback:!0===e.contPlay,ppid:(null===(t=e.ppid)||void 0===t?void 0:t.trim())||void 0}}function ch(e){var t,n,i,r,o;const s=nh(e);if(!s)throw new Error("CbsAviaPlayer: DAI asset key is required for live SSAI ad configuration");const l=null===(t=e.resource)||void 0===t||null===(n=t.ad)||void 0===n?void 0:n.ssai,
2c=null!==(i=null==l?void 0:l.adParameters)&&void 0!==i?i:{};return{adParameters:a(a({},ah(e)),c),assetKey:s,format:null==l?void 0:l.format,isLive:null===(r=null!==(o=null==l?void 0:l.isLive)&&void 0!==o?o:e.isLive)||void 0===r||r}}function uh(e){var t,n,i,r;const a=null!==(t=null===(n=e.apiMetadata)||void 0===n?void 0:n.fullEpisode)&&void 0!==t?t:null===(i=e.metaData)||void 0===i?void 0:i.fullEpisode;return!0===a||!1!==a&&"show"===(null===(r=e.contentType)||void 0===r?void 0:r.toLowerCase())}function dh(e){return!e.isLive&&uh(e)}function hh(e){if(!dh(e))return 0;const t=e.grestime;if("number"==typeof t&&Number.isFinite(t)&&t>0)return Math.floor(t);const n=e.medTime;return"number"==typeof n&&Number.isFinite(n)&&n>0?Math.floor(n):0}function fh(){return"undefined"==typeof window?void 0:window}function ph(){const e=fh();if(!e)return!1;const t=e.vtg,n=!0===(i=t,"config.trackingDisabled".split(".").reduce((e,t)=>{if(null!=e&&"object"==typeof e)return e[t]},i));var i;return Boolean(e.utag&&(null==t?void 0:t.config)&&function(){var e,t,n,i;return"function"==typeof(null===(e=fh())||void 0===e||null===(t=e.vtg)||void 0===t||null===(n=t.ts)||void 0===n||null===(i=n.AviaTracking)||void 0===i?void 0:i.plugin)}()&&!n)}function mh(e,t){const n=t-e;return"clamp(".concat(e,"px, calc(").concat(e,"px + (100vw - 1024px) * ").concat(n," / ").concat(326,"), ").concat(t,"px)")}const gh={"--avia-accent-color":"#007bff","--avia-text-color":"#ffffff","--avia-text-color-hover":"#ffffff","--avia-font-family":'"Proxima Nova Regular", Roboto, Helvetica, Arial, sans-serif',"--avia-font-family-semibold":'"Proxima Nova Semibold", Roboto, Helvetica, Arial, sans-serif',"--avia-control-bar-bg":"linear-gradient(to top, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.55) 55%, transparent 100%)","--avia-control-bar-height":mh(60,100),"--avia-default-spacing":"20px","--avia-half-spacing":"8px","--avia-control-bar-btn-height":mh(35,58),"--avia-control-bar-btn-width":mh(34,56),"--avia-time-color":"#ffffff","--avia-time-font-size":mh(12,20),"--avia-time-height":mh(16,26),"--avia-time-line-height":mh(16,26),"--avia-time-width":"auto","--avia-time-font-family":"var(--avia-font-family)","--avia-slider-height":"12px","--avia-slider-value-height":"4px","--avia-slider-track-color":"rgba(255, 255, 255, 0.35)","--avia-slider-color":"var(--avia-accent-color)","--avia-slider-handle-color":"#ffffff","--avia-slider-handle-width":"12px","--avia-slider-handle-height":"12px","--avia-slider-handle-radius":"10px","--avia-buffered-range-background-color":"rgba(255, 255, 255, 0.22)","--avia-icon-btn-bg-size":"84% 64%","--avia-volume-indicator-background-color":"rgba(40, 40, 40, 0.85)","--avia-volume-indicator-border-radius":"4px","--avia-volume-indicator-width":mh(22,36),"--avia-volume-indicator-height":mh(72,120),"--avia-volume-indicator-right":"8px","--avia-volume-indicator-bottom":mh(34,56),"--avia-focus-box-shadow":"0 0 0 2px rgba(0, 123, 255, 0.65)","--avia-focus-box-shadow-inner":"inset 0 0 0 2px rgba(0, 123, 255, 0.65)","--avia-play-cta-height":mh(74,124),"--avia-play-cta-width":mh(74,124)},vh="adbreakcomplete",yh="adbreakmetadata",bh="adbreakstart",Ah="adcomplete",Eh="adpaused",Th="adprogress",wh="adstart",Sh="actionkey",Ch="contentplaying",kh="contentprogress",xh="resourcestart",Nh="playbackstatechange",_h="textcuepoint",Ih="texttrackenabledchange",Oh="fullscreenchange",Dh="contentstart",Rh="ready",Ph="autoplayblocked",Lh="pluginevent";function Mh(e){if(!Number.isFinite(e)||e<0)return"00:00";const t=Math.floor(e),n=Math.floor(t/60),i=t%60;return"".concat(String(n).padStart(2,"0"),":").concat(String(i).padStart(2,"0"))}function Fh(e){return a({autoplay:e.autoPlayVid?"attemptUnmutedThenMuted":"none",renderTextTrackNatively:!1,enableMoat:!1},ph()?function(){const e=function(){var e,t;const n=fh();if(ph()&&null!=n&&null!==(e=n.vtg)&&void 0!==e&&null!==(t=e.ts)&&void 0!==t&&t.AviaTracking)return function(){var e,t,n,i,r,a;const o=fh(),s=null===(e=window.CBS)||void 0===e||null===(t=e.Registry)||void 0===t?void 0:t.sparrowHost,l=null==o||null===(n=o.vtg)||void 0===n||null===(i=n.config)||void 0===i||null===(r=i.Sparrow)||void 0===r||null===(a=r.params)||void 0===a?void 0:a.serverInfo;s&&l&&(l.serverUrl=s.replace(/(^\w+:|^)\/\//,""))}(),n.vtg.ts.AviaTracking.plugin({config:n.vtg.config})}();return e?(function(e,t){(function(){try{return"true"===localStorage.getItem("cbs-avia-tracking-debug")}catch(e){return!1}})()&&(void 0!==t?console.info("[CBS Avia Tracking] ".concat(e),t):console.info("[CBS Avia Tracking] ".concat(e)))}("Registering VTG AviaTracking plugin",{pluginId:e.id}),{enableOm:!0,plugins:[e]}):{}}():{})}function Uh(e){const t=e.contentTime,n=e.contentDuration;return!Number.isFinite(n)||n<=0?null:Math.max(0,n-t)}function Bh(){return(0,wn.jsx)("svg",{className:"cbs-avia-chrome__cast-svg",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",focu
2sable:"false",children:(0,wn.jsx)("path",{fill:"currentColor",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.92-11-11-11z"})})}function jh(){let e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).className;return(0,wn.jsx)("svg",{className:e,viewBox:"0 0 34 34",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,children:(0,wn.jsx)("path",{fill:"currentColor",d:"M6.92573503,4.68421053 L17.8729047,15.6318012 L28.8204719,4.68421053 C29.1983509,4.30633149 29.8110139,4.30633149 30.1888929,4.68421053 C30.566772,5.06208957 30.566772,5.67475254 30.1888929,6.05263158 L19.2409047,16.9998012 L30.1888929,27.9473684 C30.566772,28.3252475 30.566772,28.9379104 30.1888929,29.3157895 C29.8110139,29.6936685 29.1983509,29.6936685 28.8204719,29.3157895 L17.8729047,18.3678012 L6.92573503,29.3157895 C6.54785599,29.6936685 5.93519301,29.6936685 5.55731397,29.3157895 C5.17943494,28.9379104 5.17943494,28.3252475 5.55731397,27.9473684 L16.5049047,16.9998012 L5.55731397,6.05263158 C5.17943494,5.67475254 5.17943494,5.06208957 5.55731397,4.68421053 C5.93519301,4.30633149 6.54785599,4.30633149 6.92573503,4.68421053 Z"})})}function Vh(){return(0,wn.jsx)("svg",{className:"cbs-avia-next-episode__svg",viewBox:"0 0 26 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",children:(0,wn.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.1099 12L3.45215 3.27085V20.7291L17.1099 12ZM18.0048 12.5719L18.0058 12.5726L18.0048 12.5719ZM20.0483 11.3672C19.9254 11.0068 19.6933 10.6841 19.3521 10.4661L3.35215 0.239941C2.28548 -0.441802 0.952148 0.410376 0.952148 1.77386V22.2261C0.952148 23.5896 2.28548 24.4418 3.35215 23.7601L19.3521 13.5339C19.6933 13.3159 19.9254 12.9932 20.0483 12.6328C20.1868 12.2269 20.1868 11.7731 20.0483 11.3672ZM22.5483 22.75C22.5483 23.4404 23.108 24 23.7983 24C24.4887 24 25.0483 23.4404 25.0483 22.75L25.0483 1.25C25.0483 0.559644 24.4887 4.39741e-09 23.7983 4.39741e-09C23.108 4.39741e-09 22.5483 0.559644 22.5483 1.25L22.5483 22.75Z",fill:"currentColor"})})}function Hh(){return(0,wn.jsxs)("svg",{className:"cbs-avia-next-episode__svg-filled",viewBox:"0 0 26 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",children:[(0,wn.jsx)("path",{d:"M20.0483 11.3672C19.9254 11.0068 19.6933 10.6841 19.3521 10.4661L3.35215 0.239941C2.28548 -0.441802 0.952148 0.410376 0.952148 1.77386V22.2261C0.952148 23.5896 2.28548 24.4418 3.35215 23.7601L19.3521 13.5339C19.6933 13.3159 19.9254 12.9932 20.0483 12.6328C20.1868 12.2269 20.1868 11.7731 20.0483 11.3672Z",fill:"currentColor"}),(0,wn.jsx)("path",{d:"M22.5483 22.75C22.5483 23.4404 23.108 24 23.7983 24C24.4887 24 25.0483 23.4404 25.0483 22.75L25.0483 1.25C25.0483 0.559644 24.4887 4.39741e-09 23.7983 4.39741e-09C23.108 4.39741e-09 22.5483 0.559644 22.5483 1.25L22.5483 22.75Z",fill:"currentColor"})]})}function zh(){return(0,wn.jsx)("svg",{width:"100%",height:"100%",viewBox:"0 0 100 80",version:"1.1",xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",strokeMiterlimit:"2",strokeLinejoin:"round",children:(0,wn.jsxs)("g",{id:"Artboard1",transform:"matrix(1,0,0,0.8,0,0)",children:[(0,wn.jsx)("rect",{x:"0",y:"0",width:"100",height:"100",fill:"none;"}),(0,wn.jsxs)("g",{transform:"matrix(1,0,0,1.25,0.280841,-7.471165)",children:[(0,wn.jsx)("g",{transform:"matrix(1,0,0,1.016102,0,-3.032507)",children:(0,wn.jsx)("rect",{x:"2.768",y:"12.826",width:"93.903",height:"11",fill:"currentColor"})}),(0,wn.jsx)("g",{transform:"matrix(0.378834,0,0,1.012195,2.000125,17.017598)",children:(0,wn.jsx)("rect",{x:"2.768",y:"12.826",width:"93.903",height:"11",fill:"currentColor"})}),(0,wn.jsx)("g",{transform:"matrix(0.378834,0,0,1.012195,2.000125,37.017598)",children:(0,wn.jsx)("rect",{x:"2.768",y:"12.826",width:"93.903",height:"11",fill:"currentColor"})}),(0,wn.jsx)("g",{transform:"matrix(0.378834,0,0,1.012195,2.000125,57.017598)",children:(0,wn.jsx)("rect",{x:"2.768",y:"12.826",width:"93.903",height:"11",fill:"currentColor"})}),(0,wn.jsx)("g",{transform:"matrix(0,1.086163,-1.037037,0,131.77756,-26.662472)",children:(0,wn.jsx)("path",{d:"M76.084,33.853L100,74.036L52.168,74.036L76.084,33.853Z",fill:"currentColor"})})]})]})})}function Kh(){return(0,wn.jsx)("svg",{className:"cbs-avia-chrome__cc-svg",viewBox:"-2 -8.5 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,wn.jsxs)("g",{fillRule:"evenodd",stroke:"none",strokeWidth:1,children:[(0,wn.jsx)("path",{className:"cbs-avia-chrome__cc-bubble",d:"M0,0 L29.5,0 L29.5,21.3517 L22.9554,18.263 L22.4219,19.3935 L22.9554,18.263 C22.5884,18.0898 22.1876,18 21.7817,18 L0,18 L0,0 Z"}),(0,wn.jsx)("path",{className:"cbs-avia-chrome__cc-pills",d:"M5.75,5 C5.05964,5 4.5,5.5596 4.5,6.25 C4.5,6.9404 5.05964,7.5 5.75,7.5 L10.25,7.5 C10.9404,7.5 11.5,6.9404 11.5,6.25 C11.5,5.5596 10.9404,5 10.25,5 L5.75,5 Z M5.75,11 C5.05964,11 4.5,11.5596 4.5,12.25 C4.5,12.9404 5.05964,13.5 5.75,13.5 L16.25,13.5 C16.9404,13.5 17.5,12.9404 17.5,12.25 C17.5,11.5596 16.9404,11 16.25,11 L5.75,11 Z M19.5,12.25 C19.5,11.5596 20.0596,11 20.75,11 L23.75,11 C24.4404,11 25,11.5596 25,12.25 C25,12.9404 24.4404,13.5 23.75,13.5 L20.75,13.5 C20.0596,13.5 19.5,12.9404 19.5,12.25 Z M14.75,5 C14.0596,5 13.5,5.5596 13.5,6.25 C13.5,6.9404 14.0596,7.5 14.75,7.5 L23.75,7.5 C24.4404,7.5 25,6.9404 25,6.25 C25,5.5596 24.4404,5 23.75,5 L14.75,5 Z"})]})})}function Wh(){let e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).className;return(0,wn.jsxs)("svg",{className:e,viewBox:"0 0 39 21",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,focusable:"false",children:[(0,wn.jsx)("path",{className:"cbs-avia-skip-icon__outline",fillRule:"evenodd",clipRule:"evenodd",d:"M16.5 10.5L14.6774 9.3039L2.5 1.3125L0.5 0V2.39221V18.6078V21L2.5 19.6875L14.6774 11.6961L16.5 10.5ZM12.8547 10.5L2.5 3.70471V17.2953L12.8547 10.5ZM34.5 10.5L32.6774 9.3039L20.5 1.3125L18.5 0V2.39221V18.6078V21L20.5 19.6875L32.6774 11.6961L34.5 10.5
2ZM30.8547 10.5L20.5 3.70471V17.2953L30.8547 10.5Z",fill:"currentColor"}),(0,wn.jsx)("path",{className:"cbs-avia-skip-icon__filled",fillRule:"evenodd",clipRule:"evenodd",d:"M16.5 10.5L0.5 21V0L16.5 10.5ZM34.5 10.5L18.5 21V0L34.5 10.5Z",fill:"#000"}),(0,wn.jsx)("path",{className:"cbs-avia-skip-icon__bar",d:"M36.5 0H38.5V2V19V21H36.5V19V2V0Z",fill:"currentColor"})]})}function Gh(){return(0,wn.jsx)("svg",{className:"cbs-avia-subtitles-overlay__check-svg",viewBox:"0 0 34 34",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,children:(0,wn.jsx)("path",{fill:"#0092F3",fillRule:"evenodd",d:"M13.6948 25.6417C14.0952 25.955 14.6733 25.884 14.9861 25.4831L27.4631 9.48957C27.7759 9.0887 27.7048 8.50975 27.3044 8.19644C26.904 7.88291 26.3259 7.95389 26.0131 8.35476L14.2766 23.3991L9.31537 16.8056C9.00969 16.3994 8.43291 16.3183 8.02709 16.6246C7.62127 16.9308 7.5401 17.5084 7.84578 17.9146L13.3905 25.2836C13.4128 25.3132 13.4365 25.3411 13.4615 25.3672C13.5193 25.4699 13.5979 25.5631 13.6948 25.6417Z"})})}const qh="auibutton";function Yh(e,t){const n=(0,v.useRef)(null),i=(0,v.useCallback)(e=>{var t,i;"select"===(null===(t=e.detail)||void 0===t?void 0:t.action)&&(null===(i=n.current)||void 0===i||i.click(),e.preventDefault())},[]);return{ref:(0,v.useCallback)(e=>{n.current&&n.current.removeEventListener("actionkey",i),n.current=e,t&&(t.current=e),e&&e.addEventListener("actionkey",i)},[t,i]),onFocus:(0,v.useCallback)(()=>{null==e||e.enterActionKeyContext(qh)},[e]),onBlur:(0,v.useCallback)(()=>{null==e||e.exitActionKeyContext(qh)},[e])}}function Qh(e){let t=e.options,n=e.selectedId,i=e.audioOptions,r=void 0===i?[]:i,a=e.selectedAudioId,o=void 0===a?"":a,s=e.showAudioColumn,l=void 0!==s&&s,c=e.player,u=e.portalTarget,d=void 0===u?null:u,h=e.onClose,f=e.onSelect,p=e.onSelectAudio;const m=(0,v.useId)(),g=(0,v.useId)(),y=Yh(c,(0,v.useRef)(null)),b=t.some(e=>e.id!==gd),A=!l||b,E=l&&A,T=E?"Subtitles and Audio":l?"Audio":"Subtitles",w=(0,wn.jsxs)("div",{className:"cbs-avia-subtitles-overlay",role:"dialog","aria-modal":"true","aria-label":T,tabIndex:0,children:[(0,wn.jsxs)("div",{className:["cbs-avia-subtitles-overlay__content",E&&"cbs-avia-subtitles-overlay__content--dual"].filter(Boolean).join(" "),children:[A&&(0,wn.jsx)(Zh,{player:c,title:"Subtitles",titleId:m,options:t,selectedId:n,onSelect:f}),l&&p&&(0,wn.jsx)(Zh,{player:c,title:"Audio",titleId:g,options:r,selectedId:o,onSelect:p})]}),(0,wn.jsx)("button",{ref:y.ref,type:"button",className:"cbs-avia-subtitles-overlay__close","aria-label":"Close",onFocus:y.onFocus,onBlur:y.onBlur,onClick:h,children:(0,wn.jsx)(jh,{className:"cbs-avia-subtitles-overlay__close-svg"})})]});return d?(0,hd.createPortal)(w,d):w}function Xh(e){let t=e.player,n=e.option,i=e.isSelected,r=e.onSelect;const a=Yh(t);return(0,wn.jsxs)("button",{type:"button",role:"option","aria-selected":i,className:["cbs-avia-subtitles-overlay__option",i&&"cbs-avia-subtitles-overlay__option--selected"].filter(Boolean).join(" "),ref:a.ref,onFocus:a.onFocus,onBlur:a.onBlur,onClick:()=>r(n.id),children:[(0,wn.jsx)("span",{className:"cbs-avia-subtitles-overlay__option-icon","aria-hidden":!0,children:i?(0,wn.jsx)(Gh,{}):null}),(0,wn.jsx)("span",{className:"cbs-avia-subtitles-overlay__option-label",children:n.label})]})}function Zh(e){let t=e.player,n=e.title,i=e.titleId,r=e.options,a=e.selectedId,o=e.onSelect;return(0,wn.jsxs)("div",{className:"cbs-avia-subtitles-overlay__column",children:[(0,wn.jsx)("h2",{id:i,className:"cbs-avia-subtitles-overlay__title",children:n}),(0,wn.jsx)("div",{className:"cbs-avia-subtitles-overlay__options",role:"listbox","aria-labelledby":i,children:r.map(e=>(0,wn.jsx)(Xh,{player:t,option:e,isSelected:e.id===a,onSelect:o},e.id))})]})}function Jh(e){let t=e.currentTimeSeconds,n=e.durationSeconds;const i=n>0?Math.min(1,Math.max(0,t/n)):0;return(0,wn.jsxs)("div",{className:"cbs-avia-ad-playback","aria-hidden":!1,children:[(0,wn.jsxs)("div",{className:"cbs-avia-bar-top__times cbs-avia-ad-playback__times",children:[(0,wn.jsx)("span",{className:"cbs-avia-ad-playback__time","aria-label":"Current ad time",children:Mh(t)}),(0,wn.jsx)("span",{className:"cbs-avia-ad-playback__time","aria-label":"Ad duration",children:Mh(n)})]}),(0,wn.jsx)("div",{className:"cbs-avia-ad-playback__bar",role:"progressbar","aria-valuemin":0,"aria-valuemax":n,"aria-valuenow":t,"aria-label":"Ad progress",children:(0,wn.jsx)("div",{className:"cbs-avia-ad-playback__track",children:(0,wn.jsx)("div",{className:"cbs-avia-ad-playback__fill",style:{width:"".concat(100*i,"%")}})})})]})}let $h=function(e){return e.OPEN_CREDITS="openCredits",e.PREVIEW="preview",e}({});function ef(e){return null!=e&&Number.isFinite(e)?e/1e3:null}function tf(){return"undefined"==typeof window?void 0:window}function nf(e){return Object.fromEntries(Object.entries(e).filter(e=>{let t=(0,x.A)(e,2)[1];return null!=t&&("string"!=typeof t||""!==t.trim())}))}function rf(e){var t,n;let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=null===(t=tf())||void 0===t||null===(n=t.om)||void 0===n?void 0:n.trackAction;if(r&&e)try{r(e,nf(i))}catch(e){}}function af(e){return e.isLive?e.liveStreamMetadata:e.metaData}
2function of(){var e,t;return null!==(e=null===(t=tf())||void 0===t?void 0:t.utag_data)&&void 0!==e?e:{}}function sf(e){var t,n,i,r;const a=null!==(t=null===(n=e.seriesTitle)||void 0===n?void 0:n.trim())&&void 0!==t?t:"",o=null!==(i=null===(r=e.videoTitle)||void 0===r?void 0:r.trim())&&void 0!==i?i:"";return a?o.includes(a)?o:"".concat(a," - ").concat(o):o}function lf(e){var t,n,i,r,a,o,s,l,c,u,d,h,f,p,m,g,v,y,b;const A=af(e),E=of(),T=e.apiMetadata;return nf({pageType:null!==(t=E.pageType)&&void 0!==t?t:"video",pageViewGuid:null!==(n=E.pageViewGuid)&&void 0!==n?n:"",showSeriesId:null!==(i=null!==(r=E.showSeriesId)&&void 0!==r?r:null===(a=e.showId)||void 0===a?void 0:a.toString())&&void 0!==i?i:"",showSeriesTitle:null!==(o=null!==(s=null==T?void 0:T.seriesTitle)&&void 0!==s?s:null==A?void 0:A.seriesTitle)&&void 0!==o?o:"",showGenre:null!==(l=null!==(c=E.showGenre)&&void 0!==c?c:null==T?void 0:T.genre)&&void 0!==l?l:"",showEpisodeId:null!==(u=null!==(d=null!==(h=E.showEpisodeId)&&void 0!==h?h:null==T?void 0:T.contentId)&&void 0!==d?d:null==A?void 0:A.contentId)&&void 0!==u?u:"",showEpisodeLabel:null!==(f=null!==(p=null!==(m=E.showEpisodeTitle)&&void 0!==m?m:null==T?void 0:T.title)&&void 0!==p?p:null==A?void 0:A.videoTitle)&&void 0!==f?f:"",showSeasonNumber:null!==(g=null!==(v=null==T?void 0:T.seasonNum)&&void 0!==v?v:null==A?void 0:A.seasonNumber)&&void 0!==g?g:"",showEpisodeNumber:null!==(y=null!==(b=null==T?void 0:T.episodeNum)&&void 0!==b?b:null==A?void 0:A.episodeNumber)&&void 0!==y?y:""})}function cf(e){var t,n,i,r,o;
2if(!e.isLive)return{};const s=e.liveStreamMetadata,l=of();return nf(a(a({},lf(e)),{},{liveTvChannel:null!==(t=null!==(n=l.liveTvChannel)&&void 0!==n?n:null==s?void 0:s.channelName)&&void 0!==t?t:"",stationCode:null!==(i=l.stationCode)&&void 0!==i?i:"",pageType:null!==(r=l.pageType)&&void 0!==r?r:"live-tv",rowHeaderTitle:null!==(o=l.rowHeaderTitle)&&void 0!==o?o:""}))}function uf(e){switch(e){case $h.OPEN_CREDITS:return{view:"trackSkipIntroView",select:"trackSkipIntroSelection"};case $h.PREVIEW:return{view:"trackSkipRecapView",select:"trackSkipRecapSelection"};default:return{view:"trackSkipPromoView",select:"trackSkipPromoSelection"}}}function df(e,t,n){var i,r,o,s,l,c,u,d,h,f,p;const m=sf(t),g=null!==(i=null===(r=t.tracking)||void 0===r||null===(o=r.trackAction)||void 0===o||null===(s=o.trackEndCardSelect)||void 0===s?void 0:s.TVELockedBadge)&&void 0!==i?i:t.locked?"1":"0";return nf(a(a({},lf(e)),{},{endCardType:"single",endCardContentListCount:"1",endCardContentListType:null!==(l=null===(c=t.contentType)||void 0===c?void 0:c.toLowerCase())&&void 0!==l?l:"show",endCardContentList:m,endCardContentPosition:"1",endCardCountdownTime:String(n),endCardTimerTotal:String(n),endCardTriggerType:e.isLive?"end_of_broadcast":"end_of_ecct",endCardRecommendationSource:"recommendation_engine",ctaText:null!==(u=t.btnLabel)&&void 0!==u?u:"Play Now",TVELockedBadge:g,showSeriesTitle:null!==(d=t.seriesTitle)&&void 0!==d?d:"",showEpisodeTitle:null!==(h=t.videoTitle)&&void 0!==h?h:"",showSeasonNumber:null!==(f=t.seasonNumber)&&void 0!==f?f:"",showEpisodeNumber:null!==(p=t.episodeNumber)&&void 0!==p?p:"",autoPlayEnabled:"1"}))}function hf(e,t,n){const i=sf(t);rf("trackEndCardSelect",a(a({},df(e,t,n.timerTotal)),{},{contPlayState:n.gesture,eventEndCardSelect:"1",endCardContentSelection:i,endCardCountdownTime:String(n.countdownRemaining)}))}function ff(e,t){rf("trackPlayerSubtitleLanguage",a({playerSubtitleLanguage:t||"off"},cf(e)))}function pf(e){let t=e.onClick,n=e.player,i=e.playerData,r=e.sectionType;const a=Yh(n);return(0,v.useEffect)(()=>{!function(e,t){rf(uf(t).view,lf(e))}(i,r)},[i,r]),(0,wn.jsx)("button",{type:"button",className:"cbs-avia-skip-button","aria-label":"Skip",ref:a.ref,onFocus:a.onFocus,onBlur:a.onBlur,onClick:()=>{!function(e,t){rf(uf(t).select,lf(e))}(i,r),t()},children:(0,wn.jsxs)("span",{className:"cbs-avia-skip-button__layout",children:[(0,wn.jsx)(Wh,{className:"cbs-avia-skip-button__icon"}),(0,wn.jsx)("span",{className:"cbs-avia-skip-button__text",children:"Skip"})]})})}function mf(e){var t,n;let i=e.state,r=e.posterUrl;if(!i.isCasting)return null;const a=i.deviceName?"Casting to ".concat(i.deviceName):"Connecting to Chromecast";return(0,wn.jsxs)("div",{className:"cbs-avia-cast-overlay","aria-live":"polite",children:[r?(0,wn.jsx)("div",{className:"cbs-avia-cast-overlay__background",style:{backgroundImage:"url(".concat(r,")")}}):null,(0,wn.jsx)("div",{className:"cbs-avia-cast-overlay__gradient"}),(0,wn.jsxs)("div",{className:"cbs-avia-cast-overlay__content",children:[i.showSpinner?(0,wn.jsx)("div",{className:"cbs-avia-cast-overlay__spinner","aria-hidden":!0}):null,(0,wn.jsx)("div",{className:"cbs-avia-cast-overlay__casting-to",children:a}),null!==(t=i.metadata)&&void 0!==t&&t.line1||null!==(n=i.metadata)&&void 0!==n&&n.line2?(0,wn.jsxs)("div",{className:"cbs-avia-cast-overlay__metadata",children:[i.metadata.line1?(0,wn.jsx)("div",{className:"cbs-avia-cast-overlay__metadata-line1",children:i.metadata.line1}):null,i.metadata.line2?(0,wn.jsx)("div",{className:"cbs-avia-cast-overlay__metadata-line2",children:i.metadata.line2}):null]}):null]})]})}function gf(e){const t=document.querySelector(e);if(null==t||!t.textContent)return null;try{return JSON.parse(t.textContent)}catch(e){return null}}function vf(e){var t,n;const i=gf("#app-config");return null!==(t=null==i||null===(n=i.core_pa)||void 0===n?void 0:n[e])&&void 0!==t?t:""}function yf(e,t){var n;let i=null!==(n=function(){var e;return null!==(e=gf("#locales"))&&void 0!==e?e:{}}()[e])&&void 0!==n?n:e;if(t)for(const e of Object.entries(t)){var r=(0,x.A)(e,2);const t=r[0],n=r[1];i=i.replace(new RegExp("\\{".concat(t,"\\}"),"g"),n)}return i}function bf(){const e=(0,v.useMemo)(()=>({title:vf("lt_check_availability_title"),description:vf("lt_check_availability_desc"),faqMessage:yf("questions_visit_our_faq_page_at",{url:yf("faq_link")})}),[]),t=e.title,n=e.description,i=e.faqMessage;return(0,wn.jsx)("div",{id:"slate__check__availability",className:"slate",children:(0,wn.jsxs)("div",{className:"slate__wrapper",children:[(0,wn.jsx)("div",{className:"slate__title",children:t}),(0,wn.jsxs)("div",{className:"slate__description",children:[(0,wn.jsx)("p",{children:n}),(0,wn.jsx)("div",{className:"slate__loading__animation",children:(0,wn.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 200 200",className:"icon__loading__svg",style:{fill:"rgba(255, 255, 255, 0.8)"},children:(0,wn.jsxs)("g",{children:[(0,wn.jsx)("path",{d:"M8.16,138.48A99.6,99.6,0,0,0,49,185.78l5.8-14.07a84.94,84.94,0,0,1-.27-143.23l-5.83-14A100.06,100.06,0,0,0,8.16,138.48Z"}),(0,wn.jsx)("path",{d:"M199.54,85.9A100.13,100.13,0,0,0,76.29,3l5.83,14A85,85,0,0,1,184.38,85.9Z"}),(0,wn.jsx)("path",{d:"M138.94,192.39a100,100,0,0,0,60.34-76.6H184.07A84.86,84.86,0,0,1,82.43,183.1l-5.8,14.07A99.6,99.6,0,0,0,138.94,192.39Z"})]})})}),(0,wn.jsx)("div",{className:"slate__faq",children:(0,wn.jsx)("p",{dangerouslySetInnerHTML:{__html:i}})})]})]})})}function Af(){const e=(0,v.useMemo)(()=>({title:vf("lt_not_supported_title"),description:vf("lt_not_supported_desc"),ctaCopy:vf("lt_not_supported_cta"),ctaUrl:vf("lt_not_supported_cta_url")}),[]),t=e.title,n=e.description,i=e.ctaCopy,r=e.ctaUrl;return(0,wn.jsx)("div",{id:"slate__check__availability",className:"slate",children:(0,wn.jsxs)("div",{className:"slate__wrapper",children:[(0,wn.jsx)("div",{className:"slate__title",children:t}),(0,wn.jsxs)("div",{className:"slate__description",children:[(0,wn.jsx)("p",{children:n}),(0,wn.jsx)("div",{className:"button-container",children:(0,wn.jsx)("a",{href:r,className:"button primary",role:"button",tabIndex:0,"aria-label":i,children:(0,wn.jsx)("div",{className:"button__text",children:i})})})]})]})})}const Ef={maxa:"1",slid:"pause_ads-1018x674",ptgt:"a",tpcl:"PAUSE_MIDROLL",slau:"PAUSE_AD",w:"1018",h:"674"},Tf=new Set(["description_url","_fw_continuous_play","_fw_h_referer","is_lat","sz","cpPre","cpSession","dai-excl","api-key","rdid","idtype"]);function wf(){const e=10**9;return Math.floor(Math.random()*(10**16-e-2))+e}function Sf(e){var t;return null!==(t=e.csid)&&void 0!==t&&t.trim()?e.csid.trim():"vcbs_cbs_desktop_web_vod"}function Cf(e){return Object.entries(e).filter(e=>{let t=(0,x.A)(e,2)[1];return null!=t&&""!==t}).filter(e=>{let t=(0,x.A)(e,1)[0];const n=t.startsWith("imafw_")?t.slice(6):t;return!Tf.has(t)&&!Tf.has(n)}).map(e=>{let t=(0,x.A)(e,2),n=t[0],i=t[1];const r=n.startsWith("imafw_")?n.slice(6):n;return"".concat(r,"=").concat(function(e){return encodeURIComponent(String(e))}(i))}).join("&")}function kf(e){const t=[];
2return e.querySelectorAll("Impression, impression").forEach(e=>{var n;const i=null===(n=e.textContent)||void 0===n?void 0:n.trim();i&&t.push(i)}),t}function xf(e){const t=[];return e.querySelectorAll("ClickTracking, clicktracking").forEach(e=>{var n;const i=null===(n=e.textContent)||void 0===n?void 0:n.trim();i&&t.push(i)}),t}function Nf(e){null!=e&&e.length&&e.forEach(e=>{null!=e&&e.trim()&&((new Image).src=e)})}function _f(e){let t=e.data,n=e.player,i=e.portalTarget,r=void 0===i?null:i,a=e.onReturn;const o=(0,v.useRef)(null),s=Yh(n,o),l=Yh(n);(0,v.useEffect)(()=>{const e=window.setTimeout(()=>{var e;null===(e=o.current)||void 0===e||e.focus()},500);return()=>window.clearTimeout(e)},[o]);const c=(0,wn.jsxs)("div",{className:"cbs-avia-pause-ad",role:"dialog","aria-label":"Advertisement",children:[(0,wn.jsx)("div",{className:"cbs-avia-pause-ad__background","aria-hidden":!0}),(0,wn.jsx)("button",{ref:s.ref,type:"button",className:"cbs-avia-pause-ad__return",onFocus:s.onFocus,onBlur:s.onBlur,onClick:a,children:"Click to return to the video"}),(0,wn.jsxs)("button",{type:"button",className:"cbs-avia-pause-ad__creative",ref:l.ref,onFocus:l.onFocus,onBlur:l.onBlur,onClick:()=>{t.clickThrough&&window.open(t.clickThrough,"_blank","noopener,noreferrer"),Nf(t.clickTrackingURLs)},disabled:!t.clickThrough,"aria-label":"Advertisement",children:[(0,wn.jsx)("img",{className:"cbs-avia-pause-ad__image",src:t.imageSource,alt:""}),(0,wn.jsx)("span",{className:"cbs-avia-pause-ad__label",children:"Advertisement"})]})]});return r?(0,hd.createPortal)(c,r):c}function If(e){let t=e.eventTitle,n=e.preGameTitle,i=e.schedule;const r=(0,v.useState)(Df(i.videoStartDate)),a=(0,x.A)(r,2),o=a[0],s=a[1],l=(0,v.useState)(!0),c=(0,x.A)(l,2),u=c[0],d=c[1];return(0,v.useEffect)(()=>{const e=setTimeout(()=>{d(!1)},5e3),t=setInterval(()=>{s(Df(i.videoStartDate))},1e3);return()=>{clearInterval(t),clearTimeout(e)}},[i]),(0,wn.jsxs)("div",{className:"pregame-countdown".concat(u?"":" reduce"),children:[u?(0,wn.jsxs)("h2",{className:"pregame-countdown__title",children:[t||"Event"," Will Start In:"]}):(0,wn.jsx)("h2",{className:"pregame-countdown__title",children:"Live Event Starts In:"}),(0,wn.jsx)("div",{className:"pregame-countdown__count",role:"timer","aria-live":"polite",children:Of(o)}),u&&(0,wn.jsxs)("div",{className:"pregame-countdown__details",children:[(0,wn.jsx)("div",{children:"The game will start automatically."}),(0,wn.jsxs)("div",{children:["While you wait, catch up on the latest sports news, highlights, and analysis from ",n||"Event"]})]})]})}function Of(e){const t=Math.floor(e/3600),n=Math.floor(e%3600/60),i=Math.floor(e%60),r=e=>String(e).padStart(2,"0");return t>0?"".concat(t,":").concat(r(n),":").concat(r(i)):"".concat(r(n),":").concat(r(i))}function Df(e){return Math.max(0,Math.ceil((1e3*e-Date.now())/1e3))}const Rf={"CBSN-US":{shortTitle:"Latest News & Headlines",logoUrl:"https://sportshub.cbsistatic.com/i/2024/09/03/827af7ea-ceb0-48f0-b5e4-a59237bbcd6f/logo-icon-cbsnews247.png",rowSlug:"cbs-news-247",rowName:"CBS News 24/7"},"CBSN-NY":{shortTitle:"Latest New York News & Headlines",logoUrl:"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w200-q80/channel/42/46/61/fe539507-d99e-4a7c-8c9e-34acbf2d900d.png",rowSlug:"cbs-news-new-york",rowName:"CBS News New York"},"CBSN-LA":{shortTitle:"Latest Los Angeles News & Headlines",logoUrl:"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w200-q80/channel/95/83/92/851b3ca3-72db-47b7-8440-b77a4ec2e6ae.png",rowSlug:"cbs-news-los-angeles",rowName:"CBS News Los Angeles"},"CBSN-CHI":{shortTitle:"Latest Chicago News & Headlines",logoUrl:"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w200-q80/channel/51/44/01/9ae8866c-9a20-4e67-9356-10cfb5a256b6.png",rowSlug:"cbs-news-chicago",rowName:"CBS News Chicago"},"CBSN-DAL":{shortTitle:"Latest Texas News & Headlines",logoUrl:"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w200-q80/channel/51/38/40/7765f951-cfbc-4f2e-8485-892b070db470.png",rowSlug:"cbs-news-texas",rowName:"CBS News Texas"},"CBSN-PHI":{shortTitle:"Latest Philadelphia News & Headlines",logoUrl:"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w200-q80/channel/51/57/39/20d4c58c-68e8-4fd8-9dc3-b887cd99fccf.png",rowSlug:"cbs-news-philadelphia",rowName:"CBS News Philadelphia"},"CBSN-BOS":{shortTitle:"Latest Boston News & Headlines",logoUrl:"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w200-q80/channel/51/59/96/9a3e1c06-5b1c-42ee-a16d-9698c0ad46a1.png",rowSlug:"cbs-news-boston",rowName:"CBS News Boston"},"CBSN-SF":{shortTitle:"Latest Bay Area News & Headlines",logoUrl:"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w200-q80/channel/51/49/36/c75ac78a-6d67-4467-99ca-7b4714635b2a.png",rowSlug:"cbs-news-bay-area",rowName:"CBS News Bay Area"},"CBSN-DET":{shortTitle:"Latest Detroit News & Headlines",logoUrl:"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w200-q80/channel/51/33/48/02ffb415-706f-4b85-9a04-06fdb12adeae.png",rowSlug:"cbs-news-detroit",rowName:"CBS News Detroit"},"CBSN-MIN":{shortTitle:"Latest Minnesota News & Headlines",logoUrl:"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w200-q80/channel/51/46/90/893aded1-cc88-4ded-8fde-c8fc40a770b6.png",rowSlug:"cbs-news-minnesota",rowName:"CBS News Minnesota"},"CBSN-DEN":{shortTitle:"Latest Colorado News & Headlines",logoUrl:"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w200-q80/channel/51/41/24/e541c3de-c881-4ac0-94a6-19a391602a7b.png",rowSlug:"cbs-news-colorado",rowName:"CBS News Colorado"},"CBSN-MIA":{shortTitle:"Latest Miami News & Headlines",logoUrl:"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w200-q80/channel/51/61/65/79b13bc6-e2a7-43db-97e1-29f2e3520982.png",rowSlug:"cbs-news-miami",rowName:"CBS News Miami"},"CBSN-SAC":{shortTitle:"Latest Sacramento News & Headlines",logoUrl:"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w200-q80/channel/51/35/98/16573db7-0bfa-429a-9cbc-7a6e02f84afe.png",rowSlug:"cbs-news-sacramento",rowName:"CBS News Sacramento"},"CBSN-PIT":{shortTitle:"Latest Pittsburgh News & Headlines",logoUrl:"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w200-q80/channel/51/54/79/aa9e51b6-e411-4228-bf99-859884231f1c.png",rowSlug:"cbs-news-pittsburgh",rowName:"CBS News Pittsburgh"},"CBSN-BAL":{shortTitle:"Latest Baltimore News & Headlines",logoUrl:"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w200-q80/channel/51/52/17/5d4cfcd1-19d0-4bae-83e6-eaa74dd057ed.png",rowSlug:"cbs-news-baltimore",rowName:"CBS News Baltimore"}};function Pf(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now();if(null==e)return;const n=e-t;if(n<=0)return"0m left";const i=Math.ceil(n/6e4),r=Math.floor(i/60),a=i-60*r;return r>0?"".concat(r,"h ").concat(a,"m left"):"".concat(a,"m left")}function Lf(e){return e.length>1&&e.endsWith("/")?e.slice(0,-1):e=e.replace(/\/sportshq\/$/,"/sports/")}function Mf(e){if(!e||"object"!=typeof e)return!1;const t=e,n=t.updatedOn,i=t.data;return"number"==typeof n&&!!i&&"object"==typeof i}const Ff={stationId:"stationId",dma:"dma",lat:"latitude",long:"longitude"};function Uf(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(!e)return e;if(!/^\d{4}-\d{2}-\d{2}T/.test(e))return e;const t=new Date(e);if(Number.isNaN(t.getTime()))return e;const n=t.getMinutes(),i=n<10?"0".concat(n):"".concat(n);let r=t.getHours();const a=r>=12?"PM":"AM";return 0===r?r=12:r>
212&&(r-=12),"".concat(r,":").concat(i).concat(a)}const Bf=(0,wn.jsxs)("svg",{enableBackground:"new 0 0 125 57.9",version:"1.1",viewBox:"0 0 125 57.9",xmlSpace:"preserve",xmlns:"http://www.w3.org/2000/svg",children:[(0,wn.jsx)("g",{className:"arrst0",transform:"matrix(4.9855 0 0 5.12 1005.9 -1686.5)",children:(0,wn.jsx)("g",{className:"arrst1",transform:"scale(.94338 1)",children:(0,wn.jsx)("path",{className:"arrst2",d:"m-211.5 316.1 11 7.5 10.8-7.5"})})}),(0,wn.jsx)("g",{className:"arrst3",transform:"matrix(4.9855 0 0 5.12 1005.9 -1607.2)",children:(0,wn.jsx)("g",{transform:"scale(.94338 1)",children:(0,wn.jsx)("path",{className:"arrst2",d:"m-211.5 316.1 11 7.5 10.8-7.5"})})})]}),jf=(0,wn.jsx)("svg",{enableBackground:"new 0 0 125 57.9",version:"1.1",viewBox:"0 0 125 57.9",xmlSpace:"preserve",xmlns:"http://www.w3.org/2000/svg",children:(0,wn.jsx)("g",{transform:"matrix(4.9855 0 0 5.12 1005.9 -1607.2)",children:(0,wn.jsx)("g",{transform:"scale(.94338 1)",children:(0,wn.jsx)("path",{className:"arrst2",d:"m-211.5 316.1 11 7.5 10.8-7.5"})})})});function Vf(e){let t=e.programOverlayRow,n=e.isWatching,i=e.now,r=e.onScheduleClick,a=e.scheduleLoading,o=void 0!==a&&a;return(0,wn.jsxs)("div",{className:"programOverlayRow",children:[(0,wn.jsxs)("a",{href:t.href,className:"control","aria-label":"Play ".concat(t.title),children:[(0,wn.jsx)("div",{className:"play-but","aria-hidden":"true"}),(0,wn.jsx)("div",{className:"row-icon",children:t.logo&&(0,wn.jsx)("img",{src:t.logo,alt:""})})]}),(0,wn.jsx)("div",{className:"divider","aria-hidden":"true",children:(0,wn.jsx)("span",{className:"divider-bar"})}),(0,wn.jsx)("div",{className:"episode-container",children:(0,wn.jsxs)("div",{className:"episode",children:[n&&(0,wn.jsx)("div",{className:"indicator-watching","aria-hidden":"true",children:(0,wn.jsxs)("span",{className:"indicator",children:[(0,wn.jsx)("span",{className:"dot"}),(0,wn.jsx)("span",{className:"text",children:"Watching"})]})}),(0,wn.jsx)("div",{className:"title",children:(0,wn.jsx)("span",{className:"text",children:t.title})}),t.description&&(0,wn.jsx)("div",{className:"description-container",children:(0,wn.jsxs)("div",{className:"description",children:[(0,wn.jsxs)("h4",{children:[t.seasonNumber&&t.episodeNumber&&(0,wn.jsxs)("span",{children:["S",t.seasonNumber," E",t.episodeNumber]}),t.episodeTitle&&(0,wn.jsx)("span",{children:t.episodeTitle}),t.rating&&(0,wn.jsx)("span",{children:t.rating})]}),t.description]})}),(t.endTimestamp||t.rowSlug)&&(0,wn.jsxs)("div",{className:"channel-link",children:[t.endTimestamp&&(0,wn.jsx)("div",{className:"remaining",children:Pf(t.endTimestamp,i)}),(0,wn.jsxs)("button",{type:"button",disabled:!t.rowSlug||o,onClick:e=>{e.preventDefault(),e.stopPropagation(),null==r||r(t)},children:[(s=t,s.channelCode||s.rowName||s.title)," Schedule âº"]})]})]})})]});var s}function Hf(e){let t=e.item,n=e.itemNumber,i=e.isWatching,r=e.now;const a=t.title,o=void 0===a?"":a,s=t.description,l=void 0===s?"":s,c=t.startTimeFormatted,u=void 0===c?"":c,d=t.isListingLive,h=void 0!==d&&d,f=t.endTimestamp,p=t.seasonNumber,m=void 0===p?"":p,g=t.episodeNumber,v=void 0===g?"":g,y=t.episodeTitle,b=void 0===y?"":y,A=t.rating,E=void 0===A?"":A,T=h?Pf(f,r):void 0,w=m||v||b||E;return(0,wn.jsxs)("div",{className:"schedule-item","data-num":n,children:[i&&(0,wn.jsxs)("div",{className:"indicator-watching",children:[(0,wn.jsxs)("div",{className:"indicator",children:[(0,wn.jsx)("div",{className:"dot"}),(0,wn.jsx)("div",{className:"text",children:"Watching"})]}),T&&(0,wn.jsx)("div",{className:"remaining",children:T})]}),!i&&h&&(0,wn.jsxs)("div",{className:"indicator-live",children:[(0,wn.jsxs)("div",{className:"indicator",children:[(0,wn.jsx)("div",{className:"dot"}),(0,wn.jsx)("div",{className:"text",children:"Live"})]}),T&&(0,wn.jsx)("div",{className:"remaining",children:T})]}),(0,wn.jsx)("div",{className:"time",children:Uf(u)}),(0,wn.jsx)("div",{className:"title",children:(0,wn.jsx)("span",{className:"text",children:o})}),(l||w)&&(0,wn.jsx)("div",{className:"description-container",children:(0,wn.jsxs)("div",{className:"description",children:[w&&(0,wn.jsx)("div",{className:"sub-title",children:(0,wn.jsx)("span",{children:(0,wn.jsxs)("h4",{children:[(m||v)&&(0,wn.jsxs)("span",{children:["S",m," E",v]}),b&&(0,wn.jsx)("span",{children:b}),E&&(0,wn.jsx)("span",{children:E})]})})}),l&&(0,wn.jsx)("p",{children:l})]})})]})}function zf(e){var t;let n=e.isScheduleView,i=void 0!==n&&n,r=e.portalTarget,a=void 0===r?null:r,o=e.rows,s=e.setIsScheduleView,l=e.visible;const c=(0,v.useState)(()=>Date.now()),u=(0,x.A)(c,2),d=u[0],h=u[1],f=(0,v.useState)(null),p=(0,x.A)(f,2),m=p[0],g=p[1],y=function(){const e=(0,v.useState)([]),t=(0,x.A)(e,2),n=t[0],i=t[1],r=(0,v.useState)(!1),a=(0,x.A)(r,2),o=a[0],s=a[1],l=(0,v.useState)(),c=(0,x.A)(l,2),u=c[0],d=c[1],h=(0,v.useRef)(null),f=(0,v.useCallback)(()=>{var e;null===(e=h.current)||void 0===e||e.abort(),h.current=null,i([]),s(!1),d(void 0)},[]),p=(0,v.useCallback)(async e=>{var t;null===(t=h.current)||void 0===t||t.abort();const n=new AbortController;h.current=n,s(!0),d(void 0);try{const t=await fetch(function(e){const t=new URLSearchParams;t.set("timestamp",String(Date.now()));const n=localStorage.getItem("stationIdLocation");n&&t.set("stationId",n);const i=function(e){var t;return null!==(t={"cbs-news":"cbsn",sports:"cbssportshq"}[e])&&void 0!==t?t:e}(e);return"/live-tv/stream/channelSchedulePlayer/".concat(encodeURIComponent(i),"/schedule.json?").concat(t.toString())}(e),{signal:n.signal});if(!t.ok)throw new Error("Schedule request failed: ".concat(t.status));const r=await t.json();if(n.signal.aborted)return null;const a=function(e){if(!e||"object"!=typeof e)return[];const t=e,n=t.result;if(n&&"object"==typeof n){const e=n.listing;if(Array.isArray(e))return e.filter(e=>!!e&&"object"==typeof e)}return Array.isArray(t.listing)?t.listing.filter(e=>!!e&&"object"==typeof e):[]}(r);return i(a),s(!1),a}catch(e){if(n.signal.aborted)return null;const t=e instanceof Error?e.message:"Schedule request failed";return d(t),i([]),s(!1),null}},[]);return(0,v.useEffect)(()=>()=>{var e;null===(e=h.current)||void 0===e||e.abort()},[]),{listings:n,loading:o,error:u,fetchSchedule:p,resetSchedule:f}}(),b=y.listings,A=y.loading,E=y.fetchSchedule,T=y.resetSchedule,w=(0,v.useRef)(null),S=(0,v.useRef)(null),C=(0,v.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),i&&S.current?function(e){const t=e.getBoundingClientRect().top+e.clientHeight,n=t+2;for(const i of Array.from(e.querySelectorAll(".schedule-item"))){const r=i.getBoundingClientRect().bottom;if(!(r<=n))return void(e.scrollTop+=r-t)}}(S.current):!i&&w.current&&function(e){const t=e.getBoundingClientRect().top+e.clientHeight,n=t+2;for(const i of Array.from(e.querySelectorAll(".programOverlayRow"))){const r=i.getBoundingClientRect().bottom;if(!(r<=n))return void(e.scrollTop+=r-t)}}(w.current)},[i]),k=(0,v.useCallback)(async e=>{var t;e.rowSlug&&(g({rowName:null!==(t=e.rowName)&&void 0!==t?t:e.title,rowSlug:e.rowSlug}),s(!0),null===await E(e.rowSlug)&&(s(!1),g(null)))},[E,s]),N=(0,v.useCallback)(()=>{s(!1),window.setTimeout(()=>{g(null),T()},500)},[T,s]);(0,v.useEffect)(()=>
2{if(!l)return;h(Date.now());const e=window.setInterval(()=>{h(Date.now())},6e4);return()=>{window.clearInterval(e)}},[l]),(0,v.useEffect)(()=>{l||(s(!1),g(null),T())},[T,s,l]);const _=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.location.pathname;return e.findIndex(e=>null!=e.href&&Lf(e.href)===Lf(t))}(o),I=_>=0?o[_]:void 0,O=!!m&&!(null==I||!I.rowSlug)&&I.rowSlug===m.rowSlug,D=(0,wn.jsx)("div",{className:"skin-sidebar-plugin cbs-avia-program-overlay".concat(l?" show":""),"aria-hidden":!l,children:(0,wn.jsx)("div",{className:"sidebar",children:(0,wn.jsx)("div",{className:"base-container",children:(0,wn.jsxs)("div",{className:"live-schedule",children:[(0,wn.jsxs)("div",{className:"schedule-breadcrumbs".concat(i?" on":""),children:[(0,wn.jsxs)("button",{type:"button",className:"back-schedule",onClick:N,children:[(0,wn.jsx)("span",{className:"arrow",children:jf}),"BACK / "]}),(0,wn.jsx)("span",{className:"channel",children:null!==(t=null==m?void 0:m.rowName)&&void 0!==t?t:""})]}),(0,wn.jsxs)("div",{className:"rows-container".concat(i?" live-schedule__channels-container--off":""),children:[(0,wn.jsx)("div",{className:"fade-scroll",ref:w,children:(0,wn.jsx)("div",{className:"rows","data-content":"scrollable",children:o.map((e,t)=>(0,wn.jsx)(Vf,{programOverlayRow:e,isWatching:t===_,now:d,onScheduleClick:k,scheduleLoading:A},e.id))})}),(0,wn.jsx)("div",{className:"scroll-arrow","aria-hidden":"true",onMouseDown:C,children:Bf})]}),(0,wn.jsxs)("div",{className:"schedule-container".concat(i?" live-schedule__schedule-container--on":""),children:[(0,wn.jsx)("div",{className:"fade-scroll",ref:S,children:(0,wn.jsxs)("div",{className:"schedule","data-content":"scrollable",children:[A&&(0,wn.jsx)("div",{className:"schedule-item",children:(0,wn.jsx)("div",{className:"title",children:(0,wn.jsx)("span",{className:"text",children:"Loading scheduleâ¦"})})}),!A&&b.map((e,t)=>{var n;return(0,wn.jsx)(Hf,{item:e,itemNumber:t,isWatching:O&&!!e.isListingLive,now:d},null!==(n=e.id)&&void 0!==n?n:t)})]})}),(0,wn.jsx)("div",{className:"scroll-arrow","aria-hidden":"true",onMouseDown:C,children:Bf})]})]})})})});return a?(0,hd.createPortal)(D,a):D}
2function Kf(e){let t=e.portalTarget,n=void 0===t?null:t,i=e.hitCaptureRef;const r=(0,wn.jsx)("div",{ref:i,className:"cbs-avia-program-overlay-hit-capture","aria-hidden":!0});return n?(0,hd.createPortal)(r,n):r}function Wf(e){let t=e.close,n=e.data,i=e.initialCount,r=e.playerData,o=e.portalTarget,s=void 0===o?null:o,l=e.uiIsActive;const c=(0,v.useState)(i),u=(0,x.A)(c,2),d=u[0],h=u[1],f=(0,v.useRef)(!1),p=(0,v.useRef)(!1);(0,v.useEffect)(()=>{f.current||(f.current=!0,function(e,t,n){rf("trackEndCardView",a(a({},df(e,t,n)),{},{eventEndCardView:"1"}))}(r,n,i))},[r,n,i]),(0,v.useEffect)(()=>{let e;return d<=0?(p.current||(p.current=!0,hf(r,n,{timerTotal:i,countdownRemaining:0,gesture:"autoroll"})),window.location.href=n.videoPageURL):e=setTimeout(()=>{h(d-1)},1e3),()=>{e&&clearTimeout(e)}},[d]);const m=(0,v.useMemo)(()=>{let e="";return n.seasonNumber&&(e+="S".concat(n.seasonNumber," ")),n.episodeNumber&&(e+="E".concat(n.episodeNumber)),""!==e?(0,wn.jsxs)(wn.Fragment,{children:[(0,wn.jsx)("strong",{children:e.trim()})," ",n.videoTitle]}):n.videoTitle},[n]),g=(0,wn.jsxs)("div",{className:"cbs-avia-up-next".concat(l?" move-up":""),children:[(0,wn.jsx)("a",{href:n.videoPageURL,className:"cbs-avia-up-next__link",onClick:()=>{p.current||(p.current=!0,hf(r,n,{timerTotal:i,countdownRemaining:d,gesture:"endcard_content_select"}))},children:(0,wn.jsx)("img",{src:n.showPreviewImage,alt:n.videoTitle,className:"cbs-avia-up-next__image"})}),(0,wn.jsxs)("div",{className:"cbs-avia-up-next__content",children:[(0,wn.jsxs)("div",{className:"cbs-avia-up-next__countdown-text",children:[(0,wn.jsx)(zh,{})," Up Next in ",d,"s"]}),(0,wn.jsx)("h3",{className:"cbs-avia-up-next__title",children:n.seriesTitle}),(0,wn.jsx)("p",{className:"cbs-avia-up-next__subtitle",children:m})]}),(0,wn.jsx)("button",{className:"cbs-avia-up-next__close",onClick:()=>t(),type:"button",children:(0,wn.jsx)(jh,{})})]});return s?(0,hd.createPortal)(g,s):g}const Gf={isAdBreak:!1,remainingSeconds:0,progress:0,currentAdTimeSeconds:0,currentAdDurationSeconds:0};function qf(e,t,n){let i=n.isAdBreak,r=n.subtitlesOverlayOpenRef;const a=function(e){var t,n;return!(!zd(e)||e.isLive||!1===e.pauseAdEnabled||!0===e.showSkinSideBar||!0===e.casting||null!==(t=e.apiMetadata)&&void 0!==t&&null!==(n=t.videoProperties)&&void 0!==n&&n.includes("KIDS"))}(t),o=(0,v.useState)(!1),s=(0,x.A)(o,2),l=s[0],c=s[1],u=(0,v.useState)(!1),d=(0,x.A)(u,2),h=d[0],f=d[1],p=(0,v.useState)(null),m=(0,x.A)(p,2),g=m[0],y=m[1],b=(0,v.useRef)(0),A=(0,v.useRef)(!1),E=(0,v.useCallback)(()=>{b.current+=1,A.current=!1,c(!1),f(!1),y(null)},[]),T=(0,v.useCallback)(()=>{A.current=!0,c(!1),f(!0);const e=document.querySelector("avia-play-toggle avia-button");null==e||e.focus()},[]);return(0,v.useEffect)(()=>{if(!e||!a)return void E();const n=n=>{const a=function(e){var t;return"pause"===(null===(t=e.detail)||void 0===t?void 0:t.type)}(n),o=function(e,t){var n;return"playpause"===(null===(n=e.detail)||void 0===n?void 0:n.action)&&"playing"===t.playbackState}(n,e);(a||o)&&(()=>{if(i||e.isAd)return;if(null!=r&&r.current)return;if(A.current)return;const n=Uh(e);if(null!==n&&n<=2)return;const a=b.current+1;b.current=a,async function(e){const t=function(e){const t=function(e){var t,n,i,r,a,o;return(null===(t=e._contentID)||void 0===t?void 0:t.trim())||(null===(n=e.apiMetadata)||void 0===n||null===(i=n.contentId)||void 0===i?void 0:i.trim())||(null===(r=e.metaData)||void 0===r||null===(a=r.contentId)||void 0===a?void 0:a.trim())||(null===(o=e.pid)||void 0===o?void 0:o.trim())||void 0}(e);if(!t)return;const n={asnw:Fd,caid:t,csid:Sf(e).toLowerCase(),flag:Ud,metr:Ld,nw:Fd,prof:Bd,pvrn:wf(),resp:"vast4",ssnw:Fd,vprn:wf()},i=sh(e),r=[Cf(n),Cf(i),Cf(Ef)].join(";");return"https://".concat(Md,"?").concat(r)}(e);if(!t)return null;const n=await fetch(t);if(!n.ok)return null;const i=(await n.text()).replace(/\s+/g," ").replace(/<Impression><!\[CDATA\[]><\/Impression>/g,"").replace(/&(?!amp;)/g,"&").trim(),r=(new DOMParser).parseFromString(i,"text/xml");return r.querySelector("parsererror")?null:function(e){var t,n;const i=e.querySelector("Creative, creative");if(!i)return null;const r=i.querySelector('MediaFile[type*="image/"], mediafile[type*="image/"]'),a=null==r||null===(t=r.textContent)||void 0===t?void 0:t.trim();if(!a)return null;const o=i.querySelector("ClickThrough, clickthrough");return{imageSource:a,clickThrough:(null==o||null===(n=o.textContent)||void 0===n?void 0:n.trim())||void 0,clickTrackingURLs:xf(i),impression:kf(e)}}(r)}(t).then(e=>{a!==b.current||A.current||e&&(y(e),c(!0),f(!1),Nf(e.impression))}).catch(()=>{})})()},o=()=>{E()};return e.on(Lh,n),e.on(Sh,n),e.on(Ch,o),()=>{e.off(Lh,n),e.off(Sh,n),e.off(Ch,o)}},[e,t,a,i,r,E]),{isVisible:l,isDismissed:h,pauseAdData:g,dismiss:T}}function Yf(e,t){return!!e.isReady&&(!t||!e.isAutoplay||"paused"===e.playbackState&&0===e.contentTime)}function Qf(e){let t=e.posterPlayVisible,n=e.presentationStarted;return!(t||n)}async function Xf(e){let t=e;if(Pd(t)){const e=await async function(){var e;const t=xd(),n=await Od(),i=await Dd("".concat(t,"/live-tv/check-availability/"),Rd(n));if(i.success&&"NOT_AVAILABLE"===i.message)throw new Error(i.message);if(!i.success||"AVAILABLE"!==i.message)throw new Error(i.message||"Local live TV is not available");const r=function(e){const t=Object.keys(e);if(0===t.length)return null;if(1===t.length)return t[0];const n=kd("localTvSlug");if(n){const e=t.find(e=>e.toLowerCase()===n.toLowerCase());if(e)return e}return[...t].sort()[0]}(null!==(e=i.stations)&&void 0!==e?e:{});if(!r||!i.stations||!i.media)throw new Error("No local stations available");const o=a(a({},Rd(n)),{},{station:i.stations[r],media:i.media[r],tk_vid:Nd()}),s=await Dd("".concat(t,"/live-tv/stream-info/"),o);return s.success&&s.url||function(e){const t=xd();switch(e){case"MVPD":case"UPSELL":window.location.assign("".concat(t,"/live-tv/stream/tveverywhere/"));break;case"ACCESS_DENIED":window.location.assign("".concat(t,"/live-tv/"));break;default:throw new Error(e||"Unable to load local live stream")}throw new Error(e||"Unable to load local live stream")}(s.message),s.url}();t=a(a({},t),{},{assetURL:e})}if(zd(t)&&(t=Qd(t,await oh(t))),ih(t)){const e=await async function(e){const t=await Promise.all([oh(e),rh()]),n=(0,x.A)(t,2),i=n[0],r=a({},n[1]),o=Jd("usprivacy");return o&&(r.imafw__fw_us_privacy=o),i&&Object.assign(r,i),r}(t);t=Qd(t,e)}return t}function Zf(e){if(!e)return null;const t=[];for(const n of e){if(null==n||!n.stationSlug)continue;const e=n.stationSlug.toUpperCase().replace(/\s+/g,"");e.includes(",")?t.push(...e.split(",").map(e=>
2e.trim()).filter(Boolean)):e&&t.push(e)}return t.length>0?t:null}function Jf(e){if(!e)return null;for(const t of e){const e="string"==typeof(null==t?void 0:t.dma)?t.dma.trim():"";if(e)return e}return null}function $f(e){if(!e)return null;for(const t of e)if("number"==typeof(null==t?void 0:t.stationId))return t.stationId;return null}function ep(e){if(!e)return null;for(const t of e){const e="string"==typeof(null==t?void 0:t.lat)?t.lat.trim():"";if(e)return e}return null}function tp(e){if(!e)return null;for(const t of e){const e="string"==typeof(null==t?void 0:t.long)?t.long.trim():"";if(e)return e}return null}function np(){return function(e,t){if(!e||null==t||!t.lat||null==t||!t.lon)return e;const n=t.lat,i=t.lon;return e.map(e=>a(a({},e),{},{lat:n,long:i}))}(function(){const e=localStorage.getItem("dmaInfo");if("string"!=typeof e)return null;try{const t=JSON.parse(e);return Array.isArray(t)?t:null}catch(e){return console.error('[Unable to parse "dmaInfo" from localStorage]'),null}}(),function(){const e=localStorage.getItem("storageLocation");if("string"!=typeof e)return null;try{const t=JSON.parse(e);return t&&"object"==typeof t?t:null}catch(e){return console.error('[Unable to parse "storageLocation" from localStorage]'),null}}())}function ip(){const e=(0,v.useState)(np),t=(0,x.A)(e,2),n=t[0],i=t[1];return(0,v.useEffect)(()=>{const e=()=>{const e=np();i(t=>JSON.stringify(t)===JSON.stringify(e)?t:e)};return document.addEventListener("CBS:UserDMAInfoReady",e),()=>{document.removeEventListener("CBS:UserDMAInfoReady",e)}},[]),n}function rp(e){const t=(0,v.useState)([]),n=(0,x.A)(t,2),i=n[0],r=n[1],a=(0,v.useState)(),o=(0,x.A)(a,2),s=o[0],l=o[1],c=ip(),u=(0,v.useMemo)(()=>e?function(e,t){const n=new URLSearchParams;for(const e of Object.entries(Ff)){var i=(0,x.A)(e,2);const r=i[0],a=i[1],o=t[r];null!=o&&""!==o&&n.set(a,String(o))}const r=n.toString();if(!r)return e;const a=e.includes("?")?"&":"?";return"".concat(e).concat(a).concat(r)}(e,{dma:Jf(c),stationId:$f(c),lat:ep(c),long:tp(c)}):void 0,[e,c]);return(0,v.useEffect)(()=>{if(!u)return r([]),void l(void 0);let e,t,n=!1;const i=()=>{void 0!==e&&(window.clearTimeout(e),e=void 0)},a=t=>{if(i(),null==t)return void l(void 0);const n=Math.ceil(t/1e3);l(n),e=window.setTimeout(()=>{s()},t)},o=()=>{var e;a(null!==(e=t)&&void 0!==e?e:3e4)},s=async()=>{try{const e=await fetch(u,{cache:"no-cache"});if(n)return;if(304===e.status)return void o();if(!e.ok)return console.error("[CBS Avia Player] programOverlay API request failed:",e.status),void o();const i=await e.json();if(n)return;const s=function(e){if(Mf(e)&&"number"==typeof e.frequency)return Math.max(1e3*e.frequency,5e3)}(i);t=null!=s?s:t;const l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.location.pathname;if(Mf(e)){const n=function(e){const t=e.split("/").filter(Boolean),n=(0,x.A)(t,3),i=n[0],r=n[1],a=n[2];if(i&&r&&a)return"/".concat(i,"/").concat(r,"/").concat(a)}(t);return n?Object.entries(e.data).reduce((e,t)=>{var i;let r=(0,x.A)(t,2),a=r[0],o=r[1];const s=Rf[null==o?void 0:o.channel];return s?(e.push({id:a,href:"".concat(n,"/").concat(a),title:(null===(i=o.segmentTitle)||void 0===i?void 0:i.trim())||s.shortTitle,logo:s.logoUrl,type:"live-linear",locked:!1,rowSlug:s.rowSlug,rowName:s.rowName}),e):e},[]):[]}return Array.isArray(e)?e.filter(e=>!!e&&"object"==typeof e).filter(e=>"string"==typeof e.id&&"string"==typeof e.href&&"string"==typeof e.title):[]}((null==i?void 0:i.carouselSlides)||i);r(l),a(null!=s?s:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now();const n=t+6e4,i=t+864e5;let r;for(const t of e){const e=t.endTimestamp;"number"!=typeof e||e<=n||e>i||(null==r||e<r)&&(r=e)}return null==r?void 0:r-t}(l))}catch(e){n||(console.error("[CBS Avia Player] programOverlay API request failed:",e),o())}};return s(),()=>{n=!0,i()}},[u]),{rows:i,refetchInSeconds:s}}const ap=new Set(["description","alternate","alternative"]);function op(e){var t,n;const i=function(e){return e.trim().toLowerCase().replace(/_/g,"-")}(null!==(t=null===(n=e.track)||void 0===n?void 0:n.language)&&void 0!==t?t:e.label);return"en"===i||"en-us"===i?1:e.label.toLowerCase()}function sp(e){var t,n;let i=(null===(t=e.language)||void 0===t?void 0:t.trim())||"";"english ad"===i.toLowerCase()&&(i="en");let r=Ad(a(a({},e),{},{language:i}));const o=null===(n=e.type)||void 0===n?void 0:n.toLowerCase();return o&&ap.has(o)&&(r+=" AD"),r}function lp(e){return e.filter(e=>{var t;return Boolean(null==e||null===(t=e.language)||void 0===t?void 0:t.trim())}).map(e=>({id:e.id,label:sp(e),track:e})).sort((e,t)=>
2{const n=op(e),i=op(t);return"number"==typeof n&&"number"==typeof i?n-i:String(n).localeCompare(String(i))})}const cp=["texttrackchange","texttrackschange","texttrackenabledchange"],up=["audiotrackchange","audiotrackschange"];let dp=null,hp=a({},{isCasting:!1,isAvailable:!1,showSpinner:!1}),fp=!1,pp=null;function mp(){return window}function gp(e){var t;hp=a(a({},hp),e),null===(t=dp)||void 0===t||t.onStateChange(hp)}function vp(e){var t,n;const i=mp(),r=function(e){var t;return(null===(t=e.jsNS)||void 0===t?void 0:t.trim())||"smartTagAPI"}(e),a=i[r];if(null!=a&&a.CastNS&&null!=a&&a.CastToLocalAdapter)return a;const o={CastNS:null!==(t=null==a?void 0:a.CastNS)&&void 0!==t?t:{},CastToLocalAdapter:null!==(n=null==a?void 0:a.CastToLocalAdapter)&&void 0!==n?n:new Ap};return i[r]=o,o}function yp(e){if(!1===(null==e?void 0:e.chromecast))return!1;if("undefined"==typeof window)return!1;const t=navigator.userAgent;return!(!/chrome/i.test(t)&&!/edg\//i.test(t))&&!!mp().Chromecast}function bp(e){var t,n;const i=mp();i.SmartTag=null!==(t=i.SmartTag)&&void 0!==t?t:{list:[]},i.SmartTag.list[0]=null!==(n=i.SmartTag.list[0])&&void 0!==n?n:{},i.SmartTag.list[0].params=function(e){var t,n,i,r,o,s,l,c,u,d,h,f,p,m,g,v,y,b,A,E,T,w,S,C,k,x,N,_,I,O,D,R,P,L,M,F,U,B,j,V,H,z,K,W,G,q,Y,Q,X,Z,J;const $=mp(),ee=a(a({},null!==(t=e.metaData)&&void 0!==t?t:{}),{},{contentId:null!==(n=null!==(i=null===(r=e.apiMetadata)||void 0===r?void 0:r.contentId)&&void 0!==i?i:null===(o=e.metaData)||void 0===o?void 0:o.contentId)&&void 0!==n?n:e._contentID,mediaType:null!==(s=null===(l=e.apiMetadata)||void 0===l?void 0:l.mediaType)&&void 0!==s?s:null===(c=e.metaData)||void 0===c?void 0:c.mediaType,videoProperties:null!==(u=null===(d=e.apiMetadata)||void 0===d?void 0:d.videoProperties)&&void 0!==u?u:null===(h=e.metaData)||void 0===h?void 0:h.videoProperties,daistreamKey:null!==(f=null===(p=e.apiMetadata)||void 0===p?void 0:p.daistreamKey)&&void 0!==f?f:null===(m=e.metaData)||void 0===m?void 0:m.daistreamKey,pid:null!==(g=null===(v=e.apiMetadata)||void 0===v?void 0:v.pid)&&void 0!==g?g:null===(y=e.metaData)||void 0===y?void 0:y.pid,fullEpisode:null!==(b=null===(A=e.apiMetadata)||void 0===A?void 0:A.fullEpisode)&&void 0!==b?b:null===(E=e.metaData)||void 0===E?void 0:E.fullEpisode});return{USER:{userStatus:null!==(T=null!==(w=e.userStatus)&&void 0!==w?w:null===(S=$.CBS)||void 0===S||null===(C=S.Registry)||void 0===C||null===(k=C.user)||void 0===k?void 0:k.sb)&&void 0!==T?T:"",bundleStatus:null!==(x=e.bundleStatus)&&void 0!==x?x:"",packageSource:null!==(N=e.packageSource)&&void 0!==N?N:"",userId:null!==(_=null===(I=$.CBS)||void 0===I||null===(O=I.Registry)||void 0===O||null===(D=O.user)||void 0===D?void 0:D.id)&&void 0!==_?_:"",profileId:null!==(R=null===(P=$.CBS)||void 0===P||null===(L=P.Registry)||void 0===L||null===(M=L.user)||void 0===M?void 0:M.profile_id)&&void 0!==R?R:"",mvpdId:null!==(F=e.mvpdId)&&void 0!==F?F:"",pinGate:null!==(U=e.pinCheck)&&void 0!==U&&U},CONTENT:{metadata:[ee],apiMetadata:null!==(B=e.apiMetadata)&&void 0!==B?B:{},refIdForCast:null!==(j=null!==(V=e._contentID)&&void 0!==V?V:null===(H=e.apiMetadata)||void 0===H?void 0:H.contentId)&&void 0!==j?j:"",assetURL:null!==(z=e.assetURL)&&void 0!==z?z:"",drm:null!==(K=e.drm)&&void 0!==K?K:{enabled:!1},autoplay:null!==(W=e.autoPlayVid)&&void 0!==W&&W,globalResumeTime:e.isLive?Number.NaN:null!==(G=e.grestime)&&void 0!==G?G:0,partner:null!==(q=e.partner)&&void 0!==q?q:"",country:null!==(Y=e.userCountry)&&void 0!==Y?Y:"",isLive:!!e.isLive,stationName:null!==(Q=null===(X=e.metaData)||void 0===X?void 0:X.channelName)&&void 0!==Q?Q:null},CONTEXT:{metadata:null!==(Z=$.utag_data)&&void 0!==Z?Z:{}},SKIN:{cp:{enabled:null!==(J=e.enableCP)&&void 0!==J&&J}}}}(e)}class Ap{ready(){}enable(){gp({isAvailable:!0})}disable(){gp({isAvailable:!1})}connect(){gp({isCasting:!0,showSpinner:!0}),this.notifyCastUiReady()}start(){gp({isCasting:!0,showSpinner:!0}),this.notifyCastUiReady()}notifyCastUiReady(){var e;const t=Ep(null===(e=dp)||void 0===e?void 0:e.playerData),n=null==t?void 0:t.uiReady;"function"==typeof n&&queueMicrotask(()=>n())}end(){var e,t;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;const i=null!==(e=null===(t=dp)||void 0===t?void 0:t.getPlayer())&&void 0!==e?e:null;i&&Number.isFinite(n)&&n>0&&i.seek(n).catch(()=>{}),gp({isCasting:!1,showSpinner:!1,deviceName:void 0,metadata:void 0,playerState:void 0,position:void 0,duration:void 0})}initialize(e,t,n,i){gp({isCasting:!0,deviceName:t,duration:n,showSpinner:!0})}metadata(e){gp({metadata:e})}playbackProgress(e,t){gp({position:e,duration:t})}playerState(e){const t=null!=e?e:"IDLE";gp({playerState:t,showSpinner:"IDLE"===t||"BUFFERING"===t})}contentStart(){gp({showSpinner:!1})}adBreakStart(){gp({showSpinner:!1})}adBreakEnd(){gp({showSpinner:!1})}adBreaks(){}mediaTracks(){}setAudioTrack(){}setCaptions(){}setStreamType(){}preCastHandler(){}getCurrentTime(){var e,t,n;return null!==(e=null===(t=dp)||void 0===t||null===(n=t.getPlayer())||void 0===n?void 0:n.contentTime)&&void 0!==e?e:0}getCurrentTimeObject(){var e,t;return function(e){var t,n,i,r,a,o,s;if(!e)return{streamTime:0,contentTime:0,playbackTime:0,liveStreamUtcTime:0,liveStreamUtcDuration:0,liveStreamUtcStart:0};const l=e;return{streamTime:null!==(t=null!==(n=l.streamTime)&&void 0!==n?n:l.contentTime)&&void 0!==t?t:0,contentTime:null!==(i=l.contentTime)&&void 0!==i?i:0,playbackTime:null!==(r=l.playbackTime)&&void 0!==r?r:0,liveStreamUtcTime:null!==(a=l.liveStreamUtcTime)&&void 0!==a?a:0,liveStreamUtcDuration:null!==(o=l.liveStreamUtcDuration)&&void 0!==o?o:0,liveStreamUtcStart:null!==(s=l.liveStreamUtcStart)&&void 0!==s?s:0}}(null!==(e=null===(t=dp)||void 0===t?void 0:t.getPlayer())&&void 0!==e?e:null)}getGlobalResumeTime(){var e;const t=null===(e=dp)||void 0===e?void 0:e.playerData.grestime;return Number.isFinite(t)?Number(t):0}getSoundSettings(){var e;const t=null===(e=dp)||void 0===e?void 0:e.getPlayer();return{mute:!(null==t||!t.muted),volume:Number.isFinite(null==t?void 0:t.volume)?Number(null==t?void 0:t.volume):1,audioTrack:{}}}getCaptionsInfo(){return{language:"",customData:{}}}getAudioTrackInfo(){return{language:"en",roles:[]}}mute(){gp({})}unmute(){gp({})}volumeUpdate(){gp({})}}function Ep(e){var t;const n=null!=e?e:null===(t=dp)||void 0===t?void 0:t.playerData;return n?vp(n).CastNS:null}function Tp(e){var t;const n=[];
2null===(t=e.subratings)||void 0===t||t.forEach(e=>{var t,i;const r=(null===(t=e.description)||void 0===t?void 0:t.trim())||(null===(i=e.code)||void 0===i?void 0:i.trim());r&&n.push(r)});let i=n.join(", ");const r=e.secondaryDescriptors;if("string"==typeof r){const e=r.trim();i=i?"".concat(i,", ").concat(e):e}return i||void 0}function wp(e){let t=e.parsedData;const n=(0,v.useMemo)(()=>function(e){var t,n;const i=e.apiMetadata,r=e.liveStreamMetadata,a=e.metaData,o=function(e,t){if(null==t||!t.length)return;const n=null==e?void 0:e.trim().toUpperCase();if(n){const e=t.find(e=>{var t;return(null===(t=e.region)||void 0===t?void 0:t.trim().toUpperCase())===n});if(e)return e}return 1===t.length?t[0]:void 0}(e.userCountry,null!==(t=null!==(n=null==i?void 0:i.regionalRatings)&&void 0!==n?n:null==a?void 0:a.regionalRatings)&&void 0!==t?t:null==r?void 0:r.regionalRatings);if("string"==typeof(null==o?void 0:o.rating))return{rating:o.rating.trim(),guidance:Tp(o)};const s=(null==i?void 0:i.rating)||(null==a?void 0:a.rating)||(null==r?void 0:r.rating);return s?{rating:s.trim().toUpperCase()}:void 0}(t),[t]);return n?(0,wn.jsx)("div",{className:"cbs-avia-chrome__rating-view cbs-avia-chrome__rating-view--static","aria-label":n.guidance?"Rating ".concat(n.rating,", ").concat(n.guidance):"Rating ".concat(n.rating),children:(0,wn.jsxs)("div",{className:"cbs-avia-chrome__rating-badge",children:[(0,wn.jsx)("span",{className:"cbs-avia-chrome__rating-string",children:n.rating}),n.guidance&&(0,wn.jsxs)(wn.Fragment,{children:[(0,wn.jsx)("span",{className:"cbs-avia-chrome__rating-divider","aria-hidden":"true"}),(0,wn.jsx)("span",{className:"cbs-avia-chrome__rating-guidance",children:n.guidance})]})]})}):null}function Sp(e){var t,n,i,r;const o=(0,v.useMemo)(()=>function(e){const t=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if("undefined"!=typeof document){const t=document.createElement("textarea");return t.innerHTML=e,t.value}return e.replace(/&/g,"&").replace(/"/g,'"').replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}(e);return JSON.parse(t)}(e.data),[e.data]),s=function(e){const t=(0,v.useState)(e),n=(0,x.A)(t,2),i=n[0],r=n[1],a=(0,v.useState)(!1),o=(0,x.A)(a,2),s=o[0],l=o[1],c=(0,v.useState)(null),u=(0,x.A)(c,2),d=u[0],h=u[1];return(0,v.useEffect)(()=>{d&&"NOT_AVAILABLE"!==d.message&&console.error("[CBS Avia Player] Failed to prepare player data:",d)},[d]),(0,v.useEffect)(()=>{let t=!1;return Pd(e)||(zd(e)||ih(e))&&"localhost:3000"!==window.location.host?(l(!1),h(null),Xf(e).then(e=>{t||(r(e),l(!0))}).catch(e=>{t||(h(e instanceof Error?e:new Error(String(e))),l(!0))}),()=>{t=!0}):(r(e),h(null),void l(!0))},[e]),{playerData:i,ready:s,error:d}}(o),l=s.playerData,c=s.ready,u=s.error,d=(0,v.useMemo)(()=>yp(l),[l]),h=(0,v.useMemo)(()=>function(e){var t,n;return(null===(t=e.apiMetadata)||void 0===t||null===(n=t.seriesTitle)||void 0===n?void 0:n.trim())||void 0}(o),[o]),f=(0,v.useMemo)(()=>function(e){var t;const n=e.apiMetadata;if(!n)return;const i=[],r=null!=n.seasonNum?String(n.seasonNum).trim():"",a=null!=n.episodeNum?String(n.episodeNum).trim():"";r&&i.push("S".concat(r)),a&&i.push("E".concat(a));const o=i.join(" "),s=null===(t=n.title)||void 0===t?void 0:t.trim();return o||s?[o,s].filter(Boolean).join(" "):void 0}(o),[o]),p=(0,v.useMemo)(()=>({focusManagerEnabled:!1,seekIncrement:10,showAdControlsOnAdSegmentStart:!1,compactViewBreakpoint:-1,theme:{cssVars:gh}}),[]),m=(0,v.useMemo)(()=>zd(l),[l]),g=(0,v.useMemo)(()=>ih(l),[l]),y=(0,v.useMemo)(()=>l.isLive,[l]),b=(0,v.useMemo)(()=>Fh(l),[l]),A=(0,v.useMemo)(()=>function(e){var t,n,i,r,a;return null!==(t=null!==(n=null===(i=e.apiMetadata)||void 0===i?void 0:i.playbackEvents)&&void 0!==n?n:null===(r=e.metaData)||void 0===r?void 0:r.playbackEvents)&&void 0!==t?t:null===(a=e.liveStreamMetadata)||void 0===a?void 0:a.playbackEvents}(o),[o]),E=(0,v.useMemo)(()=>function(e){var t,n,i,r,o,s,l,c,u;const d=function(e){var t,n,i,r,a,o;const s=null===(t=e.apiMetadata)||void 0===t?void 0:t.thumbnail;return"string"==typeof s&&s.trim()?s.trim():(null===(n=e.metaData)||void 0===n||null===(i=n.thumbnail)||void 0===i||null===(r=i.url)||void 0===r?void 0:r.trim())||(null===(a=e.metaData)||void 0===a||null===(o=a.previewImageURL)||void 0===o?void 0:o.trim())||void 0}(e),h=(null===(t=e.assetURL)||void 0===t?void 0:t.trim())||(null===(n=e.apiMetadata)||void 0===n||null===(i=n.streamingUrl)||void 0===i?void 0:i.trim())||(null===(r=e.apiMetadata)||void 0===r||null===(o=r.liveStreamingUrl)||void 0===o?void 0:o.trim())||(null===(s=e.millstone)||void 0===s||null===(l=s.streamingUrl)||void 0===l?void 0:l.trim());if(!h)throw new Error("CbsAviaPlayer: data.mediaUrl is required");const f=null===(c=e.apiMetadata)||void 0===c||null===(u=c.closedCaptionUrl)||void 0===u?void 0:u.trim(),p={location:a(a(a({mediaUrl:h},d?{posterImageUrl:d}:{}),f?{textTrackUrl:f}:{}),null!=e.drm?{drm:e.drm}:{})};var m;zd(e)&&!e.isLive&&(p.ad={csai:lh(e),viewabilityTracking:{partner:(null===(m=e.partner)||void 0===m?void 0:m.trim())||"cbs"}}),ih(e)&&(p.ad={ssai:ch(e)});const g=hh(e);return g>0&&(p.playback=a(a({},p.playback),{},{startTime:g})),function(e,t){const n=function(e){var t,n,i,r,a;const o={},s=fh(),l=e.isLive?e.liveStreamMetadata:e.metaData;l&&"object"==typeof l&&Object.assign(o,l),e.apiMetadata&&"object"==typeof e.apiMetadata&&Object.assign(o,e.apiMetadata),null!=s&&s.utag_data&&"object"==typeof s.utag_data&&Object.assign(o,s.utag_data);const c=e._contentID||(null===(t=e.apiMetadata)||void 0===t?void 0:t.contentId)||
2(null===(n=e.metaData)||void 0===n?void 0:n.contentId)||(null==s||null===(i=s.utag_data)||void 0===i?void 0:i.videoId);"string"==typeof c&&c.trim()&&(o.videoId=c.trim(),o.contentId=c.trim());const u=(null===(r=e.apiMetadata)||void 0===r?void 0:r.title)||(null===(a=e.metaData)||void 0===a?void 0:a.videoTitle)||e._videoTitle;var d;return"string"==typeof u&&u.trim()&&(null!==(d=o.videoTitle)&&void 0!==d||(o.videoTitle=u.trim())),uh(e)&&(o.fullEpisode=!0),dh(e)&&(o.episodeFlag=!0,o.mediaResume=hh(e)>0?"true":"false"),o}(t);return e.metadata=a(a(a({},n),e.metadata),{},{deviceCategory:"WEB",frameworkName:"CbsAviaPlayer",frameworkVersion:"2.60.0"}),e}(p,e)}(l),[l]),T=(0,v.useMemo)(()=>Pd(o)&&!c&&!u,[o,u,c]),w=rp(o.programOverlayAPIUrl).rows,S=(0,v.useRef)(null),C=(0,v.useRef)(null),k=(0,v.useRef)(!1),N=(0,v.useRef)(!1),_=(0,v.useRef)(!1),I=(0,v.useRef)(!1),O=(0,v.useRef)(!1),D=(0,v.useRef)(!1),R=(0,v.useRef)(null),P=(0,v.useState)(null),L=(0,x.A)(P,2),M=L[0],F=L[1],U=(0,v.useState)(()=>hp),B=(0,x.A)(U,2),j=B[0],V=B[1],H=(0,v.useState)(!1),z=(0,x.A)(H,2),K=z[0],W=z[1],G=(0,v.useState)(null),q=(0,x.A)(G,2),Y=q[0],Q=q[1],X=(0,v.useState)(!1),Z=(0,x.A)(X,2),J=Z[0],$=Z[1],ee=(0,v.useState)("rating"),te=(0,x.A)(ee,2),ne=te[0],ie=te[1],re=(0,v.useState)(!1),ae=(0,x.A)(re,2),oe=ae[0],se=ae[1],le=(0,v.useState)(null),ce=(0,x.A)(le,2),ue=ce[0],de=ce[1],he=(0,v.useState)(10),fe=(0,x.A)(he,2),pe=fe[0],me=fe[1],ge=function(){const e=(0,v.useState)(()=>!function(){var e;return Boolean("undefined"!=typeof window&&(null===(e=window.__CBS_AVIA_TRACKING_SCRIPT_URL__)||void 0===e?void 0:e.trim()))}()||ph()),t=(0,x.A)(e,2),n=t[0],i=t[1];return(0,v.useEffect)(()=>{if(n)return;const e=window.setInterval(()=>{ph()&&i(!0)},100),t=window.setTimeout(()=>{i(!0)},2e4);return()=>{window.clearInterval(e),window.clearTimeout(t)}},[n]),n}(),ve=ge&&c&&!u,ye=!ve||ve&&!M,be=function(e,t,n){const i=(0,v.useState)(!1),r=(0,x.A)(i,2),a=r[0],o=r[1],s=(0,v.useState)(!1),l=(0,x.A)(s,2),c=l[0],u=l[1],d=(0,v.useRef)(!1);return(0,v.useEffect)(()=>{o(!1),u(!1),d.current=!1},[t]),(0,v.useEffect)(()=>{a&&!d.current&&u(!1),d.current=a},[a]),(0,v.useEffect)(()=>{if(e)return function(e,t,n){const i=()=>{n.onPosterPlayVisibleChange(Yf(e,t))},r=()=>i(),a=()=>{queueMicrotask(i)},o=()=>n.onPosterPlayVisibleChange(!0),s=()=>n.onPresentationStart(),l=i=>{var r,a;t&&"paused"===(null!==(r=i.playbackState)&&void 0!==r?r:null===(a=i.detail)||void 0===a?void 0:a.playbackState)&&Yf(e,t)&&n.onPosterPlayVisibleChange(!0)},c=e=>{(function(e){var t;return"posterplay"===(null===(t=e.detail)||void 0===t?void 0:t.type)})(e)&&n.onPosterPlayVisibleChange(!1)};return e.on(Rh,r),e.on(xh,a),e.on(wh,s),e.on(Dh,s),e.on(Ph,o),e.on(Nh,l),e.on(Lh,c),e.isReady&&t&&i(),()=>{e.off(Rh,r),e.off(xh,a),e.off(wh,s),e.off(Dh,s),e.off(Ph,o),e.off(Nh,l),e.off(Lh,c)}}(e,n,{onPosterPlayVisibleChange:o,onPresentationStart:()=>u(!0)})},[e,t,n]),{showWaitingLoader:Qf({posterPlayVisible:a,presentationStarted:c}),posterPlayVisible:a}}(M,E,!!o.autoPlayVid),Ae=be.showWaitingLoader,Ee=be.posterPlayVisible,Te=function(e){const t=(0,v.useState)(Gf),n=(0,x.A)(t,2),i=n[0],r=n[1];return(0,v.useEffect)(()=>{if(!e)return void r(Gf);let t=null,n=0,i=0;const o=o=>{const s=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const i=null==t?void 0:t.currentTime,r=null==t?void 0:t.duration,a=e.adTime,o=e.adDuration,s=null!=i&&Number.isFinite(i)?Math.max(0,i):null!=a&&Number.isFinite(a)?Math.max(0,a):0;let l=0;return null!=r&&Number.isFinite(r)&&r>0?l=r:null!=o&&Number.isFinite(o)&&o>0?l=o:n>0&&(l=n),{currentAdTimeSeconds:s,currentAdDurationSeconds:l}}(e,o,i);s.currentAdDurationSeconds>0&&(i=s.currentAdDurationSeconds);const l=function(e){const t=e.breakDuration,n=e.breakTime,i=e.breakTotal,r=e.currentAdTime;let a=0,o=0;if(null!=i&&i>0)a=i,o=e.completedAdsDuration+(null!=r&&Number.isFinite(r)?r:0);else{if(!(Number.isFinite(t)&&t>0&&null!=n&&Number.isFinite(n)))return null;a=t,o=n}const s=Math.max(0,a-o);return{remainingSeconds:Math.max(0,Math.ceil(s)),progress:a>0?Math.min(1,Math.max(0,s/a)):0}}({breakDuration:e.breakDuration,breakTime:e.breakTime,breakTotal:t,completedAdsDuration:n,currentAdTime:e.adTime});r(e=>l?e.remainingSeconds-l.remainingSeconds>10?a(a({},e),{},{remainingSeconds:e.remainingSeconds-1},s):a({isAdBreak:!0,remainingSeconds:l.remainingSeconds,progress:l.progress},s):e.isAdBreak?a(a({},e),{},{isAdBreak:!0},s):e)},s=()=>{n=0,i=0,r({isAdBreak:!0,remainingSeconds:0,progress:0,currentAdTimeSeconds:0,currentAdDurationSeconds:0})},l=e=>{var n,i;const r=null===(n=e.detail)||void 0===n?void 0:n.adBreakInfo,a=null!==(i=null==r?void 0:r.duration)&&void 0!==i?i:null==r?void 0:r.adBreakDuration;null!=a&&Number.isFinite(a)&&a>0&&(t=a,o())},c=e=>{i=0,o(e.detail)},u=e=>{o(e.detail)},d=()=>{const t=e.adDuration;null!=t&&Number.isFinite(t)&&t>0&&(n+=t),i=0,o()},h=()=>{t=null,n=0,i=0,r(Gf)};return e.on(bh,s),e.on(yh,l),e.on(wh,c),e.on(Th,u),e.on(Ah,d),e.on(vh,h),()=>{e.off(bh,s),e.off(yh,l),e.off(wh,c),e.off(Th,u),e.off(Ah,d),e.off(vh,h)}},[e]),i}(M),we=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=(0,v.useState)(null),r=(0,x.A)(i,2),a=r[0],o=r[1],s=n.isAdBreak,l=void 0!==s&&s,c=n.isLive,u=void 0!==c&&c;return(0,v.useEffect)(()=>
2{if(!e||u||l||!t)return void o(null);const n=()=>{const n=function(e,t,n){if(!n||!Number.isFinite(e)||!Number.isFinite(t)||t<=0)return null;const i=ef(n.openCreditStartTime),r=ef(n.openCreditEndTimeMs);if(null!=i&&null!=r&&e>i&&e<r)return{type:$h.OPEN_CREDITS,seekTargetSeconds:r};const a=ef(n.previewStartTimeMs),o=ef(n.previewEndTimeMs);return null!=a&&null!=o&&e>a&&e<o?{type:$h.PREVIEW,seekTargetSeconds:o}:null}(e.contentTime,e.contentDuration,t);o(e=>(null==e?void 0:e.type)===(null==n?void 0:n.type)&&(null==e?void 0:e.seekTargetSeconds)===(null==n?void 0:n.seekTargetSeconds)?e:n)};return n(),e.on(kh,n),e.on(xh,n),()=>{e.off(kh,n),e.off(xh,n)}},[e,t,l,u]),a}(M,A,{isAdBreak:Te.isAdBreak,isLive:!!y}),Se=function(e,t){var n;let i=t.isAdBreak,r=t.isLive,o=t.playerData;const s=(0,v.useState)(!1),l=(0,x.A)(s,2),c=l[0],u=l[1],d=(0,v.useState)([{id:gd,label:"Off"}]),h=(0,x.A)(d,2),f=h[0],p=h[1],m=(0,v.useState)(gd),g=(0,x.A)(m,2),y=g[0],b=g[1],A=(0,v.useState)([]),E=(0,x.A)(A,2),T=E[0],w=E[1],S=(0,v.useState)(""),C=(0,x.A)(S,2),k=C[0],N=C[1],_=(0,v.useRef)(!1),I=(0,v.useRef)(!1);(0,v.useEffect)(()=>{if(c)return I.current=!0,void setTimeout(()=>{const e=document.querySelector(".cbs-avia-subtitles-overlay");e instanceof HTMLElement&&e.focus()},100);I.current&&setTimeout(()=>{const e=document.querySelector(".avia-container");e instanceof HTMLElement&&e.focus()},100)},[c]);const O=(0,v.useCallback)(e=>{var t,n;const i=null!==(t=e.textTracks)&&void 0!==t?t:[];var r,a;p(function(e){const t=e.filter(e=>{var t;return Boolean(null==e||null===(t=e.language)||void 0===t?void 0:t.trim())}).map(e=>({id:e.id,label:Ad(e),track:e}));return[{id:gd,label:"Off"},...t].sort((e,t)=>{const n=Ed(e),i=Ed(t);return"number"==typeof n&&"number"==typeof i?n-i:String(n).localeCompare(String(i))})}(i)),b((r=e.textTrackEnabled,a=e.textTrack,r&&null!=a&&a.id?a.id:gd));const o=null!==(n=e.audioTracks)&&void 0!==n?n:[];w(lp(o)),N(function(e){var t;return null!==(t=null==e?void 0:e.id)&&void 0!==t?t:""}(e.audioTrack))},[]);(0,v.useEffect)(()=>{if(!e)return p([{id:gd,label:"Off"}]),b(gd),w([]),N(""),_.current=!1,void u(!1);O(e);const t=()=>O(e);return cp.forEach(n=>{e.on(n,t)}),up.forEach(n=>{e.on(n,t)}),e.on(xh,t),()=>
2{cp.forEach(n=>{e.off(n,t)}),up.forEach(n=>{e.off(n,t)}),e.off(xh,t)}},[e,O]),(0,v.useEffect)(()=>{i&&c&&(_.current=!1,u(!1))},[i,c]);const D=(0,v.useCallback)(()=>{e&&!i&&(_.current=!0,u(!0),O(e),function(e){rf("trackPlayerSettings",cf(e))}(o),r||"playing"===e.playbackState&&e.pause())},[e,i,r,o,O]),R=(0,v.useCallback)(()=>{_.current=!1,u(!1),e&&!r&&e.play()},[e,r]),P=(0,v.useCallback)(t=>{var n;if(!e)return;if(t===gd)return e.textTrackEnabled=!1,b(gd),void ff(o,"off");const i=null===(n=e.textTracks)||void 0===n?void 0:n.find(e=>e.id===t);if(!i)return;e.textTrack=i,e.textTrackEnabled=!0,b(t);const r=i.label||i.language||t;ff(o,r)},[e,o]),L=(0,v.useCallback)(t=>{var n;if(!e)return;const i=null===(n=e.audioTracks)||void 0===n?void 0:n.find(e=>e.id===t);if(!i)return;e.audioTrack=i,N(t);const r=i.label||i.language||t;!function(e,t){const n=cf(e);rf("trackPlayerAudioLanguage",a({playerAudioLanguage:t.toLowerCase()},n))}(o,r)},[e,o]),M=f.some(e=>e.id!==gd),F=lp(null!==(n=null==e?void 0:e.audioTracks)&&void 0!==n?n:[]).length>1;let U=null;return M&&F?U="Subtitles + Audio":M?U="Subtitles":F&&(U="Audio"),{audioOptions:T,hasTracks:M,hasMultipleAudio:F,isOpen:c,isOpenRef:_,menuLabel:U,options:f,selectedId:y,selectedAudioId:k,open:D,close:R,selectOption:P,selectAudioOption:L}}(M,{isAdBreak:Te.isAdBreak,isLive:!!y,playerData:o}),Ce=!!o.programOverlayAPIUrl&&w.length>0&&c&&!u,ke=oe||Te.isAdBreak,xe=function(e){let t=e.enabled,n=e.hoverAllowed,i=e.isScheduleView,r=void 0!==i&&i;const a=(0,v.useState)(!1),o=(0,x.A)(a,2),s=o[0],l=o[1],c=(0,v.useRef)(void 0),u=(0,v.useState)(null),d=(0,x.A)(u,2),h=d[0],f=d[1],p=(0,v.useCallback)(e=>{f(e)},[]),m=(0,v.useCallback)(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>{l(!1),c.current=void 0},4e3)},[]);return(0,v.useEffect)(()=>()=>{clearTimeout(c.current)},[]),(0,v.useEffect)(()=>{if(!t)return clearTimeout(c.current),void l(!1);const e=()=>{n&&(m(),l(!0))};n||(m(),l(!1));const i=h;if(!i)return m;let a=null,o=null;var u,d;return s?(a=function(e){var t,n;const i=e.closest(".cbs-avia-player-wrapper"),r=null!==(t=null==i?void 0:i.querySelector(".cbs-avia-program-overlay.show"))&&void 0!==t?t:null;return null!==(n=null==r?void 0:r.querySelector(".rows-container"))&&void 0!==n?n:null}(i),o=function(e){var t,n;const i=e.closest(".cbs-avia-player-wrapper"),r=null!==(t=null==i?void 0:i.querySelector(".cbs-avia-program-overlay.show"))&&void 0!==t?t:null;return null!==(n=null==r?void 0:r.querySelector(".schedule-container"))&&void 0!==n?n:null}(i),null===(u=a)||void 0===u||u.addEventListener("mousemove",m),r&&(null===(d=o)||void 0===d||d.addEventListener("mousemove",m))):i.addEventListener("mousemove",e),()=>{var t,n;null===(t=a)||void 0===t||t.removeEventListener("mousemove",m),null===(n=o)||void 0===n||n.removeEventListener("mousemove",m),i.removeEventListener("mousemove",e)}},[m,t,h,n,r,s]),{isVisible:s,hitCaptureRef:p}}({hoverAllowed:ke,enabled:Ce,isScheduleView:K}),Ne=xe.isVisible,_e=qf(M,o,{isAdBreak:Te.isAdBreak,subtitlesOverlayOpenRef:Se.isOpenRef}),Ie=function(e,t){let n=t.isAdBreak,i=t.isSubtitlesOverlayOpen;const r=(0,v.useState)(""),a=(0,x.A)(r,2),o=a[0],s=a[1];return(0,v.useEffect)(()=>{if(!e)return void s("");const t=e=>{const t=e.detail;var n;s((n=null==t?void 0:t.activeCues,Array.isArray(n)&&0!==n.length?n.map(e=>{var t;return null===(t=e.text)||void 0===t?void 0:t.trim()}).filter(Boolean).join("\n"):""))},n=e=>{const t=e.detail;!1===(null==t?void 0:t.textTrackEnabled)&&s("")},i=()=>s("");return e.on(_h,t),e.on(Ih,n),e.on(xh,i),()=>{e.off(_h,t),e.off(Ih,n),e.off(xh,i)}},[e]),(0,v.useEffect)(()=>{(n||i)&&s("")},[n,i]),o}(M,{isAdBreak:Te.isAdBreak,isSubtitlesOverlayOpen:Se.isOpen}),Oe=(0,v.useCallback)(()=>{!function(e){const t=Ep(e),n=null==t?void 0:t.isConnected;return"function"==typeof n?!!n():hp.isCasting}(o)?async function(e,t){if(function(e){const t=Ep(e),n=null==t?void 0:t.requestSession;return"function"==typeof n&&(n(),!0)}(t))return;if(!e)return;const n=e.remotePlayback;if(n&&"function"==typeof n.requestRemotePlayback)try{if("disconnected"===n.state)return void await n.requestRemotePlayback()}catch(e){}const i=e;if("function"==typeof i.webkitShowPlaybackTargetPicker)try{i.webkitShowPlaybackTargetPicker()}catch(e){}}(null==M?void 0:M.video,o):function(e){const t=Ep(e),n=null==t?void 0:t.stopSession;"function"==typeof n&&n()}(o)},[M,o]),De=(0,v.useCallback)(()=>{M&&we&&M.seek(we.seekTargetSeconds).catch(()=>console.error("[CBS Avia Player] Skip seek failed"))},[M,we]),Re=Yh(M),Pe=Yh(M),Le=Yh(M),Me=(0,v.useCallback)(e=>{if(!M)return;const t="ArrowRight"===e.key?1:"ArrowLeft"===e.key?-1:0;t&&(e.preventDefault(),e.stopPropagation(),M.volume=Math.min(1,Math.max(0,M.volume+.05*t)))},[M]);return(0,v.useEffect)(()=>{S.current=M;const e=document.querySelector("avia-ui");if(!e)return;let t=performance.now();function n(e){t=performance.now()}function i(n){e&&!document.hasFocus()&&performance.now()-t<75&&(e.setAttribute("active",""),setTimeout(()=>{e.setAttribute("active","")},50),setTimeout(()=>{e&&!document.hasFocus()&&e.removeAttribute("active")},3e3))}return e.addEventListener("mouseenter",n),e.addEventListener("mouseleave",i),()=>{e&&(e.removeEventListener("mouseenter",n),e.removeEventListener("mouseleave",i))}},[M]),(0,v.useEffect)(()=>{O.current=Te.isAdBreak},[Te.isAdBreak]),(0,v.useEffect)(()=>{_.current=!1},[E]),(0,v.useEffect)(()=>{d&&function(e){var t;if(dp=e,bp(e.playerData),!yp(e.playerData))return()=>{dp===e&&(dp=null)};const n=new Ap;vp(e.playerData).CastToLocalAdapter=n;const i=()=>function(e,t){if(fp)return void bp(e);const n=mp().Chromecast;if(!n)return;const i=vp(e);i.CastToLocalAdapter=t,bp(e),(new n).start(i,null),fp=!0}(e.playerData,n);null!==(t=mp().cast)&&void 0!==t&&t.framework?i():function(){var e;const t=mp();return null!==(e=t.cast)&&void 0!==e&&e.framework?Promise.resolve():pp||(pp=new Promise(e=>{const n=t.__onGCastApiAvailable;if(t.__onGCastApiAvailable=(t,i)=>{null==n||n(t,i),t&&e()}
2,document.querySelector("script[data-cbs-avia-cast-framework]"))return;const i=document.createElement("script");i.src="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1",i.async=!0,i.dataset.cbsAviaCastFramework="1",document.head.appendChild(i)}),pp)}().then(i)}({playerData:o,getPlayer:()=>S.current,onStateChange:V})},[d,o]),(0,v.useEffect)(()=>{d&&function(e){dp&&dp.playerData===e&&bp(e)}(o)},[d,o,M]),(0,v.useEffect)(()=>{const e=M;if(!e)return;const t=()=>{var e;!_.current&&null!==(e=o.apiMetadata)&&void 0!==e&&e.isProductPlacement&&(_.current=!0,function(e){var t,n,i,r,a,o,s,l,c,u,d,h,f,p,m,g,v,y,b,A,E,T,w,S,C;const k=af(e),x=of(),N=e.apiMetadata;rf("trackProductPlacementWarningView",nf({pageType:null!==(t=x.pageType)&&void 0!==t?t:"video",pageName:null!==(n=x.pageName)&&void 0!==n?n:"",showSeriesId:null!==(i=x.showSeriesId)&&void 0!==i?i:"",showSeriesTitle:null!==(r=null!==(a=null==N?void 0:N.seriesTitle)&&void 0!==a?a:null==k?void 0:k.seriesTitle)&&void 0!==r?r:"",showGenre:null!==(o=null!==(s=x.showGenre)&&void 0!==s?s:null==N?void 0:N.genre)&&void 0!==o?o:"",showEpisodeId:null!==(l=null!==(c=x.showEpisodeId)&&void 0!==c?c:null==N?void 0:N.contentId)&&void 0!==l?l:"",showEpisodeLabel:null!==(u=null!==(d=x.showEpisodeTitle)&&void 0!==d?d:null==N?void 0:N.title)&&void 0!==u?u:"",showSeasonNumber:null!==(h=null==N?void 0:N.seasonNum)&&void 0!==h?h:"",showEpisodeNumber:null!==(f=null==N?void 0:N.episodeNum)&&void 0!==f?f:"",movieId:null!==(p=null!==(m=x.videoId)&&void 0!==m?m:e._contentID)&&void 0!==p?p:"",movieTitle:null!==(g=null!==(v=null!==(y=x.videoTitle)&&void 0!==y?y:null==N?void 0:N.title)&&void 0!==v?v:null==k?void 0:k.videoTitle)&&void 0!==g?g:"",movieGenre:null!==(b=null!==(A=x.showGenre)&&void 0!==A?A:null==N?void 0:N.genre)&&void 0!==b?b:"",liveTvChannel:null!==(E=null!==(T=x.liveTvChannel)&&void 0!==T?T:null==k?void 0:k.channelName)&&void 0!==E?E:"",stationCode:null!==(w=x.stationCode)&&void 0!==w?w:"",currentListingTitle:null!==(S=null!==(C=null==N?void 0:N.title)&&void 0!==C?C:null==k?void 0:k.videoTitle)&&void 0!==S?S:""}))}(o))},n=e=>{var t;"boolean"==typeof(null==e||null===(t=e.detail)||void 0===t?void 0:t.fullscreen)&&(function(e,t){rf(t?"trackPlayerSFullscreenOn":"trackPlayerSFullscreenOff",cf(e))}(o,e.detail.fullscreen),window.dispatchEvent(new Event("resize")))},i=()=>{g&&e.play().catch(()=>{})};return e.on(Eh,i),e.on(Dh,t),e.on(Oh,n),()=>{e.off(Eh,i),e.off(Dh,t),e.off(Oh,n)}},[M,g,o,E]),(0,v.useEffect)(()=>{const e=R.current;Q(e&&M?e.querySelector(".avia-container"):null)},[E,M]),(0,v.useEffect)(()=>{if(Y)return Ce?(Ne?Y.setAttribute("overlay","open"):(Y.removeAttribute("overlay"),Y.removeAttribute("open")),Y.setAttribute("data-overlay-hover",ke?"allowed":"disabled"),()=>{Y.removeAttribute("overlay"),Y.removeAttribute("data-overlay-hover")}):(Y.removeAttribute("overlay"),Y.removeAttribute("open"),void Y.removeAttribute("data-overlay-hover"))},[Ce,Y,ke,Ne]),(0,v.useEffect)(()=>{function e(e){var t,n;const i=e.detail;if(null!=i&&i.success&&null!=i&&null!==(t=i.result)&&void 0!==t&&null!==(n=t.apiResponse)&&void 0!==n&&n[0]){if(I.current)return window.location.href=i.result.apiResponse[0].videoPageURL;const e=S.current?Uh(S.current):null,t=null!==e?Math.max(1,Math.floor(e)):10;de(i.result.apiResponse[0]),me(t),$(!0)}}return document.addEventListener("CBS:NextVideoResponse",e),()=>{document.removeEventListener("CBS:NextVideoResponse",e)}},[]),(0,v.useEffect)(()=>{const e=M;if(!e||y)return;k.current=!1;const t=()=>{k.current=!1},n=()=>{const t=e.contentDuration;if(!Number.isFinite(t)||t<=0)return;const n=Uh(e);null===n||n>10?k.current=!1:k.current||(k.current=!0,document.dispatchEvent(new CustomEvent("CBS:NextVideoRequest")))};return e.on(xh,t),e.on(kh,n),()=>{e.off(xh,t),e.off(kh,n)}},[M,y,E]),(0,v.useEffect)(()=>{const e=R.current;if(!e)return;const t=window.setTimeout(()=>{e.querySelectorAll("avia-button").forEach(e=>{e.removeAttribute("title")})},1e3);return()=>{window.clearTimeout(t)}},[E]),(0,v.useEffect)(()=>{var e;ie("rating"),se(!1);const t=R.current;if(!t)return;const n=null!==(e=C.current)&&void 0!==e?e:t.querySelector(".cbs-avia-chrome");
2if(!n)return;D.current=!1,N.current=!1;const i=e=>{e.target===n&&"opacity"===e.propertyName&&0===parseFloat(getComputedStyle(n).opacity)&&(se(!1),O.current||D.current&&!N.current&&(N.current=!0,ie("metadata")))};n.addEventListener("transitionend",i);const r=()=>{D.current=!1},a=()=>{const e=t.querySelector("avia-ui");var n;e&&"avia-ui"===(n=e).tagName.toLowerCase()&&n.hasAttribute("active")&&"false"!==n.getAttribute("active")&&(O.current||(D.current=!0),se(!0))};let o=null,s=null;const l=e=>{var t;null===(t=o)||void 0===t||t.disconnect(),o=new MutationObserver(a),o.observe(e,{attributes:!0,attributeFilter:["active"]}),a()},c=t.querySelector("avia-ui");c?l(c):(s=new MutationObserver(()=>{const e=t.querySelector("avia-ui");var n;e&&(null===(n=s)||void 0===n||n.disconnect(),s=null,l(e))}),s.observe(t,{childList:!0,subtree:!0}));const u=S.current;return u&&u.on(vh,r),()=>{var e,t;n.removeEventListener("transitionend",i),null===(e=s)||void 0===e||e.disconnect(),null===(t=o)||void 0===t||t.disconnect(),null==u||u.off(vh,r)}},[E,M]),(0,wn.jsxs)("div",{className:["cbs-avia-player-wrapper",y&&"cbs-avia-player-wrapper--live",Te.isAdBreak&&"cbs-avia-player-wrapper--ad-break",_e.isVisible&&"cbs-avia-player-wrapper--pause-ad",_e.isDismissed&&"cbs-avia-player-wrapper--pause-ad-dismissed",Se.isOpen&&"cbs-avia-player-wrapper--subtitles-overlay",j.isCasting&&"cbs-avia-player-wrapper--casting",oe&&"cbs-avia-player-wrapper--ui-active",Ee&&"cbs-avia-player-wrapper--poster-play"].filter(Boolean).join(" "),ref:R,children:["pre"===o.eventStatus&&o.schedule&&(0,wn.jsx)(If,{schedule:o.schedule,eventTitle:o.videoTitle,preGameTitle:o.preGameTitle}),Te.isAdBreak&&(0,wn.jsx)(md,{portalTarget:Y,progress:Te.progress,remainingSeconds:Te.remainingSeconds}),(0,wn.jsx)(mf,{state:j,posterUrl:null!==(t=null===(n=o.apiMetadata)||void 0===n?void 0:n.thumbnail)&&void 0!==t?t:null===(i=o.metaData)||void 0===i||null===(r=i.thumbnail)||void 0===r?void 0:r.url}),ye&&(0,wn.jsx)("div",{className:"cbs-avia-initial-loader",role:"status","aria-live":"polite","aria-label":"Loading video",children:(0,wn.jsx)(dd.AviaSpinner,{})}),T&&(0,wn.jsx)(bf,{}),"NOT_AVAILABLE"===(null==u?void 0:u.message)&&(0,wn.jsx)(Af,{}),ge&&c&&!u&&(0,wn.jsx)(ud,{resource:E,options:b,controls:p,fw:m&&!g,gam:g,hls:!0,onPlayerChange:e=>F(null!=e?e:null),onError:e=>console.error("[CbsAviaPlayer]",e),children:(0,wn.jsxs)(dd.AviaUi,{children:[y?(0,wn.jsx)("span",{slot:"play-overlay","aria-hidden":"true"}):(0,wn.jsxs)(wn.Fragment,{children:[(0,wn.jsx)(dd.AviaWaitingOverlay,{slot:"waiting-overlay",children:Ae&&(0,wn.jsx)("div",{className:"cbs-avia-initial-loader",role:"status","aria-live":"polite","aria-label":"Loading video",children:(0,wn.jsx)(dd.AviaSpinner,{})})}),(0,wn.jsx)(dd.AviaPlayOverlay,{slot:"play-overlay"})]}),(0,wn.jsxs)("div",{ref:C,slot:"settings",className:"cbs-avia-chrome",children:[(0,wn.jsx)("div",{className:"cbs-avia-chrome__left",children:!Te.isAdBreak&&!y&&(0,wn.jsxs)(wn.Fragment,{children:["rating"===ne&&(0,wn.jsx)(wp,{parsedData:o}),"metadata"===ne&&(0,wn.jsxs)("div",{className:"cbs-avia-chrome__meta cbs-avia-chrome__meta--static",children:[h&&(0,wn.jsx)("div",{className:"cbs-avia-chrome__series",children:h}),f&&(0,wn.jsx)("div",{className:"cbs-avia-chrome__episode",children:f})]})]})}),!Te.isAdBreak&&(0,wn.jsxs)("div",{className:"cbs-avia-chrome__icons",children:[j.isAvailable&&(null==M?void 0:M.video)&&(0,wn.jsx)("span",{className:"cbs-avia-tooltip cbs-avia-tooltip--below","data-cbs-avia-tip":j.isCasting?"Stop Casting":"Cast Video",children:(0,wn.jsx)("button",{type:"button",className:["cbs-avia-chrome__cast",j.isCasting&&"cbs-avia-chrome__cast--active"].filter(Boolean).join(" "),"aria-label":j.isCasting?"Stop Casting":"Cast Video","aria-pressed":j.isCasting,ref:Re.ref,onFocus:Re.onFocus,onBlur:Re.onBlur,onClick:Oe,children:(0,wn.jsx)(Bh,{})})}),null!==Se.menuLabel&&(0,wn.jsx)("span",{className:"cbs-avia-tooltip cbs-avia-tooltip--below","data-cbs-avia-tip":Se.menuLabel,children:(0,wn.jsx)("button",{type:"button",className:["cbs-avia-chrome__cc",Se.selectedId!==gd&&"cbs-avia-chrome__cc--active"].filter(
2Boolean).join(" "),"aria-label":Se.menuLabel,"aria-haspopup":"dialog","aria-expanded":Se.isOpen,ref:Pe.ref,onFocus:Pe.onFocus,onBlur:Pe.onBlur,onClick:Se.open,children:(0,wn.jsx)(Kh,{})})})]})]}),(0,wn.jsx)("div",{slot:"control-bar",children:(0,wn.jsxs)(dd.AviaControlBar,{className:"cbs-avia-control-bar avia-layout-c-50",isLiveLinear:y,children:[(0,wn.jsx)("div",{slot:"top",className:"cbs-avia-bar-top".concat(y?" cbs-avia-bar-top--live":""),"aria-hidden":y||void 0,children:y?"â":Te.isAdBreak?(0,wn.jsx)(Jh,{currentTimeSeconds:Te.currentAdTimeSeconds,durationSeconds:Te.currentAdDurationSeconds}):(0,wn.jsxs)(wn.Fragment,{children:[(0,wn.jsxs)("div",{className:"cbs-avia-bar-top__times",children:[(0,wn.jsx)(dd.AviaCurrentTime,{}),(0,wn.jsx)(dd.AviaDuration,{})]}),(0,wn.jsx)("div",{className:"cbs-avia-progress-focus-shell",tabIndex:0,"aria-label":"Video seek bar",children:(0,wn.jsx)(dd.AviaProgressBar,{})})]})}),y?(0,wn.jsxs)("div",{slot:"left",className:"cbs-avia-live-badge","aria-label":"Live",children:[(0,wn.jsx)("span",{className:"cbs-avia-live-badge__dot","aria-hidden":!0}),"Live"]}):(0,wn.jsx)("div",{slot:"left",className:"cbs-avia-slot-spacer",children:"â"}),!y&&(0,wn.jsxs)("div",{slot:"center",className:"cbs-avia-bar-center",children:[Te.isAdBreak?(0,wn.jsx)(dd.AviaSeekBackButton,{seekBackDisabled:!0}):(0,wn.jsx)("span",{className:"cbs-avia-tooltip cbs-avia-tooltip--above","data-cbs-avia-tip":"Rewind 10 Seconds",children:(0,wn.jsx)(dd.AviaSeekBackButton,{})}),(0,wn.jsx)(dd.AviaPlayToggle,{}),Te.isAdBreak?(0,wn.jsx)(dd.AviaSeekForwardButton,{seekForwardDisabled:!0}):(0,wn.jsx)("span",{className:"cbs-avia-tooltip cbs-avia-tooltip--above","data-cbs-avia-tip":"Forward 10 Seconds",children:(0,wn.jsx)(dd.AviaSeekForwardButton,{})})]}),(0,wn.jsxs)("div",{slot:"right",className:"cbs-avia-bar-right",children:[!y&&!Te.isAdBreak&&(0,wn.jsx)("span",{className:"cbs-avia-tooltip cbs-avia-tooltip--above","data-cbs-avia-tip":"Next",children:(0,wn.jsxs)("button",{"aria-label":"Next",type:"button",className:"cbs-avia-next-episode",ref:Le.ref,onFocus:Le.onFocus,onBlur:Le.onBlur,onClick:()=>{I.current=!0,document.dispatchEvent(new CustomEvent("CBS:NextVideoRequest"))},children:[(0,wn.jsx)(Vh,{}),(0,wn.jsx)(Hh,{})]})}),(0,wn.jsxs)("div",{className:"cbs-avia-volume-stack",onKeyDownCapture:Me,children:[(0,wn.jsx)("div",{className:"cbs-avia-volume-stack__popup",children:(0,wn.jsx)(dd.AviaVolumeSlider,{})}),(0,wn.jsx)(dd.AviaMuteToggle,{})]}),(0,wn.jsx)("span",{className:"cbs-avia-tooltip cbs-avia-tooltip--above","data-cbs-avia-tip":"Full Screen",children:(0,wn.jsx)(dd.AviaFullscreenToggle,{})})]})]})})]})}),!y&&!Te.isAdBreak&&we&&!_e.isVisible&&!Se.isOpen&&(0,wn.jsx)(pf,{onClick:De,player:M,playerData:o,sectionType:we.type}),_e.isVisible&&_e.pauseAdData&&(0,wn.jsx)(_f,{data:_e.pauseAdData,player:M,portalTarget:Y,onReturn:_e.dismiss}),J&&ue&&!_e.isVisible&&(0,wn.jsx)(Wf,{close:()=>$(!1),data:ue,initialCount:pe,portalTarget:Y,playerData:o,uiIsActive:oe}),Se.isOpen&&(0,wn.jsx)(Qh,{options:Se.options,selectedId:Se.selectedId,audioOptions:Se.audioOptions,selectedAudioId:Se.selectedAudioId,showAudioColumn:Se.hasMultipleAudio,player:M,portalTarget:Y,onClose:Se.close,onSelect:Se.selectOption,onSelectAudio:Se.selectAudioOption}),Ce&&Y&&(0,wn.jsxs)(wn.Fragment,{children:[(0,wn.jsx)(Kf,{hitCaptureRef:xe.hitCaptureRef,portalTarget:Y}),(0,wn.jsx)(zf,{isScheduleView:K,portalTarget:Y,rows:w,setIsScheduleView:W,visible:Ne})]}),(0,wn.jsx)(Sd,{cueText:Ie,playerRoot:Y})]})}const Cp=JSON.stringify({apiMetadata:{streamingUrl:"https://dai.google.com/linear/hls/event/xrVrJYTmTfitfXBQfeZByQ/master.m3u8",url:"live-tv/stream/cbs-news"},autoPlayVid:!0,isLive:!0,programOverlayAPIUrl:"/live-tv/stream/dataProgramOverlayFAST.json",pid:"fast-channel-pid",liveStreamMetadata:{contentUrl:"live-tv/stream/cbs-news",pid:"fast-channel-pid"},posterImageUrl:null});function kp(){return(0,wn.jsx)("div",{style:{margin:"55px 0"},children:(0,wn.jsx)(Sp,{data:Cp})})}const xp=JSON.stringify({apiMetadata:{streamingUrl:"https://dai.google.com/linear/hls/event/c-rArva4ShKVIAkNfy6HUQ/master.m3u8",daistreamKey:"c-rArva4ShKVIAkNfy6HUQ",url:"live-tv/stream/test-dai-ads"},autoPlayVid:!0,isLive:!0,programOverlayAPIUrl:"/live-tv/stream/dataProgramOverlayFAST.json",pid:"fast-channel-pid",liveStreamMetadata:{contentUrl:"live-tv/stream/test-dai-ads",pid:"fast-channel-pid"},posterImageUrl:null});function Np(){return(0,wn.jsx)("div",{style:{margin:"55px 0"},children:(0,wn.jsx)(Sp,{data:xp})})}const _p=n.p+"static/media/sample-test-captions.c214dd15711bff596a8a.vtt",Ip=JSON.stringify({apiMetadata:{contentId:"Oj38EIv8xyXLXOrhLrruj7qh8sU_5__I",closedCaptionUrl:_p,duration:210,episodeNum:1,rating:"tv-pg d, l",regionalRatings:[{rating:"TV-PG",region:"US",scheme:"urn:v-chip",subratings:[{code:"D",description:"Suggestive Dialogue"},{code:"L",description:"Coarse Language"}]}],seasonNum:1,seriesTitle:"Sample Series Title",streamingUrl:"https://cdn.bitmovin.com/content/assets/art-of-motion-dash-hls-progressive/m3u8s/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.m3u8",title:"Sample Episode Title",videoPageUrl:"http://local.cbs.com/shows/video/sample/"},autoPlayVid:!0,contentType:"clip",fmsParams:{_fw_vcid2:"6a18602c59939",fms_userid:"6a18602c59939",fms_vcid2type:"userid",fms_ruleid:"10000,10009"},freeWheelAds:!0,isLive:!1,partner:"cbs",posterImageUrl:null});function Op(){return(0,v.useEffect)(()=>{document.addEventListener("CBS:NextVideoRequest",()=>{const e={result:{apiResponse:[{contentType:"SHOW",status:"AVAILABLE",subscriptionLevel:"FREE",seriesTitle:"Watson",seasonNumber:"2",videoTitle:"Watson - Unsolved Mysteries",episodeNumber:"17",airDate:null,duration:2595,showPreviewImage:"https://thumbnails.cbsig.net/_x/w594/CBS_Production_Entertainment_VMS/2026/02/25/IEw6ri1GaJqQCivA1fuaPDy7ssPHJXGQ/PPUSA_WATSON_217_UHD_V1_3806733_1920x1080.jpg",videoPageURL:"http://local.cbs.com/shows/video/IEw6ri1GaJqQCivA1fuaPDy7ssPHJXGQ/",btnLabel:"Play Now",mediaWatchNextType:"single_next-ep",active:!0,videoDescription:"In the wake of the car accident, Watson and Laila lie injured and awaiting rescue as the team races to find them before it's too late. Meanwhile, Watson's mind plays out a modern-day investigation of a case that has long haunted him.",titleLogoImage:"",locked:!1,button:{lockIconUrl:"/assets/images/svg/content_lock.svg"},tracking:{trackAction:{trackEndCardSelect:{TVELockedBadge:"0"}}}}]},success:!0};setTimeout(()=>{document.dispatchEvent(new CustomEvent("CBS:NextVideoResponse",{detail:e}))},1500)})},[]),(0,wn.jsx)("div",{style:{margin:"55px 0"},children:(0,wn.jsx)(Sp,{data:Ip})})}function Dp(e){return function(e){return"[object Object]"===Object.prototype.toString.call(e)}(e)||Array.isArray(e)}function Rp(e,t){const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&(JSON.stringify(Object.keys(e.breakpoints||{}))===JSON.stringify(Object.keys(t.breakpoints||{}))&&n.every(n=>{const i=e[n],r=t[n];return"function"==typeof i?"".concat(i)==="".concat(r):Dp(i)&&Dp(r)?Rp(i,r):i===r}))}function Pp(e){return e.concat().sort((e,t)=>
vendor: 8,495 bytes, line 2
2e.name>t.name?1:-1).map(e=>e.options)}function Lp(e){return"number"==typeof e}function Mp(e){return"string"==typeof e}function Fp(e){return"boolean"==typeof e}function Up(e){return"[object Object]"===Object.prototype.toString.call(e)}function Bp(e){return Math.abs(e)}function jp(e){return Math.sign(e)}function Vp(e,t){return Bp(e-t)}function Hp(e){return qp(e).map(Number)}function zp(e){return e[Kp(e)]}function Kp(e){return Math.max(0,e.length-1)}function Wp(e,t){return t===Kp(e)}function Gp(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Array.from(Array(e),(e,n)=>t+n)}function qp(e){return Object.keys(e)}function Yp(e,t){return[e,t].reduce((e,t)=>(qp(t).forEach(n=>{const i=e[n],r=t[n],a=Up(i)&&Up(r);e[n]=a?Yp(i,r):r}),e),{})}function Qp(e,t){return void 0!==t.MouseEvent&&e instanceof t.MouseEvent}function Xp(){let e=[];const t={add:function(n,i,r){let a,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{passive:!0};if("addEventListener"in n)n.addEventListener(i,r,o),a=()=>n.removeEventListener(i,r,o);else{const e=n;e.addListener(r),a=()=>e.removeListener(r)}return e.push(a),t},clear:function(){e=e.filter(e=>e())}};return t}function Zp(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=Bp(e-t);function i(t){return t<e}function r(e){return e>t}function a(e){return i(e)||r(e)}const o={length:n,max:t,min:e,constrain:function(n){return a(n)?i(n)?e:t:n},reachedAny:a,reachedMax:r,reachedMin:i,removeOffset:function(e){return n?e-n*Math.ceil((e-t)/n):e}};return o}function Jp(e,t,n){const i=Zp(0,e).constrain,r=e+1;let a=o(t);function o(e){return n?Bp((r+e)%r):i(e)}function s(){return a}function l(){return Jp(e,s(),n)}const c={get:s,set:function(e){return a=o(e),c},add:function(e){return l().set(s()+e)},clone:l};return c}function $p(e,t,n,i,r,a,o,s,l,c,u,d,h,f,p,m,g,v,y){const b=e.cross,A=e.direction,E=["INPUT","SELECT","TEXTAREA"],T={passive:!1},w=Xp(),S=Xp(),C=Zp(50,225).constrain(f.measure(20)),k={mouse:300,touch:400},x={mouse:500,touch:600},N=p?43:25;let _=!1,I=0,O=0,D=!1,R=!1,P=!1,L=!1;function M(e){if(!Qp(e,i)&&e.touches.length>=2)return F(e);const t=a.readPoint(e),n=a.readPoint(e,b),o=Vp(t,I),l=Vp(n,O);if(!R&&!L){if(!e.cancelable)return F(e);if(R=o>l,!R)return F(e)}const u=a.pointerMove(e);o>m&&(P=!0),c.useFriction(.3).useDuration(.75),s.start(),r.add(A(u)),e.preventDefault()}function F(e){const t=u.byDistance(0,!1).index!==d.get(),n=a.pointerUp(e)*(p?x:k)[L?"mouse":"touch"],i=function(e,t){const n=d.add(-1*jp(e)),i=u.byDistance(e,!p).distance;return p||Bp(e)<C?i:g&&t?.5*i:u.byIndex(n.get(),0).distance}(A(n),t),r=function(e,t){if(0===e||0===t)return 0;if(Bp(e)<=Bp(t))return 0;const n=Vp(Bp(e),Bp(t));return Bp(n/e)}(n,i),o=N-10*r,s=v+r/50;R=!1,D=!1,S.clear(),c.useDuration(o).useFriction(s),l.distance(i,!p),L=!1,h.emit("pointerUp")}function U(e){P&&(e.stopPropagation(),e.preventDefault(),P=!1)}return{init:function(e){if(!y)return;function s(s){(Fp(y)||y(e,s))&&function(e){const s=Qp(e,i);L=s,P=p&&s&&!e.buttons&&_,_=Vp(r.get(),o.get())>=2,s&&0!==e.button||function(e){const t=e.nodeName||"";return E.includes(t)}(e.target)||(D=!0,a.pointerDown(e),c.useFriction(0).useDuration(0),r.set(o),function(){const e=L?n:t;S.add(e,"touchmove",M,T).add(e,"touchend",F).add(e,"mousemove",M,T).add(e,"mouseup",F)}(),I=a.readPoint(e),O=a.readPoint(e,b),h.emit("pointerDown"))}(s)}const l=t;w.add(l,"dragstart",e=>e.preventDefault(),T).add(l,"touchmove",()=>{},T).add(l,"touchend",()=>{}).add(l,"touchstart",s).add(l,"mousedown",s).add(l,"touchcancel",F).add(l,"contextmenu",F).add(l,"click",U,!0)},destroy:function(){w.clear(),S.clear()},pointerDown:function(){return D}}}function em(e,t){let n,i;function r(e){return e.timeStamp}function a(n,i){const r=i||e.scroll,a="client".concat("x"===r?"X":"Y");return(Qp(n,t)?n:n.touches[0])[a]}const o={pointerDown:function(e){return n=e,i=e,a(e)},pointerMove:function(e){const t=a(e)-a(i),o=r(e)-r(n)>170;return i=e,o&&(n=e),t},pointerUp:function(e){if(!n||!i)return 0;const t=a(i)-a(n),o=r(e)-r(n),s=r(e)-r(i)>170,l=t/o;return o&&!s&&Bp(l)>.1?l:0},readPoint:a};return o}function tm(e,t,n,i,r,a,o){const s=[e].concat(i);let l,c,u=[],d=!1;function h(e){return r.measureSize(o.measure(e))}const f={init:function(r){a&&(c=h(e),u=i.map(h),l=new ResizeObserver(n=>{(Fp(a)||a(r,n))&&function(n){for(const a of n){if(d)return;const n=a.target===e,o=i.indexOf(a.target),s=n?c:u[o];if(Bp(h(n?e:i[o])-s)>=.5){r.reInit(),t.emit("resize");break}}}(n)}),n.requestAnimationFrame(()=>{s.forEach(e=>l.observe(e))}))},destroy:function(){d=!0,l&&l.disconnect()}};return f}function nm(e,t,n,i,r){const a=r.measure(10),o=r.measure(50),s=Zp(.1,.99);let l=!1;function c(){return!l&&!!e.reachedAny(n.get())&&!!e.reachedAny(t.get())}return{shouldConstrain:c,constrain:function(r){if(!c())return;const l=e.reachedMin(t.get())?"min":"max",u=Bp(e[l]-t.get()),d=n.get()-t.get(),h=s.constrain(u/o);n.subtract(d*h),!r&&Bp(d)<a&&(n.set(e.constrain(n.get())),i.useDuration(25).useBaseFriction())},toggleActive:function(e){l=!e}}}function im(e,t,n,i){const r=Zp(t.min+.1,t.max+.1),a=r.reachedMin,o=r.reachedMax;return{loop:function(t){if(!function(e){return 1===e?o(n.get()):-1===e&&a(n.get())}(t))return;const r=e*(-1*t);i.forEach(e=>e.add(r))}}}function rm(e){let t=e;function n(e){return Lp(e)?e:e.get()}const i={get:function(){return t},set:function(e){t=n(e)},add:function(e){t+=n(e)},subtract:function(e){t-=n(e)}};return i}function am(e,t){const n="x"===e.scroll?function(e){return"translate3d(".concat(e,"px,0px,0px)")}:function(e){return"translate3d(0px,".concat(e,"px,0px)")},i=t.style;let r=null,a=!1;return{clear:function(){a||(i.transform="",t.getAttribute("style")||t.removeAttribute("style"))},to:function(t){if(a)return;const o=(s=e.direction(t),Math.round(100*s)/100);var s;o!==r&&(i.transform=n(o),r=o)},toggleActive:function(e){a=!e}}}function om(e,t,n,i,r,a,o,s,l){const c=Hp(r),u=Hp(r).reverse(),d=function(){const e=o[0];return p(f(u,e),n,!1)}().concat(function(){const e=t-o[0]-1;return p(f(c,e),-n,!0)}());function h(e,t){return e.reduce((e,t)=>e-r[t],t)}function f(e,t){return e.reduce((e,n)=>h(e,t)>0?e.concat([n]):e,[])}function p(r,o,c){const u=function(e){return a.map((n,r)=>({start:n-i[r]+.5+e,end:n+t-.5+e}))}(o);return r.map(t=>{const i=c?0:-n,r=c?n:0,a=c?"end":"start",o=u[t][a];return{index:t,loopPoint:o,slideLocation:rm(-1),translate:am(e,l[t]),target:()=>s.get()>o?i:r}})}const m={canLoop:function(){return d.every(e=>{let n=e.index;return h(c.filter(e=>e!==n),t)<=.1})},clear:function(){d.forEach(e=>e.translate.clear())},loop:function(){d.forEach(e=>{const t=e.target,n=e.translate,i=e.slideLocation,r=t();r!==i.get()&&(n.to(r),i.set(r))})},loopPoints:d};return m}function sm(e,t,n){let i,r=!1;return{init:function(a){n&&(i=new MutationObserver(e=>{r||(Fp(n)||n(a,e))&&function(e){for(const n of e)if("childList"===n.type){a.reInit(),t.emit("slidesChanged");break}}(e)}),i.observe(e,{childList:!0}))},destroy:function(){i&&i.disconnect(),r=!0}}}function lm(e,t,n,i,r,a,o){const s=a.align,l=a.axis,c=a.direction,u=a.startIndex,d=a.loop,h=a.duration,f=a.dragFree,p=a.dragThreshold,m=a.inViewThreshold,g=a.slidesToScroll,v=a.skipSnaps,y=a.containScroll,b=a.watchResize,A=a.watchSlides,E=a.watchDrag,T=a.watchFocus,w={measure:function(e){const t=e.offsetTop,n=e.offsetLeft,i=e.offsetWidth,r=e.offsetHeight;return{top:t,right:n+i,bottom:t+r,left:n,width:i,height:r}}},S=w.measure(t),C=n.map(w.measure),k=function(e,t){const n="rtl"===t,i="y"===e,r=!i&&n?-1:1,a={scroll:i?"y":"x",cross:i?"x":"y",startEdge:i?"top":n?"right":"left",endEdge:i?"bottom":n?"left":"right",measureSize:function(e){const t=e.height,n=e.width;return i?t:n},direction:function(e){return e*r}};return a}(l,c),x=k.measureSize(S),N=function(e){return{measure:function(t){return e*(t/100)}}}(x),_=function(e,t){const n={start:function(){return 0},center:function(e){return i(e)/2},end:i};function i(e){return t-e}const r={measure:function(i,r){return Mp(e)?n[e](i):e(t,i,r)}};return r}(s,x),I=!d&&!!y,O=function(e,t,n,i,r,a){const o=e.measureSize,s=e.startEdge,l=e.endEdge,c=n[0]&&r,u=function(){if(!c)return 0;const e=n[0];return Bp(t[s]-e[s])}(),d=function(){if(!c)return 0;const e=a.getComputedStyle(zp(i));return parseFloat(e.getPropertyValue("margin-".concat(l)))}(),h=n.map(o),f=n.map((e,t,n)=>{const i=!t,r=Wp(n,t);return i?h[t]+u:r?h[t]+d:n[t+1][s]-e[s]}).map(Bp);return{slideSizes:h,slideSizesWithGaps:f,startGap:u,endGap:d}}
2(k,S,C,n,d||!!y,r),D=O.slideSizes,R=O.slideSizesWithGaps,P=function(e,t,n,i,r,a,o,s,l){const c=e.startEdge,u=e.endEdge,d=e.direction,h=Lp(n),f={groupSlides:function(e){return h?function(e,t){return Hp(e).filter(e=>e%t===0).map(n=>e.slice(n,n+t))}(e,n):function(e){return e.length?Hp(e).reduce((n,h,f)=>{const p=zp(n)||0,m=0===p,g=h===Kp(e),v=r[c]-a[p][c],y=r[c]-a[h][u],b=!i&&m?d(o):0,A=Bp(y-(!i&&g?d(s):0)-(v+b));return f&&A>t+l&&n.push(h),g&&n.push(e.length),n},[]).map((t,n,i)=>{const r=Math.max(i[n-1]||0);return e.slice(r,t)}):[]}(e)}};return f}(k,x,g,d,S,C,O.startGap,O.endGap,2),L=function(e,t,n,i,r){const a=e.startEdge,o=e.endEdge,s=r.groupSlides,l=s(i).map(e=>zp(e)[o]-e[0][a]).map(Bp).map(t.measure),c=i.map(e=>n[a]-e[a]).map(e=>-Bp(e)),u=s(c).map(e=>e[0]).map((e,t)=>e+l[t]);return{snaps:c,snapsAligned:u}}(k,_,S,C,P),M=L.snaps,F=L.snapsAligned,U=-zp(M)+zp(R),B=function(e,t,n,i){const r=Zp(-t+e,0),a=n.map((e,t)=>{const i=r.min,a=r.max,o=r.constrain(e),l=!t,c=Wp(n,t);return l?a:c||s(i,o)?i:s(a,o)?a:o}).map(e=>parseFloat(e.toFixed(3))),o=function(){const e=a[0],t=zp(a);return Zp(a.lastIndexOf(e),a.indexOf(t)+1)}();function s(e,t){return Vp(e,t)<=1}return{snapsContained:function(){if(t<=e+2)return[r.max];if("keepSnaps"===i)return a;const n=o.min,s=o.max;return a.slice(n,s)}(),scrollContainLimit:o}}(x,U,F,y),j=B.snapsContained,V=B.scrollContainLimit,H=I?j:F,z=function(e,t,n){const i=t[0];return{limit:Zp(n?i-e:zp(t),i)}}(U,H,d),K=z.limit,W=Jp(Kp(H),u,d),G=W.clone(),q=Hp(n),Y=function(e,t,n,i){const r=Xp(),a=1e3/60;let o=null,s=0,l=0;function c(e){if(!l)return;o||(o=e,n(),n());const r=e-o;for(o=e,s+=r;s>=a;)n(),s-=a;i(s/a),l&&(l=t.requestAnimationFrame(c))}function u(){t.cancelAnimationFrame(l),o=null,s=0,l=0}return{init:function(){r.add(e,"visibilitychange",()=>{e.hidden&&(o=null,s=0)})},destroy:function(){u(),r.clear()},start:function(){l||(l=t.requestAnimationFrame(c))},stop:u,update:n,render:i}}(i,r,()=>(e=>{let t=e.dragHandler,n=e.scrollBody,i=e.scrollBounds;e.options.loop||i.constrain(t.pointerDown()),n.seek()})(ce),e=>((e,t)=>{let n=e.scrollBody,i=e.translate,r=e.location,a=e.offsetLocation,o=e.previousLocation,s=e.scrollLooper,l=e.slideLooper,c=e.dragHandler,u=e.animation,d=e.eventHandler,h=e.scrollBounds,f=e.options.loop;const p=n.settled(),m=!h.shouldConstrain(),g=f?p:p&&m,v=g&&!c.pointerDown();v&&u.stop();const y=r.get()*t+o.get()*(1-t);a.set(y),f&&(s.loop(n.direction()),l.loop()),i.to(a.get()),v&&d.emit("settle"),g||d.emit("scroll")})(ce,e)),Q=H[W.get()],X=rm(Q),Z=rm(Q),J=rm(Q),$=rm(Q),ee=function(e,t,n,i,r){let a=0,o=0,s=r,l=.68,c=e.get(),u=0;function d(e){return s=e,f}function h(e){return l=e,f}const f={direction:function(){return o},duration:function(){return s},velocity:function(){return a},seek:function(){const t=i.get()-e.get();let r=0;return s?(n.set(e),a+=t/s,a*=l,c+=a,e.add(a),r=c-u):(a=0,n.set(i),e.set(i),r=t),o=jp(r),u=c,f},settled:function(){return Bp(i.get()-t.get())<.001},useBaseFriction:function(){return h(.68)},useBaseDuration:function(){return d(r)},useFriction:h,useDuration:d};return f}(X,J,Z,$,h),te=function(e,t,n,i,r){const a=i.reachedAny,o=i.removeOffset,s=i.constrain;function l(e){return e.concat().sort((e,t)=>Bp(e)-Bp(t))[0]}function c(t,i){const r=[t,t+n,t-n];if(!e)return t;if(!i)return l(r);const a=r.filter(e=>jp(e)===i);return a.length?l(a):zp(r)-n}const u={byDistance:function(n,i){const l=r.get()+n,u=function(n){const i=e?o(n):s(n),r=t.map((e,t)=>({diff:c(e-i,0),index:t})).sort((e,t)=>Bp(e.diff)-Bp(t.diff));return{index:r[0].index,distance:i}}(l),d=u.index,h=u.distance,f=!e&&a(l);return!i||f?{index:d,distance:n}:{index:d,distance:n+c(t[d]-h,0)}},byIndex:function(e,n){return{index:e,distance:c(t[e]-r.get(),n)}},shortcut:c};return u}(d,H,U,K,$),ne=function(e,t,n,i,r,a,o){function s(r){const s=r.distance,l=r.index!==t.get();
vendor: 4,176 bytes, line 2
2a.add(s),s&&(i.duration()?e.start():(e.update(),e.render(1),e.update())),l&&(n.set(t.get()),t.set(r.index),o.emit("select"))}const l={distance:function(e,t){s(r.byDistance(e,t))},index:function(e,n){const i=t.clone().set(e);s(r.byIndex(i.get(),n))}};return l}(Y,W,G,ee,te,$,o),ie=function(e){const t=e.max,n=e.length,i={get:function(e){return n?(e-t)/-n:0}};return i}(K),re=Xp(),ae=function(e,t,n,i){const r={};let a,o=null,s=null,l=!1;const c={init:function(){a=new IntersectionObserver(e=>{l||(e.forEach(e=>{const n=t.indexOf(e.target);r[n]=e}),o=null,s=null,n.emit("slidesInView"))},{root:e.parentElement,threshold:i}),t.forEach(e=>a.observe(e))},destroy:function(){a&&a.disconnect(),l=!0},get:function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(e&&o)return o;if(!e&&s)return s;const t=function(e){return qp(r).reduce((t,n)=>{const i=parseInt(n),a=r[i].isIntersecting;return(e&&a||!e&&!a)&&t.push(i),t},[])}(e);return e&&(o=t),e||(s=t),t}};return c}(t,n,o,m),oe=function(e,t,n,i,r,a){const o=r.groupSlides,s=i.min,l=i.max,c=function(){const i=o(a),r=!e||"keepSnaps"===t;return 1===n.length?[a]:r?i:i.slice(s,l).map((e,t,n)=>{const i=!t,r=Wp(n,t);return i?Gp(zp(n[0])+1):r?Gp(Kp(a)-zp(n)[0]+1,zp(n)[0]):e})}();return{slideRegistry:c}}(I,y,H,V,P,q),se=oe.slideRegistry,le=function(e,t,n,i,r,a,o,s){const l={passive:!0,capture:!0};let c=0;function u(e){"Tab"===e.code&&(c=(new Date).getTime())}const d={init:function(d){s&&(a.add(document,"keydown",u,!1),t.forEach((t,u)=>{a.add(t,"focus",t=>{(Fp(s)||s(d,t))&&function(t){if((new Date).getTime()-c>10)return;o.emit("slideFocusStart"),e.scrollLeft=0;const a=n.findIndex(e=>e.includes(t));Lp(a)&&(r.useDuration(0),i.index(a,0),o.emit("slideFocus"))}(u)},l)}))}};return d}(e,n,se,ne,ee,re,o,T),ce={ownerDocument:i,ownerWindow:r,eventHandler:o,containerRect:S,slideRects:C,animation:Y,axis:k,dragHandler:$p(k,e,i,r,$,em(k,r),X,Y,ne,ee,te,W,o,N,f,p,v,.68,E),eventStore:re,percentOfView:N,index:W,indexPrevious:G,limit:K,location:X,offsetLocation:J,previousLocation:Z,options:a,resizeHandler:tm(t,o,r,n,k,b,w),scrollBody:ee,scrollBounds:nm(K,J,$,ee,N),scrollLooper:im(U,K,J,[X,J,Z,$]),scrollProgress:ie,scrollSnapList:H.map(ie.get),scrollSnaps:H,scrollTarget:te,scrollTo:ne,slideLooper:om(k,x,U,D,R,M,H,J,n),slideFocus:le,slidesHandler:sm(t,o,A),slidesInView:ae,slideIndexes:q,slideRegistry:se,slidesToScroll:P,target:$,translate:am(k,t)};return ce}const cm={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function um(e){function t(e,t){return Yp(e,t||{})}const n={mergeOptions:t,optionsAtMedia:function(n){const i=n.breakpoints||{},r=qp(i).filter(t=>e.matchMedia(t).matches).map(e=>i[e]).reduce((e,n)=>t(e,n),{});return t(n,r)},optionsMediaQueries:function(t){return t.map(e=>qp(e.breakpoints||{})).reduce((e,t)=>e.concat(t),[]).map(e.matchMedia)}};return n}function dm(e,t,n){const i=e.ownerDocument,r=i.defaultView,a=um(r),o=function(e){let t=[];const n={init:function(n,i){return t=i.filter(t=>{let n=t.options;return!1!==e.optionsAtMedia(n).active}),t.forEach(t=>t.init(n,e)),i.reduce((e,t)=>Object.assign(e,{[t.name]:t}),{})},destroy:function(){t=t.filter(e=>e.destroy())}};return n}(a),s=Xp(),l=function(){let e,t={};function n(e){return t[e]||[]}const i={init:function(t){e=t},emit:function(t){return n(t).forEach(n=>n(e,t)),i},off:function(e,r){return t[e]=n(e).filter(e=>e!==r),i},on:function(e,r){return t[e]=n(e).concat([r]),i},clear:function(){t={}}};return i}(),c=a.mergeOptions,u=a.optionsAtMedia,d=a.optionsMediaQueries,h=l.on,f=l.off,p=l.emit,m=k;let g,v,y,b,A=!1,E=c(cm,dm.globalOptions),T=c(E),w=[];function S(t){const n=lm(e,y,b,i,r,t,l);return t.loop&&!n.slideLooper.canLoop()?S(Object.assign({},t,{loop:!1})):n}function C(t,n){A||(E=c(E,t),T=u(E),w=n||w,function(){const t=T,n=t.container,i=t.slides,r=Mp(n)?e.querySelector(n):n;y=r||e.children[0];const a=Mp(i)?y.querySelectorAll(i):i;b=[].slice.call(a||y.children)}(),g=S(T),d([E,...w.map(e=>
2e.options)]).forEach(e=>s.add(e,"change",k)),T.active&&(g.translate.to(g.location.get()),g.animation.init(),g.slidesInView.init(),g.slideFocus.init(I),g.eventHandler.init(I),g.resizeHandler.init(I),g.slidesHandler.init(I),g.options.loop&&g.slideLooper.loop(),y.offsetParent&&b.length&&g.dragHandler.init(I),v=o.init(I,w)))}function k(e,t){const n=_();x(),C(c({startIndex:n},e),t),l.emit("reInit")}function x(){g.dragHandler.destroy(),g.eventStore.clear(),g.translate.clear(),g.slideLooper.clear(),g.resizeHandler.destroy(),g.slidesHandler.destroy(),g.slidesInView.destroy(),g.animation.destroy(),o.destroy(),s.clear()}function N(e,t,n){T.active&&!A&&(g.scrollBody.useBaseFriction().useDuration(!0===t?0:T.duration),g.scrollTo.index(e,n||0))}function _(){return g.index.get()}const I={canScrollNext:function(){return g.index.add(1).get()!==_()},canScrollPrev:function(){return g.index.add(-1).get()!==_()},containerNode:function(){return y},internalEngine:function(){return g},destroy:function(){A||(A=!0,s.clear(),x(),l.emit("destroy"),l.clear())},off:f,on:h,emit:p,plugins:function(){return v},previousScrollSnap:function(){return g.indexPrevious.get()},reInit:m,rootNode:function(){return e},scrollNext:function(e){N(g.index.add(1).get(),e,-1)},scrollPrev:function(e){N(g.index.add(-1).get(),e,1)},scrollProgress:function(){return g.scrollProgress.get(g.offsetLocation.get())},scrollSnapList:function(){return g.scrollSnapList},scrollTo:N,selectedScrollSnap:_,slideNodes:function(){return b},slidesInView:function(){return g.slidesInView.get()},slidesNotInView:function(){return g.slidesInView.get(!1)}};return C(t,n),setTimeout(()=>l.emit("init"),0),I}function hm(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=(0,v.useRef)(e),i=(0,v.useRef)(t),r=(0,v.useState)(),a=(0,x.A)(r,2),o=a[0],s=a[1],l=(0,v.useState)(),c=(0,x.A)(l,2),u=c[0],d=c[1],h=(0,v.useCallback)(()=>{o&&o.reInit(n.current,i.current)},[o]);return(0,v.useEffect)(()=>{Rp(n.current,e)||(n.current=e,h())},[e,h]),(0,v.useEffect)(()=>{(function(e,t){if(e.length!==t.length)return!1;const n=Pp(e),i=Pp(t);return n.every((e,t)=>Rp(e,i[t]))})(i.current,t)||(i.current=t,h())},[t,h]),(0,v.useEffect)(()=>{if("undefined"!=typeof window&&window.document&&window.document.createElement&&u){dm.globalOptions=hm.globalOptions;const e=dm(u,n.current,i.current);return s(e),()=>e.destroy()}s(void 0)},[u,s]),[d,o]}dm.globalOptions=void 0,hm.globalOptions=void 0;const fm=["base"],pm=["padTo","floor"];class mm extends Error{}class gm extends mm{constructor(e){super("Invalid DateTime: ".concat(e.toMessage()))}}class vm extends mm{constructor(e){super("Invalid Interval: ".concat(e.toMessage()))}}class ym extends mm{constructor(e){super("Invalid Duration: ".concat(e.toMessage()))}}class bm extends mm{}class Am extends mm{constructor(e){super("Invalid unit ".concat(e))}}class Em extends mm{}class Tm extends mm{constructor(){super("Zone is an abstract class")}}const wm="numeric",Sm="short",Cm="long",km={year:wm,month:wm,day:wm},xm={year:wm,month:Sm,day:wm},Nm={year:wm,month:Sm,day:wm,weekday:Sm},_m={year:wm,month:Cm,day:wm},Im={year:wm,month:Cm,day:wm,weekday:Cm},Om={hour:wm,minute:wm},Dm={hour:wm,minute:wm,second:wm},Rm={hour:wm,minute:wm,second:wm,timeZoneName:Sm},Pm={hour:wm,minute:wm,second:wm,timeZoneName:Cm},Lm={hour:wm,minute:wm,hourCycle:"h23"},Mm={hour:wm,minute:wm,second:wm,hourCycle:"h23"},Fm={hour:wm,minute:wm,second:wm,hourCycle:"h23",timeZoneName:Sm},Um={hour:wm,minute:wm,second:wm,hourCycle:"h23",timeZoneName:Cm},Bm={year:wm,month:wm,day:wm,hour:wm,minute:wm},jm={year:wm,month:wm,day:wm,hour:wm,minute:wm,second:wm},Vm={year:wm,month:Sm,day:wm,hour:wm,minute:wm},Hm={year:wm,month:Sm,day:wm,hour:wm,minute:wm,second:wm},zm={year:wm,month:Sm,day:wm,weekday:Sm,hour:wm,minute:wm},Km={year:wm,month:Cm,day:wm,hour:wm,minute:wm,timeZoneName:Sm},Wm={year:wm,month:Cm,day:wm,hour:wm,minute:wm,second:wm,timeZoneName:Sm},Gm={year:wm,month:Cm,day:wm,weekday:Cm,hour:wm,minute:wm,timeZoneName:Cm},qm={year:wm,month:Cm,day:wm,weekday:Cm,hour:wm,minute:wm,second:wm,timeZoneName:Cm};class Ym{get type(){throw new Tm}get name(){throw new Tm}get ianaName(){return this.name}get isUniversal(){throw new Tm}offsetName(e,t){throw new Tm}formatOffset(e,t){throw new Tm}offset(e){throw new Tm}equals(e){throw new Tm}get isValid(){throw new Tm}}let Qm=null;class Xm extends Ym{static get instance(){return null===Qm&&(Qm=new Xm),Qm}get type(){return"system"}get name(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,t){return gv(e,t.format,t.locale)}formatOffset(e,t){return Av(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return"system"===e.type}get isValid(){return!0}}const Zm=new Map,Jm={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6},$m=new Map;class eg extends Ym{static create(e){let t=$m.get(e);return void 0===t&&$m.set(e,t=new eg(e)),t}static resetCache(){$m.clear(),Zm.clear()}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(e){return!1}}constructor(e){super(),this.zoneName=e,this.valid=eg.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,t){return gv(e,t.format,t.locale,this.name)}formatOffset(e,t){return Av(this.offset(e),t)}offset(e){if(!this.valid)return NaN;const t=new Date(e);if(isNaN(t))return NaN;const n=function(e){let t=Zm.get(e);return void 0===t&&(t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,
2year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),Zm.set(e,t)),t}(this.name);let i=n.formatToParts?function(e,t){const n=e.formatToParts(t),i=[];for(let e=0;e<n.length;e++){const t=n[e],r=t.type,a=t.value,o=Jm[r];"era"===r?i[o]=a:Qg(o)||(i[o]=parseInt(a,10))}return i}(n,t):function(e,t){const n=e.format(t).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),r=(0,x.A)(i,8),a=r[1],o=r[2];return[r[3],a,o,r[4],r[5],r[6],r[7]]}(n,t),r=(0,x.A)(i,7),a=r[0],o=r[1],s=r[2],l=r[3],c=r[4],u=r[5],d=r[6];"BC"===l&&(a=1-Math.abs(a));let h=+t;const f=h%1e3;return h-=f>=0?f:1e3+f,(hv({year:a,month:o,day:s,hour:24===c?0:c,minute:u,second:d,millisecond:0})-h)/6e4}equals(e){return"iana"===e.type&&e.name===this.name}get isValid(){return this.valid}}let tg={};const ng=new Map;function ig(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=JSON.stringify([e,t]);let i=ng.get(n);return void 0===i&&(i=new Intl.DateTimeFormat(e,t),ng.set(n,i)),i}const rg=new Map,ag=new Map;let og=null;const sg=new Map;function lg(e){let t=sg.get(e);return void 0===t&&(t=new Intl.DateTimeFormat(e).resolvedOptions(),sg.set(e,t)),t}const cg=new Map;function ug(e,t,n,i){const r=e.listingMode();return"error"===r?null:"en"===r?n(t):i(t)}class dg{constructor(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1,n.padTo,n.floor;const i=E(n,pm);if(!t||Object.keys(i).length>0){const t=a({useGrouping:!1},n);n.padTo>0&&(t.minimumIntegerDigits=n.padTo),this.inf=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=JSON.stringify([e,t]);let i=rg.get(n);return void 0===i&&(i=new Intl.NumberFormat(e,t),rg.set(n,i)),i}(e,t)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}return rv(this.floor?Math.floor(e):lv(e,3),this.padTo)}}class hg{constructor(e,t,n){let i;if(this.opts=n,this.originalZone=void 0,this.opts.timeZone)this.dt=e;else if("fixed"===e.zone.type){const t=e.offset/60*-1,n=t>=0?"Etc/GMT+".concat(t):"Etc/GMT".concat(t);0!==e.offset&&eg.create(n).valid?(i=n,this.dt=e):(i="UTC",this.dt=0===e.offset?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else"system"===e.zone.type?this.dt=e:"iana"===e.zone.type?(this.dt=e,i=e.zone.name):(i="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const r=a({},this.opts);r.timeZone=r.timeZone||i,this.dtf=ig(t,r)}format(){return this.originalZone?this.formatToParts().map(e=>e.value).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(e=>{if("timeZoneName"===e.type){const t=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return a(a({},e),{},{value:t})}return e}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class fg{constructor(e,t,n){this.opts=a({style:"long"},n),!t&&Jg()&&(this.rtf=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.base;const n=E(t,fm),i=JSON.stringify([e,n]);let r=ag.get(i);return void 0===r&&(r=new Intl.RelativeTimeFormat(e,t),ag.set(i,r)),r}(e,n))}format(e,t){return this.rtf?this.rtf.format(e,t):function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"always",i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const r={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},a=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===n&&a){const n="days"===e;switch(t){case 1:return n?"tomorrow":"next ".concat(r[e][0]);case-1:return n?"yesterday":"last ".concat(r[e][0]);case 0:return n?"today":"this ".concat(r[e][0])}}const o=Object.is(t,-0)||t<0,s=Math.abs(t),l=1===s,c=r[e],u=i?l?c[1]:c[2]||c[1]:l?r[e][0]:e;return o?"".concat(s," ").concat(u," ago"):"in ".concat(s," ").concat(u)}(t,e,this.opts.numeric,"long"!==this.opts.style)}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}const pg={firstDay:1,minimalDays:4,weekend:[6,7]};class mg{static fromOpts(e){return mg.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,t,n,i){let r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const a=e||Rg.defaultLocale,o=a||(r?"en-US":og||(og=(new Intl.DateTimeFormat).resolvedOptions().locale,og)),s=t||Rg.defaultNumberingSystem,l=n||Rg.defaultOutputCalendar,c=nv(i)||Rg.defaultWeekSettings;return new mg(o,s,l,c,a)}static resetCache(){og=null,ng.clear(),rg.clear(),ag.clear(),sg.clear(),cg.clear()}static fromObject(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.locale,n=e.numberingSystem,i=e.outputCalendar,r=e.weekSettings;return mg.create(t,n,i,r)}constructor(e,t,n,i,r){const a=function(e){const t=e.indexOf("-x-");-1!==t&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(-1===n)return[e];{let t,i;try{t=ig(e).resolvedOptions(),i=e}catch(r){const a=e.substring(0,n);t=ig(a).resolvedOptions(),i=a}const r=t;return[i,r.numberingSystem,r.calendar]}}(e),o=(0,x.A)(a,3),s=o[0],l=o[1],c=o[2];this.locale=s,this.numberingSystem=t||l||null,this.outputCalendar=n||c||null,this.weekSettings=i,this.intl=function(e,t,n){return n||t?(e.includes("-u-")||(e+="-u"),n&&(e+="-ca-".concat(n)),t&&(e+="-nu-".concat(t)),e):e}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=r,this.fastNumbersCached=null}get fastNumbers(){var e;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(e=this).numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||"latn"===lg(e.locale).numberingSystem)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return e&&t?"en":"intl"}clone(e){return e&&0!==Object.getOwnPropertyNames(e).length?mg.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,nv(e.weekSettings)||this.weekSettings,e.defaultToEN||!1):this}redefaultToEN(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.clone(a(a({},e),{},{defaultToEN:!0}))}
2redefaultToSystem(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.clone(a(a({},e),{},{defaultToEN:!1}))}months(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return ug(this,e,Cv,()=>{const n="ja"===this.intl||this.intl.startsWith("ja-");t&=!n;const i=t?{month:e,day:"numeric"}:{month:e},r=t?"format":"standalone";if(!this.monthsCache[r][e]){const t=n?e=>this.dtFormatter(e,i).format():e=>this.extract(e,i,"month");this.monthsCache[r][e]=function(e){const t=[];for(let n=1;n<=12;n++){const i=_b.utc(2009,n,1);t.push(e(i))}return t}(t)}return this.monthsCache[r][e]})}weekdays(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return ug(this,e,_v,()=>{const n=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},i=t?"format":"standalone";return this.weekdaysCache[i][e]||(this.weekdaysCache[i][e]=function(e){const t=[];for(let n=1;n<=7;n++){const i=_b.utc(2016,11,13+n);t.push(e(i))}return t}(e=>this.extract(e,n,"weekday"))),this.weekdaysCache[i][e]})}meridiems(){return ug(this,void 0,()=>Iv,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[_b.utc(2016,11,13,9),_b.utc(2016,11,13,19)].map(t=>this.extract(t,e,"dayperiod"))}return this.meridiemCache})}eras(e){return ug(this,e,Pv,()=>{const t={era:e};return this.eraCache[e]||(this.eraCache[e]=[_b.utc(-40,1,1),_b.utc(2017,1,1)].map(e=>this.extract(e,t,"era"))),this.eraCache[e]})}extract(e,t,n){const i=this.dtFormatter(e,t).formatToParts().find(e=>e.type.toLowerCase()===n);return i?i.value:null}numberFormatter(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new dg(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new hg(e,this.intl,t)}relFormatter(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new fg(this.intl,this.isEnglish(),e)}listFormatter(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=JSON.stringify([e,t]);let i=tg[n];return i||(i=new Intl.ListFormat(e,t),tg[n]=i),i}(this.intl,e)}isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||lg(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:$g()?function(e){let t=cg.get(e);if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,"minimalDays"in t||(t=a(a({},pg),t)),cg.set(e,t)}return t}(this.locale):pg}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return"Locale(".concat(this.locale,", ").concat(this.numberingSystem,", ").concat(this.outputCalendar,")")}}let gg=null;class vg extends Ym{static get utcInstance(){return null===gg&&(gg=new vg(0)),gg}static instance(e){return 0===e?vg.utcInstance:new vg(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new vg(vv(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return 0===this.fixed?"UTC":"UTC".concat(Av(this.fixed,"narrow"))}get ianaName(){return 0===this.fixed?"Etc/UTC":"Etc/GMT".concat(Av(-this.fixed,"narrow"))}offsetName(){return this.name}formatOffset(e,t){return Av(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return"fixed"===e.type&&e.fixed===this.fixed}get isValid(){return!0}}class yg extends Ym{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function bg(e,t){if(Qg(e)||null===e)return t;if(e instanceof Ym)return e;if("string"==typeof e){const n=e.toLowerCase();return"default"===n?t:"local"===n||"system"===n?Xm.instance:"utc"===n||"gmt"===n?vg.utcInstance:vg.parseSpecifier(n)||eg.create(e)}return Xg(e)?vg.instance(e):"object"==typeof e&&"offset"in e&&"function"==typeof e.offset?e:new yg(e)}const Ag={arab:"[Ù -Ù©]",arabext:"[Û°-Û¹]",bali:"[á-á]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[ï¼-ï¼]",gujr:"[૦-૯]",hanidec:"[ã|ä¸|äº|ä¸|å|äº|å
|ä¸|å
«|ä¹]",khmr:"[á -á©]",knda:"[೦-೯]",laoo:"[à»-à»]",limb:"[á¥-á¥]",mlym:"[൦-൯]",mong:"[á -á ]",mymr:"[á-á]",orya:"[à¦-à¯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[à¹-à¹]",t
2ibt:"[༠-༩]",latn:"\\d"},Eg={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},Tg=Ag.hanidec.replace(/[\[|\]]/g,"").split(""),wg=new Map;function Sg(e){let t=e.numberingSystem,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const i=t||"latn";let r=wg.get(i);void 0===r&&(r=new Map,wg.set(i,r));let a=r.get(n);return void 0===a&&(a=new RegExp("".concat(Ag[i]).concat(n)),r.set(n,a)),a}let Cg,kg=()=>Date.now(),xg="system",Ng=null,_g=null,Ig=null,Og=60,Dg=null;class Rg{static get now(){return kg}static set now(e){kg=e}static set defaultZone(e){xg=e}static get defaultZone(){return bg(xg,Xm.instance)}static get defaultLocale(){return Ng}static set defaultLocale(e){Ng=e}static get defaultNumberingSystem(){return _g}static set defaultNumberingSystem(e){_g=e}
2static get defaultOutputCalendar(){return Ig}static set defaultOutputCalendar(e){Ig=e}static get defaultWeekSettings(){return Dg}static set defaultWeekSettings(e){Dg=nv(e)}static get twoDigitCutoffYear(){return Og}static set twoDigitCutoffYear(e){Og=e%100}static get throwOnInvalid(){return Cg}static set throwOnInvalid(e){Cg=e}static resetCaches(){mg.resetCache(),eg.resetCache(),_b.resetCache(),wg.clear()}}class Pg{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?"".concat(this.reason,": ").concat(this.explanation):this.reason}}const Lg=[0,31,59,90,120,151,181,212,243,273,304,334],Mg=[0,31,60,91,121,152,182,213,244,274,305,335];function Fg(e,t){return new Pg("unit out of range","you specified ".concat(t," (of type ").concat(typeof t,") as a ").concat(e,", which is invalid"))}function Ug(e,t,n){const i=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&i.setUTCFullYear(i.getUTCFullYear()-1900);const r=i.getUTCDay();return 0===r?7:r}function Bg(e,t,n){return n+(cv(e)?Mg:Lg)[t-1]}function jg(e,t){const n=cv(e)?Mg:Lg,i=n.findIndex(e=>e<t);return{month:i+1,day:t-n[i]}}function Vg(e,t){return(e-t+7)%7+1}function Hg(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const i=e.year,r=e.month,o=e.day,s=Bg(i,r,o),l=Vg(Ug(i,r,o),n);let c,u=Math.floor((s-l+14-t)/7);return u<1?(c=i-1,u=pv(c,t,n)):u>pv(i,t,n)?(c=i+1,u=1):c=i,a({weekYear:c,weekNumber:u,weekday:l},Ev(e))}function zg(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const i=e.weekYear,r=e.weekNumber,o=e.weekday,s=Vg(Ug(i,1,t),n),l=uv(i);let c,u=7*r+o-s-7+t;u<1?(c=i-1,u+=uv(c)):u>l?(c=i+1,u-=uv(i)):c=i;const d=jg(c,u);return a({year:c,month:d.month,day:d.day},Ev(e))}function Kg(e){const t=e.year;return a({year:t,ordinal:Bg(t,e.month,e.day)},Ev(e))}function Wg(e){const t=e.year,n=jg(t,e.ordinal);return a({year:t,month:n.month,day:n.day},Ev(e))}function Gg(e,t){if(!Qg(e.localWeekday)||!Qg(e.localWeekNumber)||!Qg(e.localWeekYear)){if(!Qg(e.weekday)||!Qg(e.weekNumber)||!Qg(e.weekYear))throw new bm("Cannot mix locale-based week fields with ISO-based week fields");return Qg(e.localWeekday)||(e.weekday=e.localWeekday),Qg(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),Qg(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}return{minDaysInFirstWeek:4,startOfWeek:1}}function qg(e){const t=Zg(e.year),n=iv(e.month,1,12),i=iv(e.day,1,dv(e.year,e.month));return t?n?!i&&Fg("day",e.day):Fg("month",e.month):Fg("year",e.year)}function Yg(e){const t=e.hour,n=e.minute,i=e.second,r=e.millisecond,a=iv(t,0,23)||24===t&&0===n&&0===i&&0===r,o=iv(n,0,59),s=iv(i,0,59),l=iv(r,0,999);return a?o?s?!l&&Fg("millisecond",r):Fg("second",i):Fg("minute",n):Fg("hour",t)}function Qg(e){return void 0===e}function Xg(e){return"number"==typeof e}function Zg(e){return"number"==typeof e&&e%1==0}function Jg(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function $g(){try{return"undefined"!=typeof Intl&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch(e){return!1}}function ev(e,t,n){if(0!==e.length)return e.reduce((e,i)=>{const r=[t(i),i];return e&&n(e[0],r[0])===e[0]?e:r},null)[1]}function tv(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function nv(e){if(null==e)return null;if("object"!=typeof e)throw new Em("Week settings must be an object");if(!iv(e.firstDay,1,7)||!iv(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(e=>!iv(e,1,7)))throw new Em("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function iv(e,t,n){return Zg(e)&&e>=t&&e<=n}function rv(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return t=e<0?"-"+(""+-e).padStart(n,"0"):(""+e).padStart(n,"0"),t}function av(e){return Qg(e)||null===e||""===e?void 0:parseInt(e,10)}function ov(e){return Qg(e)||null===e||""===e?void 0:parseFloat(e)}function sv(e){if(!Qg(e)&&null!==e&&""!==e){const t=1e3*parseFloat("0."+e);return Math.floor(t)}}function lv(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"round";const i=10**t;switch(n){case"expand":return e>0?Math.ceil(e*i)/i:Math.floor(e*i)/i;case"trunc":return Math.trunc(e*i)/i;case"round":return Math.round(e*i)/i;case"floor":return Math.floor(e*i)/i;case"ceil":return Math.ceil(e*i)/i;default:throw new RangeError("Value rounding ".concat(n," is out of range"))}}function cv(e){return e%4==0&&(e%100!=0||e%400==0)}function uv(e){return cv(e)?366:365}function dv(e,t){const n=function(e){return e-12*Math.floor(e/12)}(t-1)+1;return 2===n?cv(e+(t-n)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function hv(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function fv(e,t,n){return-Vg(Ug(e,1,t),n)+t-1}function pv(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const i=fv(e,t,n),r=fv(e+1,t,n);return(uv(e)-i+r)/7}function mv(e){return e>99?e:e>Rg.twoDigitCutoffYear?1900+e:2e3+e}
2function gv(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;const r=new Date(e),o={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(o.timeZone=i);const s=a({timeZoneName:t},o),l=new Intl.DateTimeFormat(n,s).formatToParts(r).find(e=>"timezonename"===e.type.toLowerCase());return l?l.value:null}function vv(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const i=parseInt(t,10)||0;return 60*n+(n<0||Object.is(n,-0)?-i:i)}function yv(e){const t=Number(e);if("boolean"==typeof e||""===e||!Number.isFinite(t))throw new Em("Invalid unit value ".concat(e));return t}function bv(e,t){const n={};for(const i in e)if(tv(e,i)){const r=e[i];if(null==r)continue;n[t(i)]=yv(r)}return n}function Av(e,t){const n=Math.trunc(Math.abs(e/60)),i=Math.trunc(Math.abs(e%60)),r=e>=0?"+":"-";switch(t){case"short":return"".concat(r).concat(rv(n,2),":").concat(rv(i,2));case"narrow":return"".concat(r).concat(n).concat(i>0?":".concat(i):"");case"techie":return"".concat(r).concat(rv(n,2)).concat(rv(i,2));default:throw new RangeError("Value format ".concat(t," is out of range for property format"))}}function Ev(e){return function(e){return["hour","minute","second","millisecond"].reduce((t,n)=>(t[n]=e[n],t),{})}(e)}const Tv=["January","February","March","April","May","June","July","August","September","October","November","December"],wv=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Sv=["J","F","M","A","M","J","J","A","S","O","N","D"];function Cv(e){switch(e){case"narrow":return[...Sv];case"short":return[...wv];case"long":return[...Tv];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const kv=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],xv=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Nv=["M","T","W","T","F","S","S"];function _v(e){switch(e){case"narrow":return[...Nv];case"short":return[...xv];case"long":return[...kv];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Iv=["AM","PM"],Ov=["Before Christ","Anno Domini"],Dv=["BC","AD"],Rv=["B","A"];function Pv(e){switch(e){case"narrow":return[...Rv];case"short":return[...Dv];case"long":return[...Ov];default:return null}}function Lv(e,t){let n="";for(const i of e)i.literal?n+=i.val:n+=t(i.val);return n}const Mv={D:km,DD:xm,DDD:_m,DDDD:Im,t:Om,tt:Dm,ttt:Rm,tttt:Pm,T:Lm,TT:Mm,TTT:Fm,TTTT:Um,f:Bm,ff:Vm,fff:Km,ffff:Gm,F:jm,FF:Hm,FFF:Wm,FFFF:qm};class Fv{static create(e){return new Fv(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}static parseFormat(e){let t=null,n="",i=!1;const r=[];for(let a=0;a<e.length;a++){const o=e.charAt(a);"'"===o?((n.length>0||i)&&r.push({literal:i||/^\s+$/.test(n),val:""===n?"'":n}),t=null,n="",i=!i):i||o===t?n+=o:(n.length>0&&r.push({literal:/^\s+$/.test(n),val:n}),n=o,t=o)}return n.length>0&&r.push({literal:i||/^\s+$/.test(n),val:n}),r}static macroTokenToFormatOpts(e){return Mv[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,a(a({},this.opts),t)).format()}dtFormatter(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.loc.dtFormatter(e,a(a({},this.opts),t))}formatDateTime(e,t){return this.dtFormatter(e,t).format()}formatDateTimeParts(e,t){return this.dtFormatter(e,t).formatToParts()}formatInterval(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t){return this.dtFormatter(e,t).resolvedOptions()}num(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;if(this.opts.forceSimple)return rv(e,t);const i=a({},this.opts);return t>0&&(i.padTo=t),n&&(i.signDisplay=n),this.loc.numberFormatter(i).format(e)}formatDateTimeFromString(e,t){const n="en"===this.loc.listingMode(),i=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,r=(t,n)=>this.loc.extract(e,t,n),a=t=>e.isOffsetFixed&&0===e.offset&&t.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,t.format):"",o=(t,i)=>n?function(e,t){return Cv(t)[e.month-1]}(e,t):r(i?{month:t}:{month:t,day:"numeric"},"month"),s=(t,i)=>n?function(e,t){return _v(t)[e.weekday-1]}(e,t):r(i?{weekday:t}:{weekday:t,month:"long",day:"numeric"},"weekday"),l=t=>{const n=Fv.macroTokenToFormatOpts(t);return n?this.formatWithSystemDefault(e,n):t},c=t=>n?function(e,t){return Pv(t)[e.year<0?0:1]}(e,t):r({era:t},"era");return Lv(Fv.parseFormat(t),t=>{switch(t){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12==0?12:e.hour%12);case"hh":return this.num(e.hour%12==0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return a({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return a({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return a({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return n?function(e){return Iv[e.hour<12?0:1]}(e):r({hour:"numeric",hourCycle:"h12"},"dayperiod");case"d":return i?r({day:"numeric"},"day"):this.num(e.day);case"dd":return i?r({day:"2-digit"},"day"):this.num(e.day,2);case"c":case"E":return this.num(e.weekday);case"ccc":return s("short",!0);case"cccc":return s("long",!0);case"ccccc":return s("narrow",!0);case"EEE":return s("short",!1);case"EEEE":return s("long",!1);case"EEEEE":return s("narrow",!1);case"L":return i?r({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return i?r({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return o("short",!0);case"LLLL":return o("long",!0);case"LLLLL":return o("narrow",!0);case"M":return i?r({month:"numeric"},"month"):this.num(e.month);case"MM":return i?r({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return o("short",!1);case"MMMM":return o("long",!1);case"MMMMM":return o("narrow",!1);case"y":return i?r({year:"numeric"},"year"):this.num(e.year);case"yy":return i?r({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return i?r({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return i?r({year:"numeric"},"year"):this.num(e.year,6);case"G":return c("short");case"GG":return c("long");case"GGGGG":return c("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);
2case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return l(t)}})}formatDurationFromString(e,t){const n="negativeLargestOnly"===this.opts.signMode?-1:1,i=e=>{switch(e[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},r=Fv.parseFormat(t),a=r.reduce((e,t)=>{let n=t.literal,i=t.val;return n?e:e.concat(i)},[]),o=e.shiftTo(...a.map(i).filter(e=>e));return Lv(r,((e,t)=>r=>{const a=i(r);if(a){const i=t.isNegativeDuration&&a!==t.largestUnit?n:1;let o;return o="negativeLargestOnly"===this.opts.signMode&&a!==t.largestUnit?"never":"all"===this.opts.signMode?"always":"auto",this.num(e.get(a)*i,r.length,o)}return r})(o,{isNegativeDuration:o<0,largestUnit:Object.keys(o.values)[0]}))}}const Uv=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Bv(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const i=t.reduce((e,t)=>e+t.source,"");return RegExp("^".concat(i,"$"))}function jv(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return e=>t.reduce((t,n)=>{let i=(0,x.A)(t,3),r=i[0],o=i[1],s=i[2];const l=n(e,s),c=(0,x.A)(l,3),u=c[0],d=c[1],h=c[2];return[a(a({},r),u),d||o,h]},[{},null,1]).slice(0,2)}function Vv(e){if(null==e)return[null,null];for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];for(const t of n){var r=(0,x.A)(t,2);const n=r[0],i=r[1],a=n.exec(e);if(a)return i(a)}return[null,null]}function Hv(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(e,n)=>{const i={};let r;for(r=0;r<t.length;r++)i[t[r]]=av(e[n+r]);return[i,null,n+r]}}const zv=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,Kv="(?:".concat(zv.source,"?(?:\\[(").concat(Uv.source,")\\])?)?"),Wv=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Gv=RegExp("".concat(Wv.source).concat(Kv)),qv=RegExp("(?:[Tt]".concat(Gv.source,")?")),Yv=Hv("weekYear","weekNumber","weekDay"),Qv=Hv("year","ordinal"),Xv=RegExp("".concat(Wv.source," ?(?:").concat(zv.source,"|(").concat(Uv.source,"))?")),Zv=RegExp("(?: ".concat(Xv.source,")?"));function Jv(e,t,n){const i=e[t];return Qg(i)?n:av(i)}function $v(e,t){return[{hours:Jv(e,t,0),minutes:Jv(e,t+1,0),seconds:Jv(e,t+2,0),milliseconds:sv(e[t+3])},null,t+4]}function ey(e,t){const n=!e[t]&&!e[t+1],i=vv(e[t+1],e[t+2]);return[{},n?null:vg.instance(i),t+3]}function ty(e,t){return[{},e[t]?eg.create(e[t]):null,t+1]}const ny=RegExp("^T?".concat(Wv.source,"$")),iy=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function ry(e){const t=(0,x.A)(e,9),n=t[0],i=t[1],r=t[2],a=t[3],o=t[4],s=t[5],l=t[6],c=t[7],u=t[8],d="-"===n[0],h=c&&"-"===c[0],f=function(e){return void 0!==e&&(arguments.length>1&&void 0!==arguments[1]&&arguments[1]||e&&d)?-e:e};return[{years:f(ov(i)),months:f(ov(r)),weeks:f(ov(a)),days:f(ov(o)),hours:f(ov(s)),minutes:f(ov(l)),seconds:f(ov(c),"-0"===c),milliseconds:f(sv(u),h)}]}const ay={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function oy(e,t,n,i,r,a,o){const s={year:2===t.length?mv(av(t)):av(t),month:wv.indexOf(n)+1,day:av(i),hour:av(r),minute:av(a)};return o&&(s.second=av(o)),e&&(s.weekday=e.length>3?kv.indexOf(e)+1:xv.indexOf(e)+1),s}const sy=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function ly(e){const t=(0,x.A)(e,12),n=t[1],i=t[2],r=t[3],a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],d=t[10
2],h=t[11],f=oy(n,a,r,i,o,s,l);let p;return p=c?ay[c]:u?0:vv(d,h),[f,new vg(p)]}const cy=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,uy=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,dy=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function hy(e){const t=(0,x.A)(e,8),n=t[1],i=t[2],r=t[3];return[oy(n,t[4],r,i,t[5],t[6],t[7]),vg.utcInstance]}function fy(e){const t=(0,x.A)(e,8),n=t[1],i=t[2],r=t[3],a=t[4],o=t[5],s=t[6];return[oy(n,t[7],i,r,a,o,s),vg.utcInstance]}const py=Bv(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,qv),my=Bv(/(\d{4})-?W(\d\d)(?:-?(\d))?/,qv),gy=Bv(/(\d{4})-?(\d{3})/,qv),vy=Bv(Gv),yy=jv(function(e,t){return[{year:Jv(e,t),month:Jv(e,t+1,1),day:Jv(e,t+2,1)},null,t+3]},$v,ey,ty),by=jv(Yv,$v,ey,ty),Ay=jv(Qv,$v,ey,ty),Ey=jv($v,ey,ty),Ty=jv($v),wy=Bv(/(\d{4})-(\d\d)-(\d\d)/,Zv),Sy=Bv(Xv),Cy=jv($v,ey,ty),ky="Invalid Duration",xy={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},Ny=a({years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6}},xy),_y=a({years:{quarters:4,months:12,weeks:52.1775,days:365.2425,hours:8765.82,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:13.044375,days:91.310625,hours:2191.455,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:4.3481250000000005,days:30.436875,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3}},xy),Iy=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Oy=Iy.slice(0).reverse();function Dy(e,t){const n={values:arguments.length>2&&void 0!==arguments[2]&&arguments[2]?t.values:a(a({},e.values),t.values||{}),loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new My(n)}function Ry(e,t){var n;let i=null!==(n=t.milliseconds)&&void 0!==n?n:0;for(const n of Oy.slice(1))t[n]&&(i+=t[n]*e[n].milliseconds);return i}function Py(e,t){const n=Ry(e,t)<0?-1:1;Iy.reduceRight((i,r)=>{if(Qg(t[r]))return i;if(i){const a=t[i]*n,o=e[r][i],s=Math.floor(a/o);t[r]+=s*n,t[i]-=s*o*n}return r},null),Iy.reduce((n,i)=>{if(Qg(t[i]))return n;if(n){const r=t[n]%1;t[n]-=r,t[i]+=r*e[n][i]}return i},null)}function Ly(e){const t={};for(const i of Object.entries(e)){var n=(0,x.A)(i,2);const e=n[0],r=n[1];0!==r&&(t[e]=r)}return t}class My{constructor(e){const t="longterm"===e.conversionAccuracy||!1;let n=t?_y:Ny;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||mg.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(e,t){return My.fromObject({milliseconds:e},t)}static fromObject(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==e||"object"!=typeof e)throw new Em("Duration.fromObject: argument expected to be an object, got ".concat(null===e?"null":typeof e));return new My({values:bv(e,My.normalizeUnit),loc:mg.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(Xg(e))return My.fromMillis(e);if(My.isDuration(e))return e;if("object"==typeof e)return My.fromObject(e);throw new Em("Unknown duration argument ".concat(e," of type ").concat(typeof e))}static fromISO(e,t){const n=function(e){return Vv(e,[iy,ry])}(e),i=(0,x.A)(n,1)[0];return i?My.fromObject(i,t):My.invalid("unparsable",'the input "'.concat(e,"\" can't be parsed as ISO 8601"))}static fromISOTime(e,t){const n=function(e){return Vv(e,[ny,Ty])}(e),i=(0,x.A)(n,1)[0];return i?My.fromObject(i,t):My.invalid("unparsable",'the input "'.concat(e,"\" can't be parsed as ISO 8601"))}
2static invalid(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!e)throw new Em("need to specify a reason the Duration is invalid");const n=e instanceof Pg?e:new Pg(e,t);if(Rg.throwOnInvalid)throw new ym(n);return new My({invalid:n})}static normalizeUnit(e){const t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e?e.toLowerCase():e];if(!t)throw new Am(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=a(a({},t),{},{floor:!1!==t.round&&!1!==t.floor});return this.isValid?Fv.create(this.loc,n).formatDurationFromString(this,e):ky}toHuman(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.isValid)return ky;const t=!1!==e.showZeros,n=Iy.map(n=>{const i=this.values[n];return Qg(i)||0===i&&!t?null:this.loc.numberFormatter(a(a({style:"unit",unitDisplay:"long"},e),{},{unit:n.slice(0,-1)})).format(i)}).filter(e=>e);return this.loc.listFormatter(a({type:"conjunction",style:e.listStyle||"narrow"},e)).format(n)}toObject(){return this.isValid?a({},this.values):{}}toISO(){if(!this.isValid)return null;let e="P";return 0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=lv(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e}toISOTime(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.isValid)return null;const t=this.toMillis();return t<0||t>=864e5?null:(e=a(a({suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended"},e),{},{includeOffset:!1}),_b.fromMillis(t,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?"Duration { values: ".concat(JSON.stringify(this.values)," }"):"Duration { Invalid, reason: ".concat(this.invalidReason," }")}toMillis(){return this.isValid?Ry(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=My.fromDurationLike(e),n={};for(const e of Iy)(tv(t.values,e)||tv(this.values,e))&&(n[e]=t.get(e)+this.get(e));return Dy(this,{values:n},!0)}minus(e){if(!this.isValid)return this;const t=My.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=yv(e(this.values[n],n));return Dy(this,{values:t},!0)}get(e){return this[My.normalizeUnit(e)]}set(e){return this.isValid?Dy(this,{values:a(a({},this.values),bv(e,My.normalizeUnit))}):this}reconfigure(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.locale,n=e.numberingSystem,i=e.conversionAccuracy,r=e.matrix;return Dy(this,{loc:this.loc.clone({locale:t,numberingSystem:n}),matrix:r,conversionAccuracy:i})}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return Py(this.matrix,e),Dy(this,{values:e},!0)}rescale(){return this.isValid?Dy(this,{values:Ly(this.normalize().shiftToAll().toObject())},!0):this}shiftTo(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!this.isValid)return this;if(0===t.length)return this;t=t.map(e=>My.normalizeUnit(e));const i={},r={},a=this.toObject();let o;for(const e of Iy)if(t.indexOf(e)>=0){o=e;let t=0;for(const n in r)t+=this.matrix[n][e]*r[n],r[n]=0;Xg(a[e])&&(t+=a[e]);const n=Math.trunc(t);i[e]=n,r[e]=(1e3*t-1e3*n)/1e3}
2else Xg(a[e])&&(r[e]=a[e]);for(const e in r)0!==r[e]&&(i[o]+=e===o?r[e]:r[e]/this.matrix[o][e]);return Py(this.matrix,i),Dy(this,{values:i},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=0===this.values[t]?0:-this.values[t];return Dy(this,{values:e},!0)}removeZeros(){return this.isValid?Dy(this,{values:Ly(this.values)},!0):this}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid)return!1;if(!this.loc.equals(e.loc))return!1;function t(e,t){return void 0===e||0===e?void 0===t||0===t:e===t}for(const n of Iy)if(!t(this.values[n],e.values[n]))return!1;return!0}}const Fy="Invalid Interval";class Uy{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!e)throw new Em("need to specify a reason the Interval is invalid");const n=e instanceof Pg?e:new Pg(e,t);if(Rg.throwOnInvalid)throw new vm(n);return new Uy({invalid:n})}static fromDateTimes(e,t){const n=Ib(e),i=Ib(t),r=function(e,t){return e&&e.isValid?t&&t.isValid?t<e?Uy.invalid("end before start","The end of an interval must be after its start, but you had start=".concat(e.toISO()," and end=").concat(t.toISO())):null:Uy.invalid("missing or invalid end"):Uy.invalid("missing or invalid start")}(n,i);return null==r?new Uy({start:n,end:i}):r}static after(e,t){const n=My.fromDurationLike(t),i=Ib(e);return Uy.fromDateTimes(i,i.plus(n))}static before(e,t){const n=My.fromDurationLike(t),i=Ib(e);return Uy.fromDateTimes(i.minus(n),i)}static fromISO(e,t){const n=(e||"").split("/",2),i=(0,x.A)(n,2),r=i[0],a=i[1];if(r&&a){let e,n,i,o;try{e=_b.fromISO(r,t),n=e.isValid}catch(a){n=!1}try{i=_b.fromISO(a,t),o=i.isValid}catch(a){o=!1}if(n&&o)return Uy.fromDateTimes(e,i);if(n){const n=My.fromISO(a,t);if(n.isValid)return Uy.after(e,n)}else if(o){const e=My.fromISO(r,t);if(e.isValid)return Uy.before(i,e)}}return Uy.invalid("unparsable",'the input "'.concat(e,"\" can't be parsed as ISO 8601"))}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return null===this.invalidReason}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"milliseconds";return this.isValid?this.toDuration(e).get(e):NaN}count(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"milliseconds",t=arguments.length>1?arguments[1]:void 0;if(!this.isValid)return NaN;const n=this.start.startOf(e,t);let i;return i=null!=t&&t.useLocaleWeeks?this.end.reconfigure({locale:n.locale}):this.end,i=i.startOf(e,t),Math.floor(i.diff(n,e).get(e))+(i.valueOf()!==this.end.valueOf())}hasSame(e){return!!this.isValid&&(this.isEmpty()||this.e.minus(1).hasSame(this.s,e))}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return!!this.isValid&&this.s>e}isBefore(e){return!!this.isValid&&this.e<=e}contains(e){return!!this.isValid&&this.s<=e&&this.e>e}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.start,n=e.end;return this.isValid?Uy.fromDateTimes(t||this.s,n||this.e):this}splitAt(){if(!this.isValid)return[];for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const i=t.map(Ib).filter(e=>this.contains(e)).sort((e,t)=>
2e.toMillis()-t.toMillis()),r=[];let a=this.s,o=0;for(;a<this.e;){const e=i[o]||this.e,t=+e>+this.e?this.e:e;r.push(Uy.fromDateTimes(a,t)),a=t,o+=1}return r}splitBy(e){const t=My.fromDurationLike(e);if(!this.isValid||!t.isValid||0===t.as("milliseconds"))return[];let n,i=this.s,r=1;const a=[];for(;i<this.e;){const e=this.start.plus(t.mapUnits(e=>e*r));n=+e>+this.e?this.e:e,a.push(Uy.fromDateTimes(i,n)),i=n,r+=1}return a}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return!!this.isValid&&+this.e===+e.s}abutsEnd(e){return!!this.isValid&&+e.e===+this.s}engulfs(e){return!!this.isValid&&this.s<=e.s&&this.e>=e.e}equals(e){return!(!this.isValid||!e.isValid)&&this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,n=this.e<e.e?this.e:e.e;return t>=n?null:Uy.fromDateTimes(t,n)}union(e){if(!this.isValid)return this;const t=this.s<e.s?this.s:e.s,n=this.e>e.e?this.e:e.e;return Uy.fromDateTimes(t,n)}static merge(e){const t=e.sort((e,t)=>e.s-t.s).reduce((e,t)=>{let n=(0,x.A)(e,2),i=n[0],r=n[1];return r?r.overlaps(t)||r.abutsStart(t)?[i,r.union(t)]:[i.concat([r]),t]:[i,t]},[[],null]),n=(0,x.A)(t,2),i=n[0],r=n[1];return r&&i.push(r),i}static xor(e){let t=null,n=0;const i=[],r=e.map(e=>[{time:e.s,type:"s"},{time:e.e,type:"e"}]),a=Array.prototype.concat(...r).sort((e,t)=>e.time-t.time);for(const e of a)n+="s"===e.type?1:-1,1===n?t=e.time:(t&&+t!==+e.time&&i.push(Uy.fromDateTimes(t,e.time)),t=null);return Uy.merge(i)}difference(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Uy.xor([this].concat(t)).map(e=>this.intersection(e)).filter(e=>e&&!e.isEmpty())}toString(){return this.isValid?"[".concat(this.s.toISO()," â ").concat(this.e.toISO(),")"):Fy}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?"Interval { start: ".concat(this.s.toISO(),", end: ").concat(this.e.toISO()," }"):"Interval { Invalid, reason: ".concat(this.invalidReason," }")}toLocaleString(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:km,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.isValid?Fv.create(this.s.loc.clone(t),e).formatInterval(this):Fy}toISO(e){return this.isValid?"".concat(this.s.toISO(e),"/").concat(this.e.toISO(e)):Fy}toISODate(){return this.isValid?"".concat(this.s.toISODate(),"/").concat(this.e.toISODate()):Fy}toISOTime(e){return this.isValid?"".concat(this.s.toISOTime(e),"/").concat(this.e.toISOTime(e)):Fy}toFormat(e){let t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).separator,n=void 0===t?" â ":t;return this.isValid?"".concat(this.s.toFormat(e)).concat(n).concat(this.e.toFormat(e)):Fy}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):My.invalid(this.invalidReason)}mapEndpoints(e){return Uy.fromDateTimes(e(this.s),e(this.e))}}class By{static hasDST(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Rg.defaultZone;const t=_b.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return eg.isValidZone(e)}static normalizeZone(e){return bg(e,Rg.defaultZone)}static getStartOfWeek(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.locale,n=void 0===t?null:t,i=e.locObj;return((void 0===i?null:i)||mg.create(n)).getStartOfWeek()}static getMinimumDaysInFirstWeek(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.locale,n=void 0===t?null:t,i=e.locObj;return((void 0===i?null:i)||mg.create(n)).getMinDaysInFirstWeek()}static getWeekendWeekdays(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.locale,n=void 0===t?null:t,i=e.locObj;return((void 0===i?null:i)||mg.create(n)).getWeekendDays().slice()}static months(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"long",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.locale,i=void 0===n?null:n,r=t.numberingSystem,a=void 0===r?null:r,o=t.locObj,s=void 0===o?null:o,l=t.outputCalendar,c=void 0===l?"gregory":l;return(s||mg.create(i,a,c)).months(e)}static monthsFormat(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"long",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.locale,i=void 0===n?null:n,r=t.numberingSystem,a=void 0===r?null:r,o=t.locObj,s=void 0===o?null:o,l=t.outputCalendar,c=void 0===l?"gregory":l;return(s||mg.create(i,a,c)).months(e,!0)}static weekdays(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"long",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.locale,i=void 0===n?null:n,r=t.numberingSystem,a=void 0===r?null:r,o=t.locObj;
2return((void 0===o?null:o)||mg.create(i,a,null)).weekdays(e)}static weekdaysFormat(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"long",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.locale,i=void 0===n?null:n,r=t.numberingSystem,a=void 0===r?null:r,o=t.locObj;return((void 0===o?null:o)||mg.create(i,a,null)).weekdays(e,!0)}static meridiems(){let e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).locale,t=void 0===e?null:e;return mg.create(t).meridiems()}static eras(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"short",t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).locale,n=void 0===t?null:t;return mg.create(n,null,"gregory").eras(e)}static features(){return{relative:Jg(),localeWeek:$g()}}}function jy(e,t){const n=e=>e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=n(t)-n(e);return Math.floor(My.fromMillis(i).as("days"))}function Vy(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e=>e;return{regex:e,deser:e=>{let n=(0,x.A)(e,1)[0];return t(function(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n<e.length;n++){const i=e.charCodeAt(n);if(-1!==e[n].search(Ag.hanidec))t+=Tg.indexOf(e[n]);else for(const e in Eg){const n=(0,x.A)(Eg[e],2),r=n[0],a=n[1];i>=r&&i<=a&&(t+=i-r)}}return parseInt(t,10)}return t}(n))}}}const Hy=String.fromCharCode(160),zy="[ ".concat(Hy,"]"),Ky=new RegExp(zy,"g");function Wy(e){return e.replace(/\./g,"\\.?").replace(Ky,zy)}function Gy(e){return e.replace(/\./g,"").replace(Ky," ").toLowerCase()}function qy(e,t){return null===e?null:{regex:RegExp(e.map(Wy).join("|")),deser:n=>{let i=(0,x.A)(n,1)[0];return e.findIndex(e=>Gy(i)===Gy(e))+t}}}function Yy(e,t){return{regex:e,deser:e=>{let t=(0,x.A)(e,3);return vv(t[1],t[2])},groups:t}}function Qy(e){return{regex:e,deser:e=>(0,x.A)(e,1)[0]}}const Xy={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};let Zy=null;function Jy(e,t){return Array.prototype.concat(...e.map(e=>function(e,t){if(e.literal)return e;const n=tb(Fv.macroTokenToFormatOpts(e.val),t);return null==n||n.includes(void 0)?e:n}(e,t)))}class $y{constructor(e,t){if(this.locale=e,this.format=t,this.tokens=Jy(Fv.parseFormat(t),e),this.units=this.tokens.map(t=>function(e,t){const n=Sg(t),i=Sg(t,"{2}"),r=Sg(t,"{3}"),a=Sg(t,"{4}"),o=Sg(t,"{6}"),s=Sg(t,"{1,2}"),l=Sg(t,"{1,3}"),c=Sg(t,"{1,6}"),u=Sg(t,"{1,9}"),d=Sg(t,"{2,4}"),h=Sg(t,"{4,6}"),f=e=>{return{regex:RegExp((t=e.val,t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:e=>(0,x.A)(e,1)[0],literal:!0};var t},p=(p=>{if(e.literal)return f(p);switch(p.val){case"G":return qy(t.eras("short"),0);case"GG":return qy(t.eras("long"),0);case"y":return Vy(c);case"yy":case"kk":return Vy(d,mv);case"yyyy":case"kkkk":return Vy(a);case"yyyyy":return Vy(h);case"yyyyyy":return Vy(o);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return Vy(s);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return Vy(i);case"MMM":return qy(t.months("short",!0),1);case"MMMM":return qy(t.months("long",!0),1);case"LLL":return qy(t.months("short",!1),1);case"LLLL":return qy(t.months("long",!1),1);case"o":case"S":return Vy(l);case"ooo":case"SSS":return Vy(r);case"u":return Qy(u);case"uu":return Qy(s);case"uuu":case"E":case"c":return Vy(n);case"a":return qy(t.meridiems(),0);case"EEE":return qy(t.weekdays("short",!1),1);case"EEEE":return qy(t.weekdays("long",!1),1);case"ccc":return qy(t.weekdays("short",!0),1);case"cccc":return qy(t.weekdays("long",!0),1);case"Z":case"ZZ":return Yy(new RegExp("([+-]".concat(s.source,")(?::(").concat(i.source,"))?")),2);case"ZZZ":return Yy(new RegExp("([+-]".concat(s.source,")(").concat(i.source,")?")),2);case"z":return Qy(/[a-z_+-/]{1,256}?/i);case" ":return Qy(/[^\S\n\r]/);default:return f(p)}})(e)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"};return p.token=e,p}(t,e)),this.disqualifyingUnit=this.units.find(e=>e.invalidReason),!this.disqualifyingUnit){const e=function(e){const t=e.map(e=>e.regex).reduce((e,t)=>
2"".concat(e,"(").concat(t.source,")"),"");return["^".concat(t,"$"),e]}(this.units),t=(0,x.A)(e,2),n=t[0],i=t[1];this.regex=RegExp(n,"i"),this.handlers=i}}explainFromTokens(e){if(this.isValid){const t=function(e,t,n){const i=e.match(t);if(i){const e={};let t=1;for(const r in n)if(tv(n,r)){const a=n[r],o=a.groups?a.groups+1:1;!a.literal&&a.token&&(e[a.token.val[0]]=a.deser(i.slice(t,t+o))),t+=o}return[i,e]}return[i,{}]}(e,this.regex,this.handlers),n=(0,x.A)(t,2),i=n[0],r=n[1],a=r?function(e){let t,n=null;Qg(e.z)||(n=eg.create(e.z)),Qg(e.Z)||(n||(n=new vg(e.Z)),t=e.Z),Qg(e.q)||(e.M=3*(e.q-1)+1),Qg(e.h)||(e.h<12&&1===e.a?e.h+=12:12===e.h&&0===e.a&&(e.h=0)),0===e.G&&e.y&&(e.y=-e.y),Qg(e.u)||(e.S=sv(e.u));const i=Object.keys(e).reduce((t,n)=>{const i=(e=>{switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}})(n);return i&&(t[i]=e[n]),t},{});return[i,n,t]}(r):[null,null,void 0],o=(0,x.A)(a,3),s=o[0],l=o[1],c=o[2];if(tv(r,"a")&&tv(r,"H"))throw new bm("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:i,matches:r,result:s,zone:l,specificOffset:c}}return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invali
2dReason:null}}function eb(e,t,n){return new $y(e,n).explainFromTokens(t)}function tb(e,t){if(!e)return null;const n=Fv.create(t,e).dtFormatter((Zy||(Zy=_b.fromMillis(1555555555555)),Zy)),i=n.formatToParts(),r=n.resolvedOptions();return i.map(t=>function(e,t,n){const i=e.type,r=e.value;if("literal"===i){const e=/^\s+$/.test(r);return{literal:!e,val:e?" ":r}}const a=t[i];let o=i;"hour"===i&&(o=null!=t.hour12?t.hour12?"hour12":"hour24":null!=t.hourCycle?"h11"===t.hourCycle||"h12"===t.hourCycle?"hour12":"hour24":n.hour12?"hour12":"hour24");let s=Xy[o];if("object"==typeof s&&(s=s[a]),s)return{literal:!1,val:s}}(t,e,r))}const nb="Invalid DateTime",ib=864e13;function rb(e){return new Pg("unsupported zone",'the zone "'.concat(e.name,'" is not supported'))}function ab(e){return null===e.weekData&&(e.weekData=Hg(e.c)),e.weekData}function ob(e){return null===e.localWeekData&&(e.localWeekData=Hg(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function sb(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new _b(a(a(a({},n),t),{},{old:n}))}function lb(e,t,n){let i=e-60*t*1e3;const r=n.offset(i);if(t===r)return[i,t];i-=60*(r-t)*1e3;const a=n.offset(i);return r===a?[i,r]:[e-60*Math.min(r,a)*1e3,Math.max(r,a)]}function cb(e,t){const n=new Date(e+=60*t*1e3);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function ub(e,t,n){return lb(hv(e),t,n)}function db(e,t){const n=e.o,i=e.c.year+Math.trunc(t.years),r=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),o=a(a({},e.c),{},{year:i,month:r,day:Math.min(e.c.day,dv(i,r))+Math.trunc(t.days)+7*Math.trunc(t.weeks)}),s=My.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds");let l=lb(hv(o),n,e.zone),c=(0,x.A)(l,2),u=c[0],d=c[1];return 0!==s&&(u+=s,d=e.zone.offset(u)),{ts:u,o:d}}function hb(e,t,n,i,r,o){const s=n.setZone,l=n.zone;if(e&&0!==Object.keys(e).length||t){const i=t||l,r=_b.fromObject(e,a(a({},n),{},{zone:i,specificOffset:o}));return s?r:r.setZone(l)}return _b.invalid(new Pg("unparsable",'the input "'.concat(r,"\" can't be parsed as ").concat(i)))}function fb(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return e.isValid?Fv.create(mg.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function pb(e,t,n){const i=e.c.year>9999||e.c.year<0;let r="";if(i&&e.c.year>=0&&(r+="+"),r+=rv(e.c.year,i?6:4),"year"===n)return r;if(t){if(r+="-",r+=rv(e.c.month),"month"===n)return r;r+="-"}else if(r+=rv(e.c.month),"month"===n)return r;return r+=rv(e.c.day),r}function mb(e,t,n,i,r,a,o){let s=!n||0!==e.c.millisecond||0!==e.c.second,l="";switch(o){case"day":case"month":case"year":break;default:if(l+=rv(e.c.hour),"hour"===o)break;if(t){if(l+=":",l+=rv(e.c.minute),"minute"===o)break;s&&(l+=":",l+=rv(e.c.second))}else{if(l+=rv(e.c.minute),"minute"===o)break;s&&(l+=rv(e.c.second))}if("second"===o)break;!s||i&&0===e.c.millisecond||(l+=".",l+=rv(e.c.millisecond,3))}return r&&(e.isOffsetFixed&&0===e.offset&&!a?l+="Z":e.o<0?(l+="-",l+=rv(Math.trunc(-e.o/60)),l+=":",l+=rv(Math.trunc(-e.o%60))):(l+="+",l+=rv(Math.trunc(e.o/60)),l+=":",l+=rv(Math.trunc(e.o%60)))),a&&(l+="["+e.zone.ianaName+"]"),l}const gb={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},vb={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},yb={ordinal:1,hour:0,minute:0,second:0,millisecond:0},bb=["year","month","day","hour","minute","second","millisecond"],Ab=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Eb=["year","ordinal","hour","minute","second","millisecond"];function Tb(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new Am(e);return t}function wb(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return Tb(e)}}function Sb(e,t){const n=bg(t.zone,Rg.defaultZone);if(!n.isValid)return _b.invalid(rb(n));const i=mg.fromObject(t);let r,a;
2if(Qg(e.year))r=Rg.now();else{for(const t of bb)Qg(e[t])&&(e[t]=gb[t]);const t=qg(e)||Yg(e);if(t)return _b.invalid(t);const i=function(e){if(void 0===xb&&(xb=Rg.now()),"iana"!==e.type)return e.offset(xb);const t=e.name;let n=Nb.get(t);return void 0===n&&(n=e.offset(xb),Nb.set(t,n)),n}(n);var o=ub(e,i,n),s=(0,x.A)(o,2);r=s[0],a=s[1]}return new _b({ts:r,zone:n,loc:i,o:a})}function Cb(e,t,n){const i=!!Qg(n.round)||n.round,r=Qg(n.rounding)?"trunc":n.rounding,a=(e,a)=>(e=lv(e,i||n.calendary?0:2,n.calendary?"round":r),t.loc.clone(n).relFormatter(n).format(e,a)),o=i=>n.calendary?t.hasSame(e,i)?0:t.startOf(i).diff(e.startOf(i),i).get(i):t.diff(e,i).get(i);if(n.unit)return a(o(n.unit),n.unit);for(const e of n.units){const t=o(e);if(Math.abs(t)>=1)return a(t,e)}return a(e>t?-0:0,n.units[n.units.length-1])}function kb(e){let t,n={};return e.length>0&&"object"==typeof e[e.length-1]?(n=e[e.length-1],t=Array.from(e).slice(0,e.length-1)):t=Array.from(e),[n,t]}let xb;const Nb=new Map;class _b{constructor(e){const t=e.zone||Rg.defaultZone;let n=e.invalid||(Number.isNaN(e.ts)?new Pg("invalid input"):null)||(t.isValid?null:rb(t));this.ts=Qg(e.ts)?Rg.now():e.ts;let i=null,r=null;if(!n)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t)){var a=[e.old.c,e.old.o];i=a[0],r=a[1]}else{const a=Xg(e.o)&&!e.old?e.o:t.offset(this.ts);i=cb(this.ts,a),n=Number.isNaN(i.year)?new Pg("invalid input"):null,i=n?null:i,r=n?null:a}this._zone=t,this.loc=e.loc||mg.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=i,this.o=r,this.isLuxonDateTime=!0}static now(){return new _b({})}static local(){const e=kb(arguments),t=(0,x.A)(e,2),n=t[0],i=t[1],r=(0,x.A)(i,7);return Sb({year:r[0],month:r[1],day:r[2],hour:r[3],minute:r[4],second:r[5],millisecond:r[6]},n)}static utc(){const e=kb(arguments),t=(0,x.A)(e,2),n=t[0],i=t[1],r=(0,x.A)(i,7),a=r[0],o=r[1],s=r[2],l=r[3],c=r[4],u=r[5],d=r[6];return n.zone=vg.utcInstance,Sb({year:a,month:o,day:s,hour:l,minute:c,second:u,millisecond:d},n)}static fromJSDate(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=(i=e,"[object Date]"===Object.prototype.toString.call(i)?e.valueOf():NaN);var i;if(Number.isNaN(n))return _b.invalid("invalid input");const r=bg(t.zone,Rg.defaultZone);return r.isValid?new _b({ts:n,zone:r,loc:mg.fromObject(t)}):_b.invalid(rb(r))}static fromMillis(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Xg(e))return e<-ib||e>ib?_b.invalid("Timestamp out of range"):new _b({ts:e,zone:bg(t.zone,Rg.defaultZone),loc:mg.fromObject(t)});throw new Em("fromMillis requires a numerical input, but received a ".concat(typeof e," with value ").concat(e))}static fromSeconds(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Xg(e))return new _b({ts:1e3*e,zone:bg(t.zone,Rg.defaultZone),loc:mg.fromObject(t)});throw new Em("fromSeconds requires a numerical input")}static fromObject(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=e||{};const n=bg(t.zone,Rg.defaultZone);if(!n.isValid)return _b.invalid(rb(n));const i=mg.fromObject(t),r=bv(e,wb),a=Gg(r,i),o=a.minDaysInFirstWeek,s=a.startOfWeek,l=Rg.now(),c=Qg(t.specificOffset)?n.offset(l):t.specificOffset,u=!Qg(r.ordinal),d=!Qg(r.year),h=!Qg(r.month)||!Qg(r.day),f=d||h,p=r.weekYear||r.weekNumber;if((f||u)&&p)throw new bm("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(h&&u)throw new bm("Can't mix ordinal dates with month/day");const m=p||r.weekday&&!f;let g,v,y=cb(l,c);m?(g=Ab,v=vb,y=Hg(y,o,s)):u?(g=Eb,v=yb,y=Kg(y)):(g=bb,v=gb);let b=!1;for(const e of g)Qg(r[e])?r[e]=b?v[e]:y[e]:b=!0;const A=m?function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const i=Zg(e.weekYear),r=iv(e.weekNumber,1,pv(e.weekYear,t,n)),a=iv(e.weekday,1,7);return i?r?!a&&Fg("weekday",e.weekday):Fg("week",e.weekNumber):Fg("weekYear",e.weekYear)}(r,o,s):u?function(e){const t=Zg(e.year),n=iv(e.ordinal,1,uv(e.year));return t?!n&&Fg("ordinal",e.ordinal):Fg("year",e.year)}(r):qg(r),E=A||Yg(r);if(E)return _b.invalid(E);const T=ub(m?zg(r,o,s):u?Wg(r):r,c,n),w=(0,x.A)(T,2),S=w[0],C=w[1],k=new _b({ts:S,zone:n,o:C,loc:i});return r.weekday&&f&&e.weekday!==k.weekday?_b.invalid("mismatched weekday","you can't specify both a weekday of ".concat(r.weekday," and a date of ").concat(k.toISO())):k.isValid?k:_b.invalid(k.invalid)}static fromISO(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=function(e){return Vv(e,[py,yy],[my,by],[gy,Ay],[vy,Ey])}(e),i=(0,x.A)(n,2);return hb(i[0],i[1],t,"ISO 8601",e)}static fromRFC2822(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=function(e){return Vv(function(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(e),[sy,ly])}(e),i=(0,x.A)(n,2);return hb(i[0],i[1],t,"RFC 2822",e)}static fromHTTP(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=function(e){return Vv(e,[cy,hy],[uy,hy],[dy,fy])}(e),i=(0,x.A)(n,2);return hb(i[0],i[1],t,"HTTP",t)}static fromFormat(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(Qg(e)||Qg(t))throw new Em("fromFormat requires an input string and a format");const i=n.locale,r=void 0===i?null:i,a=n.numberingSystem,o=void 0===a?null:a,s=function(e,t,n){const i=eb(e,t,n);return[i.result,i.zone,i.specificOffset,i.invalidReason]}(mg.fromOpts({locale:r,numberingSystem:o,defaultToEN:!0}),e,t),l=(0,x.A)(s,4),c=l[0],u=l[1],d=l[2],h=l[3];return h?_b.invalid(h):hb(c,u,n,"format ".concat(t),e,d)}static fromString(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return _b.fromFormat(e,t,n)}static fromSQL(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=function(e){return Vv(e,[wy,yy],[Sy,Cy])}(e),i=(0,x.A)(n,2);return hb(i[0],i[1],t,"SQL",e)}
2static invalid(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!e)throw new Em("need to specify a reason the DateTime is invalid");const n=e instanceof Pg?e:new Pg(e,t);if(Rg.throwOnInvalid)throw new gm(n);return new _b({invalid:n})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=tb(e,mg.fromObject(t));return n?n.map(e=>e?e.val:null).join(""):null}static expandFormat(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Jy(Fv.parseFormat(e),mg.fromObject(t)).map(e=>e.val).join("")}static resetCache(){xb=void 0,Nb.clear()}get(e){return this[e]}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?ab(this).weekYear:NaN}get weekNumber(){return this.isValid?ab(this).weekNumber:NaN}get weekday(){return this.isValid?ab(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?ob(this).weekday:NaN}get localWeekNumber(){return this.isValid?ob(this).weekNumber:NaN}get localWeekYear(){return this.isValid?ob(this).weekYear:NaN}get ordinal(){return this.isValid?Kg(this.c).ordinal:NaN}get monthShort(){return this.isValid?By.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?By.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?By.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?By.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return!this.isOffsetFixed&&(this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset)}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const e=864e5,t=6e4,n=hv(this.c),i=this.zone.offset(n-e),r=this.zone.offset(n+e),a=this.zone.offset(n-i*t),o=this.zone.offset(n-r*t);if(a===o)return[this];const s=n-a*t,l=n-o*t,c=cb(s,a),u=cb(l,o);return c.hour===u.hour&&c.minute===u.minute&&c.second===u.second&&c.millisecond===u.millisecond?[sb(this,{ts:s}),sb(this,{ts:l})]:[this]}get isInLeapYear(){return cv(this.year)}get daysInMonth(){return dv(this.year,this.month)}get daysInYear(){return this.isValid?uv(this.year):NaN}get weeksInWeekYear(){return this.isValid?pv(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?pv(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=Fv.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t.locale,numberingSystem:t.numberingSystem,outputCalendar:t.calendar}}toUTC(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.setZone(vg.instance(e),t)}toLocal(){return this.setZone(Rg.defaultZone)}setZone(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.keepLocalTime,i=void 0!==n&&n,r=t.keepCalendarTime,a=void 0!==r&&r;if((e=bg(e,Rg.defaultZone)).equals(this.zone))return this;if(e.isValid){let t=this.ts;if(i||a){const n=e.offset(this.ts);var o=ub(this.toObject(),n,e);t=(0,x.A)(o,1)[0]}return sb(this,{ts:t,zone:e})}return _b.invalid(rb(e))}reconfigure(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.locale,n=e.numberingSystem,i=e.outputCalendar;return sb(this,{loc:this.loc.clone({locale:t,numberingSystem:n,outputCalendar:i})})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=bv(e,wb),n=Gg(t,this.loc),i=n.minDaysInFirstWeek,r=n.startOfWeek,o=!Qg(t.weekYear)||!Qg(t.weekNumber)||!Qg(t.weekday),s=!
2Qg(t.ordinal),l=!Qg(t.year),c=!Qg(t.month)||!Qg(t.day),u=l||c,d=t.weekYear||t.weekNumber;if((u||s)&&d)throw new bm("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(c&&s)throw new bm("Can't mix ordinal dates with month/day");let h;o?h=zg(a(a({},Hg(this.c,i,r)),t),i,r):Qg(t.ordinal)?(h=a(a({},this.toObject()),t),Qg(t.day)&&(h.day=Math.min(dv(h.year,h.month),h.day))):h=Wg(a(a({},Kg(this.c)),t));const f=ub(h,this.o,this.zone),p=(0,x.A)(f,2);return sb(this,{ts:p[0],o:p[1]})}plus(e){return this.isValid?sb(this,db(this,My.fromDurationLike(e))):this}minus(e){return this.isValid?sb(this,db(this,My.fromDurationLike(e).negate())):this}startOf(e){let t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).useLocaleWeeks,n=void 0!==t&&t;if(!this.isValid)return this;const i={},r=My.normalizeUnit(e);switch(r){case"years":i.month=1;case"quarters":case"months":i.day=1;case"weeks":case"days":i.hour=0;case"hours":i.minute=0;case"minutes":i.second=0;case"seconds":i.millisecond=0}if("weeks"===r)if(n){const e=this.loc.getStartOfWeek();this.weekday<e&&(i.weekNumber=this.weekNumber-1),i.weekday=e}else i.weekday=1;if("quarters"===r){const e=Math.ceil(this.month/3);i.month=3*(e-1)+1}return this.set(i)}endOf(e,t){return this.isValid?this.plus({[e]:1}).startOf(e,t).minus(1):this}toFormat(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.isValid?Fv.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):nb}toLocaleString(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:km,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.isValid?Fv.create(this.loc.clone(t),e).formatDateTime(this):nb}toLocaleParts(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.isValid?Fv.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.format,n=void 0===t?"extended":t,i=e.suppressSeconds,r=void 0!==i&&i,a=e.suppressMilliseconds,o=void 0!==a&&a,s=e.includeOffset,l=void 0===s||s,c=e.extendedZone,u=void 0!==c&&c,d=e.precision,h=void 0===d?"milliseconds":d;if(!this.isValid)return null;h=Tb(h);const f="extended"===n;let p=pb(this,f,h);return bb.indexOf(h)>=3&&(p+="T"),p+=mb(this,f,r,o,l,u,h),p}toISODate(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.format,n=void 0===t?"extended":t,i=e.precision,r=void 0===i?"day":i;return this.isValid?pb(this,"extended"===n,Tb(r)):null}toISOWeekDate(){return fb(this,"kkkk-'W'WW-c")}toISOTime(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.suppressMilliseconds,n=void 0!==t&&t,i=e.suppressSeconds,r=void 0!==i&&i,a=e.includeOffset,o=void 0===a||a,s=e.includePrefix,l=void 0!==s&&s,c=e.extendedZone,u=void 0!==c&&c,d=e.format,h=void 0===d?"extended":d,f=e.precision,p=void 0===f?"milliseconds":f;return this.isValid?(p=Tb(p),(l&&bb.indexOf(p)>=3?"T":"")+mb(this,"extended"===h,r,n,o,u,p)):null}toRFC2822(){return fb(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return fb(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?pb(this,!0):null}toSQLTime(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.includeOffset,n=void 0===t||t,i=e.includeZone,r=void 0!==i&&i,a=e.includeOffsetSpace,o="HH:mm:ss.SSS";return(r||n)&&((void 0===a||a)&&(o+=" "),r?o+="z":n&&(o+="ZZ")),fb(this,o,!0)}toSQL(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.isValid?"".concat(this.toSQLDate()," ").concat(this.toSQLTime(e)):null}toString(){return this.isValid?this.toISO():nb}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?"DateTime { ts: ".concat(this.toISO(),", zone: ").concat(this.zone.name,", locale: ").concat(this.locale," }"):"DateTime { Invalid, reason: ".concat(this.invalidReason," }")}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.isValid)return{};const t=a({},this.c);return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"milliseconds",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!this.isValid||!e.isValid)return My.invalid("created by diffing an invali
2d DateTime");const i=a({locale:this.locale,numberingSystem:this.numberingSystem},n),r=(l=t,Array.isArray(l)?l:[l]).map(My.normalizeUnit),o=e.valueOf()>this.valueOf(),s=function(e,t,n,i){let r=function(e,t,n){const i=[["years",(e,t)=>t.year-e.year],["quarters",(e,t)=>t.quarter-e.quarter+4*(t.year-e.year)],["months",(e,t)=>t.month-e.month+12*(t.year-e.year)],["weeks",(e,t)=>{const n=jy(e,t);return(n-n%7)/7}],["days",jy]],r={},a=e;let o,s;for(const c of i){var l=(0,x.A)(c,2);const i=l[0],u=l[1];n.indexOf(i)>=0&&(o=i,r[i]=u(e,t),s=a.plus(r),s>t?(r[i]--,(e=a.plus(r))>t&&(s=e,r[i]--,e=a.plus(r))):e=s)}return[e,r,s,o]}(e,t,n),a=(0,x.A)(r,4),o=a[0],s=a[1],l=a[2],c=a[3];const u=t-o,d=n.filter(e=>["hours","minutes","seconds","milliseconds"].indexOf(e)>=0);0===d.length&&(l<t&&(l=o.plus({[c]:1})),l!==o&&(s[c]=(s[c]||0)+u/(l-o)));const h=My.fromObject(s,i);return d.length>0?My.fromMillis(u,i).shiftTo(...d).plus(h):h}(o?this:e,o?e:this,r,i);var l;return o?s.negate():s}diffNow(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"milliseconds",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.diff(_b.now(),e,t)}until(e){return this.isValid?Uy.fromDateTimes(this,e):this}hasSame(e,t,n){if(!this.isValid)return!1;const i=e.valueOf(),r=this.setZone(e.zone,{keepLocalTime:!0});return r.startOf(t,n)<=i&&i<=r.endOf(t,n)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.isValid)return null;const t=e.base||_b.fromObject({},{zone:this.zone}),n=e.padding?this<t?-e.padding:e.padding:0;let i=["years","months","days","hours","minutes","seconds"],r=e.unit;return Array.isArray(e.unit)&&(i=e.unit,r=void 0),Cb(t,this.plus(n),a(a({},e),{},{numeric:"always",units:i,unit:r}))}toRelativeCalendar(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.isValid?Cb(e.base||_b.fromObject({},{zone:this.zone}),this,a(a({},e),{},{numeric:"auto",units:["years","months","days"],calendary:!0})):null}static min(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!t.every(_b.isDateTime))throw new Em("min requires all arguments be DateTimes");return ev(t,e=>e.valueOf(),Math.min)}static max(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!t.every(_b.isDateTime))throw new Em("max requires all arguments be DateTimes");return ev(t,e=>e.valueOf(),Math.max)}static fromFormatExplain(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=n.locale,r=void 0===i?null:i,a=n.numberingSystem,o=void 0===a?null:a;return eb(mg.fromOpts({locale:r,numberingSystem:o,defaultToEN:!0}),e,t)}static fromStringExplain(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return _b.fromFormatExplain(e,t,n)}static buildFormatParser(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=t.locale,i=void 0===n?null:n,r=t.numberingSystem,a=void 0===r?null:r,o=mg.fromOpts({locale:i,numberingSystem:a,defaultToEN:!0});return new $y(o,e)}static fromFormatParser(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(Qg(e)||Qg(t))throw new Em("fromFormatParser requires an input string and a format parser");const i=n.locale,r=void 0===i?null:i,a=n.numberingSystem,o=void 0===a?null:a,s=mg.fromOpts({locale:r,numberingSystem:o,defaultToEN:!0});if(!s.equals(t.locale))throw new Em("fromFormatParser called with a locale of ".concat(s,", ")+"but the format parser was created for ".concat(t.locale));const l=t.explainFromTokens(e),c=l.result,u=l.zone,d=l.specificOffset,h=l.invalidReason;return h?_b.invalid(h):hb(c,u,n,"format ".concat(t.format),e,d)}static get DATE_SHORT(){return km}static get DATE_MED(){return xm}static get DATE_MED_WITH_WEEKDAY(){return Nm}static get DATE_FULL(){return _m}static get DATE_HUGE(){return Im}static get TIME_SIMPLE(){return Om}static get TIME_WITH_SECONDS(){return Dm}static get TIME_WITH_SHORT_OFFSET(){return Rm}static get TIME_WITH_LONG_OFFSET(){return Pm}static get TIME_24_SIMPLE(){return Lm}static get TIME_24_WITH_SECONDS(){return Mm}static get TIME_24_WITH_SHORT_OFFSET(){return Fm}static get TIME_24_WITH_LONG_OFFSET(){return Um}static get DATETIME_SHORT(){return Bm}static get DATETIME_SHORT_WITH_SECONDS(){return jm}static get DATETIME_MED(){return Vm}static get DATETIME_MED_WITH_SECONDS(){return Hm}static get DATETIME_MED_WITH_WEEKDAY(){return zm}static get DATETIME_FULL(){return Km}static get DATETIME_FULL_WITH_SECONDS(){return Wm}static get DATETIME_HUGE(){return Gm}static get DATETIME_HUGE_WITH_SECONDS(){return qm}}function Ib(e){if(_b.isDateTime(e))return e;if(e&&e.valueOf&&Xg(e.valueOf()))return _b.fromJSDate(e);if(e&&"object"==typeof e)return _b.fromObject(e);throw new Em("Unknown datetime argument: ".concat(e,", of type ").concat(typeof e))}function Ob(e,t){return!("live"===e.type&&e.endDate&&e.endDate<t)}function Db(e){const t=e.carouselConfigAndData,n=e.carouselSlide,i=e.position,r=e.metadataPlacement,a=t.formatEndDate,o=t.formatStartDate,
2s=t.formatStartDateWithinWeekAway;return null!=r&&r[i]?(0,wn.jsx)("div",{className:"slide__".concat(i),children:r[i].map(e=>function(e){var t;const i=e.field,r=e.text||n[i]||"",l=e.prefix||"",c=e.suffix||"";let u="slide__".concat(i);null===(t=e.style)||void 0===t||t.split(" ").forEach(e=>{u+=" slide-detail--".concat(e)}),e.onHover&&(u+=" slide__show-on-hover");let d={};switch(e.bgColorOverride&&(d.backgroundColor=e.bgColorOverride),i){case"logo":case"image":if(r)return(0,wn.jsx)("img",{alt:"","aria-hidden":"true",className:u,src:r,style:d},r);break;case"liveBadge":return(0,wn.jsx)("div",{className:"slide__live-badge",style:d,children:"Live"},"live");case"lockIcon":if(n.locked)return(0,wn.jsx)("img",{alt:"lock","aria-hidden":"true",src:"https://www.cbs.com/assets/images/svg/content_lock.svg",className:u},"lock");break;case"playIcon":if(!n.locked&&!n.subscriptionRequired)return(0,wn.jsx)("div",{className:"slide__play ".concat(u),style:d},"play");break;case"subscribeButton":if(n.subscriptionRequired)return(0,wn.jsx)("button",{tabIndex:-1,className:"slide__subscribe",style:d,children:"Subscribe"},"subscribe");break;case"startAndEndTimes":if(n.startDate&&n.endDate){const e=_b.fromSeconds(n.startDate),t=_b.fromSeconds(n.endDate);let i="".concat(e.toFormat("h:mma")," - ").concat(t.toFormat("h:mma")).toLowerCase();const a=_b.now().toUnixInteger();if(n.startDate&&a>n.startDate&&"number"==typeof n.endDate&&a<n.endDate){const e=Math.ceil((n.endDate-a)/60);i+=" (".concat(e,"m left)")}return(0,wn.jsx)("span",{className:u,style:d,children:i},r)}break;case"startDate":if("number"==typeof r){const e=r,t=_b.now().toUnixInteger();if("number"==typeof n.preStartDate&&t>n.preStartDate&&t<e){const t=_b.fromSeconds(e);return(0,wn.jsxs)("div",{className:"slide__pregame-badge",children:["Pregame | ",(0,wn.jsxs)("span",{className:"slide__pregame-badge-event",children:["Event at ",t.toFormat("h:mm a")]})]},"pre-game")}if(t>e&&"number"==typeof n.endDate&&t<n.endDate)return n.href&&window.location.pathname.includes(n.href)?(0,wn.jsx)("div",{className:"slide__watching-badge",children:"Watching"},"live"):(0,wn.jsx)("div",{className:"slide__live-badge",children:"Live"},"live");const i=_b.fromSeconds(r);let a=o||"M/dd/yy";return function(e,t){if(e>t)return!1;const n=_b.fromSeconds(e).startOf("day");return _b.fromSeconds(t).startOf("day").diff(n,"days").days<7}(t,r)&&(a=s||"EEE h:mm a"),(0,wn.jsx)("span",{className:u,style:d,children:i.toFormat(a)},r)}break;case"endDate":if("number"==typeof r){const e=_b.fromSeconds(r);return(0,wn.jsx)("span",{className:u,style:d,children:e.toFormat(a||"M/dd/yy")},r)}break;default:if(r)return(0,wn.jsxs)("span",{className:u,style:d,children:[l,r,c]},r)}return null}(e))},i):null}const Rb="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAIBlWElmTU0AKgAAAAgAAwESAAMAAAABAAEAAAExAAIAAAAkAAAAModpAAQAAAABAAAAVgAAAABBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOSAoTWFjaW50b3NoKQAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAAaADAAQAAAABAAAAAQAAAABmAIuZAAAEjGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNi4wLjAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iCiAgICAgICAgICAgIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIgogICAgICAgICAgICB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iPgogICAgICAgICA8eG1wOkNyZWF0b3JUb29sPkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE5IChNYWNpbnRvc2gpPC94bXA6Q3JlYXRvclRvb2w+CiAgICAgICAgIDx4bXBNTTpEZXJpdmVkRnJvbSByZGY6cGFyc2VUeXBlPSJSZXNvdXJjZSI+CiAgICAgICAgICAgIDxzdFJlZjppbnN0YW5jZUlEPnhtcC5paWQ6NjJkMjY5MjAtM2YzYy00N2VkLWIyYmYtOTBjMmNmMmI2NDQyPC9zdFJlZjppbnN0YW5jZUlEPgogICAgICAgICAgICA8c3RSZWY6ZG9jdW1lbnRJRD5hZG9iZTpkb2NpZDpwaG90b3Nob3A6MjdmYmYxNWUtNzMxMS02NDRmLTgwYmMtMDZhYWRmODU0OWYyPC9zdFJlZjpkb2N1bWVudElEPgogICAgICAgICA8L3htcE1NOkRlcml2ZWRGcm9tPgogICAgICAgICA8eG1wTU06RG9jdW1lbnRJRD54bXAuZGl
2kOjkwQjZEQTA0MjAzNjExRUZCNkM3RkQ0OTA3Q0E3OTJGPC94bXBNTTpEb2N1bWVudElEPgogICAgICAgICA8eG1wTU06SW5zdGFuY2VJRD54bXAuaWlkOjkwQjZEQTAzMjAzNjExRUZCNkM3RkQ0OTA3Q0E3OTJGPC94bXBNTTpJbnN0YW5jZUlEPgogICAgICAgICA8eG1wTU06T3JpZ2luYWxEb2N1bWVudElEPjk2MTQ0NEY0MTU5QUE2NkJCN0Q2RkFBRkI2MzA3NUQxPC94bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ+CiAgICAgICAgIDx0aWZmOk9yaWVudGF0aW9uPjE8L3RpZmY6T3JpZW50YXRpb24+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgr8MRIfAAAAC0lEQVQIHWNgAAIAAAUAAY27m/MAAAAASUVORK5CYII=";function Pb(e){let t=e.alt,n=e.classNames,i=e.src;const r=(0,v.useState)(Rb),a=(0,x.A)(r,2),o=a[0],s=a[1],l=(0,v.useState)("loading"),c=(0,x.A)(l,2),u=c[0],d=c[1],h=(0,v.useState)("loading"),f=(0,x.A)(h,2),p=f[0],m=f[1],g=(0,v.useRef)(null);return(0,v.useEffect)(()=>{const e=g.current,t=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&(s(i),d("loaded"),m("loaded"),t.unobserve(e.target))})},{threshold:.1});return e&&t.observe(e),()=>{e&&t.unobserve(e),t.disconnect()}},[p,i]),(0,wn.jsx)("img",{alt:t,className:"".concat(p," ").concat(n),"data-ll-status":u,"data-src":o,ref:g,src:o})}const Lb=["as","actionName","children","href","trackingData"],Mb=e=>{let t=e.as,n=void 0===t?"a":t,i=e.actionName,r=void 0===i?"trackMenu":i,o=e.children,s=e.href,l=e.trackingData,c=E(e,Lb);const u=n;return(0,wn.jsx)(u,a(a(a({onClick:async()=>{try{await function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;return new Promise((n,i)=>{let r=0;const a=setInterval(()=>{var o;if(void 0!==(null===(o=window)||void 0===o?void 0:o.om))try{var s;null===(s=window)||void 0===s||s.om.trackAction(e,t),clearInterval(a),n(!0)}catch(e){i(e)}r++,10===r&&(clearInterval(a),i("OM not found"))},300)})}(r,l)}catch(e){console.error(e)}}},s&&{href:s}),c),{},{children:o}))};function Fb(e){var t,n,i,r,o,s,l,c,u,d,h,f,p,m,g,y,b,A;const E=e.carouselConfigAndData,T=e.conditionallyRendered,w=e.posRowNum,S=(0,v.useState)(null),C=(0,x.A)(S,2),k=C[0],N=C[1],_=(0,v.useState)(!1),I=(0,x.A)(_,2),O=I[0],D=I[1],R=(0,v.useState)(!0),P=(0,x.A)(R,2),L=P[0],M=P[1],F=(0,v.useState)([]),U=(0,x.A)(F,2),B=U[0],j=U[1],V=(0,v.useRef)(null),H=(0,v.useRef)(null),z=(0,v.useRef)(0),K=(0,v.useRef)(E.carouselSlides.length),W=hm(a({align:"start",inViewThreshold:.25},E.emblaOptions)),G=(0,x.A)(W,2),q=G[0],Y=G[1];(0,v.useLayoutEffect)(()=>{if(K.current=E.carouselSlides.length,!Y)return;let e=null;const t=function(){for(let e=0;e<E.carouselSlides.length;e+=1)if(E.carouselSlides[e].id===H.current)return e;return 0}(),n=Array.from({length:B.length}).map((e,n)=>n+t);function i(){Y&&(D(Y.canScrollPrev()),M(Y.canScrollNext()))}function r(){V.current&&N(V.current.getBoundingClientRect().height/2),e&&clearTimeout(e),e=setTimeout(()=>{Y&&(i(),setTimeout(()=>{if(Y){const e=Y.slidesInView();Array.isArray(e)&&e.length&&j(e)}},100))},250)}function a(){if(i(),Y){const e=Y.slidesInView();Array.isArray(e)&&e.length>0&&j(e);let t=null===H.current?0:function(){var e;if(!Y)return;const t=Y.slidesInView();if(null===(e=E.emblaOptions)||void 0===e||!e.loop)return t[0];for(let e=1;e<t.length;e+=1)if(t[e]-t[e-1]>1)return t[e];return t[0]}();if("number"==typeof t&&E.carouselSlides.length){const e=E.carouselSlides[t];z.current=t,H.current=e.id}}}return j(n),Y.reInit({startIndex:t}),r(),a(),Y.on("resize",r),Y.on("settle",a),()=>{null==Y||Y.off("resize",r),null==Y||Y.off("settle",a)}},[E,Y]);const Q=(0,v.useCallback)(()=>{if(!Y)return null;M(!0);const e=Y.slidesInView().length;let t=z.current-e;var n;t<=0&&(null!==(n=E.emblaOptions)&&void 0!==n&&n.loop?t+=K.current:(t=0,D(!1))),z.current=t,Y.scrollTo(t)},[Y,E]),X=(0,v.useCallback)(()=>{if(!Y)return null;D(!0);const e=Y.slidesInView().length;let t=z.current+e;var n;t>=K.current-e&&(null!==(n=E.emblaOptions)&&void 0!==n&&n.loop?t%=K.current:(t=K.current-e,M(!1))),z.current=t,Y.scrollTo(t)},[Y,E]);(0,v.useEffect)(()=>{if(!Y)return;let e=!0;const t=()=>{if(e)try{const e=Y.slidesInView();Array.isArray(e)&&j(e)}catch(e){console.error("Error getting visible slides:",e)}};Y.on("select",t),Y.on("scroll",t),Y.on("settle",t),Y.on("init",t);const n=setTimeout(()=>{e&&t()},150);return()=>{e=!1,clearTimeout(n),Y.off("select",t),Y.off("scroll",t),Y.off("settle",t),Y.off("init",t)}},[Y]);const Z=(0,v.useMemo)(()=>function(e){let t;if(e.slideSizing)t=e.slideSizing;else switch(e.slideStylePreset||e.carouselLayout){case"channel":case"event":case"live":case"live-linear":case"fouracross":t="landscapeLarge";break;case"portrait":case"show":t="portrait";break;default:t="landscape"}switch(t){case"":case"landscape":case"landscapeMedium":return["landscape","slide-count-2","slide-count-mobileLandscape-3","slide-count-tabletLandscape-4","slide-count-desktop-5","slide-count-desktopWide-6"].join(" ");case"landscapeLarge":return["landscape","slide-count-2","slide-count-tabletLandscape-3","slide-count-desktopWide-4"].join(" ");case"portrait":case"portraitMedium":return["portrait-cards","slide-count-3","slide-count-mobileLandscape-4","slide-count-tabletPortrait-5","slide-count-tabletLandscape-6","slide-count-desktop-8"].join(" ");default:return t}}(E),[E]),J=E.carouselSlides,$=E.minutesBeforeLiveToPrioritize,ee=(0,v.useState)(()=>_b.now().toUnixInteger()),te=(0,x.A)(ee,2),ne=te[0],ie=te[1];(0,v.useEffect)(()=>
2{if(!$)return;const e=setInterval(()=>{ie(_b.now().toUnixInteger())},1e4);return()=>clearInterval(e)},[$]);const re=(0,v.useMemo)(()=>{const e=ne;for(const t of J){const n=t.startDate;if(!n||!$)break;if(Ob(t,e)&&e>n-60*$)return!0}return!1},[J,$,ne]);if("hideWhenPrioritizedEvents"===T&&re)return null;if("hideWhenNoPrioritizedEvents"===T&&!re)return null;if(!E.carouselSlides)return null;const ae=_b.now().toUnixInteger(),oe={carouselContentType:"kitchenSink"===E.dataSource?"live sports":"",carouselId:E.carouselId||"",carouselModel:"kitchenSink"===E.dataSource?"live sports":"",connectedState:"",posRowNum:"".concat(w),rowHeaderTitle:E.carouselTitle,screenName:window.location.href,siteEdition:null===(t=window.CBS)||void 0===t||null===(n=t.Registry)||void 0===n?void 0:n.siteEdition,showGenre:"kitchenSink"===E.dataSource?"Sports":"",userProfileCategory:null===(i=window.CBS)||void 0===i||null===(r=i.Registry)||void 0===r||null===(o=r.user)||void 0===o?void 0:o.profile_type,userProfileId:null===(s=window.CBS)||void 0===s||null===(l=s.Registry)||void 0===l||null===(c=l.user)||void 0===c?void 0:c.profile_id,userProfileMaster:null===(u=window.CBS)||void 0===u||null===(d=u.Registry)||void 0===d||null===(h=d.user)||void 0===h?void 0:h.userProfileMaster,userStatus:null===(f=window.CBS)||void 0===f||null===(p=f.Registry)||void 0===p||null===(m=p.user)||void 0===m?void 0:m.sb,userType:null===(g=window.CBS)||void 0===g||null===(y=g.Registry)||void 0===y||null===(b=y.user)||void 0===b?void 0:b.sub_status},se=E.carouselSlides.filter(e=>Ob(e,ae));return 0===se.length?null:(0,wn.jsxs)("div",{className:"carousel-cmp",children:[(0,wn.jsxs)("div",{className:"carousel-title-container",children:[E.carouselTitleLogo&&(0,wn.jsx)("img",{className:"carousel-title__logo",src:E.carouselTitleLogo,alt:"","aria-hidden":"true"}),(0,wn.jsxs)("h2",{tabIndex:0,className:"carousel-title","aria-label":"".concat(E.carouselTitle," carousel"),children:[((null===(A=E.carouselTitle)||void 0===A?void 0:A.length)||0)>1&&E.carouselTitleLogoSeparator&&(0,wn.jsx)("span",{className:"carousel-title__divider",children:"|"}),E.carouselTitle]}),E.carouselTitleLiveIndicator&&(0,wn.jsx)("div",{className:"red-dot"})]}),(0,wn.jsxs)("div",{className:"carousel-slides-outer-wrapper",children:[(0,wn.jsx)("button",{"aria-label":"Previous Slides",className:"carousel-prev-button",onClick:Q,disabled:!O,tabIndex:0,children:(0,wn.jsx)("img",{src:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZmlsbD0iI0ZGRiIgZmlsbC1ydWxlPSJub256ZXJvIiBkPSJNMTMuNTUgMTguODE0Yy4xMjQuMTI0LjI4LjE4Ni40NS4xODZzLjMyNi0uMDYyLjQ1LS4xODZhLjYzNy42MzcgMCAwIDAgMC0uOUw2LjUzNiAxMGw3LjkxNC03LjkxNGEuNjM3LjYzNyAwIDAgMC0uOS0uOUw1LjE4NiA5LjU1YS42MzcuNjM3IDAgMCAwIDAgLjl6Ii8+PC9zdmc+",style:{to
2p:"".concat(k,"px")},alt:"","aria-hidden":"true"})}),(0,wn.jsx)("div",{className:"carousel-slides-inner-wrapper",ref:q,children:(0,wn.jsx)("div",{className:"carousel-slides ".concat(Z),children:se.map((e,t)=>{const n=B.includes(t),i=e.type?" ".concat(e.type):"",r=a(a({},function(){switch(arguments.length>0&&void 0!==arguments[0]?arguments[0]:""){case"channel":case"live-linear":return{topLeft:[{field:"liveBadge"}],bottomLeft:[{field:"logo"}],bottomRight:[{field:"lockIcon"},{field:"subscribeButton"}],belowRow1:[{field:"duration",style:"muted"}],belowRow2:[{field:"title"}]};case"live":return{topLeft:[{field:"startDate",style:"badge"}],bottomRight:[{field:"lockIcon"},{field:"subscribeButton"}],bottomLeft:[{field:"logo"}],belowRow1:[{field:"channel",style:"muted"}],belowRow2:[{field:"title"}]};case"episode":return{bottomRight:[{field:"lockIcon"},{field:"playIcon",onHover:!0}],belowRow1:[{field:"season",style:"semibold",prefix:"S"},{field:"episode",style:"semibold",prefix:"E"},{field:"startDate",style:"muted"}],belowRow2:[{field:"title"}]};case"clip":return{bottomRight:[{field:"playIcon",onHover:!0}],belowRow1:[{field:"duration",style:"muted"}],belowRow2:[{field:"title"}]};case"vod":return{bottomRight:[{field:"playIcon",onHover:!0}],belowRow1:[{field:"channel",style:"muted"}],belowRow2:[{field:"title"}]};default:return{}}}(E.slideStylePreset||e.type)),E.slideMetadataPlacement),o=a(a({},oe),{},{carouselLink:e.href,contentLocked:e.locked?1:0,dma:e.dma,liveTvChannel:e.network||"",posColNum:"".concat(t),showEpisodeId:e.id,showEpisodeTitle:e.title,showSeriesTitle:e.channel,stationCode:e.network||""});return(0,wn.jsxs)(Mb,{as:"a",actionName:"trackCarouselSelect","aria-label":e.title,className:"carousel-slide".concat(n?"":" non-visible").concat(i),href:e.href,title:e.title,tabIndex:0,trackingData:o,children:[(0,wn.jsxs)("div",a(a({className:"thumbnail-wrapper"},0===t&&{ref:V}),{},{children:[(0,wn.jsx)(Pb,{alt:e.title,classNames:"carousel-slide__image lazy thumb",src:e.image}),e.progress&&(0,wn.jsx)("div",{className:"slide__progress-bar-container",children:(0,wn.jsx)("div",{className:"slide__progress-bar",style:{width:"".concat(e.progress,"%")}})}),E&&["topLeft","topRight","bottomLeft","bottomRight"].map(t=>(0,wn.jsx)(Db,{carouselConfigAndData:E,carouselSlide:e,position:t,metadataPlacement:r,href:e.href},t))]})),["belowRow1","belowRow2"].map(t=>(0,wn.jsx)(Db,{carouselConfigAndData:E,carouselSlide:e,position:t,metadataPlacement:r},t))]},e.id)})})}),(0,wn.jsx)("button",{"aria-label":"Next Slides",className:"carousel-next-button",disabled:!L,onClick:X,tabIndex:0,children:(0,wn.jsx)("img",{src:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZmlsbD0iI0ZGRiIgZmlsbC1ydWxlPSJub256ZXJvIiBkPSJNMTMuNTUgMTguODE0Yy4xMjQuMTI0LjI4LjE4Ni40NS4xODZzLjMyNi0uMDYyLjQ1LS4xODZhLjYzNy42MzcgMCAwIDAgMC0uOUw2LjUzNiAxMGw3LjkxNC03LjkxNGEuNjM3LjYzNyAwIDAgMC0uOS0uOUw1LjE4NiA5LjU1YS42MzcuNjM3IDAgMCAwIDAgLjl6Ii8+PC9zdmc+",style:{to
2p:"".concat(k,"px")},alt:"","aria-hidden":"true"})})]})]})}const Ub=JSON.parse('{"dataSource":"staticFile","dataConfigStaticFile":{"filename":"dataComedies"},"slideStylePreset":"show"}'),Bb=JSON.parse('{"dataSource":"staticFile","dataConfigStaticFile":{"filename":"dataDramas"},"slideStylePreset":"show"}'),jb=JSON.parse('{"carouselTitleLiveIndicator":true,"dataSource":"staticFile","dataConfigStaticFile":{"filename":"dataFastChannels"},"emblaOptions":{"loop":true},"slideStylePreset":"channel"}'),Vb=JSON.parse('{"dataSource":"staticFile","dataConfigStaticFile":{"filename":"dataKeepWatching"},"slideStylePreset":"episode"}'),Hb=JSON.parse('{"carouselTitle":"NBA Schedule","dataSource":"staticFile","dataConfigStaticFile":{"filename":"dataNba"},"emblaOptions":{"watchDrag":false},"formatStartDate":"EEE h:mm a ZZZZ","formatStartDateWithinWeekAway":"MM/dd h:mm a","slideMetadataPlacement":{"topLeft":[{"field":"startDate","style":"badge"}],"bottomRight":[{"field":"lockIcon"},{"field":"subscribeButton"}],"belowRow1":[{"text":"NBA on CBS","style":"muted"}],"belowRow2":[{"field":"title"}]},"slideStylePreset":"episode"}'),zb=JSON.parse('{"carouselTitle":"Latest Show Clips","dataSource":"staticFile","dataConfigStaticFile":{"filename":"dataLatestShowClips"},"slideStylePreset":"clip"}'),Kb={configComedies:Ub,configDramas:Bb,configFastChannels:jb,configKeepWatching:Vb,configNba:Hb,configLatestFullEpisodes:JSON.parse('{"dataSource":"staticFile","dataConfigStaticFile":{"filename":"dataLatestFullEpisodes"},"slideStylePreset":"episode"}'),configLatestShowClips:zb,configLiveAndUpcomingSample:JSON.parse('{"carouselTitle":"Live & Upcoming","carouselTitleLiveIndicator":true,"carouselTitleLogo":"https://sportshub.cbsistatic.com/i/2020/12/02/ecea008f-dc0f-4f8e-ac28-e18cab908139/cbssports.png","prioritizeConfigDefinedTitle":true,"carouselTitleLogoSeparator":true,"dataSource":"staticFile","dataConfigStaticFile":{"filename":"dataLiveAndUpcomingSample"},"formatStartDate":"MM/dd h:mm a","formatStartDateWithinWeekAway":"EEE h:mm a","slideMetadataPlacement":{"belowRow1":[{"field":"channel","style":"muted","suffix":":"},{"field":"startAndEndTimes","style":"muted"}]},"slideStylePreset":"live"}'),configTrendingShows:JSON.parse('{"dataSource":"staticFile","dataConfigStaticFile":{"filename":"dataTrendingShows"},"slideStylePreset":"show"}')};var Wb=function(e,t){return Wb=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Wb(e,t)};function Gb(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Wb(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var qb=function(){return qb=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},qb.apply(this,arguments)};function Yb(e,t){var n,i,r,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=s(0),o.throw=s(1),o.return=s(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(n=1,i&&(r=2&s[0]?i.return:s[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,s[1])).done)return r;switch(i=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,i=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(r=(r=a.trys).length>0&&r[r.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){a.label=s[1];break}if(6===s[0]&&a.label<r[1]){a.label=r[1],r=s;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(s);break}r[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],i=0}finally{n=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}function Qb(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);
2if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Xb(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(i=a.next()).done;)o.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return o}function Zb(e,t,n){if(n||2===arguments.length)for(var i,r=0,a=t.length;r<a;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}function Jb(e){return this instanceof Jb?(this.v=e,this):new Jb(e)}function $b(e){return"function"==typeof e}function eA(e){var t=e(function(e){Error.call(e),e.stack=(new Error).stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;var tA=eA(function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map(function(e,t){return t+1+") "+e.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}});function nA(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var iA=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,t,n,i,r;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var o=Qb(a),s=o.next();!s.done;s=o.next())s.value.remove(this)}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}else a.remove(this);var l=this.initialTeardown;if($b(l))try{l()}catch(e){r=e instanceof tA?e.errors:[e]}var c=this._finalizers;if(c){this._finalizers=null;try{for(var u=Qb(c),d=u.next();!d.done;d=u.next()){var h=d.value;try{oA(h)}catch(e){r=null!=r?r:[],e instanceof tA?r=Zb(Zb([],Xb(r)),Xb(e.errors)):r.push(e)}}}catch(e){n={error:e}}finally{try{d&&!d.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}}if(r)throw new tA(r)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)oA(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?n:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&nA(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&nA(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),rA=iA.EMPTY;function aA(e){return e instanceof iA||e&&"closed"in e&&$b(e.remove)&&$b(e.add)&&$b(e.unsubscribe)}function oA(e){$b(e)?e():e.unsubscribe()}var sA=null,lA=null,cA=void 0,uA=!1,dA=!1,hA={setTimeout:function(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var r=hA.delegate;return(null==r?void 0:r.setTimeout)?r.setTimeout.apply(r,Zb([e,t],Xb(n))):setTimeout.apply(void 0,Zb([e,t],Xb(n)))},clearTimeout:function(e){var t=hA.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function fA(e){hA.setTimeout(function(){if(!sA)throw e;sA(e)})}function pA(){}var mA=gA("C",void 0,void 0);function gA(e,t,n){return{kind:e,value:t,error:n}}var vA=null;function yA(e){if(uA){var t=!vA;if(t&&(vA={errorThrown:!1,error:null}),e(),t){var n=vA,i=n.errorThrown,r=n.error;if(vA=null,i)throw r}}else e()}var bA=function(e){function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,aA(t)&&t.add(n)):n.destination=kA,n}return Gb(t,e),t.create=function(e,t,n){return new wA(e,t,n)},t.prototype.next=function(e){this.isStopped?CA(function(e){return gA("N",e,void 0)}(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?CA(function(e){return gA("E",void 0,e)}(e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?CA(mA,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(iA),AA=Function.prototype.bind;function EA(e,t){return AA.call(e,t)}var TA=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){SA(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){SA(e)}else SA(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){SA(e)}},e}(),wA=function(e){function t(t,n,i){var r,a,o=e.call(this)||this;
2return $b(t)||!t?r={next:null!=t?t:void 0,error:null!=n?n:void 0,complete:null!=i?i:void 0}:o&&dA?((a=Object.create(t)).unsubscribe=function(){return o.unsubscribe()},r={next:t.next&&EA(t.next,a),error:t.error&&EA(t.error,a),complete:t.complete&&EA(t.complete,a)}):r=t,o.destination=new TA(r),o}return Gb(t,e),t}(bA);function SA(e){var t;uA?(t=e,uA&&vA&&(vA.errorThrown=!0,vA.error=t)):fA(e)}function CA(e,t){var n=lA;n&&hA.setTimeout(function(){return n(e,t)})}var kA={closed:!0,next:pA,error:function(e){throw e},complete:pA},xA="function"==typeof Symbol&&Symbol.observable||"@@observable";function NA(e){return e}var _A=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var i,r=this,a=(i=e)&&i instanceof bA||function(e){return e&&$b(e.next)&&$b(e.error)&&$b(e.complete)}(i)&&aA(i)?e:new wA(e,t,n);return yA(function(){var e=r,t=e.operator,n=e.source;a.add(t?t.call(a,n):n?r._subscribe(a):r._trySubscribe(a))}),a},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=IA(t))(function(t,i){var r=new wA({next:function(t){try{e(t)}catch(e){i(e),r.unsubscribe()}},error:i,complete:t});n.subscribe(r)})},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[xA]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(e){return 0===e.length?NA:1===e.length?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=IA(e))(function(e,n){var i;t.subscribe(function(e){return i=e},function(e){return n(e)},function(){return e(i)})})},e.create=function(t){return new e(t)},e}();function IA(e){var t;return null!==(t=null!=e?e:cA)&&void 0!==t?t:Promise}var OA=new _A(function(e){return e.complete()});function DA(e,t){var n,i;return null!==(n=null===(i=e.definitions.find(e=>"OperationDefinition"===e.kind&&!!e.name))||void 0===i?void 0:i.name.value)&&void 0!==n?n:t}function RA(e,t){if(!Boolean(e))throw new Error(t)}function PA(e){return LA(e,[])}function LA(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":return function(e,t){if(null===e)return"null";if(t.includes(e))return"[Circular]";const n=[...t,e];if(function(e){return"function"==typeof e.toJSON}(e)){const t=e.toJSON();if(t!==e)return"string"==typeof t?t:LA(t,n)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";const n=Math.min(10,e.length),i=e.length-n,r=[];for(let i=0;i<n;++i)r.push(LA(e[i],t));return 1===i?r.push("... 1 more item"):i>1&&r.push("... ".concat(i," more items")),"["+r.join(", ")+"]"}(e,n);return function(e,t){const n=Object.entries(e);if(0===n.length)return"{}";if(t.length>2)return"["+function(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){const t=e.constructor.name;if("string"==typeof t&&""!==t)return t}return t}(e)+"]";const i=n.map(e=>{let n=(0,x.A)(e,2);return n[0]+": "+LA(n[1],t)});return"{ "+i.join(", ")+" }"}(e,n)}(e,t);default:return String(e)}}class MA{constructor(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class FA{constructor(e,t,n,i,r,a){this.kind=e,this.start=t,this.end=n,this.line=i,this.column=r,this.value=a,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}const UA={Name:[],Document:["definitions"],OperationDefinition:["description","name","variableDefinitions","directives","selectionSet"],VariableDefinition:["description","variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["description","name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],Float
2Value:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","directives","locations"],SchemaExtension:["directives","operationTypes"],DirectiveExtension:["name","directives"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"],TypeCoordinate:["name"],MemberCoordinate:["name","memberName"],ArgumentCoordinate:["name","fieldName","argumentName"],DirectiveCoordinate:["name"],DirectiveArgumentCoordinate:["name","argumentName"]},BA=new Set(Object.keys(UA));function jA(e){const t=null==e?void 0:e.kind;return"string"==typeof t&&BA.has(t)}var VA,HA;!function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"}(VA||(VA={})),function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.DIRECTIVE_EXTENSION="DirectiveExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension",e.TYPE_COORDINATE="TypeCoordinate",e.MEMBER_COORDINATE="MemberCoordinate",e.ARGUMENT_COORDINATE="ArgumentCoordinate",e.DIRECTIVE_COORDINATE="DirectiveCoordinate",e.DIRECTIVE_ARGUMENT_COORDINATE="DirectiveArgumentCoordinate"}(HA||(HA={}));const zA=Object.freeze({});function KA(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:UA;const i=new Map;for(const e of Object.values(HA))i.set(e,WA(t,e));let r,o,s,l=Array.isArray(e),c=[e],u=-1,d=[],h=e;const f=[],p=[];do{u++;const e=u===c.length,A=e&&0!==d.length;if(e){if(o=0===p.length?void 0:f[f.length-1],h=s,s=p.pop(),A)if(l){h=h.slice();let e=0;for(const t of d){var m=(0,x.A)(t,2);const n=m[0],i=m[1],r=n-e;null===i?(h.splice(r,1),e++):h[r]=i}}else{h=a({},h);for(const e of d){var g=(0,x.A)(e,2);const t=g[0],n=g[1];h[t]=n}}u=r.index,c=r.keys,d=r.edits,l=r.inArray,r=r.prev}else if(s){if(o=l?u:c[u],h=s[o],null==h)continue;f.push(o)}let E;if(!Array.isArray(h)){var v,y;jA(h)||RA(!1,"Invalid AST Node: ".concat(PA(h),"."));const n=e?null===(v=i.get(h.kind))||void 0===v?void 0:v.leave:null===(y=i.get(h.kind))||void 0===y?void 0:y.enter;if(E=null==n?void 0:n.call(t,h,o,s,f,p),E===zA)break;
2if(!1===E){if(!e){f.pop();continue}}else if(void 0!==E&&(d.push([o,E]),!e)){if(!jA(E)){f.pop();continue}h=E}}var b;void 0===E&&A&&d.push([o,h]),e?f.pop():(r={inArray:l,index:u,keys:c,edits:d,prev:r},l=Array.isArray(h),c=l?h:null!==(b=n[h.kind])&&void 0!==b?b:[],u=-1,d=[],s&&p.push(s),s=h)}while(void 0!==r);return 0!==d.length?d[d.length-1][1]:e}function WA(e,t){const n=e[t];return"object"==typeof n?n:"function"==typeof n?{enter:n,leave:void 0}:{enter:e.enter,leave:e.leave}}const GA=!1;function qA(e){try{return e()}catch(e){}}const YA=qA(()=>globalThis)||qA(()=>window)||qA(()=>self)||qA(()=>n.g)||qA(function(){return qA.constructor("return this")()}),QA="4.1.9",XA=new Map;function ZA(e){const t=XA.get(e)||1;return XA.set(e,t+1),"".concat(e,":").concat(t,":").concat(Math.random().toString(36).slice(2))}const JA="Invariant Violation";class $A extends Error{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:JA),this.name=JA,Object.setPrototypeOf(this,$A.prototype)}}const eE=["debug","log","warn","error","silent"];let tE=eE.indexOf("silent");function nE(e){if(!e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];throw rE(...n)}}function iE(e){return function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];if(eE.indexOf(e)>=tE){const n=console[e]||console.log;if("number"==typeof t){const e=t;(t=sE(e))||(t=lE(e,i),i=[])}n(t,...i)}}}function rE(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 new $A(sE(e,n)||lE(e,n))}nE.debug=iE("debug"),nE.log=iE("log"),nE.warn=iE("warn"),nE.error=iE("error");const aE=Symbol.for("ApolloErrorMessageHandler_"+QA);function oE(e){if("string"==typeof e)return e;try{return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=ZA("stringifyForDisplay");return JSON.stringify(e,(e,t)=>void 0===t?n:t,t).split(JSON.stringify(n)).join("<undefined>")}(e,2).slice(0,1e3)}catch(e){return"<non-serializable>"}}function sE(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(e)return YA[aE]&&YA[aE](e,t.map(oE))}function lE(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(e)return"string"==typeof e?t.reduce((e,t)=>e.replace(/%[sdfo]/,oE(t)),e):"An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#".concat(encodeURIComponent(JSON.stringify({version:QA,message:e,args:t.map(oE)})))}const cE=Symbol.for("apollo.cacheSize"),uE=a({},YA[cE]),dE=()=>Object.create(null),hE=Array.prototype,fE=hE.forEach,pE=hE.slice,mE=Object.prototype.hasOwnProperty;class gE{constructor(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:dE;this.weakness=e,this.makeData=t}lookup(){return this.lookupArray(arguments)}lookupArray(e){let t=this;return fE.call(e,e=>t=t.getChildTrie(e)),mE.call(t,"data")?t.data:t.data=this.makeData(pE.call(e))}peek(){return this.peekArray(arguments)}peekArray(e){let t=this;for(let n=0,i=e.length;t&&n<i;++n){const i=t.mapFor(e[n],!1);t=i&&i.get(e[n])}return t&&t.data}remove(){return this.removeArray(arguments)}removeArray(e){let t;if(e.length){const n=e[0],i=this.mapFor(n,!1),r=i&&i.get(n);r&&(t=r.removeArray(pE.call(e,1)),r.data||r.weak||r.strong&&r.strong.size||i.delete(n))}else t=this.data,delete this.data;return t}getChildTrie(e){const t=this.mapFor(e,!0);let n=t.get(e);return n||t.set(e,n=new gE(this.weakness,this.makeData)),n}mapFor(e,t){return this.weakness&&function(e){switch(typeof e){case"object":if(null===e)break;case"function":return!0}return!1}(e)?this.weak||(t?this.weak=new WeakMap:void 0):this.strong||(t?this.strong=new Map:void 0)}}function vE(){}const yE=vE,bE="undefined"!=typeof WeakRef?WeakRef:function(e){return{deref:()=>e}},AE="undefined"!=typeof WeakMap?WeakMap:Map,EE="undefined"!=typeof FinalizationRegistry?FinalizationRegistry:function(){return{register:vE,unregister:vE}};class TE{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1/0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yE;this.max=e,this.dispose=t,this.map=new AE,this.newest=null,this.oldest=null,this.unfinalizedNodes=new Set,this.finalizationScheduled=!1,this.size=0,this.finalize=()=>{const e=this.unfinalizedNodes.values();for(let t=0;t<10024;t++){const t=e.next().value;if(!t)break;this.unfinalizedNodes.delete(t);const n=t.key;delete t.key,t.keyRef=new bE(n),this.registry.register(n,t,t)}this.unfinalizedNodes.size>0?queueMicrotask(this.finalize):this.finalizationScheduled=!1},this.registry=new EE(this.deleteNode.bind(this))}has(e){return this.map.has(e)}get(e){const t=this.getNode(e);return t&&t.value}getNode(e){const t=this.map.get(e);if(t&&t!==this.newest){const e=t.older,n=t.newer;n&&(n.older=e),e&&(e.newer=n),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=n)}return t}set(e,t){let n=this.getNode(e);
2return n?n.value=t:(n={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=n),this.newest=n,this.oldest=this.oldest||n,this.scheduleFinalization(n),this.map.set(e,n),this.size++,n.value)}clean(){for(;this.oldest&&this.size>this.max;)this.deleteNode(this.oldest)}deleteNode(e){e===this.newest&&(this.newest=e.older),e===this.oldest&&(this.oldest=e.newer),e.newer&&(e.newer.older=e.older),e.older&&(e.older.newer=e.newer),this.size--;const t=e.key||e.keyRef&&e.keyRef.deref();this.dispose(e.value,t),e.keyRef?this.registry.unregister(e):this.unfinalizedNodes.delete(e),t&&this.map.delete(t)}delete(e){const t=this.map.get(e);return!!t&&(this.deleteNode(t),!0)}scheduleFinalization(e){this.unfinalizedNodes.add(e),this.finalizationScheduled||(this.finalizationScheduled=!0,queueMicrotask(this.finalize))}}function wE(){}class SE{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1/0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:wE;this.max=e,this.dispose=t,this.map=new Map,this.newest=null,this.oldest=null}has(e){return this.map.has(e)}get(e){const t=this.getNode(e);return t&&t.value}get size(){return this.map.size}getNode(e){const t=this.map.get(e);if(t&&t!==this.newest){const e=t.older,n=t.newer;n&&(n.older=e),e&&(e.newer=n),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=n)}return t}set(e,t){let n=this.getNode(e);return n?n.value=t:(n={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=n),this.newest=n,this.oldest=this.oldest||n,this.map.set(e,n),n.value)}clean(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)}delete(e){const t=this.map.get(e);return!!t&&(t===this.newest&&(this.newest=t.older),t===this.oldest&&(this.oldest=t.newer),t.newer&&(t.newer.older=t.older),t.older&&(t.older.newer=t.newer),this.map.delete(e),this.dispose(t.value,e),!0)}}const CE=new WeakSet;function kE(e){e.size<=(e.max||-1)||CE.has(e)||(CE.add(e),setTimeout(()=>{e.clean(),CE.delete(e)},100))}const xE=function(e,t){const n=new TE(e,t);return n.set=function(e,t){const n=TE.prototype.set.call(this,e,t);return kE(this),n},n},NE=function(e,t){const n=new SE(e,t);return n.set=function(e,t){const n=SE.prototype.set.call(this,e,t);return kE(this),n},n};function _E(e,t){let n=t.max,i=t.makeCacheKey,r=void 0===i?e=>e:i;const a=new gE(!0),o=new xE(n);return function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];const s=a.lookupArray(r(n)),l=o.get(s);if(l){if(l.error)throw l.error;return l.result}const c=o.set(s,{});try{return c.result=e(...n)}catch(e){throw c.error=e,e}}}const IE=_E((e,t)=>{nE(e&&"Document"===e.kind,1);const n=e.definitions.filter(e=>"OperationDefinition"===e.kind);t&&nE(1==n.length&&n[0].operation===t,4,t,t,n[0].operation),KA(e,{Field(t,i,r,a){if(t.alias&&("__typename"===t.alias.value||t.alias.value.startsWith("__ac_"))&&t.alias.value!==t.name.value){let i=e,r=[];for(const e of a){var o;i=i[e],i.kind===HA.FIELD&&r.push((null===(o=i.alias)||void 0===o?void 0:o.value)||i.name.value)}throw r.splice(-1,1,t.name.value),rE(5,t.alias.value,r.join("."),n[0].operation,DA(e,"(anonymous)"))}}})},{max:uE.checkDocument||2e3});function OE(e){return IE(e),e.definitions.filter(e=>"OperationDefinition"===e.kind)[0]}class DE{static empty(){return new DE(()=>OA)}static from(e){if(0===e.length)return DE.empty();const t=k(e),n=t[0],i=(0,T.A)(t).slice(1);return n.concat(...i)}static split(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new DE((e,t)=>t(e));const i=new DE((i,r)=>e(i)?t.request(i,r):n.request(i,r));return Object.assign(i,{left:t,right:n})}static execute(e,t,n){return e.request(function(e,t){let n=t.client;const i={query:e.query,variables:e.variables||{},extensions:e.extensions||{},operationName:DA(e.query),operationType:OE(e.query).operation};let r=a({},e.context);const o=()=>Object.freeze(a({},r));return Object.defineProperty(i,"setContext",{enumerable:!1,value:e=>{r=a(a({},r),"function"==typeof e?e(o()):e)}}),Object.defineProperty(i,"getContext",{enumerable:!1,value:o}),Object.defineProperty(i,"client",{enumerable:!1,value:n}),i}(t,n),()=>OA)}static concat(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return DE.from(t)}constructor(e){i(this,"left",void 0),i(this,"right",void 0),e&&(this.request=e)}split(e,t,n){return this.concat(DE.split(e,t,n))}concat(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?this:t.reduce(this.combine.bind(this),this)}combine(e,t){const n=new DE((n,i)=>e.request(n,e=>t.request(e,i)));return Object.assign(n,{left:e,right:t})}request(e,t){throw rE(65)}}function RE(){const e={};for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];
2return n.forEach(t=>{t&&Reflect.ownKeys(t).forEach(n=>{const i=t[n];void 0!==i&&(e[n]=i)})}),e}class PE extends DE{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super((t,n)=>{const i=t.client,r=i.queryManager.clientOptions,a=t.getContext();{const n=RE({},r.clientAwareness,e.clientAwareness,a.clientAwareness),i=n.name,o=n.version,s=n.transport;"headers"===(void 0===s?"headers":s)&&t.setContext(e=>{let t=e.headers;return{headers:RE({"apollographql-client-name":i,"apollographql-client-version":o},t)}})}{const n=RE({},r.enhancedClientAwareness,e.enhancedClientAwareness).transport,a=void 0===n?"extensions":n;"extensions"===a&&(t.extensions=RE({clientLibrary:{name:"@apollo/client",version:i.version}},t.extensions)),"headers"===a&&t.setContext(e=>{let t=e.headers;return{headers:RE({"apollographql-library-name":"@apollo/client","apollographql-library-version":i.version},t)}})}return n(t)})}}function LE(e,t){var n;return(null===(n=OE(e))||void 0===n?void 0:n.operation)===t}function ME(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then(function(e){return{value:e,done:t}})}return ME=function(e){this.s=e,this.n=e.next},ME.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return void 0===n?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return void 0===n?Promise.reject(e):t(n.apply(this.s,arguments))}},new ME(e)}function FE(e,t){this.v=e,this.k=t}function UE(e){return new FE(e,0)}function BE(e){var t,n;function i(t,n){try{var a=e[t](n),o=a.value,s=o instanceof FE;
2Promise.resolve(s?o.v:o).then(function(n){if(s){var l="return"===t&&o.k?t:"next";if(!o.k||n.done)return i(l,n);n=e[l](n).value}r(!!a.done,n)},function(e){i("throw",e)})}catch(e){r(2,e)}}function r(e,r){2===e?t.reject(r):t.resolve({value:r,done:e}),(t=t.next)?i(t.key,t.arg):n=null}this._invoke=function(e,r){return new Promise(function(a,o){var s={key:e,arg:r,resolve:a,reject:o,next:null};n?n=n.next=s:(t=n=s,i(e,r))})},"function"!=typeof e.return&&(this.return=void 0)}function jE(e,t){return"object"==typeof e&&null!==e&&e[Symbol.for("apollo.error")]===t}function VE(e){Object.defineProperty(e,Symbol.for("apollo.error"),{value:e.name,enumerable:!1,writable:!1,configurable:!1})}function HE(e){return e.map(e=>e.message||"Error message not found.").join("\n")}BE.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},BE.prototype.next=function(e){return this._invoke("next",e)},BE.prototype.throw=function(e){return this._invoke("throw",e)},BE.prototype.return=function(e){return this._invoke("return",e)};class zE extends Error{static is(e){return jE(e,"CombinedProtocolErrors")}constructor(e){super(zE.formatMessage(e,{defaultFormatMessage:HE})),i(this,"errors",void 0),this.name="CombinedProtocolErrors",this.errors=e,VE(this),Object.setPrototypeOf(this,zE.prototype)}}i(zE,"formatMessage",HE);
2class KE extends Error{static is(e){return jE(e,"UnconventionalError")}constructor(e){super("An error of unexpected shape occurred.",{cause:e}),this.name="UnconventionalError",VE(this),Object.setPrototypeOf(this,KE.prototype)}}const WE=Symbol();function GE(e){return"extensions"in e&&zE.is(e.extensions[WE])}function qE(e){return function(e){return null!==e&&"object"==typeof e&&"string"==typeof e.message&&"string"==typeof e.name&&("string"==typeof e.stack||void 0===e.stack)}(e)?e:"string"==typeof e?new Error(e,{cause:e}):new KE(e)}class YE extends Error{static is(e){return jE(e,"ServerError")}constructor(e,t){super(e),i(this,"response",void 0),i(this,"statusCode",void 0),i(this,"bodyText",void 0),this.name="ServerError",this.response=t.response,this.statusCode=t.response.status,this.bodyText=t.bodyText,VE(this),Object.setPrototypeOf(this,YE.prototype)}}class QE extends Error{static is(e){return jE(e,"ServerParseError")}constructor(e,t){super(e instanceof Error?e.message:"Could not parse server response",{cause:e}),i(this,"response",void 0),i(this,"statusCode",void 0),i(this,"bodyText",void 0),this.name="ServerParseError",this.response=t.response,this.statusCode=t.response.status,this.bodyText=t.bodyText,VE(this),Object.setPrototypeOf(this,QE.prototype)}}function XE(e){return null!==e&&"object"==typeof e}const ZE=Object.prototype.hasOwnProperty;function JE(e){return XE(e)&&"payload"in e}function $E(){var e;return e=function*(e){var t,n,i,r;const a=new TextDecoder("utf-8"),o=null===(t=e.headers)||void 0===t?void 0:t.get("content-type"),s=null==o?void 0:o.match(/;\s*boundary=(?:'([^']+)'|"([^"]+)"|([^"'].+?))\s*(?:;|$)/i),l="\r\n--"+(s&&null!==(n=null!==(i=null!==(r=s[1])&&void 0!==r?r:s[2])&&void 0!==i?i:s[3])&&void 0!==n?n:"-");let c="";nE(e.body&&"function"==typeof e.body.getReader,62);const u=e.body.getReader();let d,h=!1,f=!1;const p=()=>f&&"-"==c[0]&&"-"==c[1];try{for(;!h;){var m=yield UE(u.read());d=m.value,h=m.done;const e="string"==typeof d?d:a.decode(d),t=c.length-l.length+1;c+=e;let n=c.indexOf(l,t);for(;n>-1&&!p();){let e;f=!0;var g=[c.slice(0,n),c.slice(n+l.length)];e=g[0],c=g[1];const t=e.indexOf("\r\n\r\n"),i=tT(e.slice(0,t))["content-type"];if(i&&-1===i.toLowerCase().indexOf("application/json"))throw new Error("Unsupported patch content type: application/json is required.");const r=e.slice(t);r&&(yield r),n=c.indexOf(l)}if(p())return}throw new Error("premature end of multipart body")}finally{u.cancel()}},$E=function(){return new BE(e.apply(this,arguments))},$E.apply(this,arguments)}async function eT(e,t){var n,i=!1,r=!1;try{for(var o,s=function(e){var t,n,i,r=2;for("undefined"!=typeof Symbol&&(n=Symbol.asyncIterator,i=Symbol.iterator);r--;){if(n&&null!=(t=e[n]))return t.call(e);if(i&&null!=(t=e[i]))return new ME(t.call(e));n="@@asyncIterator",i="@@iterator"}throw new TypeError("Object is not async iterable")}(function(e){return $E.apply(this,arguments)}(e));i=!(o=await s.next()).done;i=!1){const n=nT(e,o.value);if(0==Object.keys(n).length)continue;if(JE(n)){if(1===Object.keys(n).length&&null===n.payload)return;let e=a({},n.payload);var l;"errors"in n&&(e.extensions=a(a({},e.extensions),{},{[WE]:new zE(null!==(l=n.errors)&&void 0!==l?l:[])})),t(e)}else t(n)}}catch(e){r=!0,n=e}finally{try{i&&null!=s.return&&await s.return()}finally{if(r)throw n}}}function tT(e){const t={};return e.split("\n").forEach(e=>{const n=e.indexOf(":");if(n>-1){const i=e.slice(0,n).trim().toLowerCase(),r=e.slice(n+1).trim();t[i]=r}}),t}function nT(e,t){if(e.status>=300)throw new YE("Response not successful: Received status code ".concat(e.status),{response:e,bodyText:t});try{return JSON.parse(t)}catch(n){throw new QE(n,{response:e,bodyText:t})}}function iT(e){return 9===e||32===e}function rT(e){return e>=48&&e<=57}function aT(e){return e>=97&&e<=122||e>=65&&e<=90}function oT(e){return aT(e)||95===e}function sT(e){return aT(e)||rT(e)||95===e}function lT(e){var t;let n=Number.MAX_SAFE_INTEGER,i=null,r=-1;for(let t=0;t<e.length;++t){var a;const o=e[t],s=cT(o);s!==o.length&&(i=null!==(a=i)&&void 0!==a?a:t,r=t,0!==t&&s<n&&(n=s))}return e.map((e,t)=>0===t?e:e.slice(n)).slice(null!==(t=i)&&void 0!==t?t:0,r+1)}function cT(e){let t=0;for(;t<e.length&&iT(e.charCodeAt(t));)++t;return t}function uT(e,t){const n=e.replace(/"""/g,'\\"""'),i=n.split(/\r\n|[\n\r]/g),r=1===i.length,a=i.length>1&&i.slice(1).every(e=>0===e.length||iT(e.charCodeAt(0))),o=n.endsWith('\\"""'),s=e.endsWith('"')&&!o,l=e.endsWith("\\"),c=s||l,u=!(null!=t&&t.minimize)&&(!r||e.length>70||c||a||o);let d="";const h=r&&iT(e.charCodeAt(0));return(u&&!h||a)&&(d+="\n"),d+=n,(u||c)&&(d+="\n"),'"""'+d+'"""'}const dT=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function hT(e){return fT[e.charCodeAt(0)]}const fT=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"],pT={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>mT(e.definitions,"\n\n")},OperationDefinition:{leave(e){const t=bT(e.variableDefinitions)?vT("(\n",mT(e.variableDefinitions,"\n"),"\n)"):vT("(",mT(e.variableDefinitions,", "),")"),n=vT("",e.description,"\n")+mT([e.operation,mT([e.name,t]),mT(e.directives," ")]," ");return("query"===n?"":n+" ")+e.selectionSet}},VariableDefinition:{leave:e=>{let t=e.variable,n=e.type,i=e.defaultValue,r=e.directives;return vT("",e.description,"\n")+t+": "+n+vT(" = ",i)+vT(" ",mT(r," "))}},SelectionSet:{leave:e=>gT(e.selections)},Field:{leave(e){let t=e.alias,n=e.name,i=e.arguments,r=e.directives,a=e.selectionSet;const o=vT("",t,": ")+n;let s=o+vT("(",mT(i,", "),")");return s.length>80&&(s=o+vT("(\n",yT(mT(i,"\n")),"\n)")),mT([s,mT(r," "),a]," ")}},Argument:{leave:e=>e.name+": "+e.value},FragmentSpread:{leave:e=>
2"..."+e.name+vT(" ",mT(e.directives," "))},InlineFragment:{leave:e=>{let t=e.typeCondition,n=e.directives,i=e.selectionSet;return mT(["...",vT("on ",t),mT(n," "),i]," ")}},FragmentDefinition:{leave:e=>{let t=e.name,n=e.typeCondition,i=e.variableDefinitions,r=e.directives,a=e.selectionSet;return vT("",e.description,"\n")+"fragment ".concat(t).concat(vT("(",mT(i,", "),")")," ")+"on ".concat(n," ").concat(vT("",mT(r," ")," "))+a}},IntValue:{leave:e=>e.value},FloatValue:{leave:e=>e.value},StringValue:{leave:e=>{let t=e.value;return e.block?uT(t):'"'.concat(t.replace(dT,hT),'"')}},BooleanValue:{leave:e=>e.value?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:e=>e.value},ListValue:{leave:e=>"["+mT(e.values,", ")+"]"},ObjectValue:{leave:e=>"{"+mT(e.fields,", ")+"}"},ObjectField:{leave:e=>e.name+": "+e.value},Directive:{leave:e=>"@"+e.name+vT("(",mT(e.arguments,", "),")")},NamedType:{leave:e=>e.name},ListType:{leave:e=>"["+e.type+"]"},NonNullType:{leave:e=>e.type+"!"},SchemaDefinition:{leave:e=>{let t=e.description,n=e.directives,i=e.operationTypes;return vT("",t,"\n")+mT(["schema",mT(n," "),gT(i)]," ")}},OperationTypeDefinition:{leave:e=>e.operation+": "+e.type},ScalarTypeDefinition:{leave:e=>{let t=e.description,n=e.name,i=e.directives;return vT("",t,"\n")+mT(["scalar",n,mT(i," ")]," ")}},ObjectTypeDefinition:{leave:e=>{let t=e.description,n=e.name,i=e.interfaces,r=e.directives,a=e.fields;return vT("",t,"\n")+mT(["type",n,vT("implements ",mT(i," & ")),mT(r," "),gT(a)]," ")}},FieldDefinition:{leave:e=>{let t=e.description,n=e.name,i=e.arguments,r=e.type,a=e.directives;return vT("",t,"\n")+n+(bT(i)?vT("(\n",yT(mT(i,"\n")),"\n)"):vT("(",mT(i,", "),")"))+": "+r+vT(" ",mT(a," "))}},InputValueDefinition:{leave:e=>{let t=e.description,n=e.name,i=e.type,r=e.defaultValue,a=e.directives;return vT("",t,"\n")+mT([n+": "+i,vT("= ",r),mT(a," ")]," ")}},InterfaceTypeDefinition:{leave:e=>{let t=e.description,n=e.name,i=e.interfaces,r=e.directives,a=e.fields;return vT("",t,"\n")+mT(["interface",n,vT("implements ",mT(i," & ")),mT(r," "),gT(a)]," ")}},UnionTypeDefinition:{leave:e=>{let t=e.description,n=e.name,i=e.directives,r=e.types;return vT("",t,"\n")+mT(["union",n,mT(i," "),vT("= ",mT(r," | "))]," ")}},EnumTypeDefinition:{leave:e=>{let t=e.description,n=e.name,i=e.directives,r=e.values;return vT("",t,"\n")+mT(["enum",n,mT(i," "),gT(r)]," ")}},EnumValueDefinition:{leave:e=>{let t=e.description,n=e.name,i=e.directives;return vT("",t,"\n")+mT([n,mT(i," ")]," ")}},InputObjectTypeDefinition:{leave:e=>{let t=e.description,n=e.name,i=e.directives,r=e.fields;return vT("",t,"\n")+mT(["input",n,mT(i," "),gT(r)]," ")}},DirectiveDefinition:{leave:e=>{let t=e.description,n=e.name,i=e.arguments,r=e.directives,a=e.repeatable,o=e.locations;return vT("",t,"\n")+"directive @"+n+(bT(i)?vT("(\n",yT(mT(i,"\n")),"\n)"):vT("(",mT(i,", "),")"))+vT(" ",mT(r," "))+(a?" repeatable":"")+" on "+mT(o," | ")}},SchemaExtension:{leave:e=>{let t=e.directives,n=e.operationTypes;return mT(["extend schema",mT(t," "),gT(n)]," ")}},ScalarTypeExtension:{leave:e=>mT(["extend scalar",e.name,mT(e.directives," ")]," ")},ObjectTypeExtension:{leave:e=>{let t=e.name,n=e.interfaces,i=e.directives,r=e.fields;return mT(["extend type",t,vT("implements ",mT(n," & ")),mT(i," "),gT(r)]," ")}},InterfaceTypeExtension:{leave:e=>{let t=e.name,n=e.interfaces,i=e.directives,r=e.fields;return mT(["extend interface",t,vT("implements ",mT(n," & ")),mT(i," "),gT(r)]," ")}},UnionTypeExtension:{leave:e=>{let t=e.name,n=e.directives,i=e.types;return mT(["extend union",t,mT(n," "),vT("= ",mT(i," | "))]," ")}},EnumTypeExtension:{leave:e=>{let t=e.name,n=e.directives,i=e.values;return mT(["extend enum",t,mT(n," "),gT(i)]," ")}},InputObjectTypeExtension:{leave:e=>{let t=e.name,n=e.directives,i=e.fields;return mT(["extend input",t,mT(n," "),gT(i)]," ")}},DirectiveExtension:{leave:e=>mT(["extend directive @"+e.name,mT(e.directives," ")]," ")},TypeCoordinate:{leave:e=>e.name},MemberCoordinate:{leave:e=>mT([e.name,vT(".",e.memberName)])},ArgumentCoordinate:{leave:e=>{let t=e.name,n=e.fieldName,i=e.argumentName;return mT([t,vT(".",n),vT("(",i,":)")])}},DirectiveCoordinate:{leave:e=>mT(["@",e.name])},DirectiveArgumentCoordinate:{leave:e=>mT(["@",e.name,vT("(",e.argumentName,":)")])}};function mT(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";var n;return null!==(n=null==e?void 0:e.filter(e=>e).join(t))&&void 0!==n?n:""}function gT(e){return vT("{\n",yT(mT(e,"\n")),"\n}")}function vT(e,t){return null!=t&&""!==t?e+t+(arguments.length>2&&void 0!==arguments[2]?arguments[2]:""):""}function yT(e){return vT(" ",e.replace(/\n/g,"\n "))}function bT(e){var t;return null!==(t=null==e?void 0:e.some(e=>e.includes("\n")))&&void 0!==t&&t}let AT;const ET=Object.assign(e=>{let t=AT.get(e);return t||(t=function(e){return KA(e,pT)}(e),AT.set(e,t)),t},{reset(){AT=new xE(uE.print||2e3)}});ET.reset();const TT={http:{includeQuery:!0,includeExtensions:!0,preserveHeaderCase:!1},headers:{accept:"application/graphql-response+json,application/json;q=0.9","content-type":"application/json"},options:{method:"POST"}},wT=(e,t)=>t(e);const ST=["uri","fetch","print","includeExtensions","preserveHeaderCase","useGETForQueries","includeUnusedVariables"],CT=qA(()=>fetch);function kT(){}class xT extends DE{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.uri,n=void 0===t?"/graphql":t,i=e.fetch,r=e.print,o=void 0===r?wT:r,
2s=e.includeExtensions,l=e.preserveHeaderCase,c=e.useGETForQueries,u=e.includeUnusedVariables,d=void 0!==u&&u,h=E(e,ST);const f={http:RE({includeExtensions:s,preserveHeaderCase:l}),options:h.fetchOptions,credentials:h.credentials,headers:h.headers};super(e=>{let t=((e,t)=>e.getContext().uri||("function"==typeof t?t(e):t||"/graphql"))(e,n);const r=e.getContext(),s=a({},r.http);(function(e){return LE(e,"subscription")})(e.query)&&(s.accept=["multipart/mixed;boundary=graphql;subscriptionSpec=1.0",...s.accept||[]]);const l={http:s,options:r.fetchOptions,credentials:r.credentials,headers:r.headers},u=function(e,t){let n={},i={};for(var r=arguments.length,o=new Array(r>2?r-2:0),s=2;s<r;s++)o[s-2]=arguments[s];o.forEach(e=>{var t;n=a(a(a({},n),e.options),{},{headers:a(a({},n.headers),e.headers)}),e.credentials&&(n.credentials=e.credentials),n.headers.accept=((null===(t=e.http)||void 0===t?void 0:t.accept)||[]).concat(n.headers.accept).join(","),i=a(a({},i),e.http)}),n.headers=function(e,t){if(!t){const t={};return Object.keys(Object(e)).forEac
2h(n=>{t[n.toLowerCase()]=e[n]}),t}const n={};Object.keys(Object(e)).forEach(t=>{n[t.toLowerCase()]={originalName:t,value:e[t]}});const i={};return Object.keys(n).forEach(e=>{i[n[e].originalName]=n[e].value}),i}(n.headers,i.preserveHeaderCase);const l=e.operationName,c=e.extensions,u=e.variables,d=e.query,h={operationName:l,variables:u};return i.includeExtensions&&Object.keys(c||{}).length&&(h.extensions=c),i.includeQuery&&(h.query=t(d,ET)),{options:n,body:h}}(e,o,TT,f,l),h=u.options,p=u.body;p.variables&&!d&&(p.variables=function(e,t){const n=a({},e),i=new Set(Object.keys(e));return KA(t,{Variable(e,t,n){n&&"VariableDefinition"!==n.kind&&i.delete(e.name.value)}}),i.forEach(e=>{delete n[e]}),n}(p.variables,e.query));let m=new AbortController,g=()=>{m=void 0};if(h.signal){const e=h.signal,t=()=>{var t;null===(t=m)||void 0===t||t.abort(e.reason)};e.addEventListener("abort",t,{once:!0}),g=()=>{var n;null===(n=m)||void 0===n||n.signal.removeEventListener("abort",g),m=void 0,e.removeEventListener("abort",t),g=kT},m.signal.addEventListener("abort",g,{once:!0})}return h.signal=m.signal,c&&!function(e){return LE(e,"mutation")}(e.query)&&(h.method="GET"),new _A(n=>{if("GET"===h.method){const e=function(e,t){const n=[],i=(e,t)=>{n.push("".concat(e,"=").concat(encodeURIComponent(t)))};if("query"in t&&i("query",t.query),t.operationName&&i("operationName",t.operationName),t.variables){let e;try{e=JSON.stringify(t.variables)}catch(e){return{parseError:e}}i("variables",e)}if(t.extensions){let e;try{e=JSON.stringify(t.extensions)}catch(e){return{parseError:e}}i("extensions",e)}let r="",a=e;const o=e.indexOf("#");-1!==o&&(r=e.substr(o),a=e.substr(0,o));const s=-1===a.indexOf("?")?"?":"&";return{newURI:a+s+n.join("&")+r}}(t,p),n=e.newURI,i=e.parseError;if(i)throw i;t=n}else h.body=JSON.stringify(p);const r=i||qA(()=>fetch)||CT,a=n.next.bind(n);return r(t,h).then(t=>{var n;e.setContext({response:t});const i=null===(n=t.headers)||void 0===n?void 0:n.get("content-type");return null!==i&&/^multipart\/mixed/i.test(i)?eT(t,a):(r=e,e=>e.text().then(t=>{const n=function(e,t){const n=e.headers.get("content-type");return null!=n&&n.includes("application/graphql-response+json")?function(e,t){try{return JSON.parse(t)}catch(n){throw new QE(n,{response:e,bodyText:t})}}(e,t):nT(e,t)}(e,t);if(!Array.isArray(n)&&!ZE.call(n,"data")&&!ZE.call(n,"errors"))throw new YE("Server response was malformed for query '".concat(Array.isArray(r)?r.map(e=>e.operationName):r.operationName,"'."),{response:e,bodyText:t});return n}))(t).then(a);var r}).then(()=>{g(),n.complete()}).catch(e=>{g(),n.error(e)}),()=>{m&&m.abort()}})})}}class NT extends DE{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=DE.from([new PE(e),new xT(e)]),n=t.left,i=t.right;super(t.request),Object.assign(this,{left:n,right:i})}}function _T(e){return function(t){if(function(e){return $b(null==e?void 0:e.lift)}(t))return t.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw new TypeError("Unable to lift unknown Observable type")}}function IT(e,t,n,i,r){return new OT(e,t,n,i,r)}var OT=function(e){function t(t,n,i,r,a,o){var s=e.call(this,t)||this;return s.onFinalize=a,s.shouldUnsubscribe=o,s._next=n?function(e){try{n(e)}catch(e){t.error(e)}}:e.prototype._next,s._error=r?function(e){try{r(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,s._complete=i?function(){try{i()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,s}return Gb(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}},t}(bA);function DT(e,t){return _T(function(n,i){var r=0;n.subscribe(IT(i,function(n){i.next(e.call(t,n,r++))}))})}function RT(e,t,n){const i=new Set(e),r=i.size;return KA(t,{Directive(e){if(i.delete(e.name.value)&&(!n||!i.size))return zA}}),n?!i.size:i.size<r}class PT{constructor(){i(this,"startRequest",void 0)}isIncrementalResult(e){return!1}prepareRequest(e){return nE(!RT(["defer","stream"],e.query),67),e}extractErrors(){}}const LT=DE.execute;let MT=null;const FT={};let UT=1;function BT(e){try{return e()}catch(e){}}const jT="@wry/context:Slot",VT=BT(()=>globalThis)||BT(()=>n.g)||Object.create(null),HT=VT[jT]||Array[jT]||function(e){try{Object.defineProperty(VT,jT,{value:e,enumerable:!1,writable:!1,
2configurable:!0})}finally{return e}}(class{constructor(){this.id=["slot",UT++,Date.now(),Math.random().toString(36).slice(2)].join(":")}hasValue(){for(let e=MT;e;e=e.parent)if(this.id in e.slots){const t=e.slots[this.id];if(t===FT)break;return e!==MT&&(MT.slots[this.id]=t),!0}return MT&&(MT.slots[this.id]=FT),!1}getValue(){if(this.hasValue())return MT.slots[this.id]}withValue(e,t,n,i){const r={__proto__:null,[this.id]:e},a=MT;MT={parent:a,slots:r};try{return t.apply(i,n)}finally{MT=a}}static bind(e){const t=MT;return function(){const n=MT;try{return MT=t,e.apply(this,arguments)}finally{MT=n}}}static noContext(e,t,n){if(!MT)return e.apply(n,t);{const i=MT;try{return MT=null,e.apply(n,t)}finally{MT=i}}}});HT.bind,HT.noContext;const zT=new HT,KT=Object.prototype.hasOwnProperty,WT=Array.from||function(e){const t=[];return e.forEach(e=>t.push(e)),t};function GT(e){const t=e.unsubscribe;"function"==typeof t&&(e.unsubscribe=void 0,t())}const qT=[];function YT(e,t){if(!e)throw new Error(t||"assertion failure")}function QT(e,t){const n=e.length;return n>0&&n===t.length&&e[n-1]===t[n-1]}function XT(e){switch(e.length){case 0:throw new Error("unknown value");case 1:return e[0];case 2:throw e[1]}}function ZT(e){return e.slice(0)}class JT{constructor(e){this.fn=e,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++JT.count}peek(){if(1===this.value.length&&!tw(this))return $T(this),this.value[0]}recompute(e){return YT(!this.recomputing,"already recomputing"),$T(this),tw(this)?function(e,t){return lw(e),zT.withValue(e,ew,[e,t]),function(e,t){if("function"==typeof e.subscribe)try{GT(e),e.unsubscribe=e.subscribe.apply(null,t)}catch(t){return e.setDirty(),!1}return!0}(e,t)&&function(e){e.dirty=!1,tw(e)||iw(e)}(e),XT(e.value)}(this,e):XT(this.value)}setDirty(){this.dirty||(this.dirty=!0,nw(this),GT(this))}dispose(){this.setDirty(),lw(this),rw(this,(e,t)=>{e.setDirty(),cw(e,this)})}forget(){this.dispose()}dependOn(e){e.add(this),this.deps||(this.deps=qT.pop()||new Set),this.deps.add(e)}forgetDeps(){this.deps&&(WT(this.deps).forEach(e=>e.delete(this)),this.deps.clear(),qT.push(this.deps),this.deps=null)}}function $T(e){const t=zT.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),tw(e)?aw(t,e):ow(t,e),t}function ew(e,t){e.recomputing=!0;const n=e.normalizeResult;let i;n&&1===e.value.length&&(i=ZT(e.value)),e.value.length=0;try{if(e.value[0]=e.fn.apply(null,t),n&&i&&!QT(i,e.value))try{e.value[0]=n(e.value[0],i[0])}catch(e){}}catch(t){e.value[1]=t}e.recomputing=!1}function tw(e){return e.dirty||!(!e.dirtyChildren||!e.dirtyChildren.size)}function nw(e){rw(e,aw)}function iw(e){rw(e,ow)}function rw(e,t){const n=e.parents.size;if(n){const i=WT(e.parents);for(let r=0;r<n;++r)t(i[r],e)}}function aw(e,t){YT(e.childValues.has(t)),YT(tw(t));const n=!tw(e);if(e.dirtyChildren){if(e.dirtyChildren.has(t))return}else e.dirtyChildren=qT.pop()||new Set;e.dirtyChildren.add(t),n&&nw(e)}function ow(e,t){YT(e.childValues.has(t)),YT(!tw(t));const n=e.childValues.get(t);0===n.length?e.childValues.set(t,ZT(t.value)):QT(n,t.value)||e.setDirty(),sw(e,t),tw(e)||iw(e)}function sw(e,t){const n=e.dirtyChildren;n&&(n.delete(t),0===n.size&&(qT.length<100&&qT.push(n),e.dirtyChildren=null))}function lw(e){e.childValues.size>0&&e.childValues.forEach((t,n)=>{cw(e,n)}),e.forgetDeps(),YT(null===e.dirtyChildren)}function cw(e,t){t.parents.delete(e),e.childValues.delete(t),sw(e,t)}JT.count=0;const uw={setDirty:!0,dispose:!0,forget:!0};function dw(e){const t=new Map,n=e&&e.subscribe;function i(e){const i=zT.getValue();if(i){let r=t.get(e);r||t.set(e,r=new Set),i.dependOn(r),"function"==typeof n&&(GT(r),r.unsubscribe=n(e))}}return i.dirty=function(e,n){const i=t.get(e);if(i){const r=n&&KT.call(uw,n)?n:"setDirty";WT(i).forEach(e=>e[r]()),t.delete(e),GT(i)}},i}let hw;function fw(){const e=hw||(hw=new gE("function"==typeof WeakMap));for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return e.lookupArray(n)}const pw=new Set;function mw(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Object.create(null),n=t.max,i=void 0===n?Math.pow(2,16):n,r=t.keyArgs,a=t.makeCacheKey,o=void 0===a?fw:a,s=t.normalizeResult,l=t.subscribe,c=t.cache,u=void 0===c?SE:c;const d="function"==typeof u?new u(i,e=>e.dispose()):u,h=function(){const t=o.apply(null,r?r.apply(null,arguments):arguments);if(void 0===t)return e.apply(null,arguments);let n=d.get(t);n||(d.set(t,n=new JT(e)),n.normalizeResult=s,n.subscribe=l,n.forget=()=>d.delete(t));const i=n.recompute(Array.prototype.slice.call(arguments));
2return d.set(t,n),pw.add(d),zT.hasValue()||(pw.forEach(e=>e.clean()),pw.clear()),i};function f(e){const t=e&&d.get(e);t&&t.setDirty()}function p(e){const t=e&&d.get(e);if(t)return t.peek()}function m(e){return!!e&&d.delete(e)}return Object.defineProperty(h,"size",{get:()=>d.size,configurable:!1,enumerable:!1}),Object.freeze(h.options={max:i,keyArgs:r,makeCacheKey:o,normalizeResult:s,subscribe:l,cache:d}),h.dirtyKey=f,h.dirty=function(){f(o.apply(null,arguments))},h.peekKey=p,h.peek=function(){return p(o.apply(null,arguments))},h.forgetKey=m,h.forget=function(){return m(o.apply(null,arguments))},h.makeCacheKey=o,h.getKey=r?function(){return o.apply(null,r.apply(null,arguments))}:o,Object.freeze(h)}function gw(e){return e}class vw{getCacheKey(e){return[e]}static identity(){return new vw(gw,{cache:!1})}static split(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:vw.identity();return Object.assign(new vw(i=>(e(i)?t:n).transformDocument(i),{cache:!1}),{left:t,right:n})}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};i(this,"transform",void 0),i(this,"cached",void 0),i(this,"resultCache",new WeakSet),i(this,"left",void 0),i(this,"right",void 0),this.transform=e,t.getCacheKey&&(this.getCacheKey=t.getCacheKey),this.cached=!1!==t.cache,this.resetCache()}resetCache(){if(this.cached){const e=new gE;this.performWork=mw(vw.prototype.performWork.bind(this),{makeCacheKey:t=>{const n=this.getCacheKey(t);if(n)return nE(Array.isArray(n),20),e.lookupArray(n)},max:uE["documentTransform.cache"],cache:TE})}}performWork(e){return IE(e),this.transform(e)}transformDocument(e){if(this.resultCache.has(e))return e;const t=this.performWork(e);return this.resultCache.add(t),t}concat(e){return Object.assign(new vw(t=>e.transformDocument(this.transformDocument(t)),{cache:!1}),{left:this,right:e})}}function yw(e){return KA(e,{FragmentSpread(e){var t;if(null===(t=e.directives)||void 0===t||!t.some(e=>"unmask"===e.name.value))return null}})}function bw(e,t){return RE(e,t,t.variables&&{variables:RE(a(a({},e&&e.variables),t.variables))})}var Aw=eA(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Ew=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return Gb(t,e),t.prototype.lift=function(e){var t=new Tw(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new Aw},t.prototype.next=function(e){var t=this;yA(function(){var n,i;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var r=Qb(t.currentObservers),a=r.next();!a.done;a=r.next())a.value.next(e)}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}}})},t.prototype.error=function(e){var t=this;yA(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}})},t.prototype.complete=function(){var e=this;yA(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,i=n.hasError,r=n.isStopped,a=n.observers;return i||r?rA:(this.currentObservers=null,a.push(e),new iA(function(){t.currentObservers=null,nA(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,i=t.thrownError,r=t.isStopped;n?e.error(i):r&&e.complete()},t.prototype.asObservable=function(){var e=new _A;return e.source=this,e},t.create=function(e,t){return new Tw(e,t)},t}(_A),Tw=function(e){function t(t,n){var i=e.call(this)||this;return i.destination=t,i.source=n,i}return Gb(t,e),t.prototype.next=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===n||n.call(t,e)},t.prototype.error=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===n||n.call(t,e)},t.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},t.prototype._subscribe=function(e){var t,n;return null!==(n=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==n?n:rA},t}(Ew),ww={now:function(){return(ww.delegate||Date).now()},delegate:void 0},Sw=function(e){function t(t,n,i){void 0===t&&(t=1/0),void 0===n&&(n=1/0),void 0===i&&(i=ww);var r=e.call(this)||this;return r._bufferSize=t,r._windowTime=n,r._timestampProvider=i,r._buffer=[],r._infiniteTimeWindow=!0,r._infiniteTimeWindow=n===1/0,r._bufferSize=Math.max(1,t),r._windowTime=Math.max(1,n),r}return Gb(t,e),t.prototype.next=function(t){var n=this,i=n.isStopped,r=n._buffer,a=n._infiniteTimeWindow,o=n._timestampProvider,s=n._windowTime;i||(r.push(t),!a&&r.push(o.now()+s)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),n=this._infiniteTimeWindow,i=this._buffer.slice(),r=0;r<i.length&&!e.closed;r+=n?1:2)e.next(i[r]);return this._checkFinalizedStatuses(e),t},t.prototype._trimBuffer=function(){var e=this,t=e._bufferSize,n=e._timestampProvider,i=e._buffer,r=e._infiniteTimeWindow,a=(r?1:2)*t;if(t<1/0&&a<i.length&&i.splice(0,i.length-a),!r){for(var o=n.now(),s=0,l=1;l<i.length&&i[l]<=o;l+=2)s=l;s&&i.splice(0,s+1)}},t}(Ew),Cw=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function kw(e){return $b(null==e?void 0:e.then)}function xw(e){return $b(e[xA])}function Nw(e){return Symbol.asyncIterator&&$b(null==e?void 0:e[Symbol.asyncIterator])}function _w(e){return new TypeError("You provided "+(null!==e&&"object"==typeof e?"an invali
2d object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}var Iw="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function Ow(e){return $b(null==e?void 0:e[Iw])}function Dw(e){return function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,r=n.apply(e,t||[]),a=[];return i=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),o("next"),o("throw"),o("return",function(e){return function(t){return Promise.resolve(t).then(e,c)}}),i[Symbol.asyncIterator]=function(){return this},i;function o(e,t){r[e]&&(i[e]=function(t){return new Promise(function(n,i){a.push([e,t,n,i])>1||s(e,t)})},t&&(i[e]=t(i[e])))}function s(e,t){try{(n=r[e](t)).value instanceof Jb?Promise.resolve(n.value.v).then(l,c):u(a[0][2],n)}catch(e){u(a[0][3],e)}var n}function l(e){s("next",e)}function c(e){s("throw",e)}function u(e,t){e(t),a.shift(),a.length&&s(a[0][0],a[0][1])}}(this,arguments,function(){var t,n,i;return Yb(this,function(r){switch(r.label){case 0:t=e.getReader(),r.label=1;case 1:r.trys.push([1,,9,10]),r.label=2;case 2:return[4,Jb(t.read())];case 3:return n=r.sent(),i=n.value,n.done?[4,Jb(void 0)]:[3,5];case 4:return[2,r.sent()];case 5:return[4,Jb(i)];case 6:return[4,r.sent()];case 7:return r.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function Rw(e){return $b(null==e?void 0:e.getReader)}function Pw(e){if(e instanceof _A)return e;if(null!=e){if(xw(e))return r=e,new _A(function(e){var t=r[xA]();if($b(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")});if(Cw(e))return i=e,new _A(function(e){for(var t=0;t<i.length&&!e.closed;t++)e.next(i[t]);e.complete()});if(kw(e))return n=e,new _A(function(e){n.then(function(t){e.closed||(e.next(t),e.complete())},function(t){return e.error(t)}).then(null,fA)});if(Nw(e))return Lw(e);if(Ow(e))return t=e,new _A(function(e){var n,i;try{for(var r=Qb(t),a=r.next();!a.done;a=r.next()){var o=a.value;if(e.next(o),e.closed)return}}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}e.complete()});if(Rw(e))return Lw(Dw(e))}var t,n,i,r;throw _w(e)}function Lw(e){return new _A(function(t){(function(e,t){var n,i,r,a;return function(e,t,n,i){return new(n||(n=Promise))(function(r,a){function o(e){try{l(i.next(e))}catch(e){a(e)}}function s(e){try{l(i.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(o,s)}l((i=i.apply(e,t||[])).next())})}(this,void 0,void 0,function(){var o,s;return Yb(this,function(l){switch(l.label){case 0:l.trys.push([0,5,6,11]),n=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=Qb(e),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(n){t[n]=e[n]&&function(t){return new Promise(function(i,r){!function(e,t,n,i){Promise.resolve(i).then(function(t){e({value:t,done:n})},t)}(i,r,(t=e[n](t)).done,t.value)})}}}(e),l.label=1;case 1:return[4,n.next()];case 2:if((i=l.sent()).done)return[3,4];if(o=i.value,t.next(o),t.closed)return[2];l.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=l.sent(),r={error:s},[3,11];case 6:return l.trys.push([6,,9,10]),i&&!i.done&&(a=n.return)?[4,a.call(n)]:[3,8];case 7:l.sent(),l.label=8;case 8:return[3,10];case 9:if(r)throw r.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})})(e,t).catch(function(e){return t.error(e)})})}function Mw(e){void 0===e&&(e={});var t=e.connector,n=void 0===t?function(){return new Ew}:t,i=e.resetOnError,r=void 0===i||i,a=e.resetOnComplete,o=void 0===a||a,s=e.resetOnRefCountZero,l=void 0===s||s;return function(e){var t,i,a,s=0,c=!1,u=!1,d=function(){null==i||i.unsubscribe(),i=void 0},h=function(){d(),t=a=void 0,c=u=!1},f=function(){var e=t;h(),null==e||e.unsubscribe()};return _T(function(e,p){s++,u||c||d();var m=a=null!=a?a:n();p.add(function(){0!==--s||u||c||(i=Fw(f,l))}),m.subscribe(p),!t&&s>0&&(t=new wA({next:function(e){return m.next(e)},error:function(e){u=!0,d(),i=Fw(h,r,e),m.error(e)},complete:function(){c=!0,d(),i=Fw(h,o),m.complete()}}),Pw(e).subscribe(t))})(e)}}function Fw(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];if(!0!==t){if(!1!==t){var r=new wA({next:function(){r.unsubscribe(),e()}});return Pw(t.apply(void 0,Zb([],Xb(n)))).subscribe(r)}}else e()}function Uw(e,t,n){var i,r,a,o,s=!1;return e&&"object"==typeof e?(i=e.bufferSize,o=void 0===i?1/0:i,r=e.windowTime,t=void 0===r?1/0:r,s=void 0!==(a=e.refCount)&&a,n=e.sc
2heduler):o=null!=e?e:1/0,Mw({connector:function(){return new Sw(o,t,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:s})}const Bw=_E(function(e,t,n){return function(e,t){let n,i;function r(e){return e!==n&&(n=e,i=t(n)),i}return Object.assign(e.pipe(DT(r),Uw({bufferSize:1,refCount:!0})),{getCurrentResult:()=>r(e.getCurrentResult())})}(e,n)},{max:1,makeCacheKey:e=>e.slice(0,2)});function jw(e,t){var n=$b(e)?e:function(){return e},i=function(e){return e.error(n())};return new _A(t?function(e){return t.schedule(i,0,e)}:i)}function Vw(e,t,n,i,r){void 0===i&&(i=0),void 0===r&&(r=!1);var a=t.schedule(function(){n(),r?e.add(this.schedule(null,i)):this.unsubscribe()},i);if(e.add(a),!r)return a}function Hw(e,t,n){return void 0===n&&(n=1/0),$b(t)?Hw(function(n,i){return DT(function(e,r){return t(n,e,i,r)})(Pw(e(n,i)))},n):("number"==typeof t&&(n=t),_T(function(t,i){return function(e,t,n,i){var r=[],a=0,o=0,s=!1,l=function(){!s||r.length||a||t.complete()},c=function(e){return a<i?u(e):r.push(e)},u=function(e){a++;var s=!1;Pw(n(e,o++)).subscribe(IT(t,function(e){t.next(e)},function(){s=!0},void 0,function(){if(s)try{a--;for(var e=function(){var e=r.shift();u(e)};r.length&&a<i;)e();l()}catch(e){t.error(e)}}))};return e.subscribe(IT(t,c,function(){s=!0,l()})),function(){}}(t,i,e,n)}))}function zw(e,t){return void 0===t&&(t=0),_T(function(n,i){n.subscribe(IT(i,function(n){return Vw(i,e,function(){return i.next(n)},t)},function(){return Vw(i,e,function(){return i.complete()},t)},function(n){return Vw(i,e,function(){return i.error(n)},t)}))})}function Kw(e,t){return void 0===t&&(t=0),_T(function(n,i){i.add(e.schedule(function(){return n.subscribe(i)},t))})}function Ww(e,t){if(!e)throw new Error("Iterable cannot be null");return new _A(function(n){Vw(n,t,function(){var i=e[Symbol.asyncIterator]();Vw(n,t,function(){i.next().then(function(e){e.done?n.complete():n.next(e.value)})},0,!0)})})}function Gw(e,t){return t?function(e,t){if(null!=e){if(xw(e))return function(e,t){return Pw(e).pipe(Kw(t),zw(t))}(e,t);if(Cw(e))return function(e,t){return new _A(function(n){var i=0;return t.schedule(function(){i===e.length?n.complete():(n.next(e[i++]),n.closed||this.schedule())})})}(e,t);if(kw(e))return function(e,t){return Pw(e).pipe(Kw(t),zw(t))}(e,t);if(Nw(e))return Ww(e,t);if(Ow(e))return function(e,t){return new _A(function(n){var i;return Vw(n,t,function(){i=e[Iw](),Vw(n,t,function(){var e,t,r;try{t=(e=i.next()).value,r=e.done}catch(e){return void n.error(e)}r?n.complete():n.next(t)},0,!0)}),function(){return $b(null==i?void 0:i.return)&&i.return()}})}(e,t);if(Rw(e))return function(e,t){return Ww(Dw(e),t)}(e,t)}throw _w(e)}(e,t):Pw(e)}var qw;eA(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function Yw(e){return e&&$b(e.schedule)}function Qw(e){return Yw(function(e){return e[e.length-1]}(e))?e.pop():void 0}function Xw(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Gw(e,Qw(e))}function Zw(e){return _T(function(t,n){var i,r=null,a=!1;r=t.subscribe(IT(n,void 0,void 0,function(o){i=Pw(e(o,Zw(e)(t))),r?(r.unsubscribe(),r=null,i.subscribe(n)):a=!0})),a&&(r.unsubscribe(),r=null,i.subscribe(n))})}function Jw(e,t){return _T(function(n,i){var r=0;n.subscribe(IT(i,function(n){return e.call(t,n,r++)&&i.next(n)}))})}!function(e){e.NEXT="N",e.ERROR="E",e.COMPLETE="C"}(qw||(qw={}));var $w=function(){function e(e,t,n){this.kind=e,this.value=t,this.error=n,this.hasValue="N"===e}return e.prototype.observe=function(e){return function(e,t){var n,i,r,a=e,o=a.kind,s=a.value,l=a.error;if("string"!=typeof o)throw new TypeError('Invalid notification, missing "kind"');"N"===o?null===(n=t.next)||void 0===n||n.call(t,s):"E"===o?null===(i=t.error)||void 0===i||i.call(t,l):null===(r=t.complete)||void 0===r||r.call(t)}(this,e)},e.prototype.do=function(e,t,n){var i=this,r=i.kind,a=i.value,o=i.error;return"N"===r?null==e?void 0:e(a):"E"===r?null==t?void 0:t(o):null==n?void 0:n()},e.prototype.accept=function(e,t,n){var i;return $b(null===(i=e)||void 0===i?void 0:i.next)?this.observe(e):this.do(e,t,n
2)},e.prototype.toObservable=function(){var e=this,t=e.kind,n=e.value,i=e.error,r="N"===t?Xw(n):"E"===t?jw(function(){return i}):"C"===t?OA:0;if(!r)throw new TypeError("Unexpected notification kind "+t);return r},e.createNext=function(t){return new e("N",t)},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e}();function eS(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(){return void 0===(e=1)&&(e=1/0),Hw(NA,e);var e}()(Gw(e,Qw(e)))}function tS(e,t,n){var i=$b(e)||t||n?{next:e,error:t,complete:n}:e;return i?_T(function(e,t){var n;null===(n=i.subscribe)||void 0===n||n.call(i);var r=!0;e.subscribe(IT(t,function(e){var n;null===(n=i.next)||void 0===n||n.call(i,e),t.next(e)},function(){var e;r=!1,null===(e=i.complete)||void 0===e||e.call(i),t.complete()},function(e){var n;r=!1,null===(n=i.error)||void 0===n||n.call(i,e),t.error(e)},function(){var e,t;r&&(null===(e=i.unsubscribe)||void 0===e||e.call(i)),null===(t=i.finalize)||void 0===t||t.call(i)}))}):NA}const nS=Object.assign(function(e){return JSON.stringify(e,rS)},{reset(){iS=new NE(uE.canonicalStringify||1e3)}});let iS;function rS(e,t){if(t&&"object"==typeof t){const e=Object.getPrototypeOf(t);if(e===Object.prototype||null===e){const n=Object.keys(t);if(n.every(aS))return t;const i=JSON.stringify(n);let r=iS.get(i);if(!r){n.sort();const e=JSON.stringify(n);r=iS.get(e)||n,iS.set(i,r),iS.set(e,r)}const a=Object.create(e);return r.forEach(e=>{a[e]=t[e]}),a}}return t}function aS(e,t,n){return 0===t||n[t-1]<=e}function oS(e){return e.filter(e=>e).map(e=>e.message||"Error message not found.").join("\n")}nS.reset();class sS extends Error{static is(e){return jE(e,"CombinedGraphQLErrors")}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.errors||[];super(sS.formatMessage(t,{result:e,defaultFormatMessage:oS})),i(this,"errors",void 0),i(this,"data",void 0),i(this,"extensions",void 0),this.errors=t,this.data=e.data,this.extensions=e.extensions,this.name="CombinedGraphQLErrors",VE(this),Object.setPrototypeOf(this,sS.prototype)}}i(sS,"formatMessage",oS);const lS=new WeakSet;function cS(){const e={};return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach(t=>{e[t.name.value]=t}),e}function uS(e){return e.definitions.filter(e=>"FragmentDefinition"===e.kind)}function dS(e){return e.alias?e.alias.value:e.name.value}const hS=new HT;function fS(e){var t,n;const i=null===(t=e.directives)||void 0===t?void 0:t.find(e=>"unmask"===e.name.value);if(!i)return"mask";const r=null===(n=i.arguments)||void 0===n?void 0:n.find(e=>"mode"===e.name.value);return r&&"value"in r.value&&"migrate"===r.value.value?"migrate":"unmask"}function pS(e,t,n){return hS.withValue(!0,()=>{const i=mS(e,t,n,!1);return Object.isFrozen(e),i})}function mS(e,t,n,i,r){const a=n.knownChanged,o=function(e,t){if(t.has(e))return t.get(e);const n=Array.isArray(e)?[]:{};return t.set(e,n),n}(e,n.mutableTargets);if(Array.isArray(e)){for(const r of Array.from(e.entries())){var s=(0,x.A)(r,2);const e=s[0],l=s[1];if(null===l){o[e]=null;continue}const c=mS(l,t,n,i,void 0);a.has(c)&&a.add(o),o[e]=c}return a.has(o)?o:e}for(const s of t.selections){let t;if(i&&a.add(o),s.kind===HA.FIELD){const r=dS(s),l=s.selectionSet;if(t=o[r]||e[r],void 0===t)continue;if(l&&null!==t){const o=mS(e[r],l,n,i,void 0);a.has(o)&&(t=o)}o[r]=t}if(s.kind!==HA.INLINE_FRAGMENT||s.typeCondition&&!n.cache.fragmentMatches(s,e.__typename)||(t=mS(e,s.selectionSet,n,i,r)),s.kind===HA.FRAGMENT_SPREAD){const i=s.name.value,a=n.fragmentMap[i]||(n.fragmentMap[i]=n.cache.lookupFragment(i));nE(a,39,i);const o=fS(s);"mask"!==o&&(t=mS(e,a.selectionSet,n,"migrate"===o,r))}a.has(t)&&a.add(o)}return"__typename"in e&&!("__typename"in o)&&(o.__typename=e.__typename),Object.keys(o).length!==Object.keys(e).length&&a.add(o),a.has(o)?o:e}const gS=Object.prototype,vS=gS.toString,yS=gS.hasOwnProperty,bS=Function.prototype.toString,AS=new Map;function ES(e,t){try{return TS(e,t)}finally{AS.clear()}}function TS(e,t){if(e===t)return!0;const n=vS.call(e);
2if(n!==vS.call(t))return!1;switch(n){case"[object Array]":if(e.length!==t.length)return!1;case"[object Object]":{if(kS(e,t))return!0;const n=wS(e),i=wS(t),r=n.length;if(r!==i.length)return!1;for(let e=0;e<r;++e)if(!yS.call(t,n[e]))return!1;for(let i=0;i<r;++i){const r=n[i];if(!TS(e[r],t[r]))return!1}return!0}case"[object Error]":return e.name===t.name&&e.message===t.message;case"[object Number]":if(e!=e)return t!=t;case"[object Boolean]":case"[object Date]":return+e===+t;case"[object RegExp]":case"[object String]":return e=="".concat(t);case"[object Map]":case"[object Set]":{if(e.size!==t.size)return!1;if(kS(e,t))return!0;const i=e.entries(),r="[object Map]"===n;for(;;){const e=i.next();if(e.done)break;const n=(0,x.A)(e.value,2),a=n[0],o=n[1];if(!t.has(a))return!1;if(r&&!TS(o,t.get(a)))return!1}return!0}case"[object Uint16Array]":case"[object Uint8Array]":case"[object Uint32Array]":case"[object Int32Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object ArrayBuffer]":e=new Uint8Array(e),t=new Uint8Array(t);case"[object DataView]":{let n=e.byteLength;if(n===t.byteLength)for(;n--&&e[n]===t[n];);return-1===n}case"[object AsyncFunction]":case"[object GeneratorFunction]":case"[object AsyncGeneratorFunction]":case"[object Function]":{const n=bS.call(e);return n===bS.call(t)&&!function(e,t){const n=e.length-t.length;return n>=0&&e.indexOf(t,n)===n}(n,CS)}}return!1}function wS(e){return Object.keys(e).filter(SS,e)}function SS(e){return void 0!==this[e]}const CS="{ [native code] }";function kS(e,t){let n=AS.get(e);if(n){if(n.has(t))return!0}else AS.set(e,n=new Set);return n.add(t),!1}function xS(e){return 7===e||8===e}function NS(e){return!xS(e)}function _S(e){var t;return!(null===(t=e.errors)||void 0===t||!t.length)}function IS(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};return n=>new _A(i=>{let r=t();return n.subscribe({next(t){let n;try{n=e(t,r)}catch(e){i.error(e)}void 0!==n&&i.next(n)},error(e){i.error(e)},complete(){i.complete()}})})}function OS(e){const t={data:e.data};return e.error&&(t.error=e.error),t}function DS(e){let t=!1;return KA(e,{Directive:{enter(e){if("client"===e.name.value&&e.arguments&&(t=e.arguments.some(e=>"always"===e.name.value&&"BooleanValue"===e.value.kind&&!0===e.value.value),t))return zA}}}),t}const RS=Array.isArray;function PS(e){return Array.isArray(e)&&e.length>0}function LS(e,t){IE(t);const n=MS(""),i=MS(""),r=e=>{for(let t,r=0;r<e.length&&(t=e[r]);++r)if(!RS(t)){if(t.kind===HA.OPERATION_DEFINITION)return n(t.name&&t.name.value);if(t.kind===HA.FRAGMENT_DEFINITION)return i(t.name.value)}return nE.error(14),null};let o=0;for(let e=t.definitions.length-1;e>=0;--e)t.definitions[e].kind===HA.OPERATION_DEFINITION&&++o;const s=function(e){const t=new Map,n=new Map;return e.forEach(e=>{e&&(e.name?t.set(e.name,e):e.test&&n.set(e.test,e))}),e=>{let i=t.get(e.name.value);return!i&&n.size&&n.forEach((t,n)=>{n(e)&&(i=t)}),i}}(e),l=e=>PS(e)&&e.map(s).some(e=>e&&e.remove),c=new Map;let u=!1;const d={enter(e){if(l(e.directives))return u=!0,null}},h=KA(t,{Field:d,InlineFragment:d,VariableDefinition:{enter:()=>!1},Variable:{enter(e,t,n,i,a){const o=r(a);o&&o.variables.add(e.name.value)}},FragmentSpread:{enter(e,t,n,i,a){if(l(e.directives))return u=!0,null;const o=r(a);o&&o.fragmentSpreads.add(e.name.value)}},FragmentDefinition:{enter(e,t,n,i){c.set(JSON.stringify(i),e)},leave:(e,t,n,r)=>e===c.get(JSON.stringify(r))?e:o>0&&e.selectionSet.selections.every(e=>e.kind===HA.FIELD&&"__typename"===e.name.value)?(i(e.name.value).removed=!0,u=!0,null):void 0},Directive:{leave(e){if(s(e))return u=!0,null}}});if(!u)return t;const f=e=>(e.transitiveVars||(e.transitiveVars=new Set(e.variables),e.removed||e.fragmentSpreads.forEach(t=>{f(i(t)).transitiveVars.forEach(t=>{e.transitiveVars.add(t)})})),e),p=new Set;h.definitions.forEach(e=>{e.kind===HA.OPERATION_DEFINITION?f(n(e.name&&e.name.value)).fragmentSpreads.forEach(e=>{p.add(e)}):e.kind!==HA.FRAGMENT_DEFINITION||0!==o||i(e.name.value).removed||p.add(e.name.value)}),p.forEach(e=>{f(i(e)).fragmentSpreads.forEach(e=>{p.add(e)})});
2const m={enter(e){if(t=e.name.value,!p.has(t)||i(t).removed)return null;var t}};return function(e){return FS(OE(e)||function(e){nE("Document"===e.kind,6),nE(e.definitions.length<=1,7);const t=e.definitions[0];return nE("FragmentDefinition"===t.kind,8),t}(e),cS(uS(e)))?null:e}(KA(h,{FragmentSpread:m,FragmentDefinition:m,OperationDefinition:{leave(e){if(e.variableDefinitions){const t=f(n(e.name&&e.name.value)).transitiveVars;if(t.size<e.variableDefinitions.length)return a(a({},e),{},{variableDefinitions:e.variableDefinitions.filter(e=>t.has(e.variable.name.value))})}}}}))}function MS(e){const t=new Map;return function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e,i=t.get(n);return i||t.set(n,i={variables:new Set,fragmentSpreads:new Set}),i}}function FS(e,t){return!e||e.selectionSet.selections.every(e=>e.kind===HA.FRAGMENT_SPREAD&&FS(t[e.name.value],t))}function US(e,t,n,i){if(n.kind===HA.INT||n.kind===HA.FLOAT)e[t.value]=Number(n.value);else if(n.kind===HA.BOOLEAN||n.kind===HA.STRING)e[t.value]=n.value;else if(n.kind===HA.OBJECT){const r={};n.fields.map(e=>US(r,e.name,e.value,i)),e[t.value]=r}else if(n.kind===HA.VARIABLE){const r=(i||{})[n.name.value];e[t.value]=r}else if(n.kind===HA.LIST)e[t.value]=n.values.map(e=>{const n={};return US(n,t,e,i),n[t.value]});else if(n.kind===HA.ENUM)e[t.value]=n.value;else{if(n.kind!==HA.NULL)throw rE(19,t.value,n.kind);e[t.value]=null}}function BS(e){const t={},n=e&&e.variableDefinitions;return n&&n.length&&n.forEach(e=>{e.defaultValue&&US(t,e.variable.name,e.defaultValue)}),t}const jS=Symbol.for("apollo.result.extensions"),VS=Symbol.for("apollo.result.streamInfo"),HS=Symbol.for("apollo.observableQuery.variablesUnknown");var zS;!function(e){e[e.loading=1]="loading",e[e.setVariables=2]="setVariables",e[e.fetchMore=3]="fetchMore",e[e.refetch=4]="refetch",e[e.poll=6]="poll",e[e.ready=7]="ready",e[e.error=8]="error",e[e.streaming=9]="streaming"}(zS||(zS={}));var KS=function(e){function t(t){var n=e.call(this)||this;return n._value=t,n}return Gb(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return!n.closed&&t.next(this._value),n},t.prototype.getValue=function(){var e=this,t=e.hasError,n=e.thrownError,i=e._value;if(t)throw n;return this._throwIfClosed(),i},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(Ew);function WS(e,t){switch(e.kind){case"InlineFragment":return e;case"FragmentSpread":{const n=e.name.value;if("function"==typeof t)return t(n);const i=t&&t[n];return nE(i,9,n),i||null}default:return null}}function GS(e){let t;IE(e);for(let n of e.definitions){if("OperationDefinition"===n.kind)return n;"FragmentDefinition"!==n.kind||t||(t=n)}if(t)return t;throw rE(12)}function qS(e){return"Field"===e.kind}function YS(e,t){let n=e.directives;return!n||!n.length||function(e){const t=[];return e&&e.length&&e.forEach(e=>{if(!function(e){let t=e.name.value;return"skip"===t||"include"===t}(e))return;const n=e.arguments,i=e.name.value;nE(n&&1===n.length,16,i);const r=n[0];nE(r.name&&"if"===r.name.value,17,i);const a=r.value;nE(a&&("Variable"===a.kind||"BooleanValue"===a.kind),18,i),t.push({directive:e,ifArgument:r})}),t}(n).every(e=>{let n=e.directive,i=e.ifArgument,r=!1;return"Variable"===i.value.kind?(r=t&&t[i.value.name.value],nE(void 0!==r,15,n.name.value)):r=i.value.value,"skip"===n.name.value?!r:r})}const QS=["data"],XS=["data"];function ZS(e,t,n,i){let r=t.data,a=E(t,QS),o=n.data;return ES(a,E(n,XS))&&JS(GS(e).selectionSet,r,o,{fragmentMap:cS(uS(e)),variables:i})}function JS(e,t,n,i){if(t===n)return!0;const r=new Set;return e.selections.every(e=>{if(r.has(e))return!0;if(r.add(e),!YS(e,i.variables))return!0;if($S(e))return!0;if(qS(e)){const r=dS(e),a=t&&t[r],o=n&&n[r],s=e.selectionSet;if(!s)return ES(a,o);const l=Array.isArray(a),c=Array.isArray(o);if(l!==c)return!1;if(l&&c){const e=a.length;if(o.length!==e)return!1;for(let t=0;t<e;++t)if(!JS(s,a[t],o[t],i))return!1;return!0}return JS(s,a,o,i)}{const r=WS(e,i.fragmentMap);if(r)return!!$S(r)||JS(r.selectionSet,t,n,i)}})}function $S(e){return!!e.directives&&e.directives.some(eC)}function eC(e){return"nonreactive"===e.name.value}function tC(e){return e.catch(()=>{}),e}const nC=Object.assign,iC=(Object.hasOwnProperty,{loading:!0,networkStatus:zS.loading,data:void 0,dataState:"empty",partial:!0}),rC={loading:!1,networkStatus:zS.ready,data:void 0,dataState:"empty",partial:!0};class aC{get query(){return this.lastQuery}get variables(){return this.options.variables}get networkStatus(){return this.subject.getValue().result.networkStatus}get cache(){return this.queryManager.cache}constructor(e){let t=e.queryManager,n=e.options,r=e.transformedQuery,o=void 0===r?t.transform(n.query):r;i(this,"options",void 0),i(this,"queryName",void 0),i(this,"variablesUnknown",!1),i(this,"_lastWrite",void 0),i(this,"unsubscribeFromCache",void 0),i(this,"input",void 0),i(this,"subject",void 0),i(this,"isTornDown",void 0),i(this,"queryManager",void 0),i(this,"subscriptions",new Set),i(this,"waitForNetworkResult",void 0),i(this,"lastQuery",void 0),i(this,"linkSubscription",void 0),i(this,"pollingInfo",void 0),i(this,"subscribe",void 0),i(this,"pipe",void 0),i(this,Symbol.observable,void 0),i(this,"@@observable",void 0),i(this,"stableLastResult",void 0),i(this,"didWarnCacheOnlyPolling",!1),i(this,"dirty",!1),i(this,"notifyTimeout",void 0),i(this,"activeOperations",new Set),i(this,"operator",IS(e=>{const t=e.query,n=e.variables,i=e.meta;if("setResult"===e.source)return{query:t,variables:n,result:e.value,meta:i};if("C"===e.kind||!oC(e,this))return;let r;const o=this.subject.getValue();if("cache"===e.source){if(r=e.value,r.networkStatus===zS.ready&&r.partial&&(!this.options.returnPartialData||o.result.networkStatus===zS.error)&&"cache-only"!==this.options.fetchPolicy)return}else if("network"===e.source)this.waitForNetworkResult&&(this.waitForNetworkResult=!1,this.resubscribeCache()),r="E"===e.kind?a(a({},oC(o,e)?o.result:{data:void 0,dataState:"empty",partial:!0}),{},{error:e.error,networkStatus:zS.error,loading:!1}):e.value,"E"===e.kind&&"streaming"===r.dataState&&(r.dataState="complete"),r.error&&(i.shouldEmit=1);else if("newNetworkStatus"===e.source){const t=oC(o,e)?o.result:this.getInitialResult(i.fetchPolicy),n=e.value.resetError?void 0:t.error,s=n?zS.error:zS.ready;r=a(a({},t),{},{error:n,networkStatus:s})}return nE(r),r.error||delete r.error,r.networkStatus=this.calculateNetworkStatus(r.networkStatus),r.loading=NS(r.networkStatus),r=this.maskResult(r),{query:t,variables:n,result:r,meta:i}})),this.queryManager=t,this.waitForNetworkResult="network-only"===n.fetchPolicy,this.isTornDown=!1,this.subscribeToMore=this.subscribeToMore.bind(this),this.maskResult=this.maskResult.bind(this);const s=t.defaultOptions.watchQuery,l=(void 0===s?{}:s).fetchPolicy,c=void 0===l?"cache-first":l,u=n.fetchPolicy,d=void 0===u?c:u,h=n.initialFetchPolicy,f=void 0===h?"standby"===d?c:d:h;n[HS]&&(nE("standby"===d,80),this.variablesUnknown=!0),this.lastQuery=o,this.options=a(a({},n),{},{initialFetchPolicy:f,fetchPolicy:d,variables:this.getVariablesWithDefaults(n.variables)}),this.initializeObservablesQueue(),this["@@observable"]=()=>this,Symbol.observable&&(this[Symbol.observable]=()=>this);const p=OE(this.query);this.queryName=p&&p.name&&p.name.value}
2initializeObservablesQueue(){this.subject=new KS({query:this.query,variables:this.variables,result:iC,meta:{}});const e=this.subject.pipe(tS({subscribe:()=>{this.subject.observed||(this.reobserve(),setTimeout(()=>this.updatePolling()))},unsubscribe:()=>{this.subject.observed||this.tearDownQuery()}}),IS((e,t)=>{let n=e.query,i=e.variables,r=e.result;const a=e.meta.shouldEmit;if(r===iC&&(t.previous=void 0,t.previousVariables=void 0),"standby"===this.options.fetchPolicy||2===a)return;if(1===a)return l();const o=t.previous,s=t.previousVariables;if(o){const e=this.queryManager.getDocumentInfo(n),t=this.queryManager.dataMasking,a=t?e.nonReactiveQuery:n;if((t||e.hasNonreactiveDirective?ZS(a,o,r,i):ES(o,r))&&ES(s,i))return}if(3!==a||this.options.notifyOnNetworkStatusChange&&!ES(o,r))return l();function l(){return t.previous=r,t.previousVariables=i,r}},()=>({})));this.pipe=e.pipe.bind(e),this.subscribe=e.subscribe.bind(e),this.input=new Ew,this.input.complete=()=>{},this.input.pipe(this.operator).subscribe(this.subject)}getCacheDiff(){let e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).optimistic,t=void 0===e||e;return this.cache.diff({query:this.query,variables:this.variables,returnPartialData:!0,optimistic:t})}getInitialResult(e){let t=e||this.options.fetchPolicy;!this.queryManager.prioritizeCacheValues||"network-only"!==t&&"cache-and-network"!==t||(t="cache-first");const n=()=>{var e;const t=this.getCacheDiff(),n=(this.options.returnPartialData||t.complete)&&null!==(e=t.result)&&void 0!==e?e:void 0;return this.maskResult({data:n,dataState:t.complete?"complete":void 0===n?"empty":"partial",loading:!t.complete,networkStatus:t.complete?zS.ready:zS.loading,partial:!t.complete})};switch(t){case"cache-only":return a(a({},n()),{},{loading:!1,networkStatus:zS.ready});case"cache-first":return n();case"cache-and-network":return a(a({},n()),{},{loading:!0,networkStatus:zS.loading});case"standby":return rC;default:return iC}}resubscribeCache(){const e=this.options,t=e.variables,n=e.fetchPolicy,i=this.query,r="standby"===n||"no-cache"===n||this.waitForNetworkResult,a=!oC({query:i,variables:t},this.unsubscribeFromCache)&&!this.waitForNetworkResult;var o;if((r||a)&&(null===(o=this.unsubscribeFromCache)||void 0===o||o.call(this)),r||!a)return;const s={query:i,variables:t,optimistic:!0,watcher:this,callback:e=>{const t=this.queryManager.getDocumentInfo(i);if((t.hasClientExports||t.hasForcedResolvers)&&(s.lastDiff=void 0),s.lastOwnDiff===e)return;const n=this.subject.getValue().result;(e.complete||!n.error&&n!==iC&&n!==rC)&&(ES(n.data,e.result)||this.scheduleNotify())}},l=this.cache.watch(s);this.unsubscribeFromCache=Object.assign(()=>{this.unsubscribeFromCache=void 0,l()},{query:i,variables:t})}getCurrentResult(){const e=this.subject.getValue().result;let t=e.networkStatus===zS.error||this.hasObservers()||"no-cache"===this.options.fetchPolicy?e:this.getInitialResult();return t===iC&&(t=this.getInitialResult()),ES(this.stableLastResult,t)||(this.stableLastResult=t),this.stableLastResult}refetch(e){const t=this.options.fetchPolicy,n={pollInterval:0};return n.fetchPolicy="no-cache"===t?"no-cache":"network-only",e&&!ES(this.variables,e)&&(n.variables=this.options.variables=this.getVariablesWithDefaults(a(a({},this.variables),e))),this._lastWrite=void 0,this._reobserve(n,{newNetworkStatus:zS.refetch})}fetchMore(e){let t=e.query,n=e.variables,i=e.context,r=e.errorPolicy,o=e.updateQuery;nE("cache-only"!==this.options.fetchPolicy,82,DA(this.query,"(anonymous)"));const s=a(a({},RE(this.options,{errorPolicy:"none"},{query:t,context:i,errorPolicy:r})),{},{variables:t?n:a(a({},this.variables),n),fetchPolicy:"no-cache",notifyOnNetworkStatusChange:this.options.notifyOnNetworkStatusChange});s.query=this.transformDocument(s.query),this.lastQuery=t?this.transformDocument(this.options.query):s.query;let l=!1;const c="no-cache"!==this.options.fetchPolicy;c||nE(o,83);const u=this.pushOperation(zS.fetchMore),d=u.finalize,h=u.pushNotification;h({source:"newNetworkStatus",kind:"N",value:{}},{shouldEmit:3});const f=sC(),p=f.promise,m=f.operator,g=this.queryManager.fetchObservableWithInfo(s,{networkStatus:zS.fetchMore,exposeExtensions:!0}).observable.pipe(m,Jw(e=>"N"===e.kind&&"network"===e.source)).subscribe({next:e=>{l=!1;const t=e.value,n=t[jS];if(xS(e.value.networkStatus)&&d(),c){const e=this.getCacheDiff();this.cache.batch({update:e=>{o?e.updateQuery({query:this.query,variables:this.variables,returnPartialData:!0,optimistic:!1,extensions:n},e=>o(e,{fetchMoreResult:t.data,variables:s.variables})):e.writeQuery({query:s.query,variables:s.variables,data:t.data,extensions:n})},onWatchUpdated:(n,i)=>{if(n.watcher===this&&!ES(i.result,e.result)){l=!0;const e=this.getCurrentResult();NS(t.networkStatus)&&h({kind:"N",source:"network",value:a(a({},e),{},{networkStatus:t.networkStatus===zS.error?zS.ready:t.networkStatus,loading:!1,data:i.result,dataState:"streaming"===t.dataState?"streaming":"complete"})})}}})}else{const e=this.getCurrentResult(),n=o(e.data,{fetchMoreResult:t.data,variables:s.variables});h({kind:"N",value:a(a({},e),{},{networkStatus:zS.ready,loading:!1,data:n,dataState:"streaming"===e.dataState?"streaming":"complete"}),source:"network"})}}});return tC(p.then(e=>OS(this.maskResult(e))).finally(()=>
2{if(g.unsubscribe(),d(),c&&!l){const e=this.getCurrentResult();"streaming"===e.dataState?h({kind:"N",source:"network",value:a(a({},e),{},{dataState:"complete",networkStatus:zS.ready})}):h({kind:"N",source:"newNetworkStatus",value:{}},{shouldEmit:1})}}))}subscribeToMore(e){const t=this.queryManager.startGraphQLSubscription({query:e.document,variables:e.variables,context:e.context}).subscribe({next:t=>{const n=e.updateQuery,i=e.onError,r=t.error;r?i?i(r):nE.error(84,r):n&&this.updateQuery((e,i)=>n(e,a({subscriptionData:t},i)))}});return this.subscriptions.add(t),()=>{this.subscriptions.delete(t)&&t.unsubscribe()}}applyOptions(e){const t=RE(this.options,e||{});nC(this.options,t),this.updatePolling()}async setVariables(e){return e=this.getVariablesWithDefaults(e),ES(this.variables,e)?OS(this.getCurrentResult()):(this.options.variables=e,this.hasObservers()?this._reobserve({fetchPolicy:this.options.initialFetchPolicy,variables:e},{newNetworkStatus:zS.setVariables}):OS(this.getCurrentResult()))}updateQuery(e){const t=this.queryManager,n=this.getCacheDiff({optimistic:!1}),i=n.result,r=n.complete,a=e(i,{variables:this.variables,complete:!!r,previousData:i});a&&(this.cache.writeQuery({query:this.options.query,data:a,variables:this.variables}),t.broadcastQueries())}startPolling(e){this.options.pollInterval=e,this.updatePolling()}stopPolling(){this.options.pollInterval=0,this.updatePolling()}applyNextFetchPolicy(e,t){if(t.nextFetchPolicy){const n=t.fetchPolicy,i=void 0===n?"cache-first":n,r=t.initialFetchPolicy,a=void 0===r?i:r;"standby"===i||("function"==typeof t.nextFetchPolicy?t.fetchPolicy=t.nextFetchPolicy.call(t,i,{reason:e,options:t,observable:this,initialFetchPolicy:a}):t.fetchPolicy="variables-changed"===e?a:t.nextFetchPolicy)}return t.fetchPolicy}fetch(e,t,n,i){var r;const o=this.options.fetchPolicy;null!==(r=e.context)&&void 0!==r||(e.context={});let s=!1,l=this.queryManager.fetchObservableWithInfo(e,{networkStatus:t,query:n,onCacheHit:()=>{s=!0},fetchQueryOperator:e=>new _A(n=>{try{return e.subscribe({next(e){s=!0,n.next(e)},error:e=>n.error(e),complete:()=>n.complete()})}finally{s||(f.override=t,this.input.next({kind:"N",source:"newNetworkStatus",value:{resetError:!0},query:d,variables:h,meta:{shouldEmit:3,fetchPolicy:o}}))}}),observableQuery:this}),c=l.observable,u=l.fromLink;const d=this.query,h=this.variables,f={abort:()=>{m.unsubscribe()},query:d,variables:h};this.activeOperations.add(f);let p=t==zS.refetch||t==zS.setVariables;c=c.pipe(i,Mw());const m=c.pipe(tS({next:e=>{"newNetworkStatus"===e.source||"N"===e.kind&&e.value.loading?f.override=t:delete f.override},finalize:()=>this.activeOperations.delete(f)})).subscribe({next:e=>{const t={};p&&"N"===e.kind&&"loading"in e.value&&!e.value.loading&&(p=!1,t.shouldEmit=1),this.input.next(a(a({},e),{},{query:d,variables:h,meta:t}))}});return{fromLink:u,subscription:m,observable:c}}updatePolling(){if(this.queryManager.ssrMode)return;const e=this.pollingInfo,t=this.options,n=(t.fetchPolicy,t.pollInterval),i=()=>{const e=this.options;return!e.pollInterval||!this.hasObservers()||"cache-only"===e.fetchPolicy||"standby"===e.fetchPolicy};if(i())return void this.cancelPolling();if((null==e?void 0:e.interval)===n)return;(e||(this.pollingInfo={})).interval=n;const r=()=>{if(i())return this.cancelPolling();var e,t;this.pollingInfo&&(NS(this.networkStatus)||null!==(e=(t=this.options).skipPollAttempt)&&void 0!==e&&e.call(t)?a():this._reobserve({fetchPolicy:"no-cache"===this.options.initialFetchPolicy?"no-cache":"network-only"},{newNetworkStatus:zS.poll}).then(a,a))},a=()=>{const e=this.pollingInfo;e&&(clearTimeout(e.timeout),e.timeout=setTimeout(r,e.interval))};a()}cancelPolling(){this.pollingInfo&&(clearTimeout(this.pollingInfo.timeout),delete this.pollingInfo)}reobserve(e){return this._reobserve(e)}_reobserve(e,t){this.isTornDown=!1;let n=(t||{}).newNetworkStatus;this.queryManager.obsQueries.add(this);const i=n===zS.refetch||n===zS.poll,r=this.variables,a=this.options.fetchPolicy,o=RE(this.options,e||{});this.variablesUnknown&&(this.variablesUnknown="standby"===o.fetchPolicy);const s=i?o:nC(this.options,o),l=this.transformDocument(s.query);this.lastQuery=l,e&&"variables"in e&&(s.variables=this.getVariablesWithDefaults(e.variables)),i||(this.updatePolling(),!e||!e.variables||ES(e.variables,r)||"standby"===s.fetchPolicy||s.fetchPolicy!==a&&"function"!=typeof s.nextFetchPolicy||(this.applyNextFetchPolicy("variables-changed",s),void 0===n&&(n=zS.setVariables)));const c=this.networkStatus;n||(n=zS.loading,c!==zS.loading&&null!=e&&e.variables&&!ES(e.variables,r)&&(n=zS.setVariables),"standby"===s.fetchPolicy&&(n=zS.ready)),"standby"===s.fetchPolicy&&this.cancelPolling(),this.resubscribeCache();const u=sC("standby"===s.fetchPolicy?{data:void 0}:void 0),d=u.promise,h=u.operator,f=this.fetch(s,n,l,h),p=f.subscription,m=f.observable,g=f.fromLink;i||!g&&this.linkSubscription||(this.linkSubscription&&this.linkSubscription.unsubscribe(),this.linkSubscription=p);const v=Object.assign(tC(d.then(e=>OS(this.maskResult(e))).finally(()=>{this.hasObservers()||0!==this.activeOperations.size||this.tearDownQuery()})),{retain:()=>{const e=m.subscribe({}),t=()=>e.unsubscribe();return d.then(t,t),v}});return v}hasObservers(){return this.subject.observed}stop(){this.subject.complete(),this.initializeObservablesQueue(),this.tearDownQuery()}tearDownQuery(){var e;this.isTornDown||(this.resetNotifications(),null===(e=this.unsubscribeFromCache)||void 0===e||e.call(this),this.linkSubscription&&(this.linkSubscription.unsubscribe(),delete this.linkSubscription),this.stopPolling(),this.subscriptions.forEach(e
2=>e.unsubscribe()),this.subscriptions.clear(),this.queryManager.obsQueries.delete(this),this.isTornDown=!0,this.abortActiveOperations(),this._lastWrite=void 0)}transformDocument(e){return this.queryManager.transform(e)}maskResult(e){const t=this.queryManager.maskOperation({document:this.query,data:e.data,fetchPolicy:this.options.fetchPolicy,cause:this});return t===e.data?e:a(a({},e),{},{data:t})}resetNotifications(){this.notifyTimeout&&(clearTimeout(this.notifyTimeout),this.notifyTimeout=void 0),this.dirty=!1}scheduleNotify(){this.dirty||(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout(()=>this.notify(!0),0)))}notify(){if(!(arguments.length>0&&void 0!==arguments[0]&&arguments[0])){const e=this.queryManager.getDocumentInfo(this.query);if(e.hasClientExports||e.hasForcedResolvers)return}const e=this.dirty;if(this.resetNotifications(),e&&("cache-only"===this.options.fetchPolicy||"cache-and-network"===this.options.fetchPolicy||!this.activeOperations.size)){const e=this.getCacheDiff();ES(e.result,this.getCacheDiff({optimistic:!1}).result)?this.reobserveCacheFirst():this.input.next({kind:"N",value:{data:e.result,dataState:e.complete?"complete":e.result?"partial":"empty",networkStatus:zS.ready,loading:!1,error:void 0,partial:!e.complete},source:"cache",query:this.query,variables:this.variables,meta:{}})}}pushOperation(e){let t=!1;const n=this.query,i=this.variables,r=()=>{this.activeOperations.delete(o)},o={override:e,abort:()=>{t=!0,r()},query:n,variables:i};return this.activeOperations.add(o),{finalize:r,pushNotification:(e,r)=>{t||this.input.next(a(a({},e),{},{query:n,variables:i,meta:a({},r)}))}}}calculateNetworkStatus(e){var t;if(e===zS.streaming)return e;const n=Array.from(this.activeOperations.values()).reverse().find(e=>oC(e,this)&&void 0!==e.override);return null!==(t=null==n?void 0:n.override)&&void 0!==t?t:e}abortActiveOperations(){this.activeOperations.forEach(e=>e.abort())}reset(){const e="cache-only"===this.options.fetchPolicy;this.setResult(e?rC:iC,{shouldEmit:e?1:2}),this.abortActiveOperations()}setResult(e,t){this.input.next({source:"setResult",kind:"N",value:e,query:this.query,variables:this.variables,meta:a({},t)})}reobserveCacheFirst(){const e=this.options,t=e.fetchPolicy,n=e.nextFetchPolicy;"cache-and-network"===t||"network-only"===t?this.reobserve({fetchPolicy:"cache-first",nextFetchPolicy(e,i){return this.nextFetchPolicy=n,"function"==typeof this.nextFetchPolicy?this.nextFetchPolicy(e,i):t}}):this.reobserve()}getVariablesWithDefaults(e){return this.queryManager.getVariables(this.query,e)}}function oC(e,t){return!!(e&&t&&e.query===t.query&&ES(e.variables,t.variables))}function sC(e){let t,n,i=e;return{promise:new Promise((e,i)=>{t=e,n=i}),operator:tS({next(e){if("E"===e.kind)return n(e.error);"N"!==e.kind||"newNetworkStatus"===e.source||e.value.loading||(i=e.value)},finalize:()=>{if(i)t(i);else{const e="The operation was aborted.",t="AbortError";n("undefined"!=typeof DOMException?new DOMException(e,t):Object.assign(new Error(e),{name:t}))}}})}}const lC={},cC=new WeakMap;function uC(e,t){const n=e[t];"function"==typeof n&&(e[t]=function(){return cC.set(e,(cC.get(e)+1)%1e15),n.apply(this,arguments)})}const dC=new WeakMap;class hC{constructor(e,t){i(this,"lastRequestId",1),i(this,"cache",void 0),i(this,"queryManager",void 0),i(this,"id",void 0),i(this,"observableQuery",void 0),i(this,"incremental",void 0),i(this,"_lastWrite",void 0);const n=this.cache=e.cache,r=(dC.get(e)||0)+1;dC.set(e,r),this.id=r+"",this.observableQuery=t,this.queryManager=e,cC.has(n)||(cC.set(n,0),uC(n,"evict"),uC(n,"modify"),uC(n,"reset"))}get lastWrite(){return(this.observableQuery||this)._lastWrite}set lastWrite(e){(this.observableQuery||this)._lastWrite=e}resetLastWrite(){this.lastWrite=void 0}shouldWrite(e,t){var n,i;const r=this.lastWrite;return!(r&&r.dmCount===cC.get(this.cache)&&ES(t,r.variables)&&ES(e.data,r.result.data)&&(null===(n=e.extensions)||void 0===n?void 0:n[VS])===(null===(i=r.result.extensions)||void 0===i?void 0:i[VS]))}get hasNext(){return!!this.incremental&&this.incremental.hasNext}maybeHandleIncrementalResult(e,t,n){const i=this.queryManager.incrementalHandler;return i.isIncrementalResult(t)?(this.incremental||(this.incremental=i.startRequest
2({query:n})),this.incremental.handle(e,t)):t}markQueryResult(e,t){var n;let i=t.document,r=t.variables,o=t.errorPolicy,s=t.cacheWriteBehavior;const l={query:i,variables:r,returnPartialData:!0,optimistic:!0};null===(n=this.observableQuery)||void 0===n||n.resetNotifications();const c=0===s,u=c?void 0:this.cache.diff(l);let d=this.maybeHandleIncrementalResult(null==u?void 0:u.result,e,i);return c||(fC(d,o)?this.cache.batch({onWatchUpdated:(e,t)=>{e.watcher===this.observableQuery&&(e.lastOwnDiff=t)},update:e=>{if(this.shouldWrite(d,r))e.writeQuery({query:i,data:d.data,variables:r,overwrite:1===s,extensions:d.extensions}),this.lastWrite={result:d,variables:r,dmCount:cC.get(this.cache)};else if(u&&u.complete)return void(d=a(a({},d),{},{data:u.result}));const t=e.diff(l);t.complete&&(d=a(a({},d),{},{data:t.result}))}}):this.lastWrite=void 0),d}markMutationResult(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.cache;const i=[],r=0===t.cacheWriteBehavior;let o=this.maybeHandleIncrementalResult(r?void 0:n.diff({id:"ROOT_MUTATION",query:this.queryManager.getDocumentInfo(t.document).asQuery,variables:t.variables,optimistic:!1,returnPartialData:!0}).result,e,t.document);if("ignore"===t.errorPolicy&&(o=a(a({},o),{},{errors:[]})),_S(o)&&"none"===t.errorPolicy)return Promise.resolve(o);const s=()=>a(a({},o),{},{dataState:this.hasNext?"streaming":"complete"});if(!r&&fC(o,t.errorPolicy)){i.push({result:o.data,dataId:"ROOT_MUTATION",query:t.document,variables:t.variables,extensions:o.extensions});const e=t.updateQueries;e&&this.queryManager.getObservableQueries("all").forEach(t=>{const n=t&&t.queryName;if(!n||!Object.hasOwnProperty.call(e,n))return;const r=e[n],a=t.query,o=t.variables,l=t.getCacheDiff({optimistic:!1}),c=l.result;if(l.complete&&c){const e=r(c,{mutationResult:s(),queryName:a&&DA(a)||void 0,queryVariables:o});e&&i.push({result:e,dataId:"ROOT_QUERY",query:a,variables:o})}})}let l=t.refetchQueries;if("function"==typeof l&&(l=l(s())),i.length>0||(l||"").length>0||t.update||t.onQueryUpdated||t.removeOptimistic){const e=[];if(this.queryManager.refetchQueries({updateCache:e=>{r||i.forEach(t=>e.write(t));const n=t.update;if(n){if(!r){const n=e.diff({id:"ROOT_MUTATION",query:this.queryManager.getDocumentInfo(t.document).asQuery,variables:t.variables,optimistic:!1,returnPartialData:!0});n.complete&&(o=a(a({},o),{},{data:n.result}))}this.hasNext||n(e,o,{context:t.context,variables:t.variables})}r||t.keepRootFields||this.hasNext||e.modify({id:"ROOT_MUTATION",fields(e,t){let n=t.fieldName,i=t.DELETE;return"__typename"===n?e:i}})},include:l,optimistic:!1,removeOptimistic:t.removeOptimistic,onQueryUpdated:t.onQueryUpdated||null}).forEach(t=>e.push(t)),t.awaitRefetchQueries||t.onQueryUpdated)return Promise.all(e).then(()=>o)}return Promise.resolve(o)}markMutationOptimistic(e,t){const n="function"==typeof e?e(t.variables,{IGNORE:lC}):e;return n!==lC&&(this.cache.recordOptimisticTransaction(e=>{try{this.markMutationResult({data:n},t,e)}catch(e){nE.error(e)}},this.id),!0)}markSubscriptionResult(e,t){let n=t.document,i=t.variables,r=t.errorPolicy;0!==t.cacheWriteBehavior&&(fC(e,r)&&this.cache.write({query:n,result:e.data,dataId:"ROOT_SUBSCRIPTION",variables:i,extensions:e.extensions}),this.queryManager.broadcastQueries())}}function fC(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"none";const n="ignore"===t||"all"===t;let i=!_S(e);return!i&&n&&e.data&&(i=!0),i}const pC=["extensions"];class mC{constructor(e){i(this,"defaultOptions",void 0),i(this,"client",void 0),i(this,"clientOptions",void 0),i(this,"assumeImmutableResults",void 0),i(this,"documentTransform",void 0),i(this,"ssrMode",void 0),i(this,"defaultContext",void 0),i(this,"dataMasking",void 0),i(this,"incrementalHandler",void 0),i(this,"localState",void 0),i(this,"queryDeduplication",void 0),i(this,"prioritizeCacheValues",!1),i(this,"onBroadcast",void 0),i(this,"mutationStore",void 0),i(this,"obsQueries",new Set),i(this,"fetchCancelFns",new Map),i(this,"transformCache",new xE(uE["queryManager.getDocumentInfo"]||2e3)),i(this,"requestIdCounter",1),i(this,"inFlightLinkObservables",new gE(!1)),i(this,"noCacheWarningsByCause",new WeakSet);const t=new vw(e=>this.cache.transformDocument(e),{cache:!1});this.client=e.client,this.defaultOptions=e.defaultOptions,this.queryDeduplication=e.queryDeduplication,this.clientOptions=e.clientOptions,this.ssrMode=e.ssrMode,this.assumeImmutableResults=e.assumeImmutableResults,this.dataMasking=e.dataMasking,this.localState=e.localState,this.incrementalHandler=e.incrementalHandler;const n=e.documentTransform;this.documentTransform=n?t.concat(n).concat(t):t,this.defaultContext=e.defaultContext||{},(this.onBroadcast=e.onBroadcast)&&(this.mutationStore={})}get link(){return this.client.link}get cache(){return this.client.cache}
2stop(){this.obsQueries.forEach(e=>e.stop()),this.cancelPendingFetches(rE(87))}cancelPendingFetches(e){this.fetchCancelFns.forEach(t=>t(e)),this.fetchCancelFns.clear()}async mutate(e){let t=e.mutation,n=e.variables,i=e.optimisticResponse,r=e.updateQueries,o=e.refetchQueries,s=void 0===o?[]:o,l=e.awaitRefetchQueries,c=void 0!==l&&l,u=e.update,d=e.onQueryUpdated,h=e.fetchPolicy,f=e.errorPolicy,p=e.keepRootFields,m=e.context;const g=new hC(this);t=this.cache.transformForLink(this.transform(t));const v=this.getDocumentInfo(t).hasClientExports;n=this.getVariables(t,n),v&&(n=await this.localState.getExportedVariables({client:this.client,document:t,variables:n,context:m}));const y=this.mutationStore&&(this.mutationStore[g.id]={mutation:t,variables:n,loading:!0,error:null}),b=i&&g.markMutationOptimistic(i,{document:t,variables:n,cacheWriteBehavior:"no-cache"===h?0:2,errorPolicy:f,context:m,updateQueries:r,update:u,keepRootFields:p});return this.broadcastQueries(),new Promise((e,o)=>{const l={};return this.getObservableFromLink(t,a(a({},m),{},{optimisticResponse:b?i:void 0}),n,h,{},!1).observable.pipe(gC(),Hw(e=>{const i=a({},e);return Gw(g.markMutationResult(i,{document:t,variables:n,cacheWriteBehavior:"no-cache"===h?0:2,errorPolicy:f,context:m,update:u,updateQueries:r,awaitRefetchQueries:c,refetchQueries:s,removeOptimistic:b?g.id:void 0,onQueryUpdated:d,keepRootFields:p}))})).pipe(DT(e=>{if(_S(e)&&"none"===f)throw new sS(yC(e));return y&&(y.loading=!1,y.error=null),e})).subscribe({next:n=>{if(this.broadcastQueries(),!g.hasNext){const i={data:this.maskOperation({document:t,data:n.data,fetchPolicy:h,cause:l})};_S(n)&&(i.error=new sS(n)),Object.keys(n.extensions||{}).length&&(i.extensions=n.extensions),e(i)}},error:t=>(y&&(y.loading=!1,y.error=t),b&&this.cache.removeOptimistic(g.id),this.broadcastQueries(),"ignore"===f?e({data:void 0}):"all"===f?e({data:void 0,error:t}):void o(t))})})}fetchQuery(e,t){return IE(e.query,VA.QUERY),(async()=>function(e,t){return new Promise(function(n,i){var r,a=!1;e.subscribe({next:function(e){r=e,a=!0},error:i,complete:function(){n(a?r:t.defaultValue)}})})}(this.fetchObservableWithInfo(e,{networkStatus:t}).observable.pipe(IS(e=>{switch(e.kind){case"E":throw e.error;case"N":if("newNetworkStatus"!==e.source)return OS(e.value)}})),{defaultValue:{data:void 0}}))()}transform(e){return this.documentTransform.transformDocument(e)}getDocumentInfo(e){const t=this.transformCache;if(!t.has(e)){const n=OE(e),i={hasClientExports:RT(["client","export"],e,!0),hasForcedResolvers:DS(e),hasNonreactiveDirective:RT(["nonreactive"],e),hasIncrementalDirective:RT(["defer"],e),nonReactiveQuery:vC(e),clientQuery:RT(["client"],e)?e:null,serverQuery:LS([{name:"client",remove:!0},{name:"connection"},{name:"nonreactive"},{name:"unmask"}],e),operationType:null==n?void 0:n.operation,defaultVars:BS(n),asQuery:a(a({},e),{},{definitions:e.definitions.map(e=>"OperationDefinition"===e.kind&&"query"!==e.operation?a(a({},e),{},{operation:"query"}):e)})};t.set(e,i)}const n=t.get(e);if(n.violation)throw n.violation;return n}getVariables(e,t){const n=this.getDocumentInfo(e).defaultVars,i=Object.entries(null!=t?t:{}).map(e=>{let t=(0,x.A)(e,2),i=t[0],r=t[1];return[i,void 0===r?n[i]:r]});return a(a({},n),Object.fromEntries(i))}watchQuery(e){IE(e.query,VA.QUERY);const t=this.transform(e.query);return void 0===(e=a(a({},e),{},{variables:this.getVariables(t,e.variables)})).notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!0),new aC({queryManager:this,options:e,transformedQuery:t})}query(e){const t=this.transform(e.query);return this.fetchQuery(a(a({},e),{},{query:t})).then(n=>a(a({},n),{},{data:this.maskOperation({document:t,data:null==n?void 0:n.data,fetchPolicy:e.fetchPolicy})}))}generateRequestId(){return this.requestIdCounter++}clearStore(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{discardWatches:!0};return this.cancelPendingFetches(rE(89)),this.obsQueries.forEach(e=>{e.reset()}),this.mutationStore&&(this.mutationStore={}),this.cache.reset(e)}getObservableQueries(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"active";const t=new Set,n=new Map,i=new Map,r=new Set;
2return Array.isArray(e)&&e.forEach(e=>{if("string"==typeof e)n.set(e,e),i.set(e,!1);else if(XE(t=e)&&"Document"===t.kind&&Array.isArray(t.definitions)){const t=ET(this.transform(e));n.set(t,DA(e)),i.set(t,!1)}else XE(e)&&e.query&&r.add(e);var t}),this.obsQueries.forEach(n=>{const r=ET(this.transform(n.options.query));if("all"===e)return void t.add(n);const a=n.queryName,o=n.options.fetchPolicy;"active"===e&&"standby"===o||("active"===e||a&&i.has(a)||r&&i.has(r))&&(t.add(n),a&&i.set(a,!0),r&&i.set(r,!0))}),r.size&&r.forEach(e=>{const n=new aC({queryManager:this,options:a(a({},bw(this.defaultOptions.watchQuery,e)),{},{fetchPolicy:"network-only"})});t.add(n)}),t}refetchObservableQueries(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=[];return this.getObservableQueries(e?"all":"active").forEach(n=>{const i=n.options.fetchPolicy;!e&&"standby"===i||"cache-only"===i||t.push(n.refetch())}),this.broadcastQueries(),Promise.all(t)}startGraphQLSubscription(e){let t=e.query,n=e.variables;const i=e.fetchPolicy,r=void 0===i?"cache-first":i,a=e.errorPolicy,o=void 0===a?"none":a,s=e.context,l=void 0===s?{}:s,c=e.extensions,u=void 0===c?{}:c;let d;IE(t,VA.SUBSCRIPTION),t=this.transform(t),n=this.getVariables(t,n);const h=(this.getDocumentInfo(t).hasClientExports?Gw(this.localState.getExportedVariables({client:this.client,document:t,variables:n,context:l})):Xw(n)).pipe(Hw(e=>{const n=this.getObservableFromLink(t,l,e,r,u),i=n.observable,a=n.restart,s=new hC(this);return d=a,i.pipe(DT(n=>{var i;s.markSubscriptionResult(n,{document:t,variables:e,errorPolicy:o,cacheWriteBehavior:"no-cache"===r?0:2});const a={data:null!==(i=n.data)&&void 0!==i?i:void 0};return _S(n)?a.error=new sS(n):GE(n)&&(a.error=n.extensions[WE],delete n.extensions[WE]),n.extensions&&Object.keys(n.extensions).length&&(a.extensions=n.extensions),a.error&&"none"===o&&(a.data=void 0),"ignore"===o&&delete a.error,a}),Zw(e=>Xw("ignore"===o?{data:void 0}:{data:void 0,error:e})),Jw(e=>!(!e.data&&!e.error)))}));return Object.assign(h,{restart:()=>{var e;return null===(e=d)||void 0===e?void 0:e()}})}broadcastQueries(){this.onBroadcast&&this.onBroadcast(),this.obsQueries.forEach(e=>e.notify())}getObservableFromLink(e,t,n,i,r){var o,s;let l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null!==(o=null===(s=t)||void 0===s?void 0:s.queryDeduplication)&&void 0!==o?o:this.queryDeduplication,c={};const u=this.getDocumentInfo(e),d=u.serverQuery,h=u.clientQuery,f=u.operationType,p=u.hasIncrementalDirective,m=DA(e),g={client:this.client};if(d){const y=this.inFlightLinkObservables,b=this.link;try{const A=this.incrementalHandler.prepareRequest({query:d,variables:n,context:a(a(a({},this.defaultContext),t),{},{queryDeduplication:l}),extensions:r});function E(e){return new _A(t=>{var n;function i(){return e.subscribe({next:t.next.bind(t),complete:t.complete.bind(t),error:t.error.bind(t)})}let r=i();return(n=c).restart||(n.restart=()=>{r.unsubscribe(),r=i()}),()=>{r.unsubscribe(),c.restart=void 0}})}if(t=A.context,l){const T=ET(d),w=nS(n);c=y.lookup(T,w),c.observable||(c.observable=LT(b,A,g).pipe(E,(v=()=>{y.peek(T,w)===c&&y.remove(T,w)},_T(function(e,t){try{e.subscribe(t)}finally{t.add(v)}})),f===VA.SUBSCRIPTION?Mw():Uw({refCount:!0})))}else c.observable=LT(b,A,g).pipe(E)}catch(S){c.observable=jw(()=>S)}}else c.observable=Xw({data:{}});var v;if(h){const C=OE(e).operation;nE(!p,94,C[0].toUpperCase()+C.slice(1),null!=m?m:"(anonymous)"),c.observable=c.observable.pipe(Hw(e=>Gw(this.localState.execute({client:this.client,document:h,remoteResult:e,context:t,variables:n,fetchPolicy:i}))))}return{restart:()=>{var e,t;return null===(e=(t=c).restart)||void 0===e?void 0:e.call(t)},observable:c.observable.pipe(Zw(e=>{throw function(e){lS.add(e)}(e=qE(e)),e}))}}getResultsFromLink(e,t){let n=t.queryInfo,i=t.cacheWriteBehavior,r=t.observableQuery,o=t.exposeExtensions;const s=n.lastRequestId=this.generateRequestId(),l=e.errorPolicy,c=this.cache.transformForLink(e.query);return this.getObservableFromLink(c,e.context,e.variables,e.fetchPolicy).observable.pipe(DT(t=>{const s=n.markQueryResult(t,a(a({},e),{},{document:c,cacheWriteBehavior:i})),u=_S(s);if(u&&"none"===l)throw n.resetLastWrite(),null==r||r.resetNotifications(),new sS(yC(s));const d=a({data:s.data},n.hasNext?{loading:!0,networkStatus:zS.streaming,dataState:"streaming",partial:!0}:{dataState:s.data?"complete":"empty",loading:!1,networkStatus:zS.ready,partial:!s.data});
2return o&&"extensions"in s&&(d[jS]=s.extensions),u&&("none"===l&&(d.data=void 0,d.dataState="empty"),"ignore"!==l&&(d.error=new sS(yC(s)),"streaming"!==d.dataState&&(d.networkStatus=zS.error))),d}),Zw(e=>{if(s>=n.lastRequestId&&"none"===l)throw n.resetLastWrite(),null==r||r.resetNotifications(),e;const t={data:void 0,dataState:"empty",loading:!1,networkStatus:zS.ready,partial:!0};return"ignore"!==l&&(t.error=e,t.networkStatus=zS.error),Xw(t)}))}fetchObservableWithInfo(e,t){let n=t.networkStatus,i=void 0===n?zS.loading:n,r=t.query,a=void 0===r?e.query:r,o=t.fetchQueryOperator,s=void 0===o?e=>e:o,l=t.onCacheHit,c=void 0===l?()=>{}:l,u=t.observableQuery,d=t.exposeExtensions;const h=this.getVariables(a,e.variables);let f=e.fetchPolicy,p=void 0===f?"cache-first":f,m=e.errorPolicy,g=void 0===m?"none":m,v=e.returnPartialData,y=void 0!==v&&v,b=e.notifyOnNetworkStatusChange,A=void 0===b||b,E=e.context,T=void 0===E?{}:E;!this.prioritizeCacheValues||"network-only"!==p&&"cache-and-network"!==p||(p="cache-first");const w=Object.assign({},e,{query:a,variables:h,fetchPolicy:p,errorPolicy:g,returnPartialData:y,notifyOnNetworkStatusChange:A,context:T}),S=new hC(this,u),C=t=>{w.variables=t;const n="no-cache"===p?0:i===zS.refetch&&"merge"!==w.refetchWritePolicy?1:2,r=this.fetchQueryByPolicy(w,{queryInfo:S,cacheWriteBehavior:n,onCacheHit:c,observableQuery:u,exposeExtensions:d});return r.observable=r.observable.pipe(s),"standby"!==w.fetchPolicy&&(null==u||u.applyNextFetchPolicy("after-fetch",e)),r},k=()=>{this.fetchCancelFns.delete(S.id)};this.fetchCancelFns.set(S.id,e=>{x.next({kind:"E",error:e,source:"network"})});const x=new Ew;let N,_;if(this.getDocumentInfo(w.query).hasClientExports)N=Gw(this.localState.getExportedVariables({client:this.client,document:w.query,variables:w.variables,context:w.context})).pipe(Hw(e=>C(e).observable)),_=!0;else{const e=C(w.variables);_=e.fromLink,N=e.observable}return{observable:new _A(e=>{e.add(k),N.subscribe(e),x.subscribe(e)}).pipe(Mw()),fromLink:_}}refetchQueries(e){let t=e.updateCache,n=e.include,i=e.optimistic,r=void 0!==i&&i,a=e.removeOptimistic,o=void 0===a?r?ZA("refetchQueries"):void 0:a,s=e.onQueryUpdated;const l=new Map;n&&this.getObservableQueries(n).forEach(e=>{if("cache-only"===e.options.fetchPolicy||e.variablesUnknown)return;const t=e.getCurrentResult();l.set(e,{oq:e,lastDiff:{result:null==t?void 0:t.data,complete:!(null!=t&&t.partial)}})});const c=new Map;if(t){const e=new Set;this.cache.batch({update:t,optimistic:r&&o||!1,removeOptimistic:o,onWatchUpdated(t,n,i){const r=t.watcher;if(r instanceof aC&&!e.has(r)){if(e.add(r),s){l.delete(r);let e=s(r,n,i);return!0===e&&(e=r.refetch().retain()),!1!==e&&c.set(r,e),e}null!==s&&"cache-only"!==r.options.fetchPolicy&&l.set(r,{oq:r,lastDiff:i,diff:n})}}})}return l.size&&l.forEach(e=>{let t,n=e.oq,i=e.lastDiff,r=e.diff;s&&(r||(r=n.getCacheDiff()),t=s(n,r,i)),s&&!0!==t||(t=n.refetch().retain()),!1!==t&&c.set(n,t)}),o&&this.cache.removeOptimistic(o),c}maskOperation(e){const t=e.document,n=e.data;return this.dataMasking?function(e,t,n){var i;const r=OE(t);return nE(r,43),null==e?e:pS(e,r.selectionSet,{operationType:r.operation,operationName:null===(i=r.name)||void 0===i?void 0:i.value,fragmentMap:cS(uS(t)),cache:n,mutableTargets:new WeakMap,knownChanged:new WeakSet})}(n,t,this.cache):n}maskFragment(e){const t=e.data,n=e.fragment,i=e.fragmentName;return this.dataMasking?function(e,t,n,i){const r=t.definitions.filter(e=>e.kind===HA.FRAGMENT_DEFINITION);void 0===i&&(nE(1===r.length,41,r.length),i=r[0].name.value);const a=r.find(e=>e.name.value===i);return nE(!!a,42,i),null==e||ES(e,{})?e:pS(e,a.selectionSet,{operationType:"fragment",operationName:a.name.value,fragmentMap:cS(uS(t)),cache:n,mutableTargets:new WeakMap,knownChanged:new WeakSet})}(t,n,this.cache,i):t}fetchQueryByPolicy(e,t){let n=e.query,i=e.variables,r=e.fetchPolicy,o=e.errorPolicy,s=e.returnPartialData,l=e.context,c=t.cacheWriteBehavior,u=t.onCacheHit,d=t.queryInfo,h=t.observableQuery,f=t.exposeExtensions;const p=()=>this.cache.diff({query:n,variables:i,returnPartialData:!0,optimistic:!0}),m=(e,t)=>
2{const a=e.result,c=n=>(e.complete||s||(n=void 0),{data:n,dataState:e.complete?"complete":n?"partial":"empty",loading:NS(t),networkStatus:t,partial:!e.complete}),d=e=>Xw({kind:"N",value:c(e),source:"cache"});return(e.complete||s)&&this.getDocumentInfo(n).hasForcedResolvers?(u(),Gw(this.localState.execute({client:this.client,document:n,remoteResult:a?{data:a}:void 0,context:l,variables:i,onlyRunForcedResolvers:!0,returnPartialData:!0,fetchPolicy:r}).then(e=>({kind:"N",value:c(e.data||void 0),source:"cache"})))):"none"===o&&t===zS.refetch&&e.missing?d(void 0):d(a||void 0)},g=()=>this.getResultsFromLink({query:n,variables:i,context:l,fetchPolicy:r,errorPolicy:o},{cacheWriteBehavior:c,queryInfo:d,observableQuery:h,exposeExtensions:f}).pipe(gC(),_T(function(e,t){e.subscribe(IT(t,function(e){t.next($w.createNext(e))},function(){t.next($w.createComplete()),t.complete()},function(e){t.next($w.createError(e)),t.complete()}))}),DT(e=>a(a({},e),{},{source:"network"})));switch(r){default:case"cache-first":{const e=p();return e.complete?{fromLink:!1,observable:m(e,zS.ready)}:s?{fromLink:!0,observable:eS(m(e,zS.loading),g())}:{fromLink:!0,observable:g()}}case"cache-and-network":{const e=p();return e.complete||s?{fromLink:!0,observable:eS(m(e,zS.loading),g())}:{fromLink:!0,observable:g()}}case"cache-only":return{fromLink:!1,observable:eS(m(p(),zS.ready))};case"network-only":case"no-cache":return{fromLink:!0,observable:g()};case"standby":return{fromLink:!1,observable:OA}}}}function gC(){let e=!1;return tS({next(){e=!0},complete(){nE(e,98)}})}function vC(e){return KA(e,{FragmentSpread:e=>{var t;if(null===(t=e.directives)||void 0===t||!t.some(e=>"unmask"===e.name.value))return a(a({},e),{},{directives:[...e.directives||[],{kind:HA.DIRECTIVE,name:{kind:HA.NAME,value:"nonreactive"}}
2]})}})}function yC(e){var n;if(null==(null===(n=e.extensions)||void 0===n?void 0:n[VS]))return e;const i=e.extensions,r=(i[VS],E(i,[VS].map(t))),a=E(e,pC);return Object.keys(r).length>0&&(a.extensions=r),a}class bC{set prioritizeCacheValues(e){this.queryManager.prioritizeCacheValues=e}get prioritizeCacheValues(){return this.queryManager.prioritizeCacheValues}constructor(e){var t;i(this,"link",void 0),i(this,"cache",void 0),i(this,"disableNetworkFetches",void 0),i(this,"version",void 0),i(this,"queryDeduplication",void 0),i(this,"defaultOptions",void 0),i(this,"devtoolsConfig",void 0),i(this,"queryManager",void 0),i(this,"devToolsHookCb",void 0),i(this,"resetStoreCallbacks",[]),i(this,"clearStoreCallbacks",[]),i(this,"reFetchObservableQueries",void 0),i(this,"maskedFragmentTransform",new vw(yw));const n=e.cache,r=e.documentTransform,o=e.ssrMode,s=void 0!==o&&o,l=e.ssrForceFetchDelay,c=void 0===l?0:l,u=e.queryDeduplication,d=void 0===u||u,h=e.defaultOptions,f=e.defaultContext,p=e.assumeImmutableResults,m=void 0===p?n.assumeImmutableResults:p,g=e.localState,v=e.devtools,y=e.dataMasking,b=e.link,A=e.incrementalHandler,E=void 0===A?new PT:A,T=e.experiments,w=void 0===T?[]:T;this.link=b,this.cache=n,this.queryDeduplication=d,this.defaultOptions=h||{},this.devtoolsConfig=a(a({},v),{},{enabled:null!==(t=null==v?void 0:v.enabled)&&void 0!==t?t:GA}),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.watchFragment=this.watchFragment.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.refetchObservableQueries=this.refetchObservableQueries.bind(this),this.version=QA,this.queryManager=new mC({client:this,defaultOptions:this.defaultOptions,defaultContext:f,documentTransform:r,queryDeduplication:d,ssrMode:s,dataMasking:!!y,clientOptions:e,incrementalHandler:E,assumeImmutableResults:m,onBroadcast:this.devtoolsConfig.enabled?()=>{this.devToolsHookCb&&this.devToolsHookCb()}:void 0,localState:g}),this.prioritizeCacheValues=s||c>0,c&&setTimeout(()=>{this.prioritizeCacheValues=!1},c),this.devtoolsConfig.enabled&&this.connectToDevTools(),w.forEach(t=>t.call(this,e))}connectToDevTools(){if("undefined"==typeof window)return;const e=window,t=Symbol.for("apollo.devtools");(e[t]=e[t]||[]).push(this),e.__APOLLO_CLIENT__=this}get documentTransform(){return this.queryManager.documentTransform}get localState(){return this.queryManager.localState}set localState(e){this.queryManager.localState=e}stop(){this.queryManager.stop()}watchQuery(e){return this.defaultOptions.watchQuery&&(e=bw(this.defaultOptions.watchQuery,e)),this.queryManager.watchQuery(e)}query(e){return this.defaultOptions.query&&(e=bw(this.defaultOptions.query,e)),this.queryManager.query(e)}mutate(e){const t=bw(RE({fetchPolicy:"network-only",errorPolicy:"none"},this.defaultOptions.mutate),e);return IE(t.mutation,VA.MUTATION),this.queryManager.mutate(t)}subscribe(e){const t={},n=this.queryManager.startGraphQLSubscription(e),i=n.pipe(DT(n=>a(a({},n),{},{data:this.queryManager.maskOperation({document:e.query,data:n.data,fetchPolicy:e.fetchPolicy,cause:t})})));return Object.assign(i,{restart:n.restart})}readQuery(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.cache.readQuery(a(a({},e),{},{query:this.transform(e.query)}),t)}watchFragment(e){const t=this.queryManager.dataMasking;return this.cache.watchFragment(a(a({},e),{},{fragment:this.transform(e.fragment,t)}))}readFragment(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.cache.readFragment(a(a({},e),{},{fragment:this.transform(e.fragment)}),t)}writeQuery(e){const t=this.cache.writeQuery(e);return!1!==e.broadcast&&this.queryManager.broadcastQueries(),t}writeFragment(e){const t=this.cache.writeFragment(e);return!1!==e.broadcast&&this.queryManager.broadcastQueries(),t}__actionHookForDevTools(e){this.devToolsHookCb=e}__requestRaw(e){return LT(this.link,e,{client:this})}resetStore(){return Promise.resolve().then(()=>this.queryManager.clearStore({discardWatches:!1})).then(()=>Promise.all(this.resetStoreCallbacks.map(e=>e()))).then(()=>this.refetchObservableQueries())}clearStore(){return Promise.resolve().then(()=>this.queryManager.clearStore({discardWatches:!0})).then(()=>Promise.all(this.clearStoreCallbacks.map(e=>e())))}onResetStore(e){return this.resetStoreCallbacks.push(e),()=>{this.resetStoreCallbacks=this.resetStoreCallbacks.filter(t=>t!==e)}}onClearStore(e){return this.clearStoreCallbacks.push(e),()=>{this.clearStoreCallbacks=this.clearStoreCallbacks.filter(t=>t!==e)}}refetchObservableQueries(e){return this.queryManager.refetchObservableQueries(e)}refetchQueries(e){const t=this.queryManager.refetchQueries(e),n=[],i=[];t.forEach((e,t)=>{n.push(t),i.push(e)});const r=Promise.all(i);return r.queries=n,r.results=i,r.catch(e=>{}),r}getObservableQueries(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"active";return this.queryManager.getObservableQueries(e)}extract(e){return this.cache.extract(e)}restore(e){return this.cache.restore(e)}setLink(e){this.link=e}get defaultContext(){return this.queryManager.defaultContext}transform(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=this.queryManager.transform(e);return t?this.maskedFragmentTransform.transformDocument(n):n}}const AC={kind:HA.FIELD,name:{kind:HA.NAME,value:"__typename"}},EC=Object.assign(function(e){return KA(e,{SelectionSet:{enter(e,t,n){if(n&&n.kind===HA.OPERATION_DEFINITION)return;const i=e.selections;if(!i)return;if(i.some(e=>e.kind===HA.FIELD&&("__typename"===e.name.value||0===e.name.value.lastIndexOf("__",0))))return;const r=n;return r.kind===HA.FIELD&&r.directives&&r.directives.some(e=>"export"===e.name.value)?void 0:a(a({},e),{},{selections:[...i,AC]})}}})},{added:e=>e===AC});function TC(e){return Boolean(e&&"object"==typeof e&&"string"==typeof e.__ref)}function wC(e,t){return e===t}var SC=function(e){function t(t,n){return e.call(this)||this}return Gb(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(iA),CC={setInterval:function(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var r=CC.delegate;return(null==r?void 0:r.setInterval)?r.setInterval.apply(r,Zb([e,t],Xb(n))):setInterval.apply(void 0,Zb([e,t],Xb(n)))},clearInterval:function(e){var t=CC.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},kC=function(e){function t(t,n){var i=e.call(this,t,n)||this;
2return i.scheduler=t,i.work=n,i.pending=!1,i}return Gb(t,e),t.prototype.schedule=function(e,t){var n;if(void 0===t&&(t=0),this.closed)return this;this.state=e;var i=this.id,r=this.scheduler;return null!=i&&(this.id=this.recycleAsyncId(r,i,t)),this.pending=!0,this.delay=t,this.id=null!==(n=this.id)&&void 0!==n?n:this.requestAsyncId(r,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),CC.setInterval(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,t,n){if(void 0===n&&(n=0),null!=n&&this.delay===n&&!1===this.pending)return t;null!=t&&CC.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n,i=!1;try{this.work(e)}catch(e){i=!0,n=e||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),n},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,n=this.scheduler,i=n.actions;this.work=this.state=this.scheduler=null,this.pending=!1,nA(i,this),null!=t&&(this.id=this.recycleAsyncId(n,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(SC),xC=function(){function e(t,n){void 0===n&&(n=e.now),this.schedulerActionCtor=t,this.now=n}return e.prototype.schedule=function(e,t,n){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(n,t)},e.now=ww.now,e}(),NC=function(e){function t(t,n){void 0===n&&(n=xC.now);var i=e.call(this,t,n)||this;return i.actions=[],i._active=!1,i}return Gb(t,e),t.prototype.flush=function(e){var t=this.actions;if(this._active)t.push(e);else{var n;this._active=!0;do{if(n=e.execute(e.state,e.delay))break}while(e=t.shift());if(this._active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}},t}(xC),_C=new NC(kC);function IC(e,t){let n=t;const i=[];return e.definitions.forEach(e=>{if("OperationDefinition"===e.kind)throw rE(10,e.operation,e.name?" named '".concat(e.name.value,"'"):"");"FragmentDefinition"===e.kind&&i.push(e)}),void 0===n&&(nE(1===i.length,11,i.length),n=i[0].name.value),a(a({},e),{},{definitions:[{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:n}}]}},...e.definitions]})}function OC(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return fw.bind(null,...t)}const DC=["id","data"],RC=["data","fragment","fragmentName"];class PC{constructor(){i(this,"assumeImmutableResults",!1),i(this,"fragmentWatches",new gE(!0)),i(this,"onAfterBroadcast",e=>e()),i(this,"getFragmentDoc",mw(IC,{max:uE["cache.fragmentQueryDocuments"]||1e3,cache:TE,makeCacheKey:OC(this)}))}lookupFragment(e){return null}batch(e){const t="string"==typeof e.optimistic?e.optimistic:!1===e.optimistic?null:void 0;let n;return this.performTransaction(()=>n=e.update(this),t),n}recordOptimisticTransaction(e,t){this.performTransaction(e,t)}transformDocument(e){return e}transformForLink(e){return e}identify(e){}gc(){return[]}modify(e){return!1}readQuery(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:!!e.optimistic;return this.read(a(a({},e),{},{rootId:e.id||"ROOT_QUERY",optimistic:t}))}watchFragment(e){const t=e.fragment,n=e.fragmentName,i=e.from,r=this.getFragmentDoc(t,n),o=(Array.isArray(i)?i:[i]).map(e=>null==e?e:this.toCacheId(e));if(!Array.isArray(i)){const t=this.watchSingleFragment(o[0],r,e);return null===i?t:Bw(t,Symbol.for("apollo.transform.individualResult"),e=>{var t;return a(a({},e),{},{data:null!==(t=e.data)&&void 0!==t?t:{}})})}let s;function l(e){const t=e.reduce((e,t,n)=>(e.data.push(t.data),e.complete&&(e.complete=t.complete),e.dataState=e.complete?"complete":"partial",t.missing&&(e.missing||(e.missing={}),e.missing[n]=t.missing),e),{data:[],dataState:"complete",complete:!0});return ES(s,t)||(s=t),s}if(0===o.length)return UC;let c=!1;const u=o.map(t=>this.watchSingleFragment(t,r,e)),d=function(e){return 0===e.length?OA:new _A(t=>{const n=e.length,i=new Array(n),r=new Map;e.forEach((e,t)=>{r.has(e)||r.set(e,new Set),r.get(e).add(t)});let a,o=r.size,s=r.size;r.forEach((n,r)=>{let l=!1;const c=r.subscribe({next:o=>
2{n.forEach(e=>i[e]=o),l||(l=!0,s--),s||(a||(a=new Set(e.filter(e=>e.dirty))),a.delete(r),a.size||(t.next(i.slice()),a=void 0))},complete:()=>{o--,o||t.complete()},error:t.error.bind(t)});t.add(c)})})}(u).pipe(DT(l),tS({subscribe:()=>c=!0,unsubscribe:()=>c=!1}),Uw({bufferSize:1,refCount:!0}));return Object.assign(d,{getCurrentResult:()=>{if(c&&s)return s;return l(u.map(e=>e.getCurrentResult()))}})}watchSingleFragment(e,t,n){if(null===e)return MC;const i=n.optimistic,r=void 0===i||i,a=n.variables,o=[t,nS({id:e,optimistic:r,variables:a})],s=this.fragmentWatches.lookupArray(o);if(!s.observable){let u,d=!1;function h(e){const i=e.result;return u&&ZS(t,{data:u.data},{data:i},n.variables)||(u={data:i,dataState:e.complete?"complete":"partial",complete:e.complete},e.missing&&(u.missing=e.missing.missing)),u}const f=new _A(n=>{d=!0;const i=this.watch({variables:a,returnPartialData:!0,id:e,query:t,optimistic:r,immediate:!0,callback:e=>{f.dirty=!0,this.onAfterBroadcast(()=>{n.next(h(e)),f.dirty=!1})}});return()=>{d=!1,i(),this.fragmentWatches.removeArray(o)}}).pipe((void 0===c&&(c=NA),l=null!=l?l:wC,_T(function(e,t){var n,i=!0;e.subscribe(IT(t,function(e){var r=c(e);!i&&l(n,r)||(i=!1,n=r,t.next(e))}))})),Mw({connector:()=>new Sw(1),resetOnRefCountZero:()=>function(e,t,n){void 0===e&&(e=0),void 0===n&&(n=_C);var i=-1;return null!=t&&(Yw(t)?n=t:i=t),new _A(function(t){var r,a=(r=e)instanceof Date&&!isNaN(r)?+e-n.now():e;a<0&&(a=0);var o=0;return n.schedule(function(){t.closed||(t.next(o++),0<=i?this.schedule(void 0,i):t.complete())},a)})}(0)}));s.observable=Object.assign(f,{dirty:!1,getCurrentResult:()=>d&&u?u:h(this.diff({id:e,query:t,returnPartialData:!0,optimistic:r,variables:a}))})}var l,c;return s.observable}readFragment(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:!!e.optimistic;const n=void 0!==e.from?this.toCacheId(e.from):e.id;return this.read(a(a({},e),{},{query:this.getFragmentDoc(e.fragment,e.fragmentName),rootId:n,optimistic:t}))}writeQuery(e){let t=e.id,n=e.data,i=E(e,DC);return this.write(Object.assign(i,{dataId:t||"ROOT_QUERY",result:n}))}writeFragment(e){let t=e.data,n=e.fragment,i=e.fragmentName,r=E(e,RC);const a=void 0!==r.from?this.toCacheId(r.from):r.id;return this.write(Object.assign(r,{query:this.getFragmentDoc(n,i),dataId:a,result:t}))}updateQuery(e,t){return this.batch({update(n){const i=n.readQuery(e),r=t(i);return null==r?i:(n.writeQuery(a(a({},e),{},{data:r})),r)}})}updateFragment(e,t){return this.batch({update(n){const i=n.readFragment(e),r=t(i);return null==r?i:(n.writeFragment(a(a({},e),{},{data:r})),r)}})}toCacheId(e){return"string"==typeof e?e:this.identify(e)}}const LC=Object.freeze({data:null,dataState:"complete",complete:!0}),MC=Object.assign(new _A(e=>{e.next(LC)}),{dirty:!1,getCurrentResult:()=>LC}),FC=Object.freeze({data:[],dataState:"complete",complete:!0}),UC=Object.assign(new _A(e=>{e.next(FC)}),{getCurrentResult:()=>FC});function BC(e){return{__ref:String(e)}}const jC=Object.prototype.hasOwnProperty,VC=function(e,t,n){return this.merge(e[n],t[n])},HC=e=>isNaN(+e)?{}:[];class zC{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,"options",void 0),i(this,"reconciler",void 0),i(this,"isObject",XE),i(this,"pastCopies",new Set),this.options=e,this.reconciler=e.reconciler||VC}merge(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=n.atPath;if(null!=i&&i.length){const r=k(i),o=r[0],s=(0,T.A)(r).slice(1);void 0===e&&(e=HC(o));let l=e[o];void 0===l&&s.length&&(l=HC(s[0]));const c=this.merge(l,t,a(a({},n),{},{atPath:s}));return l!==c&&((e=this.shallowCopyForMerge(e))[o]=c),e}return Array.isArray(e)&&Array.isArray(t)&&"truncate"===this.options.arrayMerge&&e.length>t.length&&(e=e.slice(0,t.length),this.pastCopies.add(e)),XE(t)&&XE(e)?(Object.keys(t).forEach(n=>{if(jC.call(e,n)){const i=e[n];if(t[n]!==i){const r=this.reconciler(e,t,n);r!==i&&((e=this.shallowCopyForMerge(e))[n]=r)}}else(e=this.shallowCopyForMerge(e))[n]=t[n]}),e):t}shallowCopyForMerge(e){return XE(e)&&(this.pastCopies.has(e)||(e=Array.isArray(e)?e.slice(0):a({__proto__:Object.getPrototypeOf(e)},e),this.pastCopies.add(e))),e}}const KC=Object.prototype.hasOwnProperty;function WC(e,t){let n=e.__typename,i=e.id,r=e._id;if("string"==typeof n&&(t&&(t.keyObject=null!=i?{id:i}:null!=r?{_id:r}:void 0),null==i&&null!=r&&(i=r),null!=i))return"".concat(n,":").concat("number"==typeof i||"string"==typeof i?i:JSON.stringify(i))}const GC={dataIdFromObject:WC,resultCaching:!0},qC=/^[_a-z][_0-9a-z]*/i;function YC(e){const t=e.match(qC);return t?t[0]:e}function QC(e,t,n){return!!XE(t)&&(RS(t)?t.every(t=>QC(e,t,n)):e.selections.every(e=>{if(qS(e)&&YS(e,n)){const i=dS(e);return KC.call(t,i)&&(!e.selectionSet||QC(e.selectionSet,t[i],n))}return!0}))}function XC(e){return XE(e)&&!TC(e)&&!RS(e)}function ZC(e,t){const n=cS(uS(e));return{fragmentMap:n,lookupFragment(e){let i=n[e];return!i&&t&&(i=t.lookup(e)),i||null}}}const JC=["__META"],$C={},ek=()=>$C,tk={};class nk{constructor(e,t){i(this,"policies",void 0),i(this,"group",void 0),i(this,"data",{}),i(this,"rootIds",{}),i(this,"refs",{}),i(this,"getFieldValue",(e,t)=>TC(e)?this.get(e.__ref,t):e&&e[t]),i(this,"canRead",e=>TC(e)?this.has(e.__ref):"object"==typeof e),i(this,"toReference",(e,t)=>{if("string"==typeof e)return BC(e);if(TC(e))return e;const n=this.policies.identify(e),i=(0,x.A)(n,1)[0];if(i){const n=BC(i);
2return t&&this.merge(i,e),n}}),this.policies=e,this.group=t}toObject(){return a({},this.data)}has(e){return void 0!==this.lookup(e,!0)}get(e,t){if(this.group.depend(e,t),KC.call(this.data,e)){const n=this.data[e];if(n&&KC.call(n,t))return n[t]}return"__typename"===t&&KC.call(this.policies.rootTypenamesById,e)?this.policies.rootTypenamesById[e]:this instanceof ok?this.parent.get(e,t):void 0}lookup(e,t){return t&&this.group.depend(e,"__exists"),KC.call(this.data,e)?this.data[e]:this instanceof ok?this.parent.lookup(e,t):this.policies.rootTypenamesById[e]?{}:void 0}merge(e,t){let n;TC(e)&&(e=e.__ref),TC(t)&&(t=t.__ref);const i="string"==typeof e?this.lookup(n=e):e,r="string"==typeof t?this.lookup(n=t):t;if(!r)return;nE("string"==typeof n,99);const a=new zC({reconciler:lk}).merge(i,r);if(this.data[n]=a,a!==i&&(delete this.refs[n],this.group.caching)){const e={};i||(e.__exists=1),Object.keys(r).forEach(t=>{if(!i||i[t]!==a[t]){e[t]=1;const n=YC(t);n===t||this.policies.hasKeyArgs(a.__typename,n)||(e[n]=1),void 0!==a[t]||this instanceof ok||delete a[t]}}),!e.__typename||i&&i.__typename||this.policies.rootTypenamesById[n]!==a.__typename||delete e.__typename,Object.keys(e).forEach(e=>this.group.dirty(n,e))}}modify(e,t,n){const i=this.lookup(e);if(i){const r={};let o=!1,s=!0;const l={DELETE:$C,INVALIDATE:tk,isReference:TC,toReference:this.toReference,canRead:this.canRead,readField:(t,n)=>this.policies.readField("string"==typeof t?{fieldName:t,from:n||BC(e)}:t,{store:this})};
2if(Object.keys(i).forEach(c=>{const u=YC(c);let d=i[c];if(void 0===d)return;const h="function"==typeof t?t:t[c]||(n?void 0:t[u]);if(h){let t=h===ek?$C:h(d,a(a({},l),{},{fieldName:u,storeFieldName:c,storage:this.getStorage(e,c)}));t===tk?this.group.dirty(e,c):(t===$C&&(t=void 0),t!==d&&(r[c]=t,o=!0,d=t))}void 0!==d&&(s=!1)}),o)return this.merge(e,r),s&&(this instanceof ok?this.data[e]=void 0:delete this.data[e],this.group.dirty(e,"__exists")),!0}return!1}delete(e,t,n){const i=this.lookup(e);if(i){const r=this.getFieldValue(i,"__typename"),a=t&&n?this.policies.getStoreFieldName({typename:r,fieldName:t,args:n}):t;return this.modify(e,a?{[a]:ek}:ek,!!n)}return!1}evict(e,t){let n=!1;return e.id&&(KC.call(this.data,e.id)&&(n=this.delete(e.id,e.fieldName,e.args)),this instanceof ok&&this!==t&&(n=this.parent.evict(e,t)||n),(e.fieldName||n)&&this.group.dirty(e.id,e.fieldName||"__exists")),n}clear(){this.replace(null)}extract(){const e=this.toObject(),t=[];return this.getRootIdSet().forEach(e=>{KC.call(this.policies.rootTypenamesById,e)||t.push(e)}),t.length&&(e.__META={extraRootIds:t.sort()}),e}replace(e){if(Object.keys(this.data).forEach(t=>{e&&KC.call(e,t)||this.delete(t)}),e){const t=e.__META,n=E(e,JC);Object.keys(n).forEach(e=>{this.merge(e,n[e])}),t&&t.extraRootIds.forEach(this.retain,this)}}retain(e){return this.rootIds[e]=(this.rootIds[e]||0)+1}release(e){if(this.rootIds[e]>0){const t=--this.rootIds[e];return t||delete this.rootIds[e],t}return 0}getRootIdSet(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Set;return Object.keys(this.rootIds).forEach(e.add,e),this instanceof ok?this.parent.getRootIdSet(e):Object.keys(this.policies.rootTypenamesById).forEach(e.add,e),e}gc(){const e=this.getRootIdSet(),t=this.toObject();e.forEach(n=>{KC.call(t,n)&&(Object.keys(this.findChildRefIds(n)).forEach(e.add,e),delete t[n])});const n=Object.keys(t);if(n.length){let e=this;for(;e instanceof ok;)e=e.parent;n.forEach(t=>e.delete(t))}return n}findChildRefIds(e){if(!KC.call(this.refs,e)){const t=this.refs[e]={},n=this.data[e];if(!n)return t;const i=new Set([n]);i.forEach(e=>{TC(e)&&(t[e.__ref]=!0),XE(e)&&Object.keys(e).forEach(t=>{const n=e[t];XE(n)&&i.add(n)})})}return this.refs[e]}makeCacheKey(){return this.group.keyMaker.lookupArray(arguments)}get supportsResultCaching(){return this.group.caching}}class ik{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;i(this,"caching",void 0),i(this,"parent",void 0),i(this,"d",null),i(this,"keyMaker",void 0),this.caching=e,this.parent=t,this.resetCaching()}resetCaching(){this.d=this.caching?dw():null,this.keyMaker=new gE}depend(e,t){if(this.d){this.d(rk(e,t));const n=YC(t);n!==t&&this.d(rk(e,n)),this.parent&&this.parent.depend(e,t)}}dirty(e,t){this.d&&this.d.dirty(rk(e,t),"__exists"===t?"forget":"setDirty")}}function rk(e,t){return t+"#"+e}function ak(e,t){ck(e)&&e.group.depend(t,"__exists")}nk.Root=class extends nk{constructor(e){let t=e.policies,n=e.resultCaching,r=void 0===n||n,a=e.seed;super(t,new ik(r)),i(this,"stump",new sk(this)),i(this,"storageTrie",new gE),a&&this.replace(a)}addLayer(e,t){return this.stump.addLayer(e,t)}removeLayer(){return this}getStorage(){return this.storageTrie.lookupArray(arguments)}};class ok extends nk{constructor(e,t,n,r){super(t.policies,r),i(this,"id",void 0),i(this,"parent",void 0),i(this,"replay",void 0),i(this,"group",void 0),this.id=e,this.parent=t,this.replay=n,this.group=r,n(this)}addLayer(e,t){return new ok(e,this,t,this.group)}removeLayer(e){const t=this.parent.removeLayer(e);return e===this.id?(this.group.caching&&Object.keys(this.data).forEach(e=>{const n=this.data[e],i=t.lookup(e);i?n?n!==i&&Object.keys(n).forEach(t=>{ES(n[t],i[t])||this.group.dirty(e,t)}
2):(this.group.dirty(e,"__exists"),Object.keys(i).forEach(t=>{this.group.dirty(e,t)})):this.delete(e)}),t):t===this.parent?this:t.addLayer(this.id,this.replay)}toObject(){return a(a({},this.parent.toObject()),this.data)}findChildRefIds(e){const t=this.parent.findChildRefIds(e);return KC.call(this.data,e)?a(a({},t),super.findChildRefIds(e)):t}getStorage(){let e=this.parent;for(;e.parent;)e=e.parent;return e.getStorage(...arguments)}}class sk extends ok{constructor(e){super("EntityStore.Stump",e,()=>{},new ik(e.group.caching,e.group))}removeLayer(){return this}merge(e,t){return this.parent.merge(e,t)}}function lk(e,t,n){const i=e[n],r=t[n];return ES(i,r)?i:r}function ck(e){return!(!e||!e.supportsResultCaching)}function uk(e,t){if(e.arguments&&e.arguments.length){const n={};return e.arguments.forEach(e=>{let i=e.name,r=e.value;return US(n,i,r,t)}),n}return null}const dk=["connection","include","skip","client","rest","export","nonreactive","stream"];let hk=nS;const fk=Object.assign(function(e,t,n){if(t&&n&&n.connection&&n.connection.key){if(n.connection.filter&&n.connection.filter.length>0){const e=n.connection.filter?n.connection.filter:[];e.sort();const i={};e.forEach(e=>{i[e]=t[e]});const r=hk(i);if("{}"!==r)return"".concat(n.connection.key,"(").concat(r,")")}return n.connection.key}let i=e;if(t){const e=hk(t);"{}"!==e&&(i+="(".concat(e,")"))}return n&&Object.keys(n).forEach(e=>{-1===dk.indexOf(e)&&(n[e]&&Object.keys(n[e]).length?i+="@".concat(e,"(").concat(hk(n[e]),")"):i+="@".concat(e))}),i},{setStringify(e){const t=hk;return hk=e,t}}),pk={};function mk(e){const t=JSON.stringify(e);return pk[t]||(pk[t]={})}function gk(e){const t=mk(e);return t.keyFieldsFn||(t.keyFieldsFn=(t,n)=>{const i=(e,t)=>n.readField(t,e),r=n.keyObject=yk(e,e=>{let r=Ek(n.storeObject,e,i);return void 0===r&&t!==n.storeObject&&KC.call(t,e[0])&&(r=Ek(t,e,Ak)),nE(void 0!==r,102,e.join("."),t),r});return"".concat(n.typename,":").concat(JSON.stringify(r))})}function vk(e){const t=mk(e);return t.keyArgsFn||(t.keyArgsFn=(t,n)=>{let i=n.field,r=n.variables,a=n.fieldName;const o=yk(e,e=>{const n=e[0],a=n.charAt(0);if("@"!==a){if("$"===a){const t=n.slice(1);if(r&&KC.call(r,t)){const n=e.slice(0);return n[0]=t,Ek(r,n)}return}if(t)return Ek(t,e)}else if(i&&PS(i.directives)){const t=n.slice(1),a=i.directives.find(e=>e.name.value===t),o=a&&uk(a,r);return o&&Ek(o,e.slice(1))}}),s=JSON.stringify(o);return(t||"{}"!==s)&&(a+=":"+s),a})}function yk(e,t){const n=new zC;return bk(e).reduce((e,i)=>{let r=t(i);if(void 0!==r){for(let e=i.length-1;e>=0;--e)r={[i[e]]:r};e=n.merge(e,r)}return e},{})}function bk(e){const t=mk(e);if(!t.paths){const n=t.paths=[],i=[];e.forEach((t,r)=>{RS(t)?(bk(t).forEach(e=>n.push(i.concat(e))),i.length=0):(i.push(t),RS(e[r+1])||(n.push(i.slice(0)),i.length=0))})}return t.paths}function Ak(e,t){return e[t]}function Ek(e,t,n){return n=n||Ak,Tk(t.reduce(function e(t,i){return RS(t)?t.map(t=>e(t,i)):t&&n(t,i)},e))}function Tk(e){return XE(e)?RS(e)?e.map(Tk):yk(Object.keys(e).sort(),t=>Ek(e,t)):e}const wk=new HT,Sk=new WeakMap;function Ck(e){let t=Sk.get(e);return t||Sk.set(e,t={vars:new Set,dep:dw()}),t}function kk(e){Ck(e).vars.forEach(t=>t.forgetCache(e))}function xk(e){const t=new Set,n=new Set,i=function(a){if(arguments.length>0){if(e!==a){e=a,t.forEach(e=>{Ck(e).dep.dirty(i),function(e){e.broadcastWatches&&e.broadcastWatches()}(e)});const r=Array.from(n);n.clear(),r.forEach(t=>t(e))}}else{const e=wk.getValue();e&&(r(e),Ck(e).dep(i))}return e};i.onNextChange=e=>(n.add(e),()=>{n.delete(e)});const r=i.attachCache=e=>(t.add(e),Ck(e).vars.add(i),i);return i.forgetCache=e=>t.delete(e),i}const Nk=["queryType","mutationType","subscriptionType"],_k=["fields"];function Ik(e){return void 0!==e.args?e.args:e.field?uk(e.field,e.variables):null}const Ok=()=>{},Dk=(e,t)=>t.fieldName,Rk=(e,t,n)=>(0,n.mergeObjects)(e,t),Pk=(e,t)=>t,Lk=(e,t,n)=>{let i=n.streamFieldInfo,r=n.existingData;if(!e&&!r)return t;const a=[],o=null!=e?e:r,s=null!=i&&i.isLastChunk?t.length:Math.max(o.length,t.length);for(let e=0;e<s;e++)a[e]=void 0===t[e]?o[e]:t[e];return a};class Mk{constructor(e){i(this,"config",void 0),i(this,"typePolicies",{}),i(this,"toBeAdded",{}),i(this,"supertypeMap",new Map),i(this,"fuzzySubtypes",new Map),i(this,"cac
2he",void 0),i(this,"rootIdsByTypename",{}),i(this,"rootTypenamesById",{}),i(this,"usingPossibleTypes",!1),this.config=e,this.config=a({dataIdFromObject:WC},e),this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),e.possibleTypes&&this.addPossibleTypes(e.possibleTypes),e.typePolicies&&this.addTypePolicies(e.typePolicies)}identify(e,t){var n;const i=this,r=t&&(t.typename||(null===(n=t.storeObject)||void 0===n?void 0:n.__typename))||e.__typename;if(r===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];const o=t&&t.storeObject||e,s=a(a({},t),{},{typename:r,storeObject:o,readField:t&&t.readField||function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=Uk(t,o);return i.readField(r,{store:i.cache.data,variables:r.variables})}});let l;const c=r&&this.getTypePolicy(r);let u=c&&c.keyFn||this.config.dataIdFromObject;return hS.withValue(!0,()=>{for(;u;){const t=u(a(a({},e),o),s);if(!RS(t)){l=t;break}u=gk(t)}}),l=l?String(l):void 0,s.keyObject?[l,s.keyObject]:[l]}addTypePolicies(e){Object.keys(e).forEach(t=>{const n=e[t],i=n.queryType,r=n.mutationType,a=n.subscriptionType,o=E(n,Nk);i&&this.setRootTypename("Query",t),r&&this.setRootTypename("Mutation",t),a&&this.setRootTypename("Subscription",t),KC.call(this.toBeAdded,t)?this.toBeAdded[t].push(o):this.toBeAdded[t]=[o]})}updateTypePolicy(e,t,n){const i=this.getTypePolicy(e),r=t.keyFields,a=t.fields;function o(e,t){e.merge="function"==typeof t?t:!0===t?Rk:!1===t?Pk:e.merge}o(i,t.merge),i.keyFn=!1===r?Ok:RS(r)?gk(r):"function"==typeof r?r:i.keyFn,a&&Object.keys(a).forEach(t=>{var i;let r=n[t];r&&(null===(i=r)||void 0===i?void 0:i.typename)===e||(r=n[t]={typename:e});const s=a[t];if("function"==typeof s)r.read=s;else{const e=s.keyArgs,t=s.read,n=s.merge;r.keyFn=!1===e?Dk:RS(e)?vk(e):"function"==typeof e?e:r.keyFn,"function"==typeof t&&(r.read=t),o(r,n)}r.read&&r.merge&&(r.keyFn=r.keyFn||Dk)})}setRootTypename(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;const n="ROOT_"+e.toUpperCase(),i=this.rootTypenamesById[n];t!==i&&(nE(!i||i===e,103,e),i&&delete this.rootIdsByTypename[i],this.rootIdsByTypename[t]=n,this.rootTypenamesById[n]=t)}addPossibleTypes(e){this.usingPossibleTypes=!0,Object.keys(e).forEach(t=>{this.getSupertypeSet(t,!0),e[t].forEach(e=>{this.getSupertypeSet(e,!0).add(t);const n=e.match(qC);n&&n[0]===e||this.fuzzySubtypes.set(e,new RegExp(e))})})}getTypePolicy(e){if(!KC.call(this.typePolicies,e)){const t=this.typePolicies[e]={};t.fields={};let n=this.supertypeMap.get(e);!n&&this.fuzzySubtypes.size&&(n=this.getSupertypeSet(e,!0),this.fuzzySubtypes.forEach((t,i)=>{if(t.test(e)){const e=this.supertypeMap.get(i);e&&e.forEach(e=>n.add(e))}})),n&&n.size&&n.forEach(e=>{const n=this.getTypePolicy(e),i=n.fields,r=E(n,_k);Object.assign(t,r),Object.assign(t.fields,i)})}const t=this.toBeAdded[e];return t&&t.length&&t.splice(0).forEach(t=>{this.updateTypePolicy(e,t,this.typePolicies[e].fields)}),this.typePolicies[e]}getFieldPolicy(e,t){if(e)return this.getTypePolicy(e).fields[t]}getSupertypeSet(e,t){let n=this.supertypeMap.get(e);return!n&&t&&this.supertypeMap.set(e,n=new Set),n}fragmentMatches(e,t,n,i){if(!e.typeCondition)return!0;if(!t)return!1;const r=e.typeCondition.name.value;if(t===r)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(r)){const a=this.getSupertypeSet(t,!0),o=[a],s=e=>{const t=this.getSupertypeSet(e,!1);t&&t.size&&o.indexOf(t)<0&&o.push(t)};let l=!(!n||!this.fuzzySubtypes.size),c=!1;for(let u=0;u<o.length;++u){const d=o[u];if(d.has(r))return a.has(r)||a.add(r),!0;d.forEach(s),l&&u===o.length-1&&QC(e.selectionSet,n,i)&&(l=!1,c=!0,this.fuzzySubtypes.forEach((e,n)=>{const i=t.match(e);i&&i[0]===t&&s(n)}))}}return!1}hasKeyArgs(e,t){const n=this.getFieldPolicy(e,t);return!(!n||!n.keyFn)}getStoreFieldName(e){const t=e.typename,n=e.fieldName,i=this.getFieldPolicy(t,n);let r,a=i&&i.keyFn;if(a&&t){const i={typename:t,fieldName:n,field:e.field||null,variables:e.variables},o=Ik(e);for(;a;){const e=a(o,i);if(!RS(e)){r=e||n;break}a=vk(e)}}return void 0===r&&(r=e.field?function(e,t){let n=null;e.directives&&(n={}
2,e.directives.forEach(e=>{n[e.name.value]={},e.arguments&&e.arguments.forEach(i=>{let r=i.name,a=i.value;return US(n[e.name.value],r,a,t)})}));let i=null;return e.arguments&&e.arguments.length&&(i={},e.arguments.forEach(e=>{let n=e.name,r=e.value;return US(i,n,r,t)})),fk(e.name.value,i,n)}(e.field,e.variables):fk(n,Ik(e))),!1===r?n:n===YC(r)?r:n+":"+r}readField(e,t){const n=e.from;if(!n)return;if(!e.field&&!e.fieldName)return;if(void 0===e.typename){const i=t.store.getFieldValue(n,"__typename");i&&(e.typename=i)}const i=this.getStoreFieldName(e),r=YC(i),a=t.store.getFieldValue(n,i),o=this.getFieldPolicy(e.typename,r),s=o&&o.read;if(s){const r=Fk(this,n,e,t,t.store.getStorage(TC(n)?n.__ref:n,i));return wk.withValue(this.cache,s,[a,r])}return a}getReadFunction(e,t){const n=this.getFieldPolicy(e,t);return n&&n.read}getMergeFunction(e,t,n){let i=this.getFieldPolicy(e,t),r=i&&i.merge;return!r&&n&&(i=this.getTypePolicy(n),r=i&&i.merge),r}runMergeFunction(e,n,i,r,o){var s;let l=i.field,c=i.typename,u=i.merge,d=i.path;const h=e;if(u===Rk)return Bk(r.store)(e,n);if(u===Pk)return n;r.overwrite&&(e=void 0);const f=null===(s=r.extensions)||void 0===s||null===(s=s[VS])||void 0===s||null===(s=s.deref())||void 0===s?void 0:s.peekArray(d);if(f){const e=f.current,t=f.previous;if(t&&ES(t.incoming,n)&&ES(t.streamFieldInfo,e))return t.result}const p=u(e,n,function(e,n,i,r,o,s){const l=a(a({},Fk(e,void 0,i,r,o)),{},{extensions:r.extensions,existingData:s}),c=r.extensions;if(c&&VS in c){var u;const e=c[VS],n=E(c,[VS].map(t)),r=null==e||null===(u=e.deref())||void 0===u?void 0:u.peekArray(i.path);r&&(l.streamFieldInfo=r.current),l.extensions=0===Object.keys(n).length?void 0:n}return l}(this,0,{typename:c,fieldName:l.name.value,field:l,variables:r.variables,path:d},r,o||{},h));return f&&(f.previous={incoming:n,streamFieldInfo:f.current,result:p}),p}}function Fk(e,t,n,i,r){const a=e.getStoreFieldName(n),o=YC(a),s=n.variables||i.variables,l=i.store,c=l.toReference,u=l.canRead;return{args:Ik(n),field:n.field||null,fieldName:o,storeFieldName:a,variables:s,isReference:TC,toReference:c,storage:r,cache:e.cache,canRead:u,readField(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return e.readField(Uk(r,t,s),i)},mergeObjects:Bk(i.store)}}function Uk(e,t,n){const i=e[0],r=e[1],o=e.length;let s;return"string"==typeof i?s={fieldName:i,from:o>1?r:t}:(s=a({},i),KC.call(s,"from")||(s.from=t)),void 0===s.variables&&(s.variables=n),s}function Bk(e){return function(t,n){if(RS(t)||RS(n))throw rE(106);if(XE(t)&&XE(n)){const i=e.getFieldValue(t,"__typename"),r=e.getFieldValue(n,"__typename");if(i&&r&&i!==r)return n;if(TC(t)&&XC(n))return e.merge(t.__ref,n),t;if(XC(t)&&TC(n))return e.merge(t,n.__ref),n;if(XC(t)&&XC(n))return a(a({},t),n)}return n}}class jk extends Error{constructor(e,t,n,r){if(super(e),i(this,"message",void 0),i(this,"path",void 0),i(this,"query",void 0),i(this,"variables",void 0),i(this,"missing",void 0),this.message=e,this.path=t,this.query=n,this.variables=r,this.name="MissingFieldError",Array.isArray(this.path)){this.missing=this.message;for(let e=this.path.length-1;e>=0;--e)this.missing={[this.path[e]]:this.missing}}else this.missing=this.path;this.__proto__=jk.prototype}}function Vk(e){return[e.selectionSet,e.objectOrReference,e.context]}class Hk{constructor(e){i(this,"executeSelectionSet",void 0),i(this,"executeSubSelectedArray",void 0),i(this,"config",void 0),i(this,"knownResults",new WeakMap),this.config=e,this.executeSelectionSet=mw(e=>{const t=Vk(e);return this.executeSelectionSet.peek(...t)||(ak(e.context.store,e.enclosingRef.__ref),this.execSelectionSetImpl(e))},{max:uE["inMemoryCache.executeSelectionSet"]||5e4,keyArgs:Vk,makeCacheKey(e,t,n){if(ck(n.store))return n.store.makeCacheKey(e,TC(t)?t.__ref:t,n.varString)}}),this.executeSubSelectedArray=mw(e=>(ak(e.context.store,e.enclosingRef.__ref),this.execSubSelectedArrayImpl(e)),{max:uE["inMemoryCache.executeSubSelectedArray"]||1e4,makeCacheKey(e){let t=e.field,n=e.array,i=e.context;if(ck(i.store))return i.store.makeCacheKey(t,n,i.varString)}})}diffQueryAgainstStore(e){let t=e.store,n=e.query,i=e.rootId,r=void 0===i?"ROOT_QUERY":i,o=e.variables,s=e.returnPartialData,l=void 0===s||s;const c=this.config.cache.policies;o=a(a({},BS(function(e){const t=OE(e);return nE(t&&"query"===t.operation,13),t}(n))),o);const u=BC(r),d=this.executeSelectionSet({selectionSet:GS(n).selectionSet,objectOrReference:u,enclosingRef:u,context:a({store:t,query:n,policies:c,variables:o,varString:nS(o)},ZC(n,this.config.fragments))});let h;d.missing&&(h=new jk(function(e){try{JSON.stringify(e,(e,t)=>{if("string"==typeof t)throw t;return t})}catch(e){return e}}(d.missing),d.missing,n,o));const f=!h,p=d.result;return{result:f?p:l?0===Object.keys(p).length?null:p:null,complete:f,missing:h}}isFresh(e,t,n,i){if(ck(i.store)&&this.knownResults.get(e)===n){const r=this.executeSelectionSet.peek(n,t,i);if(r&&e===r.result)return!0}return!1}execSelectionSetImpl(e){let t=e.selectionSet,n=e.objectOrReference,i=e.enclosingRef,r=e.context;if(TC(n)&&!r.policies.rootTypenamesById[n.__ref]&&!r.store.has(n.__ref))return{result:{},missing:"Dangling reference to missing ".concat(n.__ref," object")};const a=r.variables,o=r.policies,s=r.store.getFieldValue(n,"__typename"),l=[];let c;const u=new zC;function d(e,t){return e.missing&&(c=u.merge(c,{[t]:e.missing})),e.result}"string"!=typeof s||o.rootIdsByTypename[s]||l.push({__typename:s});const h=new Set(t.selections);
2h.forEach(e=>{if(YS(e,a))if(qS(e)){let t=o.readField({fieldName:e.name.value,field:e,variables:r.variables,from:n},r);const a=dS(e);void 0===t?EC.added(e)||(c=u.merge(c,{[a]:"Can't find field '".concat(e.name.value,"' on ").concat(TC(n)?n.__ref+" object":"object "+JSON.stringify(n,null,2))})):RS(t)?t.length>0&&(t=d(this.executeSubSelectedArray({field:e,array:t,enclosingRef:i,context:r}),a)):e.selectionSet&&null!=t&&(t=d(this.executeSelectionSet({selectionSet:e.selectionSet,objectOrReference:t,enclosingRef:TC(t)?t:i,context:r}),a)),void 0!==t&&l.push({[a]:t})}else{const t=WS(e,r.lookupFragment);if(!t&&e.kind===HA.FRAGMENT_SPREAD)throw rE(107,e.name.value);t&&o.fragmentMatches(t,s)&&t.selectionSet.selections.forEach(h.add,h)}});const f={result:function(e){let t=e[0]||{};const n=e.length;if(n>1){const i=new zC;for(let r=1;r<n;++r)t=i.merge(t,e[r])}return t}(l),missing:c};return f.result&&this.knownResults.set(f.result,t),f}execSubSelectedArrayImpl(e){let t,n=e.field,i=e.array,r=e.enclosingRef,a=e.context,o=new zC;function s(e,n){return e.missing&&(t=o.merge(t,{[n]:e.missing})),e.result}return n.selectionSet&&(i=i.filter(e=>void 0===e||a.store.canRead(e))),i=i.map((e,t)=>null===e?null:RS(e)?s(this.executeSubSelectedArray({field:n,array:e,enclosingRef:r,context:a}),t):n.selectionSet?s(this.executeSelectionSet({selectionSet:n.selectionSet,objectOrReference:e,enclosingRef:TC(e)?e:r,context:a}),t):e),{result:i,missing:t}}}function zk(e,t,n){const i="".concat(t).concat(n);let r=e.flavors.get(i);return r||e.flavors.set(i,r=e.clientOnly===t&&e.deferred===n?e:a(a({},e),{},{clientOnly:t,deferred:n})),r}Object.prototype.toString;class Kk{constructor(e,t,n){i(this,"cache",void 0),i(this,"reader",void 0),i(this,"fragments",void 0),this.cache=e,this.reader=t,this.fragments=n}writeToStore(e,t){let n=t.query,i=t.result,r=t.dataId,o=t.variables,s=t.overwrite,l=t.extensions;const c=OE(n),u=new zC;o=a(a({},BS(c)),o);const d=a(a({store:e,written:{},merge:(e,t)=>u.merge(e,t),variables:o,varString:nS(o)},ZC(n,this.fragments)),{},{overwrite:!!s,incomingById:new Map,clientOnly:!1,deferred:!1,flavors:new Map,extensions:l}),h=this.processSelectionSet({result:i||{},dataId:r,selectionSet:c.selectionSet,mergeTree:{map:new Map},context:d,path:[]});if(!TC(h))throw rE(109,i);return d.incomingById.forEach((t,n)=>{let i=t.storeObject,r=t.mergeTree;t.fieldNodeSet;const a=BC(n);if(r&&r.map.size){const e=this.applyMerges(r,a,i,d);if(TC(e))return;i=e}e.merge(n,i)}),e.retain(h.__ref),h}processSelectionSet(e){let t=e.dataId,n=e.result,i=e.selectionSet,r=e.context,o=e.mergeTree,s=e.path;const l=this.cache.policies;let c={};const u=t&&l.rootTypenamesById[t]||Xk(n,i,r.fragmentMap)||t&&r.store.get(t,"__typename");"string"==typeof u&&(c.__typename=u);const d=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const i=Uk(t,c,r.variables);if(TC(i.from)){const e=r.incomingById.get(i.from.__ref);if(e){const t=l.readField(a(a({},i),{},{from:e.storeObject}),r);if(void 0!==t)return t}}return l.readField(i,r)},h=new Set;this.flattenFields(i,n,r,u).forEach((e,t)=>{const i=dS(t),r=n[i],a=[...s,t.name.value];if(h.add(t),void 0!==r){var f;const n=l.getStoreFieldName({typename:u,fieldName:t.name.value,field:t,variables:e.variables}),i=Gk(o,n);let s,h=this.processFieldValue(r,t,t.selectionSet?zk(e,!1,!1):e,i,a);t.selectionSet&&(TC(h)||XC(h))&&(s=d("__typename",h));const p=l.getMergeFunction(u,t.name.value,s);p?i.info={field:t,typename:u,merge:p,path:a}:RT(["stream"],t)&&Array.isArray(h)&&null!==(f=e.extensions)&&void 0!==f&&f[VS]?i.info={field:t,typename:u,merge:Lk,path:a}:Qk(o,n),c=e.merge(c,{[n]:h})}});try{const e=l.identify(n,{typename:u,selectionSet:i,fragmentMap:r.fragmentMap,storeObject:c,readField:d}),a=(0,x.A)(e,2),o=a[0],s=a[1];t=t||o,s&&(c=r.merge(c,s))}catch(e){if(!t)throw e}if("string"==typeof t){const e=BC(t),a=r.written[t]||(r.written[t]=[]);if(a.indexOf(i)>=0)return e;if(a.push(i),this.reader&&this.reader.isFresh(n,e,i,r))return e;const s=r.incomingById.get(t);return s?(s.storeObject=r.merge(s.storeObject,c),s.mergeTree=qk(s.mergeTree,o),h.forEach(e
2=>s.fieldNodeSet.add(e))):r.incomingById.set(t,{storeObject:c,mergeTree:Yk(o)?void 0:o,fieldNodeSet:h}),e}return c}processFieldValue(e,t,n,i,r){return t.selectionSet&&null!==e?RS(e)?e.map((e,a)=>{const o=this.processFieldValue(e,t,n,Gk(i,a),[...r,a]);return Qk(i,a),o}):this.processSelectionSet({result:e,selectionSet:t.selectionSet,context:n,mergeTree:i,path:r}):e}flattenFields(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Xk(t,e,n.fragmentMap);const r=new Map,a=this.cache.policies,o=new gE(!1);return function e(s,l){const c=o.lookup(s,l.clientOnly,l.deferred);c.visited||(c.visited=!0,s.selections.forEach(o=>{if(!YS(o,n.variables))return;let s=l.clientOnly,c=l.deferred;if(s&&c||!PS(o.directives)||o.directives.forEach(e=>{const t=e.name.value;if("client"===t&&(s=!0),"defer"===t){const t=uk(e,n.variables);t&&!1===t.if||(c=!0)}}),qS(o)){const e=r.get(o);e&&(s=s&&e.clientOnly,c=c&&e.deferred),r.set(o,zk(n,s,c))}else{const r=WS(o,n.lookupFragment);if(!r&&o.kind===HA.FRAGMENT_SPREAD)throw rE(111,o.name.value);r&&a.fragmentMatches(r,i,t,n.variables)&&e(r.selectionSet,zk(n,s,c))}}))}(e,n),r}applyMerges(e,t,n,i,r){if(e.map.size&&!TC(n)){const o=RS(n)||!TC(t)&&!XC(t)?void 0:t,s=n;let l;o&&!r&&(r=[TC(o)?o.__ref:o]);const c=(e,t)=>RS(e)?"number"==typeof t?e[t]:void 0:i.store.getFieldValue(e,String(t));e.map.forEach((e,t)=>{const n=c(o,t),a=c(s,t);if(void 0===a)return;r&&r.push(t);const u=this.applyMerges(e,n,a,i,r);u!==a&&(l=l||new Map,l.set(t,u)),r&&nE(r.pop()===t)}),l&&(n=RS(s)?s.slice(0):a({},s),l.forEach((e,t)=>{n[t]=e}))}return e.info?this.cache.policies.runMergeFunction(t,n,e.info,i,r&&i.store.getStorage(...r)):n}}const Wk=[];function Gk(e,t){let n=e.map;return n.has(t)||n.set(t,Wk.pop()||{map:new Map}),n.get(t)}function qk(e,t){if(e===t||!t||Yk(t))return e;if(!e||Yk(e))return t;const n=e.info&&t.info?a(a({},e.info),t.info):e.info||t.info,i=e.map.size&&t.map.size,r={info:n,map:i?new Map:e.map.size?e.map:t.map};if(i){const n=new Set(t.map.keys());e.map.forEach((e,i)=>{r.map.set(i,qk(e,t.map.get(i))),n.delete(i)}),n.forEach(n=>{r.map.set(n,qk(t.map.get(n),e.map.get(n)))})}return r}function Yk(e){return!e||!(e.info||e.map.size)}function Qk(e,t){let n=e.map;const i=n.get(t);i&&Yk(i)&&(Wk.push(i),n.delete(t))}function Xk(e,t,n){let i;for(const n of t.selections)if(qS(n)){if("__typename"===n.name.value)return e[dS(n)]}else i?i.push(n):i=[n];if("string"==typeof e.__typename)return e.__typename;if(i)for(const t of i){const i=Xk(e,WS(t,n).selectionSet,n);if("string"==typeof i)return i}}new Set;class Zk extends PC{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(),i(this,"data",void 0),i(this,"optimisticData",void 0),i(this,"config",void 0),i(this,"watches",new Set),i(this,"storeReader",void 0),i(this,"storeWriter",void 0),i(this,"addTypenameTransform",new vw(EC)),i(this,"maybeBroadcastWatch",void 0),i(this,"assumeImmutableResults",!0),i(this,"policies",void 0),i(this,"makeVar",xk),i(this,"txCount",0),this.config=function(e){return RE(GC,e)}(e),this.policies=new Mk({cache:this,dataIdFromObject:this.config.dataIdFromObject,possibleTypes:this.config.possibleTypes,typePolicies:this.config.typePolicies}),this.init()}init(){const e=this.data=new nk.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=e.stump,this.resetResultCache()}resetResultCache(){const e=this.config.fragments;this.addTypenameTransform.resetCache(),null==e||e.resetCaches(),this.storeWriter=new Kk(this,this.storeReader=new Hk({cache:this,fragments:e}),e),this.maybeBroadcastWatch=mw((e,t)=>this.broadcastWatch(e,t),{max:uE["inMemoryCache.maybeBroadcastWatch"]||5e3,makeCacheKey:e=>{const t=e.optimistic?this.optimisticData:this.data;if(ck(t)){const n=e.optimistic,i=e.id,r=e.variables;return t.makeCacheKey(e.query,e.callback,nS({optimistic:n,id:i,variables:r}))}}}),new Set([this.data.group,this.optimisticData.group]).forEach(e=>e.resetCaching())}restore(e){return this.init(),e&&this.data.replace(e),this}extract(){return(arguments.length>0&&void 0!==arguments[0]&&arguments[0]?this.optimisticData:this.data).extract()}read(e){const t=e.returnPartialData,n=void 0!==t&&t;return this.storeReader.diffQueryAgainstStore(a(a({},e),{},{store:e.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:n})).result}write(e){try{return++this.txCount,this.storeWriter.writeToStore(this.data,e)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}}modify(e){if(KC.call(e,"id")&&!e.id)return!1;const t=e.optimistic?this.optimisticData:this.data;try{return++this.txCount,t.modify(e.id||"ROOT_QUERY",e.fields,!1)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}}diff(e){return this.storeReader.diffQueryAgainstStore(a(a({},e),{},{store:e.optimistic?this.optimisticData:this.data,rootId:e.id||"ROOT_QUERY",config:this.config}))}watch(e){return this.watches.size||function(e){Ck(e).vars.forEac
2h(t=>t.attachCache(e))}(this),this.watches.add(e),e.immediate&&this.maybeBroadcastWatch(e),()=>{this.watches.delete(e)&&!this.watches.size&&kk(this),this.maybeBroadcastWatch.forget(e)}}gc(e){nS.reset(),ET.reset();const t=this.optimisticData.gc();return e&&!this.txCount&&e.resetResultCache&&this.resetResultCache(),t}retain(e,t){return(t?this.optimisticData:this.data).retain(e)}release(e,t){return(t?this.optimisticData:this.data).release(e)}identify(e){if(TC(e))return e.__ref;try{return this.policies.identify(e)[0]}catch(e){}}evict(e){if(!e.id){if(KC.call(e,"id"))return!1;e=a(a({},e),{},{id:"ROOT_QUERY"})}try{return++this.txCount,this.optimisticData.evict(e,this.data)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}}reset(e){return this.init(),nS.reset(),e&&e.discardWatches?(this.watches.forEach(e=>this.maybeBroadcastWatch.forget(e)),this.watches.clear(),kk(this)):this.broadcastWatches(),Promise.resolve()}removeOptimistic(e){const t=this.optimisticData.removeLayer(e);t!==this.optimisticData&&(this.optimisticData=t,this.broadcastWatches())}batch(e){const t=e.update,n=e.optimistic,i=void 0===n||n,r=e.removeOptimistic,o=e.onWatchUpdated;let s;const l=e=>{const n=this.data,i=this.optimisticData;++this.txCount,e&&(this.data=this.optimisticData=e);try{return s=t(this)}finally{--this.txCount,this.data=n,this.optimisticData=i}},c=new Set;return o&&!this.txCount&&this.broadcastWatches(a(a({},e),{},{onWatchUpdated:e=>(c.add(e),!1)})),"string"==typeof i?this.optimisticData=this.optimisticData.addLayer(i,l):!1===i?l(this.data):l(),"string"==typeof r&&(this.optimisticData=this.optimisticData.removeLayer(r)),o&&c.size?(this.broadcastWatches(a(a({},e),{},{onWatchUpdated(e,t){const n=o.call(this,e,t);return!1!==n&&c.delete(e),n}})),c.size&&c.forEach(e=>this.maybeBroadcastWatch.dirty(e))):this.broadcastWatches(e),s}performTransaction(e,t){return this.batch({update:e,optimistic:t||null!==t})}transformDocument(e){return this.addTypenameTransform.transformDocument(this.addFragmentsToDocument(e))}fragmentMatches(e,t){return this.policies.fragmentMatches(e,t)}lookupFragment(e){var t;return(null===(t=this.config.fragments)||void 0===t?void 0:t.lookup(e))||null}resolvesClientField(e,t){return!!this.policies.getReadFunction(e,t)}broadcastWatches(e){if(!this.txCount){const t=this.onAfterBroadcast,n=new Set;this.onAfterBroadcast=e=>{n.add(e)};try{this.watches.forEach(t=>this.maybeBroadcastWatch(t,e)),n.forEach(e=>e())}finally{this.onAfterBroadcast=t}}}addFragmentsToDocument(e){const t=this.config.fragments;return t?t.transform(e):e}broadcastWatch(e,t){const n=e.lastDiff,i=this.diff(e);t&&(e.optimistic&&"string"==typeof t.optimistic&&(i.fromOptimisticTransaction=!0),t.onWatchUpdated&&!1===t.onWatchUpdated.call(this,e,i,n))||n&&ES(n.result,i.result)||e.callback(e.lastDiff=i,n)}}class Jk extends DE{constructor(e){super((t,n)=>new _A(i=>{let r,a,o;try{r=n(t).subscribe({next:r=>{var s;const l=t.client.queryManager.incrementalHandler,c=l.isIncrementalResult(r)?l.extractErrors(r):r.errors;c?o=e({error:new sS(r,c),result:r,operation:t,forward:n}):GE(r)&&(o=e({error:r.extensions[WE],result:r,operation:t,forward:n})),a=null===(s=o)||void 0===s?void 0:s.subscribe(i),a||i.next(r)},error:r=>{var s;o=e({operation:t,error:qE(r),forward:n}),a=null===(s=o)||void 0===s?void 0:s.subscribe(i),a||i.error(r)},complete:()=>{o||i.complete()}})}catch(r){e({error:qE(r),operation:t,forward:n}),i.error(r)}return()=>{r&&r.unsubscribe(),a&&a.unsubscribe()}}))}}function $k(e,t){if(!Boolean(e))throw new Error(null!=t?t:"Unexpected invariant triggered.")}const ex=/\r\n|[\n\r]/g;function tx(e,t){let n=0,i=1;for(const r of e.body.matchAll(ex)){if("number"==typeof r.index||$k(!1),r.index>=t)break;n=r.index+r[0].length,i+=1}return{line:i,column:t+1-n}}function nx(e){return ix(e.source,tx(e.source,e.start))}function ix(e,t){const n=e.locationOffset.column-1,i="".padStart(n)+e.body,r=t.line-1,a=e.locationOffset.line-1,o=t.line+a,s=1===t.line?n:0,l=t.column+s,c="".concat(e.name,":").concat(o,":").concat(l,"\n"),u=i.split(/\r\n|[\n\r]/g),d=u[r];if(d.length>120){const e=Math.floor(l/80),t=l%80,n=[];for(let e=0;e<d.length;e+=80)n.push(d.slice(e,e+80));return c+rx([["".concat(o," |"),n[0]],...n.slice(1,e+1).map(e=>["|",e]),["|","^".padStart(t)],["|",n[e+1]]])}return c+rx([["".concat(o-1," |"),u[r-1]],["".concat(o," |"),d],["|","^".padStart(l)],["".concat(o+1," |"),u[r+1]]])}function rx(e){const t=e.filter(e=>{let t=(0,x.A)(e,2);return t[0],void 0!==t[1]}),n=Math.max(...t.map(e=>(0,x.A)(e,1)[0].length));return t.map(e=>{let t=(0,x.A)(e,2),i=t[0],r=t[1];return i.padStart(n)+(r?" "+r:"")}).join("\n")}
2class ax extends Error{constructor(e){for(var t,n,i,r=arguments.length,a=new Array(r>1?r-1:0),o=1;o<r;o++)a[o-1]=arguments[o];const s=function(e){const t=e[0];return null==t||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}(a),l=s.nodes,c=s.source,u=s.positions,d=s.path,h=s.originalError,f=s.extensions;super(e),this.name="GraphQLError",this.path=null!=d?d:void 0,this.originalError=null!=h?h:void 0,this.nodes=ox(Array.isArray(l)?l:l?[l]:void 0);const p=ox(null===(t=this.nodes)||void 0===t?void 0:t.map(e=>e.loc).filter(e=>null!=e));this.source=null!=c?c:null==p||null===(n=p[0])||void 0===n?void 0:n.source,this.positions=null!=u?u:null==p?void 0:p.map(e=>e.start),this.locations=u&&c?u.map(e=>tx(c,e)):null==p?void 0:p.map(e=>tx(e.source,e.start));const m="object"==typeof(g=null==h?void 0:h.extensions)&&null!==g?null==h?void 0:h.extensions:void 0;var g;this.extensions=null!==(i=null!=f?f:m)&&void 0!==i?i:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),null!=h&&h.stack?Object.defineProperty(this,"stack",{value:h.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,ax):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(const t of this.nodes)t.loc&&(e+="\n\n"+nx(t.loc));else if(this.source&&this.locations)for(const t of this.locations)e+="\n\n"+ix(this.source,t);return e}toJSON(){const e={message:this.message};return null!=this.locations&&(e.locations=this.locations),null!=this.path&&(e.path=this.path),null!=this.extensions&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}}function ox(e){return void 0===e||0===e.length?void 0:e}function sx(e,t,n){return new ax("Syntax Error: ".concat(n),{source:e,positions:[t]})}var lx;!function(e){e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.DOT=".",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"}(lx||(lx={}));class cx{constructor(e){const t=new FA(lx.SOF,0,0,0,0);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let e=this.token;if(e.kind!==lx.EOF)do{if(e.next)e=e.next;else{const t=vx(this,e.end);e.next=t,t.prev=e,e=t}}while(e.kind===lx.COMMENT);return e}}function ux(e){return e===lx.BANG||e===lx.DOLLAR||e===lx.AMP||e===lx.PAREN_L||e===lx.PAREN_R||e===lx.DOT||e===lx.SPREAD||e===lx.COLON||e===lx.EQUALS||e===lx.AT||e===lx.BRACKET_L||e===lx.BRACKET_R||e===lx.BRACE_L||e===lx.PIPE||e===lx.BRACE_R}function dx(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function hx(e,t){return fx(e.charCodeAt(t))&&px(e.charCodeAt(t+1))}function fx(e){return e>=55296&&e<=56319}function px(e){return e>=56320&&e<=57343}function mx(e,t){const n=e.source.body.codePointAt(t);if(void 0===n)return lx.EOF;if(n>=32&&n<=126){const e=String.fromCodePoint(n);return'"'===e?"'\"'":'"'.concat(e,'"')}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function gx(e,t,n,i,r){const a=e.line,o=1+n-e.lineStart;return new FA(t,n,i,a,o,r)}function vx(e,t){const n=e.source.body,i=n.length;let r=t;for(;r<i;){const t=n.charCodeAt(r);switch(t){case 65279:case 9:case 32:case 44:++r;continue;case 10:++r,++e.line,e.lineStart=r;continue;case 13:10===n.charCodeAt(r+1)?r+=2:++r,++e.line,e.lineStart=r;continue;case 35:return yx(e,r);case 33:return gx(e,lx.BANG,r,r+1);case 36:return gx(e,lx.DOLLAR,r,r+1);case 38:return gx(e,lx.AMP,r,r+1);case 40:return gx(e,lx.PAREN_L,r,r+1);case 41:return gx(e,lx.PAREN_R,r,r+1);case 46:if(46===n.charCodeAt(r+1)&&46===n.charCodeAt(r+2))return gx(e,lx.SPREAD,r,r+3);break;case 58:return gx(e,lx.COLON,r,r+1);case 61:return gx(e,lx.EQUALS,r,r+1);case 64:return gx(e,lx.AT,r,r+1);case 91:return gx(e,lx.BRACKET_L,r,r+1);case 93:return gx(e,lx.BRACKET_R,r,r+1);case 123:return gx(e,lx.BRACE_L,r,r+1);case 124:return gx(e,lx.PIPE,r,r+1);case 125:return gx(e,lx.BRACE_R,r,r+1);case 34:return 34===n.charCodeAt(r+1)&&34===n.charCodeAt(r+2)?xx(e,r):Ex(e,r)}if(rT(t)||45===t)return bx(e,r,t);if(oT(t))return Nx(e,r);throw sx(e.source,r,39===t?"Unexpected single quote character ('), did you mean to use a double quote (\")?":dx(t)||hx(n,r)?"Unexpected character: ".concat(mx(e,r),"."):"Invalid character: ".concat(mx(e,r),"."))}return gx(e,lx.EOF,i,i)}function yx(e,t){const n=e.source.body,i=n.length;let r=t+1;for(;r<i;){const e=n.charCodeAt(r);if(10===e||13===e)break;if(dx(e))++r;else{if(!hx(n,r))break;r+=2}}return gx(e,lx.COMMENT,t,r,n.slice(t+1,r))}function bx(e,t,n){const i=e.source.body;let r=t,a=n,o=!1;if(45===a&&(a=i.charCodeAt(++r)),48===a){if(a=i.charCodeAt(++r),rT(a))throw sx(e.source,r,"Invalid number, unexpected digit after 0: ".concat(mx(e,r),"."))}else r=Ax(e,r,a),a=i.charCodeAt(r);if(46===a&&(o=!0,a=i.charCodeAt(++r),r=Ax(e,r,a),a=i.charCodeAt(r)),69!==a&&101!==a||(o=!0,a=i.charCodeAt(++r),43!==a&&45!==a||(a=i.charCodeAt(++r)),r=Ax(e,r,a),a=i.charCodeAt(r)),46===a||oT(a))throw sx(e.source,r,"Invalid number, expected digit but got: ".concat(mx(e,r),"."));return gx(e,o?lx.FLOAT:lx.INT,t,r,i.slice(t,r))}function Ax(e,t,n){if(!rT(n))throw sx(e.source,t,"Invalid number, expected digit but got: ".concat(mx(e,t),"."));const i=e.source.body;let r=t+1;for(;rT(i.charCodeAt(r));)++r;return r}function Ex(e,t){const n=e.source.body,i=n.length;let r=t+1,a=r,o="";for(;r<i;){const i=n.charCodeAt(r);if(34===i)return o+=n.slice(a,r),gx(e,lx.STRING,t,r+1,o);if(92===i){o+=n.slice(a,r);const t=117===n.charCodeAt(r+1)?123===n.charCodeAt(r+2)?Tx(e,r):wx(e,r):kx(e,r);o+=t.value,r+=t.size,a=r;continue}if(10===i||13===i)break;if(dx(i))++r;else{if(!hx(n,r))throw sx(e.source,r,"Invalid character within String: ".concat(mx(e,r),"."));r+=2}}throw sx(e.source,r,"Unterminated string.")}function Tx(e,t){const n=e.source.body;let i=0,r=3;for(;r<12;){const e=n.charCodeAt(t+r++);if(125===e){if(r<5||!dx(i))break;return{value:String.fromCodePoint(i),size:r}}if(i=i<<4|Cx(e),i<0)break}throw sx(e.source,t,'Invalid Unicode escape sequence: "'.concat(n.slice(t,t+r),'".'))}function wx(e,t){const n=e.source.body,i=Sx(n,t+2);if(dx(i))return{value:String.fromCodePoint(i),size:6};if(fx(i)&&92===n.charCodeAt(t+6)&&117===n.charCodeAt(t+7)){const e=Sx(n,t+8);if(px(e))return{value:String.fromCodePoint(i,e),size:12}}throw sx(e.source,t,'Invalid Unicode escape sequence: "'.concat(n.slice(t,t+6),'".'))}function Sx(e,t){return Cx(e.charCodeAt(t))<<12|Cx(e.charCodeAt(t+1))<<8|Cx(e.charCodeAt(t+2))<<4|Cx(e.charCodeAt(t+3))}function Cx(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function kx(e,t){const n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:"\n",size:2};case 114:return{value:"\r",size:2};case 116:return{value:"\t",size:2}}throw sx(e.source,t,'Invalid character escape sequence: "'.concat(n.slice(t,t+2),'".'))}function xx(e,t){const n=e.source.body,i=n.length;let r=e.lineStart,a=t+3,o=a,s="";const l=[];for(;a<i;){const i=n.charCodeAt(a);if(34===i&&34===n.charCodeAt(a+1)&&34===n.charCodeAt(a+2)){s+=n.slice(o,a),l.push(s);const i=gx(e,lx.BLOCK_STRING,t,a+3,lT(l).join("\n"));return e.line+=l.length-1,e.lineStart=r,i}if(92!==i||34!==n.charCodeAt(a+1)||34!==n.charCodeAt(a+2)||34!==n.charCodeAt(a+3))if(10!==i&&13!==i)if(dx(i))++a;else{if(!hx(n,a))throw sx(e.source,a,"Invalid character within String: ".concat(mx(e,a),"."));a+=2}else s+=n.slice(o,a),l.push(s),13===i&&10===n.charCodeAt(a+1)?a+=2:++a,s="",o=a,r=a;else s+=n.slice(o,a),o=a+1,a+=4}throw sx(e.source,a,"Unterminated string.")}function Nx(e,t){const n=e.source.body,i=n.length;let r=t+1;for(;r<i&&sT(n.charCodeAt(r));)++r;return gx(e,lx.NAME,t,r,n.slice(t,r))}const _x=globalThis.process?function(e,t){return e instanceof t}:function(e,t){if(e instanceof t)return!0;
2if("object"==typeof e&&null!==e){var n;const i=t.prototype[Symbol.toStringTag];if(i===(Symbol.toStringTag in e?e[Symbol.toStringTag]:null===(n=e.constructor)||void 0===n?void 0:n.name)){const t=PA(e);throw new Error("Cannot use ".concat(i,' "').concat(t,'" from another module or realm.\n\nEnsure that there is only one instance of "graphql" in the node_modules\ndirectory. If different versions of "graphql" are the dependencies of other\nrelied on modules, use "resolutions" to ensure only one version is installed.\n\nhttps://yarnpkg.com/en/docs/selective-version-resolutions\n\nDuplicate "graphql" modules cannot be used at the same time since different\nversions may have different capabilities and behavior. The data from one\nversion used in the function from another could produce confusing and\nspurious results.'))}}return!1};class Ix{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GraphQL request",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{line:1,column:1};"string"==typeof e||RA(!1,"Body must be a string. Received: ".concat(PA(e),".")),this.body=e,this.name=t,this.locationOffset=n,this.locationOffset.line>0||RA(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||RA(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function Ox(e){return _x(e,Ix)}var Dx,Rx;const Px="undefined"!=typeof window&&(null===(Dx=window.CBS)||void 0===Dx||null===(Rx=Dx.Registry)||void 0===Rx?void 0:Rx.heliosHost)||"https://helios-qa.cbssports.cloud";class Lx{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.client=void 0,this.options=void 0,this.options=e}init(){const e=this.buildApolloClient().getClient;this.client=e()}static getInstance(){const e=new Lx(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{});return e.init(),e}getLinks(){var e;const t={};!1!==this.options.includeDefaultHeaders&&({NODE_ENV:"production",PUBLIC_URL:"/assets/web-components",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.HELIOS_TOKEN&&(t.Authorization="Bearer ".concat({NODE_ENV:"production",PUBLIC_URL:"/assets/web-components",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.HELIOS_TOKEN)),t["helios-client-name"]=this.options.heliosClientName||"",t["helios-client-version"]={NODE_ENV:"production",PUBLIC_URL:"/assets/web-components",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.npm_package_version||"");const n=a(a({},t),this.options.headers),i=new NT({headers:n,print:(e,t)=>function(e){const t=Ox(e)?e:new Ix(e),n=t.body,i=new cx(t);let r="",a=!1;for(;i.advance().kind!==lx.EOF;){const e=i.token,t=e.kind,o=!ux(e.kind);a&&(o||e.kind===lx.SPREAD)&&(r+=" ");const s=n.slice(e.start,e.end);t===lx.BLOCK_STRING?r+=uT(e.value,{minimize:!0}):r+=s,a=o}return r}(t(e)),uri:this.options.uri||Px,useGETForQueries:null===(e=this.options.useGETForQueries)||void 0===e||e}),r=new Jk(e=>{const t=e;t.graphQLErrors&&t.graphQLErrors.forEach(e=>{let t=e.message;t&&(t=t.replace(/password: ".*?",/,'password:"***",')),console.error("[GraphQL error]: Message: ".concat(t,", Location: ").concat(e.locations,", Path: ").concat(e.path,", Extensions"),e.extensions)}),t.networkError&&console.error("[Network error]: ".concat(t.networkError))}),o=[r];return this.options.additionalLinks&&this.options.additionalLinks.length>0&&o.push(...this.options.additionalLinks),o.push(i),o}buildApolloClient(){return{getClient:()=>{const e=this.getLinks();return new bC({queryDeduplication:!1,cache:new Zk,link:DE.from(e),defaultOptions:{watchQuery:{fetchPolicy:"no-cache"},query:{fetchPolicy:"no-cache"},mutate:{fetchPolicy:"no-cache"}}})}}}}function Mx(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Fx;!function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION",e.DIRECTIVE_DEFINITION="DIRECTIVE_DEFINITION"}(Fx||(Fx={}));const Ux=["lexer"];class Bx{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=t.lexer,i=E(t,Ux);if(n)this._lexer=n;else{const t=Ox(e)?e:new Ix(e);this._lexer=new cx(t)}this._options=i,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){const e=this.expectToken(lx.NAME);return this.node(e,{kind:HA.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:HA.DOCUMENT,definitions:this.many(lx.SOF,this.parseDefinition,lx.EOF)})}parseDefinition(){if(this.peek(lx.BRACE_L))return this.parseOperationDefinition();const e=this.peekDescription(),t=e?this._lexer.lookahead():this._lexer.token;if(e&&t.kind===lx.BRACE_L)throw sx(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are not supported on shorthand queries.");if(t.kind===lx.NAME){switch(t.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}switch(t.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition()}if(e)throw sx(this._lexer.source,this._lexer.token.start,"Unexpected description, only GraphQL definitions supp
2ort descriptions.");if("extend"===t.value)return this.parseTypeSystemExtension()}throw this.unexpected(t)}parseOperationDefinition(){const e=this._lexer.token;if(this.peek(lx.BRACE_L))return this.node(e,{kind:HA.OPERATION_DEFINITION,operation:VA.QUERY,description:void 0,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const t=this.parseDescription(),n=this.parseOperationType();let i;return this.peek(lx.NAME)&&(i=this.parseName()),this.node(e,{kind:HA.OPERATION_DEFINITION,operation:n,description:t,name:i,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const e=this.expectToken(lx.NAME);switch(e.value){case"query":return VA.QUERY;case"mutation":return VA.MUTATION;case"subscription":return VA.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(lx.PAREN_L,this.parseVariableDefinition,lx.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:HA.VARIABLE_DEFINITION,description:this.parseDescription(),variable:this.parseVariable(),type:(this.expectToken(lx.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(lx.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const e=this._lexer.token;return this.expectToken(lx.DOLLAR),this.node(e,{kind:HA.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:HA.SELECTION_SET,selections:this.many(lx.BRACE_L,this.parseSelection,lx.BRACE_R)})}parseSelection(){return this.peek(lx.SPREAD)?this.parseFragment():this.parseField()}parseField(){const e=this._lexer.token,t=this.parseName();let n,i;return this.expectOptionalToken(lx.COLON)?(n=t,i=this.parseName()):i=t,this.node(e,{kind:HA.FIELD,alias:n,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(lx.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){const t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(lx.PAREN_L,t,lx.PAREN_R)}parseArgument(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this._lexer.token,n=this.parseName();return this.expectToken(lx.COLON),this.node(t,{kind:HA.ARGUMENT,name:n,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const e=this._lexer.token;this.expectToken(lx.SPREAD);const t=this.expectOptionalKeyword("on");return!t&&this.peek(lx.NAME)?this.node(e,{kind:HA.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:HA.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const e=this._lexer.token,t=this.parseDescription();return this.expectKeyword("fragment"),!0===this._options.allowLegacyFragmentVariables?this.node(e,{kind:HA.FRAGMENT_DEFINITION,description:t,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(e,{kind:HA.FRAGMENT_DEFINITION,description:t,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()}parseValueLiteral(e){const t=this._lexer.token;switch(t.kind){case lx.BRACKET_L:return this.parseList(e);case lx.BRACE_L:return this.parseObject(e);case lx.INT:return this.advanceLexer(),this.node(t,{kind:HA.INT,value:t.value});case lx.FLOAT:return this.advanceLexer(),this.node(t,{kind:HA.FLOAT,value:t.value});case lx.STRING:case lx.BLOCK_STRING:return this.parseStringLiteral();case lx.NAME:switch(this.advanceLexer(),t.value){case"true":return this.node(t,{kind:HA.BOOLEAN,value:!0});case"false":return this.node(t,{kind:HA.BOOLEAN,value:!1});case"null":return this.node(t,{kind:HA.NULL});default:return this.node(t,{kind:HA.ENUM,value:t.value})}case lx.DOLLAR:if(e){if(this.expectToken(lx.DOLLAR),this._lexer.token.kind===lx.NAME){const e=this._lexer.token.value;throw sx(this._lexer.source,t.start,'Unexpected variable "$'.concat(e,'" in constant value.'))}throw this.unexpected(t)}return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const e=this._lexer.token;return this.advanceLexer(),this.node(e,{kind:HA.STRING,value:e.value,block:e.kind===lx.BLOCK_STRING})}parseList(e){return this.node(this._lexer.token,{kind:HA.LIST,values:this.any(lx.BRACKET_L,()=>this.parseValueLiteral(e),lx.BRACKET_R)})}parseObject(e){return this.node(this._lexer.token,{kind:HA.OBJECT,fields:this.any(lx.BRACE_L,()=>this.parseObjectField(e),lx.BRACE_R)})}parseObjectField(e){const t=this._lexer.token,n=this.parseName();return this.expectToken(lx.COLON),this.node(t,{kind:HA.OBJECT_FIELD,name:n,value:this.parseValueLiteral(e)})}parseDirectives(e){const t=[];for(;this.peek(lx.AT);)t.push(this.parseDirective(e));return t}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){const t=this._lexer.token;return this.expectToken(lx.AT),this.node(t,{kind:HA.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){const e=this._lexer.token;let t;if(this.expectOptionalToken(lx.BRACKET_L)){const n=this.parseTypeReference();this.expectToken(lx.BRACKET_R),t=this.node(e,{kind:HA.LIST_TYPE,type:n})}else t=this.parseNamedType();return this.expectOptionalToken(lx.BANG)?this.node(e,{kind:HA.NON_NULL_TYPE,type:t}):t}parseNamedType(){return this.node(this._lexer.token,{kind:HA.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(lx.STRING)||this.peek(lx.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");const n=this.parseConstDirectives(),i=this.many(lx.BRACE_L,this.parseOperationTypeDefinition,lx.BRACE_R);return this.node(e,{kind:HA.SCHEMA_DEFINITION,description:t,directives:n,operationTypes:i})}parseOperationTypeDefinition(){const e=this._lexer.token,t=this.parseOperationType();this.expectToken(lx.COLON);const n=this.parseNamedType();return this.node(e,{kind:HA.OPERATION_TYPE_DEFINITION,operation:t,type:n})}parseScalarTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");const n=this.parseName(),i=this.parseConstDirectives();return this.node(e,{kind:HA.SCALAR_TYPE_DEFINITION,description:t,name:n,directives:i})}parseObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");const n=this.parseName(),i=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(e,{kind:HA.OBJECT_TYPE_DEFINITION,description:t,name:n,interfaces:i,directives:r,fields:a})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(lx.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(lx.BRACE_L,this.parseFieldDefinition,lx.BRACE_R)}parseFieldDefinition(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),i=this.parseArgumentDefs();this.expectToken(lx.COLON);const r=this.parseTypeReference(),a=this.parseConstDirectives();return this.node(e,{kind:HA.FIELD_DEFINITION,description:t,name:n,arguments:i,type:r,directives:a})}parseArgumentDefs(){return this.optionalMany(lx.PAREN_L,this.parseInputValueDef,lx.PAREN_R)}parseInputValueDef(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseName();this.expectToken(lx.COLON);const i=this.parseTypeReference();let r;this.expectOptionalToken(lx.EQUALS)&&(r=this.parseConstValueLiteral());const a=this.parseConstDirectives();return this.node(e,{kind:HA.INPUT_VALUE_DEFINITION,description:t,name:n,type:i,defaultValue:r,directives:a})}parseInterfaceTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");const n=this.parseName(),i=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(e,{kind:HA.INTERFACE_TYPE_DEFINITION,description:t,name:n,interfaces:i,directives:r,fields:a})}parseUnionTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");const n=this.parseName(),i=this.parseConstDirectives(),r=this.parseUnionMemberTypes();return this.node(e,{kind:HA.UNION_TYPE_DEFINITION,description:t,name:n,directives:i,types:r})}parseUnionMemberTypes(){return this.expectOptionalToken(lx.EQUALS)?this.delimitedMany(lx.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");const n=this.parseName(),i=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();return this.node(e,{kind:HA.ENUM_TYPE_DEFINITION,description:t,name:n,directives:i,values:r})}parseEnumValuesDefinition(){return this.optionalMany(lx.BRACE_L,this.parseEnumValueDefinition,lx.BRACE_R)}parseEnumValueDefinition(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(e,{kind:HA.ENUM_VALUE_DEFINITION,description:t,name:n,directives:i})}parseEnumValueName(){if("true"===this._lexer.token.value||"false"===this._lexer.token.value||"null"===this._lexer.token.value)throw sx(this._lexer.source,this._lexer.token.start,"".concat(jx(this._lexer.token)," is reserved and cannot be used for an enum value."));return this.parseName()}parseInputObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");const n=this.parseName(),i=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();return this.node(e,{kind:HA.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:n,directives:i,fields:r})}parseInputFieldsDefinition(){return this.optionalMany(lx.BRACE_L,this.parseInputValueDef,lx.BRACE_R)}parseTypeSystemExtension(){const e=this._lexer.lookahead();if(e.kind===lx.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension();case"directive":if(this._options.experimentalDirectivesOnDirectiveDefinitions)return this.parseDirectiveDefinitionExtension()}throw this.unexpected(e)}parseSchemaExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const t=this.parseConstDirectives(),n=this.optionalMany(lx.BRACE_L,this.parseOperationTypeDefinition,lx.BRACE_R);if(0===t.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:HA.SCHEMA_EXTENSION,directives:t,operationTypes:n})}parseScalarTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const t=this.parseName(),n=this.parseConstDirectives();if(0===n.length)throw this.unexpected();return this.node(e,{kind:HA.SCALAR_TYPE_EXTENSION,name:t,directives:n})}parseObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const t=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),r=this.parseFieldsDefinition();if(0===n.length&&0===i.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:HA.OBJECT_TYPE_EXTENSION,name:t,interfaces:n,directives:i,fields:r})}parseInterfaceTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const t=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),r=this.parseFieldsDefinition();if(0===n.length&&0===i.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:HA.INTERFACE_TYPE_EXTENSION,name:t,interfaces:n,directives:i,fields:r})}parseUnionTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const t=this.parseName(),n=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(0===n.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:HA.UNION_TYPE_EXTENSION,name:t,directives:n,types:i})}parseEnumTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const t=this.parseName(),n=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(0===n.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:HA.ENUM_TYPE_EXTENSION,name:t,directives:n,values:i})}parseInputObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const t=this.parseName(),n=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(0===n.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:HA.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:n,fields:i})}parseDirectiveDefinitionExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("directive"),this.expectToken(lx.AT);const t=this.parseName(),n=this.parseConstDirectives();if(0===n.length)throw this.unexpected();return this.node(e,{kind:HA.DIRECTIVE_EXTENSION,name:t,directives:n})}parseDirectiveDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(lx.AT);const n=this.parseName(),i=this.parseArgumentDefs(),r=this._options.experimentalDirectivesOnDirectiveDefinitions?this.parseConstDirectives():[],a=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const o=this.parseDirectiveLocations();return this.node(e,{kind:HA.DIRECTIVE_DEFINITION,description:t,name:n,arguments:i,directives:r,repeatable:a,locations:o})}parseDirectiveLocations(){return this.delimitedMany(lx.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const e=this._lexer.token,t=this.parseName();if(Object.prototype.hasOwnProperty.call(Fx,t.value))return t;throw this.unexpected(e)}parseSchemaCoordinate(){const e=this._lexer.token,t=this.expectOptionalToken(lx.AT),n=this.parseName();let i,r;return!t&&this.expectOptionalToken(lx.DOT)&&(i=this.parseName()),(t||i)&&this.expectOptionalToken(lx.PAREN_L)&&(r=this.parseName(),this.expectToken(lx.COLON),this.expectToken(lx.PAREN_R)),t?r?this.node(e,{kind:HA.DIRECTIVE_ARGUMENT_COORDINATE,name:n,argumentName:r}):this.node(e,{kind:HA.DIRECTIVE_COORDINATE,name:n}):i?r?this.node(e,{kind:HA.ARGUMENT_COORDINATE,name:n,fieldName:i,argumentName:r}):this.node(e,{kind:HA.MEMBER_COORDINATE,name:n,memberName:i}):this.node(e,{kind:HA.TYPE_COORDINATE,name:n})}node(e,t){return!0!==this._options.noLocation&&(t.loc=new MA(e,this._lexer.lastToken,this._lexer.source)),t}peek(e){return this._lexer.token.kind===e}expectToken(e){const t=this._lexer.token;if(t.kind===e)return this.advanceLexer(),t;throw sx(this._lexer.source,t.start,"Expected ".concat(Vx(e),", found ").concat(jx(t),"."))}expectOptionalToken(e){return this._lexer.token.kind===e&&(this.advanceLexer(),!0)}expectKeyword(e){const t=this._lexer.token;if(t.kind!==lx.NAME||t.value!==e)throw sx(this._lexer.source,t.start,'Expected "'.concat(e,'", found ').concat(jx(t),"."));this.advanceLexer()}expectOptionalKeyword(e){const t=this._lexer.token;return t.kind===lx.NAME&&t.value===e&&(this.advanceLexer(),!0)}unexpected(e){const t=null!=e?e:this._lexer.token;return sx(this._lexer.source,t.start,"Unexpected ".concat(jx(t),"."))}any(e,t,n){this.expectToken(e);const i=[];for(;!this.expectOptionalToken(n);)i.push(t.call(this));return i}optionalMany(e,t,n){if(this.expectOptionalToken(e)){const e=[];do{e.push(t.call(this))}while(!this.expectOptionalToken(n));return e}return[]}many(e,t,n){this.expectToken(e);const i=[];do{i.push(t.call(this))}while(!this.expectOptionalToken(n));return i}delimitedMany(e,t){this.expectOptionalToken(e);const n=[];do{n.push(t.call(this))}while(this.expectOptionalToken(e));return n}advanceLexer(){const e=this._options.maxTokens,t=this._lexer.advance();if(t.kind!==lx.EOF&&(++this._tokenCounter,void 0!=
2=e&&this._tokenCounter>e))throw sx(this._lexer.source,t.start,"Document contains more that ".concat(e," tokens. Parsing aborted."))}}function jx(e){const t=e.value;return Vx(e.kind)+(null!=t?' "'.concat(t,'"'):"")}function Vx(e){return ux(e)?'"'.concat(e,'"'):e}var Hx=new Map,zx=new Map,Kx=!0,Wx=!1;function Gx(e){return e.replace(/[\s,]+/g," ").trim()}function qx(e){var t=Gx(e);if(!Hx.has(t)){var n=function(e,t){const n=new Bx(e,t),i=n.parseDocument();return Object.defineProperty(i,"tokenCount",{enumerable:!1,value:n.tokenCount}),i}(e,{experimentalFragmentVariables:Wx,allowLegacyFragmentVariables:Wx});if(!n||"Document"!==n.kind)throw new Error("Not a valid GraphQL document.");Hx.set(t,function(e){var t=new Set(e.definitions);t.forEach(function(e){e.loc&&delete e.loc,Object.keys(e).forEach(function(n){var i=e[n];i&&"object"==typeof i&&t.add(i)})});var n=e.loc;return n&&(delete n.startToken,delete n.endToken),e}(function(e){var t=new Set,n=[];return e.definitions.forEach(function(e){if("FragmentDefinition"===e.kind){var i=e.name.value,r=Gx((o=e.loc).source.body.substring(o.start,o.end)),a=zx.get(i);a&&!a.has(r)?Kx&&console.warn("Warning: fragment with name "+i+" already exists.\ngraphql-tag enforces all fragment names across your application to be unique; read more about\nthis in the docs: http://dev.apollodata.com/core/fragments.html#unique-names"):a||zx.set(i,a=new Set),a.add(r),t.has(r)||(t.add(r),n.push(e))}else n.push(e);var o}),qb(qb({},e),{definitions:n})}(n)))}return Hx.get(t)}function Yx(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];"string"==typeof e&&(e=[e]);var i=e[0];return t.forEach(function(t,n){t&&"Document"===t.kind?i+=t.loc.source.body:i+=t,i+=e[n+1]}),qx(i)}var Qx,Xx,Zx,Jx,$x,eN=Yx;(Qx=Yx||(Yx={})).gql=eN,Qx.resetCaches=function(){Hx.clear(),zx.clear()},Qx.disableFragmentWarnings=function(){Kx=!1},Qx.enableExperimentalFragmentVariables=function(){Wx=!0},Qx.disableExperimentalFragmentVariables=function(){Wx=!1},Yx.default=Yx;const tN=Yx(Xx||(Xx=Mx(["\n query GetCustomConfig($slug: String!) {\n cmsCustomConfigBySlug(\n input: { slug: $slug, tenant: { businessUnit: CBSS, siteId: 9 } }\n ) {\n id,\n updatedAt,\n values\n }\n }\n"]))),nN=Yx(Zx||(Zx=Mx(["\n query GetSinkMenu($device: String!, $menuId: Int!, $transform: String!, $dmaStations: [String!], $dmaMarket: String) {\n videoMenu(\n device: $device\n menuId: $menuId\n transform: $transform\n dmaStations: $dmaStations\n dmaMarket: $dmaMarket\n ) {\n __typename\n fullRefreshToken\n order {\n edges {\n node {\n id\n layout\n slug\n title\n token\n rowData {\n edges {\n node {\n id\n order\n ... on VideoRowVideo {\n id\n dmaStation\n video {\n authentication\n dma\n playback\n rowId\n network\n about {\n images {\n baseImage16X9\n }\n description\n title\n shortTitle\n prefix\n duration\n }\n event {\n status\n }\n networkInfo {\n logoUrlSmall\n name\n }\n properties {\n league\n sport\n type\n }\n schedule {\n preStartDate\n preEnd
2Date\n videoStartDate\n videoEndDate\n }\n identifiers {\n id\n }\n flags {\n useDai\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n"]))),iN=Yx(Jx||(Jx=Mx(["\n query GetLiveEventPageMenu($device: String!, $menuId: Int!, $transform: String!, $dmaStations: [String!]) {\n videoMenu(\n device: $device\n menuId: $menuId\n transform: $transform\n dmaStations: $dmaStations\n ) {\n __typename\n version\n order {\n edges {\n node {\n rowData {\n edges {\n node {\n id\n dmaStation\n featured\n order\n ... on VideoRowVideo {\n id\n video {\n event {\n status\n frequency\n preGame {\n sources {\n hls {\n url\n urlNoAd\n }\n }\n thumbnail\n identifiers {\n trackingId\n }\n playback\n network\n title\n useDai\n }\n }\n schedule {\n videoEndDate\n videoStartDate\n preStartDate\n preEndDate\n }\n sources {\n hls {\n url\n urlNoAd\n }\n }\n flags {\n useDai\n suppressPreroll\n }\n identifiers {\n slug\n id\n guid\n trackingId\n }\n networkInfo {\n logoUrlSmall\n name\n }\n properties {\n type\n eventType\n league\n sport\n tagSlugs\n tags\n }\n rowId\n authentication\n about {\n description\n duration\n prefix\n shortTitle\n title\n images {\n baseImage16X9\n }\n }\n ads {\n dai {\n daiAssetKey\n }\n }\n network\n order\n playback\n }\n featured\n order\n }\n }\n }\n }\n id\n description\n slug\n title\n url\n layout\n }\n }\n }\n playback {\n stationOptIn {\n playbackMatrix {\n adobe\n both\n none\n paramountplus\n }\n licenseDomain\n tokenUrl\n }\n }\n }\n }\n"]))),rN=Yx($x||($x=Mx(["\n query GetLiveEventPageMenu($device: String!, $menuId: Int!, $transform: String!, $dmaStations: [String!]) {\n videoMenu(\n device: $device\n menuId: $menuId\n transform: $transform\n dmaStations: $dmaStations\n ) {\n __typename\n order {\n edges {\n node {\n id\n slug\n title\n rowData {\n edges {\n node {\n id\n ... on VideoRowVideo {\n id\n video {\n dma\n authentication\n dmaGroup\n playback\n about {\n title\n shortTitle\n prefix\n duration\n }\n event {\n status\n }\n flags {\n useDai\n }\n properties {\n league\n sport\n type\n }\n schedule {\n videoStartDate\n videoEndDate\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n"])));let aN=null;async function oN(e){var t,n;try{const t=window.sessionStorage.getItem(e);if(t)return JSON.parse(t)}catch(e){}const i=new Promise((e,t)=>
2setTimeout(()=>t(new Error("Timeout: Config fetch took too long")),2e3)),r=await Promise.race([(aN||(aN=Lx.getInstance({headers:{"helios-client-name":"CBSWeb"}}).client),aN).query({query:tN,variables:{slug:e}}),i]),a=null==r||null===(t=r.data)||void 0===t||null===(n=t.cmsCustomConfigBySlug)||void 0===n?void 0:n.values;if(a){try{window.sessionStorage.setItem(e,JSON.stringify(a))}catch(e){}return a}return null}const sN={heliosClientName:"CBSWeb"};class lN{constructor(e){var t,n;this.device=void 0,this.heliosClient=void 0,this.menuId=void 0,this.menuSlugs=void 0,this.dataType=void 0,this.transform=void 0,this.videoApiHost=void 0;const i=e.dataConfig,r=e.heliosOptions,a=e.dataType;this.dataType=a,this.device="desktop",this.heliosClient=Lx.getInstance(r||sN).client,this.menuId=i.menuId,this.menuSlugs=i.menuSlugs,this.transform="ottv5",this.videoApiHost="undefined"!=typeof window&&(null===(t=window.CBS)||void 0===t||null===(n=t.Registry)||void 0===n?void 0:n.sportsVideoApiHost)||"https://video-api-qa.cbssports.com"}async getMenuData(e){try{var t,n,i;const r=a({device:this.device,menuId:this.menuId,transform:this.transform},(null==e?void 0:e.additionalVariables)||{}),o=await this.heliosClient.query({query:e.query,variables:r});return null!==(t=o.data)&&void 0!==t&&null!==(n=t.videoMenu)&&void 0!==n&&null!==(i=n.order)&&void 0!==i&&i.edges&&(o.data.videoMenu.order.edges=o.data.videoMenu.order.edges.filter(e=>0===this.menuSlugs.length||this.menuSlugs.includes(e.node.slug))),o}catch(e){return console.error("[Failed to fetch data from Sink API]",e),[]}}async getEventStatus(e){var t,n;const i="undefined"!=typeof window&&(null===(t=window.CBS)||void 0===t||null===(n=t.Registry)||void 0===n?void 0:n.sportsVideoApiKey)||{NODE_ENV:"production",PUBLIC_URL:"/assets/web-components",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.REACT_APP_SPORTS_VIDEO_API_KEY||"";try{const t=await fetch("".concat(this.videoApiHost,"/vms/events/v5?device=").concat(this.device,"&transform=").concat(this.transform,"&id=").concat(e,"&filter=video:event:status"),{headers:{"x-api-key":i}});return(await t.json()).status}catch(e){return console.error("[Error fetching event status]",e),null}}getPlayerRoutePrefix(e){switch(e){case"dai-events":return"ks-event";
2case"local-news":return"ks-news";default:return""}}filterAllowedPlayback(e,t){switch(t){case"dai-events":return e.video&&("stationOptIn"===e.video.playback&&!0===e.video.flags.useDai||"syncbak"===e.video.playback&&"CBSE"===e.video.network);case"local-news":return e.video&&"openHLS"===e.video.playback;default:return e.video}}transformDataForCarousel(e){try{return e.data.videoMenu.order.edges.map(e=>({carouselId:e.node.id,carouselLayout:e.node.layout||null,carouselTitle:e.node.title,carouselSlides:e.node.rowData.edges.map(t=>{const n=t.node;if(this.filterAllowedPlayback(n,this.dataType)){var i,r,a,o,s,l,c,u,d,h,f,p,m;const t="syncbak"===n.video.playback?"/live-tv/stream/tveverywhere/":"/".concat(this.getPlayerRoutePrefix(this.dataType),"/").concat(this.menuId,"/").concat(e.node.slug,"/").concat(n.id);return{channel:(null===(i=n.video.about)||void 0===i?void 0:i.prefix)||(null===(r=n.video)||void 0===r||null===(a=r.networkInfo)||void 0===a?void 0:a.name),dma:n.video.dma,dmaStation:n.dmaStation,endDate:null===(o=n.video.schedule)||void 0===o?void 0:o.videoEndDate,href:t,id:n.id,image:(null===(s=n.video.about)||void 0===s||null===(l=s.images)||void 0===l?void 0:l.baseImage16X9)||"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA0sAAAHaCAIAAABeg0XuAABFIUlEQVR4AezWAREAMBACIPMZ3kzrseeOECTdTwAAMDwAAMMDAMDwAAAwPAAADA8AAMMDADA8AAAMDwAAwwMAwPAAADA8AADDAwDA8AAAMDwAAAwPAADDAwAwPAAADA8AAMMDAMDwAAAwPAAAwwMAwPAAADA8AAAMDwAAwwMAMLzDAAAMDwAAwwMAwPAAADA8AAAMDwDA8AAAMDwAAAwPAADDAwDA8AAADA8AAMMDAMDwAAAwPAAADA8AwPAAADA8AAAMDwAAwwMAwPAAAAwPAADDAwDA8AAAMDwAAAwPAMDwAAAwPAAADA8AAMMDAMDwAAAMDwAAwwMAwPAAADA8AAAMDwAAwwMAMDwAAAwPAADDAwDA8AAAMDwAAMMDAMDwAAAwPAAADA8AAMMDADA8AAAMDwAAwwMAwPAAADA8AADDAwDA8AAAMDwAAAwPAADDAwAwPAAADA8AAMMDAMDwAAAwPAAAwwMAwPAAADA8AAAMDwAAwwMAwPAAAAwPAADDAwDA8AAAMDwAAAwPAMDwAAAwPAAADA8AAMMDAMDwAAAMDwAAwwMAwPAAADA8AAAMDwDA8AAAMDwAAAwPAADDAwDA8AAADA8AAMMDAMDwAAAwPAAADA8AwPAAADA8AAAMDwAAwwMAwPAAAEgHAIDhAQBgeAAAGB4AAIYHAIDhAQAYHgAAhgcAgOEBAGB4AAAYHgCA4QEAYHgAABgeAACGBwCA4QEAGB4AAIYHAIDhAQBgeAAAGB4AgOEBAGB4AAAYHgAAhgcAgOEBABgeAACGBwCA4QEAYHgAABgeAIDhAQBgeAAAGB4AAIYHAIDhAQBgeAAAhgcAgOEBAGB4AAAYHgAAhgcAYHgAABgeAACGBwCA4QEAYHgAAIYHAIDhAQBgeAAAGB4AAIYHAGB4AAAYHgAAhgcAgOEBAGB4AACGBwCA4QEAYHgAABgeAACGBwBgeAAAGB4AAIYHAIDhAQBgeAAAGB4AgOEBAGB4AAAYHgAAj51rgJKra4KfbTu2bdu2bdu2bdu27WRs27b2r9nNyUE4O9z8954Kd/D6oru6ut9LRxIZHsFXLSh/d6Hn78sqOZRTcRS3+jhenUl8oPZEPv6O/yk5hJ2vDxOvwStT0QQCAgICAgICwvAIPmz09Od2tLLDuR0WiEdvVi45qt191XTusfUOy0EVubhyt1jjBURqL1fhwf/cZjrOPLTuuWZafEQ7arOi3Xxx6WGcH9tS8TlJtoWAgICAgICAMDyCb1tT604WzNirPnzb/JDrlOt9bm8o7Z0HXuryBmU6732O89At89TdqhrjeV+3fN+EvY8aP4Na+UMb6i/tad+3oX7W7Bnhsoma+afYTj+1o/3SIYyvsLXe3yzrm1aUn9tTYebP7ahfpoA6TvBJk2dfhbcf9ef2tG9bUfFPMicEUR5zhA+oIRkO7fvWZFMRhhcf/NWFPmG78gbdDnHO7g6GQNaiG/gEmysoVHuuUOyjtyhy9mRm0Zn5piWlwkhu96XSmXvVmy8YTj+0QrN8wHU+4jmf8MO/3+c4rlLtR+6YV53UDd8obzxdmKMn89Om5KBGi48bP8vRg9F0hnDsFuX6s4bj9y03GQ4kHo/5zieCMLAKtxiOo3csa07rR25SNJom+LcrPSta+mmTZzggzWYKx21VrjujP/UAe8z+kJdhKX7PsNQOS1ef1MHSBlMFaIoA343rVRGXWHuSYOAa2cLD2t3XTJee2e6xcfDDywFgde5xHBee2A7cNC8+ohm2QY5F+a8bg0Rogjfg1/a0mhP4Q9bLlx7V7r9pRuBA+Hjh0BBN7rId55/Ytl0yTNut6rxIUnwwG24w899IGB5Bvr7Mtaf1WrPf7Y2A2EVE9SDsCVSeuQc0OXows4TcBX5WbDB77FYlPLja5LM4Ag530OML+QKhYOjVNgaCIa8/5PIEbc6AweqniFygHU1mCL9pRY3VJRXox2owVRg/QL4tN4KDKPVZUukpiEupoZzZ+9VweZhJmyuA/ePzh4LBV+4vzHya78XM2/yg3QsOacsM5yLWpj6FRS/EosPapwKX0RZARvTc0tBrLc3YY9Z0SxEMZu1TlxrCwedE2WiL1Y8rqo3loZEXEkWqFzFaUWpN5C86osGKYIYxz05P+OD7A6HQGw6+L4SX4cV6qx/RetkxLdhewpqSwfXrTRHEewXrTBKUH8n9rzvj05geK6Rw+GR8fuoDEeHzZpmx/aNGT7N1ZwxaKzv/xKo0+izpmwoHORB87abCfkM4htRitgeEGu+Oy8ZWc0Q/tI3k+BCGRwSSf7rSESHgldISNVRGPxQIVDZTUH7AOfyiOQXy26SdKrrEjWgak2F1BXA+EeHg8aPhHCgMrTypS8wyIaRRxa5tFw09l0lByjN/5RHqWH90pPVdJUNnZ/QmYPkYUveEbUpoY5+nUhn9w3SyjqM3bIOCLXNHbynoIFPqHrVJkasnE9Q8E5bm6sVMmAdAvnT2sRX6BO7QQp9DKiwNPCF0elzP+rN6ldEXK0sRyLdcMECwiXc9t9MiCehCwlYQ5IMmdu+6auy1XJqnT9g5RMP5xmxWgBmnZYWBRvM/O9MjylTRXFF/iuD4PYvLG4MF0ph9G88bkBOiU+WjN50awvCIVtyB1n6+GBoJwkPiB1XsbjFbhCa2FIm7iIvIg+tPFRy8ZXJ4gvEwGeIfehP7rpTl68v6sjklaQwv8uH2hVAbRVmhyEA2QnI8PAvCPITk8duUYq035ioykuZ1Z/XlRnB/SoEMGD03hQawpuxSiTWxtxT9r8uPayG0YJkiZnjJGCKNd+M5fa0J/H+7MTLUkQQDnY55ejN7LJPcZTkC8XGFUGRR2B20Vg4BHmQopRle5AM6E4qMY7co4Bxe+HPC8JAz/N6J3mKW8OJTWzAU+1By4r4F1SHErFeI94ThkWbhMsM5yFadoDLJG3ZXEEVM3HILdpXc2cjRk9FlseTkA6RZcZ8QHE50WgzfoCg8IKO7IukML4JSu0TrRUNStXE8EIgPY9do/FtHWvel4RCLyYnf9aPOvvy4DjoNBJVkbbawpcukIPqBeG40qFCLj4Z5HhKJ5DC8yDkQAmG/VbL8/VgJ617F5ODZT5N2qCD0JiDLxYo/4bvGbFHC433ejJLqDC/yIdV5N503oFgMN/V/zvCgB+M5YnhxXO3CqYE0iNItLuk5sSYMjwCxuccy6WO+KxUODLwSblnAA1lQtE3KbOAOJnw77ho22QMJNhxd24PXyf/tykg+w4uwQMOQuFHZhyARkzp7of4sEH2dJRF9Amjjw8VP3KFCaSnxPhF8YsM5fcJ2GtpAwSfQ5JT6DC9jIOFE9bbbUsnvHeMbsSBC5+zJQK8Inv2EboRE2hgIpIHfYwfi+MDG/7F3FmBylNnXf/7r7rusu7srsK44GwIkEMPdEogrUUJcSIhMXAhxd8Ehybhrj0uPuzTfL7y7+Wane3rqVlV3SVc978MDJNPTVfXKufeee46bEJ4KAtFeQFrrl4+ouD0WER4qY0ytxLzmKIQN/AbY8zRm
2EbiSAvcQXqyPLwxOotehWEQ0ifymkFPaRnmODH+Un8ZPHkiH05BvfllQwM9DUOaKidksTqcgPHXB/6UBBX6JwVfwx5FZR8/XG0/dSdlRO16uhR0VteQxkIL2arrUozzTODg3n6pWd2p/hKd2g6KqdsoLAgAk1zm6dkoO7fAKaltU2QygLTro6XwiW+cgPEHdlgYg7o6elVhDeJxizF547VFm0RA2kALngXsIL3YH9K+4o357riWWBBn+j/ZPjJoyBdIn9FJYvi1C/UkrbKFjl63BQQhPsftpjuZo0f0Wrp6ck+prsQRegyn51SgRMBOiAO9umpkHM70rYE2a/HxO882z8ihK2h/hqYtOYZRifjc8IwI5+8T5uysI6sx/F/J0MumuOTsqvjwk2RkIT47Ux64tgXcYOwgPajuhY0t7lyUPnAYmiiEu0wf1EJ6ASY1aW1s0SxLy5s3tL9VGYYKiVopqHcoU9tkNUQNB/Yh2egchPHUhZQKxTMdbuHREBu2fAQsf+1vMPJLHkZ5vMJMSVMnGOixOBHX3Ih+pYkcgPPWdi6vazQV5MF+Pxdersqx90l2wNehRIGHpJoSnLuSlnnq+PEYQHhrsdD90dAWsPUMPvlHHMRFbCM8bTEomnyOWEPvdh/rFR049/Ou3pcC6g6Nqw3sn0/6NO1L/z1EIT4lf9JuWKzqioMGh8xmwx0sYGVcSuaX3w/vSjifU24TzSjuRUxCeumBnXjYik6llPI2KiXZSfjNTzoYX6S7aYviSLkN46pq8qQzCrrsRHq0z83dVgNft8CXPpDQANz2EFysD2jKp4zcdclG1fP7FWqTC2NZN75n96QNpNMxSH7HtBT/3lw+nUzp0EMLjYMFk4hcPpWt8ZTCRF+6ubLFHKgWF4WlbyyK09Ki8z91Z0WmP+eav78CbwVkIjylCotcg+kGQjCp5emGLnfc9SgqESdQ03Yfw6M26Z5EPJqhbER4nC+1BwHSbPO39r9fxJT2EFxODwt/WMzVvOuqipQ5nML65uR4JnBOHztZZF8QLAnqsq9CMcArCU/mh5QeqLhmQqAVn3zA9z1fRbhP258QNpRESlOJjr38ylyq2TSYVnlpQ8SQIzy74YPcrtV+/XafhIQLmtz6dj3Gi/fc9gg008z7UL8FlCI8rv6yNHCoRoCsRHmoAlJ4CAVvswzteqvnMwNiAdx7CQ3ERRfU3HXhBkJq5rQzxMLMeBUyXI+fqnXL7mcWt107JBSI4BeEpDIHuTJ/C/QjbYuJpk+IyWmiRs/OnUEK7sR3uFKEyvJKRSbJLp4W893nSxlL1/aWDOUmrvlMWfll1ByCPjkiXITwF0wna3Yfw8JbAzB3GoQ2I7F3rjvk/GyPZOw/hMfMmbSiFwm9uiEDaAy1++hDxlWJAIeffC8rbkB7oCpjsQwA3/P1mHMBo1qOzJYmxrO+zw9pSRb1OQXg83o0nqimvh09rIfJe09hp8BdBKK6q7wRTMklqdE08NIFHxhV/NJIWF/2m5RmsRPPDF++0pLpD33OjYRN4R3eRjdRS5FdGUevfx2ZLa7X/mpCTVSzK3lm/iOhPv2V2/nvoiXERwlP5cuQ/iQBdhvB+eG/aC6mNxrlJPAF2M1Yr9Xodr5IGXrI52DP+n6eWEiOGs8gREbsHDDdDnc9uWn/cP35dCVQDNlmIzzjT4wr/4/vTGD95II1/pwB6+eOZqKMhQTJ5YykSXOjKGvSH4JsjI4J9gjFZXVhfCdtfrO0KmFlETi9sJSO48WQ1hkuoTa44WEX3xumkBh8PPGCaXjlWttQ9HYLwlGdiB9JroNIwattxR/y6H/vBs/VTN5chcfI35uHjmYh8MnD7RWoOS9Ytp6tBQlpeNBqhhN2RJiNTuNF3pwRLMGnQlB4wKw9Hdu70N49l0FXKWqB8P3xFMU3x3KnGY5XirMp+ORrhcQQuO1AlSupjHUEu3ETsxXuJz2ne+1otmlOs+mX7q9Ye8/OfWNTwRyZGd6jb4IgAnHUTwuMBMqu/fWeqmxAeXJrBT+dz0ulmXS/aU3HngoJ/TchmdbOb/eatk5Tue8TtFu+pQLRcy2slDlx1uAomQ6w41XoID1Oy08kNXQGdS5EjcNOparwav3t3KllfEgDKW/r/NOjMkTvk7MQvDwV/Kg6sat2ZDL4/zDl+uxHdu7k7y01pcSqv7WBDpxuRgi93x2HDF+PsRLOUf4K9QGOUIMG7j60oQsXXI
2MDNLW27/skcQl4jCA8fsH+Oz+bw7nN8846UH92f9qdRmeR7TiTU6zstmDmj44rD1D0p0+jQAuVJsn9xYCM3hR3QO4LmIZgSuhUNHCRraSYgrxwIi5/whP2gnO0kGrRs8wx1kBOIGbAV/9TNiawj7jS4JxQuHdMAQeAHnykkjgL6hNn3H1haqMj7Tkd4Cq1y+Gns5mF5klkxBZek+VpmP19OFMHsYjNkEpL6Vauef+E/OfLRtPvHuKypW8qAgFQkjcNZ6vssSTchPKW/PWxewduvdA/Co5VqzTE9IevJxAYSIp+9NenD/RLoQekxq/lP/id/xHy7YkI21mTh5Y7ZHr84ODlW4J2H8EAe+G/qgHf8BImoG6blhjHu5HClM/yLQ5LJ3mHljhgEuxunzv+F9fbm3H01vVHfDjRurX4xi8FzCkCrBlf1uewmXFNFQn0stq8MSyENQ65Fn8gc8M54p8Wx+AbwqK4IIUPfAQmgDyPd3G9qno5yKtlokSEP8/POBb7y2vaQ8mNPbi6Lglc38EsHW470pOi7wWF4YlVxXVPoWIIGRpFepii1v3BPBSl8jYOs/7WTcyCN4BJmJMmNuJoW3iSZlSX7KgG4Bqlj287UXDYiQ/RG+NW/eyxj+4s1jYYtv2dtK2PnjBDCe3BpIe9F86BQkwZp5OFlhdDpjHDOVh/xg5CC4TjbFL9Fx6CmtOlktfYvAPsFI1d+UN8gRu0udID3nZQGwLzC1U3KDyFx8GpGU8hPwxUphgTwPIRH3H/91FzqZaIcCafLsv2VuHiF/EDObMRCOTU3n66m8BG8lfB/MopbKZPdscBH2o+/H9wKyiH9x5GZz71QA9uAEqTIIOuH96bqkyLDPEd3jZiN7OW0Rpja77lWPyAgCKPATSuf9vOGXEW/qbn8rIUIT31zRJilxyQvl0Rmb585d0e5DOnWdzzQk7sjgCxs/eQGAt1wCcIoUYB3jOdfqJGKZXCner1qUqhfNzT//3MXxt79S3zSxyVKxtCkou/bkn2EfoDQnQ7RItbRp/vqE+T9ApR9le266wZkedEf+PUjCtvp3ISpuDEHWMuBgH42CMW7CCG8qybp9hskdk1esKuivFbPrWUUtlBfMtdmXbQl4hzIWWbWb4c+0dUVEME7kvRqDksH/TdUSEgZXEzbY8wDYeMTMQXvPIRHthbLRe32iDh3zdleAV00eDsDpVGYgAzEfqfdAYKMAn+fHYczIxjnkXzGipRyJw1uXQFBZoi0omzl90+Ys6NcX4GYJQTf+cnNpV8emmyKLB+oFwNcLSw9zjCVvYsUwpM3IIuSwex3P7qv198o0f7lLdD5X2tE2Im6LXw7DnseO2lR+jGjA+/I4DJ/RKVA1uwHDLi5ILFBhozuYAWyySASUNkT4alNAGfY1zKbdBQ0qZaG//Bv35V6UK8oUusFf8/G2+cXmGIXy+6HDh+5cN02Vudzm0EDdkN4alwxMYev1xUQA2iILqTBXIDwWOZD5xaIbh9aBQxL3b+RRQ0T9+X0Rt41Z/fW0zEG7zyER1MCmTaNtDPMGaF5QlQP7tui5MrJSkvXvtfr9BU7SLxxaPEJIacgHCOqNlD9COU1hj6U6kTm4ldMyNHHs+ZsAIiQyQ8jHqZPl+uW2XmojYcxjmP9k73j4dsE4YGHKK9LmXP/HNfr4SF6IySiRqwsNn4AQAYlFzt6TYkQ9Ogf4AMyaqLI/rZ5BcZ/Ke0mZ5IbKKUpTTXbIjyFfmjbokdBChEoNYTPc/DFGnSVETkyaaGABPk2U8MA6HTLDlSSjdYH8qjosQxtiPD4Vn8elUXRU3pHeD8wP12A8HgChFWik4UeRIP9+0zOP47KIoZhIcRccdZDeOzy5OS0iJ7QXoocK7Mt5MQlDYOHcbHqTDSmkUbTGXWZ3rzU6BgiIukK9L02zqQ0ak/n8DdXHfHr+/LbX6qhR0SQupOcamT1WeQhTyCkZ2BAKhRiE4SnGhLxqxA9QO6it09D+EMk83HNpBzjj53jhF7vD8sPFSNlLBFXifVI6coUAi7sWNWZZHOEpxISZMukRFX6HsJ4EsIMZh3pUhvuRARAaf2YPuCZ0dyjT+Wb4gmz14YIT0WtJLFK/LL7In7mgbgD4Yl+NbmS2dvLjZ8sgDxOKPUMY2t4CI9EV5+wpqiyndQIwjlMtZCzFu4q/txmSTgyraFX0zfU2y7PpowOAgmbPtlp9KVrXHiUclR2UHrB3II8G1EVG3raoYH30CnEMfOGMJ5F1iE82HhYWYueIenP3j5N1DGHyOLfxmQ7cRlCjJMiPBUFWTCsQ3hqPiN/LarVQuH9eC8QFiIHKI1P0wHvZGYS8kEs/cjyIh19V9wM3GWIfTZEeAxUBWgvFdXEQbpfGJTsDoRHHkTQn9TaNXlTqc5f5w0P4b3rmvhUXx9VMMpVgK0wMsJ/eCILCpG54sWB/5o09MZmIOtANZCUYV9+tTVa+DHs1FC5ddwAn/+VoebDu6AKODF9ErS8i+XvrJJWirOqVm43hMfJRPec6DEiidfbp4lkw2CVDZyV78SV+JWhMoQHaqEJKQYRHgMFTSkNgM7cXoB1akF5u46eWe5FTIKUD34FTFD8OXRUQuAu2xPhsXuTiC2vaRfxa3lTMZjD48ZBhDo1TbzhITxYEYGw0wtZnW/dkRImS0z7WG3EdIkAjmFY0sx7xB7D87TQGUbqts/nwALW0WABw/r790Qvj4LoA6G5Ut+ltUK9FBsiPGoBtLmInuT3en+M2RJ7UF7ivF0VihTlqAEslvHwWJvTt5TGJsKjl4udwXiSmA3k3iU+HfsSXOSo0dUpa64/Xi3NMgLdnj1YxUKwIcJj0DV8NktWGUfE2x0IDwF20Y0jc8hCE/8ub3gID4iw+VRNGP2qlYfDKcKTWOJg1ifeJtIiCu9RgQIkWUa2qt5UXWC2KsHMMAMtQB0OaRwbUY6u2JteTGm8eFzZE+HBATorIVPnlbdRuOnt015IkYnXoB/7h7ATxrYDkzHRnaKqhX85MzDWEB7ABb1J0bO6f0kIWRlS4Cm+FmlP1YmEBjSVovmc2YRR5NaxcyJ3YE+E94VBSejSi26HTmp39NIiOSkVOsW6Tdzy5Q0P4cGXgpneW/l/0d6K8C08KBifSMQDI+LGNVRCidrBo2F2QLRUekuBIJ+B5mT4Eq2U0QxwpGENdZXovzVVG7ItwqM1BM8rURsg7m1hmP4rDlVJZWuoEaP2qXhIDhoE66I7RdqKvnVeFomBmEJ4yt5NROR6YnWIDmtc3cRxXVU7yh3RTxLjHMMDlCID5BKBFDZEeGAsqkOi20Fk1AUIj1Psb2OzAgGxU9n1CDWI/Na94SG8m2bkhSywApUQgv9AWDE5HJxmbivTJzGgw4FqwvqS8KRmMnlL91dyO6ELtWPCUVJIiUk5gvSK/lJ1Mlo/bITwyJzRSHs8oUFEaXogbIQKZUeHNiGtHgT9ylPEKYNks46eJEAeLnOsjphCeIfPyRDeyFAIjxqF9Gnj9XTJQGsaEhfvq5TGxsS96DvaEOHR4IKHRwwiPEX9LJe39JFsJpMn0D32hofwFu2pZIUHw7vpW8ve39fRiPNdRhFUmChdeWVtvxsezl+SP0JvgnwPxeVgnfe7F/rC5Dlo7BJ9GR4RNlZIsHoIr0cBAsUclKtFaohpCNY/FA4rU2mqJzsrvyBoznyuDMbPOx3ypviq+gwVkgtapm0p4zGStowFhMdtviqU40HPOVglir4cKS0YGy6rpget07SKi74wro/wpG2I8GBlSNvtaSxzB8L7zMAkaMr6RHA4qhDENsoB9UaMyODhZBwI9Eh+vAkj7ZK+VHNwzkY7UWQjZrxWC3oLz0UA5OEDQfI/+IvhVNFbxRksK93o6T7mF3X/EA/hMSXw8z2T3CiCd11dOGn24bfIdkbCRrfszvmcZsRjr5qYowrBdh7IZZNv1nenBDbwrpbtr6LtnTq+uxEepAups+eAoAwQ7dvS/lksFt9vXaWM3W/6FhlJn45j7IVsiPAogEglM/88OssdCA99q8dXFetmN+FyBG1p2LwCnKi8HlsP4YUzYA0WOt58uubrt6X02aTJKYKB2JvRvajAfufO1D6rhBCwzuU091g+ELN6k6y7dHiGaJujAogUHxlBtyK8lIKWkXHF7P5axpC5BdjYU7piLukwnQSUoKTIfAt/sCGLY4TuyfuFPkU8w8YKKLHztggG4gsbuVP81o7HNwxfWaTu1JUIr5/QRJvrd4/17MScullWE+f7Q2uxtjGOHiYRw5VVA78FSGE3hIcIa4kwribsdAfC4z3SO5gjagYPOoPA7rSUYfVx+eOZITL33vAQHu4UBRVtPY7bS/s6blVfAu6rnOXRv+ZsL9eyfq6elNNDRA1rL5BfyL//6LNFROciUuBfVKXGpQiPU4F9v7Vd6yBjqk8KESb4Q8uKtJRQ2V5fTW8yngbmqyJUe+CNOjTz8Kqy4cuielXkbzflTtED3/Nq7c2z8iBouwnhcZ6tOuxvF6qHfDKosHVQ2NeCYeMHmDNW98bBghB97XXH/UwqWyE8cvbotwcCor2ik8StOxCeqng8I2BVhssrcx5BdBm/ruR/BKe84SG8R5YX+ruFg0is0cWtJTWFv8IRqmZWXFhraIxX0KmnAnjx
2IvAlbAr5N1cLncqK/R0w8FyA8Ky9qCpCA/1Qv3iN5UuAOHuZiV8AAITH8TWTczk1qdTbJLFHwvLxlcVaQg6RLP76437cxy8ZmEQ6hzy3cxEeskfXPZkjFcPLLWvr8TlgNV+lrAqx4mCVHer4w1cUibDR6eQGzn77IDymHxKn8KqlyqM0GbgG4TEgdEKfNXGZ8yp5SpigwCAiCxPriT0P4UFCb2nrujg54o74tdgb/9+FsmZmBYLyFl0aO1g5s08nN3bPS133ZAjtOv4P9mii43TDyWpDT95DeEpq8VBVcJdf+LjiuTM1plM/IZ7CN4C+9s/xOSjyqAYja8eXhyZDxO7sMv1OA3DXFuyquGJCDg8TrOA4hMehRTcJpEzps4Gf3uOjKPlJ67yqRGv5uGJiDgktAbotbaODxyYIj/0WdtB+YY8FF13PwDI3ITxirQkbSlgU5tOZGjthJQ2ek88kJ1kYi1w9D+GRq0PxXG2U/CMxrwWGhya1s6vOQ6GwEBw8tqJI4z1yGHSnety9yBece6PdJL1QFkjRsu4hPCMXEoxo8RBOSMkrRL1ns5tIzUbi4qhDWnnM2hII3Z+5JYlfZ+Ha5E5pEIkQEQKFIzR7oSRiekZPlVMQHtX8P4zM2v2KHux7y+yeRnakkehMFBW+Qd52WM6EuK9nNoleNwJsdkB4rKlfPpKx8WR1Z5e4W/zOBWr3dg/CUw1DJNcFrWlyMYEleyv7Tcsldo0twWQP4dFth1/+xVo+2z3nisbIA6EQC/EB7rHaT0osHS8ek6PjioMZx9+8PSWnVFbxoTPDQ3j6LmRrjp6vRzAWLwF9ZzxKAWxbcugjS3RRuL9xRh7hr1U4D+YcoCSid6p0agjz6Fqgesud2hbhKRUeqpMopOjIbJb424Odo4fNLaBzS9SUapOyF6f1nlfrRNhUWe9YiPCYXd+8I5XYmCBKxxukTQqCOOUjlyE8BqaXvM2IalBQcONXkBnB/+Yd6pT3huvvEAWKi4KTGExp1/D8cL8Ezj8LUcKZlAaRghTtI+oHZzxXFkyuJ3NJ87noC5Dg8RCejgui+ti1Jd83ZsAANOS4EjCo9OI8vu3W0zUU5nAFteStMVeBwhDIItrRRHQHI4q0Cn1XRH0RRXjQAQGUtP5pHBjn0zL1wDOFS/dVQqXQbX4NHyD41h57tkjkAoxJmk2WM3Q06Q6MsgbRkXGEhy8I70X7gPr897HZQ+cWIFaFCnpNo843SHPJF2mzcCPCUyAPU59Ib788/DPJDdQoCFzdD+A8hIct4L7X/hM6oF2s/Qc/1j+BGr+FQCG9qFUCCOLvW1KoyFvzd1YE6/5zioh8dTn79QEUD+GRwEMtD3tQg+4LFGt++Ui6EryNNM7DenjzqWokl63K5P1ppJyOLb9YIKyCVUf8ILbIITySN/6GTliPGgfoFihPNxhfz0hJ+l8TcoKbSyZuKG1qFSC8A6/X2UfHVLqcWXQU6YwjPHRDeS+iQaREDx+E74ABQyPUqln1bkV4qoOe70N7eBQUx5AhpBIC28pDeG4eMACUrPZrmU0iyPKxGxMPvlFvIVBgvxDd6Y/vT3s5rZEfpDudhR3c0EQJQFRp0v3MvSot2zz7NcXH2+f53nVNvBFCDwSy6OyJ4DwONkicVhhjUKDEczlJ6rmiO5/H4iJtKUd4tr1I/1R/flCIpPuUTaXNEoS34bhd+qtoBsIRW/QQUKyEoCJHeLa4yDz99AGFrlyL8JQGGcwBQsqIeweQz2voJC/uagM0D+EN/g/CA9HDLxEivDoHITwYPJR4+MGloRAe0s3Ffg/hWQD1EKWjPMHcMyIsgnAG5TNOqUgfU1T05u2qgMxgCTOPp9R/Ri6a0lG4U0Dz7O0VuE67AOHRLUv1GZTsITyHIjxSsHA3yUG4HeEpHZnzP3kgfdcrtdy1vpynyEyInnR+Hc/WQ3guHJ+/NQk1VPWyIZWLxCqxBbNwzUMP1/5tIVHB4+l4ayefu6PclCotFR8P4ZlCAcaha8icfKpOBrVF6KdB3p1tMaJfmOwjXiZfGWaNJQbI8qvDUjCtSsxrRmsmEOF6OuHQ5wbRfuFghEeL4sLdFb2xjiYJq7T77VSlXWhBldaCi8320Nn6b96hmAPuR3hqYIuHSvnxxIbS6ojHcy+nN+Hd5/KKrddpgS6DdstOQBLMZQuX/ckkQafFt+5MoQytfnD61hCdFkgPFAg7LT4VXmDCQ3jCLjkc0piNxk3Z0biGzU2KN3Lwp6UtAPTBDtKqHluifHLS07aUHU+oF7lXSa/65gt61F8YnOxQhAc44FT+Re/amSNWFIlCAgRK7NNpESfstLhN3mlhhwsiJiKmfM+YQnhqfOrmxFueyt/+Um1mUWtE3xEFLmVk5SE8Vw1S/Ru7qaVgGKDxHZPtH7++xMJlv+JQlXa1lLHrSi5qL1GqgLoeDAGlBrvIh3oIz9yyOyDPFKlhAMcdC3zMEAqaLZFpQqUhFKlwVoG1YpbfuCMFauDaY/5kSreR0dPC9492BDqrHIfwyHzA9bwgEdJ7BYr2Uqlaytvdr5Zio4v1O3J1MbrcbkR4Ak4Uwo0zt5XzBdAxjtCrQh2TSoiH8Fw1KDV2VzxOym/GtlUjJQguduTSJCYKDv/8oXRSROEDWYrOUsVjtDfdjfBgYtFaz5GmfSAea6ThkVaGgU/lmdWaQGEOpQb672iDLYkAc5mG0P7Tcy1/rf93IZ2TiCAFPkXPv1gTiZoOywdwwJJ3FsIDmwLg3nNt8Nd2ieIxClAiKhv9ZPyggxAeSQcS1UoU3YUIT56OoV8QK+1FeyogaZjO0WNurznmZ5l7CM9VY+qWsotMFDgrmHlrXFG/eTRDHZyWXN+/N1WjOi41u27UfuQ6c/4vlGsZEh6iFYMKubsRHgWpm2fmUeHSPjh1fvdYBj81Y2vZuexmHbaqqLJhpWXiXaOcB9mUuOXexT6Yo9VocZl3oYr8WdvIIkI2pZyKsiPBD6IealGbdb2U1njJgCTnIDzgXcfQOQV9Jlk5MqWuZTdMt4dr2YQcYqqIuZZZfxFhkjxWh5GH8Lo7MsNmwWKYoIsyPeQiE5Eecjbs3h7Cc9V46JnC7lQe9rs7F/q01GphfO+3qJ0W/wmNvT/sEd3djbhT8joh/ybyofxFUWIDcSYXI7xj8Q0YGupr+eRkhSc0ZE5Bqq9VPVXLyey8LMjp37rzP5L6BDOmRL1PbSu31VsmpcedcnRxpw8vK3o1vYmT0hRC2z2LfU5BePTFoyBIdKdFa1Bqfv/swUrr0fw18Q8tKxIla19MafwBUbFDEB7VA3LSqiXOQ3i9kTQ++O8ENIBwo9n+Yq0S7jZ+obvJY/cQnnvGtVNyCsr/Z49DOYVor0+QBzcChkTAip1hwvpSLV2H/xqfTSmt+w/Sa/mT+9NCI91lhaKcEz2VdOB6CC/8+PadqeRQu7pkDfyI10T6aZC8mbO9vKL2go5uIGAoV8Qma2fj6Z8+mL54TwUVcIN3ml/RRv7A5giPJYwhHg032jnjR87XC01Z2j9s9RGINK7U/2DdcT/JbPsjPGIJSKWo26i2Xw/haRyQUlD1P5vdTOza1WWouer2+QUewnPPQKkfQnqPzATaquhB9LlL/nlUVhr0teheVXWdCDX3ScP64X1pb2Q199i3EBn66rDQP3vZiEzRNsdZwsEJkdFDeOEHDzwxr0UkxUk5lURUdKgtdy30ocVQXtvBC9UnxqEooTYfH+mfQJ0ar7/K2o5OvXWdKydm2xbhtbQHkN0Zv67kEmGTO5J4Uj8ACmQWvkq25V89kkFwIhKeJComs25nhMe5g/XFM/srST+rL+YhPB3E+j+MzATN0zjY0t6lD2Gz/UL58BCeSwaipmRZegT3LHj8W8EEfYIGWJ8cctHUyF2wq4Lwrk9/620v1gSz/mdtK+9Nd43UdLmQkZPma6GjzUN4fY6/jclulNDC0CakP4YfjNpGj8H/3tfqqA3pmJC0NFIQdMhiRzE//9DZulrxnao8ULUNER6MQ4jnqLpQedDxIv4yOkuaJkR/QCkuWTLY/ZAEEn1nGHsDZil+lX0RHm2z9wg8YzyEF459/pvHMpYfqPTpYulRqP3pA+kewnPPmL8rBEojW0vY1+d6oz9L7pip/0r1tcDoB8OFgXc0uyFXVtfc8wxDIZYG2DBZt+fOyAofOFuMXlMC7cxDeH3qt+FdIXqwCPdE2RYMmMKEL6xs1zEn4aQ6ZbFzp/SyPLm51FcpjszorIK4ZhOER/yGUtreV+vGri35/eOZ4B69qDeeDK60H4gmXKveIE9bKu0EHfPXj2TYHOEBndm3Sat7CM+su7t1dj4Nczo0DYbOLfAQnnsGVM2QMT3/c1Rc8bvCbp0f+Hc8ZY56iaaUAYpA5/AVReG3gM/emrRkX2XI20kpaPnz6HDMuRum5UrLCnjd/rwvfRkP4TEQqRHt9euO+aMvv0kelwZMqSsGgfI/x2c7a8mjbY7LC5U+Kaj67t2pFiI8Xk16USvMOdY4OjgQbUGrxg2XpOLt4CEas5RPRvQHvnnSbWrdsWolJ25zHh5VWt6ph/BMlEa/dETGuZxmqW0PvgAewnPP+MzAJAL63nqaAHD07IT58S8MSt73el0UHPRgB4Zn4FGEWnG4qr6XriLoBeG1rLhNuvCkFaKnni+H5GTJi4NY4xCEh9uEDAQcja//aP9ESzRHkOCSlsDuXOC8kBc4u2x/FWBahLyvm5JrEOGhyMBKpGFf+yA8QH0TfRAa4WkcgRoBujKxnMfHSrcjcr3UPZWWcjQH7lK1wnAawT/ayMjdmoXwYOZof3f8dpFCChVwjBw8hGfigGLOnBGFBAQwMKE9hOeSweLfeKI6TMmMiDkMiPk/WibvSsFWJaII73RSAwbJfNUwCIaTg3Jzb1Bs4vq+vavn7CiX7/UXTHWi71JK3ui5F2oIzR2B8D5+Y2KbBExQV4JwbVV1g7KdrFgfV+zEhU/PKdQFEQv7/iU+gwiPfD92OJwf2gdg7h1XnienGzlYH5/bLOVfEoSoBRK1gVOi9HtyoUxJ5zg/bhbCu+7JHO3vbpKQMggHl+/jITxzaXkrhFlqtNM5LzyE555B+TI8B3bNUX/4BBiBdUm14FyUSsv2rqAB947fnpqQF27vo0RL+KvlzNPRU/lKehMSlNHUPENYmOZBQt5Np1T9xe4Ij7KgqIUTl2QL2b4iRmbTWw5mDl34PGcRwkMgySDCAxCPWVNitxB3xMpiHfsSBVMmdrQaLOJXHvZLdycK69Sg+XHzEB6i8YJCKirc1F5F35lA3URiq4fwOB8HzsqTvAG6x2pR5PEQnnsGya3wkhb4uiJFS4cOYVnvGmPpSBlxDJjbQo+fWG+8ZuYupVXEkzCgDIQ9mbaeqdHC4aXTdsspTnfxteV0TfgKsonKvXT/UVW/WPN69lAV2yiPws4I73t3p4qeZ0JuM5IQfR7MERLnpA5lK4T3zqvOR4iBjvuFh/DULWSXiKsQysubVxMFPsa4dSU6OqBJibFdWIjw6IBBTkj0+ZQUlbdkDCI8NjTOYtMR3l/GZEll5znOPITnqnH7fF+fASIAbsicfIoFvZ24+FbBgw7PVReJjZ1MbIAr2pt3wjfvSJm8qZTen74k9DrwV9CIdK+YkM3fl39ZJSIY2VUBnO03LZfmTYBvd4SxeF8lGVZWsm0R3tA5+aKHiTZ1eMEU1HcxY4URDA3U9OesSAsaL4RgoO5F1MDg6kk5o+JKVLLW3PFyaqMI4ZHrciXCQ/1kysZSuf8HReeuexYX8uMRBSL3LinEn0pHeEyOn33SQoTHgG5xMqlB9M0R8EIsPdYQ3leGJhMrXjoik1dmLsJjAxE9/72v1iLk7iE8Vw3SV69lNmkJsJYdqMLOgYMnJMij0In8CvtRlzGYxyegccXhEbqH9/p4sA4KxuCbPrc5GDPwwDQ+B7px1x7z60tEQl8gkcmKikRl9pKBSVgV0UvIHQWnkeBKfmFwkj0RHrhZlCviejUDHl5KGGO0KybmpBW2EgMwG821sn37VecTJGwnMisqsxWJgXPMDdPyuFPKbU9vL/+sqaUTIGNZdbsoZXX7vAI3IjxOQaLTDEnNuoewVAn9ahFZ9QMSAfdSa7WLjxr3cD7HWoQHzRGhO399h6hbmeQo+b/YQXicm8+/WEsQhQc0GmTUakyUQR63tkQ0cyh58XA8hOeqwTwYPEfrUkdiFNVNyGchu8lI8t00M2/7S7XNbXqAEkfmjpdrsUDGdjokiET+avHeStSwNB5LN0zPFdmqXjM5J6ukVV9NmRQmjRcczOYeP4AtMFxJ7+cxIA86LTDOhgjv7+OypUb4JxIaersXXhBPGBCmkC6GjGRPSR6b5S9Ct6bowEMom8R2hDoAbpyel5TXooIl6LCrDvt/9qBpIUT/6XlU+UWtjv8Ym+1KhKfSeHyxel3+nmx0zx6s4tWY213Lg2XVV1JS0HUhDk9wZTnCY3z9tpTdr9SKTPMyilpJ48UIwsOBacdLtRcPLOJbFj5ZDLOiRBrXRKl61JLZZj2E57YBnYsCvHZtqhdTG0euLvliKBIY8wO2LOkHHFS0N8yzl1EgGzgrH8+0YB4G2O5H96XN3l5OsVg745jskXSp0DhMvqS5TafrC2m2iRtKe
2SxmUXDuWuTDLLi5L5BE78WW06rxwkYIj9j0jawm6TOkusThFDLBBrwj19Kd7glMYSr2n57LszJuGLDntTqp/u0fnsg0fTGiQwnBNLkAeNeTt4BrlvEQguTQfqHIETiALcKtCI/x/XtSidACAZ22aWdSGtGYBSma0v+IPOfp5EZ9uxAXed/P3KLSitYjPI4D3E5RzBZFy9SCYgHhAe9oLun+CmC9wwql5dwUzcXb5vv4cJHuLCrinh6eO/stOFQqCBk1L0JCXmhhUzeXwgML+YGUR0n1YSaBhi3IjCMqeGdMLWylVxeH0G/flQoQCcZ2fA7x8fIDVTTVirY8UNH3dK1JVh1qxrq7Q0gsvZLeyNZJGsZI7HXjjDywS3VDp/YsC5ViQJ5NEB6IHEoNaExa9qLuGZJ7h0YMLUHBHwgMIjwgs/t5A7Q8Jt60rWVSFz7y2Txw01cizePZJSFMh7j30uqOeTsrVGSlm9BNpCTly2JCTaLUxQgPIDJodr7U16T7wVxV37H5dA3+abxB3Y29lFY3n65GsicQ0G/4ce0U1Z1mC4Sn9JKo6nRKZhxSPr+AjOtqhIeE+A4F70IhLTZPCFFGPh8Wu1TYnPl/44xcD+G5cqBqkUjk1BUQYxqOWLAFB/B7rj0fss7IYPOCXgCF84f3pf70wTRQFP9O1oRjQ/2FkHvuDdPzDp+rJ2mnY78bvUY/QYq9ngKcMRdd1ZtSgNKBlBM5YFY+qfV2udY8IA8WBfuptQgP9enbF/ik9krqohj9p6B9jenxuxEZNE2Hn4dNrQHQIbevY7tH/EJaTe7swt6gyvRliMdUZV1n+DvlL4xdU6IjhEBRdr78TrlUy7BjEZ5APMyIxwM/ST195yu1+CtK8SWAhuw1R7tBPQJ0PUkl2grhMYhXCU6EbI16FyM8CMS7X60N9HWIxB3zAwR1GFoMmJknhXdKqYoV7SE81w5UKl5IaewK6MQ0CHmwRUJ9QyGPShBghVwUEa2WDY4qG6vu0wOTmNCDny7YcMKPqYZudHUiUXG59EtULNytHHuNXmU1HdB0oFaQpKR0QsoHiiF5FAbP52P9E8jGQ6Kn6QxYyRaPxoHBHuSVh6v4RUYQHviSauCP7k/TOL5/byp394uHMwbMzAdApPladMvm8Kvffe35HomNXz+aQflbOzdu/s4KiqefvSWJGUUUwScEJ0voFuJPSYZhmQD3RYfQDzgJNpu5aaTLR2RWAe80Tq3qjlnbypCth+n/4V7ulNwnQBDuwReHJHOcY1XJjepIC/GWXY/wGDxJ2O6mKD1R35i+pQziPF32bGsEHrwjtfCZePwn7VMUvv8wMnPShtKz2c1dXQHj3j80lqkuJbshPNDzthdq+IaiWYd3CNGd+xDeN+5IoVNQezqTSi4bMrUysjAclME8OZ4STxhkz0z746gs4nx+SkeCAEMLNyMcD+GBxm59Oj+/os3gZgM4o8JIafXxVcWAG0SVfzc8gyAVgXWKd1BeODB+cn8a/4f+cDZBWivY+uOO+OGcheA7y/3gUdMwyL4HFe16udZEgT+WXFJeMzb8645Xw6Fm8Hw2n6omG48pSHixBmknMgV3OcKz/uJp37PY1wOgUGsA3ulAungAAHZxbbp2cg7nKDOQCtqlwzP5dxQEHlleRO9CqgEwSsnYRE0+8BnSjyX+Dn13ylzCrZX7YuZzp7/hTkdwp1nMBO4UIoQopRqU01XZFPcjPAZKPTniXqvwCdcOtjUOaaJftfARIoZcT1zBH5lo7Qhn4O9js0H5NkR4DFYftGzRoyPdgPquyxCegnc69kY2dlDy+PWlAF+UDgnteKQMnPcooA2dWzBne/lLqY0CbBfkccfneAjP5QMNT3oFKBaYeHJzCJExhkCK+QSnET4Q/DMpv4WdtKq+U3VOmHVB6aU/3xQlUrrADp1T5GvHXByirHMiOSciPPBW929Oa8W/JmRnhCnOShy1OU2pE5EhI/dm/J1CKoJgap4wCgJAeRlKDcewQz93SrGb/Zo2T+MfyIFBiS12EB4DoKwAsVMuXnJuadugp/MVT8aeCA/oibyR6L7Q54J3QcrKNQgPetK+MB2NkgQnFG02NEoWHNamHFKHztZzbnoIz/0DxZMVB1mKzrvIHc54rixYltlIuwAJDKfcPjhm6b7KryrtZachPNpu6L/uIYyi3FZseJFdCBb0MdJVQ8DTZctYQvlUxhTCY9AYq3SGHXFxzKOXqTLKtkV4Stc3r7xNlMaja42sqjsQHjdCDceeUwiYqLw9PYQXEwPWjjLodNClZOFwXDG3bE3NC5DniEwe8E5JWjgR4S3bX9W9KwV6IiUJld+120X0rNrcTBnMWIr1VNlseNHdAomCVRBrCO+918Xj9IOtqgP2vZYuzMEg+fG1bY7wGI+tKJKmkLGNIbfkdIRHChP3OdXkZMOLViqCag/hxdCgXgYRzSnwDqY8Dfn055rOzGXeI9eCHzNnsJ0v2gtUrsWJCO9UYgM18R7NLtA3bVgsA3SOUX2s5jHwrpuSgwWz3e4U3Z8nVhV/QDVmxhjCU2qUEJ7SC1vtvHCwi7h5Zr4Sg3QEwqOrjLSc6B6T8pv/ODLTBTk8wm/6Z204i3CWU/J7HsKLrUE3InLkjkB4qJUSxUbO1+ibb9Fj7ZlSYo+GZa+kBJ2I8KDf/W54ZsiOV0wmCirabfVt0eU2nf3NndL8S8LMTiHTm2uPVSurtNhEeMrsB+55GuDbllexv/3SoIVjc4RHwExfHY3Dolrt7OfLIUW4gIeHvfhOmx2pyLarTnkP4cXiwJ2CYplkF7AA39CY9j7S+BHXC0xYtKcCqp+t8knAAhTwlZWh4xBep2oAHBeuAZC8LO3GLe3Wz0D6nQl4MOqI0AT7yQNpqJnYYa1xpyStleevexGegIyL+pJx7SRze9cw90OOQJUsHITwFBsPOlogIOufo3uUXcIFvbRwHqZvKWUtWM784QtANqWAAOz2EF7sDiwC4476mZH2LFLAvfto/8SoaaLeu9hH1aCtPWD54gRrwoJHBB9JEb6b4xAepxReT0iE9GnoiYjg3B0VKAVSi7fw2wJ6qNdHdIJdMjDxmQNVpdXtgYCVIRPp6os6qx7CUzNw0d4KFP8tP5XhirAQUJ0EJwluwU4IDzxB+Vuox0tG2c9bcIceHs1VtPKcy26yMHBlL0W49JbZ+e+5JlbgnYfwwuVR8HSiN9tW2mmQtDgwok8g+MG9qYgY+yrarMIb1DgQHx8dV3yxr8JxCA9ojiGE9i45+gRRaqQWDznMAkZaSxdBDmqO0eL4F3CiWHKngDBUTxUn0kN4PaK7m2bmkXyyMIuPEyNLYPDT+YqR4lCEp7qLNp2sBmSI/AzJNrnG04LpRA/fqsPWhHOIrXBHqCj/R17HQ3jeYEkMm1cAsLBJZRa5CgJBtdNFf2ASQBCGimn0t3uQ5YJdFdC2FPHOcQiPd3fkXP2dC31SURt6L354bxrG2ORQo7knIlM3Mq4Y7l00wQRocvLG0pSClqhRP3mk8TnNj64oQjef7+AhvJB0SbAvKu74XqBMFOWANiG3efSaEuTiVWXW0QiPSmX/6bm5ZbI+KlT0P9wvwTW+tAzMh4bMyVfOnNEUnVh+oBL/qv8pnngIzxso0OIfRVVU2ZZbGMgiC/Kzh9JpQrQ2psecbfCcfBQso8OdgoyCIP4/xmcLSMd2QnhMG3RnHlha+D0DpxS6Cci4o3oYBSUL4Pu6436EUaiqRH+CEb1gUDF3R7ncyE58IZLMuiZseJdaUx7CC9tjS+55VFwx4W5XIBrIG6A/fl0J0/49ApNrWyM8Br5tFF5F7tsdXYHHni1yE8JTtj3fuzsVaR64nh1dEY8TXk5rHDgrD3e+WEMvHsITUIVIX53NbrIEJbCrojhPZfb/7PE0aHH4wqBk0t2bT9U0tnZFaIv3VbQ/ta0cHyqwmqIbOwjh8f0LK9uw1bpqUg7WiuiMmIJ+UIcnm8Lh1xmBp44KF6y7aybnoBkkB6NmNnHT3/OTBy7giazi1ggF9KSieTWsKWX05yE8Le8FERkCvPuWFOJIFrl+l7NZzY8uL6LVkV+ndjzXIDzGP8ZlS+O0sup2CIjOQXiCAgVNjQNm5R94vY4lGYlNmJ42piuiEH04xXsIzxtMERhg49aWwCGIGlDAwn90XAnlUc4h+z2QC+RZeg+nbCxN9ZmGOTo7AwffqIN2c8mARBKWcqhhGcLr6LzQhE/n6ajVxZc9nslbA9iZ/uJIo3Jr107J2fGScto2B9ttOFFN4x7JQvvMNO4Umjl3ip6WWY6C4K21R/2Xj8gkKXXxTj2EJ20a+GC/BKyTCWBMTLXyoDac8GMyC/2Us1+O7ZyB8DhHlh+sElly81dJNjsN4QkeiMoQow5TaNJ04vFiVjtkTgEVYVnPrIfwvMH+/vT2cko8LXQdBCKS/uGT6eies6Oc9I8c4liT1UPFAGRzPKG+qr6DzZqYjE5MmBbcTm/9cfwpfwd4UdvYicUkhiLQ7UkgmYUPaI3814ScSA/Ew6APEyZG39+Qfup+U3NhLqcVttY0dNKmAFOKGlBnLxOT/8szpyeat4P9pa+ybceLNYNm5wMZ7Z5EH5A0YGZe3JEqOo2oI3OnLRfvNNDrnbb+905B3syum2fkfcwMgTFySzfNzNc4+k3NoyDl1s0QNIbuz7ydFfBEcT2pf2sGtoV5L2+pBfEXeH28RHqPyLIs3lN53ZRcYa1c/4BdSiJN+wIn0Wt6RehvYwVfgPGHkVlsaMZzZt+TbImw1j7w74SoniPXxF82InP61jJIn5yw9U2d0JPYr1jLXb0sc2Ya04lZx9zjR6CqT1hf+m2D6k4ewvMG7OMnVhejfMHh0dBiAtTjA0hU8GlETo+vLPrS4GTntqewSm+bVzBtcxmkExi1r6Q3vZHVRK2ZQbc8+mesQ3JdKw9VQbXh5IZibwQeeYM4lQlJKf+R5UULd1VsPV19Oqnx1YwLj/1cdvPZ7Gb+hf+kJ5E3Mn1L2dC5BQTNIBUH1gpRMkqhlDx8RRHNN+hWopGm7pTZdfat2cXxwKyLO+JnBpIMvnCnkZ9d3vji4GSQEzrk0Ci3nK45mXjhvZz978Ln1VDbZXPjlc3bWQ637Irx2V8ekuylWLwRUnabGg5s4HsW+2ZsLVt/vHr/63X4gqgNjemkNjTm2NYzTKeKh5cVAZrJ2Ck+jzc8hGcaMfxvY7KmbCqlZMb+BfVKqhHa0hYgXfdqetP2l2qAO38ZoxjubsMfyJoTCjOgWJGTV2p23oj8Y48nP8czB8y5+CglvcENMrtoxyFU8Dg3NhmwLIj31MKHtECm30hFwhse7GOZ0/bOdGJnU4r33vAQXjTyChCGfvlw+k0z8kauLiaExeUJESlaeKhBZBS1QK1lkJ/DjIH+fygCUM3Wn6gm+MAEs//0PNIMHE7e9ucNb3jDG97whjc8hGdfZQGoHrhigNsuHZ6BgTQJZMZfx2T9aVQWnC1MArCBwv7y/f+P3TqmAQAAQADU0eRGsoM3GyFIrQ4AMDwAAAwPAMDwAAAwPAAADA8AAMMDAMDwAAAwPAAAwwMAwPAAADA8AAAMDwAAwwMAMDwAAAwPAADDAwDA8AAAMDwAAMMDAMDwAAAwPAAADA8AAMMDADA8AAAMDwAAwwMAwPAAADA8AADDAwDA8AAAMDwAAAwPAADDAwAwPAAADA8AAMMDAMDwAAAwPACAi+EBAGB4AAAYHgAAhgcAgOEBABgeAACGBwCA4QEAYHgAABgeAIDhAQBgeAAAGB4AAIYHAIDhAQAYHgAAhgcAgOEBAGB4AAAYHgCA4QEAYHgAABgeAACGBwCA4QEAGB4AAIYHAIDhAQBgeAAAGB4AgOEBAGB4AAAYHgAAhgcAgOEBAGB4AACGBwCA4QEAYHgAABgeAACGBwBgeAAAGB4AAIYHAIDhAQBgeAAAhgcAgOEBAGB4AAAYHgAAhgcAYHgAABgeAACGBwCA4QEAYHgAAIYHAIDhAQBgeAAAGB4AAIYHAGB4AAAYHgAAhgcAgOEBAGB4AAAYHgCA4QEAYHgAABgeAACGBwCA4QEAGB4AAIYHAIDhAQBgeAAAGB4AgOEBAGB4AAAYHqzdOqYBAAAAENS/tRn82QgBAGB4AAAYHgCA4QEAYHgAABgeAACGBwCA4QEAGB4AAIfhAQBgeAAAGB4AgOEBAGB4AAAYHgAAhgcAgOEBAGB4AACGBwCA4QEAYHgAABgeAACGBwBgeAAAGB4AAIYHAIDhAQBgeAAAhgcAgOEBAGB4AAAYHgAAhgcAYHgAABgeAACGBwCA4QEAYHgAAIYHAIDhAQBgeAAAGB4AAIYHAGB4AAAYHgAAhgcAgOEBAGB4AAAYHgCA4QEAYHgAABgeAACGBwCA4QEAGB4AAIYHAIDhAQBgeAAAGB4AgOEBAGB4AAAYHgAAhgcAgOEBABgeAACGBwCA4QEAYHgAABgeAIDhAQBgeAAAGB4AAIYHAIDhAQAYHgAAhgcAgOEBAGB4AAAYHgAAARkyVnbp9qJvAAAAAElFTkSuQmCC",locked:(null===(c=n.video.authentication)||void 0===c?void 0:c.includes("adobe"))&&!(null!==(u=window.CBS)&&void 0!==u&&null!==(d=u.Registry)&&void 0!==d&&null!==(h=d.user)&&void 0!==h&&h.isMVPDAuthZ),logo:(null===(f=n.video.networkInfo)||void 0===f?void 0:f.logoUrlSmall)||null,
2network:(null===(p=n.video.networkInfo)||void 0===p?void 0:p.name)||null,preStartDate:n.video.schedule.preStartDate,preEndDate:n.video.schedule.preEndDate,startDate:n.video.schedule.videoStartDate,title:n.video.about.shortTitle||n.video.about.title,type:(null===(m=n.video.properties)||void 0===m?void 0:m.type)||null}}return null}).filter(e=>null!==e)}))}catch(e){return console.error("[Unexpected Response from Sink API]",e),[]}}transformDataForVideoPage(e){try{return e.data.videoMenu.order.edges.map(e=>{const t=e.node;return{rowTitle:t.title,rowId:t.id,rowDescription:t.description,rowSlug:t.slug,rowToken:t.token,rowUrl:t.url,rowLayout:t.layout,rowData:t.rowData.edges.map(e=>{let t=e.node;const n=t.video;if(!n)return{id:" ",title:" ",href:" "};const i="function"==typeof structuredClone?structuredClone(n):JSON.parse(JSON.stringify(n));return{id:t.id,dmaStation:t.dmaStation,featured:t.featured,order:t.order,video:i}})}})}catch(e){return console.error("[Unexpected Response from Sink API]",e),[]}}}const cN=JSON.parse('{"carouselTitle":"Comedies","carouselSlides":[{"href":"/shows/ghosts/","id":"bc0a4f05-c241-4fb4-8065-888382692497","image":"https://stage-wwwimage-tve.cbsstatic.com/base/files/show_asset/37/76/66/31/75/86/show_asset_bc0a4f05-c241-4fb4-8065-888382692497.jpg","title":"Ghosts"},{"href":"/shows/georgie-and-mandys-first-marriage/","id":"73e5a111-886d-4a69-9b81-a1c1d406682c","image":"https://stage-wwwimage-tve.cbsstatic.com/base/files/show_asset/38/56/93/38/56/93/show_asset_73e5a111-886d-4a69-9b81-a1c1d406682c.jpg","title":"Georgie & Mandy\'s First Marriage"},{"href":"/shows/after-midnight/","id":"18f26351-3175-4374-bcd0-d976cb3e90f7","image":"https://stage-wwwimage-tve.cbsstatic.com/base/files/show_asset/31/57/58/98/29/39/show_asset_18f26351-3175-4374-bcd0-d976cb3e90f7.jpg","title":"After Midnight"},{"href":"/shows/poppas-house/","id":"2aac85ec-8bd1-48ae-8323-820bb33852f2","image":"https://stage-wwwimage-tve.cbsstatic.com/base/files/show_asset/31/73/22/97/85/97/show_asset_2aac85ec-8bd1-48ae-8323-820bb33852f2.jpg","title":"Poppa\'s House"},{"href":"/shows/the-neighborhood/","id":"7323b722-1c4c-41fd-91c4-7cbaf900f5a9","image":"https://stage-wwwimage-tve.cbsstatic.com/base/files/show_asset/18/24/62/01/26/38/show_asset_7323b722-1c4c-41fd-91c4-7cbaf900f5a9.jpg","title":"The Neighborhood"},{"href":"/shows/the-late-show-with-stephen-colbert/","id":"293bc15d-9c43-4fe4-a803-703f7647e824","image":"https://stage-wwwimage-tve.cbsstatic.com/base/files/show_asset/67/85/13/show_asset_293bc15d-9c43-4fe4-a803-703f7647e824.jpg","title":"The Late Show with Stephen Colbert"}]}'),uN=JSON.parse('{"carouselTitle":"Dramas","carouselSlides":[{"href":"/shows/matlock/","id":"c5661a15-ffcb-42ad-be4b-762ad810ee3a","image":"https://stage-wwwimage-tve.cbsstatic.com/base/files/show_asset/09/01/91/09/01/91/show_asset_c5661a15-ffcb-42ad-be4b-762ad810ee3a.jpg","title":"Matlock"},{"href":"/shows/tracker/","id":"cffc3675-6304-424f-871b-5721965bbc4e","image":"https://stage-wwwimage-tve.cbsstatic.com/base/files/show_asset/57/47/45/84/60/32/show_asset_cffc3675-6304-424f-871b-5721965bbc4e.jpg","title":"Tracker"},{"href":"/shows/elsbeth/","id":"f15cba4b-32b3-4754-818f-c970cc89c1f4","image":"https://stage-wwwimage-tve.cbsstatic.com/base/files/show_asset/14/75/84/71/91/80/show_asset_f15cba4b-32b3-4754-818f-c970cc89c1f4.jpg","title":"Elsbeth"},{"href":"/shows/ncis-origins/","id":"bd9cf357-71e1-48c6-bfbb-16c9fbab05b7","image":"https://stage-wwwimage-tve.cbsstatic.com/base/files/show_asset/91/02/19/91/02/19/show_asset_bd9cf357-71e1-48c6-bfbb-16c9fbab05b7.jpg","title":"NCIS: Origins"},{"href":"/shows/watson/","id":"9e6bbade-a148-40d5-843f-a1302c223d8e","image":"https://stage-wwwimage-tve.cbsstatic.com/base/files/show_asset/27/77/21/27/77/21/show_asset_9e6bbade-a148-40d5-843f-a1302c223d8e.jpg","title":"Watson"},{"href":"/shows/ncis/","id":"f7e025f8-5fe4-4ee6-80bf-cdc39205b350","image":"https://stage-wwwimage-tve.cbsstatic.com/base/files/show_asset/18/41/10/59/23/52/show_asset_f7e025f8-5fe4-4ee6-80bf-cdc39205b350.jpg","title":"NCIS"},{"href":"/shows/fbi/","id":"09d2fbf0-94a3-4e6d-820d-55282727d927","image":"https://stage-wwwimage-tve.cbsstatic.com/base/files/show_asset/00/30/21/96/79/78/show_asset_09d2fbf0-94a3-4e6d-820d-55282727d927.jpg","title":"FBI"},{"href":"/shows/the-equalizer/","id":"0f549886-172c-4c50-b3a3-0383aac6a4a4","image":"https://stage-wwwimage-tve.cbsstatic.com/base/files/show_asset/69/36/44/27/21/94/show_asset_0f549886-172c-4c50-b3a3-0383aac6a4a4.jpg","title":"The Equalizer"}]}'),dN=JSON.parse('{"carouselTitle":"On Now","carouselSlides":[{"duration":"11:30am - 12:30pm (20m left)","href":"/live-tv/stream/","id":"local-affiliate","rowName":"Live Local TV","channelCode":"WTVF","rowSlug":"wtvf","image":"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w500-q80/listings/api-managed/assets/p183904_b_h8_ai.jpg","locked":true,"logo":"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w370-q80/local_affiliate/wtvf_white_348x144.png","title":"The Young and the Restless","description":"Drama unfolds in Genoa City as rivalries and secrets test loyalties in the Newman and Abbott families.","rating":"TV-PG","type":"live-linear","endTimestamp":1787097148828,"startTimestamp":1787097148828},{"duration":"11:00am - 12:00pm (9m left)","href":"/live-tv/stream/cbs-news/","id":"cbs-news","rowName":"CBS News 24/7","rowSlug":"cbs-news","image":"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w500-q80/listings/api-managed/assets/p27733200_b_h8_aa.jpg","logo":"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w370-q80/channel/cbsn247stacked_white_348x144.png","title":"CBS News 24/7","description":"Coverage, reporting and storytelling from CBS News and Stations.","rating":"TV-G","type":"live-linear","endTimestamp":2418231720000,"startTimestamp":2418231720000}
2,{"duration":"11:00am - 2:00pm (1h 50m left)","href":"/live-tv/stream/cbssportshq/","id":"cbssportshq","rowName":"CBS Sports HQ","rowSlug":"cbssportshq","image":"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w500-q80/listings/api-managed/assets/p22091505_b_h8_ae.jpg","logo":"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w370-q80/channel/cbssports_white_348x144.png","title":"Midday Rundown","description":"The latest scores, highlights and analysis from around the world of sports.","rating":"TV-G","type":"live-linear","endTimestamp":2418231720001,"startTimestamp":2418231720001},{"duration":"10:59am - 11:59am (10m left)","href":"/live-tv/stream/48-hours-channel/","id":"48-hours-channel","rowName":"48 Hours","rowSlug":"48-hours-channel","image":"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w500-q80/listings/api-managed/assets/p10613741_e_h10_aa.jpg","logo":"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w370-q80/channel/03/21/49/25b5ff5e-eef1-4c30-992f-f16427ddd207.png","title":"48 Hours","description":"A police investigation on victims contacted through ads they had placed on the website Craigslist.","rating":"TV-14","type":"live-linear","endTimestamp":2418231720002,"startTimestamp":2418231720002},{"duration":"11:00am - 1:00pm (50m left)","href":"/live-tv/stream/golazo/","id":"golazo","rowName":"CBS Sports Golazo","rowSlug":"golazo","image":"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w500-q80/listings/api-managed/assets/p24370982_b_h10_ad.jpg","logo":"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w370-q80/channel/04/83/04/767f2fcd-f794-4614-9458-78a77cae2e64.png","title":"Morning Footy","description":"Start the day with top soccer headlines, goals and match previews from CBS Sports Golazo Network.","rating":"TV-G","type":"live-linear","endTimestamp":2418231720003,"startTimestamp":2418231720003},{"duration":"11:30am - 12:00pm (9m left)","href":"/live-tv/stream/inside-edition/","id":"inside-edition","rowName":"Inside Edition","rowSlug":"inside-edition","image":"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w500-q80/listings/api-managed/assets/p27544503_b_h8_aa.jpg","logo":"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w370-q80/channel/insde_white_348x144.png","title":"Can\'t Miss","description":"The most buzzworthy entertainment and human-interest stories you need to see today.","rating":"TV-PG","type":"live-linear","endTimestamp":2418231720004,"startTimestamp":2418231720004,"seasonNumber":"2","episodeNumber":"7","episodeTitle":"Can\'t Miss"},{"duration":"11:00am - 12:02pm (7m left)","href":"/live-tv/stream/60-minutes-channel/","id":"60-minutes-channel","rowName":"60 Minutes","rowSlug":"60-minutes-channel","image":"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w500-q80/listings/api-managed/assets/p184224_b_h8_aa.jpg","logo":"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w370-q80/channel/96/67/66/6338b4ec-c9b5-47be-bba2-6711b8c7db79.png","title":"60 Minutes","description":"Hard-hitting investigative reports and in-depth interviews on the stories shaping the week.","rating":"TV-PG","type":"live-linear","endTimestamp":2418231720005,"startTimestamp":2418231720005,"seasonNumber":"2","episodeNumber":"7","episodeTitle":"Reports From The Field"},{"duration":"11:30am - 12:00pm (9m left)","href":"/live-tv/stream/etl/","id":"etl","rowName":"ET Live","rowSlug":"etl","image":"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w500-q80/listings/api-managed/assets/p19152987_b_h8_ac.jpg","logo":"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w370-q80/channel/et_white_348x144.png","title":"ET Interview","description":"Exclusive conversations with stars and creators behind Hollywood\'s biggest movies and shows.","rating":"TV-PG","type":"live-linear","endTimestamp":2418231720008,"startTimestamp":2418231720008,"seasonNumber":"2","episodeNumber":"7","episodeTitle":"Celebrity Interviews With Leonardo DiCaprio"},{"duration":"10:00am - 12:00pm (9m left)","href":"/live-tv/stream/uefa-champions-league-channel/5e42f1f2-cfb3-492e-86a0-b9aa59e23c48/","id":"uefa-champions-league-channel","rowName":"UEFA Champions League","rowSlug":"uefa-champions-league-channel","image":"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w500-q80/listings/api-managed/assets/p27275095_b_h8_ac.jpg","logo":"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w370-q80/channel/04/86/83/4d6a4f18-1ea2-4d41-9a6f-dd255367e21b.png","title":"UCL Match Replay","description":"Relive a classic UEFA Champions League match with full commentary and extended highlights.","rating":"TV-G","type":"live-linear","endTimestamp":2418231720008,"startTimestamp":2418231720008,"seasonNumber":"2","episodeNumber":"7","episodeTitle":"UEFA Champions League Match Replay"},{"duration":"11:27am - 1:00pm (50m left)","href":"/live-tv/stream/car-chase/","id":"car-chase","rowName":"Car Chase","rowSlug":"car-chase","image":"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w500-q80/listings/api-managed/assets/p27967661_b_h8_ab.jpg","logo":"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w370-q80/channel/88/01/96/ce80dc2e-ebf8-489e-a730-6ad58284f62e.png","title":"Car Chase","description":"Real police pursuits and high-speed chases captured as officers work to end dangerous situations.","rating":"TV-MA","type":"live-linear","endTimestamp":2418231720008,"startTimestamp":2418231720008,"seasonNumber":"2","episodeNumber":"7","episodeTitle":"Karaoke Affair Gone Haywire!; Water-Tortured Girlfriend?"}]}'),hN=JSON.parse('{"carouselTitle":"Keep Watching","carouselSlides":[{"episode":1,"href":"/shows/vmas/","id":"588e1777-f9bf-4031-aa06-48e908b6f70f","image":"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w400-q80/show_asset/28/33/87/28/33/87/show_asset_588e1777-f9bf-4031-aa06-48e908b6f70f.jpg","progress":79,"season":2025,"startDate":1757203200,"title":"2025 MTV Video Music Awards"},{"episode":11,"href":"/shows/matlock/","id":"5f11a2ce-7180-4c40-8783-21392ce6203d","image":"https://thumbnails.cbsig.net/_x/w400/CBS_Production_Entertainment_VMS/2024/12/28/2398413379560/PPCBS_MATLOCK_111_UHD_3096861_1920x1080.jpg","progress":63,"season":1,"startDate":1739404800,"title":"Matlock"},{"episode":1,"href":"/shows/amazing_race/","id":"009f7de6-4c77-4077-92c9-3f8566d987b2","image":"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w400-q80/show_asset/67/06/90/61/48/36/show_asset_009f7de6-4c77-4077-92c9-3f8566d987b2.jpg","progress":4,"season":37,"startDate":1741132800,"title":"The Amazing Race"}
2,{"episode":1,"href":"/shows/tracker/","id":"64049ee1-30e4-4cf1-85f6-b6f3460d106b","image":"https://thumbnails.cbsig.net/_x/w400/CBS_Production_Entertainment_VMS/2024/10/03/2377640515509/PPCBS_TRACKER_201_UHD_V1_2944828_1920x1080.jpg","progress":19,"season":2,"startDate":1728777600,"title":"Tracker"},{"episode":27,"href":"/shows/big_brother/","id":"64996748-385f-4b6f-a644-666640e5ccc9","image":"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w400-q80/show_asset/08/05/55/30/13/78/show_asset_64996748-385f-4b6f-a644-666640e5ccc9.jpg","progress":5,"season":25,"startDate":1696464000,"title":"Big Brother"},{"episode":22,"href":"/shows/ghosts/","id":"d03ce40f-e0b2-466d-8c0c-a63af13587a2","image":"https://thumbnails.cbsig.net/_x/w400/CBS_Production_Entertainment_VMS/2023/04/15/2194250307725/PPCBS_GHOSTSUS_222_UHD_2202446_1920x1080.jpg","season":2,"startDate":1683763200,"title":"Ghosts"},{"episode":15,"href":"/shows/the-equalizer/","id":"406702d3-42de-47df-b9cd-9c311078468f","image":"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w400-q80/show_asset/69/36/72/27/10/94/show_asset_406702d3-42de-47df-b9cd-9c311078468f.jpg","progress":91,"season":3,"startDate":1682208000,"title":"The Equalizer"},{"episode":6,"href":"/shows/fire-country/","id":"c45ec622-5b17-4b57-9771-16af5ef87147","image":"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w400-q80/show_asset/90/96/70/49/35/33/show_asset_c45ec622-5b17-4b57-9771-16af5ef87147.jpg","progress":67,"season":1,"startDate":1668729600,"title":"Fire Country"},{"episode":19,"href":"/shows/ncis-hawaii/","id":"ncish_us_s03_thm_16x9_1920x1080_nb_0","image":"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w400-q80/show_asset/36/86/45/ncish_us_s03_thm_16x9_1920x1080_nb_0.jpg","progress":37,"season":2,"startDate":1682899200,"title":"NCIS: Hawai\'i"},{"episode":20,"href":"/shows/the-neighborhood/","id":"015eb0fb-e38b-45f1-9635-9f3b7e821841","image":"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w400-q80/show_asset/18/19/00/01/20/93/show_asset_015eb0fb-e38b-45f1-9635-9f3b7e821841.jpg","progress":35,"season":5,"startDate":1683504000,"title":"The Neighborhood"},{"episode":19,"href":"/shows/ncis/","id":"3a2020d9-c461-472a-9650-71b3f793cf24","image":"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w400-q80/show_asset/18/41/37/59/14/51/show_asset_3a2020d9-c461-472a-9650-71b3f793cf24.jpg","progress":14,"season":20,"startDate":1682899200,"title":"NCIS"},{"episode":20,"href":"/shows/fbi/","id":"ce315469-fdf1-448e-b2bb-eec051388d3b","image":"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w400-q80/show_asset/00/30/46/96/74/53/show_asset_ce315469-fdf1-448e-b2bb-eec051388d3b.jpg","progress":3,"season":5,"startDate":1682380800,"title":"FBI"}]}'),fN=JSON.parse('{"carouselTitle":"NBA Games","carouselSlides":[{"href":"https://www.cbssports.com/nba/","id":"Suns Vs. Thunder","image":"https://www.cbssports.com/_next/image?url=https%3A%2F%2Fsportshub.cbsistatic.com%2Fi%2F2025%2F07%2F23%2Fd1ef64f3-42d6-47a4-a8fd-f1512709d4d4%2Fgettyimages-2207887704.jpg%3Fwidth%3D400%26crop%3D16%3A9%2Csmart&w=1920&q=75","startDate":1760130000,"subscriptionRequired":true,"title":"Suns Vs. Thunder"},{"href":"https://www.cbssports.com/nba/","id":"Lakers Vs. Warriors","image":"https://www.cbssports.com/_next/image?url=https%3A%2F%2Fsportshub.cbsistatic.com%2Fi%2F2025%2F07%2F23%2F4d13028d-54fc-4ff1-8584-310208f60adb%2Fgettyimages-2212935341.jpg%3Fwidth%3D400%26crop%3D16%3A9%2Csmart&w=1920&q=75","startDate":1760140800,"subscriptionRequired":true,"title":"Lakers Vs. Warriors"},{"href":"https://www.cbssports.com/nba/","id":"Spurs Vs. Hawks","image":"https://www.cbssports.com/_next/image?url=https%3A%2F%2Fsportshub.cbsistatic.com%2Fi%2F2025%2F08%2F04%2F17536a03-51f6-46d2-987e-193c375b6b40%2Fgettyimages-2221340313.jpg%3Fwidth%3D400%26crop%3D16%3A9%2Csmart&w=1920&q=75","startDate":1760202000,"subscriptionRequired":true,"title":"Spurs Vs. Hawks"},{"href":"https://www.cbssports.com/nba/","id":"Celtics Vs. Mavericks","image":"https://www.cbssports.com/_next/image?url=https%3A%2F%2Fsportshub.cbsistatic.com%2Fi%2F2025%2F08%2F08%2F38c09e05-25b1-4972-aa2e-89552b79515f%2Fgettyimages-2214780145.jpg%3Fwidth%3D400%26crop%3D16%3A9%2Csmart&w=1920&q=75","startDate":1760211000,"subscriptionRequired":true,"title":"Celtics Vs. Mavericks"},{"href":"https://www.cbssports.com/nba/","id":"Pistons Vs. Knicks","image":"https://www.cbssports.com/_next/image?url=https%3A%2F%2Fsportshub.cbsistatic.com%2Fi%2F2025%2F08%2F22%2Fca9d966a-6e85-460b-9ab5-4e1259164065%2Fgettyimages-2211843304.jpg%3Fwidth%3D400%26crop%3D16%3A9%2Csmart&w=1920&q=75","startDate":1760220000,"subscriptionRequired":true,"title":"Pistons Vs. Knicks"},{"href":"https://www.cbssports.com/nba/","id":"Nuggets Vs. Rockets","image":"https://sportshub.cbsistatic.com/i/r/2025/09/24/8628aebb-ee92-4009-8c87-95e7ab00d64e/thumbn
2ail/370x208/f774acfa9279bc88983175bef5befbc3/nuggets-getty.png","startDate":1760229000,"subscriptionRequired":true,"title":"Nuggets Vs. Rockets"},{"href":"https://www.cbssports.com/nba/","id":"Timberwolves Vs. Hornets","image":"https://sportshub.cbsistatic.com/i/r/2025/09/24/f06a9f1c-174b-4e03-a92f-8cb9a5e1b932/thumbnail/370x208/68e990505b42a0afe6528e82534a729b/wolves-getty.png","startDate":1760295600,"subscriptionRequired":true,"title":"Timberwolves Vs. Hornets"},{"href":"https://www.cbssports.com/nba/","id":"Clippers Vs. Kings","image":"https://sportshub.cbsistatic.com/i/r/2025/09/24/96b6485a-8cd7-4bb3-bda1-14d2d99b96ad/thumbnail/370x208/4d66e3fb4c7be308a740318191648ce1/kawhi-getty-7.png","startDate":1760302800,"subscriptionRequired":true,"title":"Clippers Vs. Kings"}]}'),pN=JSON.parse('{"carouselTitle":"Latest Full Episodes","carouselSlides":[{"episode":9,"href":"/shows/video/GQ9cqgUWqVleJ5jbSpsWM3ri7zo1ZT8u/?p=1","id":"GQ9cqgUWqVleJ5jbSpsWM3ri7zo1ZT8u","image":"https://thumbnails.cbsig.net/_x/w400/CBS_Production_Entertainment_VMS/2025/09/06/2449672259710/COLBERT_1701_IMAGE_3381482_1920x1080.jpg","season":11,"startDate":1758067200,"title":"The Late Show with Stephen Colbert"},{"episode":32,"href":"/shows/video/Oy7Tu361qhYMQHTrNKYWbu_AB3vTJVrX/?p=2","id":"Oy7Tu361qhYMQHTrNKYWbu_AB3vTJVrX","image":"https://thumbnails.cbsig.net/_x/w400/CBS_Production_Entertainment_VMS/2025/07/03/2437176387762/BIG_BROTHER_2732_1920x1080_3381308_1920x1080.jpg","season":27,"startDate":1758067200,"title":"Big Brother"},{"episode":253,"href":"/shows/video/CY0rJTWtHczJjnu2laqY1Sup8ncALEBz/?p=3","id":"CY0rJTWtHczJjnu2laqY1Sup8ncALEBz","image":"https://thumbnails.cbsig.net/_x/w400/CBS_Production_News_VMS/2025/09/02/2448497731942/0917_EN_FULL_4050570_1920x1080.jpg","season":2025,"startDate":1758067200,"title":"CBS Evening News"},{"episode":3,"href":"/shows/video/BXary_jUr_G10myG29WhzlRwyOITebAv/?p=4","id":"BXary_jUr_G10myG29WhzlRwyOITebAv","image":"https://thumbnails.cbsig.net/_x/w400/CBS_Production_Entertainment_VMS/2025/09/10/2450664003772/PPCBS_THEBOLDANDTHEBEAUTIFUL_9612_3377632_1920x1080.jpg","season":39,"startDate":1758067200,"title":"The Bold and the Beautiful"},{"episode":242,"href":"/shows/video/qTSJm3Ybttng94QOBmGY2eUAvVx_YN_d/?p=5","id":"qTSJm3Ybttng94QOBmGY2eUAvVx_YN_d","image":"https://thumbnails.cbsig.net/_x/w400/CBS_Production_Entertainment_VMS/2025/09/08/2450119747551/PPCBS_THEYOUNGANDTHERESTLESS_13212_3373302_1920x1080.jpg","season":52,"startDate":1758067200,"title":"The Young and the Restless"},{"episode":131,"href":"/shows/video/nvNfw0lOnr2C2oK2BldVVFkElxlFNmNr/?p=6","id":"nvNfw0lOnr2C2oK2BldVVFkElxlFNmNr","image":"https://thumbnails.cbsig.net/_x/w400/CBS_Production_Entertainment_VMS/2025/09/08/2450090563824/PPCBS_BEYONDTHEGATES_131_3372658_1920x1080.jpg","season":1,"startDate":1758067200,"title":"Beyond the Gates"},{"episode":8,"href":"/shows/video/sv2Xn8zKNErObMdz9vbGAMW56tiHOTZn/?p=7","id":"sv2Xn8zKNErObMdz9vbGAMW56tiHOTZn","image":"https://thumbnails.cbsig.net/_x/w400/CBS_Production_Entertainment_VMS/2025/09/06/2449663555622/COLBERT_1700_IMAGE_3379412_1920x1080.jpg","season":11,"startDate":1757980800,"title":"The Late Show with Stephen Colbert"},{"episode":252,"href":"/shows/video/ewgizuZjjXlRFEBYOzSvTGsbZEUQnTsm/?p=8","id":"ewgizuZjjXlRFEBYOzSvTGsbZEUQnTsm","image":"https://thumbnails.cbsig.net/_x/w400/CBS_Production_News_VMS/2025/09/02/2448497731924/0916_EN_FULL_4047612_1920x1080.jpg","season":2025,"startDate":1757980800,"title":"CBS Evening News"},{"episode":2,"href":"/shows/video/x47YbncdYqltJjQnnXbgJd9L9fd9uTQX/?p=9","id":"x47YbncdYqltJjQnnXbgJd9L9fd9uTQX","image":"https://thumbnails.cbsig.net/_x/w400/CBS_Production_Entertainment_VMS/2025/09/10/2450664515670/PPCBS_THEBOLDANDTHEBEAUTIFUL_9611_3372421_1920x1080.jpg","season":39,"startDate":1757980800,"title":"The Bold and the Beautiful"},{"episode":130,"href":"/shows/video/9qDdYCxhTSNmSOgHnNTl9g808AyPtQ8E/?p=10","id":"9qDdYCxhTSNmSOgHnNTl9g808AyPtQ8E/","image":"https://thumbnails.cbsig.net/_x/w400/CBS_Production_Entertainment_VMS/2025/09/08/2450090563822/PPCBS_BEYONDTHEGATES_130_3372663_1920x1080.jpg","season":1,"startDate":1757980800,"title":"Beyond the Gates"},{"episode":241,"href":"/shows/video/3RVp9AEIkEMOnBZBYXnYC_rEU5Z1GyDX/?p=11","id":"3RVp9AEIkEMOnBZBYXnYC_rEU5Z1GyDX/","image":"https://thumbnails.cbsig.net/_x/w400/CBS_Production_Entertainment_VMS/2025/09/08/2450111555868/PPCBS_THEYOUNGANDTHERESTLESS_13211_3372627_1920x1080.jpg","season":52,"startDate":1757980800,"title":"The Young and the Restless"},{"episode":251,"href":"/shows/video/PpW_LK_PRExyhYeKa4HR4I__hiYx_Gr0/?p=12","id":"PpW_LK_PRExyhYeKa4HR4I__hiYx_Gr0/","image":"https://thumbnails.cbsig.net/_x/w400/CBS_Production_News_VMS/2025/09/02/2448493123832/0915_EN_FULL_4044955_1920x1080.jpg","season":2025,"startDate":1757894400,"title":"CBS Evening News"}]}'),mN=JSON.parse('{"carouselSlides":[{"duration":"12min","href":"/shows/video/zkGp5F7it3sByu0RCdXWgHed4ySdwv85/?p=1","id":"zkGp5F7it3sByu0RCdXWgHed4ySdwv85","image":"https://thumbnails.cbsig.net/_x/w400/CBS_Production_Entertainment_VMS/2025/09/23/2452931139698/COLBERT_1703_CLIP2_MONO_CAN_3387015_1920x1080.jpg","title":"Disney Reinstates Jimmy Kimmel | The Rapture Is Here | Trump\'s Border Czar Caught Taking $50k Bribe"},{"duration":"2min","href":"/shows/video/y5m8e7oE_X0L1GOYFsl5H6utNTkZCFv5/?p=2","id":"y5m8e7oE_X0L1GOYFsl5H6utNTkZCFv5","image":"https://thumbnails.cbsig.net/_x/w400/CBS_Production_Entertainment_VMS/2025/09/23/2452935235690/COLBERT_1703_CLIP6_Kelly2_CAN_3387098_1920x1080.jpg","title":"Sen. Mark Kelly On The Existence Of Alien Life, And His Plans For 2028"},{"duration":"8min","href":"/shows/video/uNF9HTzah7TzlMyn0P_KwkXclj2dZDVM/?p=3","id":"uNF9HTzah7TzlMyn0P_KwkXclj2dZDVM","image":"https://thumbnails.cbsig.net/_x/w400/CBS_Production_Entertainment_VMS/2025/09/23/2452934211838/COLBERT_1703_CLIP3_Johansson_CAN_3387097_1920x1080.jpg","title":"\\"It Was Transformative For Me\\" - Scarlett Johansson On Working With Robert Redford"},{"duration":"1min","href":"/shows/video/ora4EM6QLU87_TtK_PQPwiCxxQfqlwXw/?p=4","
2id":"ora4EM6QLU87_TtK_PQPwiCxxQfqlwXw","image":"https://thumbnails.cbsig.net/_x/w400/CBS_Production_Entertainment_VMS/2025/09/23/2452931139697/COLBERT_1703_CLIP1_Cold_3387012_1920x1080.jpg","title":"\\"If It Is Wrong, It\'s Fine\\""},{"duration":"4min","href":"/shows/video/KlcsSwxyjahzxmvklqY8zA8835uhtTC_/?p=5","id":"KlcsSwxyjahzxmvklqY8zA8835uhtTC_","image":"https://thumbnails.cbsig.net/_x/w400/CBS_Production_Entertainment_VMS/2025/09/23/2452934211839/COLBERT_1703_CLIP4_Johansson2_CAN_3387096_1920x1080.jpg","title":"A Friendship Based On A Lie, And The Importance Of Pickles - Scarlett Johansson On Her New Film"},{"duration":"11min","href":"/shows/video/FuGzNsUbWTP76jtjMh4eB0wY262y25lc/?p=6","id":"FuGzNsUbWTP76jtjMh4eB0wY262y25lc","image":"https://thumbnails.cbsig.net/_x/w400/CBS_Production_Entertainment_VMS/2025/09/23/2452935235689/COLBERT_1703_CLIP5_Kelly_CAN_3387095_1920x1080.jpg","title":"This Is A Fight Over The Cost Of Your Healthcare - Sen. Kelly On A Potential Government Shutdown"},{"duration":"5min","href":"/shows/video/YCa9_RifCKy_4PJUeSvjgT56rNlHbH1e/?p=7","id":"YCa9_RifCKy_4PJUeSvjgT56rNlHbH1e","image":"https://thumbnails.cbsig.net/_x/w400/CBS_Production_Entertainment_VMS/2025/09/19/2452434499647/laila__hori_thum_3383340_1920x1080.jpg","title":"âIf U Don\'t Know By Nowâ - Laila! for #LateShowMeMusic"}]}'),gN=JSON.parse('{"carouselTitle":"CBS Sports","carouselLayout":"fouracross","carouselSlides":[{"channel":"March Madness","href":"https://www.cbssports.com/nba/","id":"Bluejays Vs. Musketeers","image":"/images/bluejays-vs-musketeers.png","logo":"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w370-q80/local_affiliate/wtvf_white_348x144.png","startDate":1764370800,"endDate":1764379800,"title":"Bluejays Vs. Musketeers","type":"live"},{"channel":"Golazo","href":"https://www.cbssports.com/nba/","id":"Carabao Cup","image":"/images/carabao-cup.jpg","logo":"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w370-q80/channel/04/83/04/767f2fcd-f794-4614-9458-78a77cae2e64.png","startDate":1764379800,"endDate":1764388800,"title":"Carabao Cup","type":"live"},{"channel":"UEFA Champions League","href":"https://www.cbssports.com/nba/","id":"Juventus Vs. Inter Milan","image":"/images/juventus-vs-inter-milan.png","logo":"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w370-q80/channel/04/86/83/4d6a4f18-1ea2-4d41-9a6f-dd255367e21b.png","startDate":1764450000,"endDate":1764460800,"title":"Juventus Vs. Inter Milan","type":"live"},{"channel":"CBS Sports HQ","href":"https://www.cbssports.com/nba/","id":"Midday Rundown","image":"/images/midday-rundown.jpg","logo":"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w370-q80/channel/cbssports_white_348x144.png","startDate":1763161200,"endDate":1764993600,"title":"Midday Rundown","type":"live-linear"},{"channel":"Golazo","href":"https://www.cbssports.com/nba/","id":"New Mexico United Vs. Detroic City FC","image":"/images/new-mexico-united-vs-detroit-city-fc.png","logo":"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w370-q80/channel/04/83/04/767f2fcd-f794-4614-9458-78a77cae2e64.png","startDate":1764460800,"endDate":1765984600,"title":"New Mexico United Vs. Detroic City FC","type":"live"},{"channel":"NBA TV","href":"https://www.cbssports.com/nba/","id":"Timberwolves Vs. Hornets","image":"https://sportshub.cbsistatic.com/i/r/2025/09/24/f06a9f1c-174b-4e03-a92f-8cb9a5e1b932/thumbnail/370x208/68e990505b42a0afe6528e82534a729b/wolves-getty.png","logo":"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w370-q80/channel/cbssports_white_348x144.png","startDate":1764984600,"endDate":1764993600,"title":"Timberwolves Vs. Hornets","type":"live"}]}'),vN=JSON.parse('{"carouselTitle":"Trending Shows","carouselSlides":[{"href":"/shows/big_brother/","id":"50755235-7c39-4b1e-aaae-926d9e5524de","image":"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w370-q80/show_asset/08/05/34/30/14/45/show_asset_50755235-7c39-4b1e-aaae-926d9e5524de.jpg","title":"Big Brother"},{"href":"/shows/matlock/","id":"c1ff8c8b-6089-4253-9842-65d860579c44","image":"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w370-q80/show_asset/09/01/95/11/53/84/show_asset_f210b02a-512e-4802-9e8c-20c5ecba09c5.jpg","title":"Matlock"}
2,{"href":"/shows/tracker/","id":"cffc3675-6304-424f-871b-5721965bbc4e","image":"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w370-q80/show_asset/57/47/45/03/04/62/show_asset_c898b39a-bb81-4cd1-8943-b61af2a01fc9.jpg","title":"Tracker"},{"href":"/shows/the_young_and_the_restless/","id":"3f55a8be-5733-4769-ae92-6cdcea9bbd0a","image":"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w370-q80/show_asset/26/33/57/49/05/62/show_asset_3f55a8be-5733-4769-ae92-6cdcea9bbd0a.jpg","title":"The Young and the Restless"},{"href":"/shows/the_bold_and_the_beautiful/","id":"71f063b8-3d1c-4d42-b37e-587f6f969e1b","image":"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w370-q80/show_asset/75/99/69/48/82/03/show_asset_71f063b8-3d1c-4d42-b37e-587f6f969e1b.jpg","title":"The Bold and the Beautiful"},{"href":"/shows/beyond-the-gates/","id":"009d94b0-8563-4b1d-adea-8e235235d6f7","image":"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w370-q80/show_asset/61/63/22/61/63/22/show_asset_009d94b0-8563-4b1d-adea-8e235235d6f7.jpg","title":"Beyond the Gates"},{"href":"/shows/watson/","id":"9e6bbade-a148-40d5-843f-a1302c223d8e","image":"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w370-q80/show_asset/27/77/25/16/87/34/show_asset_49afef3c-c6fe-453c-9601-70711e30ee7c.jpg","title":"Watson"},{"href":"/shows/elsbeth/","id":"f15cba4b-32b3-4754-818f-c970cc89c1f4","image":"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w370-q80/show_asset/14/75/84/24/87/88/show_asset_1db85a78-c812-41c1-b9e8-f9518eaf927f.jpg","title":"Elsbeth"},{"href":"/shows/ghosts/","id":"bc0a4f05-c241-4fb4-8065-888382692497","image":"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w370-q80/show_asset/37/76/66/31/75/86/show_asset_bc0a4f05-c241-4fb4-8065-888382692497.jpg","title":"Ghosts"},{"href":"/shows/ncis/","id":"f7e025f8-5fe4-4ee6-80bf-cdc39205b350","image":"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w370-q80/show_asset/18/41/10/59/23/52/show_asset_f7e025f8-5fe4-4ee6-80bf-cdc39205b350.jpg","title":"NCIS"}]}');class yN{constructor(){this.carouselDataMap={dataComedies:[cN],dataDramas:[uN],dataFastChannels:[dN],dataKeepWatching:[hN],dataNba:[fN],dataLatestFullEpisodes:[pN],dataLatestShowClips:[mN],dataLiveAndUpcomingSample:[gN],dataTrendingShows:[vN]}}getData(e){return this.carouselDataMap[e]}}const bN={carouselTitle:"Â ",carouselSlides:Array.from({length:8},(e,t)=>({href:"#",id:"placeholder-".concat(t),image:Rb,startDate:0,title:"Â "}))};function AN(e){const t=function(e){const t=(0,v.useState)(()=>"string"==typeof e?null:e),n=(0,x.A)(t,2),i=n[0],r=n[1],a=(0,v.useState)(null),o=(0,x.A)(a,2),s=o[0],l=o[1];return(0,v.useEffect)(()=>{if("string"!=typeof e)return r(e),void l(null);let t=!0;return r(null),l(null),async function(e){return Kb[e]?Kb[e]:oN(e)}(e).then(e=>{t&&r(e)}).catch(e=>{console.log("[Error fetching Carousel Config]",e),t&&(r(null),l(e))}),()=>{t=!1}},[e]),{resolvedConfig:i,resolveError:s}}(e.carouselConfig),n=t.resolvedConfig,i=t.resolveError,r=function(e){let t=e.carouselType,n=e.additionalQueryVariables,i=e.isReadyToFetch,r=void 0===i||i,o=e.resolvedConfig,s=e.resolveError;const l=(0,v.useState)([a(a({},bN),{},{dataSource:""})]),c=(0,x.A)(l,2),u=c[0],d=c[1],h=(0,v.useRef)(null),f=(0,v.useRef)(!1),p=JSON.stringify(null!=n?n:{}),m=(0,v.useMemo)(()=>JSON.parse(p),[p]);(0,v.useEffect)(()=>{s&&d([])},[s]),(0,v.useEffect)(()=>{"kitchenSink"===(null==o?void 0:o.dataSource)&&o.dataConfigKitchenSink?h.current=new lN({dataConfig:o.dataConfigKitchenSink,dataType:t}):h.current=null},[t,o]);const g=(0,v.useCallback)(async()=>{var e;if(!o)return;let t=[];switch(o.dataSource){case"kitchenSink":if(!o.dataConfigKitchenSink){console.error('["dataConfigKitchenSink" was not included in the carousel config]');break}const i=h.current;if(!i){console.error("[CarouselController] - KitchenSinkDataSource instance not initialized");break}const r=await i.getMenuData({query:nN,additionalVariables:m});t=i.transformDataForCarousel(r);break;case"staticFile":const a=new yN;var n;null!==(e=o.dataConfigStaticFile)&&void 0!==e&&e.filename&&(t=null!==(n=a.getData(o.dataConfigStaticFile.filename))&&void 0!==n?n:[])}const i=function(e,t){return e.map(e=>{const n=!e.carouselTitle||t.prioritizeConfigDefinedTitle?t.carouselTitle:e.carouselTitle,i=!e.carouselTitleLogo||t.prioritizeConfigDefinedTitleLogo?t.carouselTitleLogo:e.carouselTitleLogo;return a(a(a({},t),e),{},{carouselTitle:n,carouselTitleLogo:i})})}(t,o);f.current&&((e=>{const t=window;t.CBS=t.CBS||{},t.CBS.Registry=t.CBS.Registry||{},t.CBS.Registry.onNowCarouselLocalsAtTheEnd=!1;for(const n of e)for(const e of n.carouselSlides){const n=_b.now().toUnixInteger(),i=e.startDate,r=e.endDate;if(void 0!==i&&void 0!==r&&n>=i&&n<=r){t.CBS.Registry.onNowCarouselLocalsAtTheEnd=!0;break}}})(i),d(i))},[o,m]);return(0,v.useEffect)(()=>
2{if(o&&r)return f.current=!0,g(),()=>{f.current=!1}},[o,r,g]),{carouselsConfigAndData:u,refreshCarouselData:g,kitchenSinkDataSourceRef:h}}({carouselType:e.carouselType||"",additionalQueryVariables:e.additionalQueryVariables,isReadyToFetch:e.isReadyToFetch,resolvedConfig:n,resolveError:i});return{resolvedConfig:n,carouselsConfigAndData:r.carouselsConfigAndData,refreshCarouselData:r.refreshCarouselData}}function EN(e){const t=AN({carouselConfig:e.carouselConfig}).carouselsConfigAndData;return(0,wn.jsx)(wn.Fragment,{children:t.map((t,n)=>(0,wn.jsx)(Fb,{carouselConfigAndData:t,posRowNum:parseInt(e.startingRow||"0")+n},t.carouselTitle||n))})}function TN(e){const t=new Error("HTTP ".concat(e));return t.response={status:e},t}function wN(e){let t=e.functionToCall,n=e.defaultPollInterval,i=e.immediateFirstCall,r=void 0!==i&&i,a=e.isReady,o=e.onFunctionCallError,s=e.onFunctionCallSuccess;const l=(0,v.useRef)(n),c=(0,v.useState)(n),u=(0,x.A)(c,2),d=u[0],h=u[1],f=(0,v.useState)(0),p=(0,x.A)(f,2)[1],m=(0,v.useRef)(void 0),g=(0,v.useRef)(t),y=(0,v.useRef)(!1),b=(0,v.useRef)(s),A=(0,v.useRef)(o);g.current=t,b.current=s,A.current=o,(0,v.useEffect)(()=>{l.current=n,h(n)},[n]),(0,v.useEffect)(()=>{if(!a)return void clearTimeout(m.current);let e=!1;function t(){e||Promise.resolve(g.current()).then(n=>{e||(b.current(n),p(0),d===l.current?(clearTimeout(m.current),m.current=setTimeout(t,d)):h(l.current))}).catch(t=>{var n;e||(A.current&&A.current(t),429===(null==t||null===(n=t.response)||void 0===n?void 0:n.status)?p(e=>{const t=e+1,n=1e3*Math.min(30*Math.pow(2,t-1),300);return h(n),t}):console.error("[Non-429 error encountered in polling]",t))})}return r&&!y.current?(y.current=!0,t()):(clearTimeout(m.current),m.current=setTimeout(t,d)),()=>{e=!0,clearTimeout(m.current)}},[r,a,d])}class SN{constructor(e){var t,n;let i=e.includedRowIds,r=e.menuId;this.includedRowIds=void 0,this.lastDiffApiResponse=void 0,this.menuId=void 0,this.videoApiHost=void 0,this.includedRowIds=i,this.lastDiffApiResponse=null,this.menuId=r,this.videoApiHost="undefined"!=typeof window&&(null===(t=window.CBS)||void 0===t||null===(n=t.Registry)||void 0===n?void 0:n.sportsVideoApiHost)||"https://video-api-qa.cbssports.com"}async getDiff(){try{var e,t;const n="undefined"!=typeof window&&(null===(e=window.CBS)||void 0===e||null===(t=e.Registry)||void 0===t?void 0:t.sportsVideoApiKey)||{NODE_ENV:"production",PUBLIC_URL:"/assets/web-components",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.REACT_APP_SPORTS_VIDEO_API_KEY||"",i=await fetch("".concat(this.videoApiHost,"/vms/diff/v5?menu=").concat(this.menuId),{headers:{"x-api-key":n}});if(!i.ok)throw console.error("[Diff API response was not ok]"),TN(i.status);return await i.json()}catch(e){throw console.error("[Error calling Diff API]",e),e}}async dataHasChanged(){var e;const t=await this.getDiff();if(null==t||null===(e=t.diff)||void 0===e||!e.data)return!1;const n={fullRefreshToken:t.diff.fullRefreshToken};if(t.diff.data.forEach(e=>{this.includedRowIds.includes(e.id)&&(n[e.id]=e.token)}),this.lastDiffApiResponse){if(this.lastDiffApiResponse.fullRefreshToken!==n.fullRefreshToken)return this.lastDiffApiResponse=n,!0;for(const e of this.includedRowIds)if(this.lastDiffApiResponse[e]!==n[e])return this.lastDiffApiResponse=n,!0}return this.lastDiffApiResponse=n,!1}}function CN(e){var t;const n=Zf(ip()),i=AN({carouselConfig:e.carouselConfig,carouselType:"dai-events",additionalQueryVariables:n?{dmaStations:n}:{},isReadyToFetch:null!==n}),r=i.resolvedConfig,a=i.carouselsConfigAndData,o=i.refreshCarouselData,s=(0,v.useMemo)(()=>{var e;return 1e3*((null==r||null===(e=r.dataConfigKitchenSink)||void 0===e?void 0:e.pollingRateSeconds)||15)},[r]),l=(0,v.useMemo)(()=>{var e,t,n;return null!=r&&null!==(e=r.dataConfigKitchenSink)&&void 0!==e&&e.menuId&&null!=a&&null!==(t=a[0])&&void 0!==t&&t.carouselId?new SN({includedRowIds:a.flatMap(e=>e.carouselId?[e.carouselId]:[]),menuId:(null==r||null===(n=r.dataConfigKitchenSink)||void 0===n?void 0:n.menuId)||0}):null},[a,null==r||null===(t=r.dataConfigKitchenSink)||void 0===t?void 0:t.menuId]);return wN({functionToCall:null!==l?()=>l.dataHasChanged():()=>Promise.resolve(),defaultPollInterval:s,immediateFirstCall:!0,isReady:null!==l,onFunctionCallSuccess:e=>{e&&o()}}),(0,wn.jsx)(wn.Fragment,{children:a.map((t,n)=>(0,wn.jsx)(Fb,{carouselConfigAndData:t,conditionallyRendered:e.conditionallyRendered,posRowNum:parseInt(e.startingRow||"0")+n},t.carouselTitle||n))})}var kN,xN;const NN="undefined"!=typeof window&&(null===(kN=window.CBS)||void 0===kN||null===(xN=kN.Registry)||void 0===xN?void 0:xN.sportsVideoAssetsHost)||"https://video-assets.cbssports.com";function _N(e){var t,n;const i=ip(),r=function(e){if(!e)return null;for(const t of e){const e="string"==typeof(null==t?void 0:t.dmaMarket)?t.dmaMarket.trim():"";if(e)return e}return null}(i),o=AN({carouselConfig:e.carouselConfig,carouselType:"local-news",additionalQueryVariables:r?{dmaMarket:r}:{},isReadyToFetch:null!==i}),s=o.carouselsConfigAndData,l=o.refreshCarouselData,c=o.resolvedConfig,u=(0,v.useState)((null==c||null===(t=c.dataConfigKitchenSink)||void 0===t?void 0:t.pollingRateSeconds)||15),d=(0,x.A)(u,2),h=d[0],f=d[1],p=(0,v.useState)(s),m=(0,x.A)(p,2),g=m[0],y=m[1],b=(0,v.useState)({}),A=(0,x.A)(b,2),E=A[0],T=A[1],w=(0,v.useRef)(null);return(0,v.useEffect)(()=>{var e;f((null==c||null===(e=c.dataConfigKitchenSink)||void 0===e?void 0:e.pollingRateSeconds)||15)},[null==c||null===(n=c.dataConfigKitchenSink)||void 0===n?void 0:n.pollingRateSeconds]),wN({functionToCall:()=>async function(){try{const e=await fetch("".concat(NN,"/events/segment-title/v1.json"));if(!e.ok)throw console.error("[Segment Title API response was not ok]"),TN(e.status);return await e.json()}catch(e){throw console.error("[Error calling Segment Title API]",e),e}}(),defaultPollInterval:1e3*h,immediateFirstCall:!0,isReady:!0,onFunctionCallSuccess:e=>{var t;0===(null==c||null===(t=c.dataConfigKitchenSink)||void 0===t?void 0:t.pollingRateSeconds)&&"number"==typeof e.frequency&&e.frequency!==h&&f(e.frequency),e&&w.current!==e.updatedOn&&("number"==typeof w.current&&l(),w.current=e.updatedOn,T(e.data))}}),(0,v.useEffect)(()=>{y(s.map(e=>a(a({},e),{},{carouselSlides:e.carouselSlides.map(e=>{var t;const n=null===(t=E[e.id])||void 0===t?void 0:t.segmentTitle;return a(a({},e),{},{title:null!=n?n:e.title})})})))},[s,E]),(0,wn.jsx)(wn.Fragment,{children:g.map((t,n)=>(0,wn.jsx)(Fb,{carouselConfigAndData:t,posRowNum:parseInt(e.startingRow||"0")+n},t.carouselTitle||n))})}function IN(e,t){return e.href.includes("facebook")?t.push("facebook"):e.href.includes("x.com")?t.push("twitter"):e.href.includes("instagram")?t.push("instagram"):e.href.includes("youtube")&&t.push("youtube"),t}function ON(e){let t=e.footerMenuData;const n=(0,v.useMemo)(()=>t.find(e=>"Privacy & Terms"===e.text),[t]),i=(0,v.useMemo)(()=>t.find(e=>"Follow Us"===e.text),[t]),r=e=>{let t=[];return"true"===e.useImage&&(t.push("icon"),t=IN(e,t)),t.length>0?t.join(" "):""},a=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return(0,wn.jsx)("div",{className:t,children:e.map((t,i)=>(0,wn.jsxs)("span",{children:[(0,wn.jsx)(Mb,{className:r(t),href:t.href,target:"true"===t.useImage?"_blank":"",trackingData:{ctaText:t.text||"",menuItemLabel:t.text||"",menuOrientation:"footer",posColNum:i.toString(),posRowNum:n.toString()},children:t.text||""}),t.text&&i<e.length-1?" | ":""]},"footer-mobile-menu-item-".concat(t.text||t.href)))})};return(0,wn.jsxs)("div",{className:"footer-menu-mobile",children:[(null==n?void 0:n.subMenu)&&a(n.subMenu,"privacy-terms-mobile-menu",0),(null==i?void 0:i.subMenu)&&a(i.subMenu,"follow-us-mobile-menu",1)]})}function DN(){return(0,wn.jsxs)("div",{className:"siteDisclaimer",children:["© ",(new Date).getFullYear()," Paramount. All rights reserved."]})}function RN(e){let t=e.items,n=e.rowOffset;const i=(0,v.useMemo)(()=>t.filter(e=>"Follow Us"!==e.text),[t]),r=(0,v.useState)(!1),a=(0,x.A)(r,2),o=a[0],s=a[1],l=(0,v.useMemo)(()=>{const e={};
2return i.forEach((t,r)=>{let a=n;for(let e=r-1;e>=0;e-=1){var o;a+=(null===(o=i[e].subMenu)||void 0===o?void 0:o.length)||0}e[r]=a}),e},[i,n]),c=(e,t)=>(0,wn.jsxs)(wn.Fragment,{children:[(0,wn.jsx)("li",{className:"blockHead",children:e.text},"footer-site-index-blockhead-".concat(e.text)),e.subMenu&&e.subMenu.length>0&&e.subMenu.map((e,n)=>(0,wn.jsx)("li",{children:(0,wn.jsx)(Mb,{href:e.href,target:"true"===e.newTab?"_blank":void 0,title:e.text,trackingData:{ctaText:e.text||"",menuItemLabel:e.text||"",menuOrientation:"footer",posColNum:"0",posRowNum:"".concat(n+l[t])},children:e.text})},"footer-site-index-item-".concat(e.text)))]});return(0,wn.jsxs)("div",{className:"siteIndex ".concat(o?"open":""),children:[(0,wn.jsx)("button",{className:"toggle","aria-expanded":o?"true":"false","aria-controls":"site-index",onClick:()=>s(!o),children:"Site Index"}),(0,wn.jsx)("ul",{id:"site-index",children:i.map((e,t)=>(0,wn.jsx)("li",{className:"block",children:(0,wn.jsx)("ul",{children:c(e,t)})},"site-index-block-".concat(e.text)))})]})}const PN=n(313);function LN(){const e=(e,t)=>"".concat(e.text,t?" sub menu item":" menu item"),t=e=>e?"footer-menu-item":"footer-menu-block",n=(e,t)=>e?t.some(e=>e.image&&""!==e.image.trim())?"footer-submenu footer-submenu-social flexWrapper":"footer-submenu":"footer-menu flexWrapper",i=(t,n)=>{let i=["footer-link"];return t||i.push("footer-link-root"),"true"===n.useImage&&(i.push("icon"),i=IN(n,i)),{href:n.href,target:"true"===n.newTab?"_blank":"",rel:"true"===n.noFollow?"nofollow":"",className:i.join(" "),"aria-label":e(n,t)}},r=function(e){let o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return(0,wn.jsx)("ul",{className:n(o,e),children:e.map((e,n)=>{var l;return(0,wn.jsxs)("li",{className:t(o),children:[e.href?(0,wn.jsx)(Mb,a(a({},i(o,e)),{},{trackingData:{ctaText:e.text||"",menuItemLabel:e.text||"",menuOrientation:"footer",posColNum:s.toString(),posRowNum:n.toString()},children:e.text})):(0,wn.jsx)("span",a(a({},i(o,e)),{},{children:e.text})),e.subMenu&&(null===(l=e.subMenu)||void 0===l?void 0:l.length)>0&&r(e.subMenu,!0,n)]},"footer-menu-item-".concat(e.text||e.href))})})};return(0,wn.jsxs)("footer",{className:"footer-cmp",children:[(0,wn.jsx)("a",{href:"/",className:"icon siteLogo","aria-label":"CBS Home"}),(0,wn.jsxs)("div",{className:"container",children:[r(PN),(0,wn.jsx)(ON,{footerMenuData:PN}),(0,wn.jsx)(DN,{}),(0,wn.jsx)(RN,{items:PN,rowOffset:2})]})]})}function MN(e){const t=e.group;return(0,wn.jsx)("div",{children:t.map((e,t)=>{let n=EN;switch(e.config){case"carousel-config-sports-live-upcoming":return(0,wn.jsx)(CN,{carouselConfig:Kb[e.config]||e.config,conditionallyRendered:e.conditionallyRendered,startingRow:"".concat(t)},e.config);
2case"carousel-config-local-news":return(0,wn.jsx)(_N,{carouselConfig:Kb[e.config]||e.config,startingRow:"".concat(t)},e.config);default:return(0,wn.jsx)(n,{carouselConfig:Kb[e.config]||e.config,startingRow:"".concat(t)},e.config)}})})}const FN=JSON.parse('[{"config":"carousel-config-sports-live-upcoming","conditionallyRendered":"hideWhenNoPrioritizedEvents"},{"config":"configFastChannels"},{"config":"configKeepWatching"},{"config":"carousel-config-local-news"},{"config":"configLatestFullEpisodes"},{"config":"carousel-config-sports-live-upcoming","conditionallyRendered":"hideWhenPrioritizedEvents"},{"config":"configNba"},{"config":"configTrendingShows"},{"config":"configComedies"},{"config":"configDramas"},{"config":"configLatestShowClips"}]').map(e=>a(a({},e),{},{conditionallyRendered:e.conditionallyRendered}));function UN(){return(0,wn.jsx)("main",{id:"main-container",className:"home-cmp",children:(0,wn.jsx)("div",{className:"bottom-components",children:(0,wn.jsxs)("div",{className:"padded-container",children:[(0,wn.jsx)("div",{style:{height:"100px"}}),(0,wn.jsx)(MN,{group:FN})]})})})}function BN(){return(0,wn.jsx)("div",{className:"schedule-row-divider",children:(0,wn.jsx)("hr",{})})}function jN(e){let t=e.checked,n=e.onChange,i=e.leftLabel,r=void 0===i?"Off":i,a=e.rightLabel,o=void 0===a?"On":a,s=e.disabled,l=void 0!==s&&s,c=e.ariaLabel,u=void 0===c?"Toggle switch":c;const d=(0,v.useRef)(null);return(0,wn.jsxs)("label",{className:"switch-toggle-cmp ".concat(l?"switch-toggle--disabled":""),"aria-disabled":l,children:[(0,wn.jsx)("input",{type:"checkbox",checked:t,onChange:e=>!l&&n(e.target.checked),disabled:l,tabIndex:-1,"data-testid":"switch-toggle"}),(0,wn.jsxs)("span",{className:"slider",tabIndex:0,role:"switch","aria-checked":t,"aria-label":u,onKeyDown:e=>{l||"Enter"!==e.key&&" "!==e.key&&"Spacebar"!==e.key||(e.preventDefault(),n(!t),d.current&&(d.current.textContent=t?r:o))},children:[(0,wn.jsx)("span",{className:"slider__track"}),(0,wn.jsx)("span",{className:"slider__thumb"})]}),(0,wn.jsx)("div",{ref:d,"aria-live":"polite",className:"switch-toggle-a11y-voiceover"})]})}function VN(e){const t=e.allItems,n=e.epgSource,i=void 0===n?"ET":n,r=e.onEpgSourceChange,a=e.timezone_storage_key,o=e.uniqueDates,s=e.watchLiveUrl||"/live-tv/stream/tveverywhere/",l=(0,v.useState)(!1),c=(0,x.A)(l,2),u=c[0],d=c[1],h=(0,v.useState)(e.selectedDateValue),f=(0,x.A)(h,2),p=f[0],m=f[1];(0,v.useEffect)(()=>{m(e.selectedDateValue)},[e.selectedDateValue]);const g=(0,v.useRef)(null),y=(0,v.useCallback)(()=>d(!0),[]),b=(0,v.useCallback)(()=>d(!1),[]),A=(0,v.useCallback)(()=>d(!0),[]),E=(0,v.useCallback)(e=>{e.currentTarget.contains(e.relatedTarget)||d(!1)},[]),T=e=>i!==e?"toggle-label-inactive":"",w=(0,v.useCallback)((e,t)=>{t.preventDefault();const n=document.querySelector('.date-item[data-value="'.concat(e,'"]'));n&&n.scrollIntoView({behavior:"smooth",block:"start"}),d(!1)},[]);return(0,v.useLayoutEffect)(()=>{const e=setTimeout(()=>{const e=document.querySelectorAll(".date-item, .schedule-grid-item");e.length&&(g.current=new window.IntersectionObserver(e=>{e.forEach(e=>{if(e.isIntersecting){const t=e.target.getAttribute("data-value");t&&m((e=>{if(!/^\d{8}$/.test(e))return"";const t=parseInt(e.slice(0,4),10),n=parseInt(e.slice(4,6),10)-1,i=parseInt(e.slice(6,8),10),r=new Date(t,n,i);return isNaN(r.getTime())?"":r.toLocaleDateString("en-US",{weekday:"long",month:"long",day:"numeric"})})(t||""))}})},{root:null,rootMargin:"0px 0px -99% 0px",threshold:0}),e.forEach(e=>{var t;return null===(t=g.current)||void 0===t?void 0:t.observe(e)}))},0);return()=>{var t;null===(t=g.current)||void 0===t||t.disconnect(),clearTimeout(e)}},[t]),(0,wn.jsxs)("div",{className:"schedule-date-nav-cmp",children:[(0,wn.jsx)(BN,{}),(0,wn.jsxs)("div",{className:"schedule-inline-navigator-items",children:[(0,wn.jsx)("div",{className:"schedule-date-selector",children:(0,wn.jsx)("ul",{className:"schedule-menu","aria-label":"Select Date",children:(0,wn.jsxs)("li",{onMouseEnter:y,onMouseLeave:b,onFocus:A,onBlur:E,children:[p&&(0,wn.jsxs)("button",{role:"listbox","aria-expanded":u,"aria-controls":"dateDD",className:"schedule-menu-button",tabIndex:0,title:"Drop down button for selecting date","data-testid":"datenav-selector-button",children:[(0,wn.jsx)("span",{className:"date-full","data-testid":"datenav-date-full",children:p}),(0,wn.jsx)("span",{className:"date-short","data-testid":"datenav-date-short",children:(e=>{if(!e)return"";const t=e.split(", "),n=(0,x.A)(t,2),i=n[0],r=n[1];if(!i||!r)return"";const a=r.split(" "),o=(0,x.A)(a,2),s=o[0],l=o[1];return s&&l?"".concat(i.slice(0,3),", ").concat(s.slice(0,3)," ").concat(l):""})(p)})]}),(0,wn.jsx)("ul",{className:"schedule-date-submenu ".concat(u?"schedule-date-submenu-open":""),"aria-live":"assertive",id:"dateDD",role:"listbox","data-testid":"datenav-selector-submenu",children:o.map((e,t)=>(0,wn.jsx)("li",{children:(0,wn.jsx)("button",{role:"listitem","aria-label":e.dis
2playDate,"data-index":t,"data-value":e.shortDate,"data-selected":0===t,onClick:t=>w(e.shortDate,t),tabIndex:0,children:e.displayDate})},e.shortDate))})]})})}),(0,wn.jsxs)("div",{className:"switch-toggle-container",children:[(0,wn.jsx)("span",{className:"toggle-label-desktop ".concat(T("ET")),children:"CBS NY"}),(0,wn.jsx)("span",{className:"toggle-label-mobile ".concat(T("ET")),children:"NY"}),(0,wn.jsx)(jN,{checked:"PT"===i,onChange:e=>{const t=e?"PT":"ET";null==r||r(t),a&&localStorage.setItem(a,t)},leftLabel:"CBS NY",rightLabel:"CBS LA",ariaLabel:"Toggle between CBS New York and CBS Los Angeles schedules"}),(0,wn.jsx)("span",{className:"toggle-label-desktop ".concat(T("PT")),children:"CBS LA"}),(0,wn.jsx)("span",{className:"toggle-label-mobile ".concat(T("PT")),children:"LA"})]}),(0,wn.jsx)("a",{className:"schedule-live-button",href:s,tabIndex:0,"aria-label":"Watch Live TV",children:(0,wn.jsx)("div",{className:"live-button",children:"WATCH LIVE TV"})})]})]})}function HN(e){const t=e.currentDate,n=e.displayDate;return(0,wn.jsx)("div",{className:"schedule-date-column",children:(0,wn.jsx)("span",{className:"date-item","data-value":t,children:n})})}function zN(e){const t=e.currentDate,n=e.epgSource;return(0,wn.jsx)("div",{className:"schedule-time-column",children:(0,wn.jsxs)("time",{dateTime:t.toISOString(),"data-testid":"schedule-time",children:[(i=t,new Intl.DateTimeFormat("en-US",{timeZone:"America/".concat("ET"===n?"New_York":"Los_Angeles"),hour:"numeric",minute:"2-digit",hour12:!0}).format(i).replace(" ","").replace("AM","am").replace("PM","pm"))," ",n]})});var i}function KN(e){const t=e.item,n=e.isLocalProgramming;function i(e,t){return n?"https://wwwimage-tve.cbsstatic.com/thumbnails/photos/w400-q80/listings/api-managed/assets/cbs_generic_thm_16.9_1920x1080_nb.jpg":e.images&&e.images.baseImage16X9?"desktop"===t?(null===(i=e.images)||void 0===i?void 0:i.baseImage16X9)+"?width=356"||0:"tablet"===t?(null===(r=e.images)||void 0===r?void 0:r.baseImage16X9)+"?width=274"||0:"mobile"===t?(null===(a=e.images)||void 0===a?void 0:a.baseImage16X9)+"?width=186"||0:"":"";var i,r,a}return(0,wn.jsxs)(wn.Fragment,{children:[(0,wn.jsx)("div",{className:"schedule-asset-column mobile-size",children:(0,wn.jsx)("img",{src:i(t,"mobile"),alt:t.program.title,loading:"lazy","data-testid":"schedule-image-asset-mobile"})}),(0,wn.jsx)("div",{className:"schedule-asset-column tablet-size",children:(0,wn.jsx)("img",{src:i(t,"tablet"),alt:t.program.title,loading:"lazy","data-testid":"schedule-image-asset-tablet"})}),(0,wn.jsx)("div",{className:"schedule-asset-column desktop-size",children:(0,wn.jsx)("img",{src:i(t,"desktop"),alt:t.program.title,loading:"lazy","data-testid":"schedule-image-asset-desktop"})})]})}const WN=["href","children","playIcon","small","aa","aaSmall","outlined","secondary","className","onClick","rel","target","aria-label","aa-link"];function GN(e){let t=e.href,n=e.children,i=e.playIcon,r=e.small,o=e.aa,s=e.aaSmall,l=e.outlined,c=e.secondary,u=e.className,d=void 0===u?"":u,h=e.onClick,f=e.rel,p=e.target,m=e["aria-label"],g=e["aa-link"],v=E(e,WN);const y=["button focusable",i&&"playIcon",r&&"small",o&&"aa",s&&"aa-small",l&&"outlined",c&&"secondary",d].filter(Boolean).join(" ");return(0,wn.jsx)("a",a(a({href:t,className:y,onClick:e=>{h&&(h(e),e.defaultPrevented)||(e.stopPropagation(),e.preventDefault(),t&&t.trim()&&("_blank"===p?window.open(t,p,"noopener noreferrer"===f?"noopener,noreferrer":void 0):window.location.href=t))},rel:f,target:p,"aria-label":m,"aa-link":g},v),{},{children:(0,wn.jsx)("div",{className:"button__text",children:n})}))}function qN(e){const t=e.currentProgramIndex,n=e.defaultHref,i=e.idx,r=e.item,a=e.isLocalProgramming,o=t===i;return(0,wn.jsxs)("div",{className:"schedule-item",children:[a?(0,wn.jsx)("div",{className:"schedule-description-column",children:(0,wn.jsx)("h2",{className:"schedule-title"+(o?" current-program":""),children:"Local Programming"})}):(0,wn.jsxs)("div",{className:"schedule-description-column",children:[(0,wn.jsx)("h2",{className:"schedule-title"+(o?" current-program":""),"data-testid":"schedule-title",children:r.program.title}),(0,wn.jsx)("span",{className:"schedule-description"+(o?" current-program":""),"data-testid":"schedule-description",children:r.episode.title||r.episode.description||"No episode info"}),(0,wn.jsx)("br",{className:"schedule-rating-line-break"}),(0,wn.jsx)("span",{className:"schedule-rating","data-testid":"schedule-rating",children:"TV14-LSV"})]}),(0,wn.jsx)("br",{}),o&&(0,wn.jsxs)(wn.Fragment,{children:[(0,wn.jsx)(GN,{href:n,"aria-label":"Watch Live",className:"button desktop-view",children:"WATCH LIVE"}),(0,wn.jsx)(GN,{href:n,"aria-label":"Live",className:"button mobile-view",children:"LIVE"})]})]})}function YN(){return(0,wn.jsx)("div",{className:"padded-container schedule-page-text",children:(0,wn.jsx)("p",{children:"Discover the latest TV listings for all your favorite CBS primetime shows. Whether you're looking for drama, c
2omedy, reality TV, or news, CBS offers a diverse range of entertainment options to suit every viewer's taste. Easily find out what's airing tonight, tomorrow, or in the next week. You can quickly access showtimes in Eastern Time. Plan your TV viewing experience. Whether you're a fan of thrilling crime dramas, heartwarming family shows, or laugh-out-loud comedies, CBS has something for everyone."})})}function QN(){return(0,wn.jsxs)("div",{className:"schedule-grid schedule-grid-placeholder-cmp",children:[(0,wn.jsx)("div",{className:"schedule-date-column",children:(0,wn.jsx)("span",{children:"Â "})}),Array(7).fill("").map((e,t)=>(0,wn.jsxs)(v.Fragment,{children:[(0,wn.jsxs)("div",{className:"schedule-grid-item",children:[(0,wn.jsx)("div",{className:"schedule-time-column",children:(0,wn.jsx)("div",{className:"time-placeholder"})}),(0,wn.jsx)("div",{className:"schedule-asset-column mobile-size"}),(0,wn.jsx)("div",{className:"schedule-asset-column tablet-size"}),(0,wn.jsx)("div",{className:"schedule-asset-column desktop-size"}),(0,wn.jsx)("div",{className:"schedule-item",children:(0,wn.jsxs)("div",{className:"schedule-description-column",children:[(0,wn.jsx)("h2",{className:"schedule-title",children:"Â "}),(0,wn.jsx)("span",{className:"schedule-description",children:"Â "}),(0,wn.jsx)("br",{}),(0,wn.jsx)("span",{className:"schedule-rating",children:"Â "})]})})]}),(0,wn.jsx)("div",{className:"schedule-row-divider",children:(0,wn.jsx)("hr",{})})]},t))]})}const XN=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(""!==e)return e;return{NODE_ENV:"production",PUBLIC_URL:"/assets/web-components",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.REACT_APP_WEB_CBS_BASE_URL||(window.location.hostname.includes("localhost")?"https://stage.cbs.com":"")};function ZN(){const e=(0,v.useState)(null),t=(0,x.A)(e,2),i=t[0],r=t[1],o=(0,v.useState)({schedule:{ET:[],PT:[]}}),s=(0,x.A)(o,2),l=s[0],c=s[1],u="cbs_schedule_timezone",d=(0,v.useState)(()=>localStorage.getItem(u)||"ET"),h=(0,x.A)(d,2),f=h[0],p=h[1],m=(0,v.useState)([]),g=(0,x.A)(m,2),y=g[0],b=g[1],A=(0,v.useCallback)(e=>new Intl.DateTimeFormat("en-US",{timeZone:"America/".concat("ET"===f?"New_York":"Los_Angeles"),weekday:"long",month:"long",day:"numeric"}).format(e),[f]);(0,v.useEffect)(()=>{const e=new AbortController;return(async()=>{try{var t;const n=XN()+"/xhr/shows/all",i=await fetch(n,{signal:e.signal});if(e.signal.aborted)return;const r=await i.json();if(!r||!1===r.success)return void b([]);const a=Array.isArray(null==r||null===(t=r.data)||void 0===t?void 0:t.showSummaryList)?r.data.showSummaryList:[];b(a)}catch(t){e.signal.aborted||(console.error("Error fetching shows:",t),n.e(684).then(n.t.bind(n,684,19)).then(e=>{var t;const n=e.default,i=Array.isArray(null==n||null===(t=n.data)||void 0===t?void 0:t.showSummaryList)?n.data.showSummaryList:[];b(i)}))}})(),()=>e.abort()},[]),(0,v.useEffect)(()=>{(async()=>{try{const e=await oN("schedule-page");if(!e)throw new Error("Empty schedule config");r(e)}catch(n){var e,t;console.log("[Error fetching Schedule Config]",n);const i=(null===(e=window.CBS)||void 0===e||null===(t=e.Registry)||void 0===t?void 0:t.scheduleWatchLiveLink)||"/live-tv/stream/tveverywhere/";r({east:{startTime:"00:00:00",endTime:"24:00:00"},west:{startTime:"00:00:00",endTime:"24:00:00"},localProgrammingPlaceholderTmsIds:["SH051902720000","SH057797070000"],watchLiveUrl:i})}})().catch(()=>{})},[]),(0,v.useEffect)(()=>{i&&!l.schedule[f].length&&async function(){const e="ET"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"ET")?28:29,t=await fetch("https://video-assets.cbssports.com/epg/channels/".concat(e,"/epg.json"));return t.ok?t.json():(console.error("Failed to load schedule data"),'{"schedule": []}')}(f).then(e=>{const t=i["ET"===f?"east":"west"].startTime,n=i["ET"===f?"east":"west"].endTime,r=new Intl.DateTimeFormat("en-US",{timeZone:"America/".concat("ET"===f?"New_York":"Los_Angeles"),hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}),o=e.schedule.filter(e=>{const i=r.format(new Date(e.startTime));return i>=t&&i<n});c({schedule:a(a({},l.schedule),{},{[f]:o})})}).catch(()=>{c({schedule:a(a({},l.schedule),{},{[f]:[]})})})},[f,i]);const E=(0,v.useMemo)(()=>{var e;const t=null==l||null===(e=l.schedule)||void 0===e?void 0:e[f];return[...Array.isArray(t)?t:[]].sort((e,t)=>
2new Date(e.startTime).getTime()-new Date(t.startTime).getTime())},[f,l]),T=(0,v.useCallback)(e=>{const t={};return e.forEach(e=>{const n=new Date(e.startTime),i=A(n);if(!t[i]){const e=new Intl.DateTimeFormat("en-US",{timeZone:"America/".concat("ET"===f?"New_York":"Los_Angeles"),month:"2-digit",day:"2-digit",year:"numeric"}).format(n).split("/"),r=(0,x.A)(e,3),a=r[0],o=r[1],s=r[2];t[i]={displayDate:i,shortDate:"".concat(s).concat(a).concat(o),sortDate:n.getTime()}}}),Object.values(t).sort((e,t)=>e.sortDate-t.sortDate)},[A,f]),w=(0,v.useMemo)(()=>T(E),[E,T]),S=(0,v.useState)(""),C=(0,x.A)(S,2),k=C[0],N=C[1];(0,v.useEffect)(()=>{E.length>0&&N(A(new Date(E[0].startTime)))},[E,A]);const _="undefined"!=typeof window?document.getElementById("header-sub-nav"):null,I=e=>{var t,n,i;const r=new Intl.DateTimeFormat("en-US",{timeZone:"America/".concat("ET"===f?"New_York":"Los_Angeles"),year:"numeric",month:"2-digit",day:"2-digit"}).formatToParts(e),a=null===(t=r.find(e=>"year"===e.type))||void 0===t?void 0:t.value,o=null===(n=r.find(e=>"month"===e.type))||void 0===n?void 0:n.value,s=null===(i=r.find(e=>"day"===e.type))||void 0===i?void 0:i.value;return"".concat(a).concat(o).concat(s)},O=(0,v.useMemo)(()=>Date.now(),[E]),D=(0,v.useMemo)(()=>((e,t)=>{if(0===e.length)return-1;let n=0,i=e.length-1;for(;n<=i;){const r=Math.floor((n+i)/2),a=e[r],o=new Date(a.startTime).getTime();let s;if(s=r+1<e.length?new Date(e[r+1].startTime).getTime():o+(a.duration?1e3*a.duration:36e5),t<o)i=r-1;else{if(!(t>=s))return r;n=r+1}}return-1})(E,O),[O,E]),R=(0,v.useRef)([]);(0,v.useLayoutEffect)(()=>{setTimeout(()=>{if(-1!==D&&R.current[D]){const e=document.querySelector("header"),t=R.current[D],n=window.scrollY+t.getBoundingClientRect().top-((null==e?void 0:e.clientHeight)||0)-30;window.scrollTo({top:n,behavior:"smooth"})}},750)},[E,f,D]);const P="/live-tv/stream/tveverywhere/";return(0,wn.jsxs)("div",{className:"schedule-cmp",children:[_?hd.createPortal((0,wn.jsx)(VN,{allItems:E,epgSource:f,onEpgSourceChange:p,selectedDateValue:k,timezone_storage_key:u,uniqueDates:w,watchLiveUrl:P}),_):(0,wn.jsx)(VN,{allItems:E,epgSource:f,onEpgSourceChange:p,selectedDateValue:k,timezone_storage_key:u,uniqueDates:w,watchLiveUrl:P}),l&&0!==E.length?(0,wn.jsx)("div",{className:"schedule-grid",children:E.map((e,t)=>{var n,r;const a=new Date(e.startTime),o=t>0?new Date(E[t-1].startTime):null,s=A(a),l=!o||A(o)!==s,c=(null==i?void 0:i.localProgrammingPlaceholderTmsIds.includes(null===(n=e.program)||void 0===n?void 0:n.tmsId))||!1,u=t===D,d=((e,t,n)=>{if(n)return P;if(e&&Array.isArray(e)&&t){const n=e.find(e=>(null==e?void 0:e.tmsId)===t);if(null!=n&&n.showPath)return n.showPath.startsWith("/")?n.showPath:"/"+n.showPath}return P})(y,null==e||null===(r=e.program)||void 0===r?void 0:r.tmsId,u),h=0===t;return(0,wn.jsxs)(v.Fragment,{children:[l&&(0,wn.jsxs)(wn.Fragment,{children:[!h&&(0,wn.jsx)(BN,{}),(0,wn.jsx)(HN,{currentDate:I(a),displayDate:s}),(0,wn.jsx)(BN,{})]}),!l&&(0,wn.jsx)(BN,{}),(0,wn.jsxs)("div",{role:"link",tabIndex:0,id:"link-".concat(t),"data-testid":"schedule-link","aria-label":e.program.title,className:"schedule-grid-item","data-value":I(a),ref:e=>{R.current[t]=e},onClick:()=>window.location.assign(d),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||window.location.assign(d)},children:[(0,wn.jsx)(zN,{currentDate:a,epgSource:f}),(0,wn.jsx)(KN,{item:e,isLocalProgramming:c}),(0,wn.jsx)(qN,{idx:t,item:e,currentProgramIndex:D,isLocalProgramming:c,defaultHref:P})]})]},"".concat(f,"-").concat(e.startTime))})}):(0,wn.jsx)(QN,{}),(0,wn.jsx)(YN,{})]})}function JN(e){const t=e.column,n=void 0===t?0:t,i=e.isMobile,r=void 0!==i&&i,o=e.isSubItem,s=void 0!==o&&o,l=e.item,c=e.row,u=void 0===c?0:c,d=e.mvpdLoggedIn,h=void 0!==d&&d,f=function(){var e;const t=null===(e=window.location.pathname.split("/").filter(Boolean).pop())||void 0===e?void 0:e.toLowerCase();return window.location.pathname.includes("live-tv")&&"tveverywhere"!==t?"live tv":"tveverywhere"===t?"tv provider":t}(),p=(0,v.useState)(!1),m=(0,x.A)(p,2),g=m[0],y=m[1],b=v.useRef(null),A=(0,v.useCallback)(()=>{b.current&&clearTimeout(b.current),y(!0)},[]),E=(0,v.useCallback)(()=>{b.current=setTimeout(()=>y(!1),200)},[]),T=(0,v.useCallback)(()=>y(!0),[]),w=(0,v.useCallback)(e=>{e.currentTarget.contains(e.relatedTarget)||y(!1)},[]),S=!0===(null==l?void 0:l.hasSubMenu)&&l.subMenu&&l.subMenu.length>0;return(0,wn.jsxs)("li",{className:(e=>{let t="";return e.href.includes("signup")&&(t+="list-item"),S&&(t+=" list-item-submenu"),t.trim()})(l),role:s?"menuitem":void 0,onMouseEnter:S?A:void 0,onMouseLeave:S?E:void 0,onFocus:S?T:void 0,onBlur:S?w:void 0,tabIndex:S?0:-1,"aria-label":S?"".concat(l.text," sub menu, press enter to open"):void 0,children:[(0,wn.jsx)(Mb,a(a({href:l.href,"aria-label":((e,t)=>"".concat(e.text,t?" sub menu item":" menu item"))(l,s)},(e=>{const t={},n=e.text&&e.text.toLowerCase()===f;return null!=e&&e.newTab&&(t.target="_blank"),null!=e&&e.noFollow&&(t.rel="nofollow"),t.className=["nav-item",null!=e&&e.useImage?"nav-item-image":"nav-item-text",e.href.includes("search")?"nav-item-search":"",e.href.includes("account")?"
2nav-item-account":"",e.href.includes("signup")?"nav-item-account-signup button terciary small":"",S?"nav-item-has-submenu":"",g?"nav-item-submenu-open":"",n?"active":""].filter(Boolean).join(" "),t})(l)),{},{trackingData:{ctaText:l.text,menuItemLabel:l.text,menuOrientation:"header",posColNum:n.toString(),posRowNum:u.toString()},children:!0===(null==l?void 0:l.useImage)&&null!=l&&l.image?(0,wn.jsx)("img",{src:l.image,alt:l.text}):l.text})),(e=>!0===S&&e.subMenu?(0,wn.jsx)("ul",{role:"menu","aria-label":"".concat(e.text," sub menu"),className:"submenu ".concat(g?"submenu-open":""),children:e.subMenu.map((e,t)=>(0,wn.jsx)(JN,{isSubItem:!0,item:e,row:r?t:t+1,column:r?n+1:n,mvpdLoggedIn:h},t))}):null)(l)]})}function $N(e){let t=e.leftMenu,n=e.rightMenu,i=e.mvpdLogoUrl;const r=(0,v.useState)(!1),a=(0,x.A)(r,2),o=a[0],s=a[1],l=(0,v.useState)(!1),c=(0,x.A)(l,2),u=c[0],d=c[1],h=(0,v.useRef)(null);return(0,v.useEffect)(()=>()=>{h.current&&clearTimeout(h.current)},[]),(0,wn.jsxs)(wn.Fragment,{children:[(0,wn.jsxs)("div",{className:"hamburger",children:[(0,wn.jsxs)("button",{"aria-expanded":o?"true":"false",className:"burger burger-custom ".concat(o?"is-active":""),onClick:()=>{o?(s(!1),h.current=window.setTimeout(()=>{d(!1)},200)):(s(!0),h.current=window.setTimeout(()=>{d(!0)},500))},children:[(0,wn.jsx)("div",{className:"bar"}),(0,wn.jsx)("div",{className:"holder"})]}),(0,wn.jsx)("a",{className:"cbs-logo",href:"/",children:(0,wn.jsx)("span",{className:"visually-hidden",children:"CBS Home"})})]}),(0,wn.jsxs)("div",{className:"mobile-menu ".concat(u?"open":""),children:[(0,wn.jsx)("div",{className:"spacer"}),(0,wn.jsx)("div",{className:"search-box",children:(0,wn.jsxs)(Mb,{href:"/search/",tabIndex:0,trackingData:{ctaText:"Search Shows",menuItemLabel:"Search shows",menuOrientation:"header",posColNum:"0",posRowNum:"0"},children:["Search shows",(0,wn.jsx)("span",{className:"icon search"})]})}),(0,wn.jsx)("ul",{children:n}),(0,wn.jsx)("hr",{}),(0,wn.jsxs)("ul",{children:[t,i&&(0,wn.jsx)("li",{className:"mobile-mvpd-logo-item",children:(0,wn.jsx)("img",{src:i,alt:"TV Provider",className:"mobile-mvpd-logo"})})]})]})]})}function e_(){const e=(0,v.useMemo)(()=>Lx.getInstance({headers:{"helios-client-name":"CBSWeb"}}).client,[]),t=(0,v.useState)(!1),i=(0,x.A)(t,2),r=i[0],o=i[1],s=(0,v.useState)(!1),l=(0,x.A)(s,2),c=l[0],u=l[1],d=(0,v.useState)(null),h=(0,x.A)(d,2),f=h[0],p=h[1],m=(0,v.useState)(null),g=(0,x.A)(m,2),y=g[0],b=g[1],A=(0,v.useState)([]),E=(0,x.A)(A,2),T=E[0],w=E[1],S=(0,v.useState)([]),C=(0,x.A)(S,2),k=C[0],N=C[1],_=(0,v.useState)([]),I=(0,x.A)(_,2),O=I[0],D=I[1],R=(0,v.useCallback)(()=>{if(!r)return[...k];let e=[...O];return r&&f&&(e[0]=a(a({},e[0]),{},{text:f})),e},[r,O,k,f]),P=(0,v.useState)(R),L=(0,x.A)(P,2),M=L[0],F=L[1];(0,v.useEffect)(()=>{F(R())},[r,R]);const U=(0,v.useState)(!1),B=(0,x.A)(U,2),j=B[0],V=B[1],H=(0,v.useState)(!1),z=(0,x.A)(H,2),K=z[0],W=z[1],G=(0,v.useRef)(56),q=()=>{const e=window.scrollY;W(e>0),e<1?V(!1):(V(e>G.current),G.current=e)};(0,v.useEffect)(()=>(window.addEventListener("scroll",q),()=>{window.removeEventListener("scroll",q)}),[]),(0,v.useEffect)(()=>{(async()=>{try{const e=await fetch(XN()+"/xhr/user/get-logged-in-user");return e.ok?await e.json():(console.error("Failed to fetch user data:",e),null)}catch(e){return console.error("Error fetching user status:",e),null}})().then(e=>{var t,n,i;null!=e&&e.success&&(null!=e&&null!==(t=e.data)&&void 0!==t&&t.firstName&&(o(!0),p(e.data.firstName)),null!=e&&null!==(n=e.data)&&void 0!==n&&n.mvpdAuth&&null!=e&&null!==(i=e.data)&&void 0!==i&&i.mvpdLogoUrl&&(u(!0),b(e.data.mvpdLogoUrl.trim())))}).catch(console.error)},[]),(0,v.useEffect)(()=>{(async()=>{const t=new Promise((e,t)=>setTimeout(()=>t(new Error("Timeout: Top Nav Menu Config fetch took too long")),2e3));try{const i=(await Promise.race([e.query({query:tN,variables:{slug:"top-nav"}}),t])).data.cmsCustomConfigBySlug.values;null!=i&&i.items&&i.items.length>0?w(i.items):(console.error("[Error fetching Top Nav Menu Config, using static data]"),w(n(841)))}catch(e){console.error("[Error fetching Top Nav Menu Config, using static data]",e),w(n(841))}})().catch(()=>{})},[]),(0,v.useEffect)(()=>{(async()=>{const t=new Promise((e,t)=>
2setTimeout(()=>t(new Error("Timeout: Top Nav Account Menu Config fetch took too long")),2e3));try{const i=(await Promise.race([e.query({query:tN,variables:{slug:"top-nav-account-menu"}}),t])).data.cmsCustomConfigBySlug.values;null!=i&&i.loggedIn&&i.loggedIn.length>0?D(i.loggedIn):(console.error("[Error fetching Top Nav Account Menu Config, using static data]"),D(n(54))),null!=i&&i.loggedOut&&i.loggedOut.length>0?N(i.loggedOut):(console.error("[Error fetching Top Nav Account Menu Config, using static data]"),N(n(24)))}catch(e){console.error("[Error fetching Top Nav Account Menu Config, using static data]",e),D(n(54)),N(n(24))}})().catch(()=>{})},[]);const Y=(e,t)=>{let n=t.offset,i=void 0===n?0:n,r=t.isMobile,a=void 0!==r&&r;return e.map((e,t)=>(0,wn.jsx)(JN,{item:e,isMobile:a,column:a?0:t+i,row:a?t+i:0,mvpdLoggedIn:c},t))};return(0,wn.jsxs)("header",{className:"top-nav-cmp faded ".concat(j?"goUp":""," ").concat(K?"dark":""),children:[(0,wn.jsx)("div",{className:"header__wrap padded-container",children:(0,wn.jsxs)("nav",{"aria-label":"Main Navigation",className:"nav",children:[(0,wn.jsxs)("div",{className:"desktop-menu",children:[(0,wn.jsx)("ul",{className:"menu",children:Y(T,{})}),(0,wn.jsxs)("div",{className:"nav-right-group",children:[c&&y&&(0,wn.jsx)("div",{className:"mvpd-logo-container",children:(0,wn.jsx)("img",{src:y,alt:"TV Provider",className:"mvpd-logo"})}),(0,wn.jsx)("ul",{className:"account-menu",children:Y(M,{offset:T.length})})]})]}),(0,wn.jsx)($N,{leftMenu:(0,wn.jsx)(wn.Fragment,{children:Y(T,{isMobile:!0,offset:M.length})}),rightMenu:(0,wn.jsx)(wn.Fragment,{children:Y(M.reverse(),{isMobile:!0,offset:1})}),mvpdLogoUrl:c&&y||void 0}),(0,wn.jsx)("ul",{className:"menu pplus-cta-menu",children:(0,wn.jsx)("li",{children:(0,wn.jsx)(Mb,{className:"button focusable aa",href:"https://paramountplus.com",trackingData:{ctaText:"Try Paramount+",menuItemLabel:"Try Paramount+",menuOrientation:"header",posColNum:(T.length+M.length-1).toString(),posRowNum:"0"},children:(0,wn.jsx)("span",{children:"Try Paramount+"})})})})]})}),(0,wn.jsx)("div",{id:"header-sub-nav"})]})}function t_(){let e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).league,t=void 0===e?"nfl":e;const n=ip(),i=(0,v.useMemo)(()=>Zf(n),[n]);return(0,v.useEffect)(()=>{Array.isArray(i)&&i.length>0?async function(e){if(null===e)return;const n=_b.now().toUnixInteger(),i={};e&&e.length>0&&(i.dmaStations=e);const r=new lN({dataConfig:{menuId:76,menuSlugs:[]},dataType:"dai-events"}),o=await r.getMenuData({query:rN,additionalVariables:i}),s=[];
2o.data.videoMenu.order.edges.forEach(e=>{e.node.rowData.edges.forEach(i=>{var r,o,l,c;const u=i.node.video;n<=(null==u||null===(r=u.schedule)||void 0===r?void 0:r.videoEndDate)&&(null==u||null===(o=u.properties)||void 0===o||null===(l=o.league)||void 0===l?void 0:l.toLowerCase())===t&&"stationOptIn"===(null==u?void 0:u.playback)&&!0===(null==u||null===(c=u.flags)||void 0===c?void 0:c.useDai)&&s.push(a(a({},i.node),{},{href:"/ks-event/".concat(76,"/").concat(e.node.slug,"/").concat(i.node.id)}))})}),s.length>0&&s.sort((e,t)=>e.video.schedule.videoStartDate-t.video.schedule.videoStartDate);let l=60;try{var c;const e=await oN("carousel-config-sports-live-upcoming");l=null!==(c=null==e?void 0:e.minutesBeforeLiveToPrioritize)&&void 0!==c?c:60}catch(e){console.log("[SportsEventsByLeagueController] Error fetching Sports Live Events Carousel Config]",e)}if("undefined"!=typeof window)try{document.dispatchEvent(new CustomEvent("CBS:SportsEventsByLeagueReady",{detail:{data:s,config:{minutesBeforeLive:l}}}))}catch(e){console.error('[SportsEventsByLeagueController] Error dispatching CustomEvent "CBS:SportsEventsByLeagueReady"',e)}}(i).catch(e=>console.error("[SportsEventsByLeagueController] Error fetching sports events by league:",e)):console.error("[SportsEventsByLeagueController] dmaStations is not available or empty, skipping data fetch.")},[i,t]),null}function n_(){const e=Fe().league;return(0,wn.jsx)("main",{id:"main-container",children:(0,wn.jsx)(t_,{league:e})})}function i_(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.menuId,n=void 0===t?"76":t,i=e.rowSlug,r=e.eventId;const a=(0,v.useRef)(null),o=ip(),s=(0,v.useMemo)(()=>Zf(o),[o]),l=(0,v.useState)(null),c=(0,x.A)(l,2),u=c[0],d=c[1],h="undefined"!=typeof window&&"localhost"===window.location.hostname;return h&&localStorage.setItem("dmaInfo",'[{"dma":"539","stationId":2493,"stationSlug":"wtsp"}]'),(0,v.useEffect)(()=>{null!==s&&async function(){var e,t;const o={menuId:parseInt(n,10),menuSlugs:i?[i]:[]},l={};s&&s.length>0&&(l.dmaStations=s);const c=new lN({dataConfig:o,dataType:"dai-events"}),u=await c.getMenuData({query:iN,additionalVariables:l}),h=c.transformDataForVideoPage(u),f=null!==(e=u.data.videoMenu.playback)&&void 0!==e?e:{};let p=null;for(const e of h){for(const t of e.rowData)if(t.id===r){p=t.video,p.dmaStation=t.dmaStation,p.playbackDetails=f;break}if(p)break}if(p){var m,g;if(d(p),"upcoming"===p.event.status||"pre"===p.event.status)if(null!==(m=p)&&void 0!==m&&null!==(g=m.schedule)&&void 0!==g&&g.videoStartDate){const e=_b.fromSeconds(p.schedule.videoStartDate),t=_b.now().startOf("day"),n=e.startOf("day").diff(t,"days").days;let i;i=0===n?"Today":1===n?"Tomorrow":n<7?e.toFormat("EEEE"):e.toFormat("MMMM d"),p.schedule.startDateTimeString="".concat(i," ").concat(e.toFormat("h:mma ZZZZ"))}else p.schedule.startDateTimeString="";if("undefined"!=typeof window){const e=window;e.CBS=e.CBS||{},e.CBS.Registry=e.CBS.Registry||{},e.CBS.Registry.KSLivePlayerParams=p;const t=await(async e=>{var t,n;const i=76===e?"carousel-config-sports-live-upcoming":null;let r;if(i)try{r=await oN(i)}catch(e){console.log("[Error fetching Custom Config]",e)}return null!==(t=null===(n=r)||void 0===n?void 0:n.minutesBeforeLiveToPrioritize)&&void 0!==t?t:null})(parseInt(n,10));try{document.dispatchEvent(new CustomEvent("CBS:KSLivePlayerParamsReady",{detail:{data:p,menuId:n,rowSlug:i,eventId:r,config:{minutesBeforeLive:t}}}))}catch(e){console.error('[Error disptaching CustomEvent "CBS:KSLivePlayerParamsReady"]',e)}}a.current=null===(t=p.event)||void 0===t?void 0:t.status,setInterval(async()=>{const e=await c.getEventStatus(r||"");if(e!==a.current)try{a.current=e,document.dispatchEvent(new CustomEvent("CBS:KSLivePlayerEventStatusChange",{detail:{status:e}}))}catch(e){console.error('[Error dispatching CustomEvent "CBS:KSLivePlayerEventStatusChange]',e)}},15e3)}else console.error("[No video found]")}()},[s]),h?(0,wn.jsxs)("div",{style:{color:"white"},children:[(0,wn.jsxs)("p",{children:["MenuId: ",n]}),(0,wn.jsxs)("p",{children:["RowSlug: ",i]}),(0,wn.jsxs)("p",{children:["EventId: ",r]}),(0,wn.jsx)("p",{children:"Found Video:"}),(0,wn.jsx)("pre",{style:{whiteSpace:"pre-wrap",wordBreak:"break-word"}
2,children:u?JSON.stringify(u,null,2):"No video found yetâ¦"})]}):null}function r_(){const e=Fe(),t=e.menuId,n=e.rowSlug,i=e.eventId;return(0,wn.jsx)("main",{id:"main-container",className:"ks-live-event-page",children:(0,wn.jsx)(i_,{menuId:t,rowSlug:n,eventId:i})})}function a_(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.menuId,n=void 0===t?"84":t,i=e.rowSlug,r=e.eventId;const a=(0,v.useState)(null),o=(0,x.A)(a,2),s=o[0],l=o[1];return(0,v.useEffect)(()=>{!async function(){var e;const t={menuId:parseInt(n,10),menuSlugs:i?[i]:[]},a=new lN({dataConfig:t,dataType:"local-news"}),o=await a.getMenuData({query:iN}),s=a.transformDataForVideoPage(o),c=null!==(e=o.data.videoMenu.playback)&&void 0!==e?e:{};let u=null;for(const e of s){for(const t of e.rowData)if(t.id===r){u=t.video,u.dmaStation=t.dmaStation,u.playbackDetails=c;break}if(u)break}if(l(u),u){if("undefined"!=typeof window){const e=window;e.CBS=e.CBS||{},e.CBS.Registry=e.CBS.Registry||{},e.CBS.Registry.KSLocalNewsPlayerParams=u;try{document.dispatchEvent(new CustomEvent("CBS:KSLocalNewsPlayerParamsReady",{detail:{data:u,menuId:n,rowSlug:i,eventId:r}}))}catch(e){console.error('[Error disptaching CustomEvent "CBS:KSLocalNewsPlayerParamsReady"]',e)}}}else console.error("[No video found]")}()},[]),"undefined"!=typeof window&&"localhost"===window.location.hostname?(0,wn.jsxs)("div",{style:{color:"white"},children:[(0,wn.jsxs)("p",{children:["MenuId: ",n]}),(0,wn.jsxs)("p",{children:["RowSlug: ",i]}),(0,wn.jsxs)("p",{children:["EventId: ",r]}),(0,wn.jsx)("p",{children:"Found Video:"}),(0,wn.jsx)("pre",{style:{whiteSpace:"pre-wrap",wordBreak:"break-word"},children:s?JSON.stringify(s,null,2):"No video found yetâ¦"})]}):null}function o_(){const e=Fe(),t=e.menuId,n=e.rowSlug,i=e.eventId;return(0,wn.jsx)("main",{id:"main-container",className:"ks-live-event-page",children:(0,wn.jsx)(a_,{menuId:t,rowSlug:n,eventId:i})})}const s_={appletv:"Apple TV",tvos:"Apple TV",firetv:"Fire TV",androidtv:"Android TV",roku:"Roku",xbox:"Xbox",playstation:"Playstation",spectrum:"Spectrum",samsung:"Samsung TV",portaltv:"Portal TV",vizio:"Vizio TV",lg:"LG TV",hisense:"Hisense TV",comcast:"Xfinity",xfinity:"Xfinity",vidaa:"Vidaa TV",cox:"Cox",skytv:"Sky TV",device:"Streaming Device"};function l_(e){var t;return e?null!==(t=s_[e.toLowerCase()])&&void 0!==t?t:e:"device"}const c_="rendezvous.selectedProvider";function u_(){return"undefined"==typeof window?void 0:window.om}function d_(e,t){const n=u_();if(n)return void e(n);if("undefined"==typeof window||"localhost"===window.location.hostname)return void t();let i=0;const r=window.setInterval(()=>{i+=1;const n=u_();n?(window.clearInterval(r),e(n)):i>=10&&(window.clearInterval(r),t())},300)}function h_(e,t){d_(n=>{if("function"==typeof n.trackState)try{n.trackState(t)}catch(e){}else console.log("[rendezvous tracking skipped â om unavailable] ".concat(e),t)},()=>console.log("[rendezvous tracking skipped â om unavailable] ".concat(e),t))}function f_(e,t,n){d_(i=>{if("function"==typeof i.trackAction)try{i.trackAction(t,n)}catch(e){}else console.log("[rendezvous tracking skipped â om unavailable] ".concat(e),n)},()=>console.log("[rendezvous tracking skipped â om unavailable] ".concat(e),n))}function p_(e){f_("trackCodeError","trackActivationFailure",{activationShortCode:e,activationShortCodeFailure:"1"})}function m_(e){let t=e.message,n=e.onDismiss;return(0,wn.jsx)("div",{className:"notification-below-header-wrapper",style:{display:t?"":"none"},children:(0,wn.jsxs)("div",{className:"notification-below-header error",role:"alert",children:[(0,wn.jsx)("div",{className:"padded-container",children:(0,wn.jsx)("span",{className:"notification-text",children:t})}),(0,wn.jsx)("span",{className:"icon close",role:"button",tabIndex:0,"aria-label":"Dismiss notification",onClick:n,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),n())}})]})})}function g_(){return(0,wn.jsx)("section",{className:"padded-container rendezvous-spinner-cmp",children:(0,wn.jsx)("div",{className:"rendezvous-grid",children:(0,wn.jsx)("div",{className:"grid-item",children:(0,wn.jsx)("div",{className:"spinner-animation",children:(0,wn.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 200 200",className:"icon__loading__svg",role:"img","aria-label":"Loading",children:(0,wn.jsxs)("g",{children:[(0,wn.jsx)("path",{d:"M8.16,138.48A99.6,99.6,0,0,0,49,185.78l5.8-14.07a84.94,84.94,0,0,1-.27-143.23l-5.83-14A100.06,100.06,0,0,0,8.16,138.48Z"}),(0,wn.jsx)("path",{d:"M199.54,85.9A100.13,100.13,0,0,0,76.29,3l5.83,14A85,85,0,0,1,184.38,85.9Z"}),(0,wn.jsx)("path",{d:"M138.94,192.39a100,100,0,0,0,60.34-76.6H184.07A84.86,84.86,0,0,1,82.43,183.1l-5.8,14.07A99.6,99.6,0,0,0,138.94,192.39Z"})]})})})})})})}function v_(e){let t=e.flow,n=e.onSuccess,i=e.onAllSet;const r=(0,v.useState)(()=>Array(7).fill("")),a=(0,x.A)(r,2),o=a[0],s=a[1],l=(0,v.useState)(""),c=(0,x.A)(l,2),u=c[0],d=c[1],h=(0,v.useState)(!1),f=(0,x.A)(h,2),p=f[0],m=f[1],g=(0,v.useState)(null),y=(0,x.A)(g,2),b=y[0],A=y[1],E=(0,v.useRef)([]),T=(0,v.useMemo)(()=>l_(t),[t]),w=!o.every(e=>""!==e)||p;(0,v.useEffect)(()=>{!function(e){h_("trackCodeView",{pageType:"activation",ottActivationPartner:e})}(t)},[t]);const S=e=>{const t=E.current[e];t&&(t.focus(),t.select())},C=e=>{const t=e.clipboardData.getData("text").replace(/[^a-zA-Z0-9]/g,"").toUpperCase();if(!t)return;e.preventDefault(),d("");const n=Array(7).fill("");
2t.split("").slice(0,7).forEach((e,t)=>{n[t]=e}),s(n),S(Math.min(t.length,7)-1)},k=async e=>{if(null==e||e.preventDefault(),w)return;const r=o.join(""),a="".concat(XN(),"/rendezvous/resume-or-authenticate/?regCode=").concat(r,"&device=").concat(t);m(!0),d(""),function(e){f_("trackCodeEntered","trackActivation",{activationShortCode:e})}(r);try{const e=await fetch(a),t=await e.json();if(!e.ok)return p_(r),d("Something went wrong. Please try again."),void m(!1);if(!t.success)return p_(r),d("The code you entered does not appear to be valid."),void m(!1);if(t.allSet)return void(null==i||i());if(e.ok&&t.redirectToUrl)return void(window.location.href=t.redirectToUrl);null==n||n({regCode:r,authSessionInfo:t}),m(!1)}catch(e){p_(r),d("Something went wrong. Please try again."),m(!1)}};return p?(0,wn.jsx)(g_,{}):(0,wn.jsxs)(wn.Fragment,{children:[(0,wn.jsx)(m_,{message:u,onDismiss:()=>d("")}),(0,wn.jsx)("section",{className:"padded-container rendezvous-code-form-cmp",children:(0,wn.jsx)("div",{className:"rendezvous-grid",children:(0,wn.jsx)("div",{className:"grid-item",children:(0,wn.jsxs)("form",{onSubmit:k,noValidate:!0,children:[(0,wn.jsx)("div",{className:"rendezvous-activate-svg",children:(0,wn.jsx)("img",{src:"https://stage-wwwimage-tve.cbsstatic.com/base/files/cbs_page_attribute/illustration_0.svg",alt:"Rendezvous logo"})}),(0,wn.jsxs)("h1",{className:"rendezvous-header",children:["Enter the activation code for your ",T]}),(0,wn.jsxs)("p",{className:"faq-copy",children:["You can find your activation code on your device screen. If you need help,"," ",(0,wn.jsx)("a",{href:"/".concat(t,"/help/"),target:"_blank",rel:"noopener noreferrer",children:"visit our FAQ."})]}),(0,wn.jsx)("div",{className:"code-wrapper",children:(0,wn.jsx)("fieldset",{className:"digit-field-set",children:(0,wn.jsx)("div",{className:"digit-fields-wrapper",children:o.map((e,t)=>(0,wn.jsx)("div",{className:"field-wrapper field-wrapper--digit".concat(b===t?" focused":""),children:(0,wn.jsx)("input",{ref:e=>{E.current[t]=e},className:"digit",type:"text",inputMode:"text",autoCapitalize:"characters",autoComplete:"off",maxLength:1,value:e,"aria-label":"Character ".concat(t+1),onChange:e=>((e,t)=>{const n=t.replace(/[^a-zA-Z0-9]/g,"").toUpperCase();d("");const i=[...o];if(""===n)return i[e]="",void s(i);let r=e;for(const e of n.split("")){if(r>=7)break;i[r]=e,r+=1}s(i),S(Math.min(r,6))})(t,e.target.value),onKeyDown:e=>((e,t)=>{if("Backspace"===t.key&&""===o[e]&&e>0){t.preventDefault();const n=[...o];n[e-1]="",s(n),S(e-1)}else"ArrowLeft"===t.key&&e>0?(t.preventDefault(),S(e-1)):"ArrowRight"===t.key&&e<6?(t.preventDefault(),S(e+1)):"Enter"===t.key&&(t.preventDefault(),k())})(t,e),onPaste:C,onFocus:e=>{A(t),e.target.select()},onBlur:()=>A(null)})},t))})})}),(0,wn.jsx)("button",{type:"button",tabIndex:0,className:"button".concat(w?" disabled":""),disabled:w,onClick:()=>k(),children:(0,wn.jsx)("span",{className:"button__text",children:p?"Activatingâ¦":"Activate"})})]})})})})]})}function y_(e){let t=e.options,n=e.onSelect,i=e.label,r=void 0===i?"More Providers":i;const a=(0,v.useState)(!1),o=(0,x.A)(a,2),s=o[0],l=o[1],c=(0,v.useState)(""),u=(0,x.A)(c,2),d=u[0],h=u[1],f=(0,v.useState)(-1),p=(0,x.A)(f,2),m=p[0],g=p[1],y=(0,v.useRef)(null),b=(0,v.useMemo)(()=>{var e,n;return null!==(e=null===(n=t.find(e=>e.id===d))||void 0===n?void 0:n.name)&&void 0!==e?e:""},[t,d]),A=(0,v.useMemo)(()=>s&&m>=0&&t[m]?t[m].name:b,[s,m,t,b]);(0,v.useEffect)(()=>{if(!s)return g(-1);const e=e=>{y.current&&!y.current.contains(e.target)&&l(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[s]);const E=e=>{h(e),l(!1),n(e)};return(0,wn.jsxs)("div",{ref:y,id:"custom-selector-provider",role:"listbox",tabIndex:0,"aria-label":r,"aria-controls":"custom-selector-provider-selected","aria-expanded":s,className:"select-box-wrapper field-wrapper field-wrapper--floating-label field-wrapper--provider".concat(d?" has-value":"").concat(s?" open":""),onClick:()=>l(e=>!e),onKeyDown:e=>{switch(e.key){case"ArrowDown":e.preventDefault(),s?g(e=>Math.min(e+1,t.length-1)):(l(!0),g(0));break;case"ArrowUp":e.preventDefault(),s&&g(e=>Math.max(e-1,0));break;case"Enter":case" ":e.preventDefault(),s&&m>=0&&t[m]?E(t[m].id):l(e=>!e);break;case"Escape":l(!1)}},children:[(0,wn.jsx)("div",{className:"caret"}),(0,wn.jsxs)("select",{id:"provider",tabIndex:-1,"aria-label":r,"aria-required":"true",value:d,onChange:e=>E(e.target.value),children:[(0,wn.jsx)("option",{value:"",disabled:!0,hidden:!0}),t.map(e=>(0,wn.jsx)("option",{value:e.id,"aria-label":e.name,children:e.name},e.id))]}),(0,wn.jsx)("div",{id:"custom-selector-provider-selected",role:"region","aria-live":"polite",className:"select-selected",children:A}),(0,wn.jsx)("label",{htmlFor:"provider",children:r}),(0,wn.jsx)("ul",{className:"select-items".concat(s?"":" select-hide"),children:t.map((e,t)=>(0,wn.jsx)("li",{role:"option","aria-label":e.name,"aria-selected":d===e.id,className:"select-option".concat(m===t?" active":""),onMouseEnter:()=>g(t),onClick:t=>{t.stopPropagation(),E(e.id)},children:e.name},e.id))})]})}const b_=JSON.parse('{"success":true,"imageHost":"https://stage-wwwimage-tve.cbsstatic.com","mvpdConfigList":[{"id":"all070","displayName":"ALLO Communications LLC","logoBlack":"files/mvpd_config/allo_black_480x208.png","logo":"files/mvpd_config/allo_white.png","tier":2},{"id":"ATT","displayName":"AT&T U-verse","logoBlack":"files/mvpd_config/att_uverse_blk.png","logo":"files/mvpd_config/att_uverse_wht.png","tier":2},{"id":"ski020","displayName":"Absolute Cable TV","logoBlack":"files/mvpd_config/abctv_black_480x208.png","logo":"files/mvpd_config/abctv_white.png","tier":2},{"id":"Armstrong","displayName":"Armstrong","logoBlack":"files/mvpd_config/36/88/19/1df49ab2-1a64-441b-ada5-dcb03a0bcf93.png","logo":"files/mvpd_config/36/88/17/55fa4459-1923-47da-81b3-708c6616dae1.png","t
2ier":2},{"id":"auth_atlanticbb_net","displayName":"Breezeline Formerly Atlantic Broadband","logoBlack":"files/mvpd_config/breezeline_hrz_black.png","logo":"files/mvpd_config/breezeline_hrz_white.png","tier":2},{"id":"bev010","displayName":"BEVCOMM","logoBlack":"files/mvpd_config/bevcomm_black.png","logo":"files/mvpd_config/bevcomm_white.png","tier":2},{"id":"baldwin","displayName":"Baldwin Telecom, Inc.","logoBlack":"files/mvpd_config/bald_black_480x208.png","logo":"files/mvpd_config/bald_white.png","tier":2},{"id":"www_websso_mybrctv_com","displayName":"Blue Ridge Communications","logoBlack":"files/mvpd_config/blue_ridge_communications_black.png","logo":"files/mvpd_config/blue_ridge_communications_white.png","tier":2},{"id":"tpc010","displayName":"Blue Stream Fiber","logoBlack":"files/mvpd_config/10/48/03/30b6052a-c273-4344-aed6-14948501cd09.png","logo":"files/mvpd_config/10/48/01/bbd56d2b-a36d-49c7-9434-4645a7170b5a.png","tier":2},{"id":"cla050","displayName":"Bluepeak","logoBlack":"files/mvpd_config/bluepeak_black_480x208.png","logo":"files/mvpd_config/bluepeak_white.png","tier":2},{"id":"buc020","displayName":"Buckeye Broadband","logoBlack":"files/mvpd_config/buckeyebroadband_black.png","logo":"files/mvpd_config/buckeyebroadband_white.png","tier":2},{"id":"dem010-01","displayName":"Celect Communications","logoBlack":"files/mvpd_config/53/91/37/b0532f48-8360-4eb0-aaa7-860bba4589fc.png","logo":"files/mvpd_config/53/91/34/15984cd9-38e6-43dc-9dcd-01c7112aac1a.png","tier":2},{"id":"cla010","displayName":"Clarence Telephone","logoBlack":"files/mvpd_config/26/61/81/21560fe1-c2ee-4e46-a151-1044f1b568c0.png","logo":"files/mvpd_config/26/61/78/94093534-a6e7-4158
2-9b23-ad35e8f7a9c7.png","tier":2},{"id":"com015","displayName":"Compas X-Stream ","logoBlack":"files/mvpd_config/24/96/67/95f95438-6ecc-48f1-80af-a13eeed2dd2d.png","logo":"files/mvpd_config/24/96/64/a1d30c1e-d922-4dd8-a4c5-290be3bee076.png","tier":2},{"id":"consolidatedcable","displayName":"Consolidated","logoBlack":null,"logo":"files/mvpd_config/consolidated_white.png","tier":2},{"id":"ctc040","displayName":"CTC â Brainerd MN","logoBlack":"files/mvpd_config/ctc_black_480x208.png","logo":"files/mvpd_config/ctc_white.png","tier":2},{"id":"Cox","displayName":"Cox","logoBlack":"files/mvpd_config/logo-cox3x.png","logo":"files/mvpd_config/cox_white.png","tier":1},{"id":"DTV","displayName":"DIRECTV","logoBlack":"files/mvpd_config/directv_480x208_blk.png","logo":"files/mvpd_config/directv_wht.png","tier":1},{"id":"ATTOTT","displayName":"DIRECTV STREAM","logoBlack":"files/mvpd_config/dtvstrm_480x208_blk.png","logo":"files/mvpd_config/dtvstrm_wht.png","tier":1},{"id":"Dish","displayName":"DISH","logoBlack":"files/mvpd_config/logo-dish3x.png","logo":"files/mvpd_config/dish_white.png","tier":1},{"id":"eagle","displayName":"Eagle Communications","logoBlack":"files/mvpd_config/eagle_black_480x208.png","logo":"files/mvpd_config/eagle_white.png","tier":2},{"id":"pre050-03","displayName":"Estherville Communications","logoBlack":"files/mvpd_config/10/02/02/b967e23e-b3fb-497a-9a74-dc6e12480700.png","logo":"files/mvpd_config/10/02/00/7a324080-95b5-4c81-9543-4f95b372d3c9.png","tier":2},{"id":"fbcomm","displayName":"Frankfort Plant Board","logoBlack":"files/mvpd_config/75/41/36/9191517c-bbf6-4474-a9af-3f9828b27fe6.png","logo":"files/mvpd_config/75/41/34/c649eb84-3f15-41cf-8790-213df14ebd96.png","tier":2},{"id":"frontier_auth-gateway_net","displayName":"Frontier, A Verizon Company ","logoBlack":"files/mvpd_config/64/66/67/ec9a2359-4873-4269-a038-e9f6a7bf580f.png","logo":"files/mvpd_config/64/66/65/16be9b9e-b2f6-4a0e-b157-c79cfe90a815.png","tier":2},{"id":"Fubo","displayName":"FuboTV","logoBlack":"files/mvpd_config/92/54/78/800281ac-7641-4121-8b38-03abfdc36046.png","logo":"files/mvpd_config/92/54/76/3fe6ef49-6e94-4362-9e3b-0a0457b355f0.png","tier":2},{"id":"gar040","displayName":"Gardonville Cooperative Telephone Association","logoBlack":"files/mvpd_config/gar_black_480x208.png","logo":"files/mvpd_config/gar_white.png","tier":2},{"id":"Grande","displayName":"Grande Communications (Astound Broadband)","logoBlack":"files/mvpd_config/astound-broadband-grande-logo-black.png","logo":"files/mvpd_config/astound-broadband-grande-logo-white.png","tier":2},{"id":"gpcom","displayName":"Great Plains Communications","logoBlack":"files/mvpd_config/great_plains_communications_black.png","logo":"files/mvpd_config/great_plains_communications_white.png","tier":2},{"id":"htc020","displayName":"HTC Communications Inc.","logoBlack":"files/mvpd_config/htc_black_480x208.png","logo":"files/mvpd_config/htc_white.png","tier":2},{"id":"horizoncable","displayName":"Horizon Cable TV","logoBlack":"files/mvpd_config/hctv_black_480x208.png","logo":"files/mvpd_config/hctv_white.png","tier":2},{"id":"Hulu","displayName":"hulu","logoBlack":"files/mvpd_config/logo-hulu3x.png","logo":"files/mvpd_config/hulu_white.png","tier":1},{"id":"int050","displayName":"Interstate Telecommunications","logoBlack":"files/mvpd_config/24/98/34/e1dc99bf-a6e5-4dc9-b9db-d2e212a18e9a.png","logo":"files/mvpd_config/24/98/31/7469298d-33b1-4717-9313-0bea643d8e95.png","tier":2},{"id":"lus010","displayName":"LFT Fiber","logoBlack":"files/mvpd_config/84/03/52/fa4d0421-4ed2-4338-a576-6434bd8c24a1.png","logo":"files/mvpd_config/84/03/49/03a8110e-d4dc-4068-8112-611207add732.png","tier":2},{"id":"mtc030","displayName":"MTCO Communications, Inc.","logoBlack":"files/mvpd_config/mtco_black_480x208.png","logo":"files/mvpd_config/mtco_white.png","tier":2},{"id":"buc020-02","displayName":"MaxxSouth","logoBlack":"files/mvpd_config/71/80/51/45ae1cc4-ff60-4acd-9910-43e50dfaf304.png","logo":"files/mvpd_config/71/80/49/be1dd709-ee8c-4b76-a64c-b786bc4e658a.png","tier":2},{"id":"Mediacom","displayName":"Mediacom","logoBlack":"files/mvpd_config/logo-xtream3x.png","logo":"files/mvpd_config/mediacom-aka-xstream_white.png","tier":2},{"id":"mid045","displayName":"Midstate Communications","logoBlack":"files/mvpd_config/33/40/10/923d04d2-8240-45fe-be78-bf354f401756.png","logo":"files/mvpd_config/33/40/07/cf5821f2-5830-4a4d-9877-54e2901d1178.png","tier":2},{"id":"nor240","displayName":"NICP","logoBlack":"files/mvpd_config/33/37/47/7777c34a-1663-405e-bff7-ae467c3b0717.png","logo":"files/mvpd_config/33/37/44/eb4a5ae1-bffc-4923-9ae7-e878c15f07ef.png","tier":2},{"id":"jam030","displayName":"NVC-JVT","logoBlack":"files/mvpd_config/66/09/26/8718041d-944b-46f9-93be-4efb114df639.png","logo":"files/mvpd_config/66/09/23/2bed36dc-0c40-40a5-bcfd-b042a962945f.png","tier":2},{"id":"4comnvc010","displayName":"New Visions Communications","logoBlack":"files/mvpd_config/58/25/63/3f3667cd-e988-47a9-b09a-0d5881e18071.png","logo":"files/mvpd_config/58/27/54/c7acc5c4-695c-4279-beb3-121e3cdeffe5.png","t
2ier":2},{"id":"nor075","displayName":"Northwest Community Communications","logoBlack":"files/mvpd_config/ncc_black_480x208.png","logo":"files/mvpd_config/ncc_white.png","tier":2},{"id":"nor125","displayName":"Norwood Light Department (NLD)","logoBlack":"files/mvpd_config/nld_black_480x208.png","logo":"files/mvpd_config/nld_white.png","tier":2},{"id":"okl010","displayName":"OEC Fiber","logoBlack":"files/mvpd_config/04/65/23/99b2a679-4761-4ec9-ad98-aee82fc873ae.png","logo":"files/mvpd_config/04/65/19/b074e40f-d8ba-4e22-be99-4aed60141f82.png","tier":2},{"id":"Cablevision","displayName":"Optimum","logoBlack":"files/mvpd_config/optimum_black_480x208.png","logo":"files/mvpd_config/optimum_white.png","tier":1},{"id":"AlticeOne","displayName":"Optimum TV","logoBlack":"files/mvpd_config/optimumtv_black_480x208.png","logo":"files/mvpd_config/optimumtv_white.png","tier":2},{"id":"oza010","displayName":"OzarksGo","logoBlack":"files/mvpd_config/04/71/96/72aedad0-3a8f-486b-8f83-0aa01fd9b3e0.png","logo":"files/mvpd_config/04/71/93/e983c277-7f61-4b01-a80e-ac661012b772.png","tier":2},{"id":"paulbunyan","displayName":"Paul Bunyan Communications","logoBlack":"files/mvpd_config/paul_bunyan_communications_black.png","logo":"files/mvpd_config/paul_bunyan_communications_white.png","tier":2},{"id":"pre050-02","displayName":"Platinum Connect","logoBlack":"files/mvpd_config/10/00/68/f0388b7c-67d9-4b00-9cea-e7f3bddad566.png","logo":"files/mvpd_config/10/00/66/00de8a61-74a8-4bd3-bd79-7e30424524db.png","tier":2},{"id":"premiercomm","displayName":"Premier Communications","logoBlack":"files/mvpd_config/75/42/27/5fc69002-9c67-4c52-a354-0f235d3dcb8e.png","logo":"files/mvpd_config/75/42/25/60057e1c-68ce-4226-a88e-c514a869a03a.png","tier":2},{"id":"qco010","displayName":"QCOL, INC.","logoBlack":"files/mvpd_config/qcol_black_480x208.png","logo":"files/mvpd_config/qcol_white.png","tier":2},{"id":"RCN","displayName":"RCN","logoBlack":"files/mvpd_config/rcn_black.png","logo":"files/mvpd_config/rcn_white.png","tier":2},{"id":"red040","displayName":"Red River Communications","logoBlack":"files/mvpd_config/25/00/27/1f68085c-dd21-476c-bf50-60fe050287de.png","logo":"files/mvpd_config/25/00/24/3be6c4b5-58c1-4b67-85d8-11eab5d8c0b7.png","tier":2},{"id":"ser030","displayName":"Service Electric Cable TV and Communications","logoBlack":"files/mvpd_config/serviceelectric_cabletv_black.png","logo":"files/mvpd_config/serviceelectric_cabletv_white.png","tier":2},{"id":"serviceelectric_auth-gateway_net","displayName":"Service Electric Cablevision","logoBlack":"files/mvpd_config/serviceelectric_cablevision_black.png","logo":"files/mvpd_config/serviceelectric_cablevision_white.png","tier":2},{"id":"selco","displayName":"SELCO","logoBlack":"files/mvpd_config/selco_black_480x208.png","logo":"files/mvpd_config/selco_white.png","tier":2},{"id":"woo010","displayName":"Solarus","logoBlack":"files/mvpd_config/25/34/86/1df1dff3-29bc-4d13-89eb-1e3ca8826f90.png","logo":"files/mvpd_config/25/34/83/452526e0-8995-47a8-9e99-a64d9e5112f7.png","tier":2},{"id":"Spectrum","displayName":"Spectrum","logoBlack":"files/mvpd_config/logo-spectrum3x.png","logo":"files/mvpd_config/spectrum_logo_white.png","tier":1},{"id":"tds_auth-gateway_net","displayName":"TDS","logoBlack":"files/mvpd_config/tds_black.png","logo":"files/mvpd_config/tds_white.png","tier":2},{"id":"emi010","displayName":"Tremolo Communications","logoBlack":"files/mvpd_config/trem_black_480x208.png","logo":"files/mvpd_config/trem_white.png","tier":2},{"id":"uni120","displayName":"United Services","logoBlack":"files/mvpd_config/58/51/31/a2f67aa9-3f56-4618-9fa2-3ab0e60c0e58.png","logo":"files/mvpd_config/58/51/29/51197cd7-4898-49cf-99c6-146e78eed96d.png","tier":2},{"id":"vel020","displayName":"VNET Fiber","logoBlack":"files/mvpd_config/64/34/36/e0a33a6b-e84b-4832-8549-319629945317.png","logo":"files/mvpd_config/64/34/34/e4a70775-d0aa-4dde-9284-c607120db043.png","tier":2},{"id":"Verizon","displayName":"verizon","logoBlack":"files/mvpd_config/logo-verizon3x.png","logo":"files/mvpd_config/verizon_whtie.png","tier":1},{"id":"ver025","displayName":"Vernon Communications Cooperative","logoBlack":"files/mvpd_config/18/09/13/c1999d25-d22d-474e-81c0-5ddf49faf506.png","logo":"files/mvpd_config/18/09/10/65515db6-13b7-4162-bdab-f6f597725d0b.png","tier":2},{"id":"volcanotel","displayName":"Volcano Vision, Inc.","logoBlack":"files/mvpd_config/volcano_vision_inc_black.png","logo":"files/mvpd_config/volcano_vision_inc_white.png","tier":2},{"id":"bci010-02","displayName":"Vyve Broadband","logoBlack":"files/mvpd_config/vyvw_black_480x208.png","logo":"files/mvpd_config/vyvw_white.png","tier":2},{"id":"WOW","displayName":"WOW!","logoBlack":"files/mvpd_config/wow_black.png","logo":"files/mvpd_config/wow_white.png","tier":2},{"id":"wab020","displayName":"Wabash Mutual Telephone","logoBlack":"files/mvpd_config/wabash_black_480x208.png","logo":"files/mvpd_config/wabash_white.png","tier":2},{"id":"wavebroadband","displayName":"Wave Broadband","logoBlack":"files/mvpd_config/wave_black.png","logo":"files/mvpd_config/wave_white_0.png","t
2ier":2},{"id":"wct010","displayName":"West Central Telephone Association","logoBlack":"files/mvpd_config/wcta_black_480x208.png","logo":"files/mvpd_config/wcta_white.png","tier":2},{"id":"Comcast_SSO","displayName":"Xfinity","logoBlack":"files/mvpd_config/13/00/15/75fe6aee-fa71-458e-b1ce-e7822e8626b6.png","logo":"files/mvpd_config/13/00/12/0a7dcaf9-25db-4e35-be00-3aab10b8e4ad.png","tier":1},{"id":"YouTubeTV","displayName":"Youtube TV","logoBlack":"files/mvpd_config/logo-you-tube3x.png","logo":"files/mvpd_config/you_tube_tv_white.png","tier":1}]}'),A_="rendezvous_mvpds";function E_(e){try{window.sessionStorage.setItem(A_,JSON.stringify(e))}catch(e){}}function T_(e,t){const n=e.logoBlack||e.logo;return{id:e.id,name:e.displayName,logoUrl:n?"".concat(t,"/").concat(n):void 0}}function w_(e){const t=[],n=[];for(const r of null!==(i=e.mvpdConfigList)&&void 0!==i?i:[]){var i;const a=T_(r,e.imageHost);(1===r.tier?t:n).push(a)}return{primary:t,secondary:n}}async function S_(){const e=function(){try{const e=window.sessionStorage.getItem(A_);return e?JSON.parse(e):null}catch(e){return null}}();if(e)return e;if(window.location.hostname.includes("localhost")){const e=w_(b_);return E_(e),e}try{const e=await fetch("".concat(XN(),"/rendezvous/mvpds/"));if(console.log(["MVPD SERVICE"],e),!e.ok)return null;const t=w_(await e.json());return E_(t),t}catch(e){return null}}function C_(e){var t,n;let i=e.flow,r=e.regCode,a=e.providers;const o=(0,v.useState)(null!=a?a:null),s=(0,x.A)(o,2),l=s[0],c=s[1],u=(0,v.useState)(""),d=(0,x.A)(u,2),h=d[0],f=d[1],p=(0,v.useState)(!1),m=(0,x.A)(p,2),g=m[0],y=m[1];(0,v.useEffect)(()=>{if(l)return;let e=!0;return S_().then(t=>{e&&t&&c(t)}),()=>{e=!1}},[l]);const b=null!==(t=null==l?void 0:l.primary)&&void 0!==t?t:[],A=null!==(n=null==l?void 0:l.secondary)&&void 0!==n?n:[];(0,v.useEffect)(()=>{!function(e,t){h_("trackProviderView",{activationShortCode:e,ottActivationPartner:t,pageType:"tv-provider"})}(r,i)},[r,i]);const E=async e=>{if(!g){y(!0),f(""),function(e,t){!function(e,t){try{sessionStorage.setItem(c_,JSON.stringify({providerName:e,providerId:t}))}catch(e){}}(e,t),f_("trackProviderSelected","trackRendezvousTvProvider",{mvpdPartner:e,mvpdPartnerId:t})}((e=>{var t,n;return null!==(t=null===(n=[...b,...A].find(t=>t.id===e))||void 0===n?void 0:n.name)&&void 0!==t?t:null})(e),e);try{const t="".concat(XN(),"/rendezvous/resume-or-authenticate/?regCode=").concat(encodeURIComponent(null!=r?r:""),"&mvpd=").concat(encodeURIComponent(e),"&device=").concat(encodeURIComponent(null!=i?i:"")),n=await fetch(t),a=await n.json();if(n.ok&&a.redirectToUrl)return void(window.location.href=a.redirectToUrl);if(!a.success)return f("The code you entered does not appear to be valid."),void y(!1);f("We couldn't connect to the selected provider. Please try again."),y(!1)}catch(e){f("Something went wrong. Please try again."),y(!1)}}};return g?(0,wn.jsx)(g_,{}):(0,wn.jsxs)(wn.Fragment,{children:[(0,wn.jsx)(m_,{message:h,onDismiss:()=>f("")}),(0,wn.jsx)("section",{className:"padded-container rendezvous-provider-select-cmp","data-flow":i,children:(0,wn.jsx)("div",{className:"rendezvous-grid",children:(0,wn.jsxs)("div",{className:"grid-item",children:[(0,wn.jsx)("h3",{className:"steps-header",children:"Select your TV provider"}),(0,wn.jsx)("div",{className:"providers-grid",children:b.map(e=>(0,wn.jsx)("div",{"data-providerid":e.id,className:"providers-grid-item",role:"button",tabIndex:0,"aria-label":e.name,onClick:()=>E(e.id),onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),E(e.id))},children:(0,wn.jsx)("img",{src:e.logoUrl,alt:e.name})},e.id))}),(0,wn.jsx)("div",{className:"providers-select-wrapper",children:(0,wn.jsx)(y_,{options:A,onSelect:E,label:"More Providers"})})]})})})]})}function k_(e){let t=e.flow;const n=(0,v.useMemo)(()=>l_(t),[t]);return(0,v.useEffect)(()=>{!function(){const e=function(){try{const e=sessionStorage.getItem(c_);if(e)return JSON.parse(e)}catch(e){}return{providerName:null,providerId:null}}();h_("trackConfirmation",{mvpdPartner:e.providerName,mvpdPartnerId:e.providerId,mvpdEventSuccess:"1",userRegType:"MVPD_rendezvous",pageName:"MVPD_RendezvousSuccess",pageType:"MVPD_RendSuccess"})}()},[]),(0,wn.jsx)("section",{className:"padded-container rendezvous-success-cmp","data-flow":t,children:(0,wn.jsx)("div",{className:"rendezvous-grid",children:(0,wn.jsxs)("div",{className:"grid-item",children:[(0,wn.jsx)("h3",{className:"steps-header",children:"You're in!"}),(0,wn.jsxs)("p",{children:["Please return to your ",n," to start streaming."]})]})})})}const x_="rendezvous:startedFlow";function N_(e){let t=e.flow;const n=window.location.pathname.includes("all-set"),i=function(e){return!!e&&e.toLowerCase()in s_}(t),r=n&&!function(e){try{return sessionStorage.getItem(x_)===(null!=e?e:"").toLowerCase()}catch(e){return!1}}(t),a=(0,v.useState)(()=>n?"success":"code"),o=(0,x.A)(a,2),s=o[0],l=o[1],c=(0,v.useState)(""),u=(0,x.A)(c,2),d=u[0],h=u[1];if((0,v.useEffect)(()=>{i?r?window.location.href=window.location.pathname.replace(/\/all-set\/?$/,""):(function(e){try{sessionStorage.setItem(x_,(null!=e?e:"").toLowerCase())}catch(e){}}(t),async function(){await S_()}()):window.location.href="/404"},[i,r,t]),!i||r)return null;const f=e=>{let t=e.regCode;h(t),l("provider")},p=()=>{l("success")};switch(s){case"provider":return(0,wn.jsx)(C_,{flow:t,regCode:d});case"success":return(0,wn.jsx)(k_,{flow:t});default:return(0,wn.jsx)(v_,{flow:t,onSuccess:f,onAllSet:p})}}function __(){const e=Fe().flow;return(0,wn.jsx)("main",{id:"main-container",className:"rendezvous-page-cmp","data-flow":e,children:(0,wn.jsx)(N_,{flow:e})})}const I_=g(EN,v,A,{props:["carouselConfig","startingRow"]}),O_=g(CN,v,A,{props:["carouselConfig","conditionallyRendered","startingRow"]}),D_=g(_N,v,A,{props:["carouselConfig","startingRow"]}),R_=g(Sp,v,A,{props:["data"]}),P_=g(i_,v,A,{props:["menuId","rowSlug","eventId"]}),L_=g(a_,v,A,{props:["menuId","rowSlug","eventId"]}
2),M_=g(LN,v,A),F_=g(()=>(0,wn.jsxs)(Et,{children:["localhost"===window.location.hostname&&(0,wn.jsxs)(Tn,{children:[(0,wn.jsx)("script",{src:"https://tags.tiqcdn.com/utag/cbsi/cbstve/qa/utag.js"}),(0,wn.jsx)("script",{src:"https://code.jquery.com/jquery-3.7.1.slim.min.js",integrity:"sha256-kmHvs0B+OpCW5GVHUNjv9rOmY0IvSIRcf7zGUDTDQM8=",crossOrigin:"anonymous"})]}),(0,wn.jsx)(Sn,{}),(0,wn.jsx)(e_,{}),(0,wn.jsxs)(Ze,{children:[(0,wn.jsx)(Qe,{path:"/",element:(0,wn.jsx)(UN,{})}),(0,wn.jsx)(Qe,{path:"/live-tv/stream/test-dai-ads",element:(0,wn.jsx)(Np,{})}),(0,wn.jsx)(Qe,{path:"/live-tv/stream",element:(0,wn.jsx)(kp,{})}),(0,wn.jsx)(Qe,{path:"/live-tv/stream/:channelSlug",element:(0,wn.jsx)(kp,{})}),(0,wn.jsx)(Qe,{path:"/ks-event/:menuId/:rowSlug/:eventId",element:(0,wn.jsx)(r_,{})}),(0,wn.jsx)(Qe,{path:"/ks-news/:menuId/:rowSlug/:eventId",element:(0,wn.jsx)(o_,{})}),(0,wn.jsx)(Qe,{path:"/schedule",element:(0,wn.jsx)(ZN,{})}),(0,wn.jsx)(Qe,{path:"/shows/video/:videoId",element:(0,wn.jsx)(Op,{})}),(0,wn.jsx)(Qe,{path:"/sports-event/:league",element:(0,wn.jsx)(n_,{})}),(0,wn.jsx)(Qe,{path:"/watch/:flow",element:(0,wn.jsx)(__,{})})]}),!window.location.pathname.startsWith("/tv/")&&(0,wn.jsx)(LN,{})]}),v,A),U_=g(ZN,v,A),B_=g(t_,v,A,{props:["league"]}),j_=g(e_,v,A),V_=g(N_,v,A,{props:["flow"]});customElements.define("carousel-cmp",I_),customElements.define("carousel-dai-events-cmp",O_),customElements.define("carousel-local-news-cmp",D_),customElements.define("cbs-avia-player",R_),customElements.define("main-app",F_),customElements.define("footer-menu",M_),customElements.define("ks-live-events-controller",P_),customElements.define("ks-local-news-controller",L_),customElements.define("schedule-cmp",U_),customElements.define("sports-events-by-league",B_),customElements.define("top-nav",j_),customElements.define("rendezvous-cmp",V_)})()})();
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.