@beyondwords/player 0.0.0-beta31 → 0.0.0-beta32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/umd.js CHANGED
@@ -2,7 +2,7 @@
2
2
  (function(ue,vt){typeof exports=="object"&&typeof module!="undefined"?module.exports=vt():typeof define=="function"&&define.amd?define(vt):(ue=typeof globalThis!="undefined"?globalThis:ue||self,ue.BeyondWords=vt())})(this,function(){var pa,_u,_o,vh,_a,yo,mh,bo,ph,ya,So,_h,To,yh,ba,ko,bh,Eo,Sh,Ao,Th,xo,kh,Po,Eh,Sa,yu,wo,Ah,Co,xh,Or,An,hn,us,or,Cr,Lo,Ph,is,wa,gn,cs,Io,wh,Ta,bu,Jr,Kn,ka,Su,vn,ds,Ii,tr,mn,fs,Qr,Yn,Ro,Ch,Do,Lh,rs,Ca,Ea,Tu,Oo,Ih,Bo,Rh,Mo,Dh,No,Oh,Nn,Sf;"use strict";var xE=Object.defineProperty,PE=Object.defineProperties;var wE=Object.getOwnPropertyDescriptors;var qo=Object.getOwnPropertySymbols;var fh=Object.prototype.hasOwnProperty,hh=Object.prototype.propertyIsEnumerable;var dh=(ue,vt,kt)=>vt in ue?xE(ue,vt,{enumerable:!0,configurable:!0,writable:!0,value:kt}):ue[vt]=kt,fe=(ue,vt)=>{for(var kt in vt||(vt={}))fh.call(vt,kt)&&dh(ue,kt,vt[kt]);if(qo)for(var kt of qo(vt))hh.call(vt,kt)&&dh(ue,kt,vt[kt]);return ue},ii=(ue,vt)=>PE(ue,wE(vt));var mu=(ue,vt)=>{var kt={};for(var Mi in ue)fh.call(ue,Mi)&&vt.indexOf(Mi)<0&&(kt[Mi]=ue[Mi]);if(ue!=null&&qo)for(var Mi of qo(ue))vt.indexOf(Mi)<0&&hh.call(ue,Mi)&&(kt[Mi]=ue[Mi]);return kt};var pu=(ue,vt,kt)=>{if(!vt.has(ue))throw TypeError("Cannot "+kt)};var Wr=(ue,vt,kt)=>(pu(ue,vt,"read from private field"),kt?kt.call(ue):vt.get(ue)),ht=(ue,vt,kt)=>{if(vt.has(ue))throw TypeError("Cannot add the same private member more than once");vt instanceof WeakSet?vt.add(ue):vt.set(ue,kt)},gh=(ue,vt,kt,Mi)=>(pu(ue,vt,"write to private field"),Mi?Mi.call(ue,kt):vt.set(ue,kt),kt);var de=(ue,vt,kt)=>(pu(ue,vt,"access private method"),kt);var ln=(ue,vt,kt)=>new Promise((Mi,Xs)=>{var Qt=Tr=>{try{Xe(kt.next(Tr))}catch(Lr){Xs(Lr)}},xn=Tr=>{try{Xe(kt.throw(Tr))}catch(Lr){Xs(Lr)}},Xe=Tr=>Tr.done?Mi(Tr.value):Promise.resolve(Tr.value).then(Qt,xn);Xe((kt=kt.apply(ue,vt)).next())});function ue(){}const vt=t=>t;function kt(t,e){for(const i in e)t[i]=e[i];return t}function Mi(t){return t()}function Xs(){return Object.create(null)}function Qt(t){t.forEach(Mi)}function xn(t){return typeof t=="function"}function Xe(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let Tr;function Lr(t,e){return Tr||(Tr=document.createElement("a")),Tr.href=e,t===Tr.href}function Bh(t){return Object.keys(t).length===0}function hs(t,e,i,r){if(t){const a=ku(t,e,i,r);return t[0](a)}}function ku(t,e,i,r){return t[1]&&r?kt(i.ctx.slice(),t[1](r(e))):i.ctx}function gs(t,e,i,r){if(t[2]&&r){const a=t[2](r(i));if(e.dirty===void 0)return a;if(typeof a=="object"){const l=[],g=Math.max(e.dirty.length,a.length);for(let m=0;m<g;m+=1)l[m]=e.dirty[m]|a[m];return l}return e.dirty|a}return e.dirty}function vs(t,e,i,r,a,l){if(a){const g=ku(e,i,r,l);t.p(g,a)}}function ms(t){if(t.ctx.length>32){const e=[],i=t.ctx.length/32;for(let r=0;r<i;r++)e[r]=-1;return e}return-1}function Eu(t){return t==null?"":t}function Au(t){const e=typeof t=="string"&&t.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return e?[parseFloat(e[1]),e[2]||"px"]:[t,"px"]}const xu=typeof window!="undefined";let Mh=xu?()=>window.performance.now():()=>Date.now(),La=xu?t=>requestAnimationFrame(t):ue;const ps=new Set;function Pu(t){ps.forEach(e=>{e.c(t)||(ps.delete(e),e.f())}),ps.size!==0&&La(Pu)}function Nh(t){let e;return ps.size===0&&La(Pu),{promise:new Promise(i=>{ps.add(e={c:t,f:i})}),abort(){ps.delete(e)}}}const Fh=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global;function I(t,e){t.appendChild(e)}function wu(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function Uh(t){const e=N("style");return Vh(wu(t),e),e.sheet}function Vh(t,e){return I(t.head||t,e),e.sheet}function te(t,e,i){t.insertBefore(e,i||null)}function $(t){t.parentNode&&t.parentNode.removeChild(t)}function Pn(t,e){for(let i=0;i<t.length;i+=1)t[i]&&t[i].d(e)}function N(t){return document.createElement(t)}function tt(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Ie(t){return document.createTextNode(t)}function Pe(){return Ie(" ")}function qn(){return Ie("")}function ve(t,e,i,r){return t.addEventListener(e,i,r),()=>t.removeEventListener(e,i,r)}function nt(t,e,i){i==null?t.removeAttribute(e):t.getAttribute(e)!==i&&t.setAttribute(e,i)}function Wh(t){return Array.from(t.childNodes)}function fr(t,e){e=""+e,t.data!==e&&(t.data=e)}function Et(t,e){t.value=e==null?"":e}function Ci(t,e,i,r){i==null?t.style.removeProperty(e):t.style.setProperty(e,i,r?"important":"")}function lt(t,e,i){for(let r=0;r<t.options.length;r+=1){const a=t.options[r];if(a.__value===e){a.selected=!0;return}}(!i||e!==void 0)&&(t.selectedIndex=-1)}function mi(t){const e=t.querySelector(":checked");return e&&e.__value}let Ia;function jh(){if(Ia===void 0){Ia=!1;try{typeof window!="undefined"&&window.parent&&window.parent.document}catch(t){Ia=!0}}return Ia}function Gh(t,e){getComputedStyle(t).position==="static"&&(t.style.position="relative");const r=N("iframe");r.setAttribute("style","display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;"),r.setAttribute("aria-hidden","true"),r.tabIndex=-1;const a=jh();let l;return a?(r.src="data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\/script>",l=ve(window,"message",g=>{g.source===r.contentWindow&&e()})):(r.src="about:blank",r.onload=()=>{l=ve(r.contentWindow,"resize",e),e()}),I(t,r),()=>{(a||l&&r.contentWindow)&&l(),$(r)}}function Ye(t,e,i){t.classList[i?"add":"remove"](e)}function zh(t,e,{bubbles:i=!1,cancelable:r=!1}={}){const a=document.createEvent("CustomEvent");return a.initCustomEvent(t,i,r,e),a}const Ra=new Map;let Da=0;function Hh(t){let e=5381,i=t.length;for(;i--;)e=(e<<5)-e^t.charCodeAt(i);return e>>>0}function Kh(t,e){const i={stylesheet:Uh(e),rules:{}};return Ra.set(t,i),i}function Cu(t,e,i,r,a,l,g,m=0){const _=16.666/r;let T=`{
3
3
  `;for(let H=0;H<=1;H+=_){const oe=e+(i-e)*l(H);T+=H*100+`%{${g(oe,1-oe)}}
4
4
  `}const k=T+`100% {${g(i,1-i)}}
5
- }`,w=`__svelte_${Hh(k)}_${m}`,F=wu(t),{stylesheet:V,rules:U}=Ra.get(F)||Kh(F,t);U[w]||(U[w]=!0,V.insertRule(`@keyframes ${w} ${k}`,V.cssRules.length));const z=t.style.animation||"";return t.style.animation=`${z?`${z}, `:""}${w} ${r}ms linear ${a}ms 1 both`,Da+=1,w}function Yh(t,e){const i=(t.style.animation||"").split(", "),r=i.filter(e?l=>l.indexOf(e)<0:l=>l.indexOf("__svelte")===-1),a=i.length-r.length;a&&(t.style.animation=r.join(", "),Da-=a,Da||qh())}function qh(){La(()=>{Da||(Ra.forEach(t=>{const{ownerNode:e}=t.stylesheet;e&&$(e)}),Ra.clear())})}let Zs;function Js(t){Zs=t}function Lu(){if(!Zs)throw new Error("Function called outside component initialization");return Zs}function Xo(t){Lu().$$.on_mount.push(t)}function Xh(t){Lu().$$.on_destroy.push(t)}const _s=[],Fe=[];let ys=[];const Zo=[],Iu=Promise.resolve();let Jo=!1;function Ru(){Jo||(Jo=!0,Iu.then(P))}function Zh(){return Ru(),Iu}function Ft(t){ys.push(t)}function Qe(t){Zo.push(t)}const Qo=new Set;let bs=0;function P(){if(bs!==0)return;const t=Zs;do{try{for(;bs<_s.length;){const e=_s[bs];bs++,Js(e),Jh(e.$$)}}catch(e){throw _s.length=0,bs=0,e}for(Js(null),_s.length=0,bs=0;Fe.length;)Fe.pop()();for(let e=0;e<ys.length;e+=1){const i=ys[e];Qo.has(i)||(Qo.add(i),i())}ys.length=0}while(_s.length);for(;Zo.length;)Zo.pop()();Jo=!1,Qo.clear(),Js(t)}function Jh(t){if(t.fragment!==null){t.update(),Qt(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(Ft)}}function Qh(t){const e=[],i=[];ys.forEach(r=>t.indexOf(r)===-1?e.push(r):i.push(r)),i.forEach(r=>r()),ys=e}let Qs;function $h(){return Qs||(Qs=Promise.resolve(),Qs.then(()=>{Qs=null})),Qs}function $o(t,e,i){t.dispatchEvent(zh(`${e?"intro":"outro"}${i}`))}const Oa=new Set;let un;function xt(){un={r:0,c:[],p:un}}function Pt(){un.r||Qt(un.c),un=un.p}function X(t,e){t&&t.i&&(Oa.delete(t),t.i(e))}function se(t,e,i,r){if(t&&t.o){if(Oa.has(t))return;Oa.add(t),un.c.push(()=>{Oa.delete(t),r&&(i&&t.d(1),r())}),t.o(e)}else r&&r()}const eg={duration:0};function Du(t,e,i,r){const a={direction:"both"};let l=e(t,i,a),g=r?0:1,m=null,_=null,T=null;function k(){T&&Yh(t,T)}function w(V,U){const z=V.b-g;return U*=Math.abs(z),{a:g,b:V.b,d:z,duration:U,start:V.start,end:V.start+U,group:V.group}}function F(V){const{delay:U=0,duration:z=300,easing:H=vt,tick:oe=ue,css:ce}=l||eg,ge={start:Mh()+U,b:V};V||(ge.group=un,un.r+=1),m||_?_=ge:(ce&&(k(),T=Cu(t,g,V,z,U,H,ce)),V&&oe(0,1),m=w(ge,z),Ft(()=>$o(t,V,"start")),Nh(me=>{if(_&&me>_.start&&(m=w(_,z),_=null,$o(t,m.b,"start"),ce&&(k(),T=Cu(t,g,m.b,m.duration,0,H,l.css))),m){if(me>=m.end)oe(g=m.b,1-g),$o(t,m.b,"end"),_||(m.b?k():--m.group.r||Qt(m.group.c)),m=null;else if(me>=m.start){const le=me-m.start;g=m.a+m.d*H(le/m.duration),oe(g,1-g)}}return!!(m||_)}))}return{run(V){xn(l)?$h().then(()=>{l=l(a),F(V)}):F(V)},end(){k(),m=_=null}}}function tg(t,e){se(t,1,1,()=>{e.delete(t.key)})}function ig(t,e,i,r,a,l,g,m,_,T,k,w){let F=t.length,V=l.length,U=F;const z={};for(;U--;)z[t[U].key]=U;const H=[],oe=new Map,ce=new Map,ge=[];for(U=V;U--;){const ee=w(a,l,U),L=i(ee);let ae=g.get(L);ae?r&&ge.push(()=>ae.p(ee,e)):(ae=T(L,ee),ae.c()),oe.set(L,H[U]=ae),L in z&&ce.set(L,Math.abs(U-z[L]))}const me=new Set,le=new Set;function Se(ee){X(ee,1),ee.m(m,k),g.set(ee.key,ee),k=ee.first,V--}for(;F&&V;){const ee=H[V-1],L=t[F-1],ae=ee.key,W=L.key;ee===L?(k=ee.first,F--,V--):oe.has(W)?!g.has(ae)||me.has(ae)?Se(ee):le.has(W)?F--:ce.get(ae)>ce.get(W)?(le.add(ae),Se(ee)):(me.add(W),F--):(_(L,g),F--)}for(;F--;){const ee=t[F];oe.has(ee.key)||_(ee,g)}for(;V;)Se(H[V-1]);return Qt(ge),H}function $e(t,e,i){const r=t.$$.props[e];r!==void 0&&(t.$$.bound[r]=i,i(t.$$.ctx[r]))}function ze(t){t&&t.c()}function We(t,e,i,r){const{fragment:a,after_update:l}=t.$$;a&&a.m(e,i),r||Ft(()=>{const g=t.$$.on_mount.map(Mi).filter(xn);t.$$.on_destroy?t.$$.on_destroy.push(...g):Qt(g),t.$$.on_mount=[]}),l.forEach(Ft)}function je(t,e){const i=t.$$;i.fragment!==null&&(Qh(i.after_update),Qt(i.on_destroy),i.fragment&&i.fragment.d(e),i.on_destroy=i.fragment=null,i.ctx=[])}function rg(t,e){t.$$.dirty[0]===-1&&(_s.push(t),Ru(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function it(t,e,i,r,a,l,g,m=[-1]){const _=Zs;Js(t);const T=t.$$={fragment:null,ctx:[],props:l,update:ue,not_equal:a,bound:Xs(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(_?_.$$.context:[])),callbacks:Xs(),dirty:m,skip_bound:!1,root:e.target||_.$$.root};g&&g(T.root);let k=!1;if(T.ctx=i?i(t,e.props||{},(w,F,...V)=>{const U=V.length?V[0]:F;return T.ctx&&a(T.ctx[w],T.ctx[w]=U)&&(!T.skip_bound&&T.bound[w]&&T.bound[w](U),k&&rg(t,w)),F}):[],T.update(),k=!0,Qt(T.before_update),T.fragment=r?r(T.ctx):!1,e.target){if(e.hydrate){const w=Wh(e.target);T.fragment&&T.fragment.l(w),w.forEach($)}else T.fragment&&T.fragment.c();e.intro&&X(t.$$.fragment),We(t,e.target,e.anchor,e.customElement),P()}Js(_)}class rt{$destroy(){je(this,1),this.$destroy=ue}$on(e,i){if(!xn(i))return ue;const r=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return r.push(i),()=>{const a=r.indexOf(i);a!==-1&&r.splice(a,1)}}$set(e){this.$$set&&!Bh(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const ng="@beyondwords/player",el="0.0.0-beta31",ir=(t,e)=>{t=[t].flat().join(`
5
+ }`,w=`__svelte_${Hh(k)}_${m}`,F=wu(t),{stylesheet:V,rules:U}=Ra.get(F)||Kh(F,t);U[w]||(U[w]=!0,V.insertRule(`@keyframes ${w} ${k}`,V.cssRules.length));const z=t.style.animation||"";return t.style.animation=`${z?`${z}, `:""}${w} ${r}ms linear ${a}ms 1 both`,Da+=1,w}function Yh(t,e){const i=(t.style.animation||"").split(", "),r=i.filter(e?l=>l.indexOf(e)<0:l=>l.indexOf("__svelte")===-1),a=i.length-r.length;a&&(t.style.animation=r.join(", "),Da-=a,Da||qh())}function qh(){La(()=>{Da||(Ra.forEach(t=>{const{ownerNode:e}=t.stylesheet;e&&$(e)}),Ra.clear())})}let Zs;function Js(t){Zs=t}function Lu(){if(!Zs)throw new Error("Function called outside component initialization");return Zs}function Xo(t){Lu().$$.on_mount.push(t)}function Xh(t){Lu().$$.on_destroy.push(t)}const _s=[],Fe=[];let ys=[];const Zo=[],Iu=Promise.resolve();let Jo=!1;function Ru(){Jo||(Jo=!0,Iu.then(P))}function Zh(){return Ru(),Iu}function Ft(t){ys.push(t)}function Qe(t){Zo.push(t)}const Qo=new Set;let bs=0;function P(){if(bs!==0)return;const t=Zs;do{try{for(;bs<_s.length;){const e=_s[bs];bs++,Js(e),Jh(e.$$)}}catch(e){throw _s.length=0,bs=0,e}for(Js(null),_s.length=0,bs=0;Fe.length;)Fe.pop()();for(let e=0;e<ys.length;e+=1){const i=ys[e];Qo.has(i)||(Qo.add(i),i())}ys.length=0}while(_s.length);for(;Zo.length;)Zo.pop()();Jo=!1,Qo.clear(),Js(t)}function Jh(t){if(t.fragment!==null){t.update(),Qt(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(Ft)}}function Qh(t){const e=[],i=[];ys.forEach(r=>t.indexOf(r)===-1?e.push(r):i.push(r)),i.forEach(r=>r()),ys=e}let Qs;function $h(){return Qs||(Qs=Promise.resolve(),Qs.then(()=>{Qs=null})),Qs}function $o(t,e,i){t.dispatchEvent(zh(`${e?"intro":"outro"}${i}`))}const Oa=new Set;let un;function xt(){un={r:0,c:[],p:un}}function Pt(){un.r||Qt(un.c),un=un.p}function X(t,e){t&&t.i&&(Oa.delete(t),t.i(e))}function se(t,e,i,r){if(t&&t.o){if(Oa.has(t))return;Oa.add(t),un.c.push(()=>{Oa.delete(t),r&&(i&&t.d(1),r())}),t.o(e)}else r&&r()}const eg={duration:0};function Du(t,e,i,r){const a={direction:"both"};let l=e(t,i,a),g=r?0:1,m=null,_=null,T=null;function k(){T&&Yh(t,T)}function w(V,U){const z=V.b-g;return U*=Math.abs(z),{a:g,b:V.b,d:z,duration:U,start:V.start,end:V.start+U,group:V.group}}function F(V){const{delay:U=0,duration:z=300,easing:H=vt,tick:oe=ue,css:ce}=l||eg,ge={start:Mh()+U,b:V};V||(ge.group=un,un.r+=1),m||_?_=ge:(ce&&(k(),T=Cu(t,g,V,z,U,H,ce)),V&&oe(0,1),m=w(ge,z),Ft(()=>$o(t,V,"start")),Nh(me=>{if(_&&me>_.start&&(m=w(_,z),_=null,$o(t,m.b,"start"),ce&&(k(),T=Cu(t,g,m.b,m.duration,0,H,l.css))),m){if(me>=m.end)oe(g=m.b,1-g),$o(t,m.b,"end"),_||(m.b?k():--m.group.r||Qt(m.group.c)),m=null;else if(me>=m.start){const le=me-m.start;g=m.a+m.d*H(le/m.duration),oe(g,1-g)}}return!!(m||_)}))}return{run(V){xn(l)?$h().then(()=>{l=l(a),F(V)}):F(V)},end(){k(),m=_=null}}}function tg(t,e){se(t,1,1,()=>{e.delete(t.key)})}function ig(t,e,i,r,a,l,g,m,_,T,k,w){let F=t.length,V=l.length,U=F;const z={};for(;U--;)z[t[U].key]=U;const H=[],oe=new Map,ce=new Map,ge=[];for(U=V;U--;){const ee=w(a,l,U),L=i(ee);let ae=g.get(L);ae?r&&ge.push(()=>ae.p(ee,e)):(ae=T(L,ee),ae.c()),oe.set(L,H[U]=ae),L in z&&ce.set(L,Math.abs(U-z[L]))}const me=new Set,le=new Set;function Se(ee){X(ee,1),ee.m(m,k),g.set(ee.key,ee),k=ee.first,V--}for(;F&&V;){const ee=H[V-1],L=t[F-1],ae=ee.key,W=L.key;ee===L?(k=ee.first,F--,V--):oe.has(W)?!g.has(ae)||me.has(ae)?Se(ee):le.has(W)?F--:ce.get(ae)>ce.get(W)?(le.add(ae),Se(ee)):(me.add(W),F--):(_(L,g),F--)}for(;F--;){const ee=t[F];oe.has(ee.key)||_(ee,g)}for(;V;)Se(H[V-1]);return Qt(ge),H}function $e(t,e,i){const r=t.$$.props[e];r!==void 0&&(t.$$.bound[r]=i,i(t.$$.ctx[r]))}function ze(t){t&&t.c()}function We(t,e,i,r){const{fragment:a,after_update:l}=t.$$;a&&a.m(e,i),r||Ft(()=>{const g=t.$$.on_mount.map(Mi).filter(xn);t.$$.on_destroy?t.$$.on_destroy.push(...g):Qt(g),t.$$.on_mount=[]}),l.forEach(Ft)}function je(t,e){const i=t.$$;i.fragment!==null&&(Qh(i.after_update),Qt(i.on_destroy),i.fragment&&i.fragment.d(e),i.on_destroy=i.fragment=null,i.ctx=[])}function rg(t,e){t.$$.dirty[0]===-1&&(_s.push(t),Ru(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function it(t,e,i,r,a,l,g,m=[-1]){const _=Zs;Js(t);const T=t.$$={fragment:null,ctx:[],props:l,update:ue,not_equal:a,bound:Xs(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(_?_.$$.context:[])),callbacks:Xs(),dirty:m,skip_bound:!1,root:e.target||_.$$.root};g&&g(T.root);let k=!1;if(T.ctx=i?i(t,e.props||{},(w,F,...V)=>{const U=V.length?V[0]:F;return T.ctx&&a(T.ctx[w],T.ctx[w]=U)&&(!T.skip_bound&&T.bound[w]&&T.bound[w](U),k&&rg(t,w)),F}):[],T.update(),k=!0,Qt(T.before_update),T.fragment=r?r(T.ctx):!1,e.target){if(e.hydrate){const w=Wh(e.target);T.fragment&&T.fragment.l(w),w.forEach($)}else T.fragment&&T.fragment.c();e.intro&&X(t.$$.fragment),We(t,e.target,e.anchor,e.customElement),P()}Js(_)}class rt{$destroy(){je(this,1),this.$destroy=ue}$on(e,i){if(!xn(i))return ue;const r=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return r.push(i),()=>{const a=r.indexOf(i);a!==-1&&r.splice(a,1)}}$set(e){this.$$set&&!Bh(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const ng="@beyondwords/player",el="0.0.0-beta32",ir=(t,e)=>{t=[t].flat().join(`
6
6
  `);let i=`${ng}:
7
7
 
8
8
  ${t}`;if(e){i+=`
@@ -68,7 +68,7 @@ This context may be helpful:
68
68
  `),Yi=N("select"),rn=N("option"),rn.textContent="all",Ai=N("option"),Ai.textContent="body",nn=N("option"),nn.textContent="none",Pr=N("option"),Pr.textContent="all-none",_r=N("option"),_r.textContent="none-all",Un=Pe(),_n=N("div"),Gs=Ie(`segmentWidgetPosition:
69
69
  `),yr=N("select");for(let He=0;He<12;He+=1)as[He].c();Vn=Pe(),Qi&&Qi.c(),Mr=Pe(),zs=N("br"),ns=Pe(),wr.c(),Q(i,"class","heading svelte-g76q0j"),T.__value="small",T.value=T.__value,k.__value="standard",k.value=k.__value,w.__value="large",w.value=w.__value,F.__value="video",F.value=F.__value,Q(_,"tabindex",-1),Q(_,"class","svelte-g76q0j"),t[6]===void 0&&Ft(()=>t[43].call(_)),Q(g,"class","control svelte-g76q0j"),oe.__value="stopped",oe.value=oe.__value,ce.__value="playing",ce.value=ce.__value,ge.__value="paused",ge.value=ge.__value,Q(H,"tabindex",-1),Q(H,"class","svelte-g76q0j"),t[20]===void 0&&Ft(()=>t[44].call(H)),Q(U,"class","control svelte-g76q0j"),Q(ee,"tabindex",-1),Q(ee,"type","text"),Q(ee,"class","svelte-g76q0j"),Q(le,"class","control svelte-g76q0j"),Q(Je,"tabindex",-1),Q(Je,"type","text"),Q(Je,"class","svelte-g76q0j"),Q(ae,"class","control svelte-g76q0j"),Z.__value="auto",Z.value=Z.__value,B.__value="segments",B.value=B.__value,Ke.__value="seconds",Ke.value=Ke.__value,Ne.__value="seconds-15",Ne.value=Ne.__value,Ce.__value="seconds-15-30",Ce.value=Ce.__value,Ue.__value="tracks",Ue.value=Ue.__value,Q(K,"tabindex",-1),Q(K,"class","svelte-g76q0j"),t[9]===void 0&&Ft(()=>t[47].call(K)),Q(Re,"class","control svelte-g76q0j"),Le.__value="auto",Le.value=Le.__value,qe.__value="show",qe.value=qe.__value,Dt.__value="show-3",Dt.value=Dt.__value,Ct.__value="show-999",Ct.value=Ct.__value,$t.__value="hide",$t.value=$t.__value,Q(Ae,"tabindex",-1),Q(Ae,"class","svelte-g76q0j"),t[10]===void 0&&Ft(()=>t[48].call(Ae)),Q(pe,"class","control svelte-g76q0j"),Lt.__value="auto",Lt.value=Lt.__value,pt.__value="show",pt.value=pt.__value,St.__value="hide",St.value=St.__value,Q(ut,"tabindex",-1),Q(ut,"class","svelte-g76q0j"),t[11]===void 0&&Ft(()=>t[49].call(ut)),Q(Gt,"class","control svelte-g76q0j"),st.__value=-1,st.value=st.__value,Q(At,"tabindex",-1),Q(At,"class","svelte-g76q0j"),t[15]===void 0&&Ft(()=>t[50].call(At)),Q(Te,"class","control svelte-g76q0j"),Bt.__value="small",Bt.value=Bt.__value,Mt.__value="standard",Mt.value=Mt.__value,qt.__value="large",qt.value=qt.__value,ui.__value="video",ui.value=ui.__value,Q(Ot,"tabindex",-1),Q(Ot,"class","svelte-g76q0j"),t[22]===void 0&&Ft(()=>t[51].call(Ot)),Q(oi,"class","control svelte-g76q0j"),at.__value="auto",at.value=at.__value,fi.__value="left",fi.value=fi.__value,De.__value="center",De.value=De.__value,hi.__value="right",hi.value=hi.__value,Q(Nt,"tabindex",-1),Q(Nt,"class","svelte-g76q0j"),t[23]===void 0&&Ft(()=>t[52].call(Nt)),Q(ri,"class","control svelte-g76q0j"),_e.__value="auto",_e.value=_e.__value,gi.__value="400px",gi.value=gi.__value,vi.__value="30rem",vi.value=vi.__value,xi.__value="fit-content",xi.value=xi.__value,di.__value="initial",di.value=di.__value,Pi.__value="0",Pi.value=Pi.__value,Q(Wt,"tabindex",-1),Q(Wt,"class","svelte-g76q0j"),t[24]===void 0&&Ft(()=>t[53].call(Wt)),Q(et,"class","control svelte-g76q0j"),Q(Be,"tabindex",-1),Q(Be,"type","text"),Q(Be,"class","svelte-g76q0j"),Q(q,"class","control svelte-g76q0j"),Q(ni,"tabindex",-1),Q(ni,"type","text"),Q(ni,"class","svelte-g76q0j"),Q(ji,"class","control svelte-g76q0j"),Q(Gi,"tabindex",-1),Q(Gi,"type","text"),Q(Gi,"class","svelte-g76q0j"),Q(Zi,"class","control svelte-g76q0j"),Q(Di,"tabindex",-1),Q(Di,"type","text"),Q(Di,"class","svelte-g76q0j"),Q(Er,"class","control svelte-g76q0j"),Hi.__value="all",Hi.value=Hi.__value,Oi.__value="body",Oi.value=Oi.__value,Zt.__value="none",Zt.value=Zt.__value,Ki.__value="all-none",Ki.value=Ki.__value,Jt.__value="none-all",Jt.value=Jt.__value,Q(Si,"tabindex",-1),Q(Si,"class","svelte-g76q0j"),t[31]===void 0&&Ft(()=>t[58].call(Si)),Q(Ar,"class","control svelte-g76q0j"),be.__value="all",be.value=be.__value,ot.__value="body",ot.value=ot.__value,Br.__value="none",Br.value=Br.__value,xr.__value="all-none",xr.value=xr.__value,tn.__value="none-all",tn.value=tn.__value,Q(ye,"tabindex",-1),Q(ye,"class","svelte-g76q0j"),t[32]===void 0&&Ft(()=>t[59].call(ye)),Q(ei,"class","control svelte-g76q0j"),rn.__value="all",rn.value=rn.__value,Ai.__value="body",Ai.value=Ai.__value,nn.__value="none",nn.value=nn.__value,Pr.__value="all-none",Pr.value=Pr.__value,_r.__value="none-all",_r.value=_r.__value,Q(Yi,"tabindex",-1),Q(Yi,"class","svelte-g76q0j"),t[33]===void 0&&Ft(()=>t[60].call(Yi)),Q(pn,"class","control svelte-g76q0j"),Q(yr,"tabindex",-1),Q(yr,"class","svelte-g76q0j"),t[34]===void 0&&Ft(()=>t[61].call(yr)),Q(_n,"class","control svelte-g76q0j"),Q(e,"class","control-panel")},m(He,jt){te(He,e,jt),I(e,i),I(e,r),I(e,a),I(e,l),I(e,g),I(g,m),I(g,_),I(_,T),I(_,k),I(_,w),I(_,F),lt(_,t[6],!0),I(e,V),I(e,U),I(U,z),I(U,H),I(H,oe),I(H,ce),I(H,ge),lt(H,t[20],!0),I(e,me),I(e,le),I(le,Se),I(le,ee),Et(ee,t[7]),I(e,L),I(e,ae),I(ae,W),I(ae,Je),Et(Je,t[8]),I(e,we),I(e,Re),I(Re,Oe),I(Re,K),I(K,Z),I(K,B),I(K,Ke),I(K,Ne),I(K,Ce),I(K,Ue),lt(K,t[9],!0),I(e,ie),I(e,pe),I(pe,ft),I(pe,Ae),I(Ae,Le),I(Ae,qe),I(Ae,Dt),I(Ae,Ct),I(Ae,$t),lt(Ae,t[10],!0),I(e,bt),I(e,Gt),I(Gt,zt),I(Gt,ut),I(ut,Lt),I(ut,pt),I(ut,St),lt(ut,t[11],!0),I(e,Yt),I(e,Te),I(Te,yt),I(Te,At),I(At,st);for(let si=0;si<wi.length;si+=1)wi[si]&&wi[si].m(At,null);lt(At,t[15],!0),I(e,Ut),I(e,oi),I(oi,li),I(oi,Ot),I(Ot,Bt),I(Ot,Mt),I(Ot,qt),I(Ot,ui),lt(Ot,t[22],!0),I(e,Vt),I(e,ri),I(ri,yi),I(ri,Nt),I(Nt,at),I(Nt,fi),I(Nt,De),I(Nt,hi),lt(Nt,t[23],!0),I(e,Xt),I(e,et),I(et,ci),I(et,Wt),I(Wt,_e),I(Wt,gi),I(Wt,vi),I(Wt,xi),I(Wt,di),I(Wt,Pi),lt(Wt,t[24],!0),I(e,Ve),I(e,q),I(q,J),I(q,Be),Et(Be,t[26]),I(e,$r),I(e,ji),I(ji,en),I(ji,ni),Et(ni,t[27]),I(e,mr),I(e,Zi),I(Zi,Ji),I(Zi,Gi),Et(Gi,t[28]),I(e,lr),I(e,Er),I(Er,Ri),I(Er,Di),Et(Di,t[29]),I(e,ur),I(e,Ar),I(Ar,zi),I(Ar,Si),I(Si,Hi),I(Si,Oi),I(Si,Zt),I(Si,Ki),I(Si,Jt),lt(Si,t[31],!0),I(e,pr),I(e,ei),I(ei,G),I(ei,ye),I(ye,be),I(ye,ot),I(ye,Br),I(ye,xr),I(ye,tn),lt(ye,t[32],!0),I(e,Ws),I(e,pn),I(pn,js),I(pn,Yi),I(Yi,rn),I(Yi,Ai),I(Yi,nn),I(Yi,Pr),I(Yi,_r),lt(Yi,t[33],!0),I(e,Un),I(e,_n),I(_n,Gs),I(_n,yr);for(let si=0;si<12;si+=1)as[si]&&as[si].m(yr,null);lt(yr,t[34],!0),I(e,Vn),Qi&&Qi.m(e,null),I(e,Mr),I(e,zs),I(e,ns),wr.m(e,null),ss||(Wn=[ve(_,"change",t[43]),ve(H,"change",t[44]),ve(ee,"input",t[45]),ve(Je,"input",t[46]),ve(K,"change",t[47]),ve(Ae,"change",t[48]),ve(ut,"change",t[49]),ve(At,"change",t[50]),ve(Ot,"change",t[51]),ve(Nt,"change",t[52]),ve(Wt,"change",t[53]),ve(Be,"input",t[54]),ve(ni,"input",t[55]),ve(Gi,"input",t[56]),ve(Di,"input",t[57]),ve(Si,"change",t[58]),ve(ye,"change",t[59]),ve(Yi,"change",t[60]),ve(yr,"change",t[61])],ss=!0)},p(He,jt){if(jt[0]&64&&lt(_,He[6]),jt[0]&1048576&&lt(H,He[20]),jt[0]&128&&ee.value!==He[7]&&Et(ee,He[7]),jt[0]&256&&Je.value!==He[8]&&Et(Je,He[8]),jt[0]&512&&lt(K,He[9]),jt[0]&1024&&lt(Ae,He[10]),jt[0]&2048&&lt(ut,He[11]),jt[1]&1024){Nr=He[41];let si;for(si=0;si<Nr.length;si+=1){const os=kc(He,Nr,si);wi[si]?wi[si].p(os,jt):(wi[si]=Ec(os),wi[si].c(),wi[si].m(At,null))}for(;si<wi.length;si+=1)wi[si].d(1);wi.length=Nr.length}jt[0]&32768&&lt(At,He[15]),jt[0]&4194304&&lt(Ot,He[22]),jt[0]&8388608&&lt(Nt,He[23]),jt[0]&16777216&&lt(Wt,He[24]),jt[0]&67108864&&Be.value!==He[26]&&Et(Be,He[26]),jt[0]&134217728&&ni.value!==He[27]&&Et(ni,He[27]),jt[0]&268435456&&Gi.value!==He[28]&&Et(Gi,He[28]),jt[0]&536870912&&Di.value!==He[29]&&Et(Di,He[29]),jt[1]&1&&lt(Si,He[31]),jt[1]&2&&lt(ye,He[32]),jt[1]&4&&lt(Yi,He[33]),jt[1]&8&&lt(yr,He[34]),He[42]?Qi?Qi.p(He,jt):(Qi=Ac(He),Qi.c(),Qi.m(e,Mr)):Qi&&(Qi.d(1),Qi=null),Hs===(Hs=Aa(He))&&wr?wr.p(He,jt):(wr.d(1),wr=Hs(He),wr&&(wr.c(),wr.m(e,null)))},i:ue,o:ue,d(He){He&&$(e),Pn(wi,He),Pn(as,He),Qi&&Qi.d(),wr.d(),ss=!1,Qt(Wn)}}}function V1(t,e,i){let{projectId:r}=e,{contentId:a}=e,{playlistId:l}=e,{sourceId:g}=e,{sourceUrl:m}=e,{showUserInterface:_}=e,{playerStyle:T}=e,{playerTitle:k}=e,{callToAction:w}=e,{skipButtonStyle:F}=e,{playlistStyle:V}=e,{playlistToggle:U}=e,{mediaSession:z}=e,{content:H}=e,{contentIndex:oe}=e,{introsOutros:ce}=e,{introsOutrosIndex:ge}=e,{adverts:me}=e,{advertIndex:le}=e,{persistentAdImage:Se}=e,{persistentIndex:ee}=e,{duration:L}=e,{currentTime:ae}=e,{playbackState:W}=e,{playbackRate:Je}=e,{widgetStyle:we}=e,{widgetPosition:Re}=e,{widgetWidth:Oe}=e,{widgetTarget:K}=e,{textColor:Z}=e,{backgroundColor:B}=e,{iconColor:Ke}=e,{highlightColor:Ne}=e,{logoIconEnabled:Ce}=e,{highlightSections:Ue}=e,{clickableSections:ie}=e,{segmentWidgetSections:pe}=e,{segmentWidgetPosition:ft}=e,{advertConsent:Ae}=e,{analyticsConsent:Le}=e,{analyticsCustomUrl:qe}=e,{analyticsTag:Dt}=e,Ct=!1;function $t(){T=mi(this),i(6,T)}function bt(){W=mi(this),i(20,W)}function Gt(){k=this.value,i(7,k)}function zt(){w=this.value,i(8,w)}function ut(){F=mi(this),i(9,F)}function Lt(){V=mi(this),i(10,V)}function pt(){U=mi(this),i(11,U)}function St(){le=mi(this),i(15,le)}function Yt(){we=mi(this),i(22,we)}function Te(){Re=mi(this),i(23,Re)}function yt(){Oe=mi(this),i(24,Oe)}function At(){Z=this.value,i(26,Z)}function st(){B=this.value,i(27,B)}function Ut(){Ke=this.value,i(28,Ke)}function oi(){Ne=this.value,i(29,Ne)}function li(){Ue=mi(this),i(31,Ue)}function Ot(){ie=mi(this),i(32,ie)}function Bt(){pe=mi(this),i(33,pe)}function Mt(){ft=mi(this),i(34,ft)}function qt(){r=this.value,i(0,r)}function ui(){a=this.value,i(1,a)}function Vt(){l=this.value,i(2,l)}function ri(){g=this.value,i(3,g)}function yi(){m=this.value,i(4,m)}function Nt(){_=mi(this),i(5,_)}function at(){z=mi(this),i(12,z)}function fi(){oe=mi(this),i(13,oe)}function De(){ge=mi(this),i(14,ge)}function hi(){Se=mi(this),i(16,Se)}function Xt(){ee=mi(this),i(17,ee)}function et(){L=this.value,i(18,L)}function ci(){ae=this.value,i(19,ae)}function Wt(){Je=this.value,i(21,Je)}function _e(){K=this.value,i(25,K)}function gi(){Ce=mi(this),i(30,Ce)}function vi(){Ae=mi(this),i(35,Ae)}function xi(){Le=mi(this),i(36,Le)}function di(){qe=this.value,i(37,qe)}function Pi(){Dt=this.value,i(38,Dt)}const Ve=()=>i(42,Ct=!1),q=()=>i(42,Ct=!0);return t.$$set=J=>{"projectId"in J&&i(0,r=J.projectId),"contentId"in J&&i(1,a=J.contentId),"playlistId"in J&&i(2,l=J.playlistId),"sourceId"in J&&i(3,g=J.sourceId),"sourceUrl"in J&&i(4,m=J.sourceUrl),"showUserInterface"in J&&i(5,_=J.showUserInterface),"playerStyle"in J&&i(6,T=J.playerStyle),"playerTitle"in J&&i(7,k=J.playerTitle),"callToAction"in J&&i(8,w=J.callToAction),"skipButtonStyle"in J&&i(9,F=J.skipButtonStyle),"playlistStyle"in J&&i(10,V=J.playlistStyle),"playlistToggle"in J&&i(11,U=J.playlistToggle),"mediaSession"in J&&i(12,z=J.mediaSession),"content"in J&&i(39,H=J.content),"contentIndex"in J&&i(13,oe=J.contentIndex),"introsOutros"in J&&i(40,ce=J.introsOutros),"introsOutrosIndex"in J&&i(14,ge=J.introsOutrosIndex),"adverts"in J&&i(41,me=J.adverts),"advertIndex"in J&&i(15,le=J.advertIndex),"persistentAdImage"in J&&i(16,Se=J.persistentAdImage),"persistentIndex"in J&&i(17,ee=J.persistentIndex),"duration"in J&&i(18,L=J.duration),"currentTime"in J&&i(19,ae=J.currentTime),"playbackState"in J&&i(20,W=J.playbackState),"playbackRate"in J&&i(21,Je=J.playbackRate),"widgetStyle"in J&&i(22,we=J.widgetStyle),"widgetPosition"in J&&i(23,Re=J.widgetPosition),"widgetWidth"in J&&i(24,Oe=J.widgetWidth),"widgetTarget"in J&&i(25,K=J.widgetTarget),"textColor"in J&&i(26,Z=J.textColor),"backgroundColor"in J&&i(27,B=J.backgroundColor),"iconColor"in J&&i(28,Ke=J.iconColor),"highlightColor"in J&&i(29,Ne=J.highlightColor),"logoIconEnabled"in J&&i(30,Ce=J.logoIconEnabled),"highlightSections"in J&&i(31,Ue=J.highlightSections),"clickableSections"in J&&i(32,ie=J.clickableSections),"segmentWidgetSections"in J&&i(33,pe=J.segmentWidgetSections),"segmentWidgetPosition"in J&&i(34,ft=J.segmentWidgetPosition),"advertConsent"in J&&i(35,Ae=J.advertConsent),"analyticsConsent"in J&&i(36,Le=J.analyticsConsent),"analyticsCustomUrl"in J&&i(37,qe=J.analyticsCustomUrl),"analyticsTag"in J&&i(38,Dt=J.analyticsTag)},[r,a,l,g,m,_,T,k,w,F,V,U,z,oe,ge,le,Se,ee,L,ae,W,Je,we,Re,Oe,K,Z,B,Ke,Ne,Ce,Ue,ie,pe,ft,Ae,Le,qe,Dt,H,ce,me,Ct,$t,bt,Gt,zt,ut,Lt,pt,St,Yt,Te,yt,At,st,Ut,oi,li,Ot,Bt,Mt,qt,ui,Vt,ri,yi,Nt,at,fi,De,hi,Xt,et,ci,Wt,_e,gi,vi,xi,di,Pi,Ve,q]}class W1 extends rt{constructor(e){super(),it(this,e,V1,U1,Xe,{projectId:0,contentId:1,playlistId:2,sourceId:3,sourceUrl:4,showUserInterface:5,playerStyle:6,playerTitle:7,callToAction:8,skipButtonStyle:9,playlistStyle:10,playlistToggle:11,mediaSession:12,content:39,contentIndex:13,introsOutros:40,introsOutrosIndex:14,adverts:41,advertIndex:15,persistentAdImage:16,persistentIndex:17,duration:18,currentTime:19,playbackState:20,playbackRate:21,widgetStyle:22,widgetPosition:23,widgetWidth:24,widgetTarget:25,textColor:26,backgroundColor:27,iconColor:28,highlightColor:29,logoIconEnabled:30,highlightSections:31,clickableSections:32,segmentWidgetSections:33,segmentWidgetPosition:34,advertConsent:35,analyticsConsent:36,analyticsCustomUrl:37,analyticsTag:38},null,[-1,-1,-1])}get projectId(){return this.$$.ctx[0]}set projectId(e){this.$$set({projectId:e}),P()}get contentId(){return this.$$.ctx[1]}set contentId(e){this.$$set({contentId:e}),P()}get playlistId(){return this.$$.ctx[2]}set playlistId(e){this.$$set({playlistId:e}),P()}get sourceId(){return this.$$.ctx[3]}set sourceId(e){this.$$set({sourceId:e}),P()}get sourceUrl(){return this.$$.ctx[4]}set sourceUrl(e){this.$$set({sourceUrl:e}),P()}get showUserInterface(){return this.$$.ctx[5]}set showUserInterface(e){this.$$set({showUserInterface:e}),P()}get playerStyle(){return this.$$.ctx[6]}set playerStyle(e){this.$$set({playerStyle:e}),P()}get playerTitle(){return this.$$.ctx[7]}set playerTitle(e){this.$$set({playerTitle:e}),P()}get callToAction(){return this.$$.ctx[8]}set callToAction(e){this.$$set({callToAction:e}),P()}get skipButtonStyle(){return this.$$.ctx[9]}set skipButtonStyle(e){this.$$set({skipButtonStyle:e}),P()}get playlistStyle(){return this.$$.ctx[10]}set playlistStyle(e){this.$$set({playlistStyle:e}),P()}get playlistToggle(){return this.$$.ctx[11]}set playlistToggle(e){this.$$set({playlistToggle:e}),P()}get mediaSession(){return this.$$.ctx[12]}set mediaSession(e){this.$$set({mediaSession:e}),P()}get content(){return this.$$.ctx[39]}set content(e){this.$$set({content:e}),P()}get contentIndex(){return this.$$.ctx[13]}set contentIndex(e){this.$$set({contentIndex:e}),P()}get introsOutros(){return this.$$.ctx[40]}set introsOutros(e){this.$$set({introsOutros:e}),P()}get introsOutrosIndex(){return this.$$.ctx[14]}set introsOutrosIndex(e){this.$$set({introsOutrosIndex:e}),P()}get adverts(){return this.$$.ctx[41]}set adverts(e){this.$$set({adverts:e}),P()}get advertIndex(){return this.$$.ctx[15]}set advertIndex(e){this.$$set({advertIndex:e}),P()}get persistentAdImage(){return this.$$.ctx[16]}set persistentAdImage(e){this.$$set({persistentAdImage:e}),P()}get persistentIndex(){return this.$$.ctx[17]}set persistentIndex(e){this.$$set({persistentIndex:e}),P()}get duration(){return this.$$.ctx[18]}set duration(e){this.$$set({duration:e}),P()}get currentTime(){return this.$$.ctx[19]}set currentTime(e){this.$$set({currentTime:e}),P()}get playbackState(){return this.$$.ctx[20]}set playbackState(e){this.$$set({playbackState:e}),P()}get playbackRate(){return this.$$.ctx[21]}set playbackRate(e){this.$$set({playbackRate:e}),P()}get widgetStyle(){return this.$$.ctx[22]}set widgetStyle(e){this.$$set({widgetStyle:e}),P()}get widgetPosition(){return this.$$.ctx[23]}set widgetPosition(e){this.$$set({widgetPosition:e}),P()}get widgetWidth(){return this.$$.ctx[24]}set widgetWidth(e){this.$$set({widgetWidth:e}),P()}get widgetTarget(){return this.$$.ctx[25]}set widgetTarget(e){this.$$set({widgetTarget:e}),P()}get textColor(){return this.$$.ctx[26]}set textColor(e){this.$$set({textColor:e}),P()}get backgroundColor(){return this.$$.ctx[27]}set backgroundColor(e){this.$$set({backgroundColor:e}),P()}get iconColor(){return this.$$.ctx[28]}set iconColor(e){this.$$set({iconColor:e}),P()}get highlightColor(){return this.$$.ctx[29]}set highlightColor(e){this.$$set({highlightColor:e}),P()}get logoIconEnabled(){return this.$$.ctx[30]}set logoIconEnabled(e){this.$$set({logoIconEnabled:e}),P()}get highlightSections(){return this.$$.ctx[31]}set highlightSections(e){this.$$set({highlightSections:e}),P()}get clickableSections(){return this.$$.ctx[32]}set clickableSections(e){this.$$set({clickableSections:e}),P()}get segmentWidgetSections(){return this.$$.ctx[33]}set segmentWidgetSections(e){this.$$set({segmentWidgetSections:e}),P()}get segmentWidgetPosition(){return this.$$.ctx[34]}set segmentWidgetPosition(e){this.$$set({segmentWidgetPosition:e}),P()}get advertConsent(){return this.$$.ctx[35]}set advertConsent(e){this.$$set({advertConsent:e}),P()}get analyticsConsent(){return this.$$.ctx[36]}set analyticsConsent(e){this.$$set({analyticsConsent:e}),P()}get analyticsCustomUrl(){return this.$$.ctx[37]}set analyticsCustomUrl(e){this.$$set({analyticsCustomUrl:e}),P()}get analyticsTag(){return this.$$.ctx[38]}set analyticsTag(e){this.$$set({analyticsTag:e}),P()}}const j1=(t,e,i)=>{H1(t);const r=new Image;return r.setAttribute("crossorigin","anonymous"),new Promise((a,l)=>{r.addEventListener("load",G1(r,e,i,a,l)),r.addEventListener("error",l),r.src=t})},G1=(t,e,i,r,a)=>()=>{const l=document.createElement("canvas"),g=l.getContext("2d");l.width=e,l.height=i,g.drawImage(t,0,0,e,i),l.toBlob(z1(t,e,i,r,a))},Es={},z1=(t,e,i,r,a)=>l=>{var m;l||a();const g=URL.createObjectURL(l);Es[m=t.src]||(Es[m]=[]),Es[t.src].push(g),r({src:g,sizes:`${e}x${i}`,type:"image/png"})},H1=t=>{Object.keys(Es).filter(r=>r!==t).map(r=>Es[r]).flat().forEach(r=>URL.revokeObjectURL(r))},K1=(t,e,i)=>ln(this,null,function*(){t=yield t;const r=t.innerHTML;return{src:`data:image/svg+xml,${encodeURIComponent(r)}`,sizes:`${e}x${i}`,type:"image/svg+xml"}}),Y1=(t,e,i)=>Ci(t,e,i,1),q1=(t,e,i)=>nt(t,e,e==="style"?Z1(i):i),X1=/;(?!([^()]*\([^()]*\))*[^()]*\))/,Z1=t=>t.split(X1).map(e=>e+" !important").join(";");function Cc(t,e,i){const r=t.slice();return r[39]=e[i],r[40]=e,r[41]=i,r}function Lc(t){let e,i,r,a=t[41],l;i=new ec({props:{fill:t[2],color:t[1],scale:t[39]/18,zoom:.65}});const g=()=>t[36](e,a),m=()=>t[36](null,a);return{c(){e=N("div"),ze(i.$$.fragment),r=Pe(),Y1(e,"display","none")},m(_,T){te(_,e,T),We(i,e,null),I(e,r),g(),l=!0},p(_,T){t=_;const k={};T[0]&4&&(k.fill=t[2]),T[0]&2&&(k.color=t[1]),i.$set(k),a!==t[41]&&(m(),a=t[41],g())},i(_){l||(X(i.$$.fragment,_),l=!0)},o(_){se(i.$$.fragment,_),l=!1},d(_){_&&$(e),je(i),m()}}}function J1(t){let e,i,r=t[3],a=[];for(let g=0;g<r.length;g+=1)a[g]=Lc(Cc(t,r,g));const l=g=>se(a[g],1,1,()=>{a[g]=null});return{c(){e=N("div");for(let g=0;g<a.length;g+=1)a[g].c();q1(e,"class","media-session")},m(g,m){te(g,e,m);for(let _=0;_<a.length;_+=1)a[_]&&a[_].m(e,null);i=!0},p(g,m){if(m[0]&15){r=g[3];let _;for(_=0;_<r.length;_+=1){const T=Cc(g,r,_);a[_]?(a[_].p(T,m),X(a[_],1)):(a[_]=Lc(T),a[_].c(),X(a[_],1),a[_].m(e,null))}for(xt(),_=r.length;_<a.length;_+=1)l(_);Pt()}},i(g){if(!i){for(let m=0;m<r.length;m+=1)X(a[m]);i=!0}},o(g){a=a.filter(Boolean);for(let m=0;m<a.length;m+=1)se(a[m]);i=!1},d(g){g&&$(e),Pn(a,g)}}}function Q1(t,e,i){let r,a,l,g,m,_,T,k,w,F,V,U,z,H,oe,ce,ge,me,le,Se,ee;const L=[96,128,192,256,384,512],ae=["hangup","nextslide","nexttrack","pause","play","previousslide","previoustrack","seekbackward","seekforward","seekto","skipad","stop","togglecamera","togglemicrophone"];let{content:W=[]}=e,{contentIndex:Je=0}=e,{activeAdvert:we=void 0}=e,{persistentAdvert:Re=void 0}=e,{duration:Oe=0}=e,{playbackState:K="stopped"}=e,{skipButtonStyle:Z="auto"}=e,{backgroundColor:B="#f5f5f5"}=e,{iconColor:Ke="black"}=e,{onEvent:Ne=()=>{}}=e,Ce=[],Ue=new Set,ie=L.map(()=>{}),pe=L.map(()=>{});const ft=()=>i(15,Ue=Ue.add(H));function Ae(Le,qe){Fe[Le?"unshift":"push"](()=>{ie[qe]=Le,i(0,ie)})}return t.$$set=Le=>{"content"in Le&&i(4,W=Le.content),"contentIndex"in Le&&i(5,Je=Le.contentIndex),"activeAdvert"in Le&&i(6,we=Le.activeAdvert),"persistentAdvert"in Le&&i(7,Re=Le.persistentAdvert),"duration"in Le&&i(8,Oe=Le.duration),"playbackState"in Le&&i(9,K=Le.playbackState),"skipButtonStyle"in Le&&i(10,Z=Le.skipButtonStyle),"backgroundColor"in Le&&i(11,B=Le.backgroundColor),"iconColor"in Le&&i(12,Ke=Le.iconColor),"onEvent"in Le&&i(13,Ne=Le.onEvent)},t.$$.update=()=>{t.$$.dirty[0]&512&&i(33,r=K==="stopped"),t.$$.dirty[0]&64|t.$$.dirty[1]&4&&i(34,a=we&&!r),t.$$.dirty[0]&16&&i(35,l=W.length>1),t.$$.dirty[0]&48&&i(27,g=W[Je]),t.$$.dirty[0]&1024|t.$$.dirty[1]&16&&i(19,m=Z==="auto"?l?"tracks":"segments":Z),t.$$.dirty[0]&524288&&i(21,_=parseFloat(m.split("-")[1]||10)),t.$$.dirty[0]&2621440&&i(18,T=parseFloat(m.split("-")[2]||_)),t.$$.dirty[0]&524288|t.$$.dirty[1]&8&&i(20,k=!a&&m!=="tracks"),t.$$.dirty[0]&524288|t.$$.dirty[1]&8&&i(17,w=!a&&m==="tracks"),t.$$.dirty[1]&8&&i(22,F=!a),t.$$.dirty[0]&2112|t.$$.dirty[1]&8&&i(2,V=a&&(we==null?void 0:we.backgroundColor)||B),t.$$.dirty[0]&4160|t.$$.dirty[1]&8&&i(1,U=a&&(we==null?void 0:we.iconColor)||Ke),t.$$.dirty[0]&7&&i(16,pe=L.map((Le,qe)=>Zh().then(()=>ie[qe]))),t.$$.dirty[0]&134217920|t.$$.dirty[1]&12&&i(32,z=a&&we.imageUrl||!r&&(Re==null?void 0:Re.imageUrl)||(g==null?void 0:g.imageUrl)),t.$$.dirty[0]&32768|t.$$.dirty[1]&2&&i(28,H=Ue.has(z)?null:z),t.$$.dirty[0]&268435456&&i(31,oe=H?L.map(Le=>j1(H,Le,Le)):[]),t.$$.dirty[0]&268435456&&i(30,ce=H?[{src:H,sizes:"any"}]:[]),t.$$.dirty[0]&268500992&&i(29,ge=H?[]:L.map((Le,qe)=>K1(pe[qe],Le,Le))),t.$$.dirty[0]&1610612736|t.$$.dirty[1]&1&&i(26,me=Promise.all([...oe,...ce,...ge])),t.$$.dirty[0]&134217728&&i(25,le=(g==null?void 0:g.title)||""),t.$$.dirty[0]&67108864&&me.then(Le=>i(14,Ce=Le)).catch(ft),t.$$.dirty[0]&58736640&&(navigator.mediaSession.metadata=new MediaMetadata({title:le,artist:Se,album:ee,artwork:Ce})),t.$$.dirty[0]&8192&&navigator.mediaSession.setActionHandler("play",()=>{Ne(Ze({type:"PressedPlay",description:"The play button was pressed.",initiatedBy:"media-session-api"}))}),t.$$.dirty[0]&8192&&navigator.mediaSession.setActionHandler("pause",()=>{Ne(Ze({type:"PressedPause",description:"The pause button was pressed.",initiatedBy:"media-session-api"}))}),t.$$.dirty[0]&4202752&&navigator.mediaSession.setActionHandler("seekto",F?({seekTime:Le})=>{Ne(Ze({type:"ScrubbedProgressBar",description:"The user pressed on the progress bar then dragged.",initiatedBy:"media-session-api",ratio:Math.max(0,Math.min(1,Le/Oe))}))}:null),t.$$.dirty[0]&3678208&&navigator.mediaSession.setActionHandler("seekbackward",k?({seekOffset:Le})=>{Ne(Ze(m==="seconds"||Le?{type:"PressedSeekBack",description:"The seek backward button was pressed.",initiatedBy:"media-session-api",seconds:Le||_}:{type:"PressedPrevSegment",description:"The previous segment button was pressed.",initiatedBy:"media-session-api"}))}:null),t.$$.dirty[0]&1843200&&navigator.mediaSession.setActionHandler("seekforward",k?({seekOffset:Le})=>{Ne(Ze(m==="seconds"||Le?{type:"PressedSeekAhead",description:"The seek ahead button was pressed.",initiatedBy:"media-session-api",seconds:Le||T}:{type:"PressedNextSegment",description:"The next segment button was pressed.",initiatedBy:"media-session-api"}))}:null),t.$$.dirty[0]&139264&&navigator.mediaSession.setActionHandler("previoustrack",w?()=>{Ne(Ze({type:"PressedPrevTrack",description:"The previous track button was pressed.",initiatedBy:"media-session-api"}))}:null),t.$$.dirty[0]&139264&&navigator.mediaSession.setActionHandler("nexttrack",w?()=>{Ne(Ze({type:"PressedNextTrack",description:"The next track button was pressed.",initiatedBy:"media-session-api"}))}:null)},i(24,Se=""),i(23,ee=""),navigator.mediaSession.setByPlayer=!0,ae.forEach(Le=>{try{navigator.mediaSession.setActionHandler(Le,null)}catch(qe){}}),[ie,U,V,L,W,Je,we,Re,Oe,K,Z,B,Ke,Ne,Ce,Ue,pe,w,T,m,k,_,F,ee,Se,le,me,g,H,ge,ce,oe,z,r,a,l,Ae]}class $1 extends rt{constructor(e){super(),it(this,e,Q1,J1,Xe,{content:4,contentIndex:5,activeAdvert:6,persistentAdvert:7,duration:8,playbackState:9,skipButtonStyle:10,backgroundColor:11,iconColor:12,onEvent:13},null,[-1,-1])}get content(){return this.$$.ctx[4]}set content(e){this.$$set({content:e}),P()}get contentIndex(){return this.$$.ctx[5]}set contentIndex(e){this.$$set({contentIndex:e}),P()}get activeAdvert(){return this.$$.ctx[6]}set activeAdvert(e){this.$$set({activeAdvert:e}),P()}get persistentAdvert(){return this.$$.ctx[7]}set persistentAdvert(e){this.$$set({persistentAdvert:e}),P()}get duration(){return this.$$.ctx[8]}set duration(e){this.$$set({duration:e}),P()}get playbackState(){return this.$$.ctx[9]}set playbackState(e){this.$$set({playbackState:e}),P()}get skipButtonStyle(){return this.$$.ctx[10]}set skipButtonStyle(e){this.$$set({skipButtonStyle:e}),P()}get backgroundColor(){return this.$$.ctx[11]}set backgroundColor(e){this.$$set({backgroundColor:e}),P()}get iconColor(){return this.$$.ctx[12]}set iconColor(e){this.$$set({iconColor:e}),P()}get onEvent(){return this.$$.ctx[13]}set onEvent(e){this.$$set({onEvent:e}),P()}}const Ic=(t,e,i)=>nt(t,e,e==="style"?tb(i):i),eb=/;(?!([^()]*\([^()]*\))*[^()]*\))/,tb=t=>t.split(eb).map(e=>e+" !important").join(";");function Rc(t){let e,i,r,a;return{c(){e=N("script"),r=Pe(),a=N("script"),a.textContent=`window.dataLayer = window.dataLayer || [];
70
70
  function gtag() { dataLayer.push(arguments); }
71
- gtag("js", new Date());`,e.async=!0,Lr(e.src,i="https://www.googletagmanager.com/gtag/js?id="+t[0])||Ic(e,"src",i)},m(l,g){te(l,e,g),te(l,r,g),te(l,a,g)},p(l,g){g&1&&!Lr(e.src,i="https://www.googletagmanager.com/gtag/js?id="+l[0])&&Ic(e,"src",i)},d(l){l&&$(e),l&&$(r),l&&$(a)}}}function ib(t){let e,i=!t[1]&&Rc(t);return{c(){i&&i.c(),e=qn()},m(r,a){i&&i.m(document.head,null),I(document.head,e)},p(r,[a]){r[1]?i&&(i.d(1),i=null):i?i.p(r,a):(i=Rc(r),i.c(),i.m(e.parentNode,e))},i:ue,o:ue,d(r){i&&i.d(r),$(e)}}}function rb(t,e,i){let r,{analyticsTag:a}=e;return t.$$set=l=>{"analyticsTag"in l&&i(0,a=l.analyticsTag)},i(1,r=window.gtag),[a,r]}class nb extends rt{constructor(e){super(),it(this,e,rb,ib,Xe,{analyticsTag:0})}get analyticsTag(){return this.$$.ctx[0]}set analyticsTag(e){this.$$set({analyticsTag:e}),P()}}const ux="";class sb extends rt{constructor(e){super(),it(this,e,null,null,Xe,{})}}class pl{constructor(e,i){ht(this,pa);ht(this,_o);this.onSelected=e,this.onDeselected=i,this.consumers={}}addInterest(e,i,...r){var l;(l=this.consumers)[e]||(l[e]=[]);const a=this.consumers[e].slice(-1)[0];this.consumers[e].push({consumerId:i,args:r}),!(a&&de(this,pa,_u).call(this,r,a.args))&&(a&&this.onDeselected(e,...a.args),this.onSelected(e,...r))}removeInterest(e,i){var g;(g=this.consumers)[e]||(g[e]=[]);const r=this.consumers[e].slice(-1)[0];if(de(this,_o,vh).call(this,this.consumers[e],m=>m.consumerId===i),!(r&&i===r.consumerId))return;const l=this.consumers[e].slice(-1)[0];l&&de(this,pa,_u).call(this,r.args,l.args)||(this.onDeselected(e,...r.args),l&&this.onSelected(e,...l.args))}}pa=new WeakSet,_u=function(e,i){return e.length===i.length&&e.every((r,a)=>r===i[a])},_o=new WeakSet,vh=function(e,i){for(let r=e.length-1;r>=0;r-=1)if(i(e[r])){e.splice(r,1);return}};const ia=(t,e,i)=>{let[r,a]=i.split("-");r||(r="none"),a||(a=r);const l=t==="current"?r:a;return l==="all"||l==="body"&&(e==null?void 0:e.section)==="body"},In="data-beyondwords-marker",Dc=t=>["beyondwords-highlight","bwp",`marker-${t}`],Fs=class{update(e,i,r,a){const l=ia(e,i,r),g=this[`prev${e}`],m=l?i==null?void 0:i.marker:null;m&&Wr(Fs,_a).addInterest(m,this,a),g&&Wr(Fs,_a).removeInterest(g,this),this[`prev${e}`]=m}};let As=Fs;_a=new WeakMap,yo=new WeakSet,mh=function(e,i){const r=document.querySelectorAll(`[${In}="${e}"]`);for(const a of r){const l=document.createTreeWalker(a,NodeFilter.SHOW_TEXT,null,!1);let g;for(;g=l.nextNode();){if(/^\s*$/.test(g.nodeValue))continue;g.parentNode.nodeName.toLowerCase()==="a"&&(g=g.parentNode);const T=document.createElement("mark");T.classList.add(...Dc(e)),T.style.background=i,g.parentNode.insertBefore(T,g),T.appendChild(g)}}},bo=new WeakSet,ph=function(e){const i=document.querySelectorAll(`[${In}="${e}"]`);for(const r of i){const a=r.querySelectorAll(`mark.${Dc(e)}`);for(const l of a)for(const g of l.childNodes)l.parentNode.insertBefore(g,l),l.remove()}},ht(As,yo),ht(As,bo),ht(As,_a,new pl(de(Fs,yo,mh),de(Fs,bo,ph)));const Oc=["beyondwords-clickable","bwp"],Us=class{update(e,i){const r=ia("hovered",e,i),a=this.previous,l=r?e==null?void 0:e.marker:null;l&&Wr(Us,ya).addInterest(l,this),a&&Wr(Us,ya).removeInterest(a,this),this.previous=l}};let xs=Us;ya=new WeakMap,So=new WeakSet,_h=function(e){const i=document.querySelectorAll(`[${In}="${e}"]`);for(const r of i)r.classList.add(...Oc)},To=new WeakSet,yh=function(e){const i=document.querySelectorAll(`[${In}="${e}"]`);for(const r of i)Bc(r,Oc)},ht(xs,So),ht(xs,To),ht(xs,ya,new pl(de(Us,So,_h),de(Us,To,yh)));const Bc=(t,e)=>{if(!t)return;const a=[...t.classList].filter(l=>!e.includes(l)).some(l=>l.startsWith("beyondwords-"))?e.filter(l=>l!=="bwp"):e;t.classList.remove(...a)},Mc=(t,e,i)=>["beyondwords-widget","bwp",`marker-${t}`,`position-${e}`,`for-${i}-player`],Nc=["beyondwords-relative","bwp"],Vs=class{constructor(e){this.onUpdate=e,this.containers=[]}update(e,i,r,a){const l=i.includes("all")||i.includes("body"),g=this.previous,m=(e==null?void 0:e.marker)||l&&(g==null?void 0:g.marker);m&&Wr(Vs,ba).addInterest(m,this,this,r,a),g&&Wr(Vs,ba).removeInterest(g,this),this.previous=m}reset(){this.update(null,"none")}};let Ps=Vs;ba=new WeakMap,ko=new WeakSet,bh=function(e,i,r,a){const l=document.querySelector(`[${In}="${e}"]`),g=document.createElement("div");["2-oclock","3-oclock","4-oclock","8-oclock","9-oclock","10-oclock"].includes(r)&&l.classList.add(...Nc),g.classList.add(...Mc(e,r,a)),["11-oclock","12-oclock","1-oclock"].includes(r)?l.insertBefore(g,l.firstChild):l.appendChild(g),i.containers.push(g),i.onUpdate(i.containers)},Eo=new WeakSet,Sh=function(e,i,r,a){const l=Mc(e,r,a);for(let g=0;g<i.containers.length;g+=1){if(!l.every(T=>i.containers[g].classList.contains(T)))continue;const _=i.containers[g].parentNode;Bc(_,Nc),i.containers[g].remove(),i.containers.splice(g,1),g-=1}i.onUpdate(i.containers)},ht(Ps,ko),ht(Ps,Eo),ht(Ps,ba,new pl(de(Vs,ko,bh),de(Vs,Eo,Sh)));const ab=()=>Ze({type:"IdentifiersChanged",description:"The Player's content identifiers changed.",initiatedBy:"browser"}),Zn=(i,...r)=>ln(this,[i,...r],function*(t,e={}){const a=yield fetch(t,e).catch(()=>{}),l=yield a==null?void 0:a.json().catch(()=>{});return(a==null?void 0:a.status)!==200&&ir(`Failed to fetch ${t}`,ii(fe({},e),{responseStatus:a==null?void 0:a.status,responseJson:l})),l}),ob=(t,e)=>Zn(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e,(i,r)=>r===void 0?null:r)});class lb{constructor(e,i,r){ht(this,Ao);this.baseUrl=de(this,Ao,Th).call(this,e),this.projectId=i,this.writeToken=r}getWebSocketToken(){return ln(this,null,function*(){const e={Authorization:`Token token=${this.writeToken}`},{token:i}=yield Zn(`https://${this.baseUrl}/api/v4/token/ws`,{headers:e});this.webSocketToken=i})}establishConnection(e,i){return ln(this,null,function*(){const r=`wss://${this.baseUrl}/cable?token=${this.webSocketToken}`,a="actioncable-v1-json";this.webSocket=new WebSocket(r,a),this.webSocket.onmessage=l=>e(JSON.parse(l.data)),this.webSocket.onerror=i,yield new Promise(l=>this.webSocket.onopen=l)})}subscribeToStatusChanges(){const e=JSON.stringify({channel:"Api::V1::ProjectChannel",id:this.projectId}),i=JSON.stringify({command:"subscribe",identifier:e});this.webSocket.send(i)}destroy(){this.webSocketToken=null,this.webSocket&&(this.webSocket.onmessage=()=>{},this.webSocket.onerror=()=>{},this.webSocket.close(),this.webSocket=null)}}Ao=new WeakSet,Th=function(e){return e.includes("staging")?"app.staging-beyondwords.io":"app.beyondwords.io"};let Jn;const ub=(t,e,i,r)=>ln(this,null,function*(){!t||!e||!i||(Jn==null||Jn.destroy(),Jn=new lb(t,e,i),yield Jn.getWebSocketToken(),yield Jn.establishConnection(cb(r),hb),yield Jn.subscribeToStatusChanges())}),cb=t=>e=>{var a,l;((l=(a=e==null?void 0:e.message)==null?void 0:a.result)==null?void 0:l.action)==="podcast_state_updated"&&db(e,t),e.type==="reject_subscription"&&fb(e)},db=(t,e)=>{const i=t.message.result;e(Ze({type:"ContentStatusChanged",description:"The processing status of a content item within the project changed.",initiatedBy:"websocket",contentId:i.content_id,legacyId:i.legacy_id,sourceId:i.source_id,sourceUrl:i.source_url,contentStatus:i.state}))},fb=t=>{ir("The WebSocket status change subscription was rejected.",{webSocketEvent:t})},hb=t=>{ir("Unexpected WebSocket error.",{error:t})},Fc=t=>{if(!t())return new Promise(e=>{setInterval(()=>t()&&e(),10)})},ra=t=>{const i=Object.keys(t.$$.props).filter(r=>!gb.has(r)).map(r=>[r,t[r]]);return Object.fromEntries(i)},gb=new Set(["addEventListener","removeEventListener","mediaElement","userInterface","widgetInterface","controller"]),Uc=(t,e)=>{const i=new Set([...Object.keys(t),...Object.keys(e)]),r={};for(const a of i){const l=t[a],g=e[a];l!==g&&(r[a]={previousValue:l,currentValue:g})}return r};let na=-1;const Vc=[],vb=(t,e,i)=>ln(this,null,function*(){yield Fc(()=>e.player);const r=e.player,a=mb(r.contentIndex,i,t);a>na&&pb(r,na,a,t),a<na&&_b(r,na,a),na=a}),mb=(t,e,i)=>{const r=i.findIndex(l=>l[0]===t&&l[1]>e||l[0]>t);return r===-1?i.length-1:r-1},pb=(t,e,i,r)=>{for(let a=e+1;a<=i;a+=1){const l=ra(t);r[a][2](t);const g=ra(t),m=Uc(l,g);Vc.push(m)}},_b=(t,e,i)=>{for(let r=e;r>i;r-=1){const a=Vc.pop();for(const[l,g]of Object.entries(a))t[l]=g.previousValue}},yb=t=>t?bb(t)?{newTarget:Tb(t),showUserInterface:!0}:typeof t=="string"?{newTarget:_l(t),showUserInterface:!0}:{newTarget:t,showUserInterface:!0}:{newTarget:Sb(),showUserInterface:!1},bb=t=>typeof t=="object"&&t.nodeName.toLowerCase()==="script",Sb=()=>{const t=document.createElement("div");return document.body.appendChild(t),t},Tb=t=>{const e=document.createElement("div");return t.parentNode.insertBefore(e,t.nextSibling),e},_l=(t,e="player")=>{if(typeof t!="string")return t;const i=document.querySelectorAll(t);return i.length===0&&ir(`Failed to initialize ${e} because the target could not be found.`,{target:t,elements:i}),i.length>1&&ir(`Failed to initialize ${e} because the target is ambiguous. (${i.length} elements match)`,{target:t,elements:i}),i[0]};function Wc(t,e,i){const r=t.slice();return r[138]=e[i],r}function jc(t){let e,i,r={onEvent:t[53],playerStyle:t[59],callToAction:t[23],skipButtonStyle:t[24],playlistStyle:t[25],playlistToggle:t[26],downloadFormats:t[47],playerTitle:t[22],content:t[48],contentIndex:t[7],duration:t[29],currentTime:t[11],playbackState:t[30],playbackRate:t[31],activeAdvert:t[56],persistentAdvert:t[62],textColor:t[34],backgroundColor:t[35],iconColor:t[36],logoIconEnabled:t[37],videoIsBehind:t[61]};return e=new vl({props:r}),t[91](e),{c(){ze(e.$$.fragment)},m(a,l){We(e,a,l),i=!0},p(a,l){const g={};l[1]&268435456&&(g.playerStyle=a[59]),l[0]&8388608&&(g.callToAction=a[23]),l[0]&16777216&&(g.skipButtonStyle=a[24]),l[0]&33554432&&(g.playlistStyle=a[25]),l[0]&67108864&&(g.playlistToggle=a[26]),l[1]&65536&&(g.downloadFormats=a[47]),l[0]&4194304&&(g.playerTitle=a[22]),l[1]&131072&&(g.content=a[48]),l[0]&128&&(g.contentIndex=a[7]),l[0]&536870912&&(g.duration=a[29]),l[0]&2048&&(g.currentTime=a[11]),l[0]&1073741824&&(g.playbackState=a[30]),l[1]&1&&(g.playbackRate=a[31]),l[1]&33554432&&(g.activeAdvert=a[56]),l[2]&1&&(g.persistentAdvert=a[62]),l[1]&8&&(g.textColor=a[34]),l[1]&16&&(g.backgroundColor=a[35]),l[1]&32&&(g.iconColor=a[36]),l[1]&64&&(g.logoIconEnabled=a[37]),l[1]&1073741824&&(g.videoIsBehind=a[61]),e.$set(g)},i(a){i||(X(e.$$.fragment,a),i=!0)},o(a){se(e.$$.fragment,a),i=!1},d(a){t[91](null),je(e,a)}}}function Gc(t){let e,i;return e=new ml({props:{root:t[13],$$slots:{default:[kb]},$$scope:{ctx:t}}}),{c(){ze(e.$$.fragment)},m(r,a){We(e,r,a),i=!0},p(r,a){const l={};a[0]&8192&&(l.root=r[13]),a[0]&1639987328|a[1]&167977087|a[2]&1|a[4]&131072&&(l.$$scope={dirty:a,ctx:r}),e.$set(l)},i(r){i||(X(e.$$.fragment,r),i=!0)},o(r){se(e.$$.fragment,r),i=!1},d(r){je(e,r)}}}function kb(t){let e,i,r={onEvent:t[53],playerStyle:t[12],callToAction:t[23],skipButtonStyle:t[24],playlistStyle:"hide",playlistToggle:"hide",downloadFormats:t[47],playerTitle:t[22],fixedPosition:!t[13]&&t[32],fixedWidth:t[33],content:t[48],contentIndex:t[7],duration:t[29],currentTime:t[11],playbackState:t[30],playbackRate:t[31],activeAdvert:t[56],persistentAdvert:t[62],textColor:t[34],backgroundColor:t[35],iconColor:t[36],logoIconEnabled:t[37],videoIsBehind:t[58]};return e=new vl({props:r}),t[92](e),{c(){ze(e.$$.fragment)},m(a,l){We(e,a,l),i=!0},p(a,l){const g={};l[0]&4096&&(g.playerStyle=a[12]),l[0]&8388608&&(g.callToAction=a[23]),l[0]&16777216&&(g.skipButtonStyle=a[24]),l[1]&65536&&(g.downloadFormats=a[47]),l[0]&4194304&&(g.playerTitle=a[22]),l[0]&8192|l[1]&2&&(g.fixedPosition=!a[13]&&a[32]),l[1]&4&&(g.fixedWidth=a[33]),l[1]&131072&&(g.content=a[48]),l[0]&128&&(g.contentIndex=a[7]),l[0]&536870912&&(g.duration=a[29]),l[0]&2048&&(g.currentTime=a[11]),l[0]&1073741824&&(g.playbackState=a[30]),l[1]&1&&(g.playbackRate=a[31]),l[1]&33554432&&(g.activeAdvert=a[56]),l[2]&1&&(g.persistentAdvert=a[62]),l[1]&8&&(g.textColor=a[34]),l[1]&16&&(g.backgroundColor=a[35]),l[1]&32&&(g.iconColor=a[36]),l[1]&64&&(g.logoIconEnabled=a[37]),l[1]&134217728&&(g.videoIsBehind=a[58]),e.$set(g)},i(a){i||(X(e.$$.fragment,a),i=!0)},o(a){se(e.$$.fragment,a),i=!1},d(a){t[92](null),je(e,a)}}}function Eb(t){let e,i;return e=new vl({props:{onEvent:t[93],playerStyle:"small",fixedWidth:0,logoIconEnabled:!1,content:t[48],contentIndex:t[7],duration:t[29],currentTime:t[60]?t[11]:t[54].startTime,playbackState:t[60]?t[30]:"paused",activeAdvert:t[56],persistentAdvert:t[62],textColor:t[34],backgroundColor:t[35],iconColor:t[36]}}),{c(){ze(e.$$.fragment)},m(r,a){We(e,r,a),i=!0},p(r,a){const l={};a[1]&75497472&&(l.onEvent=r[93]),a[1]&131072&&(l.content=r[48]),a[0]&128&&(l.contentIndex=r[7]),a[0]&536870912&&(l.duration=r[29]),a[0]&2048|a[1]&545259520&&(l.currentTime=r[60]?r[11]:r[54].startTime),a[0]&1073741824|a[1]&536870912&&(l.playbackState=r[60]?r[30]:"paused"),a[1]&33554432&&(l.activeAdvert=r[56]),a[2]&1&&(l.persistentAdvert=r[62]),a[1]&8&&(l.textColor=r[34]),a[1]&16&&(l.backgroundColor=r[35]),a[1]&32&&(l.iconColor=r[36]),e.$set(l)},i(r){i||(X(e.$$.fragment,r),i=!0)},o(r){se(e.$$.fragment,r),i=!1},d(r){je(e,r)}}}function zc(t,e){let i,r,a;return r=new ml({props:{root:e[138],$$slots:{default:[Eb]},$$scope:{ctx:e}}}),{key:t,first:null,c(){i=qn(),ze(r.$$.fragment),this.first=i},m(l,g){te(l,i,g),We(r,l,g),a=!0},p(l,g){e=l;const m={};g[1]&32768&&(m.root=e[138]),g[0]&1610614912|g[1]&646053944|g[2]&1|g[4]&131072&&(m.$$scope={dirty:g,ctx:e}),r.$set(m)},i(l){a||(X(r.$$.fragment,l),a=!0)},o(l){se(r.$$.fragment,l),a=!1},d(l){l&&$(i),je(r,l)}}}function Hc(t){let e,i;return e=new ml({props:{root:t[21],$$slots:{default:[Ab]},$$scope:{ctx:t}}}),{c(){ze(e.$$.fragment)},m(r,a){We(e,r,a),i=!0},p(r,a){const l={};a[0]&2097152&&(l.root=r[21]),a[0]&2145386495|a[1]&919551|a[4]&131072&&(l.$$scope={dirty:a,ctx:r}),e.$set(l)},i(r){i||(X(e.$$.fragment,r),i=!0)},o(r){se(e.$$.fragment,r),i=!1},d(r){je(e,r)}}}function Ab(t){let e,i,r,a,l,g,m,_,T,k,w,F,V,U,z,H,oe,ce,ge,me,le,Se,ee,L,ae,W,Je,we,Re,Oe,K,Z,B,Ke,Ne,Ce,Ue,ie,pe,ft,Ae,Le,qe;function Dt(q){t[94](q)}function Ct(q){t[95](q)}function $t(q){t[96](q)}function bt(q){t[97](q)}function Gt(q){t[98](q)}function zt(q){t[99](q)}function ut(q){t[100](q)}function Lt(q){t[101](q)}function pt(q){t[102](q)}function St(q){t[103](q)}function Yt(q){t[104](q)}function Te(q){t[105](q)}function yt(q){t[106](q)}function At(q){t[107](q)}function st(q){t[108](q)}function Ut(q){t[109](q)}function oi(q){t[110](q)}function li(q){t[111](q)}function Ot(q){t[112](q)}function Bt(q){t[113](q)}function Mt(q){t[114](q)}function qt(q){t[115](q)}function ui(q){t[116](q)}function Vt(q){t[117](q)}function ri(q){t[118](q)}function yi(q){t[119](q)}function Nt(q){t[120](q)}function at(q){t[121](q)}function fi(q){t[122](q)}function De(q){t[123](q)}function hi(q){t[124](q)}function Xt(q){t[125](q)}function et(q){t[126](q)}function ci(q){t[127](q)}function Wt(q){t[128](q)}function _e(q){t[129](q)}function gi(q){t[130](q)}function vi(q){t[131](q)}function xi(q){t[132](q)}function di(q){t[133](q)}function Pi(q){t[134](q)}let Ve={content:t[48],introsOutros:t[49],adverts:t[50]};return t[0]!==void 0&&(Ve.projectId=t[0]),t[1]!==void 0&&(Ve.contentId=t[1]),t[2]!==void 0&&(Ve.playlistId=t[2]),t[3]!==void 0&&(Ve.sourceId=t[3]),t[4]!==void 0&&(Ve.sourceUrl=t[4]),t[5]!==void 0&&(Ve.showUserInterface=t[5]),t[6]!==void 0&&(Ve.playerStyle=t[6]),t[22]!==void 0&&(Ve.playerTitle=t[22]),t[23]!==void 0&&(Ve.callToAction=t[23]),t[24]!==void 0&&(Ve.skipButtonStyle=t[24]),t[25]!==void 0&&(Ve.playlistStyle=t[25]),t[26]!==void 0&&(Ve.playlistToggle=t[26]),t[27]!==void 0&&(Ve.mediaSession=t[27]),t[7]!==void 0&&(Ve.contentIndex=t[7]),t[8]!==void 0&&(Ve.introsOutrosIndex=t[8]),t[9]!==void 0&&(Ve.advertIndex=t[9]),t[28]!==void 0&&(Ve.persistentAdImage=t[28]),t[10]!==void 0&&(Ve.persistentIndex=t[10]),t[29]!==void 0&&(Ve.duration=t[29]),t[11]!==void 0&&(Ve.currentTime=t[11]),t[30]!==void 0&&(Ve.playbackState=t[30]),t[31]!==void 0&&(Ve.playbackRate=t[31]),t[12]!==void 0&&(Ve.widgetStyle=t[12]),t[32]!==void 0&&(Ve.widgetPosition=t[32]),t[33]!==void 0&&(Ve.widgetWidth=t[33]),t[13]!==void 0&&(Ve.widgetTarget=t[13]),t[34]!==void 0&&(Ve.textColor=t[34]),t[35]!==void 0&&(Ve.backgroundColor=t[35]),t[36]!==void 0&&(Ve.iconColor=t[36]),t[14]!==void 0&&(Ve.highlightColor=t[14]),t[37]!==void 0&&(Ve.logoIconEnabled=t[37]),t[15]!==void 0&&(Ve.highlightSections=t[15]),t[16]!==void 0&&(Ve.clickableSections=t[16]),t[17]!==void 0&&(Ve.segmentWidgetSections=t[17]),t[18]!==void 0&&(Ve.segmentWidgetPosition=t[18]),t[19]!==void 0&&(Ve.currentSegment=t[19]),t[20]!==void 0&&(Ve.hoveredSegment=t[20]),t[38]!==void 0&&(Ve.advertConsent=t[38]),t[39]!==void 0&&(Ve.analyticsConsent=t[39]),t[40]!==void 0&&(Ve.analyticsCustomUrl=t[40]),t[41]!==void 0&&(Ve.analyticsTag=t[41]),e=new W1({props:Ve}),Fe.push(()=>$e(e,"projectId",Dt)),Fe.push(()=>$e(e,"contentId",Ct)),Fe.push(()=>$e(e,"playlistId",$t)),Fe.push(()=>$e(e,"sourceId",bt)),Fe.push(()=>$e(e,"sourceUrl",Gt)),Fe.push(()=>$e(e,"showUserInterface",zt)),Fe.push(()=>$e(e,"playerStyle",ut)),Fe.push(()=>$e(e,"playerTitle",Lt)),Fe.push(()=>$e(e,"callToAction",pt)),Fe.push(()=>$e(e,"skipButtonStyle",St)),Fe.push(()=>$e(e,"playlistStyle",Yt)),Fe.push(()=>$e(e,"playlistToggle",Te)),Fe.push(()=>$e(e,"mediaSession",yt)),Fe.push(()=>$e(e,"contentIndex",At)),Fe.push(()=>$e(e,"introsOutrosIndex",st)),Fe.push(()=>$e(e,"advertIndex",Ut)),Fe.push(()=>$e(e,"persistentAdImage",oi)),Fe.push(()=>$e(e,"persistentIndex",li)),Fe.push(()=>$e(e,"duration",Ot)),Fe.push(()=>$e(e,"currentTime",Bt)),Fe.push(()=>$e(e,"playbackState",Mt)),Fe.push(()=>$e(e,"playbackRate",qt)),Fe.push(()=>$e(e,"widgetStyle",ui)),Fe.push(()=>$e(e,"widgetPosition",Vt)),Fe.push(()=>$e(e,"widgetWidth",ri)),Fe.push(()=>$e(e,"widgetTarget",yi)),Fe.push(()=>$e(e,"textColor",Nt)),Fe.push(()=>$e(e,"backgroundColor",at)),Fe.push(()=>$e(e,"iconColor",fi)),Fe.push(()=>$e(e,"highlightColor",De)),Fe.push(()=>$e(e,"logoIconEnabled",hi)),Fe.push(()=>$e(e,"highlightSections",Xt)),Fe.push(()=>$e(e,"clickableSections",et)),Fe.push(()=>$e(e,"segmentWidgetSections",ci)),Fe.push(()=>$e(e,"segmentWidgetPosition",Wt)),Fe.push(()=>$e(e,"currentSegment",_e)),Fe.push(()=>$e(e,"hoveredSegment",gi)),Fe.push(()=>$e(e,"advertConsent",vi)),Fe.push(()=>$e(e,"analyticsConsent",xi)),Fe.push(()=>$e(e,"analyticsCustomUrl",di)),Fe.push(()=>$e(e,"analyticsTag",Pi)),{c(){ze(e.$$.fragment)},m(q,J){We(e,q,J),qe=!0},p(q,J){const Be={};J[1]&131072&&(Be.content=q[48]),J[1]&262144&&(Be.introsOutros=q[49]),J[1]&524288&&(Be.adverts=q[50]),!i&&J[0]&1&&(i=!0,Be.projectId=q[0],Qe(()=>i=!1)),!r&&J[0]&2&&(r=!0,Be.contentId=q[1],Qe(()=>r=!1)),!a&&J[0]&4&&(a=!0,Be.playlistId=q[2],Qe(()=>a=!1)),!l&&J[0]&8&&(l=!0,Be.sourceId=q[3],Qe(()=>l=!1)),!g&&J[0]&16&&(g=!0,Be.sourceUrl=q[4],Qe(()=>g=!1)),!m&&J[0]&32&&(m=!0,Be.showUserInterface=q[5],Qe(()=>m=!1)),!_&&J[0]&64&&(_=!0,Be.playerStyle=q[6],Qe(()=>_=!1)),!T&&J[0]&4194304&&(T=!0,Be.playerTitle=q[22],Qe(()=>T=!1)),!k&&J[0]&8388608&&(k=!0,Be.callToAction=q[23],Qe(()=>k=!1)),!w&&J[0]&16777216&&(w=!0,Be.skipButtonStyle=q[24],Qe(()=>w=!1)),!F&&J[0]&33554432&&(F=!0,Be.playlistStyle=q[25],Qe(()=>F=!1)),!V&&J[0]&67108864&&(V=!0,Be.playlistToggle=q[26],Qe(()=>V=!1)),!U&&J[0]&134217728&&(U=!0,Be.mediaSession=q[27],Qe(()=>U=!1)),!z&&J[0]&128&&(z=!0,Be.contentIndex=q[7],Qe(()=>z=!1)),!H&&J[0]&256&&(H=!0,Be.introsOutrosIndex=q[8],Qe(()=>H=!1)),!oe&&J[0]&512&&(oe=!0,Be.advertIndex=q[9],Qe(()=>oe=!1)),!ce&&J[0]&268435456&&(ce=!0,Be.persistentAdImage=q[28],Qe(()=>ce=!1)),!ge&&J[0]&1024&&(ge=!0,Be.persistentIndex=q[10],Qe(()=>ge=!1)),!me&&J[0]&536870912&&(me=!0,Be.duration=q[29],Qe(()=>me=!1)),!le&&J[0]&2048&&(le=!0,Be.currentTime=q[11],Qe(()=>le=!1)),!Se&&J[0]&1073741824&&(Se=!0,Be.playbackState=q[30],Qe(()=>Se=!1)),!ee&&J[1]&1&&(ee=!0,Be.playbackRate=q[31],Qe(()=>ee=!1)),!L&&J[0]&4096&&(L=!0,Be.widgetStyle=q[12],Qe(()=>L=!1)),!ae&&J[1]&2&&(ae=!0,Be.widgetPosition=q[32],Qe(()=>ae=!1)),!W&&J[1]&4&&(W=!0,Be.widgetWidth=q[33],Qe(()=>W=!1)),!Je&&J[0]&8192&&(Je=!0,Be.widgetTarget=q[13],Qe(()=>Je=!1)),!we&&J[1]&8&&(we=!0,Be.textColor=q[34],Qe(()=>we=!1)),!Re&&J[1]&16&&(Re=!0,Be.backgroundColor=q[35],Qe(()=>Re=!1)),!Oe&&J[1]&32&&(Oe=!0,Be.iconColor=q[36],Qe(()=>Oe=!1)),!K&&J[0]&16384&&(K=!0,Be.highlightColor=q[14],Qe(()=>K=!1)),!Z&&J[1]&64&&(Z=!0,Be.logoIconEnabled=q[37],Qe(()=>Z=!1)),!B&&J[0]&32768&&(B=!0,Be.highlightSections=q[15],Qe(()=>B=!1)),!Ke&&J[0]&65536&&(Ke=!0,Be.clickableSections=q[16],Qe(()=>Ke=!1)),!Ne&&J[0]&131072&&(Ne=!0,Be.segmentWidgetSections=q[17],Qe(()=>Ne=!1)),!Ce&&J[0]&262144&&(Ce=!0,Be.segmentWidgetPosition=q[18],Qe(()=>Ce=!1)),!Ue&&J[0]&524288&&(Ue=!0,Be.currentSegment=q[19],Qe(()=>Ue=!1)),!ie&&J[0]&1048576&&(ie=!0,Be.hoveredSegment=q[20],Qe(()=>ie=!1)),!pe&&J[1]&128&&(pe=!0,Be.advertConsent=q[38],Qe(()=>pe=!1)),!ft&&J[1]&256&&(ft=!0,Be.analyticsConsent=q[39],Qe(()=>ft=!1)),!Ae&&J[1]&512&&(Ae=!0,Be.analyticsCustomUrl=q[40],Qe(()=>Ae=!1)),!Le&&J[1]&1024&&(Le=!0,Be.analyticsTag=q[41],Qe(()=>Le=!1)),e.$set(Be)},i(q){qe||(X(e.$$.fragment,q),qe=!0)},o(q){se(e.$$.fragment,q),qe=!1},d(q){je(e,q)}}}function Kc(t){let e,i;return e=new $1({props:{onEvent:t[53],content:t[48],contentIndex:t[7],activeAdvert:t[56],persistentAdvert:t[62],duration:t[29],playbackState:t[30],skipButtonStyle:t[24],backgroundColor:t[35],iconColor:t[36]}}),{c(){ze(e.$$.fragment)},m(r,a){We(e,r,a),i=!0},p(r,a){const l={};a[1]&131072&&(l.content=r[48]),a[0]&128&&(l.contentIndex=r[7]),a[1]&33554432&&(l.activeAdvert=r[56]),a[2]&1&&(l.persistentAdvert=r[62]),a[0]&536870912&&(l.duration=r[29]),a[0]&1073741824&&(l.playbackState=r[30]),a[0]&16777216&&(l.skipButtonStyle=r[24]),a[1]&16&&(l.backgroundColor=r[35]),a[1]&32&&(l.iconColor=r[36]),e.$set(l)},i(r){i||(X(e.$$.fragment,r),i=!0)},o(r){se(e.$$.fragment,r),i=!1},d(r){je(e,r)}}}function Yc(t){let e,i;return e=new nb({props:{analyticsTag:t[41]}}),{c(){ze(e.$$.fragment)},m(r,a){We(e,r,a),i=!0},p(r,a){const l={};a[1]&1024&&(l.analyticsTag=r[41]),e.$set(l)},i(r){i||(X(e.$$.fragment,r),i=!0)},o(r){se(e.$$.fragment,r),i=!1},d(r){je(e,r)}}}function xb(t){let e,i,r,a,l,g,m,_,T,k=[],w=new Map,F,V,U,z,H,oe;function ce(K){t[86](K)}function ge(K){t[87](K)}function me(K){t[88](K)}function le(K){t[89](K)}function Se(K){t[90](K)}let ee={onEvent:t[53],content:t[48],contentIndex:t[7],introOrOutro:t[55],activeAdvert:t[56],advertConsent:t[38],videoBehindWidget:t[58],videoBehindStatic:t[61],widgetPosition:t[32],widgetWidth:t[33]};t[30]!==void 0&&(ee.playbackState=t[30]),t[29]!==void 0&&(ee.duration=t[29]),t[11]!==void 0&&(ee.currentTime=t[11]),t[31]!==void 0&&(ee.playbackRate=t[31]),t[45]!==void 0&&(ee.prevPercentage=t[45]),e=new Uv({props:ee}),t[85](e),Fe.push(()=>$e(e,"playbackState",ce)),Fe.push(()=>$e(e,"duration",ge)),Fe.push(()=>$e(e,"currentTime",me)),Fe.push(()=>$e(e,"playbackRate",le)),Fe.push(()=>$e(e,"prevPercentage",Se));let L=t[5]&&jc(t),ae=(t[51]||t[13])&&Gc(t),W=t[46];const Je=K=>K[138];for(let K=0;K<W.length;K+=1){let Z=Wc(t,W,K),B=Je(Z);w.set(B,k[K]=zc(B,Z))}let we=t[21]&&Hc(t),Re=t[52]&&Kc(t),Oe=t[41]&&Yc(t);return H=new sb({}),{c(){ze(e.$$.fragment),m=Pe(),L&&L.c(),_=Pe(),ae&&ae.c(),T=Pe();for(let K=0;K<k.length;K+=1)k[K].c();F=Pe(),we&&we.c(),V=Pe(),Re&&Re.c(),U=Pe(),Oe&&Oe.c(),z=Pe(),ze(H.$$.fragment)},m(K,Z){We(e,K,Z),te(K,m,Z),L&&L.m(K,Z),te(K,_,Z),ae&&ae.m(K,Z),te(K,T,Z);for(let B=0;B<k.length;B+=1)k[B]&&k[B].m(K,Z);te(K,F,Z),we&&we.m(K,Z),te(K,V,Z),Re&&Re.m(K,Z),te(K,U,Z),Oe&&Oe.m(K,Z),te(K,z,Z),We(H,K,Z),oe=!0},p(K,Z){const B={};Z[1]&131072&&(B.content=K[48]),Z[0]&128&&(B.contentIndex=K[7]),Z[1]&16777216&&(B.introOrOutro=K[55]),Z[1]&33554432&&(B.activeAdvert=K[56]),Z[1]&128&&(B.advertConsent=K[38]),Z[1]&134217728&&(B.videoBehindWidget=K[58]),Z[1]&1073741824&&(B.videoBehindStatic=K[61]),Z[1]&2&&(B.widgetPosition=K[32]),Z[1]&4&&(B.widgetWidth=K[33]),!i&&Z[0]&1073741824&&(i=!0,B.playbackState=K[30],Qe(()=>i=!1)),!r&&Z[0]&536870912&&(r=!0,B.duration=K[29],Qe(()=>r=!1)),!a&&Z[0]&2048&&(a=!0,B.currentTime=K[11],Qe(()=>a=!1)),!l&&Z[1]&1&&(l=!0,B.playbackRate=K[31],Qe(()=>l=!1)),!g&&Z[1]&16384&&(g=!0,B.prevPercentage=K[45],Qe(()=>g=!1)),e.$set(B),K[5]?L?(L.p(K,Z),Z[0]&32&&X(L,1)):(L=jc(K),L.c(),X(L,1),L.m(_.parentNode,_)):L&&(xt(),se(L,1,1,()=>{L=null}),Pt()),K[51]||K[13]?ae?(ae.p(K,Z),Z[0]&8192|Z[1]&1048576&&X(ae,1)):(ae=Gc(K),ae.c(),X(ae,1),ae.m(T.parentNode,T)):ae&&(xt(),se(ae,1,1,()=>{ae=null}),Pt()),Z[0]&1610614912|Z[1]&650281016|Z[2]&1&&(W=K[46],xt(),k=ig(k,Z,Je,1,K,W,w,F.parentNode,tg,zc,F,Wc),Pt()),K[21]?we?(we.p(K,Z),Z[0]&2097152&&X(we,1)):(we=Hc(K),we.c(),X(we,1),we.m(V.parentNode,V)):we&&(xt(),se(we,1,1,()=>{we=null}),Pt()),K[52]?Re?(Re.p(K,Z),Z[1]&2097152&&X(Re,1)):(Re=Kc(K),Re.c(),X(Re,1),Re.m(U.parentNode,U)):Re&&(xt(),se(Re,1,1,()=>{Re=null}),Pt()),K[41]?Oe?(Oe.p(K,Z),Z[1]&1024&&X(Oe,1)):(Oe=Yc(K),Oe.c(),X(Oe,1),Oe.m(z.parentNode,z)):Oe&&(xt(),se(Oe,1,1,()=>{Oe=null}),Pt())},i(K){if(!oe){X(e.$$.fragment,K),X(L),X(ae);for(let Z=0;Z<W.length;Z+=1)X(k[Z]);X(we),X(Re),X(Oe),X(H.$$.fragment,K),oe=!0}},o(K){se(e.$$.fragment,K),se(L),se(ae);for(let Z=0;Z<k.length;Z+=1)se(k[Z]);se(we),se(Re),se(Oe),se(H.$$.fragment,K),oe=!1},d(K){t[85](null),je(e,K),K&&$(m),L&&L.d(K),K&&$(_),ae&&ae.d(K),K&&$(T);for(let Z=0;Z<k.length;Z+=1)k[Z].d(K);K&&$(F),we&&we.d(K),K&&$(V),Re&&Re.d(K),K&&$(U),Oe&&Oe.d(K),K&&$(z),je(H,K)}}}function Pb(t,e,i){let r,a,l,g,m,_,T,k,w,F,V,U,z,{playerApiUrl:H="https://api.beyondwords.io/v1/projects/{id}/player"}=e,{projectId:oe=void 0}=e,{contentId:ce=void 0}=e,{playlistId:ge=void 0}=e,{sourceId:me=void 0}=e,{sourceUrl:le=void 0}=e,{playlist:Se=[]}=e,{showUserInterface:ee=!0}=e,{playerStyle:L="standard"}=e,{playerTitle:ae=void 0}=e,{callToAction:W=void 0}=e,{skipButtonStyle:Je="auto"}=e,{playlistStyle:we="auto-5-4"}=e,{playlistToggle:Re="auto"}=e,{downloadFormats:Oe=[]}=e,{mediaSession:K="auto"}=e,{content:Z=[]}=e,{contentIndex:B=0}=e,{introsOutros:Ke=[]}=e,{introsOutrosIndex:Ne=-1}=e,{adverts:Ce=[]}=e,{advertIndex:Ue=-1}=e,{persistentAdImage:ie=!1}=e,{persistentIndex:pe=-1}=e,{duration:ft=0}=e,{currentTime:Ae=0}=e,{playbackState:Le="stopped"}=e,{playbackRate:qe=1}=e,{widgetStyle:Dt="standard"}=e,{widgetPosition:Ct="auto"}=e,{widgetWidth:$t="auto"}=e,{widgetTarget:bt=void 0}=e,{textColor:Gt="#111"}=e,{backgroundColor:zt="#f5f5f5"}=e,{iconColor:ut="rgba(0, 0, 0, 0.8)"}=e,{highlightColor:Lt="#eee"}=e,{logoIconEnabled:pt=!0}=e,{highlightSections:St="all"}=e,{clickableSections:Yt="all"}=e,{segmentWidgetSections:Te="body"}=e,{segmentWidgetPosition:yt="7-oclock"}=e,{currentSegment:At=void 0}=e,{hoveredSegment:st=void 0}=e,{advertConsent:Ut="personalized"}=e,{analyticsConsent:oi="allowed"}=e,{analyticsCustomUrl:li=void 0}=e,{analyticsTag:Ot=void 0}=e,{writeToken:Bt=void 0}=e,{captureErrors:Mt=!0}=e,{onError:qt=()=>{}}=e,{transitions:ui=[]}=e,{controlPanel:Vt=void 0}=e;const ri=(...D)=>ci.addEventListener(...D),yi=(...D)=>ci.removeEventListener(...D);let{initialProps:Nt={}}=e,{showBottomWidget:at=!1}=e,{showMediaSession:fi=!1}=e,{isFullScreen:De=!1}=e,{mediaElement:hi=void 0}=e,{userInterface:Xt=void 0}=e,{widgetInterface:et=void 0}=e,{controller:ci=void 0}=e,{analyticsUrl:Wt=void 0}=e,{analyticsId:_e=void 0}=e,{listenSessionId:gi=void 0}=e,{sessionCreatedAt:vi=void 0}=e,{isNewListen:xi=!1}=e,{prevPercentage:di=0}=e,{segmentWidgets:Pi=[]}=e,{segmentContainers:Ve=new Ps(D=>i(46,Pi=D))}=e,{segmentClickables:q=new xs}=e,{segmentHighlights:J=new As}=e;const Be=D=>ci.processEvent(fe({emittedFrom:m},D)),$r=()=>i(83,k=st);function ji(D){Fe[D?"unshift":"push"](()=>{hi=D,i(42,hi)})}function en(D){Le=D,i(30,Le)}function ni(D){ft=D,i(29,ft)}function mr(D){Ae=D,i(11,Ae)}function Zi(D){qe=D,i(31,qe)}function Ji(D){di=D,i(45,di)}function Gi(D){Fe[D?"unshift":"push"](()=>{Xt=D,i(43,Xt)})}function lr(D){Fe[D?"unshift":"push"](()=>{et=D,i(44,et)})}const Er=D=>Be(ii(fe({},D),{emittedFrom:"segment-widget",widgetSegment:V,widgetIsCurrent:U}));function Ri(D){oe=D,i(0,oe)}function Di(D){ce=D,i(1,ce)}function ur(D){ge=D,i(2,ge)}function Ar(D){me=D,i(3,me)}function zi(D){le=D,i(4,le)}function Si(D){ee=D,i(5,ee)}function Hi(D){L=D,i(6,L)}function Oi(D){ae=D,i(22,ae)}function Zt(D){W=D,i(23,W)}function Ki(D){Je=D,i(24,Je)}function Jt(D){we=D,i(25,we)}function pr(D){Re=D,i(26,Re)}function ei(D){K=D,i(27,K)}function G(D){B=D,i(7,B)}function ye(D){Ne=D,i(8,Ne)}function be(D){Ue=D,i(9,Ue)}function ot(D){ie=D,i(28,ie)}function Br(D){pe=D,i(10,pe)}function xr(D){ft=D,i(29,ft)}function tn(D){Ae=D,i(11,Ae)}function Ws(D){Le=D,i(30,Le)}function pn(D){qe=D,i(31,qe)}function js(D){Dt=D,i(12,Dt)}function Yi(D){Ct=D,i(32,Ct)}function rn(D){$t=D,i(33,$t)}function Ai(D){bt=D,i(13,bt)}function nn(D){Gt=D,i(34,Gt)}function Pr(D){zt=D,i(35,zt)}function _r(D){ut=D,i(36,ut)}function Un(D){Lt=D,i(14,Lt)}function _n(D){pt=D,i(37,pt)}function Gs(D){St=D,i(15,St)}function yr(D){Yt=D,i(16,Yt)}function Vn(D){Te=D,i(17,Te)}function Mr(D){yt=D,i(18,yt)}function zs(D){At=D,i(19,At)}function ns(D){st=D,i(20,st)}function ss(D){Ut=D,i(38,Ut)}function Wn(D){oi=D,i(39,oi)}function Nr(D){li=D,i(40,li)}function wi(D){Ot=D,i(41,Ot)}return t.$$set=D=>{"playerApiUrl"in D&&i(63,H=D.playerApiUrl),"projectId"in D&&i(0,oe=D.projectId),"contentId"in D&&i(1,ce=D.contentId),"playlistId"in D&&i(2,ge=D.playlistId),"sourceId"in D&&i(3,me=D.sourceId),"sourceUrl"in D&&i(4,le=D.sourceUrl),"playlist"in D&&i(64,Se=D.playlist),"showUserInterface"in D&&i(5,ee=D.showUserInterface),"playerStyle"in D&&i(6,L=D.playerStyle),"playerTitle"in D&&i(22,ae=D.playerTitle),"callToAction"in D&&i(23,W=D.callToAction),"skipButtonStyle"in D&&i(24,Je=D.skipButtonStyle),"playlistStyle"in D&&i(25,we=D.playlistStyle),"playlistToggle"in D&&i(26,Re=D.playlistToggle),"downloadFormats"in D&&i(47,Oe=D.downloadFormats),"mediaSession"in D&&i(27,K=D.mediaSession),"content"in D&&i(48,Z=D.content),"contentIndex"in D&&i(7,B=D.contentIndex),"introsOutros"in D&&i(49,Ke=D.introsOutros),"introsOutrosIndex"in D&&i(8,Ne=D.introsOutrosIndex),"adverts"in D&&i(50,Ce=D.adverts),"advertIndex"in D&&i(9,Ue=D.advertIndex),"persistentAdImage"in D&&i(28,ie=D.persistentAdImage),"persistentIndex"in D&&i(10,pe=D.persistentIndex),"duration"in D&&i(29,ft=D.duration),"currentTime"in D&&i(11,Ae=D.currentTime),"playbackState"in D&&i(30,Le=D.playbackState),"playbackRate"in D&&i(31,qe=D.playbackRate),"widgetStyle"in D&&i(12,Dt=D.widgetStyle),"widgetPosition"in D&&i(32,Ct=D.widgetPosition),"widgetWidth"in D&&i(33,$t=D.widgetWidth),"widgetTarget"in D&&i(13,bt=D.widgetTarget),"textColor"in D&&i(34,Gt=D.textColor),"backgroundColor"in D&&i(35,zt=D.backgroundColor),"iconColor"in D&&i(36,ut=D.iconColor),"highlightColor"in D&&i(14,Lt=D.highlightColor),"logoIconEnabled"in D&&i(37,pt=D.logoIconEnabled),"highlightSections"in D&&i(15,St=D.highlightSections),"clickableSections"in D&&i(16,Yt=D.clickableSections),"segmentWidgetSections"in D&&i(17,Te=D.segmentWidgetSections),"segmentWidgetPosition"in D&&i(18,yt=D.segmentWidgetPosition),"currentSegment"in D&&i(19,At=D.currentSegment),"hoveredSegment"in D&&i(20,st=D.hoveredSegment),"advertConsent"in D&&i(38,Ut=D.advertConsent),"analyticsConsent"in D&&i(39,oi=D.analyticsConsent),"analyticsCustomUrl"in D&&i(40,li=D.analyticsCustomUrl),"analyticsTag"in D&&i(41,Ot=D.analyticsTag),"writeToken"in D&&i(65,Bt=D.writeToken),"captureErrors"in D&&i(66,Mt=D.captureErrors),"onError"in D&&i(67,qt=D.onError),"transitions"in D&&i(68,ui=D.transitions),"controlPanel"in D&&i(21,Vt=D.controlPanel),"initialProps"in D&&i(71,Nt=D.initialProps),"showBottomWidget"in D&&i(51,at=D.showBottomWidget),"showMediaSession"in D&&i(52,fi=D.showMediaSession),"isFullScreen"in D&&i(72,De=D.isFullScreen),"mediaElement"in D&&i(42,hi=D.mediaElement),"userInterface"in D&&i(43,Xt=D.userInterface),"widgetInterface"in D&&i(44,et=D.widgetInterface),"controller"in D&&i(73,ci=D.controller),"analyticsUrl"in D&&i(74,Wt=D.analyticsUrl),"analyticsId"in D&&i(75,_e=D.analyticsId),"listenSessionId"in D&&i(76,gi=D.listenSessionId),"sessionCreatedAt"in D&&i(77,vi=D.sessionCreatedAt),"isNewListen"in D&&i(78,xi=D.isNewListen),"prevPercentage"in D&&i(45,di=D.prevPercentage),"segmentWidgets"in D&&i(46,Pi=D.segmentWidgets),"segmentContainers"in D&&i(79,Ve=D.segmentContainers),"segmentClickables"in D&&i(80,q=D.segmentClickables),"segmentHighlights"in D&&i(81,J=D.segmentHighlights)},t.$$.update=()=>{t.$$.dirty[0]&256|t.$$.dirty[1]&262144&&i(55,r=Ke[Ne]),t.$$.dirty[0]&512|t.$$.dirty[1]&524288&&i(56,a=Ce[Ue]),t.$$.dirty[0]&1024|t.$$.dirty[1]&524288&&i(62,l=Ce[pe]),t.$$.dirty[0]&128|t.$$.dirty[1]&131072&&Z[B],t.$$.dirty[0]&64|t.$$.dirty[2]&1024&&i(59,g=De?"video":L),t.$$.dirty[0]&4096|t.$$.dirty[1]&1048576|t.$$.dirty[2]&1024&&i(58,_=at&&Dt==="video"&&!De),t.$$.dirty[1]&134217728&&(m=_?"bottom-widget":"inline-player"),t.$$.dirty[0]&8192&&i(13,bt=_l(bt,"widget")),t.$$.dirty[0]&2097152&&i(21,Vt=_l(Vt,"control panel")),t.$$.dirty[0]&32|t.$$.dirty[1]&402653184&&i(61,T=ee&&g==="video"&&!_),t.$$.dirty[0]&31|t.$$.dirty[2]&4&&Be(ab()),t.$$.dirty[0]&1|t.$$.dirty[2]&10&&ub(H,oe,Bt,D=>Be(D)),t.$$.dirty[0]&1048576|t.$$.dirty[2]&2097152&&i(83,k=st||k),t.$$.dirty[0]&655360&&i(82,w=ia("current",At,Te)),t.$$.dirty[0]&524288|t.$$.dirty[2]&1048576&&w&&$r(),t.$$.dirty[0]&131072|t.$$.dirty[2]&2097152&&i(84,F=ia("hovered",k,Te)),t.$$.dirty[0]&524288|t.$$.dirty[2]&7340032&&i(54,V=F&&k||w&&At),t.$$.dirty[0]&524288|t.$$.dirty[1]&8388608&&i(57,U=(V==null?void 0:V.marker)===(At==null?void 0:At.marker)),t.$$.dirty[1]&117440512&&i(60,z=U||a||r),t.$$.dirty[0]&393280|t.$$.dirty[1]&8388608|t.$$.dirty[2]&131072&&Ve.update(V,Te,yt,L),t.$$.dirty[0]&1114112|t.$$.dirty[2]&262144&&q.update(st,Yt),t.$$.dirty[0]&573440|t.$$.dirty[2]&524288&&J.update("current",At,St,Lt),t.$$.dirty[0]&1097728|t.$$.dirty[2]&524288&&J.update("hovered",st,St,Lt),t.$$.dirty[0]&2048|t.$$.dirty[2]&2112&&vb(ui,ci,Ae)},[oe,ce,ge,me,le,ee,L,B,Ne,Ue,pe,Ae,Dt,bt,Lt,St,Yt,Te,yt,At,st,Vt,ae,W,Je,we,Re,K,ie,ft,Le,qe,Ct,$t,Gt,zt,ut,pt,Ut,oi,li,Ot,hi,Xt,et,di,Pi,Oe,Z,Ke,Ce,at,fi,Be,V,r,a,U,_,g,z,T,l,H,Se,Bt,Mt,qt,ui,ri,yi,Nt,De,ci,Wt,_e,gi,vi,xi,Ve,q,J,w,k,F,ji,en,ni,mr,Zi,Ji,Gi,lr,Er,Ri,Di,ur,Ar,zi,Si,Hi,Oi,Zt,Ki,Jt,pr,ei,G,ye,be,ot,Br,xr,tn,Ws,pn,js,Yi,rn,Ai,nn,Pr,_r,Un,_n,Gs,yr,Vn,Mr,zs,ns,ss,Wn,Nr,wi]}let wb=class extends rt{constructor(e){super(),it(this,e,Pb,xb,Xe,{playerApiUrl:63,projectId:0,contentId:1,playlistId:2,sourceId:3,sourceUrl:4,playlist:64,showUserInterface:5,playerStyle:6,playerTitle:22,callToAction:23,skipButtonStyle:24,playlistStyle:25,playlistToggle:26,downloadFormats:47,mediaSession:27,content:48,contentIndex:7,introsOutros:49,introsOutrosIndex:8,adverts:50,advertIndex:9,persistentAdImage:28,persistentIndex:10,duration:29,currentTime:11,playbackState:30,playbackRate:31,widgetStyle:12,widgetPosition:32,widgetWidth:33,widgetTarget:13,textColor:34,backgroundColor:35,iconColor:36,highlightColor:14,logoIconEnabled:37,highlightSections:15,clickableSections:16,segmentWidgetSections:17,segmentWidgetPosition:18,currentSegment:19,hoveredSegment:20,advertConsent:38,analyticsConsent:39,analyticsCustomUrl:40,analyticsTag:41,writeToken:65,captureErrors:66,onError:67,transitions:68,controlPanel:21,addEventListener:69,removeEventListener:70,initialProps:71,showBottomWidget:51,showMediaSession:52,isFullScreen:72,mediaElement:42,userInterface:43,widgetInterface:44,controller:73,analyticsUrl:74,analyticsId:75,listenSessionId:76,sessionCreatedAt:77,isNewListen:78,prevPercentage:45,segmentWidgets:46,segmentContainers:79,segmentClickables:80,segmentHighlights:81,onEvent:53},null,[-1,-1,-1,-1,-1])}get playerApiUrl(){return this.$$.ctx[63]}set playerApiUrl(e){this.$$set({playerApiUrl:e}),P()}get projectId(){return this.$$.ctx[0]}set projectId(e){this.$$set({projectId:e}),P()}get contentId(){return this.$$.ctx[1]}set contentId(e){this.$$set({contentId:e}),P()}get playlistId(){return this.$$.ctx[2]}set playlistId(e){this.$$set({playlistId:e}),P()}get sourceId(){return this.$$.ctx[3]}set sourceId(e){this.$$set({sourceId:e}),P()}get sourceUrl(){return this.$$.ctx[4]}set sourceUrl(e){this.$$set({sourceUrl:e}),P()}get playlist(){return this.$$.ctx[64]}set playlist(e){this.$$set({playlist:e}),P()}get showUserInterface(){return this.$$.ctx[5]}set showUserInterface(e){this.$$set({showUserInterface:e}),P()}get playerStyle(){return this.$$.ctx[6]}set playerStyle(e){this.$$set({playerStyle:e}),P()}get playerTitle(){return this.$$.ctx[22]}set playerTitle(e){this.$$set({playerTitle:e}),P()}get callToAction(){return this.$$.ctx[23]}set callToAction(e){this.$$set({callToAction:e}),P()}get skipButtonStyle(){return this.$$.ctx[24]}set skipButtonStyle(e){this.$$set({skipButtonStyle:e}),P()}get playlistStyle(){return this.$$.ctx[25]}set playlistStyle(e){this.$$set({playlistStyle:e}),P()}get playlistToggle(){return this.$$.ctx[26]}set playlistToggle(e){this.$$set({playlistToggle:e}),P()}get downloadFormats(){return this.$$.ctx[47]}set downloadFormats(e){this.$$set({downloadFormats:e}),P()}get mediaSession(){return this.$$.ctx[27]}set mediaSession(e){this.$$set({mediaSession:e}),P()}get content(){return this.$$.ctx[48]}set content(e){this.$$set({content:e}),P()}get contentIndex(){return this.$$.ctx[7]}set contentIndex(e){this.$$set({contentIndex:e}),P()}get introsOutros(){return this.$$.ctx[49]}set introsOutros(e){this.$$set({introsOutros:e}),P()}get introsOutrosIndex(){return this.$$.ctx[8]}set introsOutrosIndex(e){this.$$set({introsOutrosIndex:e}),P()}get adverts(){return this.$$.ctx[50]}set adverts(e){this.$$set({adverts:e}),P()}get advertIndex(){return this.$$.ctx[9]}set advertIndex(e){this.$$set({advertIndex:e}),P()}get persistentAdImage(){return this.$$.ctx[28]}set persistentAdImage(e){this.$$set({persistentAdImage:e}),P()}get persistentIndex(){return this.$$.ctx[10]}set persistentIndex(e){this.$$set({persistentIndex:e}),P()}get duration(){return this.$$.ctx[29]}set duration(e){this.$$set({duration:e}),P()}get currentTime(){return this.$$.ctx[11]}set currentTime(e){this.$$set({currentTime:e}),P()}get playbackState(){return this.$$.ctx[30]}set playbackState(e){this.$$set({playbackState:e}),P()}get playbackRate(){return this.$$.ctx[31]}set playbackRate(e){this.$$set({playbackRate:e}),P()}get widgetStyle(){return this.$$.ctx[12]}set widgetStyle(e){this.$$set({widgetStyle:e}),P()}get widgetPosition(){return this.$$.ctx[32]}set widgetPosition(e){this.$$set({widgetPosition:e}),P()}get widgetWidth(){return this.$$.ctx[33]}set widgetWidth(e){this.$$set({widgetWidth:e}),P()}get widgetTarget(){return this.$$.ctx[13]}set widgetTarget(e){this.$$set({widgetTarget:e}),P()}get textColor(){return this.$$.ctx[34]}set textColor(e){this.$$set({textColor:e}),P()}get backgroundColor(){return this.$$.ctx[35]}set backgroundColor(e){this.$$set({backgroundColor:e}),P()}get iconColor(){return this.$$.ctx[36]}set iconColor(e){this.$$set({iconColor:e}),P()}get highlightColor(){return this.$$.ctx[14]}set highlightColor(e){this.$$set({highlightColor:e}),P()}get logoIconEnabled(){return this.$$.ctx[37]}set logoIconEnabled(e){this.$$set({logoIconEnabled:e}),P()}get highlightSections(){return this.$$.ctx[15]}set highlightSections(e){this.$$set({highlightSections:e}),P()}get clickableSections(){return this.$$.ctx[16]}set clickableSections(e){this.$$set({clickableSections:e}),P()}get segmentWidgetSections(){return this.$$.ctx[17]}set segmentWidgetSections(e){this.$$set({segmentWidgetSections:e}),P()}get segmentWidgetPosition(){return this.$$.ctx[18]}set segmentWidgetPosition(e){this.$$set({segmentWidgetPosition:e}),P()}get currentSegment(){return this.$$.ctx[19]}set currentSegment(e){this.$$set({currentSegment:e}),P()}get hoveredSegment(){return this.$$.ctx[20]}set hoveredSegment(e){this.$$set({hoveredSegment:e}),P()}get advertConsent(){return this.$$.ctx[38]}set advertConsent(e){this.$$set({advertConsent:e}),P()}get analyticsConsent(){return this.$$.ctx[39]}set analyticsConsent(e){this.$$set({analyticsConsent:e}),P()}get analyticsCustomUrl(){return this.$$.ctx[40]}set analyticsCustomUrl(e){this.$$set({analyticsCustomUrl:e}),P()}get analyticsTag(){return this.$$.ctx[41]}set analyticsTag(e){this.$$set({analyticsTag:e}),P()}get writeToken(){return this.$$.ctx[65]}set writeToken(e){this.$$set({writeToken:e}),P()}get captureErrors(){return this.$$.ctx[66]}set captureErrors(e){this.$$set({captureErrors:e}),P()}get onError(){return this.$$.ctx[67]}set onError(e){this.$$set({onError:e}),P()}get transitions(){return this.$$.ctx[68]}set transitions(e){this.$$set({transitions:e}),P()}get controlPanel(){return this.$$.ctx[21]}set controlPanel(e){this.$$set({controlPanel:e}),P()}get addEventListener(){return this.$$.ctx[69]}get removeEventListener(){return this.$$.ctx[70]}get initialProps(){return this.$$.ctx[71]}set initialProps(e){this.$$set({initialProps:e}),P()}get showBottomWidget(){return this.$$.ctx[51]}set showBottomWidget(e){this.$$set({showBottomWidget:e}),P()}get showMediaSession(){return this.$$.ctx[52]}set showMediaSession(e){this.$$set({showMediaSession:e}),P()}get isFullScreen(){return this.$$.ctx[72]}set isFullScreen(e){this.$$set({isFullScreen:e}),P()}get mediaElement(){return this.$$.ctx[42]}set mediaElement(e){this.$$set({mediaElement:e}),P()}get userInterface(){return this.$$.ctx[43]}set userInterface(e){this.$$set({userInterface:e}),P()}get widgetInterface(){return this.$$.ctx[44]}set widgetInterface(e){this.$$set({widgetInterface:e}),P()}get controller(){return this.$$.ctx[73]}set controller(e){this.$$set({controller:e}),P()}get analyticsUrl(){return this.$$.ctx[74]}set analyticsUrl(e){this.$$set({analyticsUrl:e}),P()}get analyticsId(){return this.$$.ctx[75]}set analyticsId(e){this.$$set({analyticsId:e}),P()}get listenSessionId(){return this.$$.ctx[76]}set listenSessionId(e){this.$$set({listenSessionId:e}),P()}get sessionCreatedAt(){return this.$$.ctx[77]}set sessionCreatedAt(e){this.$$set({sessionCreatedAt:e}),P()}get isNewListen(){return this.$$.ctx[78]}set isNewListen(e){this.$$set({isNewListen:e}),P()}get prevPercentage(){return this.$$.ctx[45]}set prevPercentage(e){this.$$set({prevPercentage:e}),P()}get segmentWidgets(){return this.$$.ctx[46]}set segmentWidgets(e){this.$$set({segmentWidgets:e}),P()}get segmentContainers(){return this.$$.ctx[79]}set segmentContainers(e){this.$$set({segmentContainers:e}),P()}get segmentClickables(){return this.$$.ctx[80]}set segmentClickables(e){this.$$set({segmentClickables:e}),P()}get segmentHighlights(){return this.$$.ctx[81]}set segmentHighlights(e){this.$$set({segmentHighlights:e}),P()}get onEvent(){return this.$$.ctx[53]}};class Cb{constructor(e,i){this.baseUrl=e==null?void 0:e.replace("{id}",i)}byContentId(e){return Zn(`${this.baseUrl}/by_content_id/${e}`)}byPlaylistId(e){return Zn(`${this.baseUrl}/by_playlist_id/${e}`)}bySourceId(e){return Zn(`${this.baseUrl}/by_source_id/${e}`)}bySourceUrl(e){return Zn(`${this.baseUrl}/by_source_url/${e}`)}byIdentifiers(e){return Zn(`${this.baseUrl}/by_identifiers/${encodeURIComponent(JSON.stringify(e))}`)}}const yl=t=>typeof t!="object"||t===null?t:Array.isArray(t)?t.map(yl):Object.fromEntries(Object.entries(t).map(([e,i])=>[e.replace(/([A-Z])/g,r=>`_${r.toLowerCase()}`),yl(i)])),qc=t=>t==="dark"||t==="auto"&&Lb()?"dark":"light",Lb=()=>window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches,Xc=t=>ln(this,null,function*(){const e=new Cb(t.playerApiUrl,t.projectId);if(!t.playerApiUrl||!t.projectId)return;const i=Ib(t);if(i.length===0)return;const r=yield Rb(e,i).catch(()=>{});if(!(r!=null&&r.content)){Db(t);return}Ob(t,r)}),Ib=t=>{const e=[];return t.contentId&&e.push({content_id:t.contentId}),t.playlistId&&e.push({playlist_id:t.playlistId}),t.sourceId&&e.push({source_id:t.sourceId}),t.sourceUrl&&e.push({source_url:t.sourceUrl}),t.playlist&&e.push(...yl(t.playlist)),[...new Set(e.map(JSON.stringify))].map(JSON.parse)},Rb=(t,e)=>{const i=e[0];if(e.length>1)return t.byIdentifiers(e);if(i.content_id)return t.byContentId(i.content_id);if(i.playlist_id)return t.byPlaylistId(i.playlist_id);if(i.source_id)return t.bySourceId(i.source_id);if(i.source_url)return t.bySourceUrl(i.source_url)},Db=t=>{Zc(t),Jc(t),Qc(t),t.onEvent(Ze({type:"NoContentAvailable",description:"No published and processed content is available for the identifiers.",initiatedBy:"browser"}))},Ob=(t,e)=>{var a;const i=qc(e.settings.theme),r=e.settings[`${i}_theme`];Zc(t),Jc(t,e),Qc(t,e),wt(t,"playerStyle",e.settings.player_style),wt(t,"playerTitle",((a=e.playlist)==null?void 0:a.title)||e.settings.player_title),wt(t,"callToAction",e.settings.call_to_action==="Listen to this article"?null:e.settings.call_to_action),wt(t,"skipButtonStyle",e.settings.skip_button_style),wt(t,"downloadFormats",e.settings.download_button_enabled?["mp3"]:[]),wt(t,"introsOutros",Bb(e.settings)),wt(t,"persistentAdImage",e.settings.persistent_ad_image),wt(t,"widgetStyle",e.settings.widget_style),wt(t,"widgetPosition",e.settings.widget_position),wt(t,"textColor",r.text_color),wt(t,"backgroundColor",r.background_color),wt(t,"iconColor",r.icon_color),wt(t,"highlightColor",r.highlight_color),wt(t,"logoIconEnabled",e.settings.logo_icon_enabled),wt(t,"highlightSections",e.settings.segment_playback_enabled?"all":"none"),wt(t,"clickableSections",e.settings.segment_playback_enabled?"all":"none"),wt(t,"segmentWidgetSections",(e.settings.segment_playback_enabled,"none")),wt(t,"analyticsConsent",Mb(e.settings)),wt(t,"analyticsCustomUrl",e.settings.analytics_custom_url),wt(t,"analyticsTag",e.settings.analytics_tag),wt(t,"analyticsUrl",e.settings.analytics_url),wt(t,"analyticsId",e.settings.analytics_id)},Zc=t=>{wt(t,"contentIndex",0),wt(t,"introsOutrosIndex",-1),wt(t,"advertIndex",-1),wt(t,"persistentIndex",-1),wt(t,"duration",0),wt(t,"currentTime",0),wt(t,"playbackState","stopped"),wt(t,"currentSegment",void 0),wt(t,"hoveredSegment",void 0)},Jc=(t,e)=>{var a;const i=(a=e==null?void 0:e.settings)==null?void 0:a.image_enabled,r=(e==null?void 0:e.content)||[];wt(t,"content",r.map(l=>{var g;return{id:l.id,title:l.title,imageUrl:i&&(((g=e.playlist)==null?void 0:g.image_url)||e.settings.image_url||l.image_url),sourceId:l.source_id,sourceUrl:l.source_url,adsEnabled:l.ads_enabled,duration:l.audio[0]?l.audio[0].duration/1e3:0,media:[...l.video,...l.audio].map(m=>({id:m.id,url:m.url,contentType:m.content_type})),segments:l.segments.map(m=>({marker:m.marker,section:m.section,startTime:m.start_time?m.start_time/1e3:0,duration:m.duration?m.duration/1e3:0}))}}))},Qc=(t,e)=>{var a;const i=(a=e==null?void 0:e.settings)==null?void 0:a.image_enabled,r=(e==null?void 0:e.ads)||[];wt(t,"adverts",r.map(l=>{const g=l.type==="vast",m=qc(l.theme),_=l[`${m}_theme`];return{id:l.id,type:l.type,placement:l.placement,vastUrl:g?l.vast_url:null,clickThroughUrl:g?null:l.click_through_url,imageUrl:i&&l.image_url,textColor:_==null?void 0:_.text_color,backgroundColor:_==null?void 0:_.background_color,iconColor:_==null?void 0:_.icon_color,media:g?[]:l.media.map(T=>({id:T.id,url:T.url,contentType:T.content_type}))}}))},wt=(t,e,i)=>{typeof t.initialProps[e]!="undefined"||(t[e]=i)},Bb=({intro_outro_enabled:t,intro_url:e,outro_url:i})=>{if(!t)return[];const r=[];return e&&r.push({placement:"pre-roll",media:[{url:e}]}),i&&r.push({placement:"post-roll",media:[{url:i}]}),r},Mb=({analytics_enabled:t,analytics_uuid_enabled:e})=>t?e?"allowed":"without-local-storage":"none",Nb=(t,e)=>ln(this,null,function*(){const r=yield(yield fetch(t)).blob(),a=URL.createObjectURL(r),l=document.createElement("a");document.body.append(l),l.href=a,l.setAttribute("download",e),l.setAttribute("target","_blank"),l.click(),l.remove()}),Za={vastUrls:new Set,mediaSources:new Set},Fb=t=>{t.vastUrl&&Za.vastUrls.add(t.vastUrl);for(const e of t.media)Za.mediaSources.add(e.url)},$c=t=>{if(t.vastUrl&&Za.vastUrls.has(t.vastUrl))return!0;for(const e of t.media)if(Za.mediaSources.has(e.url))return!0;return!1},ed=new Set,Ub=t=>{t.media.forEach(e=>ed.add(e.url))},Vb=t=>t.media.some(e=>ed.has(e.url)),Wb=({introsOutrosIndex:t,adverts:e,advertIndex:i,content:r=[],contentIndex:a,currentTime:l,atTheStart:g,atTheEnd:m,errored:_}={})=>{var U;const T=e&&e[i];e:if(T){if(_){Fb(T);break e}if(m)return Ub(T),-1;if(!m)return i}if(!((U=r[a])!=null&&U.adsEnabled)||t!==-1)return-1;const k=Gb({content:r,contentIndex:a,currentTime:l,atTheStart:g,atTheEnd:m});let w=-1,F=-1/0,V=-1/0;for(const[z,H]of e.entries()){if(Vb(H)||$c(H)||!k.has(H.placement))continue;const oe=jb[H.type]||0;if(oe<F)continue;const ce=Math.random();oe===F&&ce<V||(w=z,F=oe,V=ce)}return w},jb={vast:1,custom:0},Gb=({content:t,contentIndex:e,currentTime:i,atTheStart:r,atTheEnd:a})=>{const l=e===0,g=e===t.length-1,m=t.length>1,_=m&&r&&!l,T=t[e].segments,k=T[T.length-1],w=m?null:Yb(T),F=T[w],V=F&&i>F.startTime,U=k?k.startTime+k.duration:0,z=i>U-Hb,H=new Set;return r&&H.add("pre-roll"),V&&!z&&H.add("mid-roll"),_&&H.add("mid-roll"),a&&g&&H.add("post-roll"),_&&H.add("post-roll"),H},zb=2*60,Hb=10,Kb=.5,Yb=t=>{const e=t[t.length-1];if(!e)return;const i=e.startTime+e.duration;if(i<zb)return;const r=i/2,a=ol(t,i/2),m=t[a].startTime>=r-Kb?a:a+1;if(m!==t.length)return m},qb=(t,e,i,r)=>{let a=-1,l=-1/0,g=-1/0;for(const[m,_]of(r||[]).entries()){if(!t||$c(_)||_.type==="vast")continue;const T=Zb(m,e,i);if(T<l)continue;const k=Xb[_.placement]||0;T===l&&k<g||(a=m,l=T,g=k)}return a},Xb={"pre-roll":2,"mid-roll":1},Zb=(t,e,i)=>t===i?2:t===e?1:0,td={mediaSources:new Set},Jb=t=>{for(const e of t.media)td.mediaSources.add(e.url)},Qb=t=>{for(const e of t.media)if(td.mediaSources.has(e.url))return!0;return!1},id=new Set,$b=t=>{t.media.forEach(e=>id.add(e.url))},eS=t=>t.media.some(e=>id.has(e.url)),tS=({introsOutros:t=[],introsOutrosIndex:e,advertIndex:i,content:r,contentIndex:a,currentTime:l,atTheStart:g,atTheEnd:m,errored:_})=>{const T=t[e];e:if(T){if(_){Jb(T);break e}if(m)return $b(T),-1;if(!m)return e}if(i!==-1)return-1;const k=iS({content:r,contentIndex:a,currentTime:l,atTheStart:g,atTheEnd:m});let w=-1,F=-1/0,V=-1/0;for(const[U,z]of t.entries()){if(Qb(z)||!k.has(z.placement))continue;const H=eS(z)?1:0;if(H<F)continue;const oe=Math.random();H===F&&oe<V||(w=U,F=H,V=oe)}return w},iS=({content:t,contentIndex:e,currentTime:i,atTheStart:r,atTheEnd:a})=>{const l=new Set,g=r&&e===0&&i===0,m=a&&e===t.length-1;return g&&l.add("pre-roll"),m&&l.add("post-roll"),l},rS=t=>{if(!navigator.mediaSession)return;const e=t.instances().some(l=>l.mediaSession==="override");if(aS()&&!e)return;let i,r=-1/0,a=-1/0;for(const l of t.instances()){if(l.mediaSession==="none")continue;const g=nS[l.playbackState]||0;if(g<r)continue;const m=sS[l.showMediaSession]||0;g===r&&m<a||(i=l,r=g,a=m)}for(const l of t.instances())l.showMediaSession=l===i;return i},nS={playing:1,paused:0,stopped:0},sS={true:1,false:0},aS=()=>{const t=navigator.mediaSession.metadata;if(!t||navigator.mediaSession.setByPlayer)return!1;const{title:e,artist:i,album:r,artwork:a}=t;return e||i||r||(a==null?void 0:a.length)},oS=t=>{let e=!1,i,r=-1/0,a=-1/0;for(const l of t.instances()){if(!l.userInterface||l.widgetTarget||!gl(l.widgetStyle))continue;if(l.userInterface.isVisible){e=!0;continue}if(!(l.userInterface.relativeY<0))continue;const T=lS[l.playbackState]||0;if(T<r)continue;const k=l.userInterface.absoluteY;T===r&&k<a||(i=l,r=T,a=k)}e&&r===0&&(i=null);for(const l of t.instances())l.showBottomWidget=l===i},lS={playing:2,paused:1,stopped:0};class uS{constructor(e,i){ht(this,xo);ht(this,Po);ht(this,Sa);ht(this,wo);ht(this,Co);ht(this,Or);ht(this,hn);ht(this,or);ht(this,Lo);ht(this,is);ht(this,gn);ht(this,Io);ht(this,Ta);ht(this,Jr);ht(this,ka);ht(this,vn);ht(this,Ii);ht(this,mn);ht(this,Qr);ht(this,Ro);ht(this,Do);ht(this,rs);ht(this,Ea);ht(this,Oo);ht(this,Bo);ht(this,Mo);ht(this,No);this.player=e,this.PlayerClass=i,this.eventListeners={"<any>":{}}}addEventListener(e,i){e==="<any>"||this[`handle${e}`]||ir(`Cannot add listener for unknown event type '${e}'.`);const a=`listener-handle-${Ma()}`;return this.eventListeners[e]=this.eventListeners[e]||{},this.eventListeners[e][a]=i,a}removeEventListener(e,i){this.eventListeners[e]=this.eventListeners[e]||{},delete this.eventListeners[e][i]}processEvent(e){return ln(this,null,function*(){yield Fc(()=>this.player),gg(e);const i=this[`handle${e.type}`],r=ra(this.player);de(this,xo,kh).call(this,e)?e.status="ignored-due-to-advert":de(this,Po,Eh).call(this,e)?e.status="ignored-due-to-scrubbing":i?(yield i.call(this,e),de(this,Ro,Ch).call(this),de(this,Do,Lh).call(this),e.status="handled"):ir("No handler function for event.",e);const a=ra(this.player);e.changedProps=Uc(r,a),e.processedAt=new Date().toISOString(),vg(e),de(this,Sa,yu).call(this,e.type,e),de(this,Sa,yu).call(this,"<any>",e)})}handlePressedChangeSpeed(){de(this,Jr,Kn).call(this,e=>e+1,{cycle:!0})}handlePressedEnterOnChangeSpeed(){de(this,Jr,Kn).call(this,e=>e+1,{cycle:!0})}handlePressedSpaceOnChangeSpeed(){de(this,Jr,Kn).call(this,e=>e+1,{cycle:!0})}handlePressedUpOnChangeSpeed(){de(this,Jr,Kn).call(this,e=>e+1)}handlePressedRightOnChangeSpeed(){de(this,Jr,Kn).call(this,e=>e+1)}handlePressedDownOnChangeSpeed(){de(this,Jr,Kn).call(this,e=>e-1)}handlePressedLeftOnChangeSpeed(){de(this,Jr,Kn).call(this,e=>e-1)}handlePressedPrevSegment(){de(this,ka,Su).call(this,e=>e-1)}handlePressedNextSegment(){de(this,ka,Su).call(this,e=>e+1)}handlePressedSeekBack({seconds:e}){de(this,Ii,tr).call(this,i=>i-e)}handlePressedSeekAhead({seconds:e}){de(this,Ii,tr).call(this,i=>i+e)}handlePressedPrevTrack(){de(this,vn,ds).call(this,e=>e-1)}handlePressedNextTrack(){de(this,vn,ds).call(this,e=>e+1)}handlePressedAdvertLink(){}handlePressedAdvertButton(){}handlePressedAdvertImage(){}handlePressedAdvertVideo(){}handlePressedBeyondWords(){}handlePressedSourceUrl(){}handleDurationUpdated(){}handleCurrentTimeUpdated(){!this.midrollPlayed&&de(this,Qr,Yn).call(this)}handlePlaybackRateUpdated(){}handleVisibilityChanged(){oS(this.PlayerClass)}handlePressedScrollToPlayer(){this.player.target.scrollIntoView()}handlePressedVideoBackground(){de(this,gn,cs).call(this)}handlePressedEnterOnProgressBar(){de(this,gn,cs).call(this)}handlePressedSpaceOnProgressBar(){de(this,gn,cs).call(this)}handlePressedEnterOnProgressCircle(){de(this,gn,cs).call(this)}handlePressedSpaceOnProgressCircle(){de(this,gn,cs).call(this)}handlePressedLeftOnProgressBar(){de(this,Ii,tr).call(this,e=>e-5)}handlePressedRightOnProgressBar(){de(this,Ii,tr).call(this,e=>e+5)}handlePressedLeftOnProgressCircle(){de(this,Ii,tr).call(this,e=>e-5)}handlePressedRightOnProgressCircle(){de(this,Ii,tr).call(this,e=>e+5)}handlePressedProgressBar({ratio:e}){this.preScrubState=this.player.playbackState,de(this,Io,wh).call(this),de(this,Ii,tr).call(this,(i,r)=>e*r),e!==0&&(this.segmentPlayed=!0)}handleScrubbedProgressBar({ratio:e}){de(this,Ii,tr).call(this,(i,r)=>e*r),e!==0&&(this.segmentPlayed=!0)}handleFinishedScrubbingProgressBar(){this.player.playbackState=this.preScrubState,delete this.preScrubState}handleIdentifiersChanged(){Xc(this.player).then(()=>{de(this,mn,fs).call(this,{atTheStart:!0}),de(this,Qr,Yn).call(this,{atTheStart:!0})})}handleNoContentAvailable({description:e}){console.warn(`BeyondWords.Player: ${e}`)}handleMediaLoaded(){if(this.mediaLoaded)return;const e=this.player.initialProps.currentTime;e&&(this.player.currentTime=e),this.mediaLoaded=!0}handlePressedPlay({emittedFrom:e,widgetSegment:i,widgetIsCurrent:r}){e==="segment-widget"&&!r?de(this,Ta,bu).call(this,i):this.player.playbackState="playing"}handlePressedPause(){this.player.playbackState="paused"}handlePlaybackPlaying(){this.player.playbackState="playing",this.PlayerClass.instances().filter(r=>r!==this.player).filter(r=>r.playbackState==="playing").forEach(r=>r.playbackState="paused"),rS(this.PlayerClass)}handlePlaybackPaused(){if(this.player.playbackState!=="playing")return;const e=this.player.contentIndex===0&&this.player.currentTime===0;this.player.playbackState=e?"stopped":"paused"}handlePlaybackEnded(){de(this,Lo,Ph).call(this)&&(this.midrollPlayed=!0),this.segmentPlayed=!1;const e=de(this,Or,An).call(this),i=de(this,or,Cr).call(this);de(this,Qr,Yn).call(this,{atTheEnd:!0,wasIntro:e}),!i&&(de(this,mn,fs).call(this,{atTheEnd:!0}),!e&&(de(this,hn,us).call(this)||de(this,or,Cr).call(this)||de(this,vn,ds).call(this,r=>r+1)))}handlePlaybackNotAllowed({description:e}){console.warn(`BeyondWords.Player: ${e}`);const i=this.player.contentIndex===0&&this.player.currentTime===0;this.player.playbackState=i?"stopped":"paused"}handlePlaybackErrored({mediaType:e,errorMessage:i}){console.warn(`BeyondWords.Player: ${e} playback error: ${i}`),de(this,Or,An).call(this)||de(this,hn,us).call(this)?de(this,mn,fs).call(this,{errored:!0}):de(this,or,Cr).call(this)?de(this,Qr,Yn).call(this,{errored:!0}):this.handlePlaybackEnded()}handlePressedMaximize(){sc()?g1():h1(this.player.target)}handleFullScreenModeUpdated(){const e=sc()===this.player.target,i=e?"add":"remove";this.player.isFullScreen=e,this.player.target.classList[i]("maximized")}handlePressedPlaylistItem({index:e}){de(this,vn,ds).call(this,()=>e),this.player.playbackState="playing"}handlePressedTogglePlaylist(){const e=this.player.playlistStyle.split("-"),i=this.player.content.length>1,r=e[0]==="show"||e[0]==="auto"&&i;e[0]=r?"hide":"show",this.player.playlistStyle=e.join("-")}handlePressedDownload({contentIndex:e,mediaIndex:i}){const r=this.player.content[e],l=r.media[i].url,g=l.split(".").pop(),m=`${r.title}.${g}`;return Nb(l,m)}handlePressedCloseWidget(){for(const e of this.PlayerClass.instances())e.playbackState="paused",e.widgetStyle="closed-by-user"}handleContentStatusChanged({contentId:e,legacyId:i,sourceId:r,sourceUrl:a,contentStatus:l}){l==="processed"&&this.player.playbackState==="stopped"&&this.player.contentIndex===0&&this.player.currentTime===0&&de(this,Mo,Dh).call(this,{contentId:e,legacyId:i,sourceId:r,sourceUrl:a})&&Xc(this.player).then(()=>{de(this,mn,fs).call(this,{atTheStart:!0}),de(this,Qr,Yn).call(this,{atTheStart:!0})})}handleCurrentSegmentUpdated({segment:e,segmentIndex:i,contentIndex:r}){var a;de(this,is,wa).call(this)?this.player.currentSegment=ii(fe({},e),{segmentIndex:i,contentIndex:r}):this.segmentPlayed||((a=this.player.segmentContainers)==null||a.reset(),this.player.currentSegment=null)}handleHoveredSegmentUpdated({segment:e,segmentIndex:i,contentIndex:r}){e?this.player.hoveredSegment=ii(fe({},e),{segmentIndex:i,contentIndex:r}):this.player.hoveredSegment=null}handlePressedSegment({segment:e,segmentIndex:i,contentIndex:r}){if(!ia("hovered",e,this.player.clickableSections))return;if(!de(this,No,Oh).call(this,{contentIndex:r,segmentIndex:i})&&!de(this,or,Cr).call(this)){de(this,gn,cs).call(this);return}r!==this.player.contentIndex&&de(this,vn,ds).call(this,()=>r),de(this,Ta,bu).call(this,fe({segmentIndex:i,contentIndex:r},e))}}xo=new WeakSet,kh=function({type:e}){return de(this,or,Cr).call(this)&&(e.includes("ChangeSpeed")||e.includes("PrevSegment")||e.includes("NextSegment")||e.includes("SeekBack")||e.includes("SeekAhead")||e.includes("Progress")&&!e.includes("Space")&&!e.includes("Enter"))},Po=new WeakSet,Eh=function({type:e}){return this.preScrubState&&(e.includes("CurrentTimeUpdated")||e.includes("PlaybackEnded"))},Sa=new WeakSet,yu=function(e,i){const r=this.eventListeners[e]||{};Object.values(r).forEach(a=>a(i))},wo=new WeakSet,Ah=function(){return this.player.introsOutros.some(e=>e.placement==="pre-roll")},Co=new WeakSet,xh=function(){return this.player.introsOutros.some(e=>e.placement==="post-roll")},Or=new WeakSet,An=function(e=this.player.introsOutrosIndex){var i,r,a;return((a=(r=(i=this.player)==null?void 0:i.introsOutros)==null?void 0:r[e])==null?void 0:a.placement)==="pre-roll"},hn=new WeakSet,us=function(e=this.player.introsOutrosIndex){var i,r,a;return((a=(r=(i=this.player)==null?void 0:i.introsOutros)==null?void 0:r[e])==null?void 0:a.placement)==="post-roll"},or=new WeakSet,Cr=function(){return this.player.advertIndex!==-1},Lo=new WeakSet,Ph=function(){var e;return((e=this.player.adverts[this.player.advertIndex])==null?void 0:e.placement)==="mid-roll"},is=new WeakSet,wa=function(){return!de(this,Or,An).call(this)&&!de(this,hn,us).call(this)&&!de(this,or,Cr).call(this)},gn=new WeakSet,cs=function(){this.player.playbackState==="playing"?this.player.playbackState="paused":this.player.playbackState="playing"},Io=new WeakSet,wh=function(){this.player.playbackState==="playing"&&(this.player.playbackState="paused")},Ta=new WeakSet,bu=function(a){var l=a,{segmentIndex:e,contentIndex:i}=l,r=mu(l,["segmentIndex","contentIndex"]);de(this,Ii,tr).call(this,()=>r.startTime,i),this.player.currentSegment=fe({segmentIndex:e,contentIndex:i},r),this.player.playbackState="playing",this.segmentPlayed=!0},Jr=new WeakSet,Kn=function(e,{cycle:i}={}){const r=[.5,.6,.7,.8,.9,1,1.1,1.2,1.3,1.4,1.5,2,2.5,3],a=r.length-1,l=r.indexOf(this.player.playbackRate),g=e(l);let m;i?m=g%r.length:m=Math.max(0,Math.min(a,g)),this.player.playbackRate=r[m]||1},ka=new WeakSet,Su=function(e){const i=this.player.content[this.player.contentIndex].segments,r=ol(i,this.player.currentTime),a=e(r);de(this,Or,An).call(this)&&a>=0?this.handlePlaybackEnded():de(this,hn,us).call(this)&&a<0?(de(this,rs,Ca).call(this,-1),de(this,Ii,tr).call(this,()=>{var l;return((l=i[i.length-1])==null?void 0:l.startTime)||.01}),this.player.playbackState="playing"):de(this,is,wa).call(this)&&a<0&&de(this,wo,Ah).call(this)?(de(this,Ii,tr).call(this,()=>0),de(this,mn,fs).call(this,{atTheStart:!0})):de(this,is,wa).call(this)&&a===i.length&&de(this,Co,xh).call(this)?de(this,Ii,tr).call(this,()=>this.player.duration-.01):de(this,is,wa).call(this)&&a>=0&&a<i.length&&de(this,Ii,tr).call(this,()=>i[a].startTime)},vn=new WeakSet,ds=function(e){const i=e(this.player.contentIndex),r=i<0||i>=this.player.content.length;r?(this.player.playbackState="stopped",de(this,Ii,tr).call(this,()=>0)):(this.player.contentIndex=i,de(this,or,Cr).call(this)||(de(this,Ii,tr).call(this,()=>0),this.midrollPlayed=!1)),de(this,rs,Ca).call(this,-1),de(this,mn,fs).call(this,{atTheStart:!0}),r||de(this,Qr,Yn).call(this,{atTheStart:!0})},Ii=new WeakSet,tr=function(e,i){if(de(this,or,Cr).call(this))this.prevTime=e(),this.prevContent=i;else{const r=this.player.duration||0;this.player.currentTime=e(this.player.currentTime,r)}},mn=new WeakSet,fs=function({atTheStart:e,atTheEnd:i,errored:r}={}){const{content:a,introsOutros:l,currentTime:g}=this.player,m=typeof this.nextIntroOutro!="undefined"?this.nextIntroOutro:this.player.introsOutrosIndex,_=typeof this.nextAdvert!="undefined"?this.nextAdvert:this.player.advertIndex,T=typeof this.prevContent!="undefined"?this.prevContent:this.player.contentIndex;de(this,rs,Ca).call(this,tS({introsOutros:l,introsOutrosIndex:m,advertIndex:_,content:a,contentIndex:T,currentTime:g,atTheStart:e,atTheEnd:i,errored:r}))},Qr=new WeakSet,Yn=function({atTheStart:e,atTheEnd:i,wasIntro:r,errored:a}={}){const{adverts:l,content:g,currentTime:m}=this.player;let _=typeof this.nextIntroOutro!="undefined"?this.nextIntroOutro:this.player.introsOutrosIndex;const T=typeof this.nextAdvert!="undefined"?this.nextAdvert:this.player.advertIndex,k=typeof this.prevContent!="undefined"?this.prevContent:this.player.contentIndex;r&&(e=!0,i=!1,_=-1),de(this,Ea,Tu).call(this,Wb({introsOutrosIndex:_,adverts:l,advertIndex:T,content:g,contentIndex:k,currentTime:m,atTheStart:e,atTheEnd:i,errored:a}));const w=this.player.persistentAdImage,F=this.player.persistentIndex;this.player.persistentIndex=qb(w,F,T,l)},Ro=new WeakSet,Ch=function(){this.player.playbackState==="playing"&&typeof this.nextIntroOutro!="undefined"&&(de(this,rs,Ca).call(this,this.nextIntroOutro),delete this.nextIntroOutro)},Do=new WeakSet,Lh=function(){this.player.playbackState==="playing"&&typeof this.nextAdvert!="undefined"&&(de(this,Ea,Tu).call(this,this.nextAdvert),delete this.nextAdvert)},rs=new WeakSet,Ca=function(e){if(this.player.playbackState!=="playing"&&e!==-1){this.nextIntroOutro=e;return}else delete this.nextIntroOutro;if(!(this.player.contentIndex===0&&this.player.currentTime===0)&&de(this,Or,An).call(this,e)){this.player.introsOutrosIndex=-1,de(this,Qr,Yn).call(this,{atTheStart:!0});return}const l=de(this,Or,An).call(this),g=de(this,hn,us).call(this);this.player.introsOutrosIndex=e;const m=l&&!de(this,Or,An).call(this),_=g&&!de(this,hn,us).call(this);m&&(this.player.currentTime=0),_&&de(this,vn,ds).call(this,()=>1/0)},Ea=new WeakSet,Tu=function(e){if(this.player.playbackState!=="playing"&&e!==-1){this.nextAdvert=e;return}else delete this.nextAdvert;const r=de(this,or,Cr).call(this);this.player.advertIndex=e;const a=!r&&de(this,or,Cr).call(this),l=r&&!de(this,or,Cr).call(this);a&&de(this,Oo,Ih).call(this),l&&de(this,Bo,Rh).call(this)},Oo=new WeakSet,Ih=function(){de(this,Or,An).call(this)||(this.prevTime=this.player.currentTime),this.prevRate=this.player.playbackRate,this.prevContent=this.player.contentIndex,this.player.currentTime=0,this.player.playbackRate=1},Bo=new WeakSet,Rh=function(){this.player.playbackRate=this.prevRate||1,this.player.contentIndex!==this.prevContent||(this.player.currentTime=this.prevTime),delete this.prevTime,delete this.prevRate,delete this.prevContent},Mo=new WeakSet,Dh=function({contentId:e,legacyId:i,sourceId:r,sourceUrl:a}){var l,g,m,_;return this.player.contentId===e||this.player.contentId===i||this.player.sourceId===r||this.player.sourceUrl===a||((l=this.player.playlist)==null?void 0:l.some(T=>T.contentId===e))||((g=this.player.playlist)==null?void 0:g.some(T=>T.contentId===i))||((m=this.player.playlist)==null?void 0:m.some(T=>T.sourceId===r))||((_=this.player.playlist)==null?void 0:_.some(T=>T.sourceUrl===a))},No=new WeakSet,Oh=function({contentIndex:e,segmentIndex:i}){var r,a;return((r=this.player.currentSegment)==null?void 0:r.contentIndex)!==e||((a=this.player.currentSegment)==null?void 0:a.segmentIndex)!==i};var sa="<unknown>";function rd(t){var e=t.split(`
71
+ gtag("js", new Date());`,e.async=!0,Lr(e.src,i="https://www.googletagmanager.com/gtag/js?id="+t[0])||Ic(e,"src",i)},m(l,g){te(l,e,g),te(l,r,g),te(l,a,g)},p(l,g){g&1&&!Lr(e.src,i="https://www.googletagmanager.com/gtag/js?id="+l[0])&&Ic(e,"src",i)},d(l){l&&$(e),l&&$(r),l&&$(a)}}}function ib(t){let e,i=!t[1]&&Rc(t);return{c(){i&&i.c(),e=qn()},m(r,a){i&&i.m(document.head,null),I(document.head,e)},p(r,[a]){r[1]?i&&(i.d(1),i=null):i?i.p(r,a):(i=Rc(r),i.c(),i.m(e.parentNode,e))},i:ue,o:ue,d(r){i&&i.d(r),$(e)}}}function rb(t,e,i){let r,{analyticsTag:a}=e;return t.$$set=l=>{"analyticsTag"in l&&i(0,a=l.analyticsTag)},i(1,r=window.gtag),[a,r]}class nb extends rt{constructor(e){super(),it(this,e,rb,ib,Xe,{analyticsTag:0})}get analyticsTag(){return this.$$.ctx[0]}set analyticsTag(e){this.$$set({analyticsTag:e}),P()}}const ux="";class sb extends rt{constructor(e){super(),it(this,e,null,null,Xe,{})}}class pl{constructor(e,i){ht(this,pa);ht(this,_o);this.onSelected=e,this.onDeselected=i,this.consumers={}}addInterest(e,i,...r){var l;(l=this.consumers)[e]||(l[e]=[]);const a=this.consumers[e].slice(-1)[0];this.consumers[e].push({consumerId:i,args:r}),!(a&&de(this,pa,_u).call(this,r,a.args))&&(a&&this.onDeselected(e,...a.args),this.onSelected(e,...r))}removeInterest(e,i){var g;(g=this.consumers)[e]||(g[e]=[]);const r=this.consumers[e].slice(-1)[0];if(de(this,_o,vh).call(this,this.consumers[e],m=>m.consumerId===i),!(r&&i===r.consumerId))return;const l=this.consumers[e].slice(-1)[0];l&&de(this,pa,_u).call(this,r.args,l.args)||(this.onDeselected(e,...r.args),l&&this.onSelected(e,...l.args))}}pa=new WeakSet,_u=function(e,i){return e.length===i.length&&e.every((r,a)=>r===i[a])},_o=new WeakSet,vh=function(e,i){for(let r=e.length-1;r>=0;r-=1)if(i(e[r])){e.splice(r,1);return}};const ia=(t,e,i)=>{let[r,a]=i.split("-");r||(r="none"),a||(a=r);const l=t==="current"?r:a;return l==="all"||l==="body"&&(e==null?void 0:e.section)==="body"},In="data-beyondwords-marker",Dc=t=>["beyondwords-highlight","bwp",`marker-${t}`],Fs=class{update(e,i,r,a){const l=ia(e,i,r),g=this[`prev${e}`],m=l?i==null?void 0:i.marker:null;m&&Wr(Fs,_a).addInterest(m,this,a),g&&Wr(Fs,_a).removeInterest(g,this),this[`prev${e}`]=m}};let As=Fs;_a=new WeakMap,yo=new WeakSet,mh=function(e,i){const r=document.querySelectorAll(`[${In}="${e}"]`);for(const a of r){const l=document.createTreeWalker(a,NodeFilter.SHOW_TEXT,null,!1);let g;for(;g=l.nextNode();){if(/^\s*$/.test(g.nodeValue))continue;g.parentNode.nodeName.toLowerCase()==="a"&&(g=g.parentNode);const T=document.createElement("mark");T.classList.add(...Dc(e)),T.style.background=i,g.parentNode.insertBefore(T,g),T.appendChild(g)}}},bo=new WeakSet,ph=function(e){const i=document.querySelectorAll(`[${In}="${e}"]`);for(const r of i){const a=r.querySelectorAll(`mark.${Dc(e)}`);for(const l of a)for(const g of l.childNodes)l.parentNode.insertBefore(g,l),l.remove()}},ht(As,yo),ht(As,bo),ht(As,_a,new pl(de(Fs,yo,mh),de(Fs,bo,ph)));const Oc=["beyondwords-clickable","bwp"],Us=class{update(e,i){const r=ia("hovered",e,i),a=this.previous,l=r?e==null?void 0:e.marker:null;l&&Wr(Us,ya).addInterest(l,this),a&&Wr(Us,ya).removeInterest(a,this),this.previous=l}};let xs=Us;ya=new WeakMap,So=new WeakSet,_h=function(e){const i=document.querySelectorAll(`[${In}="${e}"]`);for(const r of i)r.classList.add(...Oc)},To=new WeakSet,yh=function(e){const i=document.querySelectorAll(`[${In}="${e}"]`);for(const r of i)Bc(r,Oc)},ht(xs,So),ht(xs,To),ht(xs,ya,new pl(de(Us,So,_h),de(Us,To,yh)));const Bc=(t,e)=>{if(!t)return;const a=[...t.classList].filter(l=>!e.includes(l)).some(l=>l.startsWith("beyondwords-"))?e.filter(l=>l!=="bwp"):e;t.classList.remove(...a)},Mc=(t,e,i)=>["beyondwords-widget","bwp",`marker-${t}`,`position-${e}`,`for-${i}-player`],Nc=["beyondwords-relative","bwp"],Vs=class{constructor(e){this.onUpdate=e,this.containers=[]}update(e,i,r,a){const l=i.includes("all")||i.includes("body"),g=this.previous,m=(e==null?void 0:e.marker)||l&&(g==null?void 0:g.marker);m&&Wr(Vs,ba).addInterest(m,this,this,r,a),g&&Wr(Vs,ba).removeInterest(g,this),this.previous=m}reset(){this.update(null,"none")}};let Ps=Vs;ba=new WeakMap,ko=new WeakSet,bh=function(e,i,r,a){const l=document.querySelector(`[${In}="${e}"]`),g=document.createElement("div");["2-oclock","3-oclock","4-oclock","8-oclock","9-oclock","10-oclock"].includes(r)&&l.classList.add(...Nc),g.classList.add(...Mc(e,r,a)),["11-oclock","12-oclock","1-oclock"].includes(r)?l.insertBefore(g,l.firstChild):l.appendChild(g),i.containers.push(g),i.onUpdate(i.containers)},Eo=new WeakSet,Sh=function(e,i,r,a){const l=Mc(e,r,a);for(let g=0;g<i.containers.length;g+=1){if(!l.every(T=>i.containers[g].classList.contains(T)))continue;const _=i.containers[g].parentNode;Bc(_,Nc),i.containers[g].remove(),i.containers.splice(g,1),g-=1}i.onUpdate(i.containers)},ht(Ps,ko),ht(Ps,Eo),ht(Ps,ba,new pl(de(Vs,ko,bh),de(Vs,Eo,Sh)));const ab=()=>Ze({type:"IdentifiersChanged",description:"The Player's content identifiers changed.",initiatedBy:"browser"}),Zn=(i,...r)=>ln(this,[i,...r],function*(t,e={}){const a=yield fetch(t,e).catch(()=>{}),l=yield a==null?void 0:a.json().catch(()=>{});return(a==null?void 0:a.status)!==200&&ir(`Failed to fetch ${t}`,ii(fe({},e),{responseStatus:a==null?void 0:a.status,responseJson:l})),l}),ob=(t,e)=>Zn(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e,(i,r)=>r===void 0?null:r)});class lb{constructor(e,i,r){ht(this,Ao);this.baseUrl=de(this,Ao,Th).call(this,e),this.projectId=i,this.writeToken=r}getWebSocketToken(){return ln(this,null,function*(){const e={Authorization:`Token token=${this.writeToken}`},{token:i}=yield Zn(`https://${this.baseUrl}/api/v4/token/ws`,{headers:e});this.webSocketToken=i})}establishConnection(e,i){return ln(this,null,function*(){const r=`wss://${this.baseUrl}/cable?token=${this.webSocketToken}`,a="actioncable-v1-json";this.webSocket=new WebSocket(r,a),this.webSocket.onmessage=l=>e(JSON.parse(l.data)),this.webSocket.onerror=i,yield new Promise(l=>this.webSocket.onopen=l)})}subscribeToStatusChanges(){const e=JSON.stringify({channel:"Api::V1::ProjectChannel",id:this.projectId}),i=JSON.stringify({command:"subscribe",identifier:e});this.webSocket.send(i)}destroy(){this.webSocketToken=null,this.webSocket&&(this.webSocket.onmessage=()=>{},this.webSocket.onerror=()=>{},this.webSocket.close(),this.webSocket=null)}}Ao=new WeakSet,Th=function(e){return e.includes("staging")?"app.staging-beyondwords.io":"app.beyondwords.io"};let Jn;const ub=(t,e,i,r)=>ln(this,null,function*(){!t||!e||!i||(Jn==null||Jn.destroy(),Jn=new lb(t,e,i),yield Jn.getWebSocketToken(),yield Jn.establishConnection(cb(r),hb),yield Jn.subscribeToStatusChanges())}),cb=t=>e=>{var a,l;((l=(a=e==null?void 0:e.message)==null?void 0:a.result)==null?void 0:l.action)==="podcast_state_updated"&&db(e,t),e.type==="reject_subscription"&&fb(e)},db=(t,e)=>{const i=t.message.result;e(Ze({type:"ContentStatusChanged",description:"The processing status of a content item within the project changed.",initiatedBy:"websocket",contentId:i.content_id,legacyId:i.legacy_id,sourceId:i.source_id,sourceUrl:i.source_url,contentStatus:i.state}))},fb=t=>{ir("The WebSocket status change subscription was rejected.",{webSocketEvent:t})},hb=t=>{ir("Unexpected WebSocket error.",{error:t})},Fc=t=>{if(!t())return new Promise(e=>{setInterval(()=>t()&&e(),10)})},ra=t=>{const i=Object.keys(t.$$.props).filter(r=>!gb.has(r)).map(r=>[r,t[r]]);return Object.fromEntries(i)},gb=new Set(["addEventListener","removeEventListener","mediaElement","userInterface","widgetInterface","controller"]),Uc=(t,e)=>{const i=new Set([...Object.keys(t),...Object.keys(e)]),r={};for(const a of i){const l=t[a],g=e[a];l!==g&&(r[a]={previousValue:l,currentValue:g})}return r};let na=-1;const Vc=[],vb=(t,e,i)=>ln(this,null,function*(){yield Fc(()=>e.player);const r=e.player,a=mb(r.contentIndex,i,t);a>na&&pb(r,na,a,t),a<na&&_b(r,na,a),na=a}),mb=(t,e,i)=>{const r=i.findIndex(l=>l[0]===t&&l[1]>e||l[0]>t);return r===-1?i.length-1:r-1},pb=(t,e,i,r)=>{for(let a=e+1;a<=i;a+=1){const l=ra(t);r[a][2](t);const g=ra(t),m=Uc(l,g);Vc.push(m)}},_b=(t,e,i)=>{for(let r=e;r>i;r-=1){const a=Vc.pop();for(const[l,g]of Object.entries(a))t[l]=g.previousValue}},yb=t=>t?bb(t)?{newTarget:Tb(t),showUserInterface:!0}:typeof t=="string"?{newTarget:_l(t),showUserInterface:!0}:{newTarget:t,showUserInterface:!0}:{newTarget:Sb(),showUserInterface:!1},bb=t=>typeof t=="object"&&t.nodeName.toLowerCase()==="script",Sb=()=>{const t=document.createElement("div");return document.body.appendChild(t),t},Tb=t=>{const e=document.createElement("div");return t.parentNode.insertBefore(e,t.nextSibling),e},_l=(t,e="player")=>{if(typeof t!="string")return t;const i=document.querySelectorAll(t);return i.length===0&&ir(`Failed to initialize ${e} because the target could not be found.`,{target:t,elements:i}),i.length>1&&ir(`Failed to initialize ${e} because the target is ambiguous. (${i.length} elements match)`,{target:t,elements:i}),i[0]};function Wc(t,e,i){const r=t.slice();return r[138]=e[i],r}function jc(t){let e,i,r={onEvent:t[53],playerStyle:t[59],callToAction:t[23],skipButtonStyle:t[24],playlistStyle:t[25],playlistToggle:t[26],downloadFormats:t[47],playerTitle:t[22],content:t[48],contentIndex:t[7],duration:t[29],currentTime:t[11],playbackState:t[30],playbackRate:t[31],activeAdvert:t[56],persistentAdvert:t[62],textColor:t[34],backgroundColor:t[35],iconColor:t[36],logoIconEnabled:t[37],videoIsBehind:t[61]};return e=new vl({props:r}),t[91](e),{c(){ze(e.$$.fragment)},m(a,l){We(e,a,l),i=!0},p(a,l){const g={};l[1]&268435456&&(g.playerStyle=a[59]),l[0]&8388608&&(g.callToAction=a[23]),l[0]&16777216&&(g.skipButtonStyle=a[24]),l[0]&33554432&&(g.playlistStyle=a[25]),l[0]&67108864&&(g.playlistToggle=a[26]),l[1]&65536&&(g.downloadFormats=a[47]),l[0]&4194304&&(g.playerTitle=a[22]),l[1]&131072&&(g.content=a[48]),l[0]&128&&(g.contentIndex=a[7]),l[0]&536870912&&(g.duration=a[29]),l[0]&2048&&(g.currentTime=a[11]),l[0]&1073741824&&(g.playbackState=a[30]),l[1]&1&&(g.playbackRate=a[31]),l[1]&33554432&&(g.activeAdvert=a[56]),l[2]&1&&(g.persistentAdvert=a[62]),l[1]&8&&(g.textColor=a[34]),l[1]&16&&(g.backgroundColor=a[35]),l[1]&32&&(g.iconColor=a[36]),l[1]&64&&(g.logoIconEnabled=a[37]),l[1]&1073741824&&(g.videoIsBehind=a[61]),e.$set(g)},i(a){i||(X(e.$$.fragment,a),i=!0)},o(a){se(e.$$.fragment,a),i=!1},d(a){t[91](null),je(e,a)}}}function Gc(t){let e,i;return e=new ml({props:{root:t[13],$$slots:{default:[kb]},$$scope:{ctx:t}}}),{c(){ze(e.$$.fragment)},m(r,a){We(e,r,a),i=!0},p(r,a){const l={};a[0]&8192&&(l.root=r[13]),a[0]&1639987328|a[1]&167977087|a[2]&1|a[4]&131072&&(l.$$scope={dirty:a,ctx:r}),e.$set(l)},i(r){i||(X(e.$$.fragment,r),i=!0)},o(r){se(e.$$.fragment,r),i=!1},d(r){je(e,r)}}}function kb(t){let e,i,r={onEvent:t[53],playerStyle:t[12],callToAction:t[23],skipButtonStyle:t[24],playlistStyle:"hide",playlistToggle:"hide",downloadFormats:t[47],playerTitle:t[22],fixedPosition:!t[13]&&t[32],fixedWidth:t[33],content:t[48],contentIndex:t[7],duration:t[29],currentTime:t[11],playbackState:t[30],playbackRate:t[31],activeAdvert:t[56],persistentAdvert:t[62],textColor:t[34],backgroundColor:t[35],iconColor:t[36],logoIconEnabled:t[37],videoIsBehind:t[58]};return e=new vl({props:r}),t[92](e),{c(){ze(e.$$.fragment)},m(a,l){We(e,a,l),i=!0},p(a,l){const g={};l[0]&4096&&(g.playerStyle=a[12]),l[0]&8388608&&(g.callToAction=a[23]),l[0]&16777216&&(g.skipButtonStyle=a[24]),l[1]&65536&&(g.downloadFormats=a[47]),l[0]&4194304&&(g.playerTitle=a[22]),l[0]&8192|l[1]&2&&(g.fixedPosition=!a[13]&&a[32]),l[1]&4&&(g.fixedWidth=a[33]),l[1]&131072&&(g.content=a[48]),l[0]&128&&(g.contentIndex=a[7]),l[0]&536870912&&(g.duration=a[29]),l[0]&2048&&(g.currentTime=a[11]),l[0]&1073741824&&(g.playbackState=a[30]),l[1]&1&&(g.playbackRate=a[31]),l[1]&33554432&&(g.activeAdvert=a[56]),l[2]&1&&(g.persistentAdvert=a[62]),l[1]&8&&(g.textColor=a[34]),l[1]&16&&(g.backgroundColor=a[35]),l[1]&32&&(g.iconColor=a[36]),l[1]&64&&(g.logoIconEnabled=a[37]),l[1]&134217728&&(g.videoIsBehind=a[58]),e.$set(g)},i(a){i||(X(e.$$.fragment,a),i=!0)},o(a){se(e.$$.fragment,a),i=!1},d(a){t[92](null),je(e,a)}}}function Eb(t){let e,i;return e=new vl({props:{onEvent:t[93],playerStyle:"small",fixedWidth:0,logoIconEnabled:!1,content:t[48],contentIndex:t[7],duration:t[29],currentTime:t[60]?t[11]:t[54].startTime,playbackState:t[60]?t[30]:"paused",activeAdvert:t[56],persistentAdvert:t[62],textColor:t[34],backgroundColor:t[35],iconColor:t[36]}}),{c(){ze(e.$$.fragment)},m(r,a){We(e,r,a),i=!0},p(r,a){const l={};a[1]&75497472&&(l.onEvent=r[93]),a[1]&131072&&(l.content=r[48]),a[0]&128&&(l.contentIndex=r[7]),a[0]&536870912&&(l.duration=r[29]),a[0]&2048|a[1]&545259520&&(l.currentTime=r[60]?r[11]:r[54].startTime),a[0]&1073741824|a[1]&536870912&&(l.playbackState=r[60]?r[30]:"paused"),a[1]&33554432&&(l.activeAdvert=r[56]),a[2]&1&&(l.persistentAdvert=r[62]),a[1]&8&&(l.textColor=r[34]),a[1]&16&&(l.backgroundColor=r[35]),a[1]&32&&(l.iconColor=r[36]),e.$set(l)},i(r){i||(X(e.$$.fragment,r),i=!0)},o(r){se(e.$$.fragment,r),i=!1},d(r){je(e,r)}}}function zc(t,e){let i,r,a;return r=new ml({props:{root:e[138],$$slots:{default:[Eb]},$$scope:{ctx:e}}}),{key:t,first:null,c(){i=qn(),ze(r.$$.fragment),this.first=i},m(l,g){te(l,i,g),We(r,l,g),a=!0},p(l,g){e=l;const m={};g[1]&32768&&(m.root=e[138]),g[0]&1610614912|g[1]&646053944|g[2]&1|g[4]&131072&&(m.$$scope={dirty:g,ctx:e}),r.$set(m)},i(l){a||(X(r.$$.fragment,l),a=!0)},o(l){se(r.$$.fragment,l),a=!1},d(l){l&&$(i),je(r,l)}}}function Hc(t){let e,i;return e=new ml({props:{root:t[21],$$slots:{default:[Ab]},$$scope:{ctx:t}}}),{c(){ze(e.$$.fragment)},m(r,a){We(e,r,a),i=!0},p(r,a){const l={};a[0]&2097152&&(l.root=r[21]),a[0]&2145386495|a[1]&919551|a[4]&131072&&(l.$$scope={dirty:a,ctx:r}),e.$set(l)},i(r){i||(X(e.$$.fragment,r),i=!0)},o(r){se(e.$$.fragment,r),i=!1},d(r){je(e,r)}}}function Ab(t){let e,i,r,a,l,g,m,_,T,k,w,F,V,U,z,H,oe,ce,ge,me,le,Se,ee,L,ae,W,Je,we,Re,Oe,K,Z,B,Ke,Ne,Ce,Ue,ie,pe,ft,Ae,Le,qe;function Dt(q){t[94](q)}function Ct(q){t[95](q)}function $t(q){t[96](q)}function bt(q){t[97](q)}function Gt(q){t[98](q)}function zt(q){t[99](q)}function ut(q){t[100](q)}function Lt(q){t[101](q)}function pt(q){t[102](q)}function St(q){t[103](q)}function Yt(q){t[104](q)}function Te(q){t[105](q)}function yt(q){t[106](q)}function At(q){t[107](q)}function st(q){t[108](q)}function Ut(q){t[109](q)}function oi(q){t[110](q)}function li(q){t[111](q)}function Ot(q){t[112](q)}function Bt(q){t[113](q)}function Mt(q){t[114](q)}function qt(q){t[115](q)}function ui(q){t[116](q)}function Vt(q){t[117](q)}function ri(q){t[118](q)}function yi(q){t[119](q)}function Nt(q){t[120](q)}function at(q){t[121](q)}function fi(q){t[122](q)}function De(q){t[123](q)}function hi(q){t[124](q)}function Xt(q){t[125](q)}function et(q){t[126](q)}function ci(q){t[127](q)}function Wt(q){t[128](q)}function _e(q){t[129](q)}function gi(q){t[130](q)}function vi(q){t[131](q)}function xi(q){t[132](q)}function di(q){t[133](q)}function Pi(q){t[134](q)}let Ve={content:t[48],introsOutros:t[49],adverts:t[50]};return t[0]!==void 0&&(Ve.projectId=t[0]),t[1]!==void 0&&(Ve.contentId=t[1]),t[2]!==void 0&&(Ve.playlistId=t[2]),t[3]!==void 0&&(Ve.sourceId=t[3]),t[4]!==void 0&&(Ve.sourceUrl=t[4]),t[5]!==void 0&&(Ve.showUserInterface=t[5]),t[6]!==void 0&&(Ve.playerStyle=t[6]),t[22]!==void 0&&(Ve.playerTitle=t[22]),t[23]!==void 0&&(Ve.callToAction=t[23]),t[24]!==void 0&&(Ve.skipButtonStyle=t[24]),t[25]!==void 0&&(Ve.playlistStyle=t[25]),t[26]!==void 0&&(Ve.playlistToggle=t[26]),t[27]!==void 0&&(Ve.mediaSession=t[27]),t[7]!==void 0&&(Ve.contentIndex=t[7]),t[8]!==void 0&&(Ve.introsOutrosIndex=t[8]),t[9]!==void 0&&(Ve.advertIndex=t[9]),t[28]!==void 0&&(Ve.persistentAdImage=t[28]),t[10]!==void 0&&(Ve.persistentIndex=t[10]),t[29]!==void 0&&(Ve.duration=t[29]),t[11]!==void 0&&(Ve.currentTime=t[11]),t[30]!==void 0&&(Ve.playbackState=t[30]),t[31]!==void 0&&(Ve.playbackRate=t[31]),t[12]!==void 0&&(Ve.widgetStyle=t[12]),t[32]!==void 0&&(Ve.widgetPosition=t[32]),t[33]!==void 0&&(Ve.widgetWidth=t[33]),t[13]!==void 0&&(Ve.widgetTarget=t[13]),t[34]!==void 0&&(Ve.textColor=t[34]),t[35]!==void 0&&(Ve.backgroundColor=t[35]),t[36]!==void 0&&(Ve.iconColor=t[36]),t[14]!==void 0&&(Ve.highlightColor=t[14]),t[37]!==void 0&&(Ve.logoIconEnabled=t[37]),t[15]!==void 0&&(Ve.highlightSections=t[15]),t[16]!==void 0&&(Ve.clickableSections=t[16]),t[17]!==void 0&&(Ve.segmentWidgetSections=t[17]),t[18]!==void 0&&(Ve.segmentWidgetPosition=t[18]),t[19]!==void 0&&(Ve.currentSegment=t[19]),t[20]!==void 0&&(Ve.hoveredSegment=t[20]),t[38]!==void 0&&(Ve.advertConsent=t[38]),t[39]!==void 0&&(Ve.analyticsConsent=t[39]),t[40]!==void 0&&(Ve.analyticsCustomUrl=t[40]),t[41]!==void 0&&(Ve.analyticsTag=t[41]),e=new W1({props:Ve}),Fe.push(()=>$e(e,"projectId",Dt)),Fe.push(()=>$e(e,"contentId",Ct)),Fe.push(()=>$e(e,"playlistId",$t)),Fe.push(()=>$e(e,"sourceId",bt)),Fe.push(()=>$e(e,"sourceUrl",Gt)),Fe.push(()=>$e(e,"showUserInterface",zt)),Fe.push(()=>$e(e,"playerStyle",ut)),Fe.push(()=>$e(e,"playerTitle",Lt)),Fe.push(()=>$e(e,"callToAction",pt)),Fe.push(()=>$e(e,"skipButtonStyle",St)),Fe.push(()=>$e(e,"playlistStyle",Yt)),Fe.push(()=>$e(e,"playlistToggle",Te)),Fe.push(()=>$e(e,"mediaSession",yt)),Fe.push(()=>$e(e,"contentIndex",At)),Fe.push(()=>$e(e,"introsOutrosIndex",st)),Fe.push(()=>$e(e,"advertIndex",Ut)),Fe.push(()=>$e(e,"persistentAdImage",oi)),Fe.push(()=>$e(e,"persistentIndex",li)),Fe.push(()=>$e(e,"duration",Ot)),Fe.push(()=>$e(e,"currentTime",Bt)),Fe.push(()=>$e(e,"playbackState",Mt)),Fe.push(()=>$e(e,"playbackRate",qt)),Fe.push(()=>$e(e,"widgetStyle",ui)),Fe.push(()=>$e(e,"widgetPosition",Vt)),Fe.push(()=>$e(e,"widgetWidth",ri)),Fe.push(()=>$e(e,"widgetTarget",yi)),Fe.push(()=>$e(e,"textColor",Nt)),Fe.push(()=>$e(e,"backgroundColor",at)),Fe.push(()=>$e(e,"iconColor",fi)),Fe.push(()=>$e(e,"highlightColor",De)),Fe.push(()=>$e(e,"logoIconEnabled",hi)),Fe.push(()=>$e(e,"highlightSections",Xt)),Fe.push(()=>$e(e,"clickableSections",et)),Fe.push(()=>$e(e,"segmentWidgetSections",ci)),Fe.push(()=>$e(e,"segmentWidgetPosition",Wt)),Fe.push(()=>$e(e,"currentSegment",_e)),Fe.push(()=>$e(e,"hoveredSegment",gi)),Fe.push(()=>$e(e,"advertConsent",vi)),Fe.push(()=>$e(e,"analyticsConsent",xi)),Fe.push(()=>$e(e,"analyticsCustomUrl",di)),Fe.push(()=>$e(e,"analyticsTag",Pi)),{c(){ze(e.$$.fragment)},m(q,J){We(e,q,J),qe=!0},p(q,J){const Be={};J[1]&131072&&(Be.content=q[48]),J[1]&262144&&(Be.introsOutros=q[49]),J[1]&524288&&(Be.adverts=q[50]),!i&&J[0]&1&&(i=!0,Be.projectId=q[0],Qe(()=>i=!1)),!r&&J[0]&2&&(r=!0,Be.contentId=q[1],Qe(()=>r=!1)),!a&&J[0]&4&&(a=!0,Be.playlistId=q[2],Qe(()=>a=!1)),!l&&J[0]&8&&(l=!0,Be.sourceId=q[3],Qe(()=>l=!1)),!g&&J[0]&16&&(g=!0,Be.sourceUrl=q[4],Qe(()=>g=!1)),!m&&J[0]&32&&(m=!0,Be.showUserInterface=q[5],Qe(()=>m=!1)),!_&&J[0]&64&&(_=!0,Be.playerStyle=q[6],Qe(()=>_=!1)),!T&&J[0]&4194304&&(T=!0,Be.playerTitle=q[22],Qe(()=>T=!1)),!k&&J[0]&8388608&&(k=!0,Be.callToAction=q[23],Qe(()=>k=!1)),!w&&J[0]&16777216&&(w=!0,Be.skipButtonStyle=q[24],Qe(()=>w=!1)),!F&&J[0]&33554432&&(F=!0,Be.playlistStyle=q[25],Qe(()=>F=!1)),!V&&J[0]&67108864&&(V=!0,Be.playlistToggle=q[26],Qe(()=>V=!1)),!U&&J[0]&134217728&&(U=!0,Be.mediaSession=q[27],Qe(()=>U=!1)),!z&&J[0]&128&&(z=!0,Be.contentIndex=q[7],Qe(()=>z=!1)),!H&&J[0]&256&&(H=!0,Be.introsOutrosIndex=q[8],Qe(()=>H=!1)),!oe&&J[0]&512&&(oe=!0,Be.advertIndex=q[9],Qe(()=>oe=!1)),!ce&&J[0]&268435456&&(ce=!0,Be.persistentAdImage=q[28],Qe(()=>ce=!1)),!ge&&J[0]&1024&&(ge=!0,Be.persistentIndex=q[10],Qe(()=>ge=!1)),!me&&J[0]&536870912&&(me=!0,Be.duration=q[29],Qe(()=>me=!1)),!le&&J[0]&2048&&(le=!0,Be.currentTime=q[11],Qe(()=>le=!1)),!Se&&J[0]&1073741824&&(Se=!0,Be.playbackState=q[30],Qe(()=>Se=!1)),!ee&&J[1]&1&&(ee=!0,Be.playbackRate=q[31],Qe(()=>ee=!1)),!L&&J[0]&4096&&(L=!0,Be.widgetStyle=q[12],Qe(()=>L=!1)),!ae&&J[1]&2&&(ae=!0,Be.widgetPosition=q[32],Qe(()=>ae=!1)),!W&&J[1]&4&&(W=!0,Be.widgetWidth=q[33],Qe(()=>W=!1)),!Je&&J[0]&8192&&(Je=!0,Be.widgetTarget=q[13],Qe(()=>Je=!1)),!we&&J[1]&8&&(we=!0,Be.textColor=q[34],Qe(()=>we=!1)),!Re&&J[1]&16&&(Re=!0,Be.backgroundColor=q[35],Qe(()=>Re=!1)),!Oe&&J[1]&32&&(Oe=!0,Be.iconColor=q[36],Qe(()=>Oe=!1)),!K&&J[0]&16384&&(K=!0,Be.highlightColor=q[14],Qe(()=>K=!1)),!Z&&J[1]&64&&(Z=!0,Be.logoIconEnabled=q[37],Qe(()=>Z=!1)),!B&&J[0]&32768&&(B=!0,Be.highlightSections=q[15],Qe(()=>B=!1)),!Ke&&J[0]&65536&&(Ke=!0,Be.clickableSections=q[16],Qe(()=>Ke=!1)),!Ne&&J[0]&131072&&(Ne=!0,Be.segmentWidgetSections=q[17],Qe(()=>Ne=!1)),!Ce&&J[0]&262144&&(Ce=!0,Be.segmentWidgetPosition=q[18],Qe(()=>Ce=!1)),!Ue&&J[0]&524288&&(Ue=!0,Be.currentSegment=q[19],Qe(()=>Ue=!1)),!ie&&J[0]&1048576&&(ie=!0,Be.hoveredSegment=q[20],Qe(()=>ie=!1)),!pe&&J[1]&128&&(pe=!0,Be.advertConsent=q[38],Qe(()=>pe=!1)),!ft&&J[1]&256&&(ft=!0,Be.analyticsConsent=q[39],Qe(()=>ft=!1)),!Ae&&J[1]&512&&(Ae=!0,Be.analyticsCustomUrl=q[40],Qe(()=>Ae=!1)),!Le&&J[1]&1024&&(Le=!0,Be.analyticsTag=q[41],Qe(()=>Le=!1)),e.$set(Be)},i(q){qe||(X(e.$$.fragment,q),qe=!0)},o(q){se(e.$$.fragment,q),qe=!1},d(q){je(e,q)}}}function Kc(t){let e,i;return e=new $1({props:{onEvent:t[53],content:t[48],contentIndex:t[7],activeAdvert:t[56],persistentAdvert:t[62],duration:t[29],playbackState:t[30],skipButtonStyle:t[24],backgroundColor:t[35],iconColor:t[36]}}),{c(){ze(e.$$.fragment)},m(r,a){We(e,r,a),i=!0},p(r,a){const l={};a[1]&131072&&(l.content=r[48]),a[0]&128&&(l.contentIndex=r[7]),a[1]&33554432&&(l.activeAdvert=r[56]),a[2]&1&&(l.persistentAdvert=r[62]),a[0]&536870912&&(l.duration=r[29]),a[0]&1073741824&&(l.playbackState=r[30]),a[0]&16777216&&(l.skipButtonStyle=r[24]),a[1]&16&&(l.backgroundColor=r[35]),a[1]&32&&(l.iconColor=r[36]),e.$set(l)},i(r){i||(X(e.$$.fragment,r),i=!0)},o(r){se(e.$$.fragment,r),i=!1},d(r){je(e,r)}}}function Yc(t){let e,i;return e=new nb({props:{analyticsTag:t[41]}}),{c(){ze(e.$$.fragment)},m(r,a){We(e,r,a),i=!0},p(r,a){const l={};a[1]&1024&&(l.analyticsTag=r[41]),e.$set(l)},i(r){i||(X(e.$$.fragment,r),i=!0)},o(r){se(e.$$.fragment,r),i=!1},d(r){je(e,r)}}}function xb(t){let e,i,r,a,l,g,m,_,T,k=[],w=new Map,F,V,U,z,H,oe;function ce(K){t[86](K)}function ge(K){t[87](K)}function me(K){t[88](K)}function le(K){t[89](K)}function Se(K){t[90](K)}let ee={onEvent:t[53],content:t[48],contentIndex:t[7],introOrOutro:t[55],activeAdvert:t[56],advertConsent:t[38],videoBehindWidget:t[58],videoBehindStatic:t[61],widgetPosition:t[32],widgetWidth:t[33]};t[30]!==void 0&&(ee.playbackState=t[30]),t[29]!==void 0&&(ee.duration=t[29]),t[11]!==void 0&&(ee.currentTime=t[11]),t[31]!==void 0&&(ee.playbackRate=t[31]),t[45]!==void 0&&(ee.prevPercentage=t[45]),e=new Uv({props:ee}),t[85](e),Fe.push(()=>$e(e,"playbackState",ce)),Fe.push(()=>$e(e,"duration",ge)),Fe.push(()=>$e(e,"currentTime",me)),Fe.push(()=>$e(e,"playbackRate",le)),Fe.push(()=>$e(e,"prevPercentage",Se));let L=t[5]&&jc(t),ae=(t[51]||t[13])&&Gc(t),W=t[46];const Je=K=>K[138];for(let K=0;K<W.length;K+=1){let Z=Wc(t,W,K),B=Je(Z);w.set(B,k[K]=zc(B,Z))}let we=t[21]&&Hc(t),Re=t[52]&&Kc(t),Oe=t[41]&&Yc(t);return H=new sb({}),{c(){ze(e.$$.fragment),m=Pe(),L&&L.c(),_=Pe(),ae&&ae.c(),T=Pe();for(let K=0;K<k.length;K+=1)k[K].c();F=Pe(),we&&we.c(),V=Pe(),Re&&Re.c(),U=Pe(),Oe&&Oe.c(),z=Pe(),ze(H.$$.fragment)},m(K,Z){We(e,K,Z),te(K,m,Z),L&&L.m(K,Z),te(K,_,Z),ae&&ae.m(K,Z),te(K,T,Z);for(let B=0;B<k.length;B+=1)k[B]&&k[B].m(K,Z);te(K,F,Z),we&&we.m(K,Z),te(K,V,Z),Re&&Re.m(K,Z),te(K,U,Z),Oe&&Oe.m(K,Z),te(K,z,Z),We(H,K,Z),oe=!0},p(K,Z){const B={};Z[1]&131072&&(B.content=K[48]),Z[0]&128&&(B.contentIndex=K[7]),Z[1]&16777216&&(B.introOrOutro=K[55]),Z[1]&33554432&&(B.activeAdvert=K[56]),Z[1]&128&&(B.advertConsent=K[38]),Z[1]&134217728&&(B.videoBehindWidget=K[58]),Z[1]&1073741824&&(B.videoBehindStatic=K[61]),Z[1]&2&&(B.widgetPosition=K[32]),Z[1]&4&&(B.widgetWidth=K[33]),!i&&Z[0]&1073741824&&(i=!0,B.playbackState=K[30],Qe(()=>i=!1)),!r&&Z[0]&536870912&&(r=!0,B.duration=K[29],Qe(()=>r=!1)),!a&&Z[0]&2048&&(a=!0,B.currentTime=K[11],Qe(()=>a=!1)),!l&&Z[1]&1&&(l=!0,B.playbackRate=K[31],Qe(()=>l=!1)),!g&&Z[1]&16384&&(g=!0,B.prevPercentage=K[45],Qe(()=>g=!1)),e.$set(B),K[5]?L?(L.p(K,Z),Z[0]&32&&X(L,1)):(L=jc(K),L.c(),X(L,1),L.m(_.parentNode,_)):L&&(xt(),se(L,1,1,()=>{L=null}),Pt()),K[51]||K[13]?ae?(ae.p(K,Z),Z[0]&8192|Z[1]&1048576&&X(ae,1)):(ae=Gc(K),ae.c(),X(ae,1),ae.m(T.parentNode,T)):ae&&(xt(),se(ae,1,1,()=>{ae=null}),Pt()),Z[0]&1610614912|Z[1]&650281016|Z[2]&1&&(W=K[46],xt(),k=ig(k,Z,Je,1,K,W,w,F.parentNode,tg,zc,F,Wc),Pt()),K[21]?we?(we.p(K,Z),Z[0]&2097152&&X(we,1)):(we=Hc(K),we.c(),X(we,1),we.m(V.parentNode,V)):we&&(xt(),se(we,1,1,()=>{we=null}),Pt()),K[52]?Re?(Re.p(K,Z),Z[1]&2097152&&X(Re,1)):(Re=Kc(K),Re.c(),X(Re,1),Re.m(U.parentNode,U)):Re&&(xt(),se(Re,1,1,()=>{Re=null}),Pt()),K[41]?Oe?(Oe.p(K,Z),Z[1]&1024&&X(Oe,1)):(Oe=Yc(K),Oe.c(),X(Oe,1),Oe.m(z.parentNode,z)):Oe&&(xt(),se(Oe,1,1,()=>{Oe=null}),Pt())},i(K){if(!oe){X(e.$$.fragment,K),X(L),X(ae);for(let Z=0;Z<W.length;Z+=1)X(k[Z]);X(we),X(Re),X(Oe),X(H.$$.fragment,K),oe=!0}},o(K){se(e.$$.fragment,K),se(L),se(ae);for(let Z=0;Z<k.length;Z+=1)se(k[Z]);se(we),se(Re),se(Oe),se(H.$$.fragment,K),oe=!1},d(K){t[85](null),je(e,K),K&&$(m),L&&L.d(K),K&&$(_),ae&&ae.d(K),K&&$(T);for(let Z=0;Z<k.length;Z+=1)k[Z].d(K);K&&$(F),we&&we.d(K),K&&$(V),Re&&Re.d(K),K&&$(U),Oe&&Oe.d(K),K&&$(z),je(H,K)}}}function Pb(t,e,i){let r,a,l,g,m,_,T,k,w,F,V,U,z,{playerApiUrl:H="https://api.beyondwords.io/v1/projects/{id}/player"}=e,{projectId:oe=void 0}=e,{contentId:ce=void 0}=e,{playlistId:ge=void 0}=e,{sourceId:me=void 0}=e,{sourceUrl:le=void 0}=e,{playlist:Se=[]}=e,{showUserInterface:ee=!0}=e,{playerStyle:L="standard"}=e,{playerTitle:ae=void 0}=e,{callToAction:W=void 0}=e,{skipButtonStyle:Je="auto"}=e,{playlistStyle:we="auto-5-4"}=e,{playlistToggle:Re="auto"}=e,{downloadFormats:Oe=[]}=e,{mediaSession:K="auto"}=e,{content:Z=[]}=e,{contentIndex:B=0}=e,{introsOutros:Ke=[]}=e,{introsOutrosIndex:Ne=-1}=e,{adverts:Ce=[]}=e,{advertIndex:Ue=-1}=e,{persistentAdImage:ie=!1}=e,{persistentIndex:pe=-1}=e,{duration:ft=0}=e,{currentTime:Ae=0}=e,{playbackState:Le="stopped"}=e,{playbackRate:qe=1}=e,{widgetStyle:Dt="standard"}=e,{widgetPosition:Ct="auto"}=e,{widgetWidth:$t="auto"}=e,{widgetTarget:bt=void 0}=e,{textColor:Gt="#111"}=e,{backgroundColor:zt="#f5f5f5"}=e,{iconColor:ut="rgba(0, 0, 0, 0.8)"}=e,{highlightColor:Lt="#eee"}=e,{logoIconEnabled:pt=!0}=e,{highlightSections:St="all"}=e,{clickableSections:Yt="all"}=e,{segmentWidgetSections:Te="body"}=e,{segmentWidgetPosition:yt="7-oclock"}=e,{currentSegment:At=void 0}=e,{hoveredSegment:st=void 0}=e,{advertConsent:Ut="personalized"}=e,{analyticsConsent:oi="allowed"}=e,{analyticsCustomUrl:li=void 0}=e,{analyticsTag:Ot=void 0}=e,{writeToken:Bt=void 0}=e,{captureErrors:Mt=!0}=e,{onError:qt=()=>{}}=e,{transitions:ui=[]}=e,{controlPanel:Vt=void 0}=e;const ri=(...D)=>ci.addEventListener(...D),yi=(...D)=>ci.removeEventListener(...D);let{initialProps:Nt={}}=e,{showBottomWidget:at=!1}=e,{showMediaSession:fi=!1}=e,{isFullScreen:De=!1}=e,{mediaElement:hi=void 0}=e,{userInterface:Xt=void 0}=e,{widgetInterface:et=void 0}=e,{controller:ci=void 0}=e,{analyticsUrl:Wt=void 0}=e,{analyticsId:_e=void 0}=e,{listenSessionId:gi=void 0}=e,{sessionCreatedAt:vi=void 0}=e,{isNewListen:xi=!1}=e,{prevPercentage:di=0}=e,{segmentWidgets:Pi=[]}=e,{segmentContainers:Ve=new Ps(D=>i(46,Pi=D))}=e,{segmentClickables:q=new xs}=e,{segmentHighlights:J=new As}=e;const Be=D=>ci.processEvent(fe({emittedFrom:m},D)),$r=()=>i(83,k=st);function ji(D){Fe[D?"unshift":"push"](()=>{hi=D,i(42,hi)})}function en(D){Le=D,i(30,Le)}function ni(D){ft=D,i(29,ft)}function mr(D){Ae=D,i(11,Ae)}function Zi(D){qe=D,i(31,qe)}function Ji(D){di=D,i(45,di)}function Gi(D){Fe[D?"unshift":"push"](()=>{Xt=D,i(43,Xt)})}function lr(D){Fe[D?"unshift":"push"](()=>{et=D,i(44,et)})}const Er=D=>Be(ii(fe({},D),{emittedFrom:"segment-widget",widgetSegment:V,widgetIsCurrent:U}));function Ri(D){oe=D,i(0,oe)}function Di(D){ce=D,i(1,ce)}function ur(D){ge=D,i(2,ge)}function Ar(D){me=D,i(3,me)}function zi(D){le=D,i(4,le)}function Si(D){ee=D,i(5,ee)}function Hi(D){L=D,i(6,L)}function Oi(D){ae=D,i(22,ae)}function Zt(D){W=D,i(23,W)}function Ki(D){Je=D,i(24,Je)}function Jt(D){we=D,i(25,we)}function pr(D){Re=D,i(26,Re)}function ei(D){K=D,i(27,K)}function G(D){B=D,i(7,B)}function ye(D){Ne=D,i(8,Ne)}function be(D){Ue=D,i(9,Ue)}function ot(D){ie=D,i(28,ie)}function Br(D){pe=D,i(10,pe)}function xr(D){ft=D,i(29,ft)}function tn(D){Ae=D,i(11,Ae)}function Ws(D){Le=D,i(30,Le)}function pn(D){qe=D,i(31,qe)}function js(D){Dt=D,i(12,Dt)}function Yi(D){Ct=D,i(32,Ct)}function rn(D){$t=D,i(33,$t)}function Ai(D){bt=D,i(13,bt)}function nn(D){Gt=D,i(34,Gt)}function Pr(D){zt=D,i(35,zt)}function _r(D){ut=D,i(36,ut)}function Un(D){Lt=D,i(14,Lt)}function _n(D){pt=D,i(37,pt)}function Gs(D){St=D,i(15,St)}function yr(D){Yt=D,i(16,Yt)}function Vn(D){Te=D,i(17,Te)}function Mr(D){yt=D,i(18,yt)}function zs(D){At=D,i(19,At)}function ns(D){st=D,i(20,st)}function ss(D){Ut=D,i(38,Ut)}function Wn(D){oi=D,i(39,oi)}function Nr(D){li=D,i(40,li)}function wi(D){Ot=D,i(41,Ot)}return t.$$set=D=>{"playerApiUrl"in D&&i(63,H=D.playerApiUrl),"projectId"in D&&i(0,oe=D.projectId),"contentId"in D&&i(1,ce=D.contentId),"playlistId"in D&&i(2,ge=D.playlistId),"sourceId"in D&&i(3,me=D.sourceId),"sourceUrl"in D&&i(4,le=D.sourceUrl),"playlist"in D&&i(64,Se=D.playlist),"showUserInterface"in D&&i(5,ee=D.showUserInterface),"playerStyle"in D&&i(6,L=D.playerStyle),"playerTitle"in D&&i(22,ae=D.playerTitle),"callToAction"in D&&i(23,W=D.callToAction),"skipButtonStyle"in D&&i(24,Je=D.skipButtonStyle),"playlistStyle"in D&&i(25,we=D.playlistStyle),"playlistToggle"in D&&i(26,Re=D.playlistToggle),"downloadFormats"in D&&i(47,Oe=D.downloadFormats),"mediaSession"in D&&i(27,K=D.mediaSession),"content"in D&&i(48,Z=D.content),"contentIndex"in D&&i(7,B=D.contentIndex),"introsOutros"in D&&i(49,Ke=D.introsOutros),"introsOutrosIndex"in D&&i(8,Ne=D.introsOutrosIndex),"adverts"in D&&i(50,Ce=D.adverts),"advertIndex"in D&&i(9,Ue=D.advertIndex),"persistentAdImage"in D&&i(28,ie=D.persistentAdImage),"persistentIndex"in D&&i(10,pe=D.persistentIndex),"duration"in D&&i(29,ft=D.duration),"currentTime"in D&&i(11,Ae=D.currentTime),"playbackState"in D&&i(30,Le=D.playbackState),"playbackRate"in D&&i(31,qe=D.playbackRate),"widgetStyle"in D&&i(12,Dt=D.widgetStyle),"widgetPosition"in D&&i(32,Ct=D.widgetPosition),"widgetWidth"in D&&i(33,$t=D.widgetWidth),"widgetTarget"in D&&i(13,bt=D.widgetTarget),"textColor"in D&&i(34,Gt=D.textColor),"backgroundColor"in D&&i(35,zt=D.backgroundColor),"iconColor"in D&&i(36,ut=D.iconColor),"highlightColor"in D&&i(14,Lt=D.highlightColor),"logoIconEnabled"in D&&i(37,pt=D.logoIconEnabled),"highlightSections"in D&&i(15,St=D.highlightSections),"clickableSections"in D&&i(16,Yt=D.clickableSections),"segmentWidgetSections"in D&&i(17,Te=D.segmentWidgetSections),"segmentWidgetPosition"in D&&i(18,yt=D.segmentWidgetPosition),"currentSegment"in D&&i(19,At=D.currentSegment),"hoveredSegment"in D&&i(20,st=D.hoveredSegment),"advertConsent"in D&&i(38,Ut=D.advertConsent),"analyticsConsent"in D&&i(39,oi=D.analyticsConsent),"analyticsCustomUrl"in D&&i(40,li=D.analyticsCustomUrl),"analyticsTag"in D&&i(41,Ot=D.analyticsTag),"writeToken"in D&&i(65,Bt=D.writeToken),"captureErrors"in D&&i(66,Mt=D.captureErrors),"onError"in D&&i(67,qt=D.onError),"transitions"in D&&i(68,ui=D.transitions),"controlPanel"in D&&i(21,Vt=D.controlPanel),"initialProps"in D&&i(71,Nt=D.initialProps),"showBottomWidget"in D&&i(51,at=D.showBottomWidget),"showMediaSession"in D&&i(52,fi=D.showMediaSession),"isFullScreen"in D&&i(72,De=D.isFullScreen),"mediaElement"in D&&i(42,hi=D.mediaElement),"userInterface"in D&&i(43,Xt=D.userInterface),"widgetInterface"in D&&i(44,et=D.widgetInterface),"controller"in D&&i(73,ci=D.controller),"analyticsUrl"in D&&i(74,Wt=D.analyticsUrl),"analyticsId"in D&&i(75,_e=D.analyticsId),"listenSessionId"in D&&i(76,gi=D.listenSessionId),"sessionCreatedAt"in D&&i(77,vi=D.sessionCreatedAt),"isNewListen"in D&&i(78,xi=D.isNewListen),"prevPercentage"in D&&i(45,di=D.prevPercentage),"segmentWidgets"in D&&i(46,Pi=D.segmentWidgets),"segmentContainers"in D&&i(79,Ve=D.segmentContainers),"segmentClickables"in D&&i(80,q=D.segmentClickables),"segmentHighlights"in D&&i(81,J=D.segmentHighlights)},t.$$.update=()=>{t.$$.dirty[0]&256|t.$$.dirty[1]&262144&&i(55,r=Ke[Ne]),t.$$.dirty[0]&512|t.$$.dirty[1]&524288&&i(56,a=Ce[Ue]),t.$$.dirty[0]&1024|t.$$.dirty[1]&524288&&i(62,l=Ce[pe]),t.$$.dirty[0]&128|t.$$.dirty[1]&131072&&Z[B],t.$$.dirty[0]&64|t.$$.dirty[2]&1024&&i(59,g=De?"video":L),t.$$.dirty[0]&4096|t.$$.dirty[1]&1048576|t.$$.dirty[2]&1024&&i(58,_=at&&Dt==="video"&&!De),t.$$.dirty[1]&134217728&&(m=_?"bottom-widget":"inline-player"),t.$$.dirty[0]&8192&&i(13,bt=_l(bt,"widget")),t.$$.dirty[0]&2097152&&i(21,Vt=_l(Vt,"control panel")),t.$$.dirty[0]&32|t.$$.dirty[1]&402653184&&i(61,T=ee&&g==="video"&&!_),t.$$.dirty[0]&31|t.$$.dirty[2]&4&&Be(ab()),t.$$.dirty[0]&1|t.$$.dirty[2]&10&&ub(H,oe,Bt,D=>Be(D)),t.$$.dirty[0]&1048576|t.$$.dirty[2]&2097152&&i(83,k=st||k),t.$$.dirty[0]&655360&&i(82,w=ia("current",At,Te)),t.$$.dirty[0]&524288|t.$$.dirty[2]&1048576&&w&&$r(),t.$$.dirty[0]&131072|t.$$.dirty[2]&2097152&&i(84,F=ia("hovered",k,Te)),t.$$.dirty[0]&524288|t.$$.dirty[2]&7340032&&i(54,V=F&&k||w&&At),t.$$.dirty[0]&524288|t.$$.dirty[1]&8388608&&i(57,U=(V==null?void 0:V.marker)===(At==null?void 0:At.marker)),t.$$.dirty[1]&117440512&&i(60,z=U||a||r),t.$$.dirty[0]&393280|t.$$.dirty[1]&8388608|t.$$.dirty[2]&131072&&Ve.update(V,Te,yt,L),t.$$.dirty[0]&1114112|t.$$.dirty[2]&262144&&q.update(st,Yt),t.$$.dirty[0]&573440|t.$$.dirty[2]&524288&&J.update("current",At,St,Lt),t.$$.dirty[0]&1097728|t.$$.dirty[2]&524288&&J.update("hovered",st,St,Lt),t.$$.dirty[0]&2048|t.$$.dirty[2]&2112&&vb(ui,ci,Ae)},[oe,ce,ge,me,le,ee,L,B,Ne,Ue,pe,Ae,Dt,bt,Lt,St,Yt,Te,yt,At,st,Vt,ae,W,Je,we,Re,K,ie,ft,Le,qe,Ct,$t,Gt,zt,ut,pt,Ut,oi,li,Ot,hi,Xt,et,di,Pi,Oe,Z,Ke,Ce,at,fi,Be,V,r,a,U,_,g,z,T,l,H,Se,Bt,Mt,qt,ui,ri,yi,Nt,De,ci,Wt,_e,gi,vi,xi,Ve,q,J,w,k,F,ji,en,ni,mr,Zi,Ji,Gi,lr,Er,Ri,Di,ur,Ar,zi,Si,Hi,Oi,Zt,Ki,Jt,pr,ei,G,ye,be,ot,Br,xr,tn,Ws,pn,js,Yi,rn,Ai,nn,Pr,_r,Un,_n,Gs,yr,Vn,Mr,zs,ns,ss,Wn,Nr,wi]}let wb=class extends rt{constructor(e){super(),it(this,e,Pb,xb,Xe,{playerApiUrl:63,projectId:0,contentId:1,playlistId:2,sourceId:3,sourceUrl:4,playlist:64,showUserInterface:5,playerStyle:6,playerTitle:22,callToAction:23,skipButtonStyle:24,playlistStyle:25,playlistToggle:26,downloadFormats:47,mediaSession:27,content:48,contentIndex:7,introsOutros:49,introsOutrosIndex:8,adverts:50,advertIndex:9,persistentAdImage:28,persistentIndex:10,duration:29,currentTime:11,playbackState:30,playbackRate:31,widgetStyle:12,widgetPosition:32,widgetWidth:33,widgetTarget:13,textColor:34,backgroundColor:35,iconColor:36,highlightColor:14,logoIconEnabled:37,highlightSections:15,clickableSections:16,segmentWidgetSections:17,segmentWidgetPosition:18,currentSegment:19,hoveredSegment:20,advertConsent:38,analyticsConsent:39,analyticsCustomUrl:40,analyticsTag:41,writeToken:65,captureErrors:66,onError:67,transitions:68,controlPanel:21,addEventListener:69,removeEventListener:70,initialProps:71,showBottomWidget:51,showMediaSession:52,isFullScreen:72,mediaElement:42,userInterface:43,widgetInterface:44,controller:73,analyticsUrl:74,analyticsId:75,listenSessionId:76,sessionCreatedAt:77,isNewListen:78,prevPercentage:45,segmentWidgets:46,segmentContainers:79,segmentClickables:80,segmentHighlights:81,onEvent:53},null,[-1,-1,-1,-1,-1])}get playerApiUrl(){return this.$$.ctx[63]}set playerApiUrl(e){this.$$set({playerApiUrl:e}),P()}get projectId(){return this.$$.ctx[0]}set projectId(e){this.$$set({projectId:e}),P()}get contentId(){return this.$$.ctx[1]}set contentId(e){this.$$set({contentId:e}),P()}get playlistId(){return this.$$.ctx[2]}set playlistId(e){this.$$set({playlistId:e}),P()}get sourceId(){return this.$$.ctx[3]}set sourceId(e){this.$$set({sourceId:e}),P()}get sourceUrl(){return this.$$.ctx[4]}set sourceUrl(e){this.$$set({sourceUrl:e}),P()}get playlist(){return this.$$.ctx[64]}set playlist(e){this.$$set({playlist:e}),P()}get showUserInterface(){return this.$$.ctx[5]}set showUserInterface(e){this.$$set({showUserInterface:e}),P()}get playerStyle(){return this.$$.ctx[6]}set playerStyle(e){this.$$set({playerStyle:e}),P()}get playerTitle(){return this.$$.ctx[22]}set playerTitle(e){this.$$set({playerTitle:e}),P()}get callToAction(){return this.$$.ctx[23]}set callToAction(e){this.$$set({callToAction:e}),P()}get skipButtonStyle(){return this.$$.ctx[24]}set skipButtonStyle(e){this.$$set({skipButtonStyle:e}),P()}get playlistStyle(){return this.$$.ctx[25]}set playlistStyle(e){this.$$set({playlistStyle:e}),P()}get playlistToggle(){return this.$$.ctx[26]}set playlistToggle(e){this.$$set({playlistToggle:e}),P()}get downloadFormats(){return this.$$.ctx[47]}set downloadFormats(e){this.$$set({downloadFormats:e}),P()}get mediaSession(){return this.$$.ctx[27]}set mediaSession(e){this.$$set({mediaSession:e}),P()}get content(){return this.$$.ctx[48]}set content(e){this.$$set({content:e}),P()}get contentIndex(){return this.$$.ctx[7]}set contentIndex(e){this.$$set({contentIndex:e}),P()}get introsOutros(){return this.$$.ctx[49]}set introsOutros(e){this.$$set({introsOutros:e}),P()}get introsOutrosIndex(){return this.$$.ctx[8]}set introsOutrosIndex(e){this.$$set({introsOutrosIndex:e}),P()}get adverts(){return this.$$.ctx[50]}set adverts(e){this.$$set({adverts:e}),P()}get advertIndex(){return this.$$.ctx[9]}set advertIndex(e){this.$$set({advertIndex:e}),P()}get persistentAdImage(){return this.$$.ctx[28]}set persistentAdImage(e){this.$$set({persistentAdImage:e}),P()}get persistentIndex(){return this.$$.ctx[10]}set persistentIndex(e){this.$$set({persistentIndex:e}),P()}get duration(){return this.$$.ctx[29]}set duration(e){this.$$set({duration:e}),P()}get currentTime(){return this.$$.ctx[11]}set currentTime(e){this.$$set({currentTime:e}),P()}get playbackState(){return this.$$.ctx[30]}set playbackState(e){this.$$set({playbackState:e}),P()}get playbackRate(){return this.$$.ctx[31]}set playbackRate(e){this.$$set({playbackRate:e}),P()}get widgetStyle(){return this.$$.ctx[12]}set widgetStyle(e){this.$$set({widgetStyle:e}),P()}get widgetPosition(){return this.$$.ctx[32]}set widgetPosition(e){this.$$set({widgetPosition:e}),P()}get widgetWidth(){return this.$$.ctx[33]}set widgetWidth(e){this.$$set({widgetWidth:e}),P()}get widgetTarget(){return this.$$.ctx[13]}set widgetTarget(e){this.$$set({widgetTarget:e}),P()}get textColor(){return this.$$.ctx[34]}set textColor(e){this.$$set({textColor:e}),P()}get backgroundColor(){return this.$$.ctx[35]}set backgroundColor(e){this.$$set({backgroundColor:e}),P()}get iconColor(){return this.$$.ctx[36]}set iconColor(e){this.$$set({iconColor:e}),P()}get highlightColor(){return this.$$.ctx[14]}set highlightColor(e){this.$$set({highlightColor:e}),P()}get logoIconEnabled(){return this.$$.ctx[37]}set logoIconEnabled(e){this.$$set({logoIconEnabled:e}),P()}get highlightSections(){return this.$$.ctx[15]}set highlightSections(e){this.$$set({highlightSections:e}),P()}get clickableSections(){return this.$$.ctx[16]}set clickableSections(e){this.$$set({clickableSections:e}),P()}get segmentWidgetSections(){return this.$$.ctx[17]}set segmentWidgetSections(e){this.$$set({segmentWidgetSections:e}),P()}get segmentWidgetPosition(){return this.$$.ctx[18]}set segmentWidgetPosition(e){this.$$set({segmentWidgetPosition:e}),P()}get currentSegment(){return this.$$.ctx[19]}set currentSegment(e){this.$$set({currentSegment:e}),P()}get hoveredSegment(){return this.$$.ctx[20]}set hoveredSegment(e){this.$$set({hoveredSegment:e}),P()}get advertConsent(){return this.$$.ctx[38]}set advertConsent(e){this.$$set({advertConsent:e}),P()}get analyticsConsent(){return this.$$.ctx[39]}set analyticsConsent(e){this.$$set({analyticsConsent:e}),P()}get analyticsCustomUrl(){return this.$$.ctx[40]}set analyticsCustomUrl(e){this.$$set({analyticsCustomUrl:e}),P()}get analyticsTag(){return this.$$.ctx[41]}set analyticsTag(e){this.$$set({analyticsTag:e}),P()}get writeToken(){return this.$$.ctx[65]}set writeToken(e){this.$$set({writeToken:e}),P()}get captureErrors(){return this.$$.ctx[66]}set captureErrors(e){this.$$set({captureErrors:e}),P()}get onError(){return this.$$.ctx[67]}set onError(e){this.$$set({onError:e}),P()}get transitions(){return this.$$.ctx[68]}set transitions(e){this.$$set({transitions:e}),P()}get controlPanel(){return this.$$.ctx[21]}set controlPanel(e){this.$$set({controlPanel:e}),P()}get addEventListener(){return this.$$.ctx[69]}get removeEventListener(){return this.$$.ctx[70]}get initialProps(){return this.$$.ctx[71]}set initialProps(e){this.$$set({initialProps:e}),P()}get showBottomWidget(){return this.$$.ctx[51]}set showBottomWidget(e){this.$$set({showBottomWidget:e}),P()}get showMediaSession(){return this.$$.ctx[52]}set showMediaSession(e){this.$$set({showMediaSession:e}),P()}get isFullScreen(){return this.$$.ctx[72]}set isFullScreen(e){this.$$set({isFullScreen:e}),P()}get mediaElement(){return this.$$.ctx[42]}set mediaElement(e){this.$$set({mediaElement:e}),P()}get userInterface(){return this.$$.ctx[43]}set userInterface(e){this.$$set({userInterface:e}),P()}get widgetInterface(){return this.$$.ctx[44]}set widgetInterface(e){this.$$set({widgetInterface:e}),P()}get controller(){return this.$$.ctx[73]}set controller(e){this.$$set({controller:e}),P()}get analyticsUrl(){return this.$$.ctx[74]}set analyticsUrl(e){this.$$set({analyticsUrl:e}),P()}get analyticsId(){return this.$$.ctx[75]}set analyticsId(e){this.$$set({analyticsId:e}),P()}get listenSessionId(){return this.$$.ctx[76]}set listenSessionId(e){this.$$set({listenSessionId:e}),P()}get sessionCreatedAt(){return this.$$.ctx[77]}set sessionCreatedAt(e){this.$$set({sessionCreatedAt:e}),P()}get isNewListen(){return this.$$.ctx[78]}set isNewListen(e){this.$$set({isNewListen:e}),P()}get prevPercentage(){return this.$$.ctx[45]}set prevPercentage(e){this.$$set({prevPercentage:e}),P()}get segmentWidgets(){return this.$$.ctx[46]}set segmentWidgets(e){this.$$set({segmentWidgets:e}),P()}get segmentContainers(){return this.$$.ctx[79]}set segmentContainers(e){this.$$set({segmentContainers:e}),P()}get segmentClickables(){return this.$$.ctx[80]}set segmentClickables(e){this.$$set({segmentClickables:e}),P()}get segmentHighlights(){return this.$$.ctx[81]}set segmentHighlights(e){this.$$set({segmentHighlights:e}),P()}get onEvent(){return this.$$.ctx[53]}};class Cb{constructor(e,i){this.baseUrl=e==null?void 0:e.replace("{id}",i)}byContentId(e){return Zn(`${this.baseUrl}/by_content_id/${e}`)}byPlaylistId(e){return Zn(`${this.baseUrl}/by_playlist_id/${e}`)}bySourceId(e){return Zn(`${this.baseUrl}/by_source_id/${e}`)}bySourceUrl(e){return Zn(`${this.baseUrl}/by_source_url/${e}`)}byIdentifiers(e){return Zn(`${this.baseUrl}/by_identifiers/${encodeURIComponent(JSON.stringify(e))}`)}}const yl=t=>typeof t!="object"||t===null?t:Array.isArray(t)?t.map(yl):Object.fromEntries(Object.entries(t).map(([e,i])=>[e.replace(/([A-Z])/g,r=>`_${r.toLowerCase()}`),yl(i)])),qc=t=>t==="dark"||t==="auto"&&Lb()?"dark":"light",Lb=()=>window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches,Xc=t=>ln(this,null,function*(){const e=new Cb(t.playerApiUrl,t.projectId);if(!t.playerApiUrl||!t.projectId)return;const i=Ib(t);if(i.length===0)return;const r=yield Rb(e,i).catch(()=>{});if(!(r!=null&&r.content)){Db(t);return}Ob(t,r)}),Ib=t=>{const e=[];return t.contentId&&e.push({content_id:t.contentId}),t.playlistId&&e.push({playlist_id:t.playlistId}),t.sourceId&&e.push({source_id:t.sourceId}),t.sourceUrl&&e.push({source_url:t.sourceUrl}),t.playlist&&e.push(...yl(t.playlist)),[...new Set(e.map(JSON.stringify))].map(JSON.parse)},Rb=(t,e)=>{const i=e[0];if(e.length>1)return t.byIdentifiers(e);if(i.content_id)return t.byContentId(i.content_id);if(i.playlist_id)return t.byPlaylistId(i.playlist_id);if(i.source_id)return t.bySourceId(i.source_id);if(i.source_url)return t.bySourceUrl(i.source_url)},Db=t=>{Zc(t),Jc(t),Qc(t),t.onEvent(Ze({type:"NoContentAvailable",description:"No published and processed content is available for the identifiers.",initiatedBy:"browser"}))},Ob=(t,e)=>{var a;const i=qc(e.settings.theme),r=e.settings[`${i}_theme`];Zc(t),Jc(t,e),Qc(t,e),wt(t,"playerStyle",e.settings.player_style),wt(t,"playerTitle",((a=e.playlist)==null?void 0:a.title)||e.settings.player_title),wt(t,"callToAction",e.settings.call_to_action==="Listen to this article"?null:e.settings.call_to_action),wt(t,"skipButtonStyle",e.settings.skip_button_style),wt(t,"downloadFormats",e.settings.download_button_enabled?["mp3"]:[]),wt(t,"introsOutros",Bb(e.settings)),wt(t,"persistentAdImage",e.settings.persistent_ad_image),wt(t,"widgetStyle",e.settings.widget_style),wt(t,"widgetPosition",e.settings.widget_position),wt(t,"textColor",r.text_color),wt(t,"backgroundColor",r.background_color),wt(t,"iconColor",r.icon_color),wt(t,"highlightColor",r.highlight_color),wt(t,"logoIconEnabled",e.settings.logo_icon_enabled),wt(t,"highlightSections",e.settings.segment_playback_enabled?"all":"none"),wt(t,"clickableSections",e.settings.segment_playback_enabled?"all":"none"),wt(t,"segmentWidgetSections",(e.settings.segment_playback_enabled,"none")),wt(t,"analyticsConsent",Mb(e.settings)),wt(t,"analyticsCustomUrl",e.settings.analytics_custom_url),wt(t,"analyticsTag",e.settings.analytics_tag),wt(t,"analyticsUrl",e.settings.analytics_url),wt(t,"analyticsId",e.settings.analytics_id)},Zc=t=>{wt(t,"contentIndex",0),wt(t,"introsOutrosIndex",-1),wt(t,"advertIndex",-1),wt(t,"persistentIndex",-1),wt(t,"duration",0),wt(t,"currentTime",0),wt(t,"playbackState","stopped"),wt(t,"currentSegment",void 0),wt(t,"hoveredSegment",void 0)},Jc=(t,e)=>{var a;const i=(a=e==null?void 0:e.settings)==null?void 0:a.image_enabled,r=(e==null?void 0:e.content)||[];wt(t,"content",r.map(l=>{var g;return{id:l.id,title:l.title,imageUrl:i&&(((g=e.playlist)==null?void 0:g.image_url)||e.settings.image_url||l.image_url),sourceId:l.source_id,sourceUrl:l.source_url,adsEnabled:l.ads_enabled,duration:l.audio[0]?l.audio[0].duration/1e3:0,media:[...l.video,...l.audio].map(m=>({id:m.id,url:m.url,contentType:m.content_type})),segments:l.segments.map(m=>({marker:m.marker,section:m.section,startTime:m.start_time?m.start_time/1e3:0,duration:m.duration?m.duration/1e3:0}))}}))},Qc=(t,e)=>{var a;const i=(a=e==null?void 0:e.settings)==null?void 0:a.image_enabled,r=(e==null?void 0:e.ads)||[];wt(t,"adverts",r.map(l=>{const g=l.type==="vast",m=qc(l.theme),_=l[`${m}_theme`];return{id:l.id,type:l.type,placement:l.placement,vastUrl:g?l.vast_url:null,clickThroughUrl:g?null:l.click_through_url,imageUrl:i&&l.image_url,textColor:_==null?void 0:_.text_color,backgroundColor:_==null?void 0:_.background_color,iconColor:_==null?void 0:_.icon_color,media:g?[]:l.media.map(T=>({id:T.id,url:T.url,contentType:T.content_type}))}}))},wt=(t,e,i)=>{typeof t.initialProps[e]!="undefined"||(t[e]=i)},Bb=({intro_outro_enabled:t,intro_url:e,outro_url:i})=>{if(!t)return[];const r=[];return e&&r.push({placement:"pre-roll",media:[{url:e}]}),i&&r.push({placement:"post-roll",media:[{url:i}]}),r},Mb=({analytics_enabled:t,analytics_uuid_enabled:e})=>t?e?"allowed":"without-local-storage":"none",Nb=(t,e)=>ln(this,null,function*(){const r=yield(yield fetch(t)).blob(),a=URL.createObjectURL(r),l=document.createElement("a");document.body.append(l),l.href=a,l.setAttribute("download",e),l.setAttribute("target","_blank"),l.click(),l.remove()}),Za={vastUrls:new Set,mediaSources:new Set},Fb=t=>{t.vastUrl&&Za.vastUrls.add(t.vastUrl);for(const e of t.media)Za.mediaSources.add(e.url)},$c=t=>{if(t.vastUrl&&Za.vastUrls.has(t.vastUrl))return!0;for(const e of t.media)if(Za.mediaSources.has(e.url))return!0;return!1},ed=new Set,Ub=t=>{t.media.forEach(e=>ed.add(e.url))},Vb=t=>t.media.some(e=>ed.has(e.url)),Wb=({introsOutrosIndex:t,adverts:e,advertIndex:i,content:r=[],contentIndex:a,currentTime:l,atTheStart:g,atTheEnd:m,errored:_}={})=>{var U;const T=e&&e[i];e:if(T){if(_){Fb(T);break e}if(m)return Ub(T),-1;if(!m)return i}if(!((U=r[a])!=null&&U.adsEnabled)||t!==-1)return-1;const k=Gb({content:r,contentIndex:a,currentTime:l,atTheStart:g,atTheEnd:m});let w=-1,F=-1/0,V=-1/0;for(const[z,H]of e.entries()){if(Vb(H)||$c(H)||!k.has(H.placement))continue;const oe=jb[H.type]||0;if(oe<F)continue;const ce=Math.random();oe===F&&ce<V||(w=z,F=oe,V=ce)}return w},jb={vast:1,custom:0},Gb=({content:t,contentIndex:e,currentTime:i,atTheStart:r,atTheEnd:a})=>{const l=e===0,g=e===t.length-1,m=t.length>1,_=m&&r&&!l,T=t[e].segments,k=T[T.length-1],w=m?null:Yb(T),F=T[w],V=F&&i>F.startTime,U=k?k.startTime+k.duration:0,z=i>U-Hb,H=new Set;return r&&H.add("pre-roll"),V&&!z&&H.add("mid-roll"),_&&H.add("mid-roll"),a&&g&&H.add("post-roll"),_&&H.add("post-roll"),H},zb=2*60,Hb=10,Kb=.5,Yb=t=>{const e=t[t.length-1];if(!e)return;const i=e.startTime+e.duration;if(i<zb)return;const r=i/2,a=ol(t,i/2),m=t[a].startTime>=r-Kb?a:a+1;if(m!==t.length)return m},qb=(t,e,i,r)=>{let a=-1,l=-1/0,g=-1/0;for(const[m,_]of(r||[]).entries()){if(!t||$c(_)||_.type==="vast")continue;const T=Zb(m,e,i);if(T<l)continue;const k=Xb[_.placement]||0;T===l&&k<g||(a=m,l=T,g=k)}return a},Xb={"pre-roll":2,"mid-roll":1},Zb=(t,e,i)=>t===i?2:t===e?1:0,td={mediaSources:new Set},Jb=t=>{for(const e of t.media)td.mediaSources.add(e.url)},Qb=t=>{for(const e of t.media)if(td.mediaSources.has(e.url))return!0;return!1},id=new Set,$b=t=>{t.media.forEach(e=>id.add(e.url))},eS=t=>t.media.some(e=>id.has(e.url)),tS=({introsOutros:t=[],introsOutrosIndex:e,advertIndex:i,content:r,contentIndex:a,currentTime:l,atTheStart:g,atTheEnd:m,errored:_})=>{const T=t[e];e:if(T){if(_){Jb(T);break e}if(m)return $b(T),-1;if(!m)return e}if(i!==-1)return-1;const k=iS({content:r,contentIndex:a,currentTime:l,atTheStart:g,atTheEnd:m});let w=-1,F=-1/0,V=-1/0;for(const[U,z]of t.entries()){if(Qb(z)||!k.has(z.placement))continue;const H=eS(z)?1:0;if(H<F)continue;const oe=Math.random();H===F&&oe<V||(w=U,F=H,V=oe)}return w},iS=({content:t,contentIndex:e,currentTime:i,atTheStart:r,atTheEnd:a})=>{const l=new Set,g=r&&e===0&&i===0,m=a&&e===t.length-1;return g&&l.add("pre-roll"),m&&l.add("post-roll"),l},rS=t=>{if(!navigator.mediaSession)return;const e=t.instances().some(l=>l.mediaSession==="override");if(aS()&&!e)return;let i,r=-1/0,a=-1/0;for(const l of t.instances()){if(l.mediaSession==="none")continue;const g=nS[l.playbackState]||0;if(g<r)continue;const m=sS[l.showMediaSession]||0;g===r&&m<a||(i=l,r=g,a=m)}for(const l of t.instances())l.showMediaSession=l===i;return i},nS={playing:1,paused:0,stopped:0},sS={true:1,false:0},aS=()=>{const t=navigator.mediaSession.metadata;if(!t||navigator.mediaSession.setByPlayer)return!1;const{title:e,artist:i,album:r,artwork:a}=t;return e||i||r||(a==null?void 0:a.length)},oS=t=>{let e=!1,i,r=-1/0,a=-1/0;for(const l of t.instances()){if(!l.userInterface||l.widgetTarget||!gl(l.widgetStyle))continue;if(l.userInterface.isVisible){e=!0;continue}if(!(l.userInterface.relativeY<0))continue;const T=lS[l.playbackState]||0;if(T<r)continue;const k=l.userInterface.absoluteY;T===r&&k<a||(i=l,r=T,a=k)}e&&r===0&&(i=null);for(const l of t.instances())l.showBottomWidget=l===i},lS={playing:2,paused:1,stopped:0};class uS{constructor(e,i){ht(this,xo);ht(this,Po);ht(this,Sa);ht(this,wo);ht(this,Co);ht(this,Or);ht(this,hn);ht(this,or);ht(this,Lo);ht(this,is);ht(this,gn);ht(this,Io);ht(this,Ta);ht(this,Jr);ht(this,ka);ht(this,vn);ht(this,Ii);ht(this,mn);ht(this,Qr);ht(this,Ro);ht(this,Do);ht(this,rs);ht(this,Ea);ht(this,Oo);ht(this,Bo);ht(this,Mo);ht(this,No);this.player=e,this.PlayerClass=i,this.eventListeners={"<any>":{}}}addEventListener(e,i){e==="<any>"||this[`handle${e}`]||ir(`Cannot add listener for unknown event type '${e}'.`);const a=`listener-handle-${Ma()}`;return this.eventListeners[e]=this.eventListeners[e]||{},this.eventListeners[e][a]=i,a}removeEventListener(e,i){this.eventListeners[e]=this.eventListeners[e]||{},delete this.eventListeners[e][i]}processEvent(e){return ln(this,null,function*(){yield Fc(()=>this.player),gg(e);const i=this[`handle${e.type}`],r=ra(this.player);de(this,xo,kh).call(this,e)?e.status="ignored-due-to-advert":de(this,Po,Eh).call(this,e)?e.status="ignored-due-to-scrubbing":i?(yield i.call(this,e),de(this,Ro,Ch).call(this),de(this,Do,Lh).call(this),e.status="handled"):ir("No handler function for event.",e);const a=ra(this.player);e.changedProps=Uc(r,a),e.processedAt=new Date().toISOString(),vg(e),de(this,Sa,yu).call(this,e.type,e),de(this,Sa,yu).call(this,"<any>",e)})}handlePressedChangeSpeed(){de(this,Jr,Kn).call(this,e=>e+1,{cycle:!0})}handlePressedEnterOnChangeSpeed(){de(this,Jr,Kn).call(this,e=>e+1,{cycle:!0})}handlePressedSpaceOnChangeSpeed(){de(this,Jr,Kn).call(this,e=>e+1,{cycle:!0})}handlePressedUpOnChangeSpeed(){de(this,Jr,Kn).call(this,e=>e+1)}handlePressedRightOnChangeSpeed(){de(this,Jr,Kn).call(this,e=>e+1)}handlePressedDownOnChangeSpeed(){de(this,Jr,Kn).call(this,e=>e-1)}handlePressedLeftOnChangeSpeed(){de(this,Jr,Kn).call(this,e=>e-1)}handlePressedPrevSegment(){de(this,ka,Su).call(this,e=>e-1)}handlePressedNextSegment(){de(this,ka,Su).call(this,e=>e+1)}handlePressedSeekBack({seconds:e}){de(this,Ii,tr).call(this,i=>i-e)}handlePressedSeekAhead({seconds:e}){de(this,Ii,tr).call(this,i=>i+e)}handlePressedPrevTrack(){de(this,vn,ds).call(this,e=>e-1)}handlePressedNextTrack(){de(this,vn,ds).call(this,e=>e+1)}handlePressedAdvertLink(){}handlePressedAdvertButton(){}handlePressedAdvertImage(){}handlePressedAdvertVideo(){}handlePressedBeyondWords(){}handlePressedSourceUrl(){}handleDurationUpdated(){}handleCurrentTimeUpdated(){!this.midrollPlayed&&de(this,Qr,Yn).call(this)}handlePlaybackPaused(){}handlePlaybackRateUpdated(){}handleVisibilityChanged(){oS(this.PlayerClass)}handlePressedScrollToPlayer(){this.player.target.scrollIntoView()}handlePressedVideoBackground(){de(this,gn,cs).call(this)}handlePressedEnterOnProgressBar(){de(this,gn,cs).call(this)}handlePressedSpaceOnProgressBar(){de(this,gn,cs).call(this)}handlePressedEnterOnProgressCircle(){de(this,gn,cs).call(this)}handlePressedSpaceOnProgressCircle(){de(this,gn,cs).call(this)}handlePressedLeftOnProgressBar(){de(this,Ii,tr).call(this,e=>e-5)}handlePressedRightOnProgressBar(){de(this,Ii,tr).call(this,e=>e+5)}handlePressedLeftOnProgressCircle(){de(this,Ii,tr).call(this,e=>e-5)}handlePressedRightOnProgressCircle(){de(this,Ii,tr).call(this,e=>e+5)}handlePressedProgressBar({ratio:e}){this.preScrubState=this.player.playbackState,de(this,Io,wh).call(this),de(this,Ii,tr).call(this,(i,r)=>e*r),e!==0&&(this.segmentPlayed=!0)}handleScrubbedProgressBar({ratio:e}){de(this,Ii,tr).call(this,(i,r)=>e*r),e!==0&&(this.segmentPlayed=!0)}handleFinishedScrubbingProgressBar(){this.player.playbackState=this.preScrubState,delete this.preScrubState}handleIdentifiersChanged(){Xc(this.player).then(()=>{de(this,mn,fs).call(this,{atTheStart:!0}),de(this,Qr,Yn).call(this,{atTheStart:!0})})}handleNoContentAvailable({description:e}){console.warn(`BeyondWords.Player: ${e}`)}handleMediaLoaded(){if(this.mediaLoaded)return;const e=this.player.initialProps.currentTime;e&&(this.player.currentTime=e),this.mediaLoaded=!0}handlePressedPlay({emittedFrom:e,widgetSegment:i,widgetIsCurrent:r}){e==="segment-widget"&&!r?de(this,Ta,bu).call(this,i):this.player.playbackState="playing"}handlePressedPause(){this.player.playbackState="paused"}handlePlaybackPlaying(){this.PlayerClass.instances().filter(r=>r!==this.player).filter(r=>r.playbackState==="playing").forEach(r=>r.playbackState="paused"),rS(this.PlayerClass)}handlePlaybackEnded(){de(this,Lo,Ph).call(this)&&(this.midrollPlayed=!0),this.segmentPlayed=!1;const e=de(this,Or,An).call(this),i=de(this,or,Cr).call(this);de(this,Qr,Yn).call(this,{atTheEnd:!0,wasIntro:e}),!i&&(de(this,mn,fs).call(this,{atTheEnd:!0}),!e&&(de(this,hn,us).call(this)||de(this,or,Cr).call(this)||de(this,vn,ds).call(this,r=>r+1)))}handlePlaybackNotAllowed({description:e}){console.warn(`BeyondWords.Player: ${e}`);const i=this.player.contentIndex===0&&this.player.currentTime===0;this.player.playbackState=i?"stopped":"paused"}handlePlaybackErrored({mediaType:e,errorMessage:i}){console.warn(`BeyondWords.Player: ${e} playback error: ${i}`),de(this,Or,An).call(this)||de(this,hn,us).call(this)?de(this,mn,fs).call(this,{errored:!0}):de(this,or,Cr).call(this)?de(this,Qr,Yn).call(this,{errored:!0}):this.handlePlaybackEnded()}handlePressedMaximize(){sc()?g1():h1(this.player.target)}handleFullScreenModeUpdated(){const e=sc()===this.player.target,i=e?"add":"remove";this.player.isFullScreen=e,this.player.target.classList[i]("maximized")}handlePressedPlaylistItem({index:e}){de(this,vn,ds).call(this,()=>e),this.player.playbackState="playing"}handlePressedTogglePlaylist(){const e=this.player.playlistStyle.split("-"),i=this.player.content.length>1,r=e[0]==="show"||e[0]==="auto"&&i;e[0]=r?"hide":"show",this.player.playlistStyle=e.join("-")}handlePressedDownload({contentIndex:e,mediaIndex:i}){const r=this.player.content[e],l=r.media[i].url,g=l.split(".").pop(),m=`${r.title}.${g}`;return Nb(l,m)}handlePressedCloseWidget(){for(const e of this.PlayerClass.instances())e.playbackState="paused",e.widgetStyle="closed-by-user"}handleContentStatusChanged({contentId:e,legacyId:i,sourceId:r,sourceUrl:a,contentStatus:l}){l==="processed"&&this.player.playbackState==="stopped"&&this.player.contentIndex===0&&this.player.currentTime===0&&de(this,Mo,Dh).call(this,{contentId:e,legacyId:i,sourceId:r,sourceUrl:a})&&Xc(this.player).then(()=>{de(this,mn,fs).call(this,{atTheStart:!0}),de(this,Qr,Yn).call(this,{atTheStart:!0})})}handleCurrentSegmentUpdated({segment:e,segmentIndex:i,contentIndex:r}){var a;de(this,is,wa).call(this)?this.player.currentSegment=ii(fe({},e),{segmentIndex:i,contentIndex:r}):this.segmentPlayed||((a=this.player.segmentContainers)==null||a.reset(),this.player.currentSegment=null)}handleHoveredSegmentUpdated({segment:e,segmentIndex:i,contentIndex:r}){e?this.player.hoveredSegment=ii(fe({},e),{segmentIndex:i,contentIndex:r}):this.player.hoveredSegment=null}handlePressedSegment({segment:e,segmentIndex:i,contentIndex:r}){if(!ia("hovered",e,this.player.clickableSections))return;if(!de(this,No,Oh).call(this,{contentIndex:r,segmentIndex:i})&&!de(this,or,Cr).call(this)){de(this,gn,cs).call(this);return}r!==this.player.contentIndex&&de(this,vn,ds).call(this,()=>r),de(this,Ta,bu).call(this,fe({segmentIndex:i,contentIndex:r},e))}}xo=new WeakSet,kh=function({type:e}){return de(this,or,Cr).call(this)&&(e.includes("ChangeSpeed")||e.includes("PrevSegment")||e.includes("NextSegment")||e.includes("SeekBack")||e.includes("SeekAhead")||e.includes("Progress")&&!e.includes("Space")&&!e.includes("Enter"))},Po=new WeakSet,Eh=function({type:e}){return this.preScrubState&&(e.includes("CurrentTimeUpdated")||e.includes("PlaybackEnded"))},Sa=new WeakSet,yu=function(e,i){const r=this.eventListeners[e]||{};Object.values(r).forEach(a=>a(i))},wo=new WeakSet,Ah=function(){return this.player.introsOutros.some(e=>e.placement==="pre-roll")},Co=new WeakSet,xh=function(){return this.player.introsOutros.some(e=>e.placement==="post-roll")},Or=new WeakSet,An=function(e=this.player.introsOutrosIndex){var i,r,a;return((a=(r=(i=this.player)==null?void 0:i.introsOutros)==null?void 0:r[e])==null?void 0:a.placement)==="pre-roll"},hn=new WeakSet,us=function(e=this.player.introsOutrosIndex){var i,r,a;return((a=(r=(i=this.player)==null?void 0:i.introsOutros)==null?void 0:r[e])==null?void 0:a.placement)==="post-roll"},or=new WeakSet,Cr=function(){return this.player.advertIndex!==-1},Lo=new WeakSet,Ph=function(){var e;return((e=this.player.adverts[this.player.advertIndex])==null?void 0:e.placement)==="mid-roll"},is=new WeakSet,wa=function(){return!de(this,Or,An).call(this)&&!de(this,hn,us).call(this)&&!de(this,or,Cr).call(this)},gn=new WeakSet,cs=function(){this.player.playbackState==="playing"?this.player.playbackState="paused":this.player.playbackState="playing"},Io=new WeakSet,wh=function(){this.player.playbackState==="playing"&&(this.player.playbackState="paused")},Ta=new WeakSet,bu=function(a){var l=a,{segmentIndex:e,contentIndex:i}=l,r=mu(l,["segmentIndex","contentIndex"]);de(this,Ii,tr).call(this,()=>r.startTime,i),this.player.currentSegment=fe({segmentIndex:e,contentIndex:i},r),this.player.playbackState="playing",this.segmentPlayed=!0},Jr=new WeakSet,Kn=function(e,{cycle:i}={}){const r=[.5,.6,.7,.8,.9,1,1.1,1.2,1.3,1.4,1.5,2,2.5,3],a=r.length-1,l=r.indexOf(this.player.playbackRate),g=e(l);let m;i?m=g%r.length:m=Math.max(0,Math.min(a,g)),this.player.playbackRate=r[m]||1},ka=new WeakSet,Su=function(e){const i=this.player.content[this.player.contentIndex].segments,r=ol(i,this.player.currentTime),a=e(r);de(this,Or,An).call(this)&&a>=0?this.handlePlaybackEnded():de(this,hn,us).call(this)&&a<0?(de(this,rs,Ca).call(this,-1),de(this,Ii,tr).call(this,()=>{var l;return((l=i[i.length-1])==null?void 0:l.startTime)||.01}),this.player.playbackState="playing"):de(this,is,wa).call(this)&&a<0&&de(this,wo,Ah).call(this)?(de(this,Ii,tr).call(this,()=>0),de(this,mn,fs).call(this,{atTheStart:!0})):de(this,is,wa).call(this)&&a===i.length&&de(this,Co,xh).call(this)?de(this,Ii,tr).call(this,()=>this.player.duration-.01):de(this,is,wa).call(this)&&a>=0&&a<i.length&&de(this,Ii,tr).call(this,()=>i[a].startTime)},vn=new WeakSet,ds=function(e){const i=e(this.player.contentIndex),r=i<0||i>=this.player.content.length;r?(this.player.playbackState="stopped",de(this,Ii,tr).call(this,()=>0)):(this.player.contentIndex=i,de(this,or,Cr).call(this)||(de(this,Ii,tr).call(this,()=>0),this.midrollPlayed=!1)),de(this,rs,Ca).call(this,-1),de(this,mn,fs).call(this,{atTheStart:!0}),r||de(this,Qr,Yn).call(this,{atTheStart:!0})},Ii=new WeakSet,tr=function(e,i){if(de(this,or,Cr).call(this))this.prevTime=e(),this.prevContent=i;else{const r=this.player.duration||0;this.player.currentTime=e(this.player.currentTime,r)}},mn=new WeakSet,fs=function({atTheStart:e,atTheEnd:i,errored:r}={}){const{content:a,introsOutros:l,currentTime:g}=this.player,m=typeof this.nextIntroOutro!="undefined"?this.nextIntroOutro:this.player.introsOutrosIndex,_=typeof this.nextAdvert!="undefined"?this.nextAdvert:this.player.advertIndex,T=typeof this.prevContent!="undefined"?this.prevContent:this.player.contentIndex;de(this,rs,Ca).call(this,tS({introsOutros:l,introsOutrosIndex:m,advertIndex:_,content:a,contentIndex:T,currentTime:g,atTheStart:e,atTheEnd:i,errored:r}))},Qr=new WeakSet,Yn=function({atTheStart:e,atTheEnd:i,wasIntro:r,errored:a}={}){const{adverts:l,content:g,currentTime:m}=this.player;let _=typeof this.nextIntroOutro!="undefined"?this.nextIntroOutro:this.player.introsOutrosIndex;const T=typeof this.nextAdvert!="undefined"?this.nextAdvert:this.player.advertIndex,k=typeof this.prevContent!="undefined"?this.prevContent:this.player.contentIndex;r&&(e=!0,i=!1,_=-1),de(this,Ea,Tu).call(this,Wb({introsOutrosIndex:_,adverts:l,advertIndex:T,content:g,contentIndex:k,currentTime:m,atTheStart:e,atTheEnd:i,errored:a}));const w=this.player.persistentAdImage,F=this.player.persistentIndex;this.player.persistentIndex=qb(w,F,T,l)},Ro=new WeakSet,Ch=function(){this.player.playbackState==="playing"&&typeof this.nextIntroOutro!="undefined"&&(de(this,rs,Ca).call(this,this.nextIntroOutro),delete this.nextIntroOutro)},Do=new WeakSet,Lh=function(){this.player.playbackState==="playing"&&typeof this.nextAdvert!="undefined"&&(de(this,Ea,Tu).call(this,this.nextAdvert),delete this.nextAdvert)},rs=new WeakSet,Ca=function(e){if(this.player.playbackState!=="playing"&&e!==-1){this.nextIntroOutro=e;return}else delete this.nextIntroOutro;if(!(this.player.contentIndex===0&&this.player.currentTime===0)&&de(this,Or,An).call(this,e)){this.player.introsOutrosIndex=-1,de(this,Qr,Yn).call(this,{atTheStart:!0});return}const l=de(this,Or,An).call(this),g=de(this,hn,us).call(this);this.player.introsOutrosIndex=e;const m=l&&!de(this,Or,An).call(this),_=g&&!de(this,hn,us).call(this);m&&(this.player.currentTime=0),_&&de(this,vn,ds).call(this,()=>1/0)},Ea=new WeakSet,Tu=function(e){if(this.player.playbackState!=="playing"&&e!==-1){this.nextAdvert=e;return}else delete this.nextAdvert;const r=de(this,or,Cr).call(this);this.player.advertIndex=e;const a=!r&&de(this,or,Cr).call(this),l=r&&!de(this,or,Cr).call(this);a&&de(this,Oo,Ih).call(this),l&&de(this,Bo,Rh).call(this)},Oo=new WeakSet,Ih=function(){de(this,Or,An).call(this)||(this.prevTime=this.player.currentTime),this.prevRate=this.player.playbackRate,this.prevContent=this.player.contentIndex,this.player.currentTime=0,this.player.playbackRate=1},Bo=new WeakSet,Rh=function(){this.player.playbackRate=this.prevRate||1,this.player.contentIndex!==this.prevContent||(this.player.currentTime=this.prevTime),delete this.prevTime,delete this.prevRate,delete this.prevContent},Mo=new WeakSet,Dh=function({contentId:e,legacyId:i,sourceId:r,sourceUrl:a}){var l,g,m,_;return this.player.contentId===e||this.player.contentId===i||this.player.sourceId===r||this.player.sourceUrl===a||((l=this.player.playlist)==null?void 0:l.some(T=>T.contentId===e))||((g=this.player.playlist)==null?void 0:g.some(T=>T.contentId===i))||((m=this.player.playlist)==null?void 0:m.some(T=>T.sourceId===r))||((_=this.player.playlist)==null?void 0:_.some(T=>T.sourceUrl===a))},No=new WeakSet,Oh=function({contentIndex:e,segmentIndex:i}){var r,a;return((r=this.player.currentSegment)==null?void 0:r.contentIndex)!==e||((a=this.player.currentSegment)==null?void 0:a.segmentIndex)!==i};var sa="<unknown>";function rd(t){var e=t.split(`
72
72
  `);return e.reduce(function(i,r){var a=fS(r)||gS(r)||pS(r)||SS(r)||yS(r);return a&&i.push(a),i},[])}var cS=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,dS=/\((\S*)(?::(\d+))(?::(\d+))\)/;function fS(t){var e=cS.exec(t);if(!e)return null;var i=e[2]&&e[2].indexOf("native")===0,r=e[2]&&e[2].indexOf("eval")===0,a=dS.exec(e[2]);return r&&a!=null&&(e[2]=a[1],e[3]=a[2],e[4]=a[3]),{file:i?null:e[2],methodName:e[1]||sa,arguments:i?[e[2]]:[],lineNumber:e[3]?+e[3]:null,column:e[4]?+e[4]:null}}var hS=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function gS(t){var e=hS.exec(t);return e?{file:e[2],methodName:e[1]||sa,arguments:[],lineNumber:+e[3],column:e[4]?+e[4]:null}:null}var vS=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,mS=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function pS(t){var e=vS.exec(t);if(!e)return null;var i=e[3]&&e[3].indexOf(" > eval")>-1,r=mS.exec(e[3]);return i&&r!=null&&(e[3]=r[1],e[4]=r[2],e[5]=null),{file:e[3],methodName:e[1]||sa,arguments:e[2]?e[2].split(","):[],lineNumber:e[4]?+e[4]:null,column:e[5]?+e[5]:null}}var _S=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function yS(t){var e=_S.exec(t);return e?{file:e[3],methodName:e[1]||sa,arguments:[],lineNumber:+e[4],column:e[5]?+e[5]:null}:null}var bS=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function SS(t){var e=bS.exec(t);return e?{file:e[2],methodName:e[1]||sa,arguments:[],lineNumber:+e[3],column:e[4]?+e[4]:null}:null}let nd=!1,bl,Sl;const TS=({onError:t})=>{if(!t||nd)return;nd=!0;const e=sd(new Error),i=e==null?void 0:e.match(/setErrorHandler/);bl=window.onerror,Sl=window.onunhandledrejection,window.onerror=(r,a,l,g,m)=>{var w;const _=a===e,T=(w=m==null?void 0:m.message)==null?void 0:w.match(/request was interrupted/);if((i||_||T)&&t(m))return!0;bl&&bl(r,a,l,g,m)},window.onunhandledrejection=r=>{var _;const a=r.reason,l=sd(a)===e,g=(_=a==null?void 0:a.message)==null?void 0:_.match(/request was interrupted/);if((i||l||g)&&t(a)){r.preventDefault();return}Sl&&Sl(r)}},sd=t=>{var e;return(e=rd((t==null?void 0:t.stack)||"")[0])==null?void 0:e.file},kS=()=>{typeof window=="undefined"&&ir(["Trying to initialize BeyondWords.Player in a server context but this is unsupported.","Please only initialize the player in a context where the global window object is available.","For example, by initializing the player inside a useEffect hook in a React application."])},ad=Object.prototype.toString;function od(t){switch(ad.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return Ls(t,Error)}}function ws(t,e){return ad.call(t)===`[object ${e}]`}function ld(t){return ws(t,"ErrorEvent")}function ud(t){return ws(t,"DOMError")}function ES(t){return ws(t,"DOMException")}function Qn(t){return ws(t,"String")}function cd(t){return t===null||typeof t!="object"&&typeof t!="function"}function Cs(t){return ws(t,"Object")}function Tl(t){return typeof Event!="undefined"&&Ls(t,Event)}function AS(t){return typeof Element!="undefined"&&Ls(t,Element)}function xS(t){return ws(t,"RegExp")}function kl(t){return!!(t&&t.then&&typeof t.then=="function")}function PS(t){return Cs(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function wS(t){return typeof t=="number"&&t!==t}function Ls(t,e){try{return t instanceof e}catch(i){return!1}}function Ja(t){return t&&t.Math==Math?t:void 0}const kr=typeof globalThis=="object"&&Ja(globalThis)||typeof window=="object"&&Ja(window)||typeof self=="object"&&Ja(self)||typeof global=="object"&&Ja(global)||function(){return this}()||{};function aa(){return kr}function El(t,e,i){const r=i||kr,a=r.__SENTRY__=r.__SENTRY__||{};return a[t]||(a[t]=e())}const Qa=aa(),CS=80;function Al(t,e={}){try{let i=t;const r=5,a=[];let l=0,g=0;const m=" > ",_=m.length;let T;const k=Array.isArray(e)?e:e.keyAttrs,w=!Array.isArray(e)&&e.maxStringLength||CS;for(;i&&l++<r&&(T=LS(i,k),!(T==="html"||l>1&&g+a.length*_+T.length>=w));)a.push(T),g+=T.length,i=i.parentNode;return a.reverse().join(m)}catch(i){return"<unknown>"}}function LS(t,e){const i=t,r=[];let a,l,g,m,_;if(!i||!i.tagName)return"";r.push(i.tagName.toLowerCase());const T=e&&e.length?e.filter(w=>i.getAttribute(w)).map(w=>[w,i.getAttribute(w)]):null;if(T&&T.length)T.forEach(w=>{r.push(`[${w[0]}="${w[1]}"]`)});else if(i.id&&r.push(`#${i.id}`),a=i.className,a&&Qn(a))for(l=a.split(/\s+/),_=0;_<l.length;_++)r.push(`.${l[_]}`);const k=["aria-label","type","name","title","alt"];for(_=0;_<k.length;_++)g=k[_],m=i.getAttribute(g),m&&r.push(`[${g}="${m}"]`);return r.join("")}function IS(){try{return Qa.document.location.href}catch(t){return""}}function RS(t){return Qa.document&&Qa.document.querySelector?Qa.document.querySelector(t):null}const DS="Sentry Logger ",$a=["debug","info","warn","error","log","assert","trace"];function dd(t){if(!("console"in kr))return t();const e=kr.console,i={};$a.forEach(r=>{const a=e[r]&&e[r].__sentry_original__;r in e&&a&&(i[r]=e[r],e[r]=a)});try{return t()}finally{Object.keys(i).forEach(r=>{e[r]=i[r]})}}function fd(){let t=!1;const e={enable:()=>{t=!0},disable:()=>{t=!1}};return typeof __SENTRY_DEBUG__=="undefined"||__SENTRY_DEBUG__?$a.forEach(i=>{e[i]=(...r)=>{t&&dd(()=>{kr.console[i](`${DS}[${i}]:`,...r)})}}):$a.forEach(i=>{e[i]=()=>{}}),e}let ct;typeof __SENTRY_DEBUG__=="undefined"||__SENTRY_DEBUG__?ct=El("logger",fd):ct=fd();const OS=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function BS(t){return t==="http"||t==="https"}function eo(t,e=!1){const{host:i,path:r,pass:a,port:l,projectId:g,protocol:m,publicKey:_}=t;return`${m}://${_}${e&&a?`:${a}`:""}@${i}${l?`:${l}`:""}/${r&&`${r}/`}${g}`}function MS(t){const e=OS.exec(t);if(!e){console.error(`Invalid Sentry Dsn: ${t}`);return}const[i,r,a="",l,g="",m]=e.slice(1);let _="",T=m;const k=T.split("/");if(k.length>1&&(_=k.slice(0,-1).join("/"),T=k.pop()),T){const w=T.match(/^\d+/);w&&(T=w[0])}return hd({host:l,pass:a,path:_,projectId:T,port:g,protocol:i,publicKey:r})}function hd(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function NS(t){if(!(typeof __SENTRY_DEBUG__=="undefined"||__SENTRY_DEBUG__))return!0;const{port:e,projectId:i,protocol:r}=t;return["protocol","publicKey","host","projectId"].find(g=>t[g]?!1:(ct.error(`Invalid Sentry Dsn: ${g} missing`),!0))?!1:i.match(/^\d+$/)?BS(r)?e&&isNaN(parseInt(e,10))?(ct.error(`Invalid Sentry Dsn: Invalid port ${e}`),!1):!0:(ct.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(ct.error(`Invalid Sentry Dsn: Invalid projectId ${i}`),!1)}function FS(t){const e=typeof t=="string"?MS(t):hd(t);if(!(!e||!NS(e)))return e}class Rr extends Error{constructor(e,i="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=i}}function oa(t,e=0){return typeof t!="string"||e===0||t.length<=e?t:`${t.slice(0,e)}...`}function gd(t,e){if(!Array.isArray(t))return"";const i=[];for(let r=0;r<t.length;r++){const a=t[r];try{i.push(String(a))}catch(l){i.push("[value cannot be serialized]")}}return i.join(e)}function US(t,e,i=!1){return Qn(t)?xS(e)?e.test(t):Qn(e)?i?t===e:t.includes(e):!1:!1}function to(t,e=[],i=!1){return e.some(r=>US(t,r,i))}function Wi(t,e,i){if(!(e in t))return;const r=t[e],a=i(r);if(typeof a=="function")try{vd(a,r)}catch(l){}t[e]=a}function xl(t,e,i){Object.defineProperty(t,e,{value:i,writable:!0,configurable:!0})}function vd(t,e){const i=e.prototype||{};t.prototype=e.prototype=i,xl(t,"__sentry_original__",e)}function Pl(t){return t.__sentry_original__}function VS(t){return Object.keys(t).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`).join("&")}function md(t){if(od(t))return fe({message:t.message,name:t.name,stack:t.stack},_d(t));if(Tl(t)){const e=fe({type:t.type,target:pd(t.target),currentTarget:pd(t.currentTarget)},_d(t));return typeof CustomEvent!="undefined"&&Ls(t,CustomEvent)&&(e.detail=t.detail),e}else return t}function pd(t){try{return AS(t)?Al(t):Object.prototype.toString.call(t)}catch(e){return"<unknown>"}}function _d(t){if(typeof t=="object"&&t!==null){const e={};for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}else return{}}function WS(t,e=40){const i=Object.keys(md(t));if(i.sort(),!i.length)return"[object has no keys]";if(i[0].length>=e)return oa(i[0],e);for(let r=i.length;r>0;r--){const a=i.slice(0,r).join(", ");if(!(a.length>e))return r===i.length?a:oa(a,e)}return""}function wl(t){return Cl(t,new Map)}function Cl(t,e){if(Cs(t)){const i=e.get(t);if(i!==void 0)return i;const r={};e.set(t,r);for(const a of Object.keys(t))typeof t[a]!="undefined"&&(r[a]=Cl(t[a],e));return r}if(Array.isArray(t)){const i=e.get(t);if(i!==void 0)return i;const r=[];return e.set(t,r),t.forEach(a=>{r.push(Cl(a,e))}),r}return t}const yd=50,bd=/\(error: (.*)\)/;function Sd(...t){const e=t.sort((i,r)=>i[0]-r[0]).map(i=>i[1]);return(i,r=0)=>{const a=[],l=i.split(`
73
73
  `);for(let g=r;g<l.length;g++){const m=l[g];if(m.length>1024)continue;const _=bd.test(m)?m.replace(bd,"$1"):m;if(!_.match(/\S*Error: /)){for(const T of e){const k=T(_);if(k){a.push(k);break}}if(a.length>=yd)break}}return GS(a)}}function jS(t){return Array.isArray(t)?Sd(...t):t}function GS(t){if(!t.length)return[];const e=t.slice(0,yd),i=e[e.length-1].function;i&&/sentryWrapped/.test(i)&&e.pop(),e.reverse();const r=e[e.length-1].function;return r&&/captureMessage|captureException/.test(r)&&e.pop(),e.map(a=>ii(fe({},a),{filename:a.filename||e[e.length-1].filename,function:a.function||"?"}))}const Ll="<anonymous>";function Rn(t){try{return!t||typeof t!="function"?Ll:t.name||Ll}catch(e){return Ll}}const Il=aa();function Td(){if(!("fetch"in Il))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(t){return!1}}function Rl(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function zS(){if(!Td())return!1;if(Rl(Il.fetch))return!0;let t=!1;const e=Il.document;if(e&&typeof e.createElement=="function")try{const i=e.createElement("iframe");i.hidden=!0,e.head.appendChild(i),i.contentWindow&&i.contentWindow.fetch&&(t=Rl(i.contentWindow.fetch)),e.head.removeChild(i)}catch(i){(typeof __SENTRY_DEBUG__=="undefined"||__SENTRY_DEBUG__)&&ct.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",i)}return t}const io=aa();function HS(){const t=io.chrome,e=t&&t.app&&t.app.runtime,i="history"in io&&!!io.history.pushState&&!!io.history.replaceState;return!e&&i}const ai=aa(),la="__sentry_xhr_v2__",ua={},kd={};function KS(t){if(!kd[t])switch(kd[t]=!0,t){case"console":YS();break;case"dom":tT();break;case"xhr":ZS();break;case"fetch":qS();break;case"history":JS();break;case"error":iT();break;case"unhandledrejection":rT();break;default:(typeof __SENTRY_DEBUG__=="undefined"||__SENTRY_DEBUG__)&&ct.warn("unknown instrumentation type:",t);return}}function Dn(t,e){ua[t]=ua[t]||[],ua[t].push(e),KS(t)}function Dr(t,e){if(!(!t||!ua[t]))for(const i of ua[t]||[])try{i(e)}catch(r){(typeof __SENTRY_DEBUG__=="undefined"||__SENTRY_DEBUG__)&&ct.error(`Error while triggering instrumentation handler.
74
74
  Type: ${t}