@beyondwords/player 0.0.0-beta34 → 0.0.0-beta35
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/es.js +2 -2
- package/dist/es.js.map +1 -1
- package/dist/umd.js +2 -2
- package/dist/umd.js.map +1 -1
- package/package.json +1 -1
package/dist/umd.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
(function(ue,mt){typeof exports=="object"&&typeof module!="undefined"?module.exports=mt():typeof define=="function"&&define.amd?define(mt):(ue=typeof globalThis!="undefined"?globalThis:ue||self,ue.BeyondWords=mt())})(this,function(){var ma,yu,_o,_h,pa,yo,yh,bo,bh,_a,So,Sh,To,Th,ya,ko,kh,Eo,Eh,Ao,Ah,xo,xh,Po,Ph,ba,bu,wo,wh,Co,Ch,Br,An,hn,ls,or,Lr,Lo,Lh,is,wa,gn,us,Io,Ih,Sa,Su,Qr,Kn,Ta,Tu,vn,cs,Ro,Rh,Ii,tr,mn,ds,$r,Yn,Do,Dh,Oo,Oh,rs,Ca,ka,ku,Bo,Bh,Mo,Mh,No,Nh,Fo,Fh,Nn,Ef;"use strict";var LE=Object.defineProperty,IE=Object.defineProperties;var RE=Object.getOwnPropertyDescriptors;var Xo=Object.getOwnPropertySymbols;var vh=Object.prototype.hasOwnProperty,mh=Object.prototype.propertyIsEnumerable;var gh=(ue,mt,Tt)=>mt in ue?LE(ue,mt,{enumerable:!0,configurable:!0,writable:!0,value:Tt}):ue[mt]=Tt,fe=(ue,mt)=>{for(var Tt in mt||(mt={}))vh.call(mt,Tt)&&gh(ue,Tt,mt[Tt]);if(Xo)for(var Tt of Xo(mt))mh.call(mt,Tt)&&gh(ue,Tt,mt[Tt]);return ue},ri=(ue,mt)=>IE(ue,RE(mt));var pu=(ue,mt)=>{var Tt={};for(var Mi in ue)vh.call(ue,Mi)&&mt.indexOf(Mi)<0&&(Tt[Mi]=ue[Mi]);if(ue!=null&&Xo)for(var Mi of Xo(ue))mt.indexOf(Mi)<0&&mh.call(ue,Mi)&&(Tt[Mi]=ue[Mi]);return Tt};var _u=(ue,mt,Tt)=>{if(!mt.has(ue))throw TypeError("Cannot "+Tt)};var jr=(ue,mt,Tt)=>(_u(ue,mt,"read from private field"),Tt?Tt.call(ue):mt.get(ue)),ht=(ue,mt,Tt)=>{if(mt.has(ue))throw TypeError("Cannot add the same private member more than once");mt instanceof WeakSet?mt.add(ue):mt.set(ue,Tt)},ph=(ue,mt,Tt,Mi)=>(_u(ue,mt,"write to private field"),Mi?Mi.call(ue,Tt):mt.set(ue,Tt),Tt);var ce=(ue,mt,Tt)=>(_u(ue,mt,"access private method"),Tt);var ln=(ue,mt,Tt)=>new Promise((Mi,qs)=>{var $t=kr=>{try{Ze(Tt.next(kr))}catch(Ir){qs(Ir)}},xn=kr=>{try{Ze(Tt.throw(kr))}catch(Ir){qs(Ir)}},Ze=kr=>kr.done?Mi(kr.value):Promise.resolve(kr.value).then($t,xn);Ze((Tt=Tt.apply(ue,mt)).next())});function ue(){}const mt=t=>t;function Tt(t,e){for(const i in e)t[i]=e[i];return t}function Mi(t){return t()}function qs(){return Object.create(null)}function $t(t){t.forEach(Mi)}function xn(t){return typeof t=="function"}function Ze(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let kr;function Ir(t,e){return kr||(kr=document.createElement("a")),kr.href=e,t===kr.href}function Uh(t){return Object.keys(t).length===0}function fs(t,e,i,r){if(t){const a=Eu(t,e,i,r);return t[0](a)}}function Eu(t,e,i,r){return t[1]&&r?Tt(i.ctx.slice(),t[1](r(e))):i.ctx}function hs(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 gs(t,e,i,r,a,l){if(a){const g=Eu(e,i,r,l);t.p(g,a)}}function vs(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 Au(t){return t==null?"":t}function xu(t){const e=typeof t=="string"&&t.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return e?[parseFloat(e[1]),e[2]||"px"]:[t,"px"]}const Pu=typeof window!="undefined";let Vh=Pu?()=>window.performance.now():()=>Date.now(),La=Pu?t=>requestAnimationFrame(t):ue;const ms=new Set;function wu(t){ms.forEach(e=>{e.c(t)||(ms.delete(e),e.f())}),ms.size!==0&&La(wu)}function Wh(t){let e;return ms.size===0&&La(wu),{promise:new Promise(i=>{ms.add(e={c:t,f:i})}),abort(){ms.delete(e)}}}const jh=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global;function I(t,e){t.appendChild(e)}function Cu(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function Gh(t){const e=F("style");return zh(Cu(t),e),e.sheet}function zh(t,e){return I(t.head||t,e),e.sheet}function te(t,e,i){t.insertBefore(e,i||null)}function ee(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 F(t){return document.createElement(t)}function tt(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Re(t){return document.createTextNode(t)}function xe(){return Re(" ")}function qn(){return Re("")}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 Hh(t){return Array.from(t.childNodes)}function hr(t,e){e=""+e,t.data!==e&&(t.data=e)}function kt(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 gi(t){const e=t.querySelector(":checked");return e&&e.__value}let Ia;function Kh(){if(Ia===void 0){Ia=!1;try{typeof window!="undefined"&&window.parent&&window.parent.document}catch(t){Ia=!0}}return Ia}function Yh(t,e){getComputedStyle(t).position==="static"&&(t.style.position="relative");const r=F("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=Kh();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(),ee(r)}}function qe(t,e,i){t.classList[i?"add":"remove"](e)}function qh(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 Xh(t){let e=5381,i=t.length;for(;i--;)e=(e<<5)-e^t.charCodeAt(i);return e>>>0}function Zh(t,e){const i={stylesheet:Gh(e),rules:{}};return Ra.set(t,i),i}function Lu(t,e,i,r,a,l,g,m=0){const _=16.666/r;let k=`{
|
|
3
3
|
`;for(let j=0;j<=1;j+=_){const le=e+(i-e)*l(j);k+=j*100+`%{${g(le,1-le)}}
|
|
4
4
|
`}const T=k+`100% {${g(i,1-i)}}
|
|
5
|
-
}`,w=`__svelte_${Xh(T)}_${m}`,U=Cu(t),{stylesheet:V,rules:N}=Ra.get(U)||Zh(U,t);N[w]||(N[w]=!0,V.insertRule(`@keyframes ${w} ${T}`,V.cssRules.length));const X=t.style.animation||"";return t.style.animation=`${X?`${X}, `:""}${w} ${r}ms linear ${a}ms 1 both`,Da+=1,w}function Jh(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&&ee(e)}),Ra.clear())})}let Xs;function Zs(t){Xs=t}function Iu(){if(!Xs)throw new Error("Function called outside component initialization");return Xs}function Zo(t){Iu().$$.on_mount.push(t)}function $h(t){Iu().$$.on_destroy.push(t)}const ps=[],Fe=[];let _s=[];const Jo=[],Ru=Promise.resolve();let Qo=!1;function Du(){Qo||(Qo=!0,Ru.then(P))}function Ou(){return Du(),Ru}function Nt(t){_s.push(t)}function Qe(t){Jo.push(t)}const $o=new Set;let ys=0;function P(){if(ys!==0)return;const t=Xs;do{try{for(;ys<ps.length;){const e=ps[ys];ys++,Zs(e),eg(e.$$)}}catch(e){throw ps.length=0,ys=0,e}for(Zs(null),ps.length=0,ys=0;Fe.length;)Fe.pop()();for(let e=0;e<_s.length;e+=1){const i=_s[e];$o.has(i)||($o.add(i),i())}_s.length=0}while(ps.length);for(;Jo.length;)Jo.pop()();Qo=!1,$o.clear(),Zs(t)}function eg(t){if(t.fragment!==null){t.update(),$t(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(Nt)}}function tg(t){const e=[],i=[];_s.forEach(r=>t.indexOf(r)===-1?e.push(r):i.push(r)),i.forEach(r=>r()),_s=e}let Js;function ig(){return Js||(Js=Promise.resolve(),Js.then(()=>{Js=null})),Js}function el(t,e,i){t.dispatchEvent(qh(`${e?"intro":"outro"}${i}`))}const Oa=new Set;let un;function At(){un={r:0,c:[],p:un}}function xt(){un.r||$t(un.c),un=un.p}function q(t,e){t&&t.i&&(Oa.delete(t),t.i(e))}function ae(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 rg={duration:0};function Bu(t,e,i,r){const a={direction:"both"};let l=e(t,i,a),g=r?0:1,m=null,_=null,k=null;function T(){k&&Jh(t,k)}function w(V,N){const X=V.b-g;return N*=Math.abs(X),{a:g,b:V.b,d:X,duration:N,start:V.start,end:V.start+N,group:V.group}}function U(V){const{delay:N=0,duration:X=300,easing:j=mt,tick:le=ue,css:ie}=l||rg,Ce={start:Vh()+N,b:V};V||(Ce.group=un,un.r+=1),m||_?_=Ce:(ie&&(T(),k=Lu(t,g,V,X,N,j,ie)),V&&le(0,1),m=w(Ce,X),Nt(()=>el(t,V,"start")),Wh(ge=>{if(_&&ge>_.start&&(m=w(_,X),_=null,el(t,m.b,"start"),ie&&(T(),k=Lu(t,g,m.b,m.duration,0,j,l.css))),m){if(ge>=m.end)le(g=m.b,1-g),el(t,m.b,"end"),_||(m.b?T():--m.group.r||$t(m.group.c)),m=null;else if(ge>=m.start){const de=ge-m.start;g=m.a+m.d*j(de/m.duration),le(g,1-g)}}return!!(m||_)}))}return{run(V){xn(l)?ig().then(()=>{l=l(a),U(V)}):U(V)},end(){T(),m=_=null}}}function ng(t,e){ae(t,1,1,()=>{e.delete(t.key)})}function sg(t,e,i,r,a,l,g,m,_,k,T,w){let U=t.length,V=l.length,N=U;const X={};for(;N--;)X[t[N].key]=N;const j=[],le=new Map,ie=new Map,Ce=[];for(N=V;N--;){const $=w(a,l,N),L=i($);let oe=g.get(L);oe?r&&Ce.push(()=>oe.p($,e)):(oe=k(L,$),oe.c()),le.set(L,j[N]=oe),L in X&&ie.set(L,Math.abs(N-X[L]))}const ge=new Set,de=new Set;function ke($){q($,1),$.m(m,T),g.set($.key,$),T=$.first,V--}for(;U&&V;){const $=j[V-1],L=t[U-1],oe=$.key,W=L.key;$===L?(T=$.first,U--,V--):le.has(W)?!g.has(oe)||ge.has(oe)?ke($):de.has(W)?U--:ie.get(oe)>ie.get(W)?(de.add(oe),ke($)):(ge.add(W),U--):(_(L,g),U--)}for(;U--;){const $=t[U];le.has($.key)||_($,g)}for(;V;)ke(j[V-1]);return $t(Ce),j}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||Nt(()=>{const g=t.$$.on_mount.map(Mi).filter(xn);t.$$.on_destroy?t.$$.on_destroy.push(...g):$t(g),t.$$.on_mount=[]}),l.forEach(Nt)}function je(t,e){const i=t.$$;i.fragment!==null&&(tg(i.after_update),$t(i.on_destroy),i.fragment&&i.fragment.d(e),i.on_destroy=i.fragment=null,i.ctx=[])}function ag(t,e){t.$$.dirty[0]===-1&&(ps.push(t),Du(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function it(t,e,i,r,a,l,g,m=[-1]){const _=Xs;Zs(t);const k=t.$$={fragment:null,ctx:[],props:l,update:ue,not_equal:a,bound:qs(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(_?_.$$.context:[])),callbacks:qs(),dirty:m,skip_bound:!1,root:e.target||_.$$.root};g&&g(k.root);let T=!1;if(k.ctx=i?i(t,e.props||{},(w,U,...V)=>{const N=V.length?V[0]:U;return k.ctx&&a(k.ctx[w],k.ctx[w]=N)&&(!k.skip_bound&&k.bound[w]&&k.bound[w](N),T&&ag(t,w)),U}):[],k.update(),T=!0,$t(k.before_update),k.fragment=r?r(k.ctx):!1,e.target){if(e.hydrate){const w=Hh(e.target);k.fragment&&k.fragment.l(w),w.forEach(ee)}else k.fragment&&k.fragment.c();e.intro&&q(t.$$.fragment),We(t,e.target,e.anchor,e.customElement),P()}Zs(_)}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&&!Uh(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const og="@beyondwords/player",tl="0.0.0-
|
|
5
|
+
}`,w=`__svelte_${Xh(T)}_${m}`,U=Cu(t),{stylesheet:V,rules:N}=Ra.get(U)||Zh(U,t);N[w]||(N[w]=!0,V.insertRule(`@keyframes ${w} ${T}`,V.cssRules.length));const X=t.style.animation||"";return t.style.animation=`${X?`${X}, `:""}${w} ${r}ms linear ${a}ms 1 both`,Da+=1,w}function Jh(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&&ee(e)}),Ra.clear())})}let Xs;function Zs(t){Xs=t}function Iu(){if(!Xs)throw new Error("Function called outside component initialization");return Xs}function Zo(t){Iu().$$.on_mount.push(t)}function $h(t){Iu().$$.on_destroy.push(t)}const ps=[],Fe=[];let _s=[];const Jo=[],Ru=Promise.resolve();let Qo=!1;function Du(){Qo||(Qo=!0,Ru.then(P))}function Ou(){return Du(),Ru}function Nt(t){_s.push(t)}function Qe(t){Jo.push(t)}const $o=new Set;let ys=0;function P(){if(ys!==0)return;const t=Xs;do{try{for(;ys<ps.length;){const e=ps[ys];ys++,Zs(e),eg(e.$$)}}catch(e){throw ps.length=0,ys=0,e}for(Zs(null),ps.length=0,ys=0;Fe.length;)Fe.pop()();for(let e=0;e<_s.length;e+=1){const i=_s[e];$o.has(i)||($o.add(i),i())}_s.length=0}while(ps.length);for(;Jo.length;)Jo.pop()();Qo=!1,$o.clear(),Zs(t)}function eg(t){if(t.fragment!==null){t.update(),$t(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(Nt)}}function tg(t){const e=[],i=[];_s.forEach(r=>t.indexOf(r)===-1?e.push(r):i.push(r)),i.forEach(r=>r()),_s=e}let Js;function ig(){return Js||(Js=Promise.resolve(),Js.then(()=>{Js=null})),Js}function el(t,e,i){t.dispatchEvent(qh(`${e?"intro":"outro"}${i}`))}const Oa=new Set;let un;function At(){un={r:0,c:[],p:un}}function xt(){un.r||$t(un.c),un=un.p}function q(t,e){t&&t.i&&(Oa.delete(t),t.i(e))}function ae(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 rg={duration:0};function Bu(t,e,i,r){const a={direction:"both"};let l=e(t,i,a),g=r?0:1,m=null,_=null,k=null;function T(){k&&Jh(t,k)}function w(V,N){const X=V.b-g;return N*=Math.abs(X),{a:g,b:V.b,d:X,duration:N,start:V.start,end:V.start+N,group:V.group}}function U(V){const{delay:N=0,duration:X=300,easing:j=mt,tick:le=ue,css:ie}=l||rg,Ce={start:Vh()+N,b:V};V||(Ce.group=un,un.r+=1),m||_?_=Ce:(ie&&(T(),k=Lu(t,g,V,X,N,j,ie)),V&&le(0,1),m=w(Ce,X),Nt(()=>el(t,V,"start")),Wh(ge=>{if(_&&ge>_.start&&(m=w(_,X),_=null,el(t,m.b,"start"),ie&&(T(),k=Lu(t,g,m.b,m.duration,0,j,l.css))),m){if(ge>=m.end)le(g=m.b,1-g),el(t,m.b,"end"),_||(m.b?T():--m.group.r||$t(m.group.c)),m=null;else if(ge>=m.start){const de=ge-m.start;g=m.a+m.d*j(de/m.duration),le(g,1-g)}}return!!(m||_)}))}return{run(V){xn(l)?ig().then(()=>{l=l(a),U(V)}):U(V)},end(){T(),m=_=null}}}function ng(t,e){ae(t,1,1,()=>{e.delete(t.key)})}function sg(t,e,i,r,a,l,g,m,_,k,T,w){let U=t.length,V=l.length,N=U;const X={};for(;N--;)X[t[N].key]=N;const j=[],le=new Map,ie=new Map,Ce=[];for(N=V;N--;){const $=w(a,l,N),L=i($);let oe=g.get(L);oe?r&&Ce.push(()=>oe.p($,e)):(oe=k(L,$),oe.c()),le.set(L,j[N]=oe),L in X&&ie.set(L,Math.abs(N-X[L]))}const ge=new Set,de=new Set;function ke($){q($,1),$.m(m,T),g.set($.key,$),T=$.first,V--}for(;U&&V;){const $=j[V-1],L=t[U-1],oe=$.key,W=L.key;$===L?(T=$.first,U--,V--):le.has(W)?!g.has(oe)||ge.has(oe)?ke($):de.has(W)?U--:ie.get(oe)>ie.get(W)?(de.add(oe),ke($)):(ge.add(W),U--):(_(L,g),U--)}for(;U--;){const $=t[U];le.has($.key)||_($,g)}for(;V;)ke(j[V-1]);return $t(Ce),j}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||Nt(()=>{const g=t.$$.on_mount.map(Mi).filter(xn);t.$$.on_destroy?t.$$.on_destroy.push(...g):$t(g),t.$$.on_mount=[]}),l.forEach(Nt)}function je(t,e){const i=t.$$;i.fragment!==null&&(tg(i.after_update),$t(i.on_destroy),i.fragment&&i.fragment.d(e),i.on_destroy=i.fragment=null,i.ctx=[])}function ag(t,e){t.$$.dirty[0]===-1&&(ps.push(t),Du(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function it(t,e,i,r,a,l,g,m=[-1]){const _=Xs;Zs(t);const k=t.$$={fragment:null,ctx:[],props:l,update:ue,not_equal:a,bound:qs(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(_?_.$$.context:[])),callbacks:qs(),dirty:m,skip_bound:!1,root:e.target||_.$$.root};g&&g(k.root);let T=!1;if(k.ctx=i?i(t,e.props||{},(w,U,...V)=>{const N=V.length?V[0]:U;return k.ctx&&a(k.ctx[w],k.ctx[w]=N)&&(!k.skip_bound&&k.bound[w]&&k.bound[w](N),T&&ag(t,w)),U}):[],k.update(),T=!0,$t(k.before_update),k.fragment=r?r(k.ctx):!1,e.target){if(e.hydrate){const w=Hh(e.target);k.fragment&&k.fragment.l(w),w.forEach(ee)}else k.fragment&&k.fragment.c();e.intro&&q(t.$$.fragment),We(t,e.target,e.anchor,e.customElement),P()}Zs(_)}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&&!Uh(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const og="@beyondwords/player",tl="0.0.0-beta35",ir=(t,e)=>{t=[t].flat().join(`
|
|
6
6
|
`);let i=`${og}:
|
|
7
7
|
|
|
8
8
|
${t}`;if(e){i+=`
|
|
@@ -87,5 +87,5 @@ Event: ${On(t)}.
|
|
|
87
87
|
Url: ${go(t)}`),!0):pk(t,e.allowUrls)?!1:((typeof __SENTRY_DEBUG__=="undefined"||__SENTRY_DEBUG__)&&ct.warn(`Event dropped due to not being matched by \`allowUrls\` option.
|
|
88
88
|
Event: ${On(t)}.
|
|
89
89
|
Url: ${go(t)}`),!0)}function gk(t,e){return t.type||!e||!e.length?!1:_k(t).some(i=>to(i,e))}function vk(t,e){if(t.type!=="transaction"||!e||!e.length)return!1;const i=t.transaction;return i?to(i,e):!1}function mk(t,e){if(!e||!e.length)return!1;const i=go(t);return i?to(i,e):!1}function pk(t,e){if(!e||!e.length)return!0;const i=go(t);return i?to(i,e):!0}function _k(t){if(t.message)return[t.message];if(t.exception){const{values:e}=t.exception;try{const{type:i="",value:r=""}=e&&e[e.length-1]||{};return[`${r}`,`${i}: ${r}`]}catch(i){return(typeof __SENTRY_DEBUG__=="undefined"||__SENTRY_DEBUG__)&&ct.error(`Cannot extract message for event ${On(t)}`),[]}}return[]}function yk(t){try{return t.exception.values[0].type==="SentryError"}catch(e){}return!1}function bk(t=[]){for(let e=t.length-1;e>=0;e--){const i=t[e];if(i&&i.filename!=="<anonymous>"&&i.filename!=="[native code]")return i.filename||null}return null}function go(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch(i){}return e?bk(e):null}catch(e){return(typeof __SENTRY_DEBUG__=="undefined"||__SENTRY_DEBUG__)&&ct.error(`Cannot extract url for event ${On(t)}`),null}}const Kt=Er;let jl=0;function tf(){return jl>0}function Sk(){jl++,setTimeout(()=>{jl--})}function Ds(t,e={},i){if(typeof t!="function")return t;try{const a=t.__sentry_wrapped__;if(a)return a;if(wl(t))return t}catch(a){return t}const r=function(){const a=Array.prototype.slice.call(arguments);try{i&&typeof i=="function"&&i.apply(this,arguments);const l=a.map(g=>Ds(g,e));return t.apply(this,l)}catch(l){throw Sk(),WT(g=>{g.addEventProcessor(m=>(e.mechanism&&(Bl(m,void 0,void 0),ua(m,e.mechanism)),m.extra=ri(fe({},m.extra),{arguments:a}),m)),Hd(l)}),l}};try{for(const a in t)Object.prototype.hasOwnProperty.call(t,a)&&(r[a]=t[a])}catch(a){}_d(r,t),Pl(t,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return t.name}})}catch(a){}return r}function rf(t,e){const i=zl(t,e),r={type:e&&e.name,value:Ak(e)};return i.length&&(r.stacktrace={frames:i}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function Tk(t,e,i,r){const l=Li().getClient(),g=l&&l.getOptions().normalizeDepth,m={exception:{values:[{type:kl(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:`Non-Error ${r?"promise rejection":"exception"} captured with keys: ${HS(e)}`}]},extra:{__serialized__:Rd(e,g)}};if(i){const _=zl(t,i);_.length&&(m.exception.values[0].stacktrace={frames:_})}return m}function Gl(t,e){return{exception:{values:[rf(t,e)]}}}function zl(t,e){const i=e.stacktrace||e.stack||"",r=Ek(e);try{return t(i,r)}catch(a){}return[]}const kk=/Minified React error #\d+;/i;function Ek(t){if(t){if(typeof t.framesToPop=="number")return t.framesToPop;if(kk.test(t.message))return 1}return 0}function Ak(t){const e=t&&t.message;return e?e.error&&typeof e.error.message=="string"?e.error.message:e:"No error message"}function xk(t,e,i,r){const a=i&&i.syntheticException||void 0,l=Hl(t,e,a,r);return ua(l),l.level="error",i&&i.event_id&&(l.event_id=i.event_id),$n(l)}function Pk(t,e,i="info",r,a){const l=r&&r.syntheticException||void 0,g=Kl(t,e,l,a);return g.level=i,r&&r.event_id&&(g.event_id=r.event_id),$n(g)}function Hl(t,e,i,r,a){let l;if(dd(e)&&e.error)return Gl(t,e.error);if(fd(e)||wS(e)){const g=e;if("stack"in e)l=Gl(t,e);else{const m=g.name||(fd(g)?"DOMError":"DOMException"),_=g.message?`${m}: ${g.message}`:m;l=Kl(t,_,i,r),Bl(l,_)}return"code"in g&&(l.tags=ri(fe({},l.tags),{"DOMException.code":`${g.code}`})),l}return cd(e)?Gl(t,e):ws(e)||kl(e)?(l=Tk(t,e,i,a),ua(l,{synthetic:!0}),l):(l=Kl(t,e,i,r),Bl(l,`${e}`,void 0),ua(l,{synthetic:!0}),l)}function Kl(t,e,i,r){const a={message:e};if(r&&i){const l=zl(t,i);l.length&&(a.exception={values:[{value:e,stacktrace:{frames:l}}]})}return a}const vo=1024,nf="Breadcrumbs";class fa{static __initStatic(){this.id=nf}__init(){this.name=fa.id}constructor(e){fa.prototype.__init.call(this),this.options=fe({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},e)}setupOnce(){this.options.console&&Dn("console",Ck),this.options.dom&&Dn("dom",wk(this.options.dom)),this.options.xhr&&Dn("xhr",Lk),this.options.fetch&&Dn("fetch",Ik),this.options.history&&Dn("history",Rk)}addSentryBreadcrumb(e){this.options.sentry&&Li().addBreadcrumb({category:`sentry.${e.type==="transaction"?"transaction":"event"}`,event_id:e.event_id,level:e.level,message:On(e)},{event:e})}}fa.__initStatic();function wk(t){function e(i){let r,a=typeof t=="object"?t.serializeAttribute:void 0,l=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;l&&l>vo&&((typeof __SENTRY_DEBUG__=="undefined"||__SENTRY_DEBUG__)&&ct.warn(`\`dom.maxStringLength\` cannot exceed ${vo}, but a value of ${l} was configured. Sentry will use ${vo} instead.`),l=vo),typeof a=="string"&&(a=[a]);try{const g=i.event;r=Dk(g)?xl(g.target,{keyAttrs:a,maxStringLength:l}):xl(g,{keyAttrs:a,maxStringLength:l})}catch(g){r="<unknown>"}r.length!==0&&Li().addBreadcrumb({category:`ui.${i.name}`,message:r},{event:i.event,name:i.name,global:i.global})}return e}function Ck(t){for(let i=0;i<t.args.length;i++)if(t.args[i]==="ref=Ref<"){t.args[i+1]="viewRef";break}const e={category:"console",data:{arguments:t.args,logger:"console"},level:yT(t.level),message:pd(t.args," ")};if(t.level==="assert")if(t.args[0]===!1)e.message=`Assertion failed: ${pd(t.args.slice(1)," ")||"console.assert"}`,e.data.arguments=t.args.slice(1);else return;Li().addBreadcrumb(e,{input:t.args,level:t.level})}function Lk(t){const{startTimestamp:e,endTimestamp:i}=t,r=t.xhr[oa];if(!e||!i||!r)return;const{method:a,url:l,status_code:g,body:m}=r,_={method:a,url:l,status_code:g},k={xhr:t.xhr,input:m,startTimestamp:e,endTimestamp:i};Li().addBreadcrumb({category:"xhr",data:_,type:"http"},k)}function Ik(t){const{startTimestamp:e,endTimestamp:i}=t;if(i&&!(t.fetchData.url.match(/sentry_key/)&&t.fetchData.method==="POST"))if(t.error){const r=t.fetchData,a={data:t.error,input:t.args,startTimestamp:e,endTimestamp:i};Li().addBreadcrumb({category:"fetch",data:r,level:"error",type:"http"},a)}else{const r=ri(fe({},t.fetchData),{status_code:t.response&&t.response.status}),a={input:t.args,response:t.response,startTimestamp:e,endTimestamp:i};Li().addBreadcrumb({category:"fetch",data:r,type:"http"},a)}}function Rk(t){let e=t.from,i=t.to;const r=Nl(Kt.location.href);let a=Nl(e);const l=Nl(i);a.path||(a=r),r.protocol===l.protocol&&r.host===l.host&&(i=l.relative),r.protocol===a.protocol&&r.host===a.host&&(e=a.relative),Li().addBreadcrumb({category:"navigation",data:{from:e,to:i}})}function Dk(t){return t&&!!t.target}function Ok(t,{metadata:e,tunnel:i,dsn:r}){const a=fe(fe({event_id:t.event_id,sent_at:new Date().toISOString()},e&&e.sdk&&{sdk:{name:e.sdk.name,version:e.sdk.version}}),!!i&&!!r&&{dsn:eo(r)}),l=Bk(t);return ca(a,[l])}function Bk(t){return[{type:"user_report"},t]}class Mk extends ts{constructor(e){const i=Kt.SENTRY_SDK_SOURCE||cT();e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:`${i}:@sentry/browser`,version:ho}],version:ho},super(e),e.sendClientReports&&Kt.document&&Kt.document.addEventListener("visibilitychange",()=>{Kt.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(e,i){return xk(this._options.stackParser,e,i,this._options.attachStacktrace)}eventFromMessage(e,i="info",r){return Pk(this._options.stackParser,e,i,r,this._options.attachStacktrace)}sendEvent(e,i){const r=this.getIntegrationById(nf);r&&r.addSentryBreadcrumb&&r.addSentryBreadcrumb(e),super.sendEvent(e,i)}captureUserFeedback(e){if(!this._isEnabled()){(typeof __SENTRY_DEBUG__=="undefined"||__SENTRY_DEBUG__)&&ct.warn("SDK not enabled, will not capture user feedback.");return}const i=Ok(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(i)}_prepareEvent(e,i,r){return e.platform=e.platform||"javascript",super._prepareEvent(e,i,r)}_flushOutcomes(){const e=this._clearOutcomes();if(e.length===0){(typeof __SENTRY_DEBUG__=="undefined"||__SENTRY_DEBUG__)&&ct.log("No outcomes to send");return}if(!this._dsn){(typeof __SENTRY_DEBUG__=="undefined"||__SENTRY_DEBUG__)&&ct.log("No dsn provided, will not send outcomes");return}(typeof __SENTRY_DEBUG__=="undefined"||__SENTRY_DEBUG__)&&ct.log("Sending outcomes:",e);const i=wT(e,this._options.tunnel&&eo(this._dsn));this._sendEnvelope(i)}}let ha;function Nk(){if(ha)return ha;if(Dl(Kt.fetch))return ha=Kt.fetch.bind(Kt);const t=Kt.document;let e=Kt.fetch;if(t&&typeof t.createElement=="function")try{const i=t.createElement("iframe");i.hidden=!0,t.head.appendChild(i);const r=i.contentWindow;r&&r.fetch&&(e=r.fetch),t.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 ha=e.bind(Kt)}function Fk(){ha=void 0}function Uk(t,e=Nk()){let i=0,r=0;function a(l){const g=l.body.length;i+=g,r++;const m=fe({body:l.body,method:"POST",referrerPolicy:"origin",headers:t.headers,keepalive:i<=6e4&&r<15},t.fetchOptions);try{return e(t.url,m).then(_=>(i-=g,r--,{statusCode:_.status,headers:{"x-sentry-rate-limits":_.headers.get("X-Sentry-Rate-Limits"),"retry-after":_.headers.get("Retry-After")}}))}catch(_){return Fk(),i-=g,r--,lo(_)}}return Qd(t,a)}const Vk=4;function Wk(t){function e(i){return new rr((r,a)=>{const l=new XMLHttpRequest;l.onerror=a,l.onreadystatechange=()=>{l.readyState===Vk&&r({statusCode:l.status,headers:{"x-sentry-rate-limits":l.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":l.getResponseHeader("Retry-After")}})},l.open("POST",t.url);for(const g in t.headers)Object.prototype.hasOwnProperty.call(t.headers,g)&&l.setRequestHeader(g,t.headers[g]);l.send(i.body)})}return Qd(t,e)}const mo="?",jk=30,Gk=40,zk=50;function Yl(t,e,i,r){const a={filename:t,function:e,in_app:!0};return i!==void 0&&(a.lineno=i),r!==void 0&&(a.colno=r),a}const Hk=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Kk=/\((\S*)(?::(\d+))(?::(\d+))\)/,Yk=[jk,t=>{const e=Hk.exec(t);if(e){if(e[2]&&e[2].indexOf("eval")===0){const l=Kk.exec(e[2]);l&&(e[2]=l[1],e[3]=l[2],e[4]=l[3])}const[r,a]=sf(e[1]||mo,e[2]);return Yl(a,r,e[3]?+e[3]:void 0,e[4]?+e[4]:void 0)}}],qk=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Xk=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Zk=[zk,t=>{const e=qk.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){const l=Xk.exec(e[3]);l&&(e[1]=e[1]||"eval",e[3]=l[1],e[4]=l[2],e[5]="")}let r=e[3],a=e[1]||mo;return[a,r]=sf(a,r),Yl(r,a,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}}],Jk=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,Qk=Ed(...[Yk,Zk,[Gk,t=>{const e=Jk.exec(t);return e?Yl(e[2],e[1]||mo,+e[3],e[4]?+e[4]:void 0):void 0}]]),sf=(t,e)=>{const i=t.indexOf("safari-extension")!==-1,r=t.indexOf("safari-web-extension")!==-1;return i||r?[t.indexOf("@")!==-1?t.split("@")[0]:mo,i?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]};class Mn{static __initStatic(){this.id="GlobalHandlers"}__init(){this.name=Mn.id}__init2(){this._installFunc={onerror:$k,onunhandledrejection:e2}}constructor(e){Mn.prototype.__init.call(this),Mn.prototype.__init2.call(this),this._options=fe({onerror:!0,onunhandledrejection:!0},e)}setupOnce(){Error.stackTraceLimit=50;const e=this._options;for(const i in e){const r=this._installFunc[i];r&&e[i]&&(r2(i),r(),this._installFunc[i]=void 0)}}}Mn.__initStatic();function $k(){Dn("error",t=>{const[e,i,r]=lf();if(!e.getIntegration(Mn))return;const{msg:a,url:l,line:g,column:m,error:_}=t;if(tf()||_&&_.__sentry_own_request__)return;const k=_===void 0&&Qn(a)?i2(a,l,g,m):af(Hl(i,_||a,void 0,r,!1),l,g,m);k.level="error",of(e,_,k,"onerror")})}function e2(){Dn("unhandledrejection",t=>{const[e,i,r]=lf();if(!e.getIntegration(Mn))return;let a=t;try{"reason"in t?a=t.reason:"detail"in t&&"reason"in t.detail&&(a=t.detail.reason)}catch(g){}if(tf()||a&&a.__sentry_own_request__)return!0;const l=hd(a)?t2(a):Hl(i,a,void 0,r,!0);l.level="error",of(e,a,l,"onunhandledrejection")})}function t2(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function i2(t,e,i,r){const a=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let l=dd(t)?t.message:t,g="Error";const m=l.match(a);return m&&(g=m[1],l=m[2]),af({exception:{values:[{type:g,value:l}]}},e,i,r)}function af(t,e,i,r){const a=t.exception=t.exception||{},l=a.values=a.values||[],g=l[0]=l[0]||{},m=g.stacktrace=g.stacktrace||{},_=m.frames=m.frames||[],k=isNaN(parseInt(r,10))?void 0:r,T=isNaN(parseInt(i,10))?void 0:i,w=Qn(e)&&e.length>0?e:BS();return _.length===0&&_.push({colno:k,filename:w,function:"?",in_app:!0,lineno:T}),t}function r2(t){(typeof __SENTRY_DEBUG__=="undefined"||__SENTRY_DEBUG__)&&ct.log(`Global Handler attached: ${t}`)}function of(t,e,i,r){ua(i,{handled:!1,type:r}),t.captureEvent(i,{originalException:e})}function lf(){const t=Li(),e=t.getClient(),i=e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[t,i.stackParser,i.attachStacktrace]}const n2=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"];class ga{static __initStatic(){this.id="TryCatch"}__init(){this.name=ga.id}constructor(e){ga.prototype.__init.call(this),this._options=fe({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},e)}setupOnce(){this._options.setTimeout&&Wi(Kt,"setTimeout",uf),this._options.setInterval&&Wi(Kt,"setInterval",uf),this._options.requestAnimationFrame&&Wi(Kt,"requestAnimationFrame",s2),this._options.XMLHttpRequest&&"XMLHttpRequest"in Kt&&Wi(XMLHttpRequest.prototype,"send",a2);const e=this._options.eventTarget;e&&(Array.isArray(e)?e:n2).forEach(o2)}}ga.__initStatic();function uf(t){return function(...e){const i=e[0];return e[0]=Ds(i,{mechanism:{data:{function:Rn(t)},handled:!0,type:"instrument"}}),t.apply(this,e)}}function s2(t){return function(e){return t.apply(this,[Ds(e,{mechanism:{data:{function:"requestAnimationFrame",handler:Rn(t)},handled:!0,type:"instrument"}})])}}function a2(t){return function(...e){const i=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(a=>{a in i&&typeof i[a]=="function"&&Wi(i,a,function(l){const g={mechanism:{data:{function:a,handler:Rn(l)},handled:!0,type:"instrument"}},m=wl(l);return m&&(g.mechanism.data.handler=Rn(m)),Ds(l,g)})}),t.apply(this,e)}}function o2(t){const e=Kt,i=e[t]&&e[t].prototype;!i||!i.hasOwnProperty||!i.hasOwnProperty("addEventListener")||(Wi(i,"addEventListener",function(r){return function(a,l,g){try{typeof l.handleEvent=="function"&&(l.handleEvent=Ds(l.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Rn(l),target:t},handled:!0,type:"instrument"}}))}catch(m){}return r.apply(this,[a,Ds(l,{mechanism:{data:{function:"addEventListener",handler:Rn(l),target:t},handled:!0,type:"instrument"}}),g])}}),Wi(i,"removeEventListener",function(r){return function(a,l,g){const m=l;try{const _=m&&m.__sentry_wrapped__;_&&r.call(this,a,_,g)}catch(_){}return r.call(this,a,m,g)}}))}const l2="cause",u2=5;class Os{static __initStatic(){this.id="LinkedErrors"}__init(){this.name=Os.id}constructor(e={}){Os.prototype.__init.call(this),this._key=e.key||l2,this._limit=e.limit||u2}setupOnce(){const e=Li().getClient();e&&co((i,r)=>{const a=Li().getIntegration(Os);return a?c2(e.getOptions().stackParser,a._key,a._limit,i,r):i})}}Os.__initStatic();function c2(t,e,i,r,a){if(!r.exception||!r.exception.values||!a||!Cs(a.originalException,Error))return r;const l=cf(t,i,a.originalException,e);return r.exception.values=[...l,...r.exception.values],r}function cf(t,e,i,r,a=[]){if(!Cs(i[r],Error)||a.length+1>=e)return a;const l=rf(t,i[r]);return cf(t,e,i[r],r,[l,...a])}class Bs{constructor(){Bs.prototype.__init.call(this)}static __initStatic(){this.id="HttpContext"}__init(){this.name=Bs.id}setupOnce(){co(e=>{if(Li().getIntegration(Bs)){if(!Kt.navigator&&!Kt.location&&!Kt.document)return e;const i=e.request&&e.request.url||Kt.location&&Kt.location.href,{referrer:r}=Kt.document||{},{userAgent:a}=Kt.navigator||{},l=fe(fe(fe({},e.request&&e.request.headers),r&&{Referer:r}),a&&{"User-Agent":a}),g=ri(fe(fe({},e.request),i&&{url:i}),{headers:l});return ri(fe({},e),{request:g})}return e})}}Bs.__initStatic();class Ms{constructor(){Ms.prototype.__init.call(this)}static __initStatic(){this.id="Dedupe"}__init(){this.name=Ms.id}setupOnce(e,i){const r=a=>{if(a.type)return a;const l=i().getIntegration(Ms);if(l){try{if(d2(a,l._previousEvent))return(typeof __SENTRY_DEBUG__=="undefined"||__SENTRY_DEBUG__)&&ct.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(g){return l._previousEvent=a}return l._previousEvent=a}return a};r.id=this.name,e(r)}}Ms.__initStatic();function d2(t,e){return e?!!(f2(t,e)||h2(t,e)):!1}function f2(t,e){const i=t.message,r=e.message;return!(!i&&!r||i&&!r||!i&&r||i!==r||!ff(t,e)||!df(t,e))}function h2(t,e){const i=hf(e),r=hf(t);return!(!i||!r||i.type!==r.type||i.value!==r.value||!ff(t,e)||!df(t,e))}function df(t,e){let i=gf(t),r=gf(e);if(!i&&!r)return!0;if(i&&!r||!i&&r||(i=i,r=r,r.length!==i.length))return!1;for(let a=0;a<r.length;a++){const l=r[a],g=i[a];if(l.filename!==g.filename||l.lineno!==g.lineno||l.colno!==g.colno||l.function!==g.function)return!1}return!0}function ff(t,e){let i=t.fingerprint,r=e.fingerprint;if(!i&&!r)return!0;if(i&&!r||!i&&r)return!1;i=i,r=r;try{return i.join("")===r.join("")}catch(a){return!1}}function hf(t){return t.exception&&t.exception.values&&t.exception.values[0]}function gf(t){const e=t.exception;if(e)try{return e.values[0].stacktrace.frames}catch(i){return}}const g2=[new Rs,new da,new ga,new fa,new Mn,new Os,new Ms,new Bs];function v2(t={}){t.defaultIntegrations===void 0&&(t.defaultIntegrations=g2),t.release===void 0&&(typeof __SENTRY_RELEASE__=="string"&&(t.release=__SENTRY_RELEASE__),Kt.SENTRY_RELEASE&&Kt.SENTRY_RELEASE.id&&(t.release=Kt.SENTRY_RELEASE.id)),t.autoSessionTracking===void 0&&(t.autoSessionTracking=!0),t.sendClientReports===void 0&&(t.sendClientReports=!0);const e=ri(fe({},t),{stackParser:KS(t.stackParser||Qk),integrations:JT(t),transport:t.transport||(Ad()?Uk:Wk)});lk(Mk,e),t.autoSessionTracking&&m2()}function vf(t){t.startSession({ignoreDuration:!0}),t.captureSession()}function m2(){if(typeof Kt.document=="undefined"){(typeof __SENTRY_DEBUG__=="undefined"||__SENTRY_DEBUG__)&&ct.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}const t=Li();t.captureSession&&(vf(t),Dn("history",({from:e,to:i})=>{e===void 0||e===i||vf(Li())}))}function p2(t){t._metadata=t._metadata||{},t._metadata.sdk=t._metadata.sdk||{name:"sentry.javascript.svelte",packages:[{name:"npm:@sentry/svelte",version:ho}],version:ho},v2(t),_2()}function _2(){let t;const e=i=>(t===void 0&&(t=y2()),t&&(i.modules=fe({svelteKit:"latest"},i.modules)),i);e.id="svelteKitProcessor",co(e)}function y2(){return MS("div#svelte-announcer")!==null}let mf=!1;const b2=({captureErrors:t})=>{if(!(t!==!1)||mf)return;mf=!0;const i=pf(new Error),r=i==null?void 0:i.match(/initializeSentry/);p2(ri(fe({},i?{}:{defaultIntegrations:!1}),{dsn:"https://ea2f0f2a070b4934994dc8543b8d16e1@o271781.ingest.sentry.io/4504853792882688",environment:r?"development":"production",release:tl,beforeSend(l,{originalException:g}){var w;const _=pf(g)===i,k=(w=g==null?void 0:g.message)==null?void 0:w.match(/request was interrupted/);if(r||_||k)return S2(l)}})),!i&&Hd(new Error(["Unable to determine the filename of the BeyondWords player script.","We therefore can't filter errors to only those originating from the player.","To avoid receiving unrelated errors from publishers, Sentry has been disabled."].join(`
|
|
90
|
-
`)))},pf=t=>{var e;return(e=ad((t==null?void 0:t.stack)||"")[0])==null?void 0:e.file},S2=t=>{var i,r;const e=((r=(i=window.BeyondWords)==null?void 0:i.Player)==null?void 0:r.instances())||[];for(const[a,l]of e.entries()){const g=`BeyondWords.Player.instances()[${a}]`;t.contexts=t.contexts||{},t.contexts[g]=ia(l)}return t};let _f=!1;const T2=()=>{_f||(_f=!0,addEventListener("mousedown",k2),addEventListener("click",E2),addEventListener("mousemove",A2))},k2=t=>{Sf=t.pageX,Tf=t.pageY},E2=t=>{var i;if(t.defaultPrevented||x2(t)||t.button!==0)return;const e=(i=yf(t.target))==null?void 0:i.getAttribute(In);if(e)for(const r of BeyondWords.Player.instances()){const{segment:a,contentIndex:l,segmentIndex:g}=bf(r,e);a&&r.onEvent(Je({type:"PressedSegment",description:"The user pressed on a segment in the article.",initiatedBy:"user",emittedFrom:"segment",segment:a,contentIndex:l,segmentIndex:g}))}},A2=t=>{var r;const e=document.elementFromPoint(t.clientX,t.clientY),i=(r=yf(e))==null?void 0:r.getAttribute(In);for(const[a,l]of BeyondWords.Player.instances().entries()){const{segment:g,contentIndex:m,segmentIndex:_}=bf(l,i);P2(a,m,_)&&l.onEvent(Je({type:"HoveredSegmentUpdated",description:"The user hovered over a different segment in the article.",initiatedBy:"user",emittedFrom:"segment",segment:g,contentIndex:m,segmentIndex:_}))}},yf=t=>{for(;t&&t.hasAttribute;){if(t.hasAttribute(In))return t;if(t.onclick||t.onmousedown||t.nodeName.toLowerCase()==="a")return;t=t.parentNode}},bf=(t,e)=>{if(!e)return{};let i={},r=-1/0;for(const[a,l]of(t.content||[]).entries())for(const[g,m]of(l.segments||[]).entries()){if(e!==m.marker)continue;const _=t.contentIndex===a?1:0;_<r||_===r&&(i!=null&&i.segment)||(i={contentIndex:a,segmentIndex:g,segment:m},r=_)}return i};let Sf,Tf;const x2=t=>{const e=t.pageX-Sf,i=t.pageY-Tf;return Math.sqrt(e*e+i*i)>5},po={},P2=(t,e,i)=>{po[t]||(po[t]={});const r=po[t];return r.contentIndex===e&&r.segmentIndex===i?!1:(r.contentIndex=e,r.segmentIndex=i,!0)};class ql{constructor(e){this.analyticsSink=e}sendToCustomAnalytics(e){return db(this.analyticsSink,e)}sendToGoogleAnalytics(e,i){window.gtag("event",e,ri(fe({},i),{send_to:this.analyticsSink}))}}const w2=(t,e)=>{const i=C2(t,e.type);if(!i)return;const r=L2(t,i);yg(r),t.analyticsUrl&&t.analyticsConsent!=="none"&&new ql(t.analyticsUrl).sendToCustomAnalytics(r),t.analyticsCustomUrl&&t.analyticsConsent!=="none"&&new ql(t.analyticsCustomUrl).sendToCustomAnalytics(r),t.analyticsTag&&new ql(t.analyticsTag).sendToGoogleAnalytics(I2(r),r)},C2=(t,e)=>{if(!t.listenSessionId&&t.duration)return"load";if(e==="PlaybackPlaying"&&R2(t)&&(t.isNewListen=!0),e==="CurrentTimeUpdated"&&t.isNewListen)return t.isNewListen=!1,"play";if(e==="CurrentTimeUpdated"&&D2(t))return"play_progress";if(e.startsWith("PressedAdvert"))return"ad_link_click"},L2=(t,e)=>{var g;t.listenSessionId||(t.listenSessionId=Ma()),t.sessionCreatedAt||(t.sessionCreatedAt=Date.now());const i=
|
|
90
|
+
`)))},pf=t=>{var e;return(e=ad((t==null?void 0:t.stack)||"")[0])==null?void 0:e.file},S2=t=>{var i,r;const e=((r=(i=window.BeyondWords)==null?void 0:i.Player)==null?void 0:r.instances())||[];for(const[a,l]of e.entries()){const g=`BeyondWords.Player.instances()[${a}]`;t.contexts=t.contexts||{},t.contexts[g]=ia(l)}return t};let _f=!1;const T2=()=>{_f||(_f=!0,addEventListener("mousedown",k2),addEventListener("click",E2),addEventListener("mousemove",A2))},k2=t=>{Sf=t.pageX,Tf=t.pageY},E2=t=>{var i;if(t.defaultPrevented||x2(t)||t.button!==0)return;const e=(i=yf(t.target))==null?void 0:i.getAttribute(In);if(e)for(const r of BeyondWords.Player.instances()){const{segment:a,contentIndex:l,segmentIndex:g}=bf(r,e);a&&r.onEvent(Je({type:"PressedSegment",description:"The user pressed on a segment in the article.",initiatedBy:"user",emittedFrom:"segment",segment:a,contentIndex:l,segmentIndex:g}))}},A2=t=>{var r;const e=document.elementFromPoint(t.clientX,t.clientY),i=(r=yf(e))==null?void 0:r.getAttribute(In);for(const[a,l]of BeyondWords.Player.instances().entries()){const{segment:g,contentIndex:m,segmentIndex:_}=bf(l,i);P2(a,m,_)&&l.onEvent(Je({type:"HoveredSegmentUpdated",description:"The user hovered over a different segment in the article.",initiatedBy:"user",emittedFrom:"segment",segment:g,contentIndex:m,segmentIndex:_}))}},yf=t=>{for(;t&&t.hasAttribute;){if(t.hasAttribute(In))return t;if(t.onclick||t.onmousedown||t.nodeName.toLowerCase()==="a")return;t=t.parentNode}},bf=(t,e)=>{if(!e)return{};let i={},r=-1/0;for(const[a,l]of(t.content||[]).entries())for(const[g,m]of(l.segments||[]).entries()){if(e!==m.marker)continue;const _=t.contentIndex===a?1:0;_<r||_===r&&(i!=null&&i.segment)||(i={contentIndex:a,segmentIndex:g,segment:m},r=_)}return i};let Sf,Tf;const x2=t=>{const e=t.pageX-Sf,i=t.pageY-Tf;return Math.sqrt(e*e+i*i)>5},po={},P2=(t,e,i)=>{po[t]||(po[t]={});const r=po[t];return r.contentIndex===e&&r.segmentIndex===i?!1:(r.contentIndex=e,r.segmentIndex=i,!0)};class ql{constructor(e){this.analyticsSink=e}sendToCustomAnalytics(e){return db(this.analyticsSink,e)}sendToGoogleAnalytics(e,i){window.gtag("event",e,ri(fe({},i),{send_to:this.analyticsSink}))}}const w2=(t,e)=>{const i=C2(t,e.type);if(!i)return;const r=L2(t,i);yg(r),t.analyticsUrl&&t.analyticsConsent!=="none"&&new ql(t.analyticsUrl).sendToCustomAnalytics(r),t.analyticsCustomUrl&&t.analyticsConsent!=="none"&&new ql(t.analyticsCustomUrl).sendToCustomAnalytics(r),t.analyticsTag&&new ql(t.analyticsTag).sendToGoogleAnalytics(I2(r),r)},C2=(t,e)=>{if(!t.listenSessionId&&t.duration)return"load";if(e==="PlaybackPlaying"&&R2(t)&&(t.isNewListen=!0),e==="CurrentTimeUpdated"&&t.isNewListen)return t.isNewListen=!1,"play";if(e==="CurrentTimeUpdated"&&D2(t))return"play_progress";if(e.startsWith("PressedAdvert"))return"ad_link_click"},L2=(t,e)=>{var g;t.listenSessionId||(t.listenSessionId=Ma()),t.sessionCreatedAt||(t.sessionCreatedAt=Date.now());const i=["without-local-storage","none"].includes(t.analyticsConsent);i||localStorage.beyondwords||(localStorage.beyondwords=JSON.stringify(Ma()));const r=t.adverts[t.advertIndex],a=t.content[t.contentIndex],l=t.currentTime/t.duration*100;return{event_type:e,device_type:O2(),media_type:r?"ad":"content",project_id:t.projectId,content_id:a==null?void 0:a.id,source_id:a==null?void 0:a.sourceId,analytics_id:t.analyticsId,ad_id:r==null?void 0:r.id,media_id:(g=t.loadedMedia)==null?void 0:g.id,local_storage_id:i?null:JSON.parse(localStorage.beyondwords),listen_session_id:t.listenSessionId,session_created_at:t.sessionCreatedAt,duration:t.duration,listen_length_seconds:t.currentTime,listen_length_percent:Math.max(0,Math.min(100,l)),speed:t.playbackRate,location:window.location.href,referrer:document.referrer,player_version:"1",player_npm_version:tl}},I2=({event_type:t,listen_length_percent:e})=>{const i=Math.floor(e/10)*10;if(t==="load")return"Load";if(t==="play")return"Play";if(t==="play_progress"&&i===100)return"Complete";if(t==="play_progress")return`${i}% listened`;if(t==="ad_link_click")return"Advert Click"},R2=t=>{var r,a;let e=!1;if(t.advertIndex!==-1){const l=((r=t.adverts[t.advertIndex])==null?void 0:r.id)||t.advertIndex;e=l!==t.prevAdvertId,t.prevAdvertId=l}else{const l=((a=t.content[t.contentIndex])==null?void 0:a.id)||t.contentIndex;e=l!==t.prevContentId,t.prevContentId=l}return e},D2=t=>{if(t.introsOutrosIndex!==-1)return;const e=t.prevPercentage+10,i=t.currentTime/t.duration*100;if(i>=e)return t.prevPercentage=Math.floor(i/10)*10,!0},O2=()=>kf(499)?"phone":kf(999)?"tablet":"desktop",kf=t=>window.matchMedia&&window.matchMedia(`only screen and (max-device-width: ${t}px)`).matches,Fn=class extends Rb{constructor(r){var a=r,{target:e}=a,i=pu(a,["target"]);PS(),xS(i),b2(i),T2();const{newTarget:l,showUserInterface:g}=kb(e);l.classList.add("beyondwords-player","bwp");const m=new hS(null,Fn);m.addEventListener("<any>",k=>w2(this,k));const _=fe({showUserInterface:g},i);super({target:l,props:ri(fe({controller:m},_),{initialProps:_})}),m.player=this,jr(Fn,Nn).push(this)}static get version(){return tl}static instances(){return[...jr(Fn,Nn)]}static destroyAll(){jr(Fn,Nn).forEach(e=>e.destroy())}destroy(){this.$destroy(),ph(Fn,Nn,jr(Fn,Nn).filter(e=>e!==this))}get target(){return this.$$.root}set target(e){ir(["Unable to change the player's target after initialization.","Call player.destroy() and initialize a new player, instead.","","Alternatively, you can show or hide the player with:","player.showUserInterface = <bool>"])}};let va=Fn;return Nn=new WeakMap,ht(va,Nn,[]),typeof window!="undefined"&&(window.BeyondWords||(window.BeyondWords={}),(Ef=window.BeyondWords).Player||(Ef.Player=va)),{Player:va}});
|
|
91
91
|
//# sourceMappingURL=umd.js.map
|