diff --git a/package-lock.json b/package-lock.json index 0e4b5b32..c76db964 100644 --- a/package-lock.json +++ b/package-lock.json @@ -37470,12 +37470,12 @@ }, "packages/ngx-web-component": { "name": "@readalongs/ngx-web-component", - "version": "1.5.2", + "version": "1.5.3", "license": "MIT", "peerDependencies": { "@angular/common": "^19", "@angular/core": "^19", - "@readalongs/web-component": "1.5.2" + "@readalongs/web-component": "1.5.3" } }, "packages/studio-web": { @@ -37488,7 +37488,7 @@ }, "packages/web-component": { "name": "@readalongs/web-component", - "version": "1.5.2", + "version": "1.5.3", "license": "MIT", "dependencies": { "audio-recorder-polyfill": "^0.4.1", diff --git a/packages/ngx-web-component/package.json b/packages/ngx-web-component/package.json index 99767148..ac11bba2 100644 --- a/packages/ngx-web-component/package.json +++ b/packages/ngx-web-component/package.json @@ -2,12 +2,12 @@ "name": "@readalongs/ngx-web-component", "type": "module", "license": "MIT", - "version": "1.5.2", + "version": "1.5.3", "private": false, "peerDependencies": { "@angular/core": "^19", "@angular/common": "^19", - "@readalongs/web-component": "1.5.2" + "@readalongs/web-component": "1.5.3" }, "nx": { "implicitDependencies": [ diff --git a/packages/studio-web/package.json b/packages/studio-web/package.json index 5fedd84f..e4863d3a 100644 --- a/packages/studio-web/package.json +++ b/packages/studio-web/package.json @@ -15,8 +15,8 @@ "e2e-ui": "playwright test --ui" }, "private": true, - "singleFileBundleVersion": "1.5.2", - "singleFileBundleTimestamp": "2024-11-18+11-19-49", + "singleFileBundleVersion": "1.5.3", + "singleFileBundleTimestamp": "2025-07-21+10-17-17", "dependencies": { "readalong-studio": "file:" } diff --git a/packages/studio-web/src/assets/bundle.js b/packages/studio-web/src/assets/bundle.js index 5f5e140b..fed26d41 100644 --- a/packages/studio-web/src/assets/bundle.js +++ b/packages/studio-web/src/assets/bundle.js @@ -1,4 +1,4 @@ -(()=>{var e={102:(e,t,r)=>{"use strict";r.d(t,{F:()=>xe,b:()=>Pe,g:()=>B,h:()=>I,p:()=>v,r:()=>a});const n={hydratedSelectorName:"hydrated",lazyLoad:!0,updatable:!0};var o=Object.defineProperty,i=e=>{if(e.__stencil__getHostRef)return e.__stencil__getHostRef()},a=(e,t)=>{e.__stencil__getHostRef=()=>t,t.$lazyInstance$=e},u=(e,t)=>t in e,s=(e,t)=>(0,console.error)(e,t),l=new Map,c=new Map,d="slot-fb{display:contents}slot-fb[hidden]{display:none}",f="http://www.w3.org/1999/xlink",p="undefined"!=typeof window?window:{},h={$flags$:0,$resourcesUrl$:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,r,n)=>e.addEventListener(t,r,n),rel:(e,t,r,n)=>e.removeEventListener(t,r,n),ce:(e,t)=>new CustomEvent(e,t)},b=(()=>{var e;let t=!1;try{null==(e=p.document)||e.addEventListener("e",null,Object.defineProperty({},"passive",{get(){t=!0}}))}catch(e){}return t})(),v=e=>Promise.resolve(e),m=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),g=!1,_=[],y=[],w=(e,t)=>r=>{e.push(r),g||(g=!0,t&&4&h.$flags$?P(S):h.raf(S))},O=e=>{for(let t=0;t{O(_),O(y),(g=_.length>0)&&h.raf(S)},P=e=>v().then(e),x=w(y,!0),j=e=>"object"===(e=typeof e)||"function"===e;function A(e){var t,r,n;return null!=(n=null==(r=null==(t=e.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:r.getAttribute("content"))?n:void 0}((e,t)=>{for(var r in t)o(e,r,{get:t[r],enumerable:!0})})({},{err:()=>T,map:()=>k,ok:()=>$,unwrap:()=>E,unwrapErr:()=>M});var $=e=>({isOk:!0,isErr:!1,value:e}),T=e=>({isOk:!1,isErr:!0,value:e});function k(e,t){if(e.isOk){const r=t(e.value);return r instanceof Promise?r.then((e=>$(e))):$(r)}if(e.isErr){const t=e.value;return T(t)}throw"should never get here"}var E=e=>{if(e.isOk)return e.value;throw e.value},M=e=>{if(e.isErr)return e.value;throw e.value},I=(e,t,...r)=>{let n=null,o=null,i=!1,a=!1;const u=[],s=t=>{for(let r=0;re[t])).join(" "))}}if("function"==typeof e)return e(null===t?{}:t,u,L);const l=F(e,null);return l.$attrs$=t,u.length>0&&(l.$children$=u),l.$key$=o,l},F=(e,t)=>{const r={$flags$:0,$tag$:e,$text$:t,$elm$:null,$children$:null,$attrs$:null,$key$:null};return r},C={},L={forEach:(e,t)=>e.map(R).forEach(t),map:(e,t)=>e.map(R).map(t).map(N)},R=e=>({vattrs:e.$attrs$,vchildren:e.$children$,vkey:e.$key$,vname:e.$name$,vtag:e.$tag$,vtext:e.$text$}),N=e=>{if("function"==typeof e.vtag){const t={...e.vattrs};return e.vkey&&(t.key=e.vkey),e.vname&&(t.name=e.vname),I(e.vtag,t,...e.vchildren||[])}const t=F(e.vtag,e.vtext);return t.$attrs$=e.vattrs,t.$children$=e.vchildren,t.$key$=e.vkey,t.$name$=e.vname,t},W=e=>{const t=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${t}))(${t}\\b)`,"g")};W("::slotted"),W(":host"),W(":host-context");var z,D=(e,t)=>null==e||j(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?"string"==typeof e?parseFloat(e):"number"==typeof e?e:NaN:1&t?String(e):e,B=e=>i(e).$hostElement$,q=new WeakMap,V=e=>{const t=e.$cmpMeta$,r=e.$hostElement$,n=t.$flags$,o=(t.$tagName$,()=>{}),i=((e,t)=>{var r;const n=U(t),o=c.get(n);if(!p.document)return n;if(e=11===e.nodeType?e:p.document,o)if("string"==typeof o){e=e.head||e;let i,a=q.get(e);if(a||q.set(e,a=new Set),!a.has(n)){{i=document.querySelector(`[sty-id="${n}"]`)||p.document.createElement("style"),i.innerHTML=o;const a=null!=(r=h.$nonce$)?r:A(p.document);if(null!=a&&i.setAttribute("nonce",a),!(1&t.$flags$))if("HEAD"===e.nodeName){const t=e.querySelectorAll("link[rel=preconnect]"),r=t.length>0?t[t.length-1].nextSibling:e.querySelector("style");e.insertBefore(i,(null==r?void 0:r.parentNode)===e?r:null)}else if("host"in e)if(m){const t=new CSSStyleSheet;t.replaceSync(o),e.adoptedStyleSheets=[t,...e.adoptedStyleSheets]}else{const t=e.querySelector("style");t?t.innerHTML=o+t.innerHTML:e.prepend(i)}else e.append(i);1&t.$flags$&&e.insertBefore(i,null)}4&t.$flags$&&(i.innerHTML+=d),a&&a.add(n)}}else e.adoptedStyleSheets.includes(o)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]);return n})(r.shadowRoot?r.shadowRoot:r.getRootNode(),t);10&n&&(r["s-sc"]=i,r.classList.add(i+"-h")),o()},U=(e,t)=>"sc-"+e.$tagName$,H=(e,t,r,n,o,i,a)=>{if(r===n)return;let s=u(e,t),l=t.toLowerCase();if("class"===t){const t=e.classList,o=Y(r);let i=Y(n);t.remove(...o.filter((e=>e&&!i.includes(e)))),t.add(...i.filter((e=>e&&!o.includes(e))))}else if("style"===t){for(const t in r)n&&null!=n[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in n)r&&n[t]===r[t]||(t.includes("-")?e.style.setProperty(t,n[t]):e.style[t]=n[t])}else if("key"===t);else if("ref"===t)n&&n(e);else if(s||"o"!==t[0]||"n"!==t[1]){const a=j(n);if(s||a&&null!==n)try{if(e.tagName.includes("-"))e[t]!==n&&(e[t]=n);else{const o=null==n?"":n;"list"===t?s=!1:null!=r&&e[t]==o||("function"==typeof e.__lookupSetter__(t)?e[t]=o:e.setAttribute(t,o))}}catch(e){}let u=!1;l!==(l=l.replace(/^xlink\:?/,""))&&(t=l,u=!0),null==n||!1===n?!1===n&&""!==e.getAttribute(t)||(u?e.removeAttributeNS(f,t):e.removeAttribute(t)):(!s||4&i||o)&&!a&&1===e.nodeType&&(n=!0===n?"":n,u?e.setAttributeNS(f,t,n):e.setAttribute(t,n))}else if(t="-"===t[2]?t.slice(3):u(p,l)?l.slice(2):l[2]+t.slice(3),r||n){const o=t.endsWith(X);t=t.replace(Q,""),r&&h.rel(e,t,r,o),n&&h.ael(e,t,n,o)}},G=/\s/,Y=e=>("object"==typeof e&&e&&"baseVal"in e&&(e=e.baseVal),e&&"string"==typeof e?e.split(G):[]),X="Capture",Q=new RegExp(X+"$"),K=(e,t,r,n)=>{const o=11===t.$elm$.nodeType&&t.$elm$.host?t.$elm$.host:t.$elm$,i=e&&e.$attrs$||{},a=t.$attrs$||{};for(const e of Z(Object.keys(i)))e in a||H(o,e,i[e],void 0,r,t.$flags$);for(const e of Z(Object.keys(a)))H(o,e,i[e],a[e],r,t.$flags$)};function Z(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var J=!1,ee=(e,t,r)=>{const n=t.$children$[r];let o,i,a=0;if(null!==n.$text$)o=n.$elm$=p.document.createTextNode(n.$text$);else{if(!p.document)throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component.");if(o=n.$elm$=p.document.createElement(n.$tag$),K(null,n,J),n.$children$)for(a=0;a{let a,u=e;for(u.shadowRoot&&u.tagName===z&&(u=u.shadowRoot);o<=i;++o)n[o]&&(a=ee(null,r,o),a&&(n[o].$elm$=a,ae(u,a,t)))},re=(e,t,r)=>{for(let n=t;n<=r;++n){const t=e[n];if(t){const e=t.$elm$;ie(t),e&&e.remove()}}},ne=(e,t,r=!1)=>e.$tag$===t.$tag$&&(r?(r&&!e.$key$&&t.$key$&&(e.$key$=t.$key$),!0):e.$key$===t.$key$),oe=(e,t,r=!1)=>{const o=t.$elm$=e.$elm$,i=e.$children$,a=t.$children$,u=t.$text$;null===u?(K(e,t,J),null!==i&&null!==a?((e,t,r,n,o=!1)=>{let i,a,u=0,s=0,l=0,c=0,d=t.length-1,f=t[0],p=t[d],h=n.length-1,b=n[0],v=n[h];for(;u<=d&&s<=h;)if(null==f)f=t[++u];else if(null==p)p=t[--d];else if(null==b)b=n[++s];else if(null==v)v=n[--h];else if(ne(f,b,o))oe(f,b,o),f=t[++u],b=n[++s];else if(ne(p,v,o))oe(p,v,o),p=t[--d],v=n[--h];else if(ne(f,v,o))oe(f,v,o),ae(e,f.$elm$,p.$elm$.nextSibling),f=t[++u],v=n[--h];else if(ne(p,b,o))oe(p,b,o),ae(e,p.$elm$,f.$elm$),p=t[--d],b=n[++s];else{for(l=-1,c=u;c<=d;++c)if(t[c]&&null!==t[c].$key$&&t[c].$key$===b.$key$){l=c;break}l>=0?(a=t[l],a.$tag$!==b.$tag$?i=ee(t&&t[s],r,l):(oe(a,b,o),t[l]=void 0,i=a.$elm$),b=n[++s]):(i=ee(t&&t[s],r,s),b=n[++s]),i&&ae(f.$elm$.parentNode,i,f.$elm$)}u>d?te(e,null==n[h+1]?null:n[h+1].$elm$,r,n,s,h):s>h&&re(t,u,d)})(o,i,t,a,r):null!==a?(null!==e.$text$&&(o.textContent=""),te(o,null,t,a,0,a.length-1)):!r&&n.updatable&&null!==i&&re(i,0,i.length-1)):e.$text$!==u&&(o.data=u)},ie=e=>{e.$attrs$&&e.$attrs$.ref&&e.$attrs$.ref(null),e.$children$&&e.$children$.map(ie)},ae=(e,t,r)=>null==e?void 0:e.insertBefore(t,r),ue=(e,t,r=!1)=>{const n=e.$hostElement$,o=e.$cmpMeta$,i=e.$vnode$||F(null,null);var a;const u=(a=t)&&a.$tag$===C?t:I(null,null,t);if(z=n.tagName,o.$attrsToReflect$&&(u.$attrs$=u.$attrs$||{},o.$attrsToReflect$.map((([e,t])=>u.$attrs$[t]=n[e]))),r&&u.$attrs$)for(const e of Object.keys(u.$attrs$))n.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(u.$attrs$[e]=n[e]);u.$tag$=null,u.$flags$|=4,e.$vnode$=u,u.$elm$=i.$elm$=n.shadowRoot||n,oe(i,u,r)},se=(e,t)=>{if(t&&!e.$onRenderResolve$&&t["s-p"]){const r=t["s-p"].push(new Promise((n=>e.$onRenderResolve$=()=>{t["s-p"].splice(r-1,1),n()})))}},le=(e,t)=>{if(e.$flags$|=16,4&e.$flags$)return void(e.$flags$|=512);se(e,e.$ancestorComponent$);return x((()=>ce(e,t)))},ce=(e,t)=>{const r=e.$hostElement$,n=(e.$cmpMeta$.$tagName$,()=>{}),o=e.$lazyInstance$;if(!o)throw new Error(`Can't render component <${r.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let i;return t?(e.$flags$|=256,e.$queuedListeners$&&(e.$queuedListeners$.map((([e,t])=>me(o,e,t,r))),e.$queuedListeners$=void 0),i=me(o,"componentWillLoad",void 0,r)):i=me(o,"componentWillUpdate",void 0,r),i=de(i,(()=>me(o,"componentWillRender",void 0,r))),n(),de(i,(()=>pe(e,o,t)))},de=(e,t)=>fe(e)?e.then(t).catch((e=>{console.error(e),t()})):t(),fe=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,pe=async(e,t,r)=>{var n;const o=e.$hostElement$,i=(e.$cmpMeta$.$tagName$,()=>{}),a=o["s-rc"];r&&V(e);const u=(e.$cmpMeta$.$tagName$,()=>{});he(e,t,o,r),a&&(a.map((e=>e())),o["s-rc"]=void 0),u(),i();{const t=null!=(n=o["s-p"])?n:[],r=()=>be(e);0===t.length?r():(Promise.all(t).then(r),e.$flags$|=4,t.length=0)}},he=(e,t,r,n)=>{try{t=t.render(),e.$flags$&=-17,e.$flags$|=2,ue(e,t,n)}catch(t){s(t,e.$hostElement$)}return null},be=e=>{e.$cmpMeta$.$tagName$;const t=e.$hostElement$,r=()=>{},n=e.$lazyInstance$,o=e.$ancestorComponent$;me(n,"componentDidRender",void 0,t),64&e.$flags$?(me(n,"componentDidUpdate",void 0,t),r()):(e.$flags$|=64,ge(t),me(n,"componentDidLoad",void 0,t),r(),e.$onReadyResolve$(t),o||ve()),e.$onInstanceResolve$(t),e.$onRenderResolve$&&(e.$onRenderResolve$(),e.$onRenderResolve$=void 0),512&e.$flags$&&P((()=>le(e,!1))),e.$flags$&=-517},ve=e=>{P((()=>((e,t,r)=>{const n=h.ce(t,r);return e.dispatchEvent(n),n})(p,"appload",{detail:{namespace:"web-component"}})))},me=(e,t,r,n)=>{if(e&&e[t])try{return e[t](r)}catch(e){s(e,n)}},ge=e=>{var t;return e.classList.add(null!=(t=n.hydratedSelectorName)?t:"hydrated")},_e=(e,t,r,n)=>{const o=i(e);if(!o)throw new Error(`Couldn't find host element for "${n.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`);const a=o.$hostElement$,u=o.$instanceValues$.get(t),l=o.$flags$,c=o.$lazyInstance$;r=D(r,n.$members$[t][0]);const d=Number.isNaN(u)&&Number.isNaN(r);if((!(8&l)||void 0===u)&&(r!==u&&!d)&&(o.$instanceValues$.set(t,r),c)){if(n.$watchers$&&128&l){const e=n.$watchers$[t];e&&e.map((e=>{try{c[e](r,u,t)}catch(e){s(e,a)}}))}if(2==(18&l)){if(c.componentShouldUpdate&&!1===c.componentShouldUpdate(r,u,t))return;le(o,!1)}}},ye=(e,t,r)=>{var o,a;const u=e.prototype;if(t.$members$||t.$watchers$||e.watchers){e.watchers&&!t.$watchers$&&(t.$watchers$=e.watchers);const s=Object.entries(null!=(o=t.$members$)?o:{});if(s.map((([e,[n]])=>{if(31&n||2&r&&32&n){const{get:o,set:a}=Object.getOwnPropertyDescriptor(u,e)||{};o&&(t.$members$[e][0]|=2048),a&&(t.$members$[e][0]|=4096),(1&r||!o)&&Object.defineProperty(u,e,{get(){{if(!(2048&t.$members$[e][0]))return((e,t)=>i(e).$instanceValues$.get(t))(this,e);const r=i(this),n=r?r.$lazyInstance$:u;if(!n)return;return n[e]}},configurable:!0,enumerable:!0}),Object.defineProperty(u,e,{set(o){const u=i(this);if(a){const r=32&n?this[e]:u.$hostElement$[e];return void 0===r&&u.$instanceValues$.get(e)?o=u.$instanceValues$.get(e):!u.$instanceValues$.get(e)&&r&&u.$instanceValues$.set(e,r),a.apply(this,[D(o,n)]),o=32&n?this[e]:u.$hostElement$[e],void _e(this,e,o,t)}{if(!(1&r&&4096&t.$members$[e][0]))return _e(this,e,o,t),void(1&r&&!u.$lazyInstance$&&u.$onReadyPromise$.then((()=>{4096&t.$members$[e][0]&&u.$lazyInstance$[e]!==u.$instanceValues$.get(e)&&(u.$lazyInstance$[e]=o)})));const i=()=>{const r=u.$lazyInstance$[e];!u.$instanceValues$.get(e)&&r&&u.$instanceValues$.set(e,r),u.$lazyInstance$[e]=D(o,n),_e(this,e,u.$lazyInstance$[e],t)};u.$lazyInstance$?i():u.$onReadyPromise$.then((()=>i()))}}})}else 1&r&&64&n&&Object.defineProperty(u,e,{value(...t){var r;const n=i(this);return null==(r=null==n?void 0:n.$onInstancePromise$)?void 0:r.then((()=>{var r;return null==(r=n.$lazyInstance$)?void 0:r[e](...t)}))}})})),1&r){const r=new Map;u.attributeChangedCallback=function(e,o,a){h.jmp((()=>{var s;const l=r.get(e);if(this.hasOwnProperty(l)&&n.lazyLoad)a=this[l],delete this[l];else{if(u.hasOwnProperty(l)&&"number"==typeof this[l]&&this[l]==a)return;if(null==l){const r=i(this),n=null==r?void 0:r.$flags$;if(n&&!(8&n)&&128&n&&a!==o){const n=r.$lazyInstance$,i=null==(s=t.$watchers$)?void 0:s[e];null==i||i.forEach((t=>{null!=n[t]&&n[t].call(n,a,o,e)}))}return}}const c=Object.getOwnPropertyDescriptor(u,l);(a=(null!==a||"boolean"!=typeof this[l])&&a)===this[l]||c.get&&!c.set||(this[l]=a)}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(a=t.$watchers$)?a:{}),...s.filter((([e,t])=>15&t[0])).map((([e,n])=>{var o;const i=n[1]||e;return r.set(i,e),512&n[0]&&(null==(o=t.$attrsToReflect$)||o.push([e,i])),i}))]))}}return e},we=async(e,t,o,i)=>{let a;if(!(32&t.$flags$)){t.$flags$|=32;if(o.$lazyBundleId$){const i=((e,t,o)=>{const i=e.$tagName$.replace(/-/g,"_"),a=e.$lazyBundleId$;if(!a)return;const u=l.get(a);if(u)return u[i];if(!o||!n.hotModuleReplacement){const e=e=>(l.set(a,e),e[i]);if("read-along"===a)return Promise.resolve().then(r.bind(r,665)).then(e,s)}return r(923)(`./${a}.entry.js`).then((e=>(l.set(a,e),e[i])),(e=>{s(e,t.$hostElement$)}))})(o,t);if(i&&"then"in i){const e=()=>{};a=await i,e()}else a=i;if(!a)throw new Error(`Constructor for "${o.$tagName$}#${t.$modeName$}" was not found`);a.isProxied||(o.$watchers$=a.watchers,ye(a,o,2),a.isProxied=!0);const u=(o.$tagName$,()=>{});t.$flags$|=8;try{new a(t)}catch(t){s(t,e)}t.$flags$&=-9,t.$flags$|=128,u(),Oe(t.$lazyInstance$,e)}else{a=e.constructor;const r=e.localName;customElements.whenDefined(r).then((()=>t.$flags$|=128))}if(a&&a.style){let e;"string"==typeof a.style&&(e=a.style);const t=U(o);if(!c.has(t)){const r=(o.$tagName$,()=>{});((e,t,r)=>{let n=c.get(e);m&&r?(n=n||new CSSStyleSheet,"string"==typeof n?n=t:n.replaceSync(t)):n=t,c.set(e,n)})(t,e,!!(1&o.$flags$)),r()}}}const u=t.$ancestorComponent$,d=()=>le(t,!0);u&&u["s-rc"]?u["s-rc"].push(d):d()},Oe=(e,t)=>{me(e,"connectedCallback",void 0,t)},Se=(e,t)=>{me(e,"disconnectedCallback",void 0,t||e)},Pe=(e,t={})=>{var r;if(!p.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const n=()=>{},o=[],a=t.exclude||[],u=p.customElements,s=p.document.head,l=s.querySelector("meta[charset]"),c=p.document.createElement("style"),f=[];let b,v=!0;Object.assign(h,t),h.$resourcesUrl$=new URL(t.resourcesUrl||"./",p.document.baseURI).href;let m=!1;if(e.map((e=>{e[1].map((t=>{var r;const n={$flags$:t[0],$tagName$:t[1],$members$:t[2],$listeners$:t[3]};4&n.$flags$&&(m=!0),n.$members$=t[2],n.$listeners$=t[3],n.$attrsToReflect$=[],n.$watchers$=null!=(r=t[4])?r:{};const s=n.$tagName$,l=class extends HTMLElement{constructor(e){if(super(e),this.hasRegisteredEventListeners=!1,((e,t)=>{const r={$flags$:0,$hostElement$:e,$cmpMeta$:t,$instanceValues$:new Map};r.$onInstancePromise$=new Promise((e=>r.$onInstanceResolve$=e)),r.$onReadyPromise$=new Promise((e=>r.$onReadyResolve$=e)),e["s-p"]=[],e["s-rc"]=[];const n=r;e.__stencil__getHostRef=()=>n})(e=this,n),1&n.$flags$)if(e.shadowRoot){if("open"!==e.shadowRoot.mode)throw new Error(`Unable to re-use existing shadow root for ${n.$tagName$}! Mode is set to ${e.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else e.attachShadow({mode:"open"})}connectedCallback(){const e=i(this);this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0,je(this,e,n.$listeners$)),b&&(clearTimeout(b),b=null),v?f.push(this):h.jmp((()=>(e=>{if(!(1&h.$flags$)){const t=i(e),r=t.$cmpMeta$,n=(r.$tagName$,()=>{});if(1&t.$flags$)je(e,t,r.$listeners$),(null==t?void 0:t.$lazyInstance$)?Oe(t.$lazyInstance$,e):(null==t?void 0:t.$onReadyPromise$)&&t.$onReadyPromise$.then((()=>Oe(t.$lazyInstance$,e)));else{t.$flags$|=1;{let r=e;for(;r=r.parentNode||r.host;)if(r["s-p"]){se(t,t.$ancestorComponent$=r);break}}r.$members$&&Object.entries(r.$members$).map((([t,[r]])=>{if(31&r&&e.hasOwnProperty(t)){const r=e[t];delete e[t],e[t]=r}})),we(e,t,r)}n()}})(this)))}disconnectedCallback(){h.jmp((()=>(async e=>{if(!(1&h.$flags$)){const t=i(e);t.$rmListeners$&&(t.$rmListeners$.map((e=>e())),t.$rmListeners$=void 0),(null==t?void 0:t.$lazyInstance$)?Se(t.$lazyInstance$,e):(null==t?void 0:t.$onReadyPromise$)&&t.$onReadyPromise$.then((()=>Se(t.$lazyInstance$,e)))}q.has(e)&&q.delete(e),e.shadowRoot&&q.has(e.shadowRoot)&&q.delete(e.shadowRoot)})(this))),h.raf((()=>{var e;const t=i(this),r=f.findIndex((e=>e===this));r>-1&&f.splice(r,1),(null==(e=null==t?void 0:t.$vnode$)?void 0:e.$elm$)instanceof Node&&!t.$vnode$.$elm$.isConnected&&delete t.$vnode$.$elm$}))}componentOnReady(){return i(this).$onReadyPromise$}};n.$lazyBundleId$=e[0],a.includes(s)||u.get(s)||(o.push(s),u.define(s,ye(l,n,1)))}))})),o.length>0&&(m&&(c.textContent+=d),c.textContent+=o.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",c.innerHTML.length)){c.setAttribute("data-styles","");const e=null!=(r=h.$nonce$)?r:A(p.document);null!=e&&c.setAttribute("nonce",e),s.insertBefore(c,l?l.nextSibling:s.firstChild)}v=!1,f.length?f.map((e=>e.connectedCallback())):h.jmp((()=>b=setTimeout(ve,30))),n()},xe=(e,t)=>t,je=(e,t,r,n)=>{r&&p.document&&r.map((([r,n,o])=>{const i=$e(p.document,e,r),a=Ae(t,o),u=Te(r);h.ael(i,n,a,u),(t.$rmListeners$=t.$rmListeners$||[]).push((()=>h.rel(i,n,a,u)))}))},Ae=(e,t)=>r=>{var n;try{256&e.$flags$?null==(n=e.$lazyInstance$)||n[t](r):(e.$queuedListeners$=e.$queuedListeners$||[]).push([t,r])}catch(t){s(t,e.$hostElement$)}},$e=(e,t,r)=>8&r?p:t,Te=e=>b?{passive:!!(1&e),capture:!!(2&e)}:!!(2&e)},665:(e,t,r)=>{"use strict";r.r(t),r.d(t,{read_along:()=>_d});var n,o=r(102),i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self?self:{},a={};var u,s,l=(n||(n=1,u=a,function(){var e=function(){this.init()};e.prototype={init:function(){var e=this||t;return e._counter=1e3,e._html5AudioPool=[],e.html5PoolSize=10,e._codecs={},e._howls=[],e._muted=!1,e._volume=1,e._canPlayEvent="canplaythrough",e._navigator="undefined"!=typeof window&&window.navigator?window.navigator:null,e.masterGain=null,e.noAudio=!1,e.usingWebAudio=!0,e.autoSuspend=!0,e.ctx=null,e.autoUnlock=!0,e._setup(),e},volume:function(e){var r=this||t;if(e=parseFloat(e),r.ctx||d(),void 0!==e&&e>=0&&e<=1){if(r._volume=e,r._muted)return r;r.usingWebAudio&&r.masterGain.gain.setValueAtTime(e,t.ctx.currentTime);for(var n=0;n=0;r--)e._howls[r].unload();return e.usingWebAudio&&e.ctx&&void 0!==e.ctx.close&&(e.ctx.close(),e.ctx=null,d()),e},codecs:function(e){return(this||t)._codecs[e.replace(/^x-/,"")]},_setup:function(){var e=this||t;if(e.state=e.ctx&&e.ctx.state||"suspended",e._autoSuspend(),!e.usingWebAudio)if("undefined"!=typeof Audio)try{void 0===(new Audio).oncanplaythrough&&(e._canPlayEvent="canplay")}catch(t){e.noAudio=!0}else e.noAudio=!0;try{(new Audio).muted&&(e.noAudio=!0)}catch(e){}return e.noAudio||e._setupCodecs(),e},_setupCodecs:function(){var e=this||t,r=null;try{r="undefined"!=typeof Audio?new Audio:null}catch(t){return e}if(!r||"function"!=typeof r.canPlayType)return e;var n=r.canPlayType("audio/mpeg;").replace(/^no$/,""),o=e._navigator?e._navigator.userAgent:"",i=o.match(/OPR\/(\d+)/g),a=i&&parseInt(i[0].split("/")[1],10)<33,u=-1!==o.indexOf("Safari")&&-1===o.indexOf("Chrome"),s=o.match(/Version\/(.*?) /),l=u&&s&&parseInt(s[1],10)<15;return e._codecs={mp3:!(a||!n&&!r.canPlayType("audio/mp3;").replace(/^no$/,"")),mpeg:!!n,opus:!!r.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),ogg:!!r.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),oga:!!r.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),wav:!!(r.canPlayType('audio/wav; codecs="1"')||r.canPlayType("audio/wav")).replace(/^no$/,""),aac:!!r.canPlayType("audio/aac;").replace(/^no$/,""),caf:!!r.canPlayType("audio/x-caf;").replace(/^no$/,""),m4a:!!(r.canPlayType("audio/x-m4a;")||r.canPlayType("audio/m4a;")||r.canPlayType("audio/aac;")).replace(/^no$/,""),m4b:!!(r.canPlayType("audio/x-m4b;")||r.canPlayType("audio/m4b;")||r.canPlayType("audio/aac;")).replace(/^no$/,""),mp4:!!(r.canPlayType("audio/x-mp4;")||r.canPlayType("audio/mp4;")||r.canPlayType("audio/aac;")).replace(/^no$/,""),weba:!(l||!r.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),webm:!(l||!r.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),dolby:!!r.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/,""),flac:!!(r.canPlayType("audio/x-flac;")||r.canPlayType("audio/flac;")).replace(/^no$/,"")},e},_unlockAudio:function(){var e=this||t;if(!e._audioUnlocked&&e.ctx){e._audioUnlocked=!1,e.autoUnlock=!1,e._mobileUnloaded||44100===e.ctx.sampleRate||(e._mobileUnloaded=!0,e.unload()),e._scratchBuffer=e.ctx.createBuffer(1,1,22050);var r=function(t){for(;e._html5AudioPool.length0?u._seek:n._sprite[e][0]/1e3),c=Math.max(0,(n._sprite[e][0]+n._sprite[e][1])/1e3-l),d=1e3*c/Math.abs(u._rate),f=n._sprite[e][0]/1e3,p=(n._sprite[e][0]+n._sprite[e][1])/1e3;u._sprite=e,u._ended=!1;var h=function(){u._paused=!1,u._seek=l,u._start=f,u._stop=p,u._loop=!(!u._loop&&!n._sprite[e][2])};if(!(l>=p)){var b=u._node;if(n._webAudio){var v=function(){n._playLock=!1,h(),n._refreshBuffer(u);var e=u._muted||n._muted?0:u._volume;b.gain.setValueAtTime(e,t.ctx.currentTime),u._playStart=t.ctx.currentTime,void 0===b.bufferSource.start?u._loop?b.bufferSource.noteGrainOn(0,l,86400):b.bufferSource.noteGrainOn(0,l,c):u._loop?b.bufferSource.start(0,l,86400):b.bufferSource.start(0,l,c),d!==1/0&&(n._endTimers[u._id]=setTimeout(n._ended.bind(n,u),d)),r||setTimeout((function(){n._emit("play",u._id),n._loadQueue()}),0)};"running"===t.state&&"interrupted"!==t.ctx.state?v():(n._playLock=!0,n.once("resume",v),n._clearTimer(u._id))}else{var m=function(){b.currentTime=l,b.muted=u._muted||n._muted||t._muted||b.muted,b.volume=u._volume*t.volume(),b.playbackRate=u._rate;try{var o=b.play();if(o&&"undefined"!=typeof Promise&&(o instanceof Promise||"function"==typeof o.then)?(n._playLock=!0,h(),o.then((function(){n._playLock=!1,b._unlocked=!0,r?n._loadQueue():n._emit("play",u._id)})).catch((function(){n._playLock=!1,n._emit("playerror",u._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction."),u._ended=!0,u._paused=!0}))):r||(n._playLock=!1,h(),n._emit("play",u._id)),b.playbackRate=u._rate,b.paused)return void n._emit("playerror",u._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");"__default"!==e||u._loop?n._endTimers[u._id]=setTimeout(n._ended.bind(n,u),d):(n._endTimers[u._id]=function(){n._ended(u),b.removeEventListener("ended",n._endTimers[u._id],!1)},b.addEventListener("ended",n._endTimers[u._id],!1))}catch(e){n._emit("playerror",u._id,e)}};"data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"===b.src&&(b.src=n._src,b.load());var g=window&&window.ejecta||!b.readyState&&t._navigator.isCocoonJS;if(b.readyState>=3||g)m();else{n._playLock=!0,n._state="loading";var _=function(){n._state="loaded",m(),b.removeEventListener(t._canPlayEvent,_,!1)};b.addEventListener(t._canPlayEvent,_,!1),n._clearTimer(u._id)}}return u._id}n._ended(u)},pause:function(e){var t=this;if("loaded"!==t._state||t._playLock)return t._queue.push({event:"pause",action:function(){t.pause(e)}}),t;for(var r=t._getSoundIds(e),n=0;n=0?r=parseInt(i[0],10):e=parseFloat(i[0]):i.length>=2&&(e=parseFloat(i[0]),r=parseInt(i[1],10)),!(void 0!==e&&e>=0&&e<=1))return(n=r?o._soundById(r):o._sounds[0])?n._volume:0;if("loaded"!==o._state||o._playLock)return o._queue.push({event:"volume",action:function(){o.volume.apply(o,i)}}),o;void 0===r&&(o._volume=e),r=o._getSoundIds(r);for(var a=0;a0?n/l:n),d=Date.now();e._fadeTo=r,e._interval=setInterval((function(){var o=(Date.now()-d)/n;d=Date.now(),u+=s*o,u=Math.round(100*u)/100,u=s<0?Math.max(r,u):Math.min(r,u),a._webAudio?e._volume=u:a.volume(u,e._id,!0),i&&(a._volume=u),(rt&&u>=r)&&(clearInterval(e._interval),e._interval=null,e._fadeTo=null,a.volume(r,e._id),a._emit("fade",e._id))}),c)},_stopFade:function(e){var r=this,n=r._soundById(e);return n&&n._interval&&(r._webAudio&&n._node.gain.cancelScheduledValues(t.ctx.currentTime),clearInterval(n._interval),n._interval=null,r.volume(n._fadeTo,e),n._fadeTo=null,r._emit("fade",e)),r},loop:function(){var e,t,r,n=this,o=arguments;if(0===o.length)return n._loop;if(1===o.length){if("boolean"!=typeof o[0])return!!(r=n._soundById(parseInt(o[0],10)))&&r._loop;e=o[0],n._loop=e}else 2===o.length&&(e=o[0],t=parseInt(o[1],10));for(var i=n._getSoundIds(t),a=0;a=0?r=parseInt(i[0],10):e=parseFloat(i[0]):2===i.length&&(e=parseFloat(i[0]),r=parseInt(i[1],10)),"number"!=typeof e)return(n=o._soundById(r))?n._rate:o._rate;if("loaded"!==o._state||o._playLock)return o._queue.push({event:"rate",action:function(){o.rate.apply(o,i)}}),o;void 0===r&&(o._rate=e),r=o._getSoundIds(r);for(var a=0;a=0?r=parseInt(o[0],10):n._sounds.length&&(r=n._sounds[0]._id,e=parseFloat(o[0])):2===o.length&&(e=parseFloat(o[0]),r=parseInt(o[1],10)),void 0===r)return 0;if("number"==typeof e&&("loaded"!==n._state||n._playLock))return n._queue.push({event:"seek",action:function(){n.seek.apply(n,o)}}),n;var i=n._soundById(r);if(i){if(!("number"==typeof e&&e>=0)){if(n._webAudio){var a=n.playing(r)?t.ctx.currentTime-i._playStart:0,u=i._rateSeek?i._rateSeek-i._seek:0;return i._seek+(u+a*Math.abs(i._rate))}return i._node.currentTime}var s=n.playing(r);s&&n.pause(r,!0),i._seek=e,i._ended=!1,n._clearTimer(r),n._webAudio||!i._node||isNaN(i._node.duration)||(i._node.currentTime=e);var l=function(){s&&n.play(r,!0),n._emit("seek",r)};if(s&&!n._webAudio){var c=function(){n._playLock?setTimeout(c,0):l()};setTimeout(c,0)}else l()}return n},playing:function(e){var t=this;if("number"==typeof e){var r=t._soundById(e);return!!r&&!r._paused}for(var n=0;n=0&&t._howls.splice(i,1);var a=!0;for(n=0;n=0){a=!1;break}return o&&a&&delete o[e._src],t.noAudio=!1,e._state="unloaded",e._sounds=[],e=null,null},on:function(e,t,r,n){var o=this["_on"+e];return"function"==typeof t&&o.push(n?{id:r,fn:t,once:n}:{id:r,fn:t}),this},off:function(e,t,r){var n=this,o=n["_on"+e],i=0;if("number"==typeof t&&(r=t,t=null),t||r)for(i=0;i=0;i--)o[i].id&&o[i].id!==t&&"load"!==e||(setTimeout(function(e){e.call(this,t,r)}.bind(n,o[i].fn),0),o[i].once&&n.off(e,o[i].fn,o[i].id));return n._loadQueue(e),n},_loadQueue:function(e){var t=this;if(t._queue.length>0){var r=t._queue[0];r.event===e&&(t._queue.shift(),t._loadQueue()),e||r.action()}return t},_ended:function(e){var r=this,n=e._sprite;if(!r._webAudio&&e._node&&!e._node.paused&&!e._node.ended&&e._node.currentTime=0;n--){if(r<=t)return;e._sounds[n]._ended&&(e._webAudio&&e._sounds[n]._node&&e._sounds[n]._node.disconnect(0),e._sounds.splice(n,1),r--)}}},_getSoundIds:function(e){if(void 0===e){for(var t=[],r=0;r=0;if(!e.bufferSource)return this;if(t._scratchBuffer&&e.bufferSource&&(e.bufferSource.onended=null,e.bufferSource.disconnect(0),r))try{e.bufferSource.buffer=t._scratchBuffer}catch(e){}return e.bufferSource=null,this},_clearSound:function(e){/MSIE |Trident\//.test(t._navigator&&t._navigator.userAgent)||(e.src="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA")}};var n=function(e){this._parent=e,this.init()};n.prototype={init:function(){var e=this,r=e._parent;return e._muted=r._muted,e._loop=r._loop,e._volume=r._volume,e._rate=r._rate,e._seek=0,e._paused=!0,e._ended=!0,e._sprite="__default",e._id=++t._counter,r._sounds.push(e),e.create(),e},create:function(){var e=this,r=e._parent,n=t._muted||e._muted||e._parent._muted?0:e._volume;return r._webAudio?(e._node=void 0===t.ctx.createGain?t.ctx.createGainNode():t.ctx.createGain(),e._node.gain.setValueAtTime(n,t.ctx.currentTime),e._node.paused=!0,e._node.connect(t.masterGain)):t.noAudio||(e._node=t._obtainHtml5Audio(),e._errorFn=e._errorListener.bind(e),e._node.addEventListener("error",e._errorFn,!1),e._loadFn=e._loadListener.bind(e),e._node.addEventListener(t._canPlayEvent,e._loadFn,!1),e._endFn=e._endListener.bind(e),e._node.addEventListener("ended",e._endFn,!1),e._node.src=r._src,e._node.preload=!0===r._preload?"auto":r._preload,e._node.volume=n*t.volume(),e._node.load()),e},reset:function(){var e=this,r=e._parent;return e._muted=r._muted,e._loop=r._loop,e._volume=r._volume,e._rate=r._rate,e._seek=0,e._rateSeek=0,e._paused=!0,e._ended=!0,e._sprite="__default",e._id=++t._counter,e},_errorListener:function(){var e=this;e._parent._emit("loaderror",e._id,e._node.error?e._node.error.code:0),e._node.removeEventListener("error",e._errorFn,!1)},_loadListener:function(){var e=this,r=e._parent;r._duration=Math.ceil(10*e._node.duration)/10,0===Object.keys(r._sprite).length&&(r._sprite={__default:[0,1e3*r._duration]}),"loaded"!==r._state&&(r._state="loaded",r._emit("load"),r._loadQueue()),e._node.removeEventListener(t._canPlayEvent,e._loadFn,!1)},_endListener:function(){var e=this,t=e._parent;t._duration===1/0&&(t._duration=Math.ceil(10*e._node.duration)/10,t._sprite.__default[1]===1/0&&(t._sprite.__default[1]=1e3*t._duration),t._ended(e)),e._node.removeEventListener("ended",e._endFn,!1)}};var o={},a=function(e){var t=e._src;if(o[t])return e._duration=o[t].duration,void c(e);if(/^data:[^;]+;base64,/.test(t)){for(var r=atob(t.split(",")[1]),n=new Uint8Array(r.length),i=0;i0?(o[r._src]=e,c(r,e)):n()};"undefined"!=typeof Promise&&1===t.ctx.decodeAudioData.length?t.ctx.decodeAudioData(e).then(i).catch(n):t.ctx.decodeAudioData(e,i,n)},c=function(e,t){t&&!e._duration&&(e._duration=t.duration),0===Object.keys(e._sprite).length&&(e._sprite={__default:[0,1e3*e._duration]}),"loaded"!==e._state&&(e._state="loaded",e._emit("load"),e._loadQueue())},d=function(){if(t.usingWebAudio){try{"undefined"!=typeof AudioContext?t.ctx=new AudioContext:"undefined"!=typeof webkitAudioContext?t.ctx=new webkitAudioContext:t.usingWebAudio=!1}catch(e){t.usingWebAudio=!1}t.ctx||(t.usingWebAudio=!1);var e=/iP(hone|od|ad)/.test(t._navigator&&t._navigator.platform),r=t._navigator&&t._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),n=r?parseInt(r[1],10):null;if(e&&n&&n<9){var o=/safari/.test(t._navigator&&t._navigator.userAgent.toLowerCase());t._navigator&&!o&&(t.usingWebAudio=!1)}t.usingWebAudio&&(t.masterGain=void 0===t.ctx.createGain?t.ctx.createGainNode():t.ctx.createGain(),t.masterGain.gain.setValueAtTime(t._muted?0:t._volume,t.ctx.currentTime),t.masterGain.connect(t.ctx.destination)),t._setup()}};u.Howler=t,u.Howl=r,void 0!==i?(i.HowlerGlobal=e,i.Howler=t,i.Howl=r,i.Sound=n):"undefined"!=typeof window&&(window.HowlerGlobal=e,window.Howler=t,window.Howl=r,window.Sound=n)}(), +(()=>{var e={474:(e,t,r)=>{"use strict";r.d(t,{F:()=>Ae,b:()=>je,c:()=>q,g:()=>B,h:()=>I,p:()=>v,r:()=>a});const n={hydratedSelectorName:"hydrated",lazyLoad:!0,updatable:!0};var o=Object.defineProperty,i=e=>{if(e.__stencil__getHostRef)return e.__stencil__getHostRef()},a=(e,t)=>{e.__stencil__getHostRef=()=>t,t.$lazyInstance$=e},u=(e,t)=>t in e,s=(e,t)=>(0,console.error)(e,t),l=new Map,c=new Map,d="slot-fb{display:contents}slot-fb[hidden]{display:none}",f="http://www.w3.org/1999/xlink",p="undefined"!=typeof window?window:{},h={$flags$:0,$resourcesUrl$:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,r,n)=>e.addEventListener(t,r,n),rel:(e,t,r,n)=>e.removeEventListener(t,r,n),ce:(e,t)=>new CustomEvent(e,t)},b=(()=>{var e;let t=!1;try{null==(e=p.document)||e.addEventListener("e",null,Object.defineProperty({},"passive",{get(){t=!0}}))}catch(e){}return t})(),v=e=>Promise.resolve(e),m=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),g=!1,_=[],y=[],w=(e,t)=>r=>{e.push(r),g||(g=!0,t&&4&h.$flags$?P(S):h.raf(S))},O=e=>{for(let t=0;t{O(_),O(y),(g=_.length>0)&&h.raf(S)},P=e=>v().then(e),x=w(y,!0),j=e=>"object"===(e=typeof e)||"function"===e;function A(e){var t,r,n;return null!=(n=null==(r=null==(t=e.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:r.getAttribute("content"))?n:void 0}((e,t)=>{for(var r in t)o(e,r,{get:t[r],enumerable:!0})})({},{err:()=>T,map:()=>k,ok:()=>$,unwrap:()=>E,unwrapErr:()=>M});var $=e=>({isOk:!0,isErr:!1,value:e}),T=e=>({isOk:!1,isErr:!0,value:e});function k(e,t){if(e.isOk){const r=t(e.value);return r instanceof Promise?r.then((e=>$(e))):$(r)}if(e.isErr){const t=e.value;return T(t)}throw"should never get here"}var E=e=>{if(e.isOk)return e.value;throw e.value},M=e=>{if(e.isErr)return e.value;throw e.value},I=(e,t,...r)=>{let n=null,o=null,i=!1,a=!1;const u=[],s=t=>{for(let r=0;re[t])).join(" "))}}if("function"==typeof e)return e(null===t?{}:t,u,L);const l=F(e,null);return l.$attrs$=t,u.length>0&&(l.$children$=u),l.$key$=o,l},F=(e,t)=>{const r={$flags$:0,$tag$:e,$text$:t,$elm$:null,$children$:null,$attrs$:null,$key$:null};return r},C={},L={forEach:(e,t)=>e.map(R).forEach(t),map:(e,t)=>e.map(R).map(t).map(N)},R=e=>({vattrs:e.$attrs$,vchildren:e.$children$,vkey:e.$key$,vname:e.$name$,vtag:e.$tag$,vtext:e.$text$}),N=e=>{if("function"==typeof e.vtag){const t={...e.vattrs};return e.vkey&&(t.key=e.vkey),e.vname&&(t.name=e.vname),I(e.vtag,t,...e.vchildren||[])}const t=F(e.vtag,e.vtext);return t.$attrs$=e.vattrs,t.$children$=e.vchildren,t.$key$=e.vkey,t.$name$=e.vname,t},W=e=>{const t=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${t}))(${t}\\b)`,"g")};W("::slotted"),W(":host"),W(":host-context");var z,D=(e,t)=>null==e||j(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?"string"==typeof e?parseFloat(e):"number"==typeof e?e:NaN:1&t?String(e):e,B=e=>i(e).$hostElement$,q=(e,t,r)=>{const n=B(e);return{emit:e=>V(n,t,{bubbles:!0,composed:!0,cancelable:!0,detail:e})}},V=(e,t,r)=>{const n=h.ce(t,r);return e.dispatchEvent(n),n},U=new WeakMap,H=e=>{const t=e.$cmpMeta$,r=e.$hostElement$,n=t.$flags$,o=(t.$tagName$,()=>{}),i=((e,t)=>{var r;const n=G(t),o=c.get(n);if(!p.document)return n;if(e=11===e.nodeType?e:p.document,o)if("string"==typeof o){e=e.head||e;let i,a=U.get(e);if(a||U.set(e,a=new Set),!a.has(n)){{i=document.querySelector(`[sty-id="${n}"]`)||p.document.createElement("style"),i.innerHTML=o;const a=null!=(r=h.$nonce$)?r:A(p.document);if(null!=a&&i.setAttribute("nonce",a),!(1&t.$flags$))if("HEAD"===e.nodeName){const t=e.querySelectorAll("link[rel=preconnect]"),r=t.length>0?t[t.length-1].nextSibling:e.querySelector("style");e.insertBefore(i,(null==r?void 0:r.parentNode)===e?r:null)}else if("host"in e)if(m){const t=new CSSStyleSheet;t.replaceSync(o),e.adoptedStyleSheets=[t,...e.adoptedStyleSheets]}else{const t=e.querySelector("style");t?t.innerHTML=o+t.innerHTML:e.prepend(i)}else e.append(i);1&t.$flags$&&e.insertBefore(i,null)}4&t.$flags$&&(i.innerHTML+=d),a&&a.add(n)}}else e.adoptedStyleSheets.includes(o)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]);return n})(r.shadowRoot?r.shadowRoot:r.getRootNode(),t);10&n&&(r["s-sc"]=i,r.classList.add(i+"-h")),o()},G=(e,t)=>"sc-"+e.$tagName$,Y=(e,t,r,n,o,i,a)=>{if(r===n)return;let s=u(e,t),l=t.toLowerCase();if("class"===t){const t=e.classList,o=Q(r);let i=Q(n);t.remove(...o.filter((e=>e&&!i.includes(e)))),t.add(...i.filter((e=>e&&!o.includes(e))))}else if("style"===t){for(const t in r)n&&null!=n[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in n)r&&n[t]===r[t]||(t.includes("-")?e.style.setProperty(t,n[t]):e.style[t]=n[t])}else if("key"===t);else if("ref"===t)n&&n(e);else if(s||"o"!==t[0]||"n"!==t[1]){const a=j(n);if(s||a&&null!==n)try{if(e.tagName.includes("-"))e[t]!==n&&(e[t]=n);else{const o=null==n?"":n;"list"===t?s=!1:null!=r&&e[t]==o||("function"==typeof e.__lookupSetter__(t)?e[t]=o:e.setAttribute(t,o))}}catch(e){}let u=!1;l!==(l=l.replace(/^xlink\:?/,""))&&(t=l,u=!0),null==n||!1===n?!1===n&&""!==e.getAttribute(t)||(u?e.removeAttributeNS(f,t):e.removeAttribute(t)):(!s||4&i||o)&&!a&&1===e.nodeType&&(n=!0===n?"":n,u?e.setAttributeNS(f,t,n):e.setAttribute(t,n))}else if(t="-"===t[2]?t.slice(3):u(p,l)?l.slice(2):l[2]+t.slice(3),r||n){const o=t.endsWith(K);t=t.replace(Z,""),r&&h.rel(e,t,r,o),n&&h.ael(e,t,n,o)}},X=/\s/,Q=e=>("object"==typeof e&&e&&"baseVal"in e&&(e=e.baseVal),e&&"string"==typeof e?e.split(X):[]),K="Capture",Z=new RegExp(K+"$"),J=(e,t,r,n)=>{const o=11===t.$elm$.nodeType&&t.$elm$.host?t.$elm$.host:t.$elm$,i=e&&e.$attrs$||{},a=t.$attrs$||{};for(const e of ee(Object.keys(i)))e in a||Y(o,e,i[e],void 0,r,t.$flags$);for(const e of ee(Object.keys(a)))Y(o,e,i[e],a[e],r,t.$flags$)};function ee(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var te=!1,re=(e,t,r)=>{const n=t.$children$[r];let o,i,a=0;if(null!==n.$text$)o=n.$elm$=p.document.createTextNode(n.$text$);else{if(!p.document)throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component.");if(o=n.$elm$=p.document.createElement(n.$tag$),J(null,n,te),n.$children$)for(a=0;a{let a,u=e;for(u.shadowRoot&&u.tagName===z&&(u=u.shadowRoot);o<=i;++o)n[o]&&(a=re(null,r,o),a&&(n[o].$elm$=a,se(u,a,t)))},oe=(e,t,r)=>{for(let n=t;n<=r;++n){const t=e[n];if(t){const e=t.$elm$;ue(t),e&&e.remove()}}},ie=(e,t,r=!1)=>e.$tag$===t.$tag$&&(r?(r&&!e.$key$&&t.$key$&&(e.$key$=t.$key$),!0):e.$key$===t.$key$),ae=(e,t,r=!1)=>{const o=t.$elm$=e.$elm$,i=e.$children$,a=t.$children$,u=t.$text$;null===u?(J(e,t,te),null!==i&&null!==a?((e,t,r,n,o=!1)=>{let i,a,u=0,s=0,l=0,c=0,d=t.length-1,f=t[0],p=t[d],h=n.length-1,b=n[0],v=n[h];for(;u<=d&&s<=h;)if(null==f)f=t[++u];else if(null==p)p=t[--d];else if(null==b)b=n[++s];else if(null==v)v=n[--h];else if(ie(f,b,o))ae(f,b,o),f=t[++u],b=n[++s];else if(ie(p,v,o))ae(p,v,o),p=t[--d],v=n[--h];else if(ie(f,v,o))ae(f,v,o),se(e,f.$elm$,p.$elm$.nextSibling),f=t[++u],v=n[--h];else if(ie(p,b,o))ae(p,b,o),se(e,p.$elm$,f.$elm$),p=t[--d],b=n[++s];else{for(l=-1,c=u;c<=d;++c)if(t[c]&&null!==t[c].$key$&&t[c].$key$===b.$key$){l=c;break}l>=0?(a=t[l],a.$tag$!==b.$tag$?i=re(t&&t[s],r,l):(ae(a,b,o),t[l]=void 0,i=a.$elm$),b=n[++s]):(i=re(t&&t[s],r,s),b=n[++s]),i&&se(f.$elm$.parentNode,i,f.$elm$)}u>d?ne(e,null==n[h+1]?null:n[h+1].$elm$,r,n,s,h):s>h&&oe(t,u,d)})(o,i,t,a,r):null!==a?(null!==e.$text$&&(o.textContent=""),ne(o,null,t,a,0,a.length-1)):!r&&n.updatable&&null!==i&&oe(i,0,i.length-1)):e.$text$!==u&&(o.data=u)},ue=e=>{e.$attrs$&&e.$attrs$.ref&&e.$attrs$.ref(null),e.$children$&&e.$children$.map(ue)},se=(e,t,r)=>null==e?void 0:e.insertBefore(t,r),le=(e,t,r=!1)=>{const n=e.$hostElement$,o=e.$cmpMeta$,i=e.$vnode$||F(null,null);var a;const u=(a=t)&&a.$tag$===C?t:I(null,null,t);if(z=n.tagName,o.$attrsToReflect$&&(u.$attrs$=u.$attrs$||{},o.$attrsToReflect$.map((([e,t])=>u.$attrs$[t]=n[e]))),r&&u.$attrs$)for(const e of Object.keys(u.$attrs$))n.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(u.$attrs$[e]=n[e]);u.$tag$=null,u.$flags$|=4,e.$vnode$=u,u.$elm$=i.$elm$=n.shadowRoot||n,ae(i,u,r)},ce=(e,t)=>{if(t&&!e.$onRenderResolve$&&t["s-p"]){const r=t["s-p"].push(new Promise((n=>e.$onRenderResolve$=()=>{t["s-p"].splice(r-1,1),n()})))}},de=(e,t)=>{if(e.$flags$|=16,4&e.$flags$)return void(e.$flags$|=512);ce(e,e.$ancestorComponent$);return x((()=>fe(e,t)))},fe=(e,t)=>{const r=e.$hostElement$,n=(e.$cmpMeta$.$tagName$,()=>{}),o=e.$lazyInstance$;if(!o)throw new Error(`Can't render component <${r.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let i;return t?(e.$flags$|=256,e.$queuedListeners$&&(e.$queuedListeners$.map((([e,t])=>_e(o,e,t,r))),e.$queuedListeners$=void 0),i=_e(o,"componentWillLoad",void 0,r)):i=_e(o,"componentWillUpdate",void 0,r),i=pe(i,(()=>_e(o,"componentWillRender",void 0,r))),n(),pe(i,(()=>be(e,o,t)))},pe=(e,t)=>he(e)?e.then(t).catch((e=>{console.error(e),t()})):t(),he=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,be=async(e,t,r)=>{var n;const o=e.$hostElement$,i=(e.$cmpMeta$.$tagName$,()=>{}),a=o["s-rc"];r&&H(e);const u=(e.$cmpMeta$.$tagName$,()=>{});ve(e,t,o,r),a&&(a.map((e=>e())),o["s-rc"]=void 0),u(),i();{const t=null!=(n=o["s-p"])?n:[],r=()=>me(e);0===t.length?r():(Promise.all(t).then(r),e.$flags$|=4,t.length=0)}},ve=(e,t,r,n)=>{try{t=t.render(),e.$flags$&=-17,e.$flags$|=2,le(e,t,n)}catch(t){s(t,e.$hostElement$)}return null},me=e=>{e.$cmpMeta$.$tagName$;const t=e.$hostElement$,r=()=>{},n=e.$lazyInstance$,o=e.$ancestorComponent$;_e(n,"componentDidRender",void 0,t),64&e.$flags$?(_e(n,"componentDidUpdate",void 0,t),r()):(e.$flags$|=64,ye(t),_e(n,"componentDidLoad",void 0,t),r(),e.$onReadyResolve$(t),o||ge()),e.$onInstanceResolve$(t),e.$onRenderResolve$&&(e.$onRenderResolve$(),e.$onRenderResolve$=void 0),512&e.$flags$&&P((()=>de(e,!1))),e.$flags$&=-517},ge=e=>{P((()=>V(p,"appload",{detail:{namespace:"web-component"}})))},_e=(e,t,r,n)=>{if(e&&e[t])try{return e[t](r)}catch(e){s(e,n)}},ye=e=>{var t;return e.classList.add(null!=(t=n.hydratedSelectorName)?t:"hydrated")},we=(e,t,r,n)=>{const o=i(e);if(!o)throw new Error(`Couldn't find host element for "${n.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`);const a=o.$hostElement$,u=o.$instanceValues$.get(t),l=o.$flags$,c=o.$lazyInstance$;r=D(r,n.$members$[t][0]);const d=Number.isNaN(u)&&Number.isNaN(r);if((!(8&l)||void 0===u)&&(r!==u&&!d)&&(o.$instanceValues$.set(t,r),c)){if(n.$watchers$&&128&l){const e=n.$watchers$[t];e&&e.map((e=>{try{c[e](r,u,t)}catch(e){s(e,a)}}))}if(2==(18&l)){if(c.componentShouldUpdate&&!1===c.componentShouldUpdate(r,u,t))return;de(o,!1)}}},Oe=(e,t,r)=>{var o,a;const u=e.prototype;if(t.$members$||t.$watchers$||e.watchers){e.watchers&&!t.$watchers$&&(t.$watchers$=e.watchers);const s=Object.entries(null!=(o=t.$members$)?o:{});if(s.map((([e,[n]])=>{if(31&n||2&r&&32&n){const{get:o,set:a}=Object.getOwnPropertyDescriptor(u,e)||{};o&&(t.$members$[e][0]|=2048),a&&(t.$members$[e][0]|=4096),(1&r||!o)&&Object.defineProperty(u,e,{get(){{if(!(2048&t.$members$[e][0]))return((e,t)=>i(e).$instanceValues$.get(t))(this,e);const r=i(this),n=r?r.$lazyInstance$:u;if(!n)return;return n[e]}},configurable:!0,enumerable:!0}),Object.defineProperty(u,e,{set(o){const u=i(this);if(a){const r=32&n?this[e]:u.$hostElement$[e];return void 0===r&&u.$instanceValues$.get(e)?o=u.$instanceValues$.get(e):!u.$instanceValues$.get(e)&&r&&u.$instanceValues$.set(e,r),a.apply(this,[D(o,n)]),o=32&n?this[e]:u.$hostElement$[e],void we(this,e,o,t)}{if(!(1&r&&4096&t.$members$[e][0]))return we(this,e,o,t),void(1&r&&!u.$lazyInstance$&&u.$onReadyPromise$.then((()=>{4096&t.$members$[e][0]&&u.$lazyInstance$[e]!==u.$instanceValues$.get(e)&&(u.$lazyInstance$[e]=o)})));const i=()=>{const r=u.$lazyInstance$[e];!u.$instanceValues$.get(e)&&r&&u.$instanceValues$.set(e,r),u.$lazyInstance$[e]=D(o,n),we(this,e,u.$lazyInstance$[e],t)};u.$lazyInstance$?i():u.$onReadyPromise$.then((()=>i()))}}})}else 1&r&&64&n&&Object.defineProperty(u,e,{value(...t){var r;const n=i(this);return null==(r=null==n?void 0:n.$onInstancePromise$)?void 0:r.then((()=>{var r;return null==(r=n.$lazyInstance$)?void 0:r[e](...t)}))}})})),1&r){const r=new Map;u.attributeChangedCallback=function(e,o,a){h.jmp((()=>{var s;const l=r.get(e);if(this.hasOwnProperty(l)&&n.lazyLoad)a=this[l],delete this[l];else{if(u.hasOwnProperty(l)&&"number"==typeof this[l]&&this[l]==a)return;if(null==l){const r=i(this),n=null==r?void 0:r.$flags$;if(n&&!(8&n)&&128&n&&a!==o){const n=r.$lazyInstance$,i=null==(s=t.$watchers$)?void 0:s[e];null==i||i.forEach((t=>{null!=n[t]&&n[t].call(n,a,o,e)}))}return}}const c=Object.getOwnPropertyDescriptor(u,l);(a=(null!==a||"boolean"!=typeof this[l])&&a)===this[l]||c.get&&!c.set||(this[l]=a)}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(a=t.$watchers$)?a:{}),...s.filter((([e,t])=>15&t[0])).map((([e,n])=>{var o;const i=n[1]||e;return r.set(i,e),512&n[0]&&(null==(o=t.$attrsToReflect$)||o.push([e,i])),i}))]))}}return e},Se=async(e,t,o,i)=>{let a;if(!(32&t.$flags$)){t.$flags$|=32;if(o.$lazyBundleId$){const i=((e,t,o)=>{const i=e.$tagName$.replace(/-/g,"_"),a=e.$lazyBundleId$;if(!a)return;const u=l.get(a);if(u)return u[i];if(!o||!n.hotModuleReplacement){const e=e=>(l.set(a,e),e[i]);if("error-message_2"===a)return Promise.resolve().then(r.bind(r,568)).then(e,s)}return r(923)(`./${a}.entry.js`).then((e=>(l.set(a,e),e[i])),(e=>{s(e,t.$hostElement$)}))})(o,t);if(i&&"then"in i){const e=()=>{};a=await i,e()}else a=i;if(!a)throw new Error(`Constructor for "${o.$tagName$}#${t.$modeName$}" was not found`);a.isProxied||(o.$watchers$=a.watchers,Oe(a,o,2),a.isProxied=!0);const u=(o.$tagName$,()=>{});t.$flags$|=8;try{new a(t)}catch(t){s(t,e)}t.$flags$&=-9,t.$flags$|=128,u(),Pe(t.$lazyInstance$,e)}else{a=e.constructor;const r=e.localName;customElements.whenDefined(r).then((()=>t.$flags$|=128))}if(a&&a.style){let e;"string"==typeof a.style&&(e=a.style);const t=G(o);if(!c.has(t)){const r=(o.$tagName$,()=>{});((e,t,r)=>{let n=c.get(e);m&&r?(n=n||new CSSStyleSheet,"string"==typeof n?n=t:n.replaceSync(t)):n=t,c.set(e,n)})(t,e,!!(1&o.$flags$)),r()}}}const u=t.$ancestorComponent$,d=()=>de(t,!0);u&&u["s-rc"]?u["s-rc"].push(d):d()},Pe=(e,t)=>{_e(e,"connectedCallback",void 0,t)},xe=(e,t)=>{_e(e,"disconnectedCallback",void 0,t||e)},je=(e,t={})=>{var r;if(!p.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const n=()=>{},o=[],a=t.exclude||[],u=p.customElements,s=p.document.head,l=s.querySelector("meta[charset]"),c=p.document.createElement("style"),f=[];let b,v=!0;Object.assign(h,t),h.$resourcesUrl$=new URL(t.resourcesUrl||"./",p.document.baseURI).href;let m=!1;if(e.map((e=>{e[1].map((t=>{var r;const n={$flags$:t[0],$tagName$:t[1],$members$:t[2],$listeners$:t[3]};4&n.$flags$&&(m=!0),n.$members$=t[2],n.$listeners$=t[3],n.$attrsToReflect$=[],n.$watchers$=null!=(r=t[4])?r:{};const s=n.$tagName$,l=class extends HTMLElement{constructor(e){if(super(e),this.hasRegisteredEventListeners=!1,((e,t)=>{const r={$flags$:0,$hostElement$:e,$cmpMeta$:t,$instanceValues$:new Map};r.$onInstancePromise$=new Promise((e=>r.$onInstanceResolve$=e)),r.$onReadyPromise$=new Promise((e=>r.$onReadyResolve$=e)),e["s-p"]=[],e["s-rc"]=[];const n=r;e.__stencil__getHostRef=()=>n})(e=this,n),1&n.$flags$)if(e.shadowRoot){if("open"!==e.shadowRoot.mode)throw new Error(`Unable to re-use existing shadow root for ${n.$tagName$}! Mode is set to ${e.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else e.attachShadow({mode:"open"})}connectedCallback(){const e=i(this);this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0,$e(this,e,n.$listeners$)),b&&(clearTimeout(b),b=null),v?f.push(this):h.jmp((()=>(e=>{if(!(1&h.$flags$)){const t=i(e),r=t.$cmpMeta$,n=(r.$tagName$,()=>{});if(1&t.$flags$)$e(e,t,r.$listeners$),(null==t?void 0:t.$lazyInstance$)?Pe(t.$lazyInstance$,e):(null==t?void 0:t.$onReadyPromise$)&&t.$onReadyPromise$.then((()=>Pe(t.$lazyInstance$,e)));else{t.$flags$|=1;{let r=e;for(;r=r.parentNode||r.host;)if(r["s-p"]){ce(t,t.$ancestorComponent$=r);break}}r.$members$&&Object.entries(r.$members$).map((([t,[r]])=>{if(31&r&&e.hasOwnProperty(t)){const r=e[t];delete e[t],e[t]=r}})),Se(e,t,r)}n()}})(this)))}disconnectedCallback(){h.jmp((()=>(async e=>{if(!(1&h.$flags$)){const t=i(e);t.$rmListeners$&&(t.$rmListeners$.map((e=>e())),t.$rmListeners$=void 0),(null==t?void 0:t.$lazyInstance$)?xe(t.$lazyInstance$,e):(null==t?void 0:t.$onReadyPromise$)&&t.$onReadyPromise$.then((()=>xe(t.$lazyInstance$,e)))}U.has(e)&&U.delete(e),e.shadowRoot&&U.has(e.shadowRoot)&&U.delete(e.shadowRoot)})(this))),h.raf((()=>{var e;const t=i(this),r=f.findIndex((e=>e===this));r>-1&&f.splice(r,1),(null==(e=null==t?void 0:t.$vnode$)?void 0:e.$elm$)instanceof Node&&!t.$vnode$.$elm$.isConnected&&delete t.$vnode$.$elm$}))}componentOnReady(){return i(this).$onReadyPromise$}};n.$lazyBundleId$=e[0],a.includes(s)||u.get(s)||(o.push(s),u.define(s,Oe(l,n,1)))}))})),o.length>0&&(m&&(c.textContent+=d),c.textContent+=o.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",c.innerHTML.length)){c.setAttribute("data-styles","");const e=null!=(r=h.$nonce$)?r:A(p.document);null!=e&&c.setAttribute("nonce",e),s.insertBefore(c,l?l.nextSibling:s.firstChild)}v=!1,f.length?f.map((e=>e.connectedCallback())):h.jmp((()=>b=setTimeout(ge,30))),n()},Ae=(e,t)=>t,$e=(e,t,r,n)=>{r&&p.document&&r.map((([r,n,o])=>{const i=ke(p.document,e,r),a=Te(t,o),u=Ee(r);h.ael(i,n,a,u),(t.$rmListeners$=t.$rmListeners$||[]).push((()=>h.rel(i,n,a,u)))}))},Te=(e,t)=>r=>{var n;try{256&e.$flags$?null==(n=e.$lazyInstance$)||n[t](r):(e.$queuedListeners$=e.$queuedListeners$||[]).push([t,r])}catch(t){s(t,e.$hostElement$)}},ke=(e,t,r)=>8&r?p:t,Ee=e=>b?{passive:!!(1&e),capture:!!(2&e)}:!!(2&e)},568:(e,t,r)=>{"use strict";r.r(t),r.d(t,{error_message:()=>o,read_along:()=>yd});var n=r(474);const o=class{constructor(e){(0,n.r)(this,e),this.expired=(0,n.c)(this,"expired"),this.timeout=0,this.timer=0,this.open=!0}componentDidLoad(){this.timeout<=0||(this.timer=setTimeout((()=>{this.timer=0,this.expired.emit(),this.open=!1}),this.timeout))}disconnectedCallback(){this.open=!1,this.timer&&(clearTimeout(this.timer),this.timer=0)}render(){if(this.open)return(0,n.h)("p",{"data-test-id":this.data_cy,class:"alert status-error"},(0,n.h)("span",{class:"material-icons"},"error_outline")," ",this.msg)}};o.style="error-message {\n display: block;\n }";var i,a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self?self:{},u={};var s,l,c=(i||(i=1,s=u,function(){var e=function(){this.init()};e.prototype={init:function(){var e=this||t;return e._counter=1e3,e._html5AudioPool=[],e.html5PoolSize=10,e._codecs={},e._howls=[],e._muted=!1,e._volume=1,e._canPlayEvent="canplaythrough",e._navigator="undefined"!=typeof window&&window.navigator?window.navigator:null,e.masterGain=null,e.noAudio=!1,e.usingWebAudio=!0,e.autoSuspend=!0,e.ctx=null,e.autoUnlock=!0,e._setup(),e},volume:function(e){var r=this||t;if(e=parseFloat(e),r.ctx||d(),void 0!==e&&e>=0&&e<=1){if(r._volume=e,r._muted)return r;r.usingWebAudio&&r.masterGain.gain.setValueAtTime(e,t.ctx.currentTime);for(var n=0;n=0;r--)e._howls[r].unload();return e.usingWebAudio&&e.ctx&&void 0!==e.ctx.close&&(e.ctx.close(),e.ctx=null,d()),e},codecs:function(e){return(this||t)._codecs[e.replace(/^x-/,"")]},_setup:function(){var e=this||t;if(e.state=e.ctx&&e.ctx.state||"suspended",e._autoSuspend(),!e.usingWebAudio)if("undefined"!=typeof Audio)try{void 0===(new Audio).oncanplaythrough&&(e._canPlayEvent="canplay")}catch(t){e.noAudio=!0}else e.noAudio=!0;try{(new Audio).muted&&(e.noAudio=!0)}catch(e){}return e.noAudio||e._setupCodecs(),e},_setupCodecs:function(){var e=this||t,r=null;try{r="undefined"!=typeof Audio?new Audio:null}catch(t){return e}if(!r||"function"!=typeof r.canPlayType)return e;var n=r.canPlayType("audio/mpeg;").replace(/^no$/,""),o=e._navigator?e._navigator.userAgent:"",i=o.match(/OPR\/(\d+)/g),a=i&&parseInt(i[0].split("/")[1],10)<33,u=-1!==o.indexOf("Safari")&&-1===o.indexOf("Chrome"),s=o.match(/Version\/(.*?) /),l=u&&s&&parseInt(s[1],10)<15;return e._codecs={mp3:!(a||!n&&!r.canPlayType("audio/mp3;").replace(/^no$/,"")),mpeg:!!n,opus:!!r.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),ogg:!!r.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),oga:!!r.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),wav:!!(r.canPlayType('audio/wav; codecs="1"')||r.canPlayType("audio/wav")).replace(/^no$/,""),aac:!!r.canPlayType("audio/aac;").replace(/^no$/,""),caf:!!r.canPlayType("audio/x-caf;").replace(/^no$/,""),m4a:!!(r.canPlayType("audio/x-m4a;")||r.canPlayType("audio/m4a;")||r.canPlayType("audio/aac;")).replace(/^no$/,""),m4b:!!(r.canPlayType("audio/x-m4b;")||r.canPlayType("audio/m4b;")||r.canPlayType("audio/aac;")).replace(/^no$/,""),mp4:!!(r.canPlayType("audio/x-mp4;")||r.canPlayType("audio/mp4;")||r.canPlayType("audio/aac;")).replace(/^no$/,""),weba:!(l||!r.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),webm:!(l||!r.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),dolby:!!r.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/,""),flac:!!(r.canPlayType("audio/x-flac;")||r.canPlayType("audio/flac;")).replace(/^no$/,"")},e},_unlockAudio:function(){var e=this||t;if(!e._audioUnlocked&&e.ctx){e._audioUnlocked=!1,e.autoUnlock=!1,e._mobileUnloaded||44100===e.ctx.sampleRate||(e._mobileUnloaded=!0,e.unload()),e._scratchBuffer=e.ctx.createBuffer(1,1,22050);var r=function(t){for(;e._html5AudioPool.length0?u._seek:n._sprite[e][0]/1e3),c=Math.max(0,(n._sprite[e][0]+n._sprite[e][1])/1e3-l),d=1e3*c/Math.abs(u._rate),f=n._sprite[e][0]/1e3,p=(n._sprite[e][0]+n._sprite[e][1])/1e3;u._sprite=e,u._ended=!1;var h=function(){u._paused=!1,u._seek=l,u._start=f,u._stop=p,u._loop=!(!u._loop&&!n._sprite[e][2])};if(!(l>=p)){var b=u._node;if(n._webAudio){var v=function(){n._playLock=!1,h(),n._refreshBuffer(u);var e=u._muted||n._muted?0:u._volume;b.gain.setValueAtTime(e,t.ctx.currentTime),u._playStart=t.ctx.currentTime,void 0===b.bufferSource.start?u._loop?b.bufferSource.noteGrainOn(0,l,86400):b.bufferSource.noteGrainOn(0,l,c):u._loop?b.bufferSource.start(0,l,86400):b.bufferSource.start(0,l,c),d!==1/0&&(n._endTimers[u._id]=setTimeout(n._ended.bind(n,u),d)),r||setTimeout((function(){n._emit("play",u._id),n._loadQueue()}),0)};"running"===t.state&&"interrupted"!==t.ctx.state?v():(n._playLock=!0,n.once("resume",v),n._clearTimer(u._id))}else{var m=function(){b.currentTime=l,b.muted=u._muted||n._muted||t._muted||b.muted,b.volume=u._volume*t.volume(),b.playbackRate=u._rate;try{var o=b.play();if(o&&"undefined"!=typeof Promise&&(o instanceof Promise||"function"==typeof o.then)?(n._playLock=!0,h(),o.then((function(){n._playLock=!1,b._unlocked=!0,r?n._loadQueue():n._emit("play",u._id)})).catch((function(){n._playLock=!1,n._emit("playerror",u._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction."),u._ended=!0,u._paused=!0}))):r||(n._playLock=!1,h(),n._emit("play",u._id)),b.playbackRate=u._rate,b.paused)return void n._emit("playerror",u._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");"__default"!==e||u._loop?n._endTimers[u._id]=setTimeout(n._ended.bind(n,u),d):(n._endTimers[u._id]=function(){n._ended(u),b.removeEventListener("ended",n._endTimers[u._id],!1)},b.addEventListener("ended",n._endTimers[u._id],!1))}catch(e){n._emit("playerror",u._id,e)}};"data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"===b.src&&(b.src=n._src,b.load());var g=window&&window.ejecta||!b.readyState&&t._navigator.isCocoonJS;if(b.readyState>=3||g)m();else{n._playLock=!0,n._state="loading";var _=function(){n._state="loaded",m(),b.removeEventListener(t._canPlayEvent,_,!1)};b.addEventListener(t._canPlayEvent,_,!1),n._clearTimer(u._id)}}return u._id}n._ended(u)},pause:function(e){var t=this;if("loaded"!==t._state||t._playLock)return t._queue.push({event:"pause",action:function(){t.pause(e)}}),t;for(var r=t._getSoundIds(e),n=0;n=0?r=parseInt(i[0],10):e=parseFloat(i[0]):i.length>=2&&(e=parseFloat(i[0]),r=parseInt(i[1],10)),!(void 0!==e&&e>=0&&e<=1))return(n=r?o._soundById(r):o._sounds[0])?n._volume:0;if("loaded"!==o._state||o._playLock)return o._queue.push({event:"volume",action:function(){o.volume.apply(o,i)}}),o;void 0===r&&(o._volume=e),r=o._getSoundIds(r);for(var a=0;a0?n/l:n),d=Date.now();e._fadeTo=r,e._interval=setInterval((function(){var o=(Date.now()-d)/n;d=Date.now(),u+=s*o,u=Math.round(100*u)/100,u=s<0?Math.max(r,u):Math.min(r,u),a._webAudio?e._volume=u:a.volume(u,e._id,!0),i&&(a._volume=u),(rt&&u>=r)&&(clearInterval(e._interval),e._interval=null,e._fadeTo=null,a.volume(r,e._id),a._emit("fade",e._id))}),c)},_stopFade:function(e){var r=this,n=r._soundById(e);return n&&n._interval&&(r._webAudio&&n._node.gain.cancelScheduledValues(t.ctx.currentTime),clearInterval(n._interval),n._interval=null,r.volume(n._fadeTo,e),n._fadeTo=null,r._emit("fade",e)),r},loop:function(){var e,t,r,n=this,o=arguments;if(0===o.length)return n._loop;if(1===o.length){if("boolean"!=typeof o[0])return!!(r=n._soundById(parseInt(o[0],10)))&&r._loop;e=o[0],n._loop=e}else 2===o.length&&(e=o[0],t=parseInt(o[1],10));for(var i=n._getSoundIds(t),a=0;a=0?r=parseInt(i[0],10):e=parseFloat(i[0]):2===i.length&&(e=parseFloat(i[0]),r=parseInt(i[1],10)),"number"!=typeof e)return(n=o._soundById(r))?n._rate:o._rate;if("loaded"!==o._state||o._playLock)return o._queue.push({event:"rate",action:function(){o.rate.apply(o,i)}}),o;void 0===r&&(o._rate=e),r=o._getSoundIds(r);for(var a=0;a=0?r=parseInt(o[0],10):n._sounds.length&&(r=n._sounds[0]._id,e=parseFloat(o[0])):2===o.length&&(e=parseFloat(o[0]),r=parseInt(o[1],10)),void 0===r)return 0;if("number"==typeof e&&("loaded"!==n._state||n._playLock))return n._queue.push({event:"seek",action:function(){n.seek.apply(n,o)}}),n;var i=n._soundById(r);if(i){if(!("number"==typeof e&&e>=0)){if(n._webAudio){var a=n.playing(r)?t.ctx.currentTime-i._playStart:0,u=i._rateSeek?i._rateSeek-i._seek:0;return i._seek+(u+a*Math.abs(i._rate))}return i._node.currentTime}var s=n.playing(r);s&&n.pause(r,!0),i._seek=e,i._ended=!1,n._clearTimer(r),n._webAudio||!i._node||isNaN(i._node.duration)||(i._node.currentTime=e);var l=function(){s&&n.play(r,!0),n._emit("seek",r)};if(s&&!n._webAudio){var c=function(){n._playLock?setTimeout(c,0):l()};setTimeout(c,0)}else l()}return n},playing:function(e){var t=this;if("number"==typeof e){var r=t._soundById(e);return!!r&&!r._paused}for(var n=0;n=0&&t._howls.splice(i,1);var a=!0;for(n=0;n=0){a=!1;break}return o&&a&&delete o[e._src],t.noAudio=!1,e._state="unloaded",e._sounds=[],e=null,null},on:function(e,t,r,n){var o=this["_on"+e];return"function"==typeof t&&o.push(n?{id:r,fn:t,once:n}:{id:r,fn:t}),this},off:function(e,t,r){var n=this,o=n["_on"+e],i=0;if("number"==typeof t&&(r=t,t=null),t||r)for(i=0;i=0;i--)o[i].id&&o[i].id!==t&&"load"!==e||(setTimeout(function(e){e.call(this,t,r)}.bind(n,o[i].fn),0),o[i].once&&n.off(e,o[i].fn,o[i].id));return n._loadQueue(e),n},_loadQueue:function(e){var t=this;if(t._queue.length>0){var r=t._queue[0];r.event===e&&(t._queue.shift(),t._loadQueue()),e||r.action()}return t},_ended:function(e){var r=this,n=e._sprite;if(!r._webAudio&&e._node&&!e._node.paused&&!e._node.ended&&e._node.currentTime=0;n--){if(r<=t)return;e._sounds[n]._ended&&(e._webAudio&&e._sounds[n]._node&&e._sounds[n]._node.disconnect(0),e._sounds.splice(n,1),r--)}}},_getSoundIds:function(e){if(void 0===e){for(var t=[],r=0;r=0;if(!e.bufferSource)return this;if(t._scratchBuffer&&e.bufferSource&&(e.bufferSource.onended=null,e.bufferSource.disconnect(0),r))try{e.bufferSource.buffer=t._scratchBuffer}catch(e){}return e.bufferSource=null,this},_clearSound:function(e){/MSIE |Trident\//.test(t._navigator&&t._navigator.userAgent)||(e.src="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA")}};var n=function(e){this._parent=e,this.init()};n.prototype={init:function(){var e=this,r=e._parent;return e._muted=r._muted,e._loop=r._loop,e._volume=r._volume,e._rate=r._rate,e._seek=0,e._paused=!0,e._ended=!0,e._sprite="__default",e._id=++t._counter,r._sounds.push(e),e.create(),e},create:function(){var e=this,r=e._parent,n=t._muted||e._muted||e._parent._muted?0:e._volume;return r._webAudio?(e._node=void 0===t.ctx.createGain?t.ctx.createGainNode():t.ctx.createGain(),e._node.gain.setValueAtTime(n,t.ctx.currentTime),e._node.paused=!0,e._node.connect(t.masterGain)):t.noAudio||(e._node=t._obtainHtml5Audio(),e._errorFn=e._errorListener.bind(e),e._node.addEventListener("error",e._errorFn,!1),e._loadFn=e._loadListener.bind(e),e._node.addEventListener(t._canPlayEvent,e._loadFn,!1),e._endFn=e._endListener.bind(e),e._node.addEventListener("ended",e._endFn,!1),e._node.src=r._src,e._node.preload=!0===r._preload?"auto":r._preload,e._node.volume=n*t.volume(),e._node.load()),e},reset:function(){var e=this,r=e._parent;return e._muted=r._muted,e._loop=r._loop,e._volume=r._volume,e._rate=r._rate,e._seek=0,e._rateSeek=0,e._paused=!0,e._ended=!0,e._sprite="__default",e._id=++t._counter,e},_errorListener:function(){var e=this;e._parent._emit("loaderror",e._id,e._node.error?e._node.error.code:0),e._node.removeEventListener("error",e._errorFn,!1)},_loadListener:function(){var e=this,r=e._parent;r._duration=Math.ceil(10*e._node.duration)/10,0===Object.keys(r._sprite).length&&(r._sprite={__default:[0,1e3*r._duration]}),"loaded"!==r._state&&(r._state="loaded",r._emit("load"),r._loadQueue()),e._node.removeEventListener(t._canPlayEvent,e._loadFn,!1)},_endListener:function(){var e=this,t=e._parent;t._duration===1/0&&(t._duration=Math.ceil(10*e._node.duration)/10,t._sprite.__default[1]===1/0&&(t._sprite.__default[1]=1e3*t._duration),t._ended(e)),e._node.removeEventListener("ended",e._endFn,!1)}};var o={},i=function(e){var t=e._src;if(o[t])return e._duration=o[t].duration,void c(e);if(/^data:[^;]+;base64,/.test(t)){for(var r=atob(t.split(",")[1]),n=new Uint8Array(r.length),i=0;i0?(o[r._src]=e,c(r,e)):n()};"undefined"!=typeof Promise&&1===t.ctx.decodeAudioData.length?t.ctx.decodeAudioData(e).then(i).catch(n):t.ctx.decodeAudioData(e,i,n)},c=function(e,t){t&&!e._duration&&(e._duration=t.duration),0===Object.keys(e._sprite).length&&(e._sprite={__default:[0,1e3*e._duration]}),"loaded"!==e._state&&(e._state="loaded",e._emit("load"),e._loadQueue())},d=function(){if(t.usingWebAudio){try{"undefined"!=typeof AudioContext?t.ctx=new AudioContext:"undefined"!=typeof webkitAudioContext?t.ctx=new webkitAudioContext:t.usingWebAudio=!1}catch(e){t.usingWebAudio=!1}t.ctx||(t.usingWebAudio=!1);var e=/iP(hone|od|ad)/.test(t._navigator&&t._navigator.platform),r=t._navigator&&t._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),n=r?parseInt(r[1],10):null;if(e&&n&&n<9){var o=/safari/.test(t._navigator&&t._navigator.userAgent.toLowerCase());t._navigator&&!o&&(t.usingWebAudio=!1)}t.usingWebAudio&&(t.masterGain=void 0===t.ctx.createGain?t.ctx.createGainNode():t.ctx.createGain(),t.masterGain.gain.setValueAtTime(t._muted?0:t._volume,t.ctx.currentTime),t.masterGain.connect(t.ctx.destination)),t._setup()}};s.Howler=t,s.Howl=r,void 0!==a?(a.HowlerGlobal=e,a.Howler=t,a.Howl=r,a.Sound=n):"undefined"!=typeof window&&(window.HowlerGlobal=e,window.Howler=t,window.Howl=r,window.Sound=n)}(), /*! * Spatial Plugin - Adds support for stereo and 3D audio where Web Audio is supported. * @@ -10,4 +10,4 @@ * * MIT License */ -function(){var e;HowlerGlobal.prototype._pos=[0,0,0],HowlerGlobal.prototype._orientation=[0,0,-1,0,1,0],HowlerGlobal.prototype.stereo=function(e){var t=this;if(!t.ctx||!t.ctx.listener)return t;for(var r=t._howls.length-1;r>=0;r--)t._howls[r].stereo(e);return t},HowlerGlobal.prototype.pos=function(e,t,r){var n=this;return n.ctx&&n.ctx.listener?(t="number"!=typeof t?n._pos[1]:t,r="number"!=typeof r?n._pos[2]:r,"number"!=typeof e?n._pos:(n._pos=[e,t,r],void 0!==n.ctx.listener.positionX?(n.ctx.listener.positionX.setTargetAtTime(n._pos[0],Howler.ctx.currentTime,.1),n.ctx.listener.positionY.setTargetAtTime(n._pos[1],Howler.ctx.currentTime,.1),n.ctx.listener.positionZ.setTargetAtTime(n._pos[2],Howler.ctx.currentTime,.1)):n.ctx.listener.setPosition(n._pos[0],n._pos[1],n._pos[2]),n)):n},HowlerGlobal.prototype.orientation=function(e,t,r,n,o,i){var a=this;if(!a.ctx||!a.ctx.listener)return a;var u=a._orientation;return t="number"!=typeof t?u[1]:t,r="number"!=typeof r?u[2]:r,n="number"!=typeof n?u[3]:n,o="number"!=typeof o?u[4]:o,i="number"!=typeof i?u[5]:i,"number"!=typeof e?u:(a._orientation=[e,t,r,n,o,i],void 0!==a.ctx.listener.forwardX?(a.ctx.listener.forwardX.setTargetAtTime(e,Howler.ctx.currentTime,.1),a.ctx.listener.forwardY.setTargetAtTime(t,Howler.ctx.currentTime,.1),a.ctx.listener.forwardZ.setTargetAtTime(r,Howler.ctx.currentTime,.1),a.ctx.listener.upX.setTargetAtTime(n,Howler.ctx.currentTime,.1),a.ctx.listener.upY.setTargetAtTime(o,Howler.ctx.currentTime,.1),a.ctx.listener.upZ.setTargetAtTime(i,Howler.ctx.currentTime,.1)):a.ctx.listener.setOrientation(e,t,r,n,o,i),a)},Howl.prototype.init=(e=Howl.prototype.init,function(t){var r=this;return r._orientation=t.orientation||[1,0,0],r._stereo=t.stereo||null,r._pos=t.pos||null,r._pannerAttr={coneInnerAngle:void 0!==t.coneInnerAngle?t.coneInnerAngle:360,coneOuterAngle:void 0!==t.coneOuterAngle?t.coneOuterAngle:360,coneOuterGain:void 0!==t.coneOuterGain?t.coneOuterGain:0,distanceModel:void 0!==t.distanceModel?t.distanceModel:"inverse",maxDistance:void 0!==t.maxDistance?t.maxDistance:1e4,panningModel:void 0!==t.panningModel?t.panningModel:"HRTF",refDistance:void 0!==t.refDistance?t.refDistance:1,rolloffFactor:void 0!==t.rolloffFactor?t.rolloffFactor:1},r._onstereo=t.onstereo?[{fn:t.onstereo}]:[],r._onpos=t.onpos?[{fn:t.onpos}]:[],r._onorientation=t.onorientation?[{fn:t.onorientation}]:[],e.call(this,t)}),Howl.prototype.stereo=function(e,r){var n=this;if(!n._webAudio)return n;if("loaded"!==n._state)return n._queue.push({event:"stereo",action:function(){n.stereo(e,r)}}),n;var o=void 0===Howler.ctx.createStereoPanner?"spatial":"stereo";if(void 0===r){if("number"!=typeof e)return n._stereo;n._stereo=e,n._pos=[e,0,0]}for(var i=n._getSoundIds(r),a=0;a=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},t=m&&m.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},r=m&&m.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},r=I&&I.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},r=ye&&ye.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(xe,"__esModule",{value:!0}),xe.AnonymousSubject=xe.Subject=void 0;var n=re(),o=j(),i=Ae(),a=x(),u=V(),s=function(e){function s(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return t(s,e),s.prototype.lift=function(e){var t=new l(this,this);return t.operator=e,t},s.prototype._throwIfClosed=function(){if(this.closed)throw new i.ObjectUnsubscribedError},s.prototype.next=function(e){var t=this;u.errorContext((function(){var n,o;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var i=r(t.currentObservers),a=i.next();!a.done;a=i.next()){a.value.next(e)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}}}))},s.prototype.error=function(e){var t=this;u.errorContext((function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var r=t.observers;r.length;)r.shift().error(e)}}))},s.prototype.complete=function(){var e=this;u.errorContext((function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}}))},s.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(s.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),s.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},s.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},s.prototype._innerSubscribe=function(e){var t=this,r=this,n=r.hasError,i=r.isStopped,u=r.observers;return n||i?o.EMPTY_SUBSCRIPTION:(this.currentObservers=null,u.push(e),new o.Subscription((function(){t.currentObservers=null,a.arrRemove(u,e)})))},s.prototype._checkFinalizedStatuses=function(e){var t=this,r=t.hasError,n=t.thrownError,o=t.isStopped;r?e.error(n):o&&e.complete()},s.prototype.asObservable=function(){var e=new n.Observable;return e.source=this,e},s.create=function(e,t){return new l(e,t)},s}(n.Observable);xe.Subject=s;var l=function(e){function r(t,r){var n=e.call(this)||this;return n.destination=t,n.source=r,n}return t(r,e),r.prototype.next=function(e){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===r||r.call(t,e)},r.prototype.error=function(e){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===r||r.call(t,e)},r.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},r.prototype._subscribe=function(e){var t,r;return null!==(r=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==r?r:o.EMPTY_SUBSCRIPTION},r}(s);return xe.AnonymousSubject=l,xe}var Te,ke={};function Ee(){if(Te)return ke;Te=1;var e,t=ke&&ke.__extends||(e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)},function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)});Object.defineProperty(ke,"__esModule",{value:!0}),ke.BehaviorSubject=void 0;var r=function(e){function r(t){var r=e.call(this)||this;return r._value=t,r}return t(r,e),Object.defineProperty(r.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),r.prototype._subscribe=function(t){var r=e.prototype._subscribe.call(this,t);return!r.closed&&t.next(this._value),r},r.prototype.getValue=function(){var e=this,t=e.hasError,r=e.thrownError,n=e._value;if(t)throw r;return this._throwIfClosed(),n},r.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},r}($e().Subject);return ke.BehaviorSubject=r,ke}var Me,Ie,Fe={},Ce={};function Le(){return Me||(Me=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.dateTimestampProvider=void 0,e.dateTimestampProvider={now:function(){return(e.dateTimestampProvider.delegate||Date).now()},delegate:void 0}}(Ce)),Ce}function Re(){if(Ie)return Fe;Ie=1;var e,t=Fe&&Fe.__extends||(e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)},function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)});Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.ReplaySubject=void 0;var r=$e(),n=Le(),o=function(e){function r(t,r,o){void 0===t&&(t=1/0),void 0===r&&(r=1/0),void 0===o&&(o=n.dateTimestampProvider);var i=e.call(this)||this;return i._bufferSize=t,i._windowTime=r,i._timestampProvider=o,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=r===1/0,i._bufferSize=Math.max(1,t),i._windowTime=Math.max(1,r),i}return t(r,e),r.prototype.next=function(t){var r=this,n=r.isStopped,o=r._buffer,i=r._infiniteTimeWindow,a=r._timestampProvider,u=r._windowTime;n||(o.push(t),!i&&o.push(a.now()+u)),this._trimBuffer(),e.prototype.next.call(this,t)},r.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),r=this._infiniteTimeWindow,n=this._buffer.slice(),o=0;o0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},r=Ye&&Ye.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},r=Je&&Je.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r0?e.prototype.requestAsyncId.call(this,t,r,o):(t.actions.push(this),t._scheduled||(t._scheduled=n.immediateProvider.setImmediate(t.flush.bind(t,void 0))))},r.prototype.recycleAsyncId=function(t,r,o){var i;if(void 0===o&&(o=0),null!=o?o>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,t,r,o);var a=t.actions;null!=r&&(null===(i=a[a.length-1])||void 0===i?void 0:i.id)!==r&&(n.immediateProvider.clearImmediate(r),t._scheduled===r&&(t._scheduled=void 0))},r}(r.AsyncAction);return qe.AsapAction=o,qe}(),r=function(){if(ot)return at;ot=1;var e,t=at&&at.__extends||(e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)},function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)});Object.defineProperty(at,"__esModule",{value:!0}),at.AsapScheduler=void 0;var r=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return t(r,e),r.prototype.flush=function(e){this._active=!0;var t=this._scheduled;this._scheduled=void 0;var r,n=this.actions;e=e||n.shift();do{if(r=e.execute(e.state,e.delay))break}while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,r){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw r}},r}(ct().AsyncScheduler);return at.AsapScheduler=r,at}();e.asapScheduler=new r.AsapScheduler(t.AsapAction),e.asap=e.asapScheduler}(Be)),Be}var ft,pt={};function ht(){return ft||(ft=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.async=e.asyncScheduler=void 0;var t=Xe(),r=ct();e.asyncScheduler=new r.AsyncScheduler(t.AsyncAction),e.async=e.asyncScheduler}(pt)),pt}var bt,vt={},mt={};var gt,_t,yt={};function wt(){return _t||(_t=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.queue=e.queueScheduler=void 0;var t=function(){if(bt)return mt;bt=1;var e,t=mt&&mt.__extends||(e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)},function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)});Object.defineProperty(mt,"__esModule",{value:!0}),mt.QueueAction=void 0;var r=function(e){function r(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return t(r,e),r.prototype.schedule=function(t,r){return void 0===r&&(r=0),r>0?e.prototype.schedule.call(this,t,r):(this.delay=r,this.state=t,this.scheduler.flush(this),this)},r.prototype.execute=function(t,r){return r>0||this.closed?e.prototype.execute.call(this,t,r):this._execute(t,r)},r.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!=n&&n>0||null==n&&this.delay>0?e.prototype.requestAsyncId.call(this,t,r,n):(t.flush(this),0)},r}(Xe().AsyncAction);return mt.QueueAction=r,mt}(),r=function(){if(gt)return yt;gt=1;var e,t=yt&&yt.__extends||(e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)},function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)});Object.defineProperty(yt,"__esModule",{value:!0}),yt.QueueScheduler=void 0;var r=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return t(r,e),r}(ct().AsyncScheduler);return yt.QueueScheduler=r,yt}();e.queueScheduler=new r.QueueScheduler(t.QueueAction),e.queue=e.queueScheduler}(vt)),vt}var Ot,St={},Pt={};var xt,jt,At={};function $t(){return jt||(jt=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.animationFrame=e.animationFrameScheduler=void 0;var t=function(){if(Ot)return Pt;Ot=1;var e,t=Pt&&Pt.__extends||(e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)},function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)});Object.defineProperty(Pt,"__esModule",{value:!0}),Pt.AnimationFrameAction=void 0;var r=Xe(),n=we(),o=function(e){function r(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return t(r,e),r.prototype.requestAsyncId=function(t,r,o){return void 0===o&&(o=0),null!==o&&o>0?e.prototype.requestAsyncId.call(this,t,r,o):(t.actions.push(this),t._scheduled||(t._scheduled=n.animationFrameProvider.requestAnimationFrame((function(){return t.flush(void 0)}))))},r.prototype.recycleAsyncId=function(t,r,o){var i;if(void 0===o&&(o=0),null!=o?o>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,t,r,o);var a=t.actions;null!=r&&r===t._scheduled&&(null===(i=a[a.length-1])||void 0===i?void 0:i.id)!==r&&(n.animationFrameProvider.cancelAnimationFrame(r),t._scheduled=void 0)},r}(r.AsyncAction);return Pt.AnimationFrameAction=o,Pt}(),r=function(){if(xt)return At;xt=1;var e,t=At&&At.__extends||(e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)},function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)});Object.defineProperty(At,"__esModule",{value:!0}),At.AnimationFrameScheduler=void 0;var r=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return t(r,e),r.prototype.flush=function(e){var t;this._active=!0,e?t=e.id:(t=this._scheduled,this._scheduled=void 0);var r,n=this.actions;e=e||n.shift();do{if(r=e.execute(e.state,e.delay))break}while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,r){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw r}},r}(ct().AsyncScheduler);return At.AnimationFrameScheduler=r,At}();e.animationFrameScheduler=new r.AnimationFrameScheduler(t.AnimationFrameAction),e.animationFrame=e.animationFrameScheduler}(St)),St}var Tt,kt={};var Et,Mt={},It={};function Ft(){return Et||(Et=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.empty=e.EMPTY=void 0;var t=re();e.EMPTY=new t.Observable((function(e){return e.complete()})),e.empty=function(r){return r?function(e){return new t.Observable((function(t){return e.schedule((function(){return t.complete()}))}))}(r):e.EMPTY}}(It)),It}var Ct,Lt,Rt={},Nt={},Wt={};function zt(){if(Ct)return Wt;Ct=1,Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.isScheduler=void 0;var e=h();return Wt.isScheduler=function(t){return t&&e.isFunction(t.schedule)},Wt}function Dt(){if(Lt)return Nt;Lt=1,Object.defineProperty(Nt,"__esModule",{value:!0}),Nt.popNumber=Nt.popScheduler=Nt.popResultSelector=void 0;var e=h(),t=zt();function r(e){return e[e.length-1]}return Nt.popResultSelector=function(t){return e.isFunction(r(t))?t.pop():void 0},Nt.popScheduler=function(e){return t.isScheduler(r(e))?e.pop():void 0},Nt.popNumber=function(e,t){return"number"==typeof r(e)?e.pop():t},Nt}var Bt,qt={},Vt={},Ut={},Ht={},Gt={};function Yt(){return Bt||(Bt=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.isArrayLike=void 0,Gt.isArrayLike=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e}),Gt}var Xt,Qt={};function Kt(){if(Xt)return Qt;Xt=1,Object.defineProperty(Qt,"__esModule",{value:!0}),Qt.isPromise=void 0;var e=h();return Qt.isPromise=function(t){return e.isFunction(null==t?void 0:t.then)},Qt}var Zt,Jt={};function er(){if(Zt)return Jt;Zt=1,Object.defineProperty(Jt,"__esModule",{value:!0}),Jt.isInteropObservable=void 0;var e=Y(),t=h();return Jt.isInteropObservable=function(r){return t.isFunction(r[e.observable])},Jt}var tr,rr={};function nr(){if(tr)return rr;tr=1,Object.defineProperty(rr,"__esModule",{value:!0}),rr.isAsyncIterable=void 0;var e=h();return rr.isAsyncIterable=function(t){return Symbol.asyncIterator&&e.isFunction(null==t?void 0:t[Symbol.asyncIterator])},rr}var or,ir={};function ar(){if(or)return ir;return or=1,Object.defineProperty(ir,"__esModule",{value:!0}),ir.createInvalidObservableTypeError=void 0,ir.createInvalidObservableTypeError=function(e){return new TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")},ir}var ur,sr,lr={},cr={};function dr(){if(ur)return cr;function e(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}return ur=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.iterator=cr.getSymbolIterator=void 0,cr.getSymbolIterator=e,cr.iterator=e(),cr}function fr(){if(sr)return lr;sr=1,Object.defineProperty(lr,"__esModule",{value:!0}),lr.isIterable=void 0;var e=dr(),t=h();return lr.isIterable=function(r){return t.isFunction(null==r?void 0:r[e.iterator])},lr}var pr,hr,br={};function vr(){if(pr)return br;pr=1;var e=br&&br.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]1||s(e,t)}))})}function s(e,r){try{(n=i[e](r)).value instanceof t?Promise.resolve(n.value.v).then(l,c):d(a[0][2],n)}catch(e){d(a[0][3],e)}var n}function l(e){s("next",e)}function c(e){s("throw",e)}function d(e,t){e(t),a.shift(),a.length&&s(a[0][0],a[0][1])}};Object.defineProperty(br,"__esModule",{value:!0}),br.isReadableStreamLike=br.readableStreamLikeToAsyncGenerator=void 0;var n=h();return br.readableStreamLikeToAsyncGenerator=function(n){return r(this,arguments,(function(){var r,o,i;return e(this,(function(e){switch(e.label){case 0:r=n.getReader(),e.label=1;case 1:e.trys.push([1,,9,10]),e.label=2;case 2:return[4,t(r.read())];case 3:return o=e.sent(),i=o.value,o.done?[4,t(void 0)]:[3,5];case 4:return[2,e.sent()];case 5:return[4,t(i)];case 6:return[4,e.sent()];case 7:return e.sent(),[3,2];case 8:return[3,10];case 9:return r.releaseLock(),[7];case 10:return[2]}}))}))},br.isReadableStreamLike=function(e){return n.isFunction(null==e?void 0:e.getReader)},br}function mr(){if(hr)return Ht;hr=1;var e=Ht&&Ht.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{s(n.next(e))}catch(e){i(e)}}function u(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,u)}s((n=n.apply(e,t||[])).next())}))},t=Ht&&Ht.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.fromReadableStreamLike=Ht.fromAsyncIterable=Ht.fromIterable=Ht.fromPromise=Ht.fromArrayLike=Ht.fromInteropObservable=Ht.innerFrom=void 0;var o=Yt(),i=Kt(),a=re(),u=er(),s=nr(),l=ar(),c=fr(),d=vr(),f=h(),p=C(),b=Y();function v(e){return new a.Observable((function(t){var r=e[b.observable]();if(f.isFunction(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")}))}function m(e){return new a.Observable((function(t){for(var r=0;r0&&l(d)}),void 0,void 0,(function(){(null==n?void 0:n.closed)||null==n||n.unsubscribe(),i=null}))),!s&&l(null!=c?"number"==typeof c?c:+c-b.now():d)}))}}(gn)),gn}var On,Sn,Pn,xn,jn={},An={},$n={},Tn={};function kn(){if(On)return Tn;On=1,Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.map=void 0;var e=ue(),t=fe();return Tn.map=function(r,n){return e.operate((function(e,o){var i=0;e.subscribe(t.createOperatorSubscriber(o,(function(e){o.next(r.call(n,e,i++))})))}))},Tn}function En(){if(Sn)return $n;Sn=1;var e=$n&&$n.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},t=$n&&$n.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},t=An&&An.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a};Object.defineProperty(ho,"__esModule",{value:!0}),ho.fromEvent=void 0;var t=mr(),r=re(),n=to(),o=Yt(),i=h(),a=En(),u=["addListener","removeListener"],s=["addEventListener","removeEventListener"],l=["on","off"];function c(e,t){return function(r){return function(n){return e[r](t,n)}}}return ho.fromEvent=function d(f,p,h,b){if(i.isFunction(h)&&(b=h,h=void 0),b)return d(f,p,h).pipe(a.mapOneOrManyArgs(b));var v=e(function(e){return i.isFunction(e.addEventListener)&&i.isFunction(e.removeEventListener)}(f)?s.map((function(e){return function(t){return f[e](p,t,h)}})):function(e){return i.isFunction(e.addListener)&&i.isFunction(e.removeListener)}(f)?u.map(c(f,p)):function(e){return i.isFunction(e.on)&&i.isFunction(e.off)}(f)?l.map(c(f,p)):[],2),m=v[0],g=v[1];if(!m&&o.isArrayLike(f))return n.mergeMap((function(e){return d(e,p,h)}))(t.innerFrom(f));if(!m)throw new TypeError("Invalid event target");return new r.Observable((function(e){var t=function(){for(var t=[],r=0;r0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},t=oi&&oi.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(gi,"__esModule",{value:!0}),gi.bufferCount=void 0;var t=ue(),r=fe(),n=x();return gi.bufferCount=function(o,i){return void 0===i&&(i=null),i=null!=i?i:o,t.operate((function(t,a){var u=[],s=0;t.subscribe(r.createOperatorSubscriber(a,(function(t){var r,l,c,d,f=null;s++%i==0&&u.push([]);try{for(var p=e(u),h=p.next();!h.done;h=p.next()){(m=h.value).push(t),o<=m.length&&(f=null!=f?f:[]).push(m)}}catch(e){r={error:e}}finally{try{h&&!h.done&&(l=p.return)&&l.call(p)}finally{if(r)throw r.error}}if(f)try{for(var b=e(f),v=b.next();!v.done;v=b.next()){var m=v.value;n.arrRemove(u,m),a.next(m)}}catch(e){c={error:e}}finally{try{v&&!v.done&&(d=b.return)&&d.call(b)}finally{if(c)throw c.error}}}),(function(){var t,r;try{for(var n=e(u),o=n.next();!o.done;o=n.next()){var i=o.value;a.next(i)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}a.complete()}),void 0,(function(){u=null})))}))},gi}var yi,wi={};function Oi(){if(yi)return wi;yi=1;var e=wi&&wi.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(wi,"__esModule",{value:!0}),wi.bufferTime=void 0;var t=j(),r=ue(),n=fe(),o=x(),i=ht(),a=Dt(),u=Or();return wi.bufferTime=function(s){for(var l,c,d=[],f=1;f=0?u.executeSchedule(i,p,d,h,!0):l=!0,d();var f=n.createOperatorSubscriber(i,(function(t){var r,n,o=a.slice();try{for(var i=e(o),u=i.next();!u.done;u=i.next()){var s=u.value,l=s.buffer;l.push(t),b<=l.length&&c(s)}}catch(e){r={error:e}}finally{try{u&&!u.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}}),(function(){for(;null==a?void 0:a.length;)i.next(a.shift().buffer);null==f||f.unsubscribe(),i.complete(),i.unsubscribe()}),void 0,(function(){return a=null}));r.subscribe(f)}))},wi}var Si,Pi={};function xi(){if(Si)return Pi;Si=1;var e=Pi&&Pi.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Pi,"__esModule",{value:!0}),Pi.bufferToggle=void 0;var t=j(),r=ue(),n=mr(),o=fe(),i=N(),a=x();return Pi.bufferToggle=function(u,s){return r.operate((function(r,l){var c=[];n.innerFrom(u).subscribe(o.createOperatorSubscriber(l,(function(e){var r=[];c.push(r);var u=new t.Subscription;u.add(n.innerFrom(s(e)).subscribe(o.createOperatorSubscriber(l,(function(){a.arrRemove(c,r),l.next(r),u.unsubscribe()}),i.noop)))}),i.noop)),r.subscribe(o.createOperatorSubscriber(l,(function(t){var r,n;try{for(var o=e(c),i=o.next();!i.done;i=o.next()){i.value.push(t)}}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}}),(function(){for(;c.length>0;)l.next(c.shift());l.complete()})))}))},Pi}var ji,Ai={};function $i(){if(ji)return Ai;ji=1,Object.defineProperty(Ai,"__esModule",{value:!0}),Ai.bufferWhen=void 0;var e=ue(),t=N(),r=fe(),n=mr();return Ai.bufferWhen=function(o){return e.operate((function(e,i){var a=null,u=null,s=function(){null==u||u.unsubscribe();var e=a;a=[],e&&i.next(e),n.innerFrom(o()).subscribe(u=r.createOperatorSubscriber(i,s,t.noop))};s(),e.subscribe(r.createOperatorSubscriber(i,(function(e){return null==a?void 0:a.push(e)}),(function(){a&&i.next(a),i.complete()}),void 0,(function(){return a=u=null})))}))},Ai}var Ti,ki={};function Ei(){if(Ti)return ki;Ti=1,Object.defineProperty(ki,"__esModule",{value:!0}),ki.catchError=void 0;var e=mr(),t=fe(),r=ue();return ki.catchError=function n(o){return r.operate((function(r,i){var a,u=null,s=!1;u=r.subscribe(t.createOperatorSubscriber(i,void 0,void 0,(function(t){a=e.innerFrom(o(t,n(o)(r))),u?(u.unsubscribe(),u=null,a.subscribe(i)):s=!0}))),s&&(u.unsubscribe(),u=null,a.subscribe(i))}))},ki}var Mi,Ii,Fi,Ci,Li,Ri,Ni={},Wi={},zi={},Di={},Bi={},qi={};function Vi(){if(Mi)return qi;Mi=1,Object.defineProperty(qi,"__esModule",{value:!0}),qi.scanInternals=void 0;var e=fe();return qi.scanInternals=function(t,r,n,o,i){return function(a,u){var s=n,l=r,c=0;a.subscribe(e.createOperatorSubscriber(u,(function(e){var r=c++;l=s?t(l,e,r):(s=!0,e),o&&u.next(l)}),i&&function(){s&&u.next(l),u.complete()}))}},qi}function Ui(){if(Ii)return Bi;Ii=1,Object.defineProperty(Bi,"__esModule",{value:!0}),Bi.reduce=void 0;var e=Vi(),t=ue();return Bi.reduce=function(r,n){return t.operate(e.scanInternals(r,n,arguments.length>=2,!1,!0))},Bi}function Hi(){if(Fi)return Di;Fi=1,Object.defineProperty(Di,"__esModule",{value:!0}),Di.toArray=void 0;var e=Ui(),t=ue(),r=function(e,t){return e.push(t),e};return Di.toArray=function(){return t.operate((function(t,n){e.reduce(r,[])(t).subscribe(n)}))},Di}function Gi(){if(Ci)return zi;Ci=1,Object.defineProperty(zi,"__esModule",{value:!0}),zi.joinAllInternals=void 0;var e=ee(),t=En(),r=te(),n=to(),o=Hi();return zi.joinAllInternals=function(i,a){return r.pipe(o.toArray(),n.mergeMap((function(e){return i(e)})),a?t.mapOneOrManyArgs(a):e.identity)},zi}function Yi(){if(Li)return Wi;Li=1,Object.defineProperty(Wi,"__esModule",{value:!0}),Wi.combineLatestAll=void 0;var e=qn(),t=Gi();return Wi.combineLatestAll=function(r){return t.joinAllInternals(e.combineLatest,r)},Wi}function Xi(){if(Ri)return Ni;Ri=1,Object.defineProperty(Ni,"__esModule",{value:!0}),Ni.combineAll=void 0;var e=Yi();return Ni.combineAll=e.combineLatestAll,Ni}var Qi,Ki,Zi={},Ji={};function ea(){if(Qi)return Ji;Qi=1;var e=Ji&&Ji.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},t=Ji&&Ji.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},t=Zi&&Zi.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},t=da&&da.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},t=ca&&ca.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r=2;return function(s){return s.pipe(t.filter((function(e,t){return t===i})),o.take(1),u?n.defaultIfEmpty(a):r.throwIfEmpty((function(){return new e.ArgumentOutOfRangeError})))}},au}var cu,du={};function fu(){if(cu)return du;cu=1;var e=du&&du.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},t=du&&du.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r=2;return function(l){return l.pipe(a?t.filter((function(e,t){return a(e,t,l)})):i.identity,r.take(1),s?n.defaultIfEmpty(u):o.throwIfEmpty((function(){return new e.EmptyError})))}},Nu}var zu,Du={};function Bu(){if(zu)return Du;zu=1,Object.defineProperty(Du,"__esModule",{value:!0}),Du.groupBy=void 0;var e=re(),t=mr(),r=$e(),n=ue(),o=fe();return Du.groupBy=function(i,a,u,s){return n.operate((function(n,l){var c;a&&"function"!=typeof a?(u=a.duration,c=a.element,s=a.connector):c=a;var d=new Map,f=function(e){d.forEach(e),e(l)},p=function(e){return f((function(t){return t.error(e)}))},h=0,b=!1,v=new o.OperatorSubscriber(l,(function(n){try{var a=i(n),f=d.get(a);if(!f){d.set(a,f=s?s():new r.Subject);var m=(_=a,y=f,(w=new e.Observable((function(e){h++;var t=y.subscribe(e);return function(){t.unsubscribe(),0==--h&&b&&v.unsubscribe()}}))).key=_,w);if(l.next(m),u){var g=o.createOperatorSubscriber(f,(function(){f.complete(),null==g||g.unsubscribe()}),void 0,void 0,(function(){return d.delete(a)}));v.add(t.innerFrom(u(m)).subscribe(g))}}f.next(c?c(n):n)}catch(e){p(e)}var _,y,w}),(function(){return f((function(e){return e.complete()}))}),p,(function(){return d.clear()}),(function(){return b=!0,0===h}));n.subscribe(v)}))},Du}var qu,Vu={};function Uu(){if(qu)return Vu;qu=1,Object.defineProperty(Vu,"__esModule",{value:!0}),Vu.isEmpty=void 0;var e=ue(),t=fe();return Vu.isEmpty=function(){return e.operate((function(e,r){e.subscribe(t.createOperatorSubscriber(r,(function(){r.next(!1),r.complete()}),(function(){r.next(!0),r.complete()})))}))},Vu}var Hu,Gu,Yu={},Xu={};function Qu(){if(Hu)return Xu;Hu=1;var e=Xu&&Xu.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Xu,"__esModule",{value:!0}),Xu.takeLast=void 0;var t=Ft(),r=ue(),n=fe();return Xu.takeLast=function(o){return o<=0?function(){return t.EMPTY}:r.operate((function(t,r){var i=[];t.subscribe(n.createOperatorSubscriber(r,(function(e){i.push(e),o=2;return function(l){return l.pipe(a?t.filter((function(e,t){return a(e,t,l)})):i.identity,r.takeLast(1),s?o.defaultIfEmpty(u):n.throwIfEmpty((function(){return new e.EmptyError})))}},Yu}var Zu,Ju={};function es(){if(Zu)return Ju;Zu=1,Object.defineProperty(Ju,"__esModule",{value:!0}),Ju.materialize=void 0;var e=Qr(),t=ue(),r=fe();return Ju.materialize=function(){return t.operate((function(t,n){t.subscribe(r.createOperatorSubscriber(n,(function(t){n.next(e.Notification.createNext(t))}),(function(){n.next(e.Notification.createComplete()),n.complete()}),(function(t){n.next(e.Notification.createError(t)),n.complete()})))}))},Ju}var ts,rs={};function ns(){if(ts)return rs;ts=1,Object.defineProperty(rs,"__esModule",{value:!0}),rs.max=void 0;var e=Ui(),t=h();return rs.max=function(r){return e.reduce(t.isFunction(r)?function(e,t){return r(e,t)>0?e:t}:function(e,t){return e>t?e:t})},rs}var os,is={};function as(){if(os)return is;os=1,Object.defineProperty(is,"__esModule",{value:!0}),is.flatMap=void 0;var e=to();return is.flatMap=e.mergeMap,is}var us,ss={};function ls(){if(us)return ss;us=1,Object.defineProperty(ss,"__esModule",{value:!0}),ss.mergeMapTo=void 0;var e=to(),t=h();return ss.mergeMapTo=function(r,n,o){return void 0===o&&(o=1/0),t.isFunction(n)?e.mergeMap((function(){return r}),n,o):("number"==typeof n&&(o=n),e.mergeMap((function(){return r}),o))},ss}var cs,ds={};function fs(){if(cs)return ds;cs=1,Object.defineProperty(ds,"__esModule",{value:!0}),ds.mergeScan=void 0;var e=ue(),t=eo();return ds.mergeScan=function(r,n,o){return void 0===o&&(o=1/0),e.operate((function(e,i){var a=n;return t.mergeInternals(e,i,(function(e,t){return r(a,e,t)}),o,(function(e){a=e}),!1,void 0,(function(){return a=null}))}))},ds}var ps,hs,bs={},vs={};function ms(){if(ps)return vs;ps=1;var e=vs&&vs.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},t=vs&&vs.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},t=bs&&bs.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},t=js&&js.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},t=Gs&&Gs.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r=2,!0))},hl}var vl,ml={};function gl(){if(vl)return ml;vl=1,Object.defineProperty(ml,"__esModule",{value:!0}),ml.sequenceEqual=void 0;var e=ue(),t=fe(),r=mr();return ml.sequenceEqual=function(n,o){return void 0===o&&(o=function(e,t){return e===t}),e.operate((function(e,i){var a={buffer:[],complete:!1},u={buffer:[],complete:!1},s=function(e){i.next(e),i.complete()},l=function(e,r){var n=t.createOperatorSubscriber(i,(function(t){var n=r.buffer,i=r.complete;0===n.length?i?s(!1):e.buffer.push(t):!o(t,n.shift())&&s(!1)}),(function(){e.complete=!0;var t=r.complete,o=r.buffer;t&&s(0===o.length),null==n||n.unsubscribe()}));return n};e.subscribe(l(a,u)),r.innerFrom(n).subscribe(l(u,a))}))},ml}var _l,yl={};function wl(){if(_l)return yl;_l=1;var e=yl&&yl.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},t=yl&&yl.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r0&&(t=new o.SafeSubscriber({next:function(e){return g.next(e)},error:function(e){h=!0,b(),n=a(v,l,e),g.error(e)},complete:function(){f=!0,b(),n=a(v,d),g.complete()}}),r.innerFrom(e).subscribe(t))}))(e)}},yl}var Ol,Sl={};function Pl(){if(Ol)return Sl;Ol=1,Object.defineProperty(Sl,"__esModule",{value:!0}),Sl.shareReplay=void 0;var e=Re(),t=wl();return Sl.shareReplay=function(r,n,o){var i,a,u,s,l=!1;return r&&"object"==typeof r?(i=r.bufferSize,s=void 0===i?1/0:i,a=r.windowTime,n=void 0===a?1/0:a,l=void 0!==(u=r.refCount)&&u,o=r.scheduler):s=null!=r?r:1/0,t.share({connector:function(){return new e.ReplaySubject(s,n,o)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:l})},Sl}var xl,jl={};function Al(){if(xl)return jl;xl=1,Object.defineProperty(jl,"__esModule",{value:!0}),jl.single=void 0;var e=nn(),t=bn(),r=fn(),n=ue(),o=fe();return jl.single=function(i){return n.operate((function(n,a){var u,s=!1,l=!1,c=0;n.subscribe(o.createOperatorSubscriber(a,(function(e){l=!0,i&&!i(e,c++,n)||(s&&a.error(new t.SequenceError("Too many matching values")),s=!0,u=e)}),(function(){s?(a.next(u),a.complete()):a.error(l?new r.NotFoundError("No matching values"):new e.EmptyError)})))}))},jl}var $l,Tl={};function kl(){if($l)return Tl;$l=1,Object.defineProperty(Tl,"__esModule",{value:!0}),Tl.skip=void 0;var e=Xo();return Tl.skip=function(t){return e.filter((function(e,r){return t<=r}))},Tl}var El,Ml={};function Il(){if(El)return Ml;El=1,Object.defineProperty(Ml,"__esModule",{value:!0}),Ml.skipLast=void 0;var e=ee(),t=ue(),r=fe();return Ml.skipLast=function(n){return n<=0?e.identity:t.operate((function(e,t){var o=new Array(n),i=0;return e.subscribe(r.createOperatorSubscriber(t,(function(e){var r=i++;if(r=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Tc,"__esModule",{value:!0}),Tc.windowCount=void 0;var t=$e(),r=ue(),n=fe();return Tc.windowCount=function(o,i){void 0===i&&(i=0);var a=i>0?i:o;return r.operate((function(r,i){var u=[new t.Subject],s=0;i.next(u[0].asObservable()),r.subscribe(n.createOperatorSubscriber(i,(function(r){var n,l;try{for(var c=e(u),d=c.next();!d.done;d=c.next()){d.value.next(r)}}catch(e){n={error:e}}finally{try{d&&!d.done&&(l=c.return)&&l.call(c)}finally{if(n)throw n.error}}var f=s-o+1;if(f>=0&&f%a==0&&u.shift().complete(),++s%a==0){var p=new t.Subject;u.push(p),i.next(p.asObservable())}}),(function(){for(;u.length>0;)u.shift().complete();i.complete()}),(function(e){for(;u.length>0;)u.shift().error(e);i.error(e)}),(function(){u=null})))}))},Tc}var Ec,Mc={};function Ic(){if(Ec)return Mc;Ec=1,Object.defineProperty(Mc,"__esModule",{value:!0}),Mc.windowTime=void 0;var e=$e(),t=ht(),r=j(),n=ue(),o=fe(),i=x(),a=Dt(),u=Or();return Mc.windowTime=function(s){for(var l,c,d=[],f=1;f=0?u.executeSchedule(n,p,d,h,!0):l=!0,d();var f=function(e){return a.slice().forEach(e)},v=function(e){f((function(t){var r=t.window;return e(r)})),e(n),n.unsubscribe()};return t.subscribe(o.createOperatorSubscriber(n,(function(e){f((function(t){t.window.next(e),b<=++t.seen&&c(t)}))}),(function(){return v((function(e){return e.complete()}))}),(function(e){return v((function(t){return t.error(e)}))}))),function(){a=null}}))},Mc}var Fc,Cc={};function Lc(){if(Fc)return Cc;Fc=1;var e=Cc&&Cc.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Cc,"__esModule",{value:!0}),Cc.windowToggle=void 0;var t=$e(),r=j(),n=ue(),o=mr(),i=fe(),a=N(),u=x();return Cc.windowToggle=function(s,l){return n.operate((function(n,c){var d=[],f=function(e){for(;00)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},t=Dc&&Dc.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},t=Qc&&Qc.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},t=Xc&&Xc.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;rt.index?1:-1:e.delay>t.delay?1:-1},r}(r.AsyncAction);return kt.VirtualAction=i,kt}();Object.defineProperty(e,"VirtualTimeScheduler",{enumerable:!0,get:function(){return m.VirtualTimeScheduler}}),Object.defineProperty(e,"VirtualAction",{enumerable:!0,get:function(){return m.VirtualAction}});var g=lt();Object.defineProperty(e,"Scheduler",{enumerable:!0,get:function(){return g.Scheduler}});var _=j();Object.defineProperty(e,"Subscription",{enumerable:!0,get:function(){return _.Subscription}});var y=U();Object.defineProperty(e,"Subscriber",{enumerable:!0,get:function(){return y.Subscriber}});var O=Qr();Object.defineProperty(e,"Notification",{enumerable:!0,get:function(){return O.Notification}}),Object.defineProperty(e,"NotificationKind",{enumerable:!0,get:function(){return O.NotificationKind}});var S=te();Object.defineProperty(e,"pipe",{enumerable:!0,get:function(){return S.pipe}});var P=N();Object.defineProperty(e,"noop",{enumerable:!0,get:function(){return P.noop}});var x=ee();Object.defineProperty(e,"identity",{enumerable:!0,get:function(){return x.identity}});var A=function(){if(Kr)return Zr;Kr=1,Object.defineProperty(Zr,"__esModule",{value:!0}),Zr.isObservable=void 0;var e=re(),t=h();return Zr.isObservable=function(r){return!!r&&(r instanceof e.Observable||t.isFunction(r.lift)&&t.isFunction(r.subscribe))},Zr}();Object.defineProperty(e,"isObservable",{enumerable:!0,get:function(){return A.isObservable}});var $=function(){if(en)return tn;en=1,Object.defineProperty(tn,"__esModule",{value:!0}),tn.lastValueFrom=void 0;var e=nn();return tn.lastValueFrom=function(t,r){var n="object"==typeof r;return new Promise((function(o,i){var a,u=!1;t.subscribe({next:function(e){a=e,u=!0},error:i,complete:function(){u?o(a):n?o(r.defaultValue):i(new e.EmptyError)}})}))},tn}();Object.defineProperty(e,"lastValueFrom",{enumerable:!0,get:function(){return $.lastValueFrom}});var k=function(){if(on)return an;on=1,Object.defineProperty(an,"__esModule",{value:!0}),an.firstValueFrom=void 0;var e=nn(),t=U();return an.firstValueFrom=function(r,n){var o="object"==typeof n;return new Promise((function(i,a){var u=new t.SafeSubscriber({next:function(e){i(e),u.unsubscribe()},error:a,complete:function(){o?i(n.defaultValue):a(new e.EmptyError)}});r.subscribe(u)}))},an}();Object.defineProperty(e,"firstValueFrom",{enumerable:!0,get:function(){return k.firstValueFrom}});var E=ln();Object.defineProperty(e,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return E.ArgumentOutOfRangeError}});var M=nn();Object.defineProperty(e,"EmptyError",{enumerable:!0,get:function(){return M.EmptyError}});var I=fn();Object.defineProperty(e,"NotFoundError",{enumerable:!0,get:function(){return I.NotFoundError}});var F=Ae();Object.defineProperty(e,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return F.ObjectUnsubscribedError}});var C=bn();Object.defineProperty(e,"SequenceError",{enumerable:!0,get:function(){return C.SequenceError}});var L=wn();Object.defineProperty(e,"TimeoutError",{enumerable:!0,get:function(){return L.TimeoutError}});var R=w();Object.defineProperty(e,"UnsubscriptionError",{enumerable:!0,get:function(){return R.UnsubscriptionError}});var W=function(){if(xn)return jn;xn=1,Object.defineProperty(jn,"__esModule",{value:!0}),jn.bindCallback=void 0;var e=Mn();return jn.bindCallback=function(t,r,n){return e.bindCallbackInternals(!1,t,r,n)},jn}();Object.defineProperty(e,"bindCallback",{enumerable:!0,get:function(){return W.bindCallback}});var z=function(){if(In)return Fn;In=1,Object.defineProperty(Fn,"__esModule",{value:!0}),Fn.bindNodeCallback=void 0;var e=Mn();return Fn.bindNodeCallback=function(t,r,n){return e.bindCallbackInternals(!0,t,r,n)},Fn}();Object.defineProperty(e,"bindNodeCallback",{enumerable:!0,get:function(){return z.bindNodeCallback}});var D=qn();Object.defineProperty(e,"combineLatest",{enumerable:!0,get:function(){return D.combineLatest}});var B=oo();Object.defineProperty(e,"concat",{enumerable:!0,get:function(){return B.concat}});var q=function(){if(ao)return uo;ao=1,Object.defineProperty(uo,"__esModule",{value:!0}),uo.connectable=void 0;var e=$e(),t=re(),r=lo(),n={connector:function(){return new e.Subject},resetOnDisconnect:!0};return uo.connectable=function(e,o){void 0===o&&(o=n);var i=null,a=o.connector,u=o.resetOnDisconnect,s=void 0===u||u,l=a(),c=new t.Observable((function(e){return l.subscribe(e)}));return c.connect=function(){return i&&!i.closed||(i=r.defer((function(){return e})).subscribe(l),s&&i.add((function(){return l=a()}))),i},c},uo}();Object.defineProperty(e,"connectable",{enumerable:!0,get:function(){return q.connectable}});var V=lo();Object.defineProperty(e,"defer",{enumerable:!0,get:function(){return V.defer}});var H=Ft();Object.defineProperty(e,"empty",{enumerable:!0,get:function(){return H.empty}});var G=function(){if(co)return fo;co=1,Object.defineProperty(fo,"__esModule",{value:!0}),fo.forkJoin=void 0;var e=re(),t=Nn(),r=mr(),n=Dt(),o=fe(),i=En(),a=Bn();return fo.forkJoin=function(){for(var u=[],s=0;s0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},t=ad&&ad.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r{let t=e.querySelector("graphic[url]"),r=e.querySelectorAll("p"),n={id:e.getAttribute("id"),paragraphs:Array.from(r)};return null!==t&&(n.img=t.getAttribute("url")),e.attributes&&(n.attributes=e.attributes),n}))}function fd(e){let t={};return Array.from(e.querySelectorAll("meta")).forEach((e=>{const r=e.getAttribute("name");let n=e.getAttribute("content");t[r]=n.trim()})),t}var pd=function(e){var t=this;t.sounds=[],t._sprite=e.sprite,t._reading$=new td.Subject,t._tinySprite=Object.keys(e.sprite).map((e=>[t._sprite[e][0],e,t._sprite[e][0]+t._sprite[e][1]])),t._tinySprite.pop(),t._percentPlayed=new td.BehaviorSubject("0%"),t.sound=new l.Howl({src:e.src,sprite:e.sprite,rate:e.rate,onend:function(){t._reading$.next("")}}),requestAnimationFrame(t.step.bind(t))};async function hd(e){return new Promise((function(t,r){let n=new XMLHttpRequest;n.open("HEAD",e),n.onload=function(){this.status>=200&&this.status<300?t(!0):t(!1)},n.onerror=function(){t(!1)},n.send()}))}pd.prototype={play:function(e){var t=this;t._spriteLeft=t._tinySprite;var r=e;return t.sound.play(r)},pause:function(){return this.sound.pause(),this.sound.id},goBack:function(e,t){var r=this;if(r._spriteLeft=r._tinySprite,r.sound.seek(e)-t>0){e=r.sound.seek(r.sound.seek(e)-t,e);for(var n=r.sound.seek(e),o=0;o=r._spriteLeft[o][0]&&(1e3*n<=r._spriteLeft[o][2]&&r._reading$.next(r._spriteLeft[o][1]),r._spriteLeft=r._spriteLeft.slice(o,r._spriteLeft.length));r._reading$.next(r._spriteLeft[0][1])}else{e=r.sound.seek(0,e);r._reading$.next(r._spriteLeft[0][1])}return e},goTo:function(e,t){var r=this;r._spriteLeft=r._tinySprite;e=r.sound.seek(t,e);for(var n=1e3*r.sound.seek(e),o=0;o=r._spriteLeft[o][0]&&n<=r._spriteLeft[o][2]){r._reading$.next(r._spriteLeft[o][1]),e=r.sound.seek(r._spriteLeft[o][0],e),r.sound.seek(e),r._spriteLeft=r._spriteLeft.slice(o,r._spriteLeft.length);break}if(r.sounds.length){const n=(Math.round(t/r.sound.duration(e)*100)||0)+"%";r.sounds[0].style.width=n,r.sounds[0].setAttribute("offset",n)}return e},stop:function(){return this._reading$.next(""),this.sound.stop()},step:function(){for(var e=this,t=0;t0&&1e3*r>=e._spriteLeft[n][0]&&(1e3*r<=e._spriteLeft[n][2]&&e._reading$.next(e._spriteLeft[n][1]),e._spriteLeft=e._spriteLeft.slice(n,e._spriteLeft.length));let o=(r/e.sound.duration()*100||0)+"%";e.sounds[t].style.width=o,e.sounds[t].setAttribute("offset",o)}requestAnimationFrame(e.step.bind(e))}};const bd=e=>e.innerHTML.includes(""),vd={page:"Page",speed:"Playback Speed","re-align":"Re-align with audio","loading-error":'Error: the file "" could not be loaded.',"parse-error":'Error: the file "" could not be parsed.',"alignment-error":"Error: No alignments were found.",loading:"Loading...","line-placeholder":"Type your text here","upload-image":"Upload an image for this page","choose-file":"Choose a file","play-tooltip":"Play/pause audio recording","rewind-tooltip":"Rewind 5 seconds","stop-tooltip":"Stop audio playback","theme-tooltip":"Toggle dark/light mode","full-screen-tooltip":"Full screen mode","translation-tooltip":"Toggle translations","add-translation":"Add a translation, transliteration or gloss","configuration-tooltip":"Preferences",settings:"My preferences","page-animation":"Animated page transitions","auto-pause":"Pause at the end of each page",language:"Interface language","save-settings":"Remember my preferences for this site",eng:"English",fra:"French",spa:"Spanish",close:"Close","annotations-tooltip":"Annotations"},md={page:"Page",speed:"Vitesse de Lecture","re-align":"Réaligner avec l'audio","loading-error":'Erreur: le fichier "" n\'a pas pu être chargé.',"parse-error":'Erreur: le fichier "" n\'a pas pu être analysé.',"alignment-error":"Erreur: aucun alignement n'a été trouvé.",loading:"Chargement en cours","line-placeholder":"Écrivez votre texte ici","upload-image":"Ajouter une image à cette page","choose-file":"Choisir un fichier","play-tooltip":"Écouter/mettre en pause l'enregistrement","rewind-tooltip":"Reculer de 5 secondes","stop-tooltip":"Arrêter la lecture","theme-tooltip":"Basculer en mode sombre/clair","full-screen-tooltip":"Mode plein écran","translation-tooltip":"Afficher ou cacher les traductions","add-translation":"Ajouter une traduction, une translitération ou une glose","configuration-tooltip":"Préférences",settings:"Mes préférences","page-animation":"Transitions de page animées","auto-pause":"Pause à la fin de chaque page",language:"Langue de l'interface","save-settings":"Sauvegarder mes préférences pour ce site",eng:"Anglais",fra:"Français",spa:"Espagnol",close:"Fermer","annotations-tooltip":"Annotations"},gd={page:"Página",speed:"Velocidad de reproducción","re-align":"Re-alinear con el audio","loading-error":'Error: el fichero "" no se pudo cargar.',"parse-error":'Error: el fichero "" no se pudo analizar.',"alignment-error":"Error: No se encontró ningún alineamiento.",loading:"Cargando...","line-placeholder":"Escriba su texto aquí","upload-image":"Cargue una imagen para esta página","choose-file":"Seleccione un fichero","play-tooltip":"Reproducir/pausar grabación de audio","rewind-tooltip":"Rebobine (rewind) 5 segundos","stop-tooltip":"Pare la reproducción de audio","theme-tooltip":"Cambie la paleta de colores","full-screen-tooltip":"Modo pantalla completa","translation-tooltip":"Active o desactive las traducciones","add-translation":"Añada una traducción, transliteración o glosa","configuration-tooltip":"Preferencias",settings:"Mis preferencias","page-animation":"Transiciónes de página animadas","auto-pause":"Pausa al final de cada página",language:"Idioma de la interfaz","save-settings":"Recordar mis preferencias para este sitio",eng:"Inglés",fra:"Francés",spa:"Español",close:"Cerrar","annotations-tooltip":"Anotaciones"},_d=class{constructor(e){(0,o.r)(this,e),this.reading$=new td.Subject,this.theme="light",this.language="eng",this.i18nStrings={eng:vd,fra:md,spa:gd},this.imageAssetsFolder="assets/",this.pageScrolling="horizontal",this.mode="VIEW",this.scrollBehaviour="smooth",this.displayTranslation=!0,this.playbackRateRange=15,this.autoPauseAtEndOfPage=!1,this.playing=!1,this.playback_rate=1,this.fullscreen=!1,this.autoScroll=!0,this.hasLoaded=0,this.showGuide=!1,this.hasTextTranslations=!1,this.assetsStatus={AUDIO:0,RAS:0},this.alignment_failed=!1,this.isScrolling=!1,this.scrollTimer=null,this.endOfPageTags={},this.settingsVisible=!1,this.userPreferencesDirty=!1,this.meta={},this.annotations=[],this.annotationsMenuVisible=!1,this.Guide=()=>(0,o.h)("button",{class:"scroll-guide__container ripple ui-button theme--"+this.theme,onClick:()=>this.hideGuideAndScroll()},(0,o.h)("span",{class:"scroll-guide__text theme--"+this.theme},this.getI18nString("re-align"))),this.Overlay=()=>(0,o.h)("object",{onClick:e=>this.goToSeekFromProgress(e),id:"overlay__object",type:"image/svg+xml",data:this.svgOverlay}),this.RemoveImg=e=>(0,o.h)("button",{"data-test-id":"delete-button","aria-label":"Delete",title:"Delete image",onClick:()=>this.deleteImage(e.pageIndex),id:"img-remover",class:"ripple theme--"+this.theme+" background--"+this.theme},(0,o.h)("i",{class:"material-icons"},"delete")),this.Img=e=>(0,o.h)("div",{class:"image__container page__col__image theme--"+this.theme},(0,o.h)("img",{alt:"image",class:"image",src:e.imgURL})),this.ImgPlaceHolder=e=>(0,o.h)("div",{class:"image__container page__col__image theme--"+this.theme},(0,o.h)("div",{class:"drop-area"},(0,o.h)("form",{class:"my-form"},(0,o.h)("p",{class:"theme--"+this.theme},this.getI18nString("upload-image")),(0,o.h)("input",{type:"file",class:"fileElem",id:"fileElem--"+e.pageID,accept:"image/*",onChange:t=>this.handleFiles(t.target.files[0],e.pageIndex)}),(0,o.h)("label",{class:"button",htmlFor:"fileElem--"+e.pageID},this.getI18nString("choose-file"))))),this.PageCount=e=>(0,o.h)("div",{class:"page__counter color--"+this.theme},this.getI18nString("page")," ",(0,o.h)("span",{"data-test-id":"page-count__current"},e.currentPage)," / ",(0,o.h)("span",{"data-test-id":"page-count__total"},e.pgCount)),this.ImgContainer=e=>(0,o.h)("div",{class:"image__container"},(0,o.h)("span",{id:"image-container"},"EDIT"===this.mode&&e.pageIndex in this.images&&null!==this.images[e.pageIndex]?(0,o.h)(this.RemoveImg,{pageIndex:e.pageIndex}):null,e.pageIndex in this.images&&null!==this.images[e.pageIndex]?(0,o.h)(this.Img,{imgURL:this.images[e.pageIndex]}):null),"EDIT"!==this.mode||e.pageIndex in this.images&&null!==this.images[e.pageIndex]?null:(0,o.h)(this.ImgPlaceHolder,{pageID:e.pageID,pageIndex:e.pageIndex})),this.Page=e=>(0,o.h)("div",{class:"page page__container page--multi animate-transition theme--"+this.theme+" "+(e.pageData.attributes.class?e.pageData.attributes.class.value:""),id:e.pageData.id},this.parsed_text.length>1?(0,o.h)(this.PageCount,{pgCount:this.parsed_text.length,currentPage:this.parsed_text.indexOf(e.pageData)+1}):null,(0,o.h)(this.ImgContainer,{pageID:e.pageData.id,pageIndex:this.parsed_text.indexOf(e.pageData)}),(0,o.h)("div",{class:"page__col__text paragraph__container theme--"+this.theme},e.pageData.paragraphs.map((e=>(0,o.h)(this.Paragraph,{sentences:Array.from(e.childNodes),attributes:e.attributes}))))),this.Paragraph=e=>(0,o.h)("div",Object.assign({},e.attributes,{class:"paragraph sentence__container theme--"+this.theme+" "+(e.attributes.class?e.attributes.class.value:"")}),e.sentences.map((e=>e.childNodes.length>0&&(0,o.h)(this.Sentence,{sentenceData:e})))),this.Sentence=e=>{let t=Array.from(e.sentenceData.childNodes),r=e.sentenceData.id;!this.hasTextTranslations&&e.sentenceData.hasAttribute("class")&&(this.hasTextTranslations=/translation/.test(e.sentenceData.getAttribute("class")));let n={};for(const t of["annotation-id","do-not-align","lang","id"])e.sentenceData.hasAttribute(t)&&(n[t]=e.sentenceData.getAttribute(t));return e.sentenceData.hasAttribute("xml:lang")&&(n.lang=e.sentenceData.getAttribute("xml:lang")),"EDIT"===this.mode&&/translation/.test(e.sentenceData.getAttribute("class"))?(0,o.h)(o.F,null):(0,o.h)("div",Object.assign({},n,{class:"sentence "+(e.sentenceData.hasAttribute("class")?e.sentenceData.getAttribute("class"):"")+(n["annotation-id"]?" invisible":"")}),t.map(((t,r)=>{if("#text"===t.nodeName)return(0,o.h)(this.NonWordText,{text:t.textContent,attributes:t.attributes,id:(e.sentenceData.hasAttribute("id")?e.sentenceData.getAttribute("id"):"P")+"text"+r});if("w"===t.nodeName||"W"===t.nodeName)return(0,o.h)(this.Word,{text:t.textContent,id:t.id,attributes:t.attributes});if(t){let n={};return t.hasAttribute("xml:lang")&&(n.lang=e.sentenceData.getAttribute("xml:lang")),t.hasAttribute("lang")&&(n.lang=e.sentenceData.getAttribute("lang")),(0,o.h)("span",Object.assign({},n,{class:"sentence__text theme--"+this.theme+" "+t.className,id:t.id?t.id:"text_"+r}),t.textContent)}})),(()=>"EDIT"!==this.mode||/translation/.test(e.sentenceData.getAttribute("class"))?null:r in this.translations&&r in this.translations&&null!==this.translations[r]?(0,o.h)("span",{class:"sentence__translation"},(0,o.h)("button",{title:"Remove translation","aria-label":"Remove translation","data-test-id":"remove-translation-button",onClick:()=>this.removeLine(e.sentenceData),class:"sentence__translation__button remove"},(0,o.h)("i",{class:"material-icons"},"remove")),(0,o.h)("p",{id:r+"translation","data-test-id":"translation-line",class:"sentence__text editable__translation",onInput:e=>{this.updateTranslation(r,e.currentTarget.innerText)},contentEditable:!0,onKeyDown:e=>{"Enter"==e.key&&e.preventDefault()},"data-placeholder":this.getI18nString("line-placeholder"),innerHTML:this.translations[r]})):(0,o.h)("button",{title:this.getI18nString("add-translation"),"aria-label":"Add translation","data-test-id":"add-translation-button",class:"sentence__translation sentence__translation__button",onClick:()=>this.addLine(e.sentenceData)},(0,o.h)("i",{class:"material-icons"},"add")))())},this.NonWordText=e=>{let t={};return e.attributes&&e.attributes["xml:lang"]&&(t.lang=e.attributes["xml:lang"].value),e.attributes&&e.attributes.lang&&(t.lang=e.attributes.lang.value),(0,o.h)("span",Object.assign({},t,{class:"sentence__text theme--"+this.theme,id:e.id}),e.text)},this.Word=e=>{let t={};return e.attributes&&e.attributes["xml:lang"]&&(t.lang=e.attributes["xml:lang"].value),e.attributes&&e.attributes.lang&&(t.lang=e.attributes.lang.value),(0,o.h)("span",Object.assign({},t,{class:"sentence__word theme--"+this.theme+" "+(e&&e.attributes.class?e.attributes.class.value:""),id:e.id,onClick:e=>this.playSprite(e)}),e.text)},this.PlayControl=()=>(0,o.h)("button",{"data-test-id":"play-button",disabled:!this.isReadyToPlay(),"aria-label":"Play",title:this.getI18nString("play-tooltip"),onClick:()=>{this.playing?this.pause():this.play()},class:"control-panel__control ripple theme--"+this.theme+" background--"+this.theme,tabindex:1},(0,o.h)("i",{class:"material-icons"},this.playing?"pause":"play_arrow")),this.ReplayControl=()=>(0,o.h)("button",{"data-test-id":"replay-button",disabled:this.hasLoaded<2,"aria-label":"Rewind",title:this.getI18nString("rewind-tooltip"),onClick:()=>this.goBack(5),class:"control-panel__control ripple theme--"+this.theme+" background--"+this.theme},(0,o.h)("i",{class:"material-icons"},"replay_5")),this.StopControl=()=>(0,o.h)("button",{"data-test-id":"stop-button",disabled:this.hasLoaded<2,"aria-label":"Stop",title:this.getI18nString("stop-tooltip"),onClick:()=>this.stop(),class:"control-panel__control ripple theme--"+this.theme+" background--"+this.theme},(0,o.h)("i",{class:"material-icons"},"stop")),this.PlaybackSpeedControl=()=>(0,o.h)("div",null,(0,o.h)("h5",{class:"control-panel__buttons__header color--"+this.theme,id:"speed-slider-label"},this.getI18nString("speed")),(0,o.h)("input",{type:"range",min:100-this.playbackRateRange,max:100+this.playbackRateRange,value:100*this.playback_rate,class:"slider control-panel__control",id:"myRange","aria-labelledby":"speed-slider-label",onInput:e=>{console.log("v",e),this.changePlayback(e)}})),this.StyleControl=()=>(0,o.h)("button",{"aria-label":"Change theme",title:this.getI18nString("theme-tooltip"),class:"control-panel__control ripple theme--"+this.theme+" background--"+this.theme},(0,o.h)("i",{class:"material-icons-outlined"},"style")),this.FullScreenControl=()=>(0,o.h)("button",{"aria-label":"Full screen mode",onClick:()=>this.toggleFullscreen(),title:this.getI18nString("full-screen-tooltip"),class:"control-panel__control ripple theme--"+this.theme+" background--"+this.theme},(0,o.h)("i",{class:"material-icons","aria-label":"Full screen mode"},this.fullscreen?"fullscreen_exit":"fullscreen")),this.TextAnnotationsControl=()=>(0,o.h)("button",{"data-test-id":"annotations-toggle","aria-label":"Toggle Annotations",title:this.getI18nString("annotations-tooltip"),onClick:()=>this.annotationsMenuVisible=!this.annotationsMenuVisible,class:"control-panel__control ripple theme--"+this.theme+" background--"+this.theme},(0,o.h)("i",{class:"material-icons-outlined"},"layers")),this.TextTranslationDisplayControl=()=>(0,o.h)("button",{"data-test-id":"translation-toggle","aria-label":"Toggle Translation",title:this.getI18nString("translation-tooltip"),onClick:()=>this.toggleTextTranslation(),class:"control-panel__control ripple theme--"+this.theme+" background--"+this.theme},(0,o.h)("i",{class:"material-icons-outlined"},"subtitles")),this.ToggleSettingsControl=()=>(0,o.h)("button",{"data-test-id":"settings-button",title:this.getI18nString("configuration-tooltip"),onClick:()=>this.toggleSettings(),id:"settings-button",class:"control-panel__control ripple theme--"+this.theme+" background--"+this.theme},(0,o.h)("i",{class:"material-icons","aria-label":"Show settings"},"settings")),this.ErrorMessage=e=>(0,o.h)("p",{"data-test-id":e.data_cy,class:"alert status-error"},(0,o.h)("span",{class:"material-icons"},"error_outline")," ",e.msg),this.ControlPanel=()=>(0,o.h)("div",{"data-test-id":"control-panel",class:"control-panel theme--"+this.theme+" background--"+this.theme},(0,o.h)("div",{class:"control-panel__buttons--left"},(0,o.h)(this.PlayControl,null),(0,o.h)(this.ReplayControl,null),(0,o.h)(this.StopControl,null)),(0,o.h)("div",{class:"control-panel__buttons--center"},(0,o.h)(this.PlaybackSpeedControl,null)),(0,o.h)("div",{class:"control-panel__buttons--right"},this.annotations.length>0?(0,o.h)(this.TextAnnotationsControl,null):this.hasTextTranslations&&(0,o.h)(this.TextTranslationDisplayControl,null),window.document.fullscreenEnabled&&(0,o.h)(this.FullScreenControl,null),(0,o.h)(this.ToggleSettingsControl,null))),this.Settings=()=>(0,o.h)("div",{id:"settings","data-test-id":"settings",class:"settings theme--"+this.theme},(0,o.h)("button",{class:"close","data-test-id":"settings-close-button",onClick:()=>{this.toggleSettings()}},"×"," "),(0,o.h)("h3",null,this.getI18nString("settings")),(0,o.h)("p",null,(0,o.h)("label",null,(0,o.h)("select",{title:this.getI18nString("language"),onChange:e=>{this.language=e.target.value,this.userPreferencesDirty=!0},"data-test-id":"settings-language",tabindex:2},(0,o.h)("option",{selected:"eng"==this.language,value:"eng"},this.getI18nString("eng")),(0,o.h)("option",{selected:"fra"==this.language,value:"fra"},this.getI18nString("fra")),(0,o.h)("option",{selected:"spa"==this.language,value:"spa"},this.getI18nString("spa"))),this.getI18nString("language"))),(0,o.h)("p",{onClick:()=>{this.changeTheme(),this.userPreferencesDirty=!0},tabindex:3},(0,o.h)(this.StyleControl,null),this.getI18nString("theme-tooltip")),(0,o.h)("p",{onClick:()=>{this.toggleScrollBehavior(),this.userPreferencesDirty=!0},tabindex:4},(0,o.h)("button",{class:"control-panel__control ripple theme--"+this.theme+" background--"+this.theme,title:this.getI18nString("page-animation"),"data-test-id":"settings-scroll-behavior"},(0,o.h)("i",{class:"material-icons-outlined"},"smooth"===this.scrollBehaviour?"check_box":"check_box_outline_blank")),this.getI18nString("page-animation")),(0,o.h)("p",{onClick:()=>{this.autoPauseAtEndOfPage=!this.autoPauseAtEndOfPage,this.userPreferencesDirty=!0},tabindex:5},(0,o.h)("button",{class:"control-panel__control ripple theme--"+this.theme+" background--"+this.theme,title:this.getI18nString("auto-pause"),"data-test-id":"settings-auto-pause"},(0,o.h)("i",{class:"material-icons-outlined"},this.autoPauseAtEndOfPage?"check_box":"check_box_outline_blank")),this.getI18nString("auto-pause")),(0,o.h)("p",{class:"version"},"@readalongs/web-component version: ","1.5.2"),(0,o.h)("div",{class:"footer"},(0,o.h)("button",{type:"button",class:"control-panel__control ripple theme--"+this.theme+" background--"+this.theme,title:this.getI18nString("save-settings"),onClick:()=>{var e;e={version:cd,autoPauseAtEndOfPage:this.autoPauseAtEndOfPage,scrollBehaviour:this.scrollBehaviour,language:this.language,theme:this.theme},window.localStorage.setItem(ld,JSON.stringify(e)),this.userPreferencesDirty=!1},"data-test-id":"settings-save",disabled:!this.userPreferencesDirty,tabindex:6},this.getI18nString("save-settings")),(0,o.h)("div",null),(0,o.h)("button",{onClick:()=>this.toggleSettings(),class:"control-panel__control ripple theme--"+this.theme+" background--"+this.theme,tabindex:7},this.getI18nString("close")))),this.AnnotationsMenu=()=>(0,o.h)("div",{id:"annotationsMenu",class:"annotations-menu theme--"+this.theme},this.annotations.map((e=>(0,o.h)("button",{"data-test-id":"toggle-annotation-"+e.id,class:"ripple theme--"+this.theme+" background--"+this.theme,onClick:()=>this.toggleTextAnnotation(e.id)},(0,o.h)("i",{class:"material-icons-outlined"}," ",e.isVisible?"check_box":"check_box_outline_blank")," ",e.name))),(0,o.h)("button",{"data-test-id":"toggle-all-annotations",class:"ripple theme--"+this.theme+" background--"+this.theme,onClick:()=>this.toggleTextAnnotation("*")},(0,o.h)("i",{class:"material-icons-outlined"},"layers")," All"))}handleScrollEvent(){this.isScrolling=!0,this.scrollTimer&&clearTimeout(this.scrollTimer),this.scrollTimer=setTimeout((()=>{this.isScrolling=!1}),125)}wheelHandler(e){if(this.el.shadowRoot.querySelector(".reading")&&e.path&&e.path.length>0&&(e.path[0].classList.contains("sentence__word")||e.path[0].classList.contains("sentence__container")||e.path[0].classList.contains("sentence"))&&this.autoScroll){let e=this.el.shadowRoot.querySelector(".reading");e&&(this.autoScroll=!this.inPageContentOverflow(e),this.showGuide=!this.autoScroll)}}fullScreenHandler(){this.fullscreen=null!=window.document.fullscreenElement}handleKeyDown(e){"Escape"===e.key&&this.settingsVisible&&(this.settingsVisible=!1)}urlTransform(e){return void 0!==this.useAssetsFolder?this.useAssetsFolder&&t(e)&&!e.startsWith("blob")?"assets/"+e:e:this.imageAssetsFolder&&t(e)&&!e.startsWith("blob")?(this.imageAssetsFolder&&!this.imageAssetsFolder.endsWith("/")&&(this.imageAssetsFolder+="/"),this.imageAssetsFolder+e):e;function t(e){return!/^(https?:[/][/]|assets[/]|data:)/.test(e)}}buildSprite(e,t){return new pd({src:[e],sprite:t,rate:this.playback_rate})}tagToQuery(e){return"#"+(e=(e=e.replace(".","\\.")).replace("#","\\#"))}returnWordClosestTo(e){let t=Object.keys(this.processed_alignment);t.pop();for(let r=1;rthis.processed_alignment[t[r]][0]&&this.processed_alignment[t[r+1]]&&1e3*ethis.autoScroll=!0),100)}goTo(e){void 0===this.play_id&&(this.play(),this.pause()),this.autoScroll=!0,e/=1e3,this.audio_howl_sprites.goTo(this.play_id,e),setTimeout((()=>this.autoScroll=!0),100)}goToSeekAtEl(e){let t=e.currentTarget.id,r=this.processed_alignment[t][0];return this.goTo(r),t}goToSeekFromProgress(e){let t=e.currentTarget.getBoundingClientRect(),r=t.left,n=t.width,o=(e.pageX-r)/n*this.duration*1e3;this.goTo(o)}pause(){this.playing&&(this.playing=!1,this.audio_howl_sprites.pause())}play(){void 0!==this.audio_howl_sprites&&(this.playing=!0,void 0!==this.play_id?this.play_id=this.audio_howl_sprites.play(this.play_id):this.play_id=this.audio_howl_sprites.play("all"),this.animateProgress())}playSprite(e){let t=this.goToSeekAtEl(e);this.playing||this.audio_howl_sprites.play(t)}stop(){this.playing=!1,this.play_id=void 0,this.audio_howl_sprites&&this.audio_howl_sprites.stop(),this.el.shadowRoot.querySelectorAll(".reading").forEach((e=>e.classList.remove("reading"))),this.autoScroll||(this.autoScroll=!0,this.showGuide=!1)}toggleTextTranslation(){this.el.shadowRoot.querySelectorAll(".translation, .sentence__translation, [annotation-id]").forEach((e=>e.classList.toggle("invisible")))}toggleTextAnnotation(e){this.el.shadowRoot.querySelectorAll("[annotation-id"+("*"===e?"]":'="'+e+'"]')).forEach((e=>e.classList.toggle("invisible"))),this.annotations=this.annotations.map((t=>(t.id!=e&&"*"!==e||(t.isVisible=!t.isVisible),t)))}addHighlightingTo(e){this.el.shadowRoot.querySelectorAll(".reading").forEach((e=>e.classList.remove("reading"))),e.classList.add("reading")}animateProgressWithOverlay(){let e=this.el.shadowRoot.querySelector("#overlay__object"),t=e.contentDocument.querySelector("#progress-fill"),r=e.contentDocument.querySelector("#progress-trail"),n=e.contentDocument.querySelector("#progress-base");t.classList.add("stop-color--"+this.theme),n.classList.add("stop-color--"+this.theme),this.audio_howl_sprites.sounds.push(t),this.audio_howl_sprites.sounds.push(r),this.audio_howl_sprites.sound.once("end",(()=>{this.audio_howl_sprites.sounds.forEach((e=>{e.setAttribute("offset","0%")})),this.el.shadowRoot.querySelectorAll(".reading").forEach((e=>e.classList.remove("reading"))),this.playing=!1}),this.play_id)}animateProgressDefault(e,t){let r=document.createElement("div");r.className="progress theme--"+this.theme,r.id=e.toString(),r.dataset.sprite=t;let n=this.tagToQuery(t);this.el.shadowRoot.querySelector(n).appendChild(r),this.audio_howl_sprites.sounds.push(r),this.audio_howl_sprites.sound.once("end",(()=>{this.el.shadowRoot.querySelectorAll(".reading").forEach((e=>e.classList.remove("reading"))),this.playing=!1}),this.play_id)}animateProgress(e=this.play_id){this.svgOverlay?this.animateProgressWithOverlay():e&&this.animateProgressDefault(e,"all")}changeFill(){let e=this.el.shadowRoot.querySelector(".sentence__word"),t=window.getComputedStyle(e).color,r=this.el.shadowRoot.querySelector("#overlay__object"),n=r.contentDocument.querySelector("#progress-fill"),o=r.contentDocument.querySelector("#progress-base");r.contentDocument.querySelector("#polygon").setAttribute("stroke",t),o.setAttribute("stop-color",t),n.setAttribute("stop-color",t)}async getCurrentWord(){return this.reading$}async getImages(){return this.images}async updateSpriteAlignments(e){this.stop(),this.processed_alignment=e,this.attachScrollingLogicToAudio()}async getReadAlongElement(){return this.el}async getAlignments(){return this.processed_alignment}async getTranslations(){return this.translations}async changeTheme(){"light"===this.theme?this.theme="dark":this.theme="light"}static _getSentenceContainerOfWord(e){return e.parentElement.parentElement.parentElement}toggleFullscreen(){let e;if(this.fullscreen){let t=this.el.ownerDocument;t.exitFullscreen?e=t.exitFullscreen():t.mozCancelFullScreen?e=t.mozCancelFullScreen():t.webkitExitFullscreen?e=t.webkitExitFullscreen():t.msExitFullscreen&&(e=t.msExitFullscreen()),e.then((()=>{this.fullscreen=!1,this.el.shadowRoot.getElementById("read-along-container").classList.remove("read-along-container--fullscreen")}))}else{let t=this.el.shadowRoot.getElementById("read-along-container");t.requestFullscreen?e=t.requestFullscreen():t.mozRequestFullScreen?e=t.mozRequestFullScreen():t.webkitRequestFullscreen?e=t.webkitRequestFullscreen():t.msRequestFullscreen&&(e=t.msRequestFullscreen()),e.then((()=>{this.fullscreen=!0,this.el.shadowRoot.getElementById("read-along-container").classList.add("read-along-container--fullscreen")}))}}hideGuideAndScroll(){let e=this.el.shadowRoot.querySelector(".reading"),t=new IntersectionObserver((r=>{let[n]=r;n.isIntersecting&&(setTimeout((()=>{this.showGuide=!1,this.autoScroll=!0}),100),t.unobserve(e))}));t.observe(e),this.scrollTo(e)}inParagraphContentOverflow(e){let t=_d._getSentenceContainerOfWord(e).getBoundingClientRect(),r=e.getBoundingClientRect(),n=r.rightt.right,i=new IntersectionObserver((t=>{let[r]=t;r.isIntersecting&&(setTimeout((()=>{this.showGuide=!1,this.autoScroll=!0}),100),i.unobserve(e))}));return i.observe(e),n||o}inPageContentOverflow(e){let t=this.el.shadowRoot.querySelector("#"+this.current_page).getBoundingClientRect(),r=e.getBoundingClientRect(),n=r.top+r.height>t.top+t.height,o=r.top{let[r]=t;r.isIntersecting&&(setTimeout((()=>{this.showGuide=!1,this.autoScroll=!0}),100),o=n=!1,i.unobserve(e))}));return i.observe(e),o||n}inPage(e){let t=_d._getSentenceContainerOfWord(e).getBoundingClientRect(),r=e.getBoundingClientRect(),n=r.top+r.height>t.top+t.height,o=r.top+r.height<0,i=new IntersectionObserver((t=>{let[r]=t;r.isIntersecting&&(setTimeout((()=>{this.showGuide=!1,this.autoScroll=!0}),100),i.unobserve(e))}));return i.observe(e),o||n}scrollToPage(e){let t=this.el.shadowRoot.querySelector(".pages__container"),r=this.el.shadowRoot.querySelector("#"+e);t.scrollBy({top:null!=this.pageScrolling.match("vertical")?r.offsetTop-t.scrollTop:0,left:null!=this.pageScrolling.match("vertical")?0:r.offsetLeft-t.scrollLeft,behavior:this.scrollBehaviour}),r.scrollTo(0,0)}scrollByHeight(e){let t=_d._getSentenceContainerOfWord(e),r=e.parentElement.getBoundingClientRect(),n=new IntersectionObserver((o=>{let[i]=o;i.isIntersecting?n.unobserve(e):t.scrollTo({top:t.getBoundingClientRect().height-r.height,left:0,behavior:this.scrollBehaviour})}),{root:t,threshold:[0,.25,.5,.75,1]});n.observe(e)}scrollByWidth(e){let t=_d._getSentenceContainerOfWord(e),r=e.getBoundingClientRect();t.scrollTo({left:r.left-10,top:0,behavior:this.scrollBehaviour})}scrollTo(e){e.scrollIntoView({behavior:this.scrollBehaviour})}disconnectedCallback(){this.stop()}componentDidUpdate(){this.svgOverlay&&this.changeFill()}async componentWillLoad(){window.matchMedia&&(window.matchMedia("prefers-color-scheme: dark").matches?this.theme="dark":this.theme="light");const e=(()=>{const e=window.localStorage.getItem(ld);if(e&&e.length){const t=JSON.parse(e);if(t.version&&t.version===cd)return t}return null})();null!==e&&e.version===cd&&(this.language=e.language,this.scrollBehaviour=e.scrollBehaviour,this.autoPauseAtEndOfPage=e.autoPauseAtEndOfPage,this.theme=e.theme||this.theme),this.language.length<3&&(null!=this.language.match("fr")?this.language="fra":null!==this.language.match("es")?this.language="spa":this.language="eng"),"smooth"!==this.scrollBehaviour&&"auto"!==this.scrollBehaviour&&(console.error("Invalid scroll-behaviour value, using default (smooth)"),this.scrollBehaviour="smooth"),(isNaN(this.playbackRateRange)||this.playbackRateRange<0||this.playbackRateRange>99)&&(console.error("Invalid playback-rate-range value, using default (15)."),this.playbackRateRange=15);const t=this.el.querySelector("read-along > text");if(t)this.parsed_text=dd(t),this.meta=fd(this.el);else{const e=await async function(e){let t=await fetch(e);if(!t.ok)return console.error(`fetch(${e}) failed with status ${t.status}`),{pages:null,meta:null};let r=await t.text(),n=(new DOMParser).parseFromString(r,"text/xml");return{pages:dd(n),meta:fd(n)}}(this.href);this.parsed_text=e.pages,this.meta=e.meta}if(null===this.parsed_text)this.parsed_text=[],this.assetsStatus.RAS=3;else if(0===this.parsed_text.length)this.assetsStatus.RAS=2;else{this.images={},this.translations={};for(const[e,t]of this.parsed_text.entries()){if("img"in t){var r=this.urlTransform(t.img);if(this.images[e]=this.urlTransform(t.img),/^(https?:[/]|assets)[/]\b/.test(r)){await hd(r)||(this.images[e]=null)}}else this.images[e]=null;if("paragraphs"in t){try{const e=t.paragraphs,r=e[e.length-1].querySelectorAll("s:not(.translation), s:not(.sentence__translation)"),n=r[r.length-1].querySelector("w:last-of-type");this.endOfPageTags[n.id]=[parseFloat(n.getAttribute("time")),1e3*parseFloat(n.getAttribute("dur"))],this.finalTaggedWord=n.id}catch(e){}let e=null;t.paragraphs.map((e=>e.querySelectorAll("s"))).forEach((t=>{t.length&&t.forEach((t=>{if(t.id&&bd(t))e=`${t.id}`;else if(/translation/.test(t.className)){const r={};if(t.hasAttribute("sentence-id")){r[t.getAttribute("sentence-id")]=t.textContent,this.translations=Object.assign(Object.assign({},this.translations),r)}else null!=e&&(r[e]=t.textContent,e=null,this.translations=Object.assign(Object.assign({},this.translations),r))}}))}))}}if(this.meta["annotations-ids"]){const e=",",t=this.meta["annotations-labels-"+this.language]?this.meta["annotations-labels-"+this.language]:this.meta["annotations-labels"],r=t?t.split(e):[];this.meta["annotations-ids"].split(e).forEach(((e,t)=>{var n;this.annotations.push({isVisible:!1,name:null!==(n=r[t].trim())&&void 0!==n?n:e.trim(),id:e.trim()})}))}this.assetsStatus.RAS=1}this.hasLoaded+=1}componentDidLoad(){const e="https://unpkg.com/@bcgov/bc-sans@1.0.1/css/BCSans.css",t="https://fonts.googleapis.com/css?family=Material+Icons|Material+Icons+Outlined&display=swap";let r=document.querySelector(`link[href="${t}"]`),n=document.querySelector(`link[href="${e}"]`);r||(r=document.createElement("link"),r.setAttribute("rel","stylesheet"),r.setAttribute("href",t),document.head.appendChild(r)),n||(n=document.createElement("link"),n.setAttribute("rel","stylesheet"),n.setAttribute("href",e),document.head.appendChild(n)),this.processed_alignment=function(e){let t={};for(const r of e)for(const e of r.paragraphs)for(const r of Array.from(e.querySelectorAll("w[time][dur]"))){const e=r.getAttribute("time"),n=r.getAttribute("dur");null!==e&&null!==n&&(t[r.getAttribute("id")]=[Math.round(1e3*parseFloat(e)),Math.round(1e3*parseFloat(n))])}return t}(this.parsed_text),this.alignment_failed=0==Object.keys(this.processed_alignment).length,this.audio_howl=new l.Howl({src:[this.audio],preload:!1}),this.audio_howl.once("load",(()=>{this.attachScrollingLogicToAudio()})),this.audio_howl.once("loaderror",(()=>{this.hasLoaded+=1,this.assetsStatus.AUDIO=3})),this.audio_howl.load()}attachScrollingLogicToAudio(){this.processed_alignment.all=[0,1e3*this.audio_howl.duration()],this.duration=this.audio_howl.duration(),this.audio_howl_sprites=this.buildSprite(this.audio,this.processed_alignment),this.audio_howl_sprites._reading$.pipe(sd.distinctUntilChanged()).subscribe((e=>{if(this.reading$.next(e),""==e)return;this.playing&&this.autoPauseAtEndOfPage&&e in this.endOfPageTags&&this.finalTaggedWord!==e&&(this.autoPauseTimer&&window.clearTimeout(this.autoPauseTimer),this.autoPauseTimer=window.setTimeout((()=>{this.pause()}),this.endOfPageTags[e][1]-25));let t=this.tagToQuery(e);if(void 0===t)return;let r=this.el.shadowRoot.querySelector(t);this.el.shadowRoot.querySelectorAll(".reading").forEach((e=>e.classList.remove("reading"))),r.classList.add("reading");let n=_d._getSentenceContainerOfWord(r).parentElement.id;n!==this.current_page&&(void 0===this.current_page||this.isScrolling||this.scrollToPage(n),this.current_page=n);const o=Math.ceil(this.el.shadowRoot.querySelector(".pages__container").getBoundingClientRect().left)+1,i=Math.ceil(this.el.shadowRoot.querySelector("#"+this.current_page).getBoundingClientRect().left);(r.getBoundingClientRect().left<0||i!==o)&&(this.isScrolling||this.scrollToPage(n)),this.inPageContentOverflow(r)&&this.autoScroll&&(r.scrollIntoView({block:"start",inline:"nearest"}),this.isScrolling||this.scrollByHeight(r)),this.inParagraphContentOverflow(r)&&this.autoScroll&&(r.scrollIntoView(!1),this.isScrolling||this.scrollByWidth(r))})),this.hasLoaded+=1,this.assetsStatus.AUDIO=1}componentDidRender(){if(!this.displayTranslation&&this.parsed_text&&this.parsed_text.length>0&&(this.toggleTextTranslation(),this.displayTranslation=!0),this.latestTranslation){this.el.shadowRoot.querySelector(this.latestTranslation).focus(),this.latestTranslation=""}}isReadyToPlay(){return!(this.hasLoaded<2)&&(void 0!==this.audio_howl_sprites&&void 0!==this.audio_howl_sprites.sound)}getRawI18nString(e){return this.i18nStrings[this.language]&&this.i18nStrings[this.language][e]?this.i18nStrings[this.language][e]:this.i18nStrings.eng[e]?this.i18nStrings.eng[e]:e}getI18nString(e,t={}){let r=this.getRawI18nString(e);for(const[e,n]of Object.entries(t))r=r.replace("<"+e+">",n);return r}addLine(e){this.hasTextTranslations||(this.hasTextTranslations=!0);let t={};t[e.id]="",this.translations=Object.assign(Object.assign({},this.translations),t),this.latestTranslation="#"+e.id+"translation"}removeLine(e){delete this.translations[e.id],this.translations=Object.assign({},this.translations)}updateTranslation(e,t){this.translations[e]=t}async handleFiles(e,t){let r=URL.createObjectURL(e),n={};n[t]=r,this.images=Object.assign(Object.assign({},this.images),n)}deleteImage(e){let t={};t[e]=null,this.images=Object.assign(Object.assign({},this.images),t)}render(){return(0,o.h)("div",{key:"757a4fc7fd40bcd41f7685e506bbb4c42da04d1d",id:"read-along-container",class:"read-along-container"},(0,o.h)("div",{key:"6f1180a4e2fe84c16939d5863922f34197ee5243",id:"title__slot__container"},(0,o.h)("h1",{key:"1d931b070e7eb86d580e0d3c054c86abebf117c3",class:"slot__header"},(0,o.h)("slot",{key:"bd826b4e576aa37d375c30c99e7b709235f94199",name:"read-along-header"})),(0,o.h)("h3",{key:"dd7222b9d9086f5fa3c51316ba9559c801e03931",class:"slot__subheader"},(0,o.h)("slot",{key:"55455bbf94fecd94de6e1896d2d358c96a01e7b0",name:"read-along-subheader"}))),Object.entries(this.assetsStatus).map((e=>{let t=e[0],r=e[1];if(2===r){let e=this.getPathFromAssetType(t);return(0,o.h)(this.ErrorMessage,{msg:this.getI18nString("parse-error",{FILETYPE:t,FILENAME:e}),data_cy:t+"-error"})}if(3===r){let e=this.getPathFromAssetType(t);return(0,o.h)(this.ErrorMessage,{msg:this.getI18nString("loading-error",{FILETYPE:t,FILENAME:e}),data_cy:t+"-error"})}})),this.alignment_failed&&1===this.assetsStatus.RAS&&(0,o.h)(this.ErrorMessage,{key:"226d1c10cb9cc671703140d77a94d7a878e5d7a0",msg:this.getI18nString("alignment-error"),data_cy:"alignment-error"}),(0,o.h)("div",{key:"5a19d4b692d9bf911277a0da26f72d0d337911f6",onScroll:()=>{this.handleScrollEvent()},"data-test-id":"text-container",class:"pages__container theme--"+this.theme+" "+this.pageScrolling},this.showGuide?(0,o.h)(this.Guide,null):null,1==this.assetsStatus.RAS&&this.parsed_text.map((e=>(0,o.h)(this.Page,{pageData:e}))),this.hasLoaded<2&&(0,o.h)("div",{key:"e8d744128496c0ad5c74a7ee693a993ec1aa99c4",class:"loader"})),this.settingsVisible&&(0,o.h)("div",{key:"2c63799b5372a159df8aeefe5050ca6fa54a4b19",class:"settings-background",onClick:()=>this.settingsVisible=!1}),this.settingsVisible&&(0,o.h)(this.Settings,{key:"833db7a2a93609042056950d7fa6e2eea0531828"}),this.alignment_failed||(0,o.h)("div",{key:"95cf446a50c1eae160e81eb7bc2101086f07d6f6",onClick:e=>this.goToSeekFromProgress(e),id:"all","data-test-id":"progress-bar",class:"overlay__container theme--"+this.theme+" background--"+this.theme},this.svgOverlay?(0,o.h)(this.Overlay,null):null),this.annotationsMenuVisible&&(0,o.h)(this.AnnotationsMenu,{key:"81e596758720825fb829dea9ed0bdf94be85efb8"}),1==this.assetsStatus.AUDIO&&(0,o.h)(this.ControlPanel,{key:"c42772bb33daf39d3c524113cf0a94814514eded"}),this.cssUrl&&null!=this.cssUrl.match(".css")&&(0,o.h)("link",{key:"b42c2cf21142cf90549313fe9c6e24003c81c26e",href:this.cssUrl,rel:"stylesheet"}))}static get assetsDirs(){return["assets"]}get el(){return(0,o.g)(this)}static get watchers(){return{audio_howl_sprites:["wheelHandler"]}}};_d.style='.font-weight--100{font-weight:100}.font-weight--200{font-weight:200}.font-weight--300{font-weight:300}.font-weight--400{font-weight:400}.font-weight--500{font-weight:500}.font-weight--600{font-weight:600}.font-weight--700{font-weight:700}.font-weight--800{font-weight:800}.font-weight--900{font-weight:900}.shadowed{text-shadow:0.3px 0.2px black}.theme--light.settings,.theme--light.page__container,.theme--light.page__col__image,.theme--light.sentence,.theme--light.scroll-guide__container{background-color:#fff}.theme--dark.settings,.theme--dark.page__container,.theme--dark.page__col__image,.theme--dark.sentence,.theme--dark.scroll-guide__container{background-color:rgb(59.9272727273, 67.4181818182, 104.8727272727)}.sentence__text,.sentence__word,.scroll-guide__text{line-height:1.5;border-radius:0.3125em;position:relative;padding:0.0625em;font-size:1em}.theme--light.ripple,.theme--light.reading,.theme--light.sentence__text,.theme--light.sentence__word,.theme--light.scroll-guide__text{color:rgb(4.2909090909, 4.8272727273, 7.5090909091)}.theme--dark.ripple,.theme--dark.reading,.theme--dark.sentence__text,.theme--dark.sentence__word,.theme--dark.scroll-guide__text{color:#fff}.theme--light.ripple:active,.theme--light.reading:active,.theme--light.sentence__word:hover{color:#fff;background:rgb(127.5, 127.5, 127.5) radial-gradient(circle, transparent 1%, rgb(127.5, 127.5, 127.5) 1%) center/15000%}.theme--dark.ripple:active,.theme--dark.reading:active,.theme--dark.sentence__word:hover{color:#fff;background:rgb(165.75, 165.75, 165.75) radial-gradient(circle, transparent 1%, rgb(165.75, 165.75, 165.75) 1%) center/15000%}.theme--light.sentence__word.reading{color:#fff;background:#666666 radial-gradient(circle, transparent 1%, #666666 1%) center/15000%}.theme--dark.sentence__word.reading{color:rgb(4.2909090909, 4.8272727273, 7.5090909091);background:#fff radial-gradient(circle, transparent 1%, #fff 1%) center/15000%}.theme--light.page__col__img-placeholder{border:0.046875em dotted rgb(127.5, 127.5, 127.5)}.theme--dark.page__col__img-placeholder{border:0.046875em dotted rgb(165.75, 165.75, 165.75)}.theme--light.overlay__container,.theme--light.scroll-guide__container{border:0.046875em solid rgb(127.5, 127.5, 127.5)}.theme--dark.overlay__container,.theme--dark.scroll-guide__container{border:0.046875em solid rgb(165.75, 165.75, 165.75)}.theme--light#annotationsMenu,.theme--light.settings,.theme--light.pages__container,.theme--light.page--multi,.theme--light.control-panel{border-left:0.046875em solid rgb(127.5, 127.5, 127.5)}.theme--dark#annotationsMenu,.theme--dark.settings,.theme--dark.pages__container,.theme--dark.page--multi,.theme--dark.control-panel{border-left:0.046875em solid rgb(165.75, 165.75, 165.75)}.theme--light#annotationsMenu,.theme--light.settings,.theme--light.pages__container,.theme--light.page--multi,.theme--light.control-panel{border-right:0.046875em solid rgb(127.5, 127.5, 127.5)}.theme--dark#annotationsMenu,.theme--dark.settings,.theme--dark.pages__container,.theme--dark.page--multi,.theme--dark.control-panel{border-right:0.046875em solid rgb(165.75, 165.75, 165.75)}.theme--light#annotationsMenu,#annotationsMenu button.theme--light,.theme--light.settings,.settings>.theme--light.footer,.theme--light.pages__container{border-top:0.046875em solid rgb(127.5, 127.5, 127.5)}.theme--dark#annotationsMenu,#annotationsMenu button.theme--dark,.theme--dark.settings,.settings>.theme--dark.footer,.theme--dark.pages__container{border-top:0.046875em solid rgb(165.75, 165.75, 165.75)}.theme--light#annotationsMenu,#annotationsMenu h3.theme--light,#annotationsMenu button.theme--light,.theme--light.settings,.theme--light.control-panel{border-bottom:0.046875em solid rgb(127.5, 127.5, 127.5)}.theme--dark#annotationsMenu,#annotationsMenu h3.theme--dark,#annotationsMenu button.theme--dark,.theme--dark.settings,.theme--dark.control-panel{border-bottom:0.046875em solid rgb(165.75, 165.75, 165.75)}.ripple:hover,.reading:hover,.sentence__word:hover{cursor:pointer}@viewport{width:device-width}button{border:0;cursor:pointer}html{background-color:#fff;box-sizing:border-box;height:100%}*:before,*:after{box-sizing:inherit}body{-webkit-font-smoothing:antialiased;color:rgb(4.2909090909, 4.8272727273, 7.5090909091);font-family:"BCSans", "Noto Sans", Verdana, Arial, sans-serif;min-height:100%;overflow-x:hidden;overflow-y:hidden;text-rendering:optimizeLegibility}a{background:transparent;color:#c69;text-decoration:none;transition:color 0.2s;outline:none}a:active,a:focus{outline:none}img{height:90%;max-width:90%;object-fit:cover}h1,h2,h3,h4,h5,h6{font-family:"BCSans", "Noto Sans", Verdana, Arial, sans-serif;font-weight:normal}p,mat-chip,mat-tab-label,span,button,div,a{font-family:"BCSans", "Noto Sans", Verdana, Arial, sans-serif}.theme--light::-webkit-scrollbar{width:0.5em;height:0.5em}.theme--light::-webkit-scrollbar-track{background:#fff}.theme--light::-webkit-scrollbar-thumb{background:rgb(4.2909090909, 4.8272727273, 7.5090909091);border-radius:0.3125em;height:0.625em;width:0.625em}.theme--dark::-webkit-scrollbar{width:0.5em;height:0.5em}.theme--dark::-webkit-scrollbar-track{background:rgb(59.9272727273, 67.4181818182, 104.8727272727)}.theme--dark::-webkit-scrollbar-thumb{background:#fff;border-radius:0.3125em;height:0.625em;width:0.625em}.bg-img{background-image:url("../assets/img/bg.jpg");height:100vh;overflow:overlay;overflow-x:hidden;background-position:center;background-repeat:no-repeat;background-size:cover;min-height:100%}.shadow-box{box-shadow:0 0.3125rem 1rem 0 rgba(0, 0, 0, 0.24);padding:25px;background:rgba(255, 255, 255, 0.94);border-radius:5px}.font-xs{font-size:0.5em}.font-sm{font-size:0.75em}.font-md{font-size:1em}.font-lg{font-size:1.25em}.font-xl{font-size:1.5em}.font-xxl{font-size:2em}.faded{opacity:0.2;color:black}table{table-layout:fixed}.center{margin-left:auto;margin-right:auto;text-align:center}.container{max-width:80em}.background--light{background:#fff}.stop-color--light{fill:#fff}.color--light{color:rgb(4.2909090909, 4.8272727273, 7.5090909091)}.background--dark{background:rgb(59.9272727273, 67.4181818182, 104.8727272727)}.stop-color--dark{fill:rgb(59.9272727273, 67.4181818182, 104.8727272727)}.color--dark{color:#fff}.abs{position:absolute}.top-0{top:0}.left-0{left:0}.right-0{right:0}.top-5{top:0.3125em}.left-5{left:0.3125em}.right-5{right:0.3125em}.top-10{top:0.625em}.left-10{left:0.625em}.right-10{right:0.625em}.top-15{top:0.9375em}.left-15{left:0.9375em}.right-15{right:0.9375em}.top-20{top:1.25em}.left-20{left:1.25em}.right-20{right:1.25em}.top-25{top:1.5625em}.left-25{left:1.5625em}.right-25{right:1.5625em}.top-30{top:1.875em}.left-30{left:1.875em}.right-30{right:1.875em}.top-35{top:2.1875em}.left-35{left:2.1875em}.right-35{right:2.1875em}.top-40{top:2.5em}.left-40{left:2.5em}.right-40{right:2.5em}.top-45{top:2.8125em}.left-45{left:2.8125em}.right-45{right:2.8125em}.top-50{top:3.125em}.left-50{left:3.125em}.right-50{right:3.125em}.invisible{visibility:hidden !important}.control-panel{border-radius:0 0 0.3125em 0.3125em;position:relative;min-width:100%;display:inline-flex}.control-panel__buttons--left{width:25%;float:left;margin-top:0.3125em;padding:0.3125em}.control-panel__buttons--center{width:25%;text-align:center;margin:0 auto}.control-panel__buttons--right{width:25%;text-align:right;float:right;margin-top:0.3125em;margin-right:0.3125em}.control-panel__buttons__header{margin:0.3125em}.control-panel__control{border-radius:0.3125em;margin:0.5em auto}.control-panel__control:focus{outline:none}.settings{margin-left:0;margin-right:0;text-align:center}.settings__option__header{margin-bottom:0.5em}#waveform{background-size:contain;background-repeat:no-repeat;background-position:center center;width:100%;height:100%;position:absolute;top:0;left:0}.low{z-index:700}.overlay__container{width:100%;max-width:100%;height:3.125em;position:relative;z-index:800}#overlay__object{z-index:700;max-height:100%;min-width:100%;fill:"transparent"}#overlay__object.theme--light{stroke:rgb(127.5, 127.5, 127.5)}#overlay__object.theme--dark{stroke:rgb(165.75, 165.75, 165.75)}.scroll-guide__container{text-align:center;z-index:700;width:20%;position:fixed;left:50%;transform:translate(-50%, 0)}.scroll-guide__text{font-size:1.25em}.pages__container{overflow:auto;max-height:55vh;height:100%;max-width:100%;width:100%;position:relative;display:-webkit-inline-flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between;border-radius:0.3125em 0.3125em 0 0;transition:margin-right 0.5s}.page{overflow-y:hidden;overflow-x:auto;flex-grow:1;min-width:99.6%;width:100%;max-width:55em}.page__container{display:grid;grid-template-columns:[col-start] [col-end];grid-template-rows:[row-start] 5% [row-end] 95%;grid-template-areas:"image page-no" "image text";justify-items:stretch}.page__counter{grid-area:page-no;margin:0.625em 0 0 0.9375em;text-align:right;padding-right:0.9375em;max-height:5rem}.page__col__image{grid-area:image;max-height:100%;text-align:center;margin:5%;padding:0;border-radius:0 0 0 0;position:relative}.page__col__image img{max-height:55vh;max-width:95%;object-fit:contain}.page__col__img-placeholder{cursor:pointer}.page__col__text{grid-area:text}.page.two-column-layout-page{grid-template-columns:40% auto}.page.one-column-layout-page{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:center;overflow-y:auto}.page.one-column-layout-page .page__col__image img{max-height:33vh !important}.page.one-column-layout-page .page__counter{width:100%;display:block;text-align:center}.hide-page-counter .page__counter{display:none}.pages__container.vertical{flex-direction:column !important}.pages__container.vertical>.page{min-height:100%}.paragraph__container{overflow-y:auto;min-width:40%;padding-bottom:0.75em}.sentence{margin:0 1.5em;text-align:left;max-width:90%}.sentence__container{margin:3.75em 0.625em 3.75em 0.625em;scroll-behavior:smooth;max-width:100%;position:relative;overflow-y:auto;overflow-x:hidden}.sentence__container__buttons{position:absolute;top:0;right:0}.sentence__text{font-size:1.5em;padding:0}.sentence__word{font-size:1.5em}.sentence__translation .sentence__text,.sentence[annotation-id] .sentence__text,.sentence__translation .sentence__word{color:#777;font-style:italic;font-size:95%}.sentence__translation__button{margin-left:10px}.sentence__translation__button i{font-size:medium}.paragraph.visually_aligned .sentence .sentence__text,.paragraph.visually_aligned .sentence .sentence__word{display:table-cell}.paragraph.visually_aligned .sentence .sentence__text:empty{display:none}.paragraph.visually_aligned{display:table}.paragraph.visually_aligned .sentence{display:table-row}.read-along-container{max-width:75em;margin:0 auto;overflow-y:hidden;overflow-x:hidden;padding:0.3125em;position:relative}.read-along-container--fullscreen{max-width:80%;min-width:80%}.slot__header{margin-bottom:0.3125em}.slot__subheader{margin-top:0;margin-left:1em}.settings-background{position:fixed;top:0;left:0;height:100vh;width:100vw;background-color:rgba(0, 0, 0, 0.075);z-index:900;-webkit-backdrop-filter:blur(5px) !important;backdrop-filter:blur(5px) !important}.settings{height:55vh;max-height:55vh;width:375px;max-width:375px;position:fixed;z-index:1000;top:15vh;left:calc((100% - 375px) / 2);overflow-x:hidden;transition:0.5s}.settings h3{border-bottom:1px solid #ccc;padding:10px;margin:0}.settings h3 button{float:inline-start;margin-top:0;margin-bottom:0}.settings>.close{position:relative;float:inline-end;background-color:inherit;color:inherit;font-size:18px;display:inline-block;padding:0.275rem 0.75rem;font-weight:400;line-height:1.5;text-align:center;text-decoration:none;vertical-align:middle;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;border:0;transition:color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out}.settings>.close:hover{color:#fff;background-color:#bb2d3b;border-color:#bb2d3b;box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075)}.settings p{cursor:pointer;text-align:left;color:inherit;margin:0.5em 1em}.settings p select,.settings p button{margin-right:1em;width:80px;text-align:justify}.settings p button{margin:0 1em 0 0;padding:0 0.0625em}.settings>.footer{position:absolute;bottom:0;right:0;left:0;padding:0.01em 1em;height:3em;display:flex;flex-grow:0;flex-shrink:0;flex-direction:row;align-content:space-between;justify-content:space-between}.settings>.footer>div{flex-grow:8}.settings>.footer>button{border:1px solid #ccc;padding:0.25em 0.5em !important}.settings>.footer>button:hover{background-color:rgba(0, 0, 0, 0.15);box-shadow:1px 1px 1px rgba(0, 0, 0, 0.15)}.settings button:disabled{background-color:rgba(200, 200, 200, 0.15);color:#ccc}.settings p.version{padding:1em;font-size:0.7em;font-weight:100;color:#ccc}.settings.theme--dark{color:#fff}@media screen and (max-width: 385px){.settings{width:95vw;max-width:95vw;left:2.5vw;overflow:auto}.settings p{margin-bottom:1em;border-bottom:1px solid #ccc}.settings p select,.settings p button{display:block;width:80%}}button:focus,input:focus{box-shadow:0 1px 1px rgba(0, 0, 0, 0.15)}#annotationsMenu{position:absolute;bottom:4em;right:0.3125em;z-index:1000;width:fit-content;width:-moz-fit-content;display:flex;flex-direction:column;border-radius:0.3125em}#annotationsMenu h3{margin:0.3125em 0;padding:0.3125em 0.5em}#annotationsMenu button{display:flex;justify-content:flex-start;align-content:baseline;font-size:medium;padding:0.5em}#annotationsMenu button .material-icons-outlined{font-size:inherit;border-radius:0;margin-right:0.3125em}.sentence.invisible[annotation-id]{display:none}.loader{border:16px solid #eee;border-radius:50%;border-right-color:#aa0;border-bottom-color:#a33;border-left-color:#111;width:10rem;height:10rem;-webkit-animation:spin 3s linear infinite;animation:spin 3s linear infinite;position:fixed;top:calc(50vh - 10rem);left:calc(50vw - 10rem);z-index:1000;box-shadow:0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19)}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.alert{position:relative;padding:1rem 1rem;margin-bottom:1rem;border:1px solid transparent;border-radius:0.25rem;transition-delay:2s;transition:visibility 5s height 5s}.alert.status-success{color:#0f5132;background-color:#d1e7dd;border-color:#badbcc}.alert.status-error{color:#842029;background-color:#f8d7da;border-color:#f5c2c7}.alert.fade{visibility:collapse;height:0 !important;overflow:hidden !important;line-height:0 !important;padding:0 !important;margin:0 !important;border:0 !important}.animate-transition,.ripple,.reading{transition:background 0.4s}.animate-transition:active,.ripple:active,.reading:active{transition:background 0s}.ripple,.reading{background-position:center;padding:0.0625em}.ripple:active,.reading:active{background-size:100%}.progress{position:absolute;top:0;left:0;height:100%;width:0}.progress.theme--light{background-color:rgba(127.5, 127.5, 127.5, 0.2)}.progress.theme--dark{background-color:rgba(165.75, 165.75, 165.75, 0.2)}.material-icons{font-family:"Material Icons";font-weight:normal;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-feature-settings:"liga";-webkit-font-smoothing:antialiased}.material-icons-outlined{font-family:"Material Icons Outlined";font-weight:normal;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-feature-settings:"liga";-webkit-font-smoothing:antialiased}[contenteditable][data-placeholder]:empty:before{content:attr(data-placeholder);position:absolute;color:gray;cursor:text;background-color:transparent}.drop-area{border:2px dashed #ccc;border-radius:20px;width:50%;font-family:sans-serif;margin:50px auto;padding:20px}.drop-area.highlight{border-color:purple}p{margin-top:0}.my-form{margin-bottom:10px}#gallery{margin-top:10px}#gallery img{width:150px;margin-bottom:10px;margin-right:10px;vertical-align:middle}.button{display:inline-block;padding:10px;background:#ccc;cursor:pointer;border-radius:5px;border:1px solid #ccc}.button:hover{background:#ddd}.fileElem{display:none}#img-remover{margin:60px;position:absolute;z-index:700;border-radius:50px;color:red}#image-container{display:contents}'},923:(e,t,r)=>{var n={"./read-along.entry.js":[665,792]};function o(e){if(!r.o(n,e))return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=n[e],o=t[0];return r.e(t[1]).then((()=>r(o)))}o.keys=()=>Object.keys(n),o.id=923,e.exports=o}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.e=()=>Promise.resolve(),r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";var e=r(102);(()=>{const t="file:///home/legers/Work/Studio-Web/dist/packages/web-component/dist/esm/web-component.js",r={};return r.resourcesUrl=new URL(".",t).href,(0,e.p)(r)})().then((async t=>(await void 0,(0,e.b)([["read-along",[[1,"read-along",{href:[1],audio:[1],svgOverlay:[1,"svg-overlay"],theme:[1537],language:[1537],cssUrl:[1,"css-url"],useAssetsFolder:[4,"use-assets-folder"],imageAssetsFolder:[1,"image-assets-folder"],pageScrolling:[1,"page-scrolling"],mode:[1],scrollBehaviour:[1537,"scroll-behaviour"],displayTranslation:[4,"display-translation"],playbackRateRange:[2,"playback-rate-range"],autoPauseAtEndOfPage:[1540,"auto-pause-at-end-of-page"],playing:[32],fullscreen:[32],autoScroll:[32],hasLoaded:[32],images:[32],translations:[32],settingsVisible:[32],userPreferencesDirty:[32],annotations:[32],annotationsMenuVisible:[32],getCurrentWord:[64],getImages:[64],updateSpriteAlignments:[64],getReadAlongElement:[64],getAlignments:[64],getTranslations:[64],changeTheme:[64]},[[9,"wheel","wheelHandler"],[0,"fullscreenchange","fullScreenHandler"],[0,"keydown","handleKeyDown"]],{audio_howl_sprites:["wheelHandler"]}]]]],t))))})()})(); \ No newline at end of file +function(){var e;HowlerGlobal.prototype._pos=[0,0,0],HowlerGlobal.prototype._orientation=[0,0,-1,0,1,0],HowlerGlobal.prototype.stereo=function(e){var t=this;if(!t.ctx||!t.ctx.listener)return t;for(var r=t._howls.length-1;r>=0;r--)t._howls[r].stereo(e);return t},HowlerGlobal.prototype.pos=function(e,t,r){var n=this;return n.ctx&&n.ctx.listener?(t="number"!=typeof t?n._pos[1]:t,r="number"!=typeof r?n._pos[2]:r,"number"!=typeof e?n._pos:(n._pos=[e,t,r],void 0!==n.ctx.listener.positionX?(n.ctx.listener.positionX.setTargetAtTime(n._pos[0],Howler.ctx.currentTime,.1),n.ctx.listener.positionY.setTargetAtTime(n._pos[1],Howler.ctx.currentTime,.1),n.ctx.listener.positionZ.setTargetAtTime(n._pos[2],Howler.ctx.currentTime,.1)):n.ctx.listener.setPosition(n._pos[0],n._pos[1],n._pos[2]),n)):n},HowlerGlobal.prototype.orientation=function(e,t,r,n,o,i){var a=this;if(!a.ctx||!a.ctx.listener)return a;var u=a._orientation;return t="number"!=typeof t?u[1]:t,r="number"!=typeof r?u[2]:r,n="number"!=typeof n?u[3]:n,o="number"!=typeof o?u[4]:o,i="number"!=typeof i?u[5]:i,"number"!=typeof e?u:(a._orientation=[e,t,r,n,o,i],void 0!==a.ctx.listener.forwardX?(a.ctx.listener.forwardX.setTargetAtTime(e,Howler.ctx.currentTime,.1),a.ctx.listener.forwardY.setTargetAtTime(t,Howler.ctx.currentTime,.1),a.ctx.listener.forwardZ.setTargetAtTime(r,Howler.ctx.currentTime,.1),a.ctx.listener.upX.setTargetAtTime(n,Howler.ctx.currentTime,.1),a.ctx.listener.upY.setTargetAtTime(o,Howler.ctx.currentTime,.1),a.ctx.listener.upZ.setTargetAtTime(i,Howler.ctx.currentTime,.1)):a.ctx.listener.setOrientation(e,t,r,n,o,i),a)},Howl.prototype.init=(e=Howl.prototype.init,function(t){var r=this;return r._orientation=t.orientation||[1,0,0],r._stereo=t.stereo||null,r._pos=t.pos||null,r._pannerAttr={coneInnerAngle:void 0!==t.coneInnerAngle?t.coneInnerAngle:360,coneOuterAngle:void 0!==t.coneOuterAngle?t.coneOuterAngle:360,coneOuterGain:void 0!==t.coneOuterGain?t.coneOuterGain:0,distanceModel:void 0!==t.distanceModel?t.distanceModel:"inverse",maxDistance:void 0!==t.maxDistance?t.maxDistance:1e4,panningModel:void 0!==t.panningModel?t.panningModel:"HRTF",refDistance:void 0!==t.refDistance?t.refDistance:1,rolloffFactor:void 0!==t.rolloffFactor?t.rolloffFactor:1},r._onstereo=t.onstereo?[{fn:t.onstereo}]:[],r._onpos=t.onpos?[{fn:t.onpos}]:[],r._onorientation=t.onorientation?[{fn:t.onorientation}]:[],e.call(this,t)}),Howl.prototype.stereo=function(e,r){var n=this;if(!n._webAudio)return n;if("loaded"!==n._state)return n._queue.push({event:"stereo",action:function(){n.stereo(e,r)}}),n;var o=void 0===Howler.ctx.createStereoPanner?"spatial":"stereo";if(void 0===r){if("number"!=typeof e)return n._stereo;n._stereo=e,n._pos=[e,0,0]}for(var i=n._getSoundIds(r),a=0;a=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},t=g&&g.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},r=g&&g.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},r=F&&F.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},r=we&&we.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(je,"__esModule",{value:!0}),je.AnonymousSubject=je.Subject=void 0;var n=ne(),o=A(),i=$e(),a=j(),u=U(),s=function(e){function s(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return t(s,e),s.prototype.lift=function(e){var t=new l(this,this);return t.operator=e,t},s.prototype._throwIfClosed=function(){if(this.closed)throw new i.ObjectUnsubscribedError},s.prototype.next=function(e){var t=this;u.errorContext((function(){var n,o;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var i=r(t.currentObservers),a=i.next();!a.done;a=i.next()){a.value.next(e)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}}}))},s.prototype.error=function(e){var t=this;u.errorContext((function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var r=t.observers;r.length;)r.shift().error(e)}}))},s.prototype.complete=function(){var e=this;u.errorContext((function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}}))},s.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(s.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),s.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},s.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},s.prototype._innerSubscribe=function(e){var t=this,r=this,n=r.hasError,i=r.isStopped,u=r.observers;return n||i?o.EMPTY_SUBSCRIPTION:(this.currentObservers=null,u.push(e),new o.Subscription((function(){t.currentObservers=null,a.arrRemove(u,e)})))},s.prototype._checkFinalizedStatuses=function(e){var t=this,r=t.hasError,n=t.thrownError,o=t.isStopped;r?e.error(n):o&&e.complete()},s.prototype.asObservable=function(){var e=new n.Observable;return e.source=this,e},s.create=function(e,t){return new l(e,t)},s}(n.Observable);je.Subject=s;var l=function(e){function r(t,r){var n=e.call(this)||this;return n.destination=t,n.source=r,n}return t(r,e),r.prototype.next=function(e){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===r||r.call(t,e)},r.prototype.error=function(e){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===r||r.call(t,e)},r.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},r.prototype._subscribe=function(e){var t,r;return null!==(r=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==r?r:o.EMPTY_SUBSCRIPTION},r}(s);return je.AnonymousSubject=l,je}var ke,Ee={};function Me(){if(ke)return Ee;ke=1;var e,t=Ee&&Ee.__extends||(e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)},function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.BehaviorSubject=void 0;var r=function(e){function r(t){var r=e.call(this)||this;return r._value=t,r}return t(r,e),Object.defineProperty(r.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),r.prototype._subscribe=function(t){var r=e.prototype._subscribe.call(this,t);return!r.closed&&t.next(this._value),r},r.prototype.getValue=function(){var e=this,t=e.hasError,r=e.thrownError,n=e._value;if(t)throw r;return this._throwIfClosed(),n},r.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},r}(Te().Subject);return Ee.BehaviorSubject=r,Ee}var Ie,Fe,Ce={},Le={};function Re(){return Ie||(Ie=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.dateTimestampProvider=void 0,e.dateTimestampProvider={now:function(){return(e.dateTimestampProvider.delegate||Date).now()},delegate:void 0}}(Le)),Le}function Ne(){if(Fe)return Ce;Fe=1;var e,t=Ce&&Ce.__extends||(e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)},function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)});Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.ReplaySubject=void 0;var r=Te(),n=Re(),o=function(e){function r(t,r,o){void 0===t&&(t=1/0),void 0===r&&(r=1/0),void 0===o&&(o=n.dateTimestampProvider);var i=e.call(this)||this;return i._bufferSize=t,i._windowTime=r,i._timestampProvider=o,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=r===1/0,i._bufferSize=Math.max(1,t),i._windowTime=Math.max(1,r),i}return t(r,e),r.prototype.next=function(t){var r=this,n=r.isStopped,o=r._buffer,i=r._infiniteTimeWindow,a=r._timestampProvider,u=r._windowTime;n||(o.push(t),!i&&o.push(a.now()+u)),this._trimBuffer(),e.prototype.next.call(this,t)},r.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),r=this._infiniteTimeWindow,n=this._buffer.slice(),o=0;o0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},r=Xe&&Xe.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},r=et&&et.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r0?e.prototype.requestAsyncId.call(this,t,r,o):(t.actions.push(this),t._scheduled||(t._scheduled=n.immediateProvider.setImmediate(t.flush.bind(t,void 0))))},r.prototype.recycleAsyncId=function(t,r,o){var i;if(void 0===o&&(o=0),null!=o?o>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,t,r,o);var a=t.actions;null!=r&&(null===(i=a[a.length-1])||void 0===i?void 0:i.id)!==r&&(n.immediateProvider.clearImmediate(r),t._scheduled===r&&(t._scheduled=void 0))},r}(r.AsyncAction);return Ve.AsapAction=o,Ve}(),r=function(){if(it)return ut;it=1;var e,t=ut&&ut.__extends||(e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)},function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)});Object.defineProperty(ut,"__esModule",{value:!0}),ut.AsapScheduler=void 0;var r=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return t(r,e),r.prototype.flush=function(e){this._active=!0;var t=this._scheduled;this._scheduled=void 0;var r,n=this.actions;e=e||n.shift();do{if(r=e.execute(e.state,e.delay))break}while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,r){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw r}},r}(dt().AsyncScheduler);return ut.AsapScheduler=r,ut}();e.asapScheduler=new r.AsapScheduler(t.AsapAction),e.asap=e.asapScheduler}(qe)),qe}var pt,ht={};function bt(){return pt||(pt=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.async=e.asyncScheduler=void 0;var t=Qe(),r=dt();e.asyncScheduler=new r.AsyncScheduler(t.AsyncAction),e.async=e.asyncScheduler}(ht)),ht}var vt,mt={},gt={};var _t,yt,wt={};function Ot(){return yt||(yt=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.queue=e.queueScheduler=void 0;var t=function(){if(vt)return gt;vt=1;var e,t=gt&>.__extends||(e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)},function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)});Object.defineProperty(gt,"__esModule",{value:!0}),gt.QueueAction=void 0;var r=function(e){function r(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return t(r,e),r.prototype.schedule=function(t,r){return void 0===r&&(r=0),r>0?e.prototype.schedule.call(this,t,r):(this.delay=r,this.state=t,this.scheduler.flush(this),this)},r.prototype.execute=function(t,r){return r>0||this.closed?e.prototype.execute.call(this,t,r):this._execute(t,r)},r.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!=n&&n>0||null==n&&this.delay>0?e.prototype.requestAsyncId.call(this,t,r,n):(t.flush(this),0)},r}(Qe().AsyncAction);return gt.QueueAction=r,gt}(),r=function(){if(_t)return wt;_t=1;var e,t=wt&&wt.__extends||(e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)},function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)});Object.defineProperty(wt,"__esModule",{value:!0}),wt.QueueScheduler=void 0;var r=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return t(r,e),r}(dt().AsyncScheduler);return wt.QueueScheduler=r,wt}();e.queueScheduler=new r.QueueScheduler(t.QueueAction),e.queue=e.queueScheduler}(mt)),mt}var St,Pt={},xt={};var jt,At,$t={};function Tt(){return At||(At=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.animationFrame=e.animationFrameScheduler=void 0;var t=function(){if(St)return xt;St=1;var e,t=xt&&xt.__extends||(e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)},function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)});Object.defineProperty(xt,"__esModule",{value:!0}),xt.AnimationFrameAction=void 0;var r=Qe(),n=Oe(),o=function(e){function r(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return t(r,e),r.prototype.requestAsyncId=function(t,r,o){return void 0===o&&(o=0),null!==o&&o>0?e.prototype.requestAsyncId.call(this,t,r,o):(t.actions.push(this),t._scheduled||(t._scheduled=n.animationFrameProvider.requestAnimationFrame((function(){return t.flush(void 0)}))))},r.prototype.recycleAsyncId=function(t,r,o){var i;if(void 0===o&&(o=0),null!=o?o>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,t,r,o);var a=t.actions;null!=r&&r===t._scheduled&&(null===(i=a[a.length-1])||void 0===i?void 0:i.id)!==r&&(n.animationFrameProvider.cancelAnimationFrame(r),t._scheduled=void 0)},r}(r.AsyncAction);return xt.AnimationFrameAction=o,xt}(),r=function(){if(jt)return $t;jt=1;var e,t=$t&&$t.__extends||(e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)},function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)});Object.defineProperty($t,"__esModule",{value:!0}),$t.AnimationFrameScheduler=void 0;var r=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return t(r,e),r.prototype.flush=function(e){var t;this._active=!0,e?t=e.id:(t=this._scheduled,this._scheduled=void 0);var r,n=this.actions;e=e||n.shift();do{if(r=e.execute(e.state,e.delay))break}while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,r){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw r}},r}(dt().AsyncScheduler);return $t.AnimationFrameScheduler=r,$t}();e.animationFrameScheduler=new r.AnimationFrameScheduler(t.AnimationFrameAction),e.animationFrame=e.animationFrameScheduler}(Pt)),Pt}var kt,Et={};var Mt,It={},Ft={};function Ct(){return Mt||(Mt=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.empty=e.EMPTY=void 0;var t=ne();e.EMPTY=new t.Observable((function(e){return e.complete()})),e.empty=function(r){return r?function(e){return new t.Observable((function(t){return e.schedule((function(){return t.complete()}))}))}(r):e.EMPTY}}(Ft)),Ft}var Lt,Rt,Nt={},Wt={},zt={};function Dt(){if(Lt)return zt;Lt=1,Object.defineProperty(zt,"__esModule",{value:!0}),zt.isScheduler=void 0;var e=b();return zt.isScheduler=function(t){return t&&e.isFunction(t.schedule)},zt}function Bt(){if(Rt)return Wt;Rt=1,Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.popNumber=Wt.popScheduler=Wt.popResultSelector=void 0;var e=b(),t=Dt();function r(e){return e[e.length-1]}return Wt.popResultSelector=function(t){return e.isFunction(r(t))?t.pop():void 0},Wt.popScheduler=function(e){return t.isScheduler(r(e))?e.pop():void 0},Wt.popNumber=function(e,t){return"number"==typeof r(e)?e.pop():t},Wt}var qt,Vt={},Ut={},Ht={},Gt={},Yt={};function Xt(){return qt||(qt=1,Object.defineProperty(Yt,"__esModule",{value:!0}),Yt.isArrayLike=void 0,Yt.isArrayLike=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e}),Yt}var Qt,Kt={};function Zt(){if(Qt)return Kt;Qt=1,Object.defineProperty(Kt,"__esModule",{value:!0}),Kt.isPromise=void 0;var e=b();return Kt.isPromise=function(t){return e.isFunction(null==t?void 0:t.then)},Kt}var Jt,er={};function tr(){if(Jt)return er;Jt=1,Object.defineProperty(er,"__esModule",{value:!0}),er.isInteropObservable=void 0;var e=X(),t=b();return er.isInteropObservable=function(r){return t.isFunction(r[e.observable])},er}var rr,nr={};function or(){if(rr)return nr;rr=1,Object.defineProperty(nr,"__esModule",{value:!0}),nr.isAsyncIterable=void 0;var e=b();return nr.isAsyncIterable=function(t){return Symbol.asyncIterator&&e.isFunction(null==t?void 0:t[Symbol.asyncIterator])},nr}var ir,ar={};function ur(){if(ir)return ar;return ir=1,Object.defineProperty(ar,"__esModule",{value:!0}),ar.createInvalidObservableTypeError=void 0,ar.createInvalidObservableTypeError=function(e){return new TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")},ar}var sr,lr,cr={},dr={};function fr(){if(sr)return dr;function e(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}return sr=1,Object.defineProperty(dr,"__esModule",{value:!0}),dr.iterator=dr.getSymbolIterator=void 0,dr.getSymbolIterator=e,dr.iterator=e(),dr}function pr(){if(lr)return cr;lr=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.isIterable=void 0;var e=fr(),t=b();return cr.isIterable=function(r){return t.isFunction(null==r?void 0:r[e.iterator])},cr}var hr,br,vr={};function mr(){if(hr)return vr;hr=1;var e=vr&&vr.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]1||s(e,t)}))})}function s(e,r){try{(n=i[e](r)).value instanceof t?Promise.resolve(n.value.v).then(l,c):d(a[0][2],n)}catch(e){d(a[0][3],e)}var n}function l(e){s("next",e)}function c(e){s("throw",e)}function d(e,t){e(t),a.shift(),a.length&&s(a[0][0],a[0][1])}};Object.defineProperty(vr,"__esModule",{value:!0}),vr.isReadableStreamLike=vr.readableStreamLikeToAsyncGenerator=void 0;var n=b();return vr.readableStreamLikeToAsyncGenerator=function(n){return r(this,arguments,(function(){var r,o,i;return e(this,(function(e){switch(e.label){case 0:r=n.getReader(),e.label=1;case 1:e.trys.push([1,,9,10]),e.label=2;case 2:return[4,t(r.read())];case 3:return o=e.sent(),i=o.value,o.done?[4,t(void 0)]:[3,5];case 4:return[2,e.sent()];case 5:return[4,t(i)];case 6:return[4,e.sent()];case 7:return e.sent(),[3,2];case 8:return[3,10];case 9:return r.releaseLock(),[7];case 10:return[2]}}))}))},vr.isReadableStreamLike=function(e){return n.isFunction(null==e?void 0:e.getReader)},vr}function gr(){if(br)return Gt;br=1;var e=Gt&&Gt.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{s(n.next(e))}catch(e){i(e)}}function u(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,u)}s((n=n.apply(e,t||[])).next())}))},t=Gt&&Gt.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.fromReadableStreamLike=Gt.fromAsyncIterable=Gt.fromIterable=Gt.fromPromise=Gt.fromArrayLike=Gt.fromInteropObservable=Gt.innerFrom=void 0;var o=Xt(),i=Zt(),a=ne(),u=tr(),s=or(),l=ur(),c=pr(),d=mr(),f=b(),p=L(),h=X();function v(e){return new a.Observable((function(t){var r=e[h.observable]();if(f.isFunction(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")}))}function m(e){return new a.Observable((function(t){for(var r=0;r0&&l(d)}),void 0,void 0,(function(){(null==n?void 0:n.closed)||null==n||n.unsubscribe(),i=null}))),!s&&l(null!=c?"number"==typeof c?c:+c-b.now():d)}))}}(_n)),_n}var Sn,Pn,xn,jn,An={},$n={},Tn={},kn={};function En(){if(Sn)return kn;Sn=1,Object.defineProperty(kn,"__esModule",{value:!0}),kn.map=void 0;var e=se(),t=pe();return kn.map=function(r,n){return e.operate((function(e,o){var i=0;e.subscribe(t.createOperatorSubscriber(o,(function(e){o.next(r.call(n,e,i++))})))}))},kn}function Mn(){if(Pn)return Tn;Pn=1;var e=Tn&&Tn.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},t=Tn&&Tn.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},t=$n&&$n.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a};Object.defineProperty(bo,"__esModule",{value:!0}),bo.fromEvent=void 0;var t=gr(),r=ne(),n=ro(),o=Xt(),i=b(),a=Mn(),u=["addListener","removeListener"],s=["addEventListener","removeEventListener"],l=["on","off"];function c(e,t){return function(r){return function(n){return e[r](t,n)}}}return bo.fromEvent=function d(f,p,h,b){if(i.isFunction(h)&&(b=h,h=void 0),b)return d(f,p,h).pipe(a.mapOneOrManyArgs(b));var v=e(function(e){return i.isFunction(e.addEventListener)&&i.isFunction(e.removeEventListener)}(f)?s.map((function(e){return function(t){return f[e](p,t,h)}})):function(e){return i.isFunction(e.addListener)&&i.isFunction(e.removeListener)}(f)?u.map(c(f,p)):function(e){return i.isFunction(e.on)&&i.isFunction(e.off)}(f)?l.map(c(f,p)):[],2),m=v[0],g=v[1];if(!m&&o.isArrayLike(f))return n.mergeMap((function(e){return d(e,p,h)}))(t.innerFrom(f));if(!m)throw new TypeError("Invalid event target");return new r.Observable((function(e){var t=function(){for(var t=[],r=0;r0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},t=ii&&ii.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(_i,"__esModule",{value:!0}),_i.bufferCount=void 0;var t=se(),r=pe(),n=j();return _i.bufferCount=function(o,i){return void 0===i&&(i=null),i=null!=i?i:o,t.operate((function(t,a){var u=[],s=0;t.subscribe(r.createOperatorSubscriber(a,(function(t){var r,l,c,d,f=null;s++%i==0&&u.push([]);try{for(var p=e(u),h=p.next();!h.done;h=p.next()){(m=h.value).push(t),o<=m.length&&(f=null!=f?f:[]).push(m)}}catch(e){r={error:e}}finally{try{h&&!h.done&&(l=p.return)&&l.call(p)}finally{if(r)throw r.error}}if(f)try{for(var b=e(f),v=b.next();!v.done;v=b.next()){var m=v.value;n.arrRemove(u,m),a.next(m)}}catch(e){c={error:e}}finally{try{v&&!v.done&&(d=b.return)&&d.call(b)}finally{if(c)throw c.error}}}),(function(){var t,r;try{for(var n=e(u),o=n.next();!o.done;o=n.next()){var i=o.value;a.next(i)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}a.complete()}),void 0,(function(){u=null})))}))},_i}var wi,Oi={};function Si(){if(wi)return Oi;wi=1;var e=Oi&&Oi.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Oi,"__esModule",{value:!0}),Oi.bufferTime=void 0;var t=A(),r=se(),n=pe(),o=j(),i=bt(),a=Bt(),u=Sr();return Oi.bufferTime=function(s){for(var l,c,d=[],f=1;f=0?u.executeSchedule(i,p,d,h,!0):l=!0,d();var f=n.createOperatorSubscriber(i,(function(t){var r,n,o=a.slice();try{for(var i=e(o),u=i.next();!u.done;u=i.next()){var s=u.value,l=s.buffer;l.push(t),b<=l.length&&c(s)}}catch(e){r={error:e}}finally{try{u&&!u.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}}),(function(){for(;null==a?void 0:a.length;)i.next(a.shift().buffer);null==f||f.unsubscribe(),i.complete(),i.unsubscribe()}),void 0,(function(){return a=null}));r.subscribe(f)}))},Oi}var Pi,xi={};function ji(){if(Pi)return xi;Pi=1;var e=xi&&xi.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(xi,"__esModule",{value:!0}),xi.bufferToggle=void 0;var t=A(),r=se(),n=gr(),o=pe(),i=W(),a=j();return xi.bufferToggle=function(u,s){return r.operate((function(r,l){var c=[];n.innerFrom(u).subscribe(o.createOperatorSubscriber(l,(function(e){var r=[];c.push(r);var u=new t.Subscription;u.add(n.innerFrom(s(e)).subscribe(o.createOperatorSubscriber(l,(function(){a.arrRemove(c,r),l.next(r),u.unsubscribe()}),i.noop)))}),i.noop)),r.subscribe(o.createOperatorSubscriber(l,(function(t){var r,n;try{for(var o=e(c),i=o.next();!i.done;i=o.next()){i.value.push(t)}}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}}),(function(){for(;c.length>0;)l.next(c.shift());l.complete()})))}))},xi}var Ai,$i={};function Ti(){if(Ai)return $i;Ai=1,Object.defineProperty($i,"__esModule",{value:!0}),$i.bufferWhen=void 0;var e=se(),t=W(),r=pe(),n=gr();return $i.bufferWhen=function(o){return e.operate((function(e,i){var a=null,u=null,s=function(){null==u||u.unsubscribe();var e=a;a=[],e&&i.next(e),n.innerFrom(o()).subscribe(u=r.createOperatorSubscriber(i,s,t.noop))};s(),e.subscribe(r.createOperatorSubscriber(i,(function(e){return null==a?void 0:a.push(e)}),(function(){a&&i.next(a),i.complete()}),void 0,(function(){return a=u=null})))}))},$i}var ki,Ei={};function Mi(){if(ki)return Ei;ki=1,Object.defineProperty(Ei,"__esModule",{value:!0}),Ei.catchError=void 0;var e=gr(),t=pe(),r=se();return Ei.catchError=function n(o){return r.operate((function(r,i){var a,u=null,s=!1;u=r.subscribe(t.createOperatorSubscriber(i,void 0,void 0,(function(t){a=e.innerFrom(o(t,n(o)(r))),u?(u.unsubscribe(),u=null,a.subscribe(i)):s=!0}))),s&&(u.unsubscribe(),u=null,a.subscribe(i))}))},Ei}var Ii,Fi,Ci,Li,Ri,Ni,Wi={},zi={},Di={},Bi={},qi={},Vi={};function Ui(){if(Ii)return Vi;Ii=1,Object.defineProperty(Vi,"__esModule",{value:!0}),Vi.scanInternals=void 0;var e=pe();return Vi.scanInternals=function(t,r,n,o,i){return function(a,u){var s=n,l=r,c=0;a.subscribe(e.createOperatorSubscriber(u,(function(e){var r=c++;l=s?t(l,e,r):(s=!0,e),o&&u.next(l)}),i&&function(){s&&u.next(l),u.complete()}))}},Vi}function Hi(){if(Fi)return qi;Fi=1,Object.defineProperty(qi,"__esModule",{value:!0}),qi.reduce=void 0;var e=Ui(),t=se();return qi.reduce=function(r,n){return t.operate(e.scanInternals(r,n,arguments.length>=2,!1,!0))},qi}function Gi(){if(Ci)return Bi;Ci=1,Object.defineProperty(Bi,"__esModule",{value:!0}),Bi.toArray=void 0;var e=Hi(),t=se(),r=function(e,t){return e.push(t),e};return Bi.toArray=function(){return t.operate((function(t,n){e.reduce(r,[])(t).subscribe(n)}))},Bi}function Yi(){if(Li)return Di;Li=1,Object.defineProperty(Di,"__esModule",{value:!0}),Di.joinAllInternals=void 0;var e=te(),t=Mn(),r=re(),n=ro(),o=Gi();return Di.joinAllInternals=function(i,a){return r.pipe(o.toArray(),n.mergeMap((function(e){return i(e)})),a?t.mapOneOrManyArgs(a):e.identity)},Di}function Xi(){if(Ri)return zi;Ri=1,Object.defineProperty(zi,"__esModule",{value:!0}),zi.combineLatestAll=void 0;var e=Vn(),t=Yi();return zi.combineLatestAll=function(r){return t.joinAllInternals(e.combineLatest,r)},zi}function Qi(){if(Ni)return Wi;Ni=1,Object.defineProperty(Wi,"__esModule",{value:!0}),Wi.combineAll=void 0;var e=Xi();return Wi.combineAll=e.combineLatestAll,Wi}var Ki,Zi,Ji={},ea={};function ta(){if(Ki)return ea;Ki=1;var e=ea&&ea.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},t=ea&&ea.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},t=Ji&&Ji.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},t=fa&&fa.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},t=da&&da.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r=2;return function(s){return s.pipe(t.filter((function(e,t){return t===i})),o.take(1),u?n.defaultIfEmpty(a):r.throwIfEmpty((function(){return new e.ArgumentOutOfRangeError})))}},uu}var du,fu={};function pu(){if(du)return fu;du=1;var e=fu&&fu.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},t=fu&&fu.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r=2;return function(l){return l.pipe(a?t.filter((function(e,t){return a(e,t,l)})):i.identity,r.take(1),s?n.defaultIfEmpty(u):o.throwIfEmpty((function(){return new e.EmptyError})))}},Wu}var Du,Bu={};function qu(){if(Du)return Bu;Du=1,Object.defineProperty(Bu,"__esModule",{value:!0}),Bu.groupBy=void 0;var e=ne(),t=gr(),r=Te(),n=se(),o=pe();return Bu.groupBy=function(i,a,u,s){return n.operate((function(n,l){var c;a&&"function"!=typeof a?(u=a.duration,c=a.element,s=a.connector):c=a;var d=new Map,f=function(e){d.forEach(e),e(l)},p=function(e){return f((function(t){return t.error(e)}))},h=0,b=!1,v=new o.OperatorSubscriber(l,(function(n){try{var a=i(n),f=d.get(a);if(!f){d.set(a,f=s?s():new r.Subject);var m=(_=a,y=f,(w=new e.Observable((function(e){h++;var t=y.subscribe(e);return function(){t.unsubscribe(),0==--h&&b&&v.unsubscribe()}}))).key=_,w);if(l.next(m),u){var g=o.createOperatorSubscriber(f,(function(){f.complete(),null==g||g.unsubscribe()}),void 0,void 0,(function(){return d.delete(a)}));v.add(t.innerFrom(u(m)).subscribe(g))}}f.next(c?c(n):n)}catch(e){p(e)}var _,y,w}),(function(){return f((function(e){return e.complete()}))}),p,(function(){return d.clear()}),(function(){return b=!0,0===h}));n.subscribe(v)}))},Bu}var Vu,Uu={};function Hu(){if(Vu)return Uu;Vu=1,Object.defineProperty(Uu,"__esModule",{value:!0}),Uu.isEmpty=void 0;var e=se(),t=pe();return Uu.isEmpty=function(){return e.operate((function(e,r){e.subscribe(t.createOperatorSubscriber(r,(function(){r.next(!1),r.complete()}),(function(){r.next(!0),r.complete()})))}))},Uu}var Gu,Yu,Xu={},Qu={};function Ku(){if(Gu)return Qu;Gu=1;var e=Qu&&Qu.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Qu,"__esModule",{value:!0}),Qu.takeLast=void 0;var t=Ct(),r=se(),n=pe();return Qu.takeLast=function(o){return o<=0?function(){return t.EMPTY}:r.operate((function(t,r){var i=[];t.subscribe(n.createOperatorSubscriber(r,(function(e){i.push(e),o=2;return function(l){return l.pipe(a?t.filter((function(e,t){return a(e,t,l)})):i.identity,r.takeLast(1),s?o.defaultIfEmpty(u):n.throwIfEmpty((function(){return new e.EmptyError})))}},Xu}var Ju,es={};function ts(){if(Ju)return es;Ju=1,Object.defineProperty(es,"__esModule",{value:!0}),es.materialize=void 0;var e=Kr(),t=se(),r=pe();return es.materialize=function(){return t.operate((function(t,n){t.subscribe(r.createOperatorSubscriber(n,(function(t){n.next(e.Notification.createNext(t))}),(function(){n.next(e.Notification.createComplete()),n.complete()}),(function(t){n.next(e.Notification.createError(t)),n.complete()})))}))},es}var rs,ns={};function os(){if(rs)return ns;rs=1,Object.defineProperty(ns,"__esModule",{value:!0}),ns.max=void 0;var e=Hi(),t=b();return ns.max=function(r){return e.reduce(t.isFunction(r)?function(e,t){return r(e,t)>0?e:t}:function(e,t){return e>t?e:t})},ns}var is,as={};function us(){if(is)return as;is=1,Object.defineProperty(as,"__esModule",{value:!0}),as.flatMap=void 0;var e=ro();return as.flatMap=e.mergeMap,as}var ss,ls={};function cs(){if(ss)return ls;ss=1,Object.defineProperty(ls,"__esModule",{value:!0}),ls.mergeMapTo=void 0;var e=ro(),t=b();return ls.mergeMapTo=function(r,n,o){return void 0===o&&(o=1/0),t.isFunction(n)?e.mergeMap((function(){return r}),n,o):("number"==typeof n&&(o=n),e.mergeMap((function(){return r}),o))},ls}var ds,fs={};function ps(){if(ds)return fs;ds=1,Object.defineProperty(fs,"__esModule",{value:!0}),fs.mergeScan=void 0;var e=se(),t=to();return fs.mergeScan=function(r,n,o){return void 0===o&&(o=1/0),e.operate((function(e,i){var a=n;return t.mergeInternals(e,i,(function(e,t){return r(a,e,t)}),o,(function(e){a=e}),!1,void 0,(function(){return a=null}))}))},fs}var hs,bs,vs={},ms={};function gs(){if(hs)return ms;hs=1;var e=ms&&ms.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},t=ms&&ms.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},t=vs&&vs.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},t=As&&As.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},t=Ys&&Ys.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r=2,!0))},bl}var ml,gl={};function _l(){if(ml)return gl;ml=1,Object.defineProperty(gl,"__esModule",{value:!0}),gl.sequenceEqual=void 0;var e=se(),t=pe(),r=gr();return gl.sequenceEqual=function(n,o){return void 0===o&&(o=function(e,t){return e===t}),e.operate((function(e,i){var a={buffer:[],complete:!1},u={buffer:[],complete:!1},s=function(e){i.next(e),i.complete()},l=function(e,r){var n=t.createOperatorSubscriber(i,(function(t){var n=r.buffer,i=r.complete;0===n.length?i?s(!1):e.buffer.push(t):!o(t,n.shift())&&s(!1)}),(function(){e.complete=!0;var t=r.complete,o=r.buffer;t&&s(0===o.length),null==n||n.unsubscribe()}));return n};e.subscribe(l(a,u)),r.innerFrom(n).subscribe(l(u,a))}))},gl}var yl,wl={};function Ol(){if(yl)return wl;yl=1;var e=wl&&wl.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},t=wl&&wl.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r0&&(t=new o.SafeSubscriber({next:function(e){return g.next(e)},error:function(e){h=!0,b(),n=a(v,l,e),g.error(e)},complete:function(){f=!0,b(),n=a(v,d),g.complete()}}),r.innerFrom(e).subscribe(t))}))(e)}},wl}var Sl,Pl={};function xl(){if(Sl)return Pl;Sl=1,Object.defineProperty(Pl,"__esModule",{value:!0}),Pl.shareReplay=void 0;var e=Ne(),t=Ol();return Pl.shareReplay=function(r,n,o){var i,a,u,s,l=!1;return r&&"object"==typeof r?(i=r.bufferSize,s=void 0===i?1/0:i,a=r.windowTime,n=void 0===a?1/0:a,l=void 0!==(u=r.refCount)&&u,o=r.scheduler):s=null!=r?r:1/0,t.share({connector:function(){return new e.ReplaySubject(s,n,o)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:l})},Pl}var jl,Al={};function $l(){if(jl)return Al;jl=1,Object.defineProperty(Al,"__esModule",{value:!0}),Al.single=void 0;var e=on(),t=vn(),r=pn(),n=se(),o=pe();return Al.single=function(i){return n.operate((function(n,a){var u,s=!1,l=!1,c=0;n.subscribe(o.createOperatorSubscriber(a,(function(e){l=!0,i&&!i(e,c++,n)||(s&&a.error(new t.SequenceError("Too many matching values")),s=!0,u=e)}),(function(){s?(a.next(u),a.complete()):a.error(l?new r.NotFoundError("No matching values"):new e.EmptyError)})))}))},Al}var Tl,kl={};function El(){if(Tl)return kl;Tl=1,Object.defineProperty(kl,"__esModule",{value:!0}),kl.skip=void 0;var e=Qo();return kl.skip=function(t){return e.filter((function(e,r){return t<=r}))},kl}var Ml,Il={};function Fl(){if(Ml)return Il;Ml=1,Object.defineProperty(Il,"__esModule",{value:!0}),Il.skipLast=void 0;var e=te(),t=se(),r=pe();return Il.skipLast=function(n){return n<=0?e.identity:t.operate((function(e,t){var o=new Array(n),i=0;return e.subscribe(r.createOperatorSubscriber(t,(function(e){var r=i++;if(r=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(kc,"__esModule",{value:!0}),kc.windowCount=void 0;var t=Te(),r=se(),n=pe();return kc.windowCount=function(o,i){void 0===i&&(i=0);var a=i>0?i:o;return r.operate((function(r,i){var u=[new t.Subject],s=0;i.next(u[0].asObservable()),r.subscribe(n.createOperatorSubscriber(i,(function(r){var n,l;try{for(var c=e(u),d=c.next();!d.done;d=c.next()){d.value.next(r)}}catch(e){n={error:e}}finally{try{d&&!d.done&&(l=c.return)&&l.call(c)}finally{if(n)throw n.error}}var f=s-o+1;if(f>=0&&f%a==0&&u.shift().complete(),++s%a==0){var p=new t.Subject;u.push(p),i.next(p.asObservable())}}),(function(){for(;u.length>0;)u.shift().complete();i.complete()}),(function(e){for(;u.length>0;)u.shift().error(e);i.error(e)}),(function(){u=null})))}))},kc}var Mc,Ic={};function Fc(){if(Mc)return Ic;Mc=1,Object.defineProperty(Ic,"__esModule",{value:!0}),Ic.windowTime=void 0;var e=Te(),t=bt(),r=A(),n=se(),o=pe(),i=j(),a=Bt(),u=Sr();return Ic.windowTime=function(s){for(var l,c,d=[],f=1;f=0?u.executeSchedule(n,p,d,h,!0):l=!0,d();var f=function(e){return a.slice().forEach(e)},v=function(e){f((function(t){var r=t.window;return e(r)})),e(n),n.unsubscribe()};return t.subscribe(o.createOperatorSubscriber(n,(function(e){f((function(t){t.window.next(e),b<=++t.seen&&c(t)}))}),(function(){return v((function(e){return e.complete()}))}),(function(e){return v((function(t){return t.error(e)}))}))),function(){a=null}}))},Ic}var Cc,Lc={};function Rc(){if(Cc)return Lc;Cc=1;var e=Lc&&Lc.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Lc,"__esModule",{value:!0}),Lc.windowToggle=void 0;var t=Te(),r=A(),n=se(),o=gr(),i=pe(),a=W(),u=j();return Lc.windowToggle=function(s,l){return n.operate((function(n,c){var d=[],f=function(e){for(;00)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},t=Bc&&Bc.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},t=Kc&&Kc.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},t=Qc&&Qc.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;rt.index?1:-1:e.delay>t.delay?1:-1},r}(r.AsyncAction);return Et.VirtualAction=i,Et}();Object.defineProperty(e,"VirtualTimeScheduler",{enumerable:!0,get:function(){return m.VirtualTimeScheduler}}),Object.defineProperty(e,"VirtualAction",{enumerable:!0,get:function(){return m.VirtualAction}});var g=ct();Object.defineProperty(e,"Scheduler",{enumerable:!0,get:function(){return g.Scheduler}});var _=A();Object.defineProperty(e,"Subscription",{enumerable:!0,get:function(){return _.Subscription}});var y=H();Object.defineProperty(e,"Subscriber",{enumerable:!0,get:function(){return y.Subscriber}});var w=Kr();Object.defineProperty(e,"Notification",{enumerable:!0,get:function(){return w.Notification}}),Object.defineProperty(e,"NotificationKind",{enumerable:!0,get:function(){return w.NotificationKind}});var S=re();Object.defineProperty(e,"pipe",{enumerable:!0,get:function(){return S.pipe}});var P=W();Object.defineProperty(e,"noop",{enumerable:!0,get:function(){return P.noop}});var x=te();Object.defineProperty(e,"identity",{enumerable:!0,get:function(){return x.identity}});var j=function(){if(Zr)return Jr;Zr=1,Object.defineProperty(Jr,"__esModule",{value:!0}),Jr.isObservable=void 0;var e=ne(),t=b();return Jr.isObservable=function(r){return!!r&&(r instanceof e.Observable||t.isFunction(r.lift)&&t.isFunction(r.subscribe))},Jr}();Object.defineProperty(e,"isObservable",{enumerable:!0,get:function(){return j.isObservable}});var $=function(){if(tn)return rn;tn=1,Object.defineProperty(rn,"__esModule",{value:!0}),rn.lastValueFrom=void 0;var e=on();return rn.lastValueFrom=function(t,r){var n="object"==typeof r;return new Promise((function(o,i){var a,u=!1;t.subscribe({next:function(e){a=e,u=!0},error:i,complete:function(){u?o(a):n?o(r.defaultValue):i(new e.EmptyError)}})}))},rn}();Object.defineProperty(e,"lastValueFrom",{enumerable:!0,get:function(){return $.lastValueFrom}});var T=function(){if(an)return un;an=1,Object.defineProperty(un,"__esModule",{value:!0}),un.firstValueFrom=void 0;var e=on(),t=H();return un.firstValueFrom=function(r,n){var o="object"==typeof n;return new Promise((function(i,a){var u=new t.SafeSubscriber({next:function(e){i(e),u.unsubscribe()},error:a,complete:function(){o?i(n.defaultValue):a(new e.EmptyError)}});r.subscribe(u)}))},un}();Object.defineProperty(e,"firstValueFrom",{enumerable:!0,get:function(){return T.firstValueFrom}});var E=cn();Object.defineProperty(e,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return E.ArgumentOutOfRangeError}});var M=on();Object.defineProperty(e,"EmptyError",{enumerable:!0,get:function(){return M.EmptyError}});var I=pn();Object.defineProperty(e,"NotFoundError",{enumerable:!0,get:function(){return I.NotFoundError}});var F=$e();Object.defineProperty(e,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return F.ObjectUnsubscribedError}});var C=vn();Object.defineProperty(e,"SequenceError",{enumerable:!0,get:function(){return C.SequenceError}});var L=On();Object.defineProperty(e,"TimeoutError",{enumerable:!0,get:function(){return L.TimeoutError}});var R=O();Object.defineProperty(e,"UnsubscriptionError",{enumerable:!0,get:function(){return R.UnsubscriptionError}});var N=function(){if(jn)return An;jn=1,Object.defineProperty(An,"__esModule",{value:!0}),An.bindCallback=void 0;var e=In();return An.bindCallback=function(t,r,n){return e.bindCallbackInternals(!1,t,r,n)},An}();Object.defineProperty(e,"bindCallback",{enumerable:!0,get:function(){return N.bindCallback}});var z=function(){if(Fn)return Cn;Fn=1,Object.defineProperty(Cn,"__esModule",{value:!0}),Cn.bindNodeCallback=void 0;var e=In();return Cn.bindNodeCallback=function(t,r,n){return e.bindCallbackInternals(!0,t,r,n)},Cn}();Object.defineProperty(e,"bindNodeCallback",{enumerable:!0,get:function(){return z.bindNodeCallback}});var D=Vn();Object.defineProperty(e,"combineLatest",{enumerable:!0,get:function(){return D.combineLatest}});var B=io();Object.defineProperty(e,"concat",{enumerable:!0,get:function(){return B.concat}});var q=function(){if(uo)return so;uo=1,Object.defineProperty(so,"__esModule",{value:!0}),so.connectable=void 0;var e=Te(),t=ne(),r=co(),n={connector:function(){return new e.Subject},resetOnDisconnect:!0};return so.connectable=function(e,o){void 0===o&&(o=n);var i=null,a=o.connector,u=o.resetOnDisconnect,s=void 0===u||u,l=a(),c=new t.Observable((function(e){return l.subscribe(e)}));return c.connect=function(){return i&&!i.closed||(i=r.defer((function(){return e})).subscribe(l),s&&i.add((function(){return l=a()}))),i},c},so}();Object.defineProperty(e,"connectable",{enumerable:!0,get:function(){return q.connectable}});var V=co();Object.defineProperty(e,"defer",{enumerable:!0,get:function(){return V.defer}});var U=Ct();Object.defineProperty(e,"empty",{enumerable:!0,get:function(){return U.empty}});var G=function(){if(fo)return po;fo=1,Object.defineProperty(po,"__esModule",{value:!0}),po.forkJoin=void 0;var e=ne(),t=Wn(),r=gr(),n=Bt(),o=pe(),i=Mn(),a=qn();return po.forkJoin=function(){for(var u=[],s=0;s0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},t=ud&&ud.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r{let t=e.querySelector("graphic[url]"),r=e.querySelectorAll("p"),n={id:e.getAttribute("id"),paragraphs:Array.from(r)};return null!==t&&(n.img=t.getAttribute("url")),e.attributes&&(n.attributes=e.attributes),n}))}function pd(e){let t={};return Array.from(e.querySelectorAll("meta")).forEach((e=>{const r=e.getAttribute("name");let n=e.getAttribute("content");t[r]=n.trim()})),t}var hd=function(e){var t=this;t.sounds=[],t._sprite=e.sprite,t._reading$=new rd.Subject,t._tinySprite=Object.keys(e.sprite).map((e=>[t._sprite[e][0],e,t._sprite[e][0]+t._sprite[e][1]])),t._tinySprite.pop(),t._percentPlayed=new rd.BehaviorSubject("0%"),t.sound=new c.Howl({src:e.src,sprite:e.sprite,rate:e.rate,onend:function(){t._reading$.next("")}}),requestAnimationFrame(t.step.bind(t))};async function bd(e){return new Promise((function(t,r){let n=new XMLHttpRequest;n.open("HEAD",e),n.onload=function(){this.status>=200&&this.status<300?t(!0):t(!1)},n.onerror=function(){t(!1)},n.send()}))}hd.prototype={play:function(e){var t=this;t._spriteLeft=t._tinySprite;var r=e;return t.sound.play(r)},pause:function(){return this.sound.pause(),this.sound.id},goBack:function(e,t){var r=this;if(r._spriteLeft=r._tinySprite,r.sound.seek(e)-t>0){e=r.sound.seek(r.sound.seek(e)-t,e);for(var n=r.sound.seek(e),o=0;o=r._spriteLeft[o][0]&&(1e3*n<=r._spriteLeft[o][2]&&r._reading$.next(r._spriteLeft[o][1]),r._spriteLeft=r._spriteLeft.slice(o,r._spriteLeft.length));r._reading$.next(r._spriteLeft[0][1])}else{e=r.sound.seek(0,e);r._reading$.next(r._spriteLeft[0][1])}return e},goTo:function(e,t){var r=this;r._spriteLeft=r._tinySprite;e=r.sound.seek(t,e);for(var n=1e3*r.sound.seek(e),o=0;o=r._spriteLeft[o][0]&&n<=r._spriteLeft[o][2]){r._reading$.next(r._spriteLeft[o][1]),e=r.sound.seek(r._spriteLeft[o][0],e),r.sound.seek(e),r._spriteLeft=r._spriteLeft.slice(o,r._spriteLeft.length);break}if(r.sounds.length){const n=(Math.round(t/r.sound.duration(e)*100)||0)+"%";r.sounds[0].style.width=n,r.sounds[0].setAttribute("offset",n)}return e},stop:function(){return this._reading$.next(""),this.sound.stop()},step:function(){for(var e=this,t=0;t0&&1e3*r>=e._spriteLeft[n][0]&&(1e3*r<=e._spriteLeft[n][2]&&e._reading$.next(e._spriteLeft[n][1]),e._spriteLeft=e._spriteLeft.slice(n,e._spriteLeft.length));let o=(r/e.sound.duration()*100||0)+"%";e.sounds[t].style.width=o,e.sounds[t].setAttribute("offset",o)}requestAnimationFrame(e.step.bind(e))}};const vd=e=>e.innerHTML.includes(""),md={page:"Page",speed:"Playback Speed","re-align":"Re-align with audio","loading-error":'Error: the file "" could not be loaded.',"parse-error":'Error: the file "" could not be parsed.',"alignment-error":"Error: No alignments were found.","image-error":'Error: the file "" is not an image file.',loading:"Loading...","line-placeholder":"Type your text here","upload-image":"Upload an image for this page","choose-file":"Choose a file","play-tooltip":"Play/pause audio recording","rewind-tooltip":"Rewind 5 seconds","stop-tooltip":"Stop audio playback","theme-tooltip":"Toggle dark/light mode","full-screen-tooltip":"Full screen mode","translation-tooltip":"Toggle translations","add-translation":"Add a translation, transliteration or gloss","configuration-tooltip":"Preferences",settings:"My preferences","page-animation":"Animated page transitions","auto-pause":"Pause at the end of each page",language:"Interface language","save-settings":"Remember my preferences for this site",eng:"English",fra:"French",spa:"Spanish",close:"Close","annotations-tooltip":"Annotations"},gd={page:"Page",speed:"Vitesse de Lecture","re-align":"Réaligner avec l'audio","loading-error":'Erreur: le fichier "" n\'a pas pu être chargé.',"parse-error":'Erreur: le fichier "" n\'a pas pu être analysé.',"alignment-error":"Erreur: aucun alignement n'a été trouvé.","image-error":'Erreur: le fichier "" n\'est pas un fichier image.',loading:"Chargement en cours","line-placeholder":"Écrivez votre texte ici","upload-image":"Ajouter une image à cette page","choose-file":"Choisir un fichier","play-tooltip":"Écouter/mettre en pause l'enregistrement","rewind-tooltip":"Reculer de 5 secondes","stop-tooltip":"Arrêter la lecture","theme-tooltip":"Basculer en mode sombre/clair","full-screen-tooltip":"Mode plein écran","translation-tooltip":"Afficher ou cacher les traductions","add-translation":"Ajouter une traduction, une translitération ou une glose","configuration-tooltip":"Préférences",settings:"Mes préférences","page-animation":"Transitions de page animées","auto-pause":"Pause à la fin de chaque page",language:"Langue de l'interface","save-settings":"Sauvegarder mes préférences pour ce site",eng:"Anglais",fra:"Français",spa:"Espagnol",close:"Fermer","annotations-tooltip":"Annotations"},_d={page:"Página",speed:"Velocidad de reproducción","re-align":"Re-alinear con el audio","loading-error":'Error: el fichero "" no se pudo cargar.',"parse-error":'Error: el fichero "" no se pudo analizar.',"alignment-error":"Error: No se encontró ningún alineamiento.","image-error":'Error: el fichero "" no es un archivo de imagen.',loading:"Cargando...","line-placeholder":"Escriba su texto aquí","upload-image":"Cargue una imagen para esta página","choose-file":"Seleccione un fichero","play-tooltip":"Reproducir/pausar grabación de audio","rewind-tooltip":"Rebobine (rewind) 5 segundos","stop-tooltip":"Pare la reproducción de audio","theme-tooltip":"Cambie la paleta de colores","full-screen-tooltip":"Modo pantalla completa","translation-tooltip":"Active o desactive las traducciones","add-translation":"Añada una traducción, transliteración o glosa","configuration-tooltip":"Preferencias",settings:"Mis preferencias","page-animation":"Transiciónes de página animadas","auto-pause":"Pausa al final de cada página",language:"Idioma de la interfaz","save-settings":"Recordar mis preferencias para este sitio",eng:"Inglés",fra:"Francés",spa:"Español",close:"Cerrar","annotations-tooltip":"Anotaciones"},yd=class{constructor(e){(0,n.r)(this,e),this.reading$=new rd.Subject,this.theme="light",this.language="eng",this.i18nStrings={eng:md,fra:gd,spa:_d},this.imageAssetsFolder="assets/",this.pageScrolling="horizontal",this.mode="VIEW",this.scrollBehaviour="smooth",this.displayTranslation=!0,this.playbackRateRange=15,this.autoPauseAtEndOfPage=!1,this.playing=!1,this.playback_rate=1,this.fullscreen=!1,this.autoScroll=!0,this.hasLoaded=0,this.showGuide=!1,this.hasTextTranslations=!1,this.invalidImages={},this.assetsStatus={AUDIO:0,RAS:0},this.alignment_failed=!1,this.isScrolling=!1,this.scrollTimer=null,this.endOfPageTags={},this.settingsVisible=!1,this.userPreferencesDirty=!1,this.meta={},this.annotations=[],this.annotationsMenuVisible=!1,this.Guide=()=>(0,n.h)("button",{class:"scroll-guide__container ripple ui-button theme--"+this.theme,onClick:()=>this.hideGuideAndScroll()},(0,n.h)("span",{class:"scroll-guide__text theme--"+this.theme},this.getI18nString("re-align"))),this.Overlay=()=>(0,n.h)("object",{onClick:e=>this.goToSeekFromProgress(e),id:"overlay__object",type:"image/svg+xml",data:this.svgOverlay}),this.RemoveImg=e=>(0,n.h)("button",{"data-test-id":"delete-button","aria-label":"Delete",title:"Delete image",onClick:()=>this.deleteImage(e.pageIndex),id:"img-remover",class:"ripple theme--"+this.theme+" background--"+this.theme},(0,n.h)("i",{class:"material-icons"},"delete")),this.Img=e=>(0,n.h)("div",{class:"image__container page__col__image theme--"+this.theme},(0,n.h)("img",{alt:"image",class:"image",src:e.imgURL})),this.ImgPlaceHolder=e=>(0,n.h)("div",{class:"image__container page__col__image theme--"+this.theme},(0,n.h)("div",{class:"drop-area"},(0,n.h)("form",{class:"my-form"},(0,n.h)("p",{class:"theme--"+this.theme},this.getI18nString("upload-image")),(0,n.h)("input",{type:"file",class:"fileElem",id:"fileElem--"+e.pageID,accept:"image/*",onChange:t=>{const r=t.target;0!==r.files.length&&(this.handleImageFile(r.files[0],e.pageIndex),r.value="")}}),(0,n.h)("label",{class:"button",htmlFor:"fileElem--"+e.pageID},this.getI18nString("choose-file"))))),this.PageCount=e=>(0,n.h)("div",{class:"page__counter color--"+this.theme},this.getI18nString("page")," ",(0,n.h)("span",{"data-test-id":"page-count__current"},e.currentPage)," / ",(0,n.h)("span",{"data-test-id":"page-count__total"},e.pgCount)),this.ImgContainer=e=>{const t=e.pageIndex in this.images&&null!==this.images[e.pageIndex];return(0,n.h)("div",{class:"image__container"},(0,n.h)("span",{id:"image-container"},"EDIT"===this.mode&&t&&(0,n.h)(this.RemoveImg,{pageIndex:e.pageIndex}),t&&(0,n.h)(this.Img,{imgURL:this.images[e.pageIndex]})),"EDIT"===this.mode&&!t&&(0,n.h)(this.ImgPlaceHolder,{pageID:e.pageID,pageIndex:e.pageIndex}))},this.Page=e=>(0,n.h)("div",{class:"page page__container page--multi animate-transition theme--"+this.theme+" "+(e.pageData.attributes.class?e.pageData.attributes.class.value:""),id:e.pageData.id},this.parsed_text.length>1?(0,n.h)(this.PageCount,{pgCount:this.parsed_text.length,currentPage:this.parsed_text.indexOf(e.pageData)+1}):null,(0,n.h)(this.ImgContainer,{pageID:e.pageData.id,pageIndex:this.parsed_text.indexOf(e.pageData)}),(0,n.h)("div",{class:"page__col__text paragraph__container theme--"+this.theme},e.pageData.paragraphs.map((e=>(0,n.h)(this.Paragraph,{sentences:Array.from(e.childNodes),attributes:e.attributes}))))),this.Paragraph=e=>(0,n.h)("div",Object.assign({},e.attributes,{class:"paragraph sentence__container theme--"+this.theme+" "+(e.attributes.class?e.attributes.class.value:"")}),e.sentences.map((e=>e.childNodes.length>0&&(0,n.h)(this.Sentence,{sentenceData:e})))),this.Sentence=e=>{let t=Array.from(e.sentenceData.childNodes),r=e.sentenceData.id;!this.hasTextTranslations&&e.sentenceData.hasAttribute("class")&&(this.hasTextTranslations=/translation/.test(e.sentenceData.getAttribute("class")));let o={};for(const t of["annotation-id","do-not-align","lang","id"])e.sentenceData.hasAttribute(t)&&(o[t]=e.sentenceData.getAttribute(t));return e.sentenceData.hasAttribute("xml:lang")&&(o.lang=e.sentenceData.getAttribute("xml:lang")),"EDIT"===this.mode&&/translation/.test(e.sentenceData.getAttribute("class"))?(0,n.h)(n.F,null):(0,n.h)("div",Object.assign({},o,{class:"sentence "+(e.sentenceData.hasAttribute("class")?e.sentenceData.getAttribute("class"):"")+(o["annotation-id"]?" invisible":"")}),t.map(((t,r)=>{if("#text"===t.nodeName)return(0,n.h)(this.NonWordText,{text:t.textContent,attributes:t.attributes,id:(e.sentenceData.hasAttribute("id")?e.sentenceData.getAttribute("id"):"P")+"text"+r});if("w"===t.nodeName||"W"===t.nodeName)return(0,n.h)(this.Word,{text:t.textContent,id:t.id,attributes:t.attributes});if(t){let o={};return t.hasAttribute("xml:lang")&&(o.lang=e.sentenceData.getAttribute("xml:lang")),t.hasAttribute("lang")&&(o.lang=e.sentenceData.getAttribute("lang")),(0,n.h)("span",Object.assign({},o,{class:"sentence__text theme--"+this.theme+" "+t.className,id:t.id?t.id:"text_"+r}),t.textContent)}})),(()=>"EDIT"!==this.mode||/translation/.test(e.sentenceData.getAttribute("class"))?null:r in this.translations&&r in this.translations&&null!==this.translations[r]?(0,n.h)("span",{class:"sentence__translation"},(0,n.h)("button",{title:"Remove translation","aria-label":"Remove translation","data-test-id":"remove-translation-button",onClick:()=>this.removeLine(e.sentenceData),class:"sentence__translation__button remove"},(0,n.h)("i",{class:"material-icons"},"remove")),(0,n.h)("p",{id:r+"translation","data-test-id":"translation-line",class:"sentence__text editable__translation",onInput:e=>{this.updateTranslation(r,e.currentTarget.innerText)},contentEditable:!0,onKeyDown:e=>{"Enter"==e.key&&e.preventDefault()},"data-placeholder":this.getI18nString("line-placeholder"),innerHTML:this.translations[r]})):(0,n.h)("button",{title:this.getI18nString("add-translation"),"aria-label":"Add translation","data-test-id":"add-translation-button",class:"sentence__translation sentence__translation__button",onClick:()=>this.addLine(e.sentenceData)},(0,n.h)("i",{class:"material-icons"},"add")))())},this.NonWordText=e=>{let t={};return e.attributes&&e.attributes["xml:lang"]&&(t.lang=e.attributes["xml:lang"].value),e.attributes&&e.attributes.lang&&(t.lang=e.attributes.lang.value),(0,n.h)("span",Object.assign({},t,{class:"sentence__text theme--"+this.theme,id:e.id}),e.text)},this.Word=e=>{let t={};return e.attributes&&e.attributes["xml:lang"]&&(t.lang=e.attributes["xml:lang"].value),e.attributes&&e.attributes.lang&&(t.lang=e.attributes.lang.value),(0,n.h)("span",Object.assign({},t,{class:"sentence__word theme--"+this.theme+" "+(e&&e.attributes.class?e.attributes.class.value:""),id:e.id,onClick:e=>this.playSprite(e)}),e.text)},this.PlayControl=()=>(0,n.h)("button",{"data-test-id":"play-button",disabled:!this.isReadyToPlay(),"aria-label":"Play",title:this.getI18nString("play-tooltip"),onClick:()=>{this.playing?this.pause():this.play()},class:"control-panel__control ripple theme--"+this.theme+" background--"+this.theme,tabindex:1},(0,n.h)("i",{class:"material-icons"},this.playing?"pause":"play_arrow")),this.ReplayControl=()=>(0,n.h)("button",{"data-test-id":"replay-button",disabled:this.hasLoaded<2,"aria-label":"Rewind",title:this.getI18nString("rewind-tooltip"),onClick:()=>this.goBack(5),class:"control-panel__control ripple theme--"+this.theme+" background--"+this.theme},(0,n.h)("i",{class:"material-icons"},"replay_5")),this.StopControl=()=>(0,n.h)("button",{"data-test-id":"stop-button",disabled:this.hasLoaded<2,"aria-label":"Stop",title:this.getI18nString("stop-tooltip"),onClick:()=>this.stop(),class:"control-panel__control ripple theme--"+this.theme+" background--"+this.theme},(0,n.h)("i",{class:"material-icons"},"stop")),this.PlaybackSpeedControl=()=>(0,n.h)("div",null,(0,n.h)("h5",{class:"control-panel__buttons__header color--"+this.theme,id:"speed-slider-label"},this.getI18nString("speed")),(0,n.h)("input",{type:"range",min:100-this.playbackRateRange,max:100+this.playbackRateRange,value:100*this.playback_rate,class:"slider control-panel__control",id:"myRange","aria-labelledby":"speed-slider-label",onInput:e=>{this.changePlayback(e)}})),this.StyleControl=()=>(0,n.h)("button",{"aria-label":"Change theme",title:this.getI18nString("theme-tooltip"),class:"control-panel__control ripple theme--"+this.theme+" background--"+this.theme},(0,n.h)("i",{class:"material-icons-outlined"},"style")),this.FullScreenControl=()=>(0,n.h)("button",{"aria-label":"Full screen mode",onClick:()=>this.toggleFullscreen(),title:this.getI18nString("full-screen-tooltip"),class:"control-panel__control ripple theme--"+this.theme+" background--"+this.theme},(0,n.h)("i",{class:"material-icons","aria-label":"Full screen mode"},this.fullscreen?"fullscreen_exit":"fullscreen")),this.TextAnnotationsControl=()=>(0,n.h)("button",{"data-test-id":"annotations-toggle","aria-label":"Toggle Annotations",title:this.getI18nString("annotations-tooltip"),onClick:()=>this.annotationsMenuVisible=!this.annotationsMenuVisible,class:"control-panel__control ripple theme--"+this.theme+" background--"+this.theme},(0,n.h)("i",{class:"material-icons-outlined"},"layers")),this.TextTranslationDisplayControl=()=>(0,n.h)("button",{"data-test-id":"translation-toggle","aria-label":"Toggle Translation",title:this.getI18nString("translation-tooltip"),onClick:()=>this.toggleTextTranslation(),class:"control-panel__control ripple theme--"+this.theme+" background--"+this.theme},(0,n.h)("i",{class:"material-icons-outlined"},"subtitles")),this.ToggleSettingsControl=()=>(0,n.h)("button",{"data-test-id":"settings-button",title:this.getI18nString("configuration-tooltip"),onClick:()=>this.toggleSettings(),id:"settings-button",class:"control-panel__control ripple theme--"+this.theme+" background--"+this.theme},(0,n.h)("i",{class:"material-icons","aria-label":"Show settings"},"settings")),this.ControlPanel=()=>(0,n.h)("div",{"data-test-id":"control-panel",class:"control-panel theme--"+this.theme+" background--"+this.theme},(0,n.h)("div",{class:"control-panel__buttons--left"},(0,n.h)(this.PlayControl,null),(0,n.h)(this.ReplayControl,null),(0,n.h)(this.StopControl,null)),(0,n.h)("div",{class:"control-panel__buttons--center"},(0,n.h)(this.PlaybackSpeedControl,null)),(0,n.h)("div",{class:"control-panel__buttons--right"},this.annotations.length>0?(0,n.h)(this.TextAnnotationsControl,null):this.hasTextTranslations&&(0,n.h)(this.TextTranslationDisplayControl,null),window.document.fullscreenEnabled&&(0,n.h)(this.FullScreenControl,null),(0,n.h)(this.ToggleSettingsControl,null))),this.Settings=()=>(0,n.h)("div",{id:"settings","data-test-id":"settings",class:"settings theme--"+this.theme},(0,n.h)("button",{class:"close","data-test-id":"settings-close-button",onClick:()=>{this.toggleSettings()}},"×"," "),(0,n.h)("h3",null,this.getI18nString("settings")),(0,n.h)("p",null,(0,n.h)("label",null,(0,n.h)("select",{title:this.getI18nString("language"),onChange:e=>{this.language=e.target.value,this.userPreferencesDirty=!0},"data-test-id":"settings-language",tabindex:2},(0,n.h)("option",{selected:"eng"==this.language,value:"eng"},this.getI18nString("eng")),(0,n.h)("option",{selected:"fra"==this.language,value:"fra"},this.getI18nString("fra")),(0,n.h)("option",{selected:"spa"==this.language,value:"spa"},this.getI18nString("spa"))),this.getI18nString("language"))),(0,n.h)("p",{onClick:()=>{this.changeTheme(),this.userPreferencesDirty=!0},tabindex:3},(0,n.h)(this.StyleControl,null),this.getI18nString("theme-tooltip")),(0,n.h)("p",{onClick:()=>{this.toggleScrollBehavior(),this.userPreferencesDirty=!0},tabindex:4},(0,n.h)("button",{class:"control-panel__control ripple theme--"+this.theme+" background--"+this.theme,title:this.getI18nString("page-animation"),"data-test-id":"settings-scroll-behavior"},(0,n.h)("i",{class:"material-icons-outlined"},"smooth"===this.scrollBehaviour?"check_box":"check_box_outline_blank")),this.getI18nString("page-animation")),(0,n.h)("p",{onClick:()=>{this.autoPauseAtEndOfPage=!this.autoPauseAtEndOfPage,this.userPreferencesDirty=!0},tabindex:5},(0,n.h)("button",{class:"control-panel__control ripple theme--"+this.theme+" background--"+this.theme,title:this.getI18nString("auto-pause"),"data-test-id":"settings-auto-pause"},(0,n.h)("i",{class:"material-icons-outlined"},this.autoPauseAtEndOfPage?"check_box":"check_box_outline_blank")),this.getI18nString("auto-pause")),(0,n.h)("p",{class:"version"},"@readalongs/web-component version: ","1.5.3"),(0,n.h)("div",{class:"footer"},(0,n.h)("button",{type:"button",class:"control-panel__control ripple theme--"+this.theme+" background--"+this.theme,title:this.getI18nString("save-settings"),onClick:()=>{var e;e={version:dd,autoPauseAtEndOfPage:this.autoPauseAtEndOfPage,scrollBehaviour:this.scrollBehaviour,language:this.language,theme:this.theme},window.localStorage.setItem(cd,JSON.stringify(e)),this.userPreferencesDirty=!1},"data-test-id":"settings-save",disabled:!this.userPreferencesDirty,tabindex:6},this.getI18nString("save-settings")),(0,n.h)("div",null),(0,n.h)("button",{onClick:()=>this.toggleSettings(),class:"control-panel__control ripple theme--"+this.theme+" background--"+this.theme,tabindex:7},this.getI18nString("close")))),this.AnnotationsMenu=()=>(0,n.h)("div",{id:"annotationsMenu",class:"annotations-menu theme--"+this.theme},this.annotations.map((e=>(0,n.h)("button",{"data-test-id":"toggle-annotation-"+e.id,class:"ripple theme--"+this.theme+" background--"+this.theme,onClick:()=>this.toggleTextAnnotation(e.id)},(0,n.h)("i",{class:"material-icons-outlined"}," ",e.isVisible?"check_box":"check_box_outline_blank")," ",e.name))),(0,n.h)("button",{"data-test-id":"toggle-all-annotations",class:"ripple theme--"+this.theme+" background--"+this.theme,onClick:()=>this.toggleTextAnnotation("*")},(0,n.h)("i",{class:"material-icons-outlined"},"layers")," All"))}handleScrollEvent(){this.isScrolling=!0,this.scrollTimer&&clearTimeout(this.scrollTimer),this.scrollTimer=setTimeout((()=>{this.isScrolling=!1}),125)}wheelHandler(e){if(this.el.shadowRoot.querySelector(".reading")&&e.path&&e.path.length>0&&(e.path[0].classList.contains("sentence__word")||e.path[0].classList.contains("sentence__container")||e.path[0].classList.contains("sentence"))&&this.autoScroll){let e=this.el.shadowRoot.querySelector(".reading");e&&(this.autoScroll=!this.inPageContentOverflow(e),this.showGuide=!this.autoScroll)}}fullScreenHandler(){this.fullscreen=null!=window.document.fullscreenElement}handleKeyDown(e){"Escape"===e.key&&this.settingsVisible&&(this.settingsVisible=!1)}urlTransform(e){return void 0!==this.useAssetsFolder?this.useAssetsFolder&&t(e)&&!e.startsWith("blob")?"assets/"+e:e:this.imageAssetsFolder&&t(e)&&!e.startsWith("blob")?(this.imageAssetsFolder&&!this.imageAssetsFolder.endsWith("/")&&(this.imageAssetsFolder+="/"),this.imageAssetsFolder+e):e;function t(e){return!/^(https?:[/][/]|assets[/]|data:)/.test(e)}}buildSprite(e,t){return new hd({src:[e],sprite:t,rate:this.playback_rate})}tagToQuery(e){return"#"+(e=(e=e.replace(".","\\.")).replace("#","\\#"))}returnWordClosestTo(e){let t=Object.keys(this.processed_alignment);t.pop();for(let r=1;rthis.processed_alignment[t[r]][0]&&this.processed_alignment[t[r+1]]&&1e3*ethis.autoScroll=!0),100)}goTo(e){void 0===this.play_id&&(this.play(),this.pause()),this.autoScroll=!0,e/=1e3,this.audio_howl_sprites.goTo(this.play_id,e),setTimeout((()=>this.autoScroll=!0),100)}goToSeekAtEl(e){let t=e.currentTarget.id,r=this.processed_alignment[t][0];return this.goTo(r),t}goToSeekFromProgress(e){let t=e.currentTarget.getBoundingClientRect(),r=t.left,n=t.width,o=(e.pageX-r)/n*this.duration*1e3;this.goTo(o)}pause(){this.playing&&(this.playing=!1,this.audio_howl_sprites.pause())}play(){void 0!==this.audio_howl_sprites&&(this.playing=!0,void 0!==this.play_id?this.play_id=this.audio_howl_sprites.play(this.play_id):this.play_id=this.audio_howl_sprites.play("all"),this.animateProgress())}playSprite(e){let t=this.goToSeekAtEl(e);this.playing||this.audio_howl_sprites.play(t)}stop(){this.playing=!1,this.play_id=void 0,this.audio_howl_sprites&&this.audio_howl_sprites.stop(),this.el.shadowRoot.querySelectorAll(".reading").forEach((e=>e.classList.remove("reading"))),this.autoScroll||(this.autoScroll=!0,this.showGuide=!1)}toggleTextTranslation(){this.el.shadowRoot.querySelectorAll(".translation, .sentence__translation, [annotation-id]").forEach((e=>e.classList.toggle("invisible")))}toggleTextAnnotation(e){this.el.shadowRoot.querySelectorAll("[annotation-id"+("*"===e?"]":'="'+e+'"]')).forEach((e=>e.classList.toggle("invisible"))),this.annotations=this.annotations.map((t=>(t.id!=e&&"*"!==e||(t.isVisible=!t.isVisible),t)))}addHighlightingTo(e){this.el.shadowRoot.querySelectorAll(".reading").forEach((e=>e.classList.remove("reading"))),e.classList.add("reading")}animateProgressWithOverlay(){let e=this.el.shadowRoot.querySelector("#overlay__object"),t=e.contentDocument.querySelector("#progress-fill"),r=e.contentDocument.querySelector("#progress-trail"),n=e.contentDocument.querySelector("#progress-base");t.classList.add("stop-color--"+this.theme),n.classList.add("stop-color--"+this.theme),this.audio_howl_sprites.sounds.push(t),this.audio_howl_sprites.sounds.push(r),this.audio_howl_sprites.sound.once("end",(()=>{this.audio_howl_sprites.sounds.forEach((e=>{e.setAttribute("offset","0%")})),this.el.shadowRoot.querySelectorAll(".reading").forEach((e=>e.classList.remove("reading"))),this.playing=!1}),this.play_id)}animateProgressDefault(e,t){let r=document.createElement("div");r.className="progress theme--"+this.theme,r.id=e.toString(),r.dataset.sprite=t;let n=this.tagToQuery(t);this.el.shadowRoot.querySelector(n).appendChild(r),this.audio_howl_sprites.sounds.push(r),this.audio_howl_sprites.sound.once("end",(()=>{this.el.shadowRoot.querySelectorAll(".reading").forEach((e=>e.classList.remove("reading"))),this.playing=!1}),this.play_id)}animateProgress(e=this.play_id){this.svgOverlay?this.animateProgressWithOverlay():e&&this.animateProgressDefault(e,"all")}changeFill(){let e=this.el.shadowRoot.querySelector(".sentence__word"),t=window.getComputedStyle(e).color,r=this.el.shadowRoot.querySelector("#overlay__object"),n=r.contentDocument.querySelector("#progress-fill"),o=r.contentDocument.querySelector("#progress-base");r.contentDocument.querySelector("#polygon").setAttribute("stroke",t),o.setAttribute("stop-color",t),n.setAttribute("stop-color",t)}async getCurrentWord(){return this.reading$}async getImages(){return this.images}async updateSpriteAlignments(e){this.stop(),this.processed_alignment=e,this.attachScrollingLogicToAudio()}async getReadAlongElement(){return this.el}async getAlignments(){return this.processed_alignment}async getTranslations(){return this.translations}async changeTheme(){"light"===this.theme?this.theme="dark":this.theme="light"}static _getSentenceContainerOfWord(e){return e.parentElement.parentElement.parentElement}toggleFullscreen(){let e;if(this.fullscreen){let t=this.el.ownerDocument;t.exitFullscreen?e=t.exitFullscreen():t.mozCancelFullScreen?e=t.mozCancelFullScreen():t.webkitExitFullscreen?e=t.webkitExitFullscreen():t.msExitFullscreen&&(e=t.msExitFullscreen()),e.then((()=>{this.fullscreen=!1,this.el.shadowRoot.getElementById("read-along-container").classList.remove("read-along-container--fullscreen")}))}else{let t=this.el.shadowRoot.getElementById("read-along-container");t.requestFullscreen?e=t.requestFullscreen():t.mozRequestFullScreen?e=t.mozRequestFullScreen():t.webkitRequestFullscreen?e=t.webkitRequestFullscreen():t.msRequestFullscreen&&(e=t.msRequestFullscreen()),e.then((()=>{this.fullscreen=!0,this.el.shadowRoot.getElementById("read-along-container").classList.add("read-along-container--fullscreen")}))}}hideGuideAndScroll(){let e=this.el.shadowRoot.querySelector(".reading"),t=new IntersectionObserver((r=>{let[n]=r;n.isIntersecting&&(setTimeout((()=>{this.showGuide=!1,this.autoScroll=!0}),100),t.unobserve(e))}));t.observe(e),this.scrollTo(e)}inParagraphContentOverflow(e){let t=yd._getSentenceContainerOfWord(e).getBoundingClientRect(),r=e.getBoundingClientRect(),n=r.rightt.right,i=new IntersectionObserver((t=>{let[r]=t;r.isIntersecting&&(setTimeout((()=>{this.showGuide=!1,this.autoScroll=!0}),100),i.unobserve(e))}));return i.observe(e),n||o}inPageContentOverflow(e){let t=this.el.shadowRoot.querySelector("#"+this.current_page).getBoundingClientRect(),r=e.getBoundingClientRect(),n=r.top+r.height>t.top+t.height,o=r.top{let[r]=t;r.isIntersecting&&(setTimeout((()=>{this.showGuide=!1,this.autoScroll=!0}),100),o=n=!1,i.unobserve(e))}));return i.observe(e),o||n}inPage(e){let t=yd._getSentenceContainerOfWord(e).getBoundingClientRect(),r=e.getBoundingClientRect(),n=r.top+r.height>t.top+t.height,o=r.top+r.height<0,i=new IntersectionObserver((t=>{let[r]=t;r.isIntersecting&&(setTimeout((()=>{this.showGuide=!1,this.autoScroll=!0}),100),i.unobserve(e))}));return i.observe(e),o||n}scrollToPage(e){let t=this.el.shadowRoot.querySelector(".pages__container"),r=this.el.shadowRoot.querySelector("#"+e);t.scrollBy({top:null!=this.pageScrolling.match("vertical")?r.offsetTop-t.scrollTop:0,left:null!=this.pageScrolling.match("vertical")?0:r.offsetLeft-t.scrollLeft,behavior:this.scrollBehaviour}),r.scrollTo(0,0)}scrollByHeight(e){let t=yd._getSentenceContainerOfWord(e),r=e.parentElement.getBoundingClientRect(),n=new IntersectionObserver((o=>{let[i]=o;i.isIntersecting?n.unobserve(e):t.scrollTo({top:t.getBoundingClientRect().height-r.height,left:0,behavior:this.scrollBehaviour})}),{root:t,threshold:[0,.25,.5,.75,1]});n.observe(e)}scrollByWidth(e){let t=yd._getSentenceContainerOfWord(e),r=e.getBoundingClientRect();t.scrollTo({left:r.left-10,top:0,behavior:this.scrollBehaviour})}scrollTo(e){e.scrollIntoView({behavior:this.scrollBehaviour})}disconnectedCallback(){this.stop()}componentDidUpdate(){this.svgOverlay&&this.changeFill()}async componentWillLoad(){window.matchMedia&&(window.matchMedia("prefers-color-scheme: dark").matches?this.theme="dark":this.theme="light");const e=(()=>{const e=window.localStorage.getItem(cd);if(e&&e.length){const t=JSON.parse(e);if(t.version&&t.version===dd)return t}return null})();null!==e&&e.version===dd&&(this.language=e.language,this.scrollBehaviour=e.scrollBehaviour,this.autoPauseAtEndOfPage=e.autoPauseAtEndOfPage,this.theme=e.theme||this.theme),this.language.length<3&&(null!=this.language.match("fr")?this.language="fra":null!==this.language.match("es")?this.language="spa":this.language="eng"),"smooth"!==this.scrollBehaviour&&"auto"!==this.scrollBehaviour&&(console.error("Invalid scroll-behaviour value, using default (smooth)"),this.scrollBehaviour="smooth"),(isNaN(this.playbackRateRange)||this.playbackRateRange<0||this.playbackRateRange>99)&&(console.error("Invalid playback-rate-range value, using default (15)."),this.playbackRateRange=15);const t=this.el.querySelector("read-along > text");if(t)this.parsed_text=fd(t),this.meta=pd(this.el);else{const e=await async function(e){let t=await fetch(e);if(!t.ok)return console.error(`fetch(${e}) failed with status ${t.status}`),{pages:null,meta:null};let r=await t.text(),n=(new DOMParser).parseFromString(r,"text/xml");return{pages:fd(n),meta:pd(n)}}(this.href);this.parsed_text=e.pages,this.meta=e.meta}if(null===this.parsed_text)this.parsed_text=[],this.assetsStatus.RAS=3;else if(0===this.parsed_text.length)this.assetsStatus.RAS=2;else{this.images={},this.translations={};for(const[e,t]of this.parsed_text.entries()){if("img"in t){var r=this.urlTransform(t.img);if(this.images[e]=this.urlTransform(t.img),/^(https?:[/]|assets)[/]\b/.test(r)){await bd(r)||(this.images[e]=null)}}else this.images[e]=null;if("paragraphs"in t){try{const e=t.paragraphs,r=e[e.length-1].querySelectorAll("s:not(.translation), s:not(.sentence__translation)"),n=r[r.length-1].querySelector("w:last-of-type");this.endOfPageTags[n.id]=[parseFloat(n.getAttribute("time")),1e3*parseFloat(n.getAttribute("dur"))],this.finalTaggedWord=n.id}catch(e){}let e=null;t.paragraphs.map((e=>e.querySelectorAll("s"))).forEach((t=>{t.length&&t.forEach((t=>{if(t.id&&vd(t))e=`${t.id}`;else if(/translation/.test(t.className)){const r={};if(t.hasAttribute("sentence-id")){r[t.getAttribute("sentence-id")]=t.textContent,this.translations=Object.assign(Object.assign({},this.translations),r)}else null!=e&&(r[e]=t.textContent,e=null,this.translations=Object.assign(Object.assign({},this.translations),r))}}))}))}}if(this.meta["annotations-ids"]){const e=",",t=this.meta["annotations-labels-"+this.language]?this.meta["annotations-labels-"+this.language]:this.meta["annotations-labels"],r=t?t.split(e):[];this.meta["annotations-ids"].split(e).forEach(((e,t)=>{var n;this.annotations.push({isVisible:!1,name:null!==(n=r[t].trim())&&void 0!==n?n:e.trim(),id:e.trim()})}))}this.assetsStatus.RAS=1}this.hasLoaded+=1}componentDidLoad(){const e="https://unpkg.com/@bcgov/bc-sans@1.0.1/css/BCSans.css",t="https://fonts.googleapis.com/css?family=Material+Icons|Material+Icons+Outlined&display=swap";let r=document.querySelector(`link[href="${t}"]`),n=document.querySelector(`link[href="${e}"]`);r||(r=document.createElement("link"),r.setAttribute("rel","stylesheet"),r.setAttribute("href",t),document.head.appendChild(r)),n||(n=document.createElement("link"),n.setAttribute("rel","stylesheet"),n.setAttribute("href",e),document.head.appendChild(n)),this.processed_alignment=function(e){let t={};for(const r of e)for(const e of r.paragraphs)for(const r of Array.from(e.querySelectorAll("w[time][dur]"))){const e=r.getAttribute("time"),n=r.getAttribute("dur");null!==e&&null!==n&&(t[r.getAttribute("id")]=[Math.round(1e3*parseFloat(e)),Math.round(1e3*parseFloat(n))])}return t}(this.parsed_text),this.alignment_failed=0==Object.keys(this.processed_alignment).length,this.audio_howl=new c.Howl({src:[this.audio],preload:!1}),this.audio_howl.once("load",(()=>{this.attachScrollingLogicToAudio()})),this.audio_howl.once("loaderror",(()=>{this.hasLoaded+=1,this.assetsStatus.AUDIO=3})),this.audio_howl.load()}attachScrollingLogicToAudio(){this.processed_alignment.all=[0,1e3*this.audio_howl.duration()],this.duration=this.audio_howl.duration(),this.audio_howl_sprites=this.buildSprite(this.audio,this.processed_alignment),this.audio_howl_sprites._reading$.pipe(ld.distinctUntilChanged()).subscribe((e=>{if(this.reading$.next(e),""==e)return;this.playing&&this.autoPauseAtEndOfPage&&e in this.endOfPageTags&&this.finalTaggedWord!==e&&(this.autoPauseTimer&&window.clearTimeout(this.autoPauseTimer),this.autoPauseTimer=window.setTimeout((()=>{this.pause()}),this.endOfPageTags[e][1]-25));let t=this.tagToQuery(e);if(void 0===t)return;let r=this.el.shadowRoot.querySelector(t);this.el.shadowRoot.querySelectorAll(".reading").forEach((e=>e.classList.remove("reading"))),r.classList.add("reading");let n=yd._getSentenceContainerOfWord(r).parentElement.id;n!==this.current_page&&(void 0===this.current_page||this.isScrolling||this.scrollToPage(n),this.current_page=n);const o=Math.ceil(this.el.shadowRoot.querySelector(".pages__container").getBoundingClientRect().left)+1,i=Math.ceil(this.el.shadowRoot.querySelector("#"+this.current_page).getBoundingClientRect().left);(r.getBoundingClientRect().left<0||i!==o)&&(this.isScrolling||this.scrollToPage(n)),this.inPageContentOverflow(r)&&this.autoScroll&&(r.scrollIntoView({block:"start",inline:"nearest"}),this.isScrolling||this.scrollByHeight(r)),this.inParagraphContentOverflow(r)&&this.autoScroll&&(r.scrollIntoView(!1),this.isScrolling||this.scrollByWidth(r))})),this.hasLoaded+=1,this.assetsStatus.AUDIO=1}componentDidRender(){if(!this.displayTranslation&&this.parsed_text&&this.parsed_text.length>0&&(this.toggleTextTranslation(),this.displayTranslation=!0),this.latestTranslation){this.el.shadowRoot.querySelector(this.latestTranslation).focus(),this.latestTranslation=""}}isReadyToPlay(){return!(this.hasLoaded<2)&&(void 0!==this.audio_howl_sprites&&void 0!==this.audio_howl_sprites.sound)}getRawI18nString(e){return this.i18nStrings[this.language]&&this.i18nStrings[this.language][e]?this.i18nStrings[this.language][e]:this.i18nStrings.eng[e]?this.i18nStrings.eng[e]:e}getI18nString(e,t={}){let r=this.getRawI18nString(e);for(const[e,n]of Object.entries(t))r=r.replace("<"+e+">",n);return r}addLine(e){this.hasTextTranslations||(this.hasTextTranslations=!0);let t={};t[e.id]="",this.translations=Object.assign(Object.assign({},this.translations),t),this.latestTranslation="#"+e.id+"translation"}removeLine(e){delete this.translations[e.id],this.translations=Object.assign({},this.translations)}updateTranslation(e,t){this.translations[e]=t}handleImageFile(e,t){if(!e.type.toLowerCase().startsWith("image/"))return this.invalidImages[t]={fileName:e.name,pageIndex:t},void(this.invalidImages=Object.assign({},this.invalidImages));t in this.invalidImages&&(delete this.invalidImages[t],this.invalidImages=Object.assign({},this.invalidImages)),this.images[t]=URL.createObjectURL(e),this.images=Object.assign({},this.images)}deleteImage(e){this.images[e].startsWith("blob:")&&URL.revokeObjectURL(this.images[e]),delete this.images[e],this.images=Object.assign({},this.images)}render(){return(0,n.h)("div",{key:"8c63d054695256c3489c803003cb06cda0b6d7ed",id:"read-along-container",class:"read-along-container"},(0,n.h)("div",{key:"83580fee729e55d9f5c7fbd39706b242af6d7500",id:"title__slot__container"},(0,n.h)("h1",{key:"322c03a5eaf8867ebea290820c335541774692b6",class:"slot__header"},(0,n.h)("slot",{key:"c76583f47e8295363ffc855256f799a6df4f2cf5",name:"read-along-header"})),(0,n.h)("h3",{key:"56586588dfd20e200b6e1be55d6f84a28fc10c2f",class:"slot__subheader"},(0,n.h)("slot",{key:"fb6b1d6f6e9aa591ffd0605bce4af64e304c465d",name:"read-along-subheader"}))),Object.entries(this.assetsStatus).map((([e,t])=>{if(2===t){let t=this.getPathFromAssetType(e);return(0,n.h)("error-message",{msg:this.getI18nString("parse-error",{FILETYPE:e,FILENAME:t}),data_cy:e+"-error"})}if(3===t){let t=this.getPathFromAssetType(e);return(0,n.h)("error-message",{msg:this.getI18nString("loading-error",{FILETYPE:e,FILENAME:t}),data_cy:e+"-error"})}})),this.alignment_failed&&1===this.assetsStatus.RAS&&(0,n.h)("error-message",{key:"3c1f6b5c94638c3ba7364c5b5f67594e393fb786",msg:this.getI18nString("alignment-error"),data_cy:"alignment-error"}),1===this.assetsStatus.RAS&&Object.values(this.invalidImages).map((e=>(0,n.h)("error-message",{msg:this.getI18nString("image-error",{FILENAME:e.fileName,PAGENUMBER:(e.pageIndex+1).toString()}),timeout:5e4,data_cy:"invalid-image-file",onExpired:()=>{delete this.invalidImages[e.pageIndex]}}))),(0,n.h)("div",{key:"36f08793d7645f0fefffff73a0aa2552e83d5c99",onScroll:()=>{this.handleScrollEvent()},"data-test-id":"text-container",class:"pages__container theme--"+this.theme+" "+this.pageScrolling},this.showGuide?(0,n.h)(this.Guide,null):null,1==this.assetsStatus.RAS&&this.parsed_text.map((e=>(0,n.h)(this.Page,{pageData:e}))),this.hasLoaded<2&&(0,n.h)("div",{key:"66d6b29140c3b8c390208c341cdfa12450268dd9",class:"loader"})),this.settingsVisible&&(0,n.h)("div",{key:"21f2f8d745a5d299b241131594940450985ed6a5",class:"settings-background",onClick:()=>this.settingsVisible=!1}),this.settingsVisible&&(0,n.h)(this.Settings,{key:"9794fec289aae03a6301a23fcef04e431e0afe43"}),this.alignment_failed||(0,n.h)("div",{key:"634bc89e61cee99a9b1c1e7d28a0457c160745f0",onClick:e=>this.goToSeekFromProgress(e),id:"all","data-test-id":"progress-bar",class:"overlay__container theme--"+this.theme+" background--"+this.theme},this.svgOverlay?(0,n.h)(this.Overlay,null):null),this.annotationsMenuVisible&&(0,n.h)(this.AnnotationsMenu,{key:"98b525d3cae89414cfd58294f41d5764851d173f"}),1==this.assetsStatus.AUDIO&&(0,n.h)(this.ControlPanel,{key:"705bbda8e668ace28762bcb0669e28fa35bbd99e"}),this.cssUrl&&null!=this.cssUrl.match(".css")&&(0,n.h)("link",{key:"56a7afcb7f8c84646ea6a4e555fdfb48c8d62027",href:this.cssUrl,rel:"stylesheet"}))}static get assetsDirs(){return["assets"]}get el(){return(0,n.g)(this)}static get watchers(){return{audio_howl_sprites:["wheelHandler"]}}};yd.style='.font-weight--100{font-weight:100}.font-weight--200{font-weight:200}.font-weight--300{font-weight:300}.font-weight--400{font-weight:400}.font-weight--500{font-weight:500}.font-weight--600{font-weight:600}.font-weight--700{font-weight:700}.font-weight--800{font-weight:800}.font-weight--900{font-weight:900}.shadowed{text-shadow:0.3px 0.2px black}.theme--light.settings,.theme--light.page__container,.theme--light.page__col__image,.theme--light.sentence,.theme--light.scroll-guide__container{background-color:#fff}.theme--dark.settings,.theme--dark.page__container,.theme--dark.page__col__image,.theme--dark.sentence,.theme--dark.scroll-guide__container{background-color:rgb(59.9272727273, 67.4181818182, 104.8727272727)}.sentence__text,.sentence__word,.scroll-guide__text{line-height:1.5;border-radius:0.3125em;position:relative;padding:0.0625em;font-size:1em}.theme--light.ripple,.theme--light.reading,.theme--light.sentence__text,.theme--light.sentence__word,.theme--light.scroll-guide__text{color:rgb(4.2909090909, 4.8272727273, 7.5090909091)}.theme--dark.ripple,.theme--dark.reading,.theme--dark.sentence__text,.theme--dark.sentence__word,.theme--dark.scroll-guide__text{color:#fff}.theme--light.ripple:active,.theme--light.reading:active,.theme--light.sentence__word:hover{color:#fff;background:rgb(127.5, 127.5, 127.5) radial-gradient(circle, transparent 1%, rgb(127.5, 127.5, 127.5) 1%) center/15000%}.theme--dark.ripple:active,.theme--dark.reading:active,.theme--dark.sentence__word:hover{color:#fff;background:rgb(165.75, 165.75, 165.75) radial-gradient(circle, transparent 1%, rgb(165.75, 165.75, 165.75) 1%) center/15000%}.theme--light.sentence__word.reading{color:#fff;background:#666666 radial-gradient(circle, transparent 1%, #666666 1%) center/15000%}.theme--dark.sentence__word.reading{color:rgb(4.2909090909, 4.8272727273, 7.5090909091);background:#fff radial-gradient(circle, transparent 1%, #fff 1%) center/15000%}.theme--light.page__col__img-placeholder{border:0.046875em dotted rgb(127.5, 127.5, 127.5)}.theme--dark.page__col__img-placeholder{border:0.046875em dotted rgb(165.75, 165.75, 165.75)}.theme--light.overlay__container,.theme--light.scroll-guide__container{border:0.046875em solid rgb(127.5, 127.5, 127.5)}.theme--dark.overlay__container,.theme--dark.scroll-guide__container{border:0.046875em solid rgb(165.75, 165.75, 165.75)}.theme--light#annotationsMenu,.theme--light.settings,.theme--light.pages__container,.theme--light.page--multi,.theme--light.control-panel{border-left:0.046875em solid rgb(127.5, 127.5, 127.5)}.theme--dark#annotationsMenu,.theme--dark.settings,.theme--dark.pages__container,.theme--dark.page--multi,.theme--dark.control-panel{border-left:0.046875em solid rgb(165.75, 165.75, 165.75)}.theme--light#annotationsMenu,.theme--light.settings,.theme--light.pages__container,.theme--light.page--multi,.theme--light.control-panel{border-right:0.046875em solid rgb(127.5, 127.5, 127.5)}.theme--dark#annotationsMenu,.theme--dark.settings,.theme--dark.pages__container,.theme--dark.page--multi,.theme--dark.control-panel{border-right:0.046875em solid rgb(165.75, 165.75, 165.75)}.theme--light#annotationsMenu,#annotationsMenu button.theme--light,.theme--light.settings,.settings>.theme--light.footer,.theme--light.pages__container{border-top:0.046875em solid rgb(127.5, 127.5, 127.5)}.theme--dark#annotationsMenu,#annotationsMenu button.theme--dark,.theme--dark.settings,.settings>.theme--dark.footer,.theme--dark.pages__container{border-top:0.046875em solid rgb(165.75, 165.75, 165.75)}.theme--light#annotationsMenu,#annotationsMenu h3.theme--light,#annotationsMenu button.theme--light,.theme--light.settings,.theme--light.control-panel{border-bottom:0.046875em solid rgb(127.5, 127.5, 127.5)}.theme--dark#annotationsMenu,#annotationsMenu h3.theme--dark,#annotationsMenu button.theme--dark,.theme--dark.settings,.theme--dark.control-panel{border-bottom:0.046875em solid rgb(165.75, 165.75, 165.75)}.ripple:hover,.reading:hover,.sentence__word:hover{cursor:pointer}@viewport{width:device-width}button{border:0;cursor:pointer}html{background-color:#fff;box-sizing:border-box;height:100%}*:before,*:after{box-sizing:inherit}body{-webkit-font-smoothing:antialiased;color:rgb(4.2909090909, 4.8272727273, 7.5090909091);font-family:"BCSans", "Noto Sans", Verdana, Arial, sans-serif;min-height:100%;overflow-x:hidden;overflow-y:hidden;text-rendering:optimizeLegibility}a{background:transparent;color:#c69;text-decoration:none;transition:color 0.2s;outline:none}a:active,a:focus{outline:none}img{height:90%;max-width:90%;object-fit:cover}h1,h2,h3,h4,h5,h6{font-family:"BCSans", "Noto Sans", Verdana, Arial, sans-serif;font-weight:normal}p,mat-chip,mat-tab-label,span,button,div,a{font-family:"BCSans", "Noto Sans", Verdana, Arial, sans-serif}.theme--light::-webkit-scrollbar{width:0.5em;height:0.5em}.theme--light::-webkit-scrollbar-track{background:#fff}.theme--light::-webkit-scrollbar-thumb{background:rgb(4.2909090909, 4.8272727273, 7.5090909091);border-radius:0.3125em;height:0.625em;width:0.625em}.theme--dark::-webkit-scrollbar{width:0.5em;height:0.5em}.theme--dark::-webkit-scrollbar-track{background:rgb(59.9272727273, 67.4181818182, 104.8727272727)}.theme--dark::-webkit-scrollbar-thumb{background:#fff;border-radius:0.3125em;height:0.625em;width:0.625em}.bg-img{background-image:url("../assets/img/bg.jpg");height:100vh;overflow:overlay;overflow-x:hidden;background-position:center;background-repeat:no-repeat;background-size:cover;min-height:100%}.shadow-box{box-shadow:0 0.3125rem 1rem 0 rgba(0, 0, 0, 0.24);padding:25px;background:rgba(255, 255, 255, 0.94);border-radius:5px}.font-xs{font-size:0.5em}.font-sm{font-size:0.75em}.font-md{font-size:1em}.font-lg{font-size:1.25em}.font-xl{font-size:1.5em}.font-xxl{font-size:2em}.faded{opacity:0.2;color:black}table{table-layout:fixed}.center{margin-left:auto;margin-right:auto;text-align:center}.container{max-width:80em}.background--light{background:#fff}.stop-color--light{fill:#fff}.color--light{color:rgb(4.2909090909, 4.8272727273, 7.5090909091)}.background--dark{background:rgb(59.9272727273, 67.4181818182, 104.8727272727)}.stop-color--dark{fill:rgb(59.9272727273, 67.4181818182, 104.8727272727)}.color--dark{color:#fff}.abs{position:absolute}.top-0{top:0}.left-0{left:0}.right-0{right:0}.top-5{top:0.3125em}.left-5{left:0.3125em}.right-5{right:0.3125em}.top-10{top:0.625em}.left-10{left:0.625em}.right-10{right:0.625em}.top-15{top:0.9375em}.left-15{left:0.9375em}.right-15{right:0.9375em}.top-20{top:1.25em}.left-20{left:1.25em}.right-20{right:1.25em}.top-25{top:1.5625em}.left-25{left:1.5625em}.right-25{right:1.5625em}.top-30{top:1.875em}.left-30{left:1.875em}.right-30{right:1.875em}.top-35{top:2.1875em}.left-35{left:2.1875em}.right-35{right:2.1875em}.top-40{top:2.5em}.left-40{left:2.5em}.right-40{right:2.5em}.top-45{top:2.8125em}.left-45{left:2.8125em}.right-45{right:2.8125em}.top-50{top:3.125em}.left-50{left:3.125em}.right-50{right:3.125em}.invisible{visibility:hidden !important}.control-panel{border-radius:0 0 0.3125em 0.3125em;position:relative;min-width:100%;display:inline-flex}.control-panel__buttons--left{width:25%;float:left;margin-top:0.3125em;padding:0.3125em}.control-panel__buttons--center{width:25%;text-align:center;margin:0 auto}.control-panel__buttons--right{width:25%;text-align:right;float:right;margin-top:0.3125em;margin-right:0.3125em}.control-panel__buttons__header{margin:0.3125em}.control-panel__control{border-radius:0.3125em;margin:0.5em auto}.control-panel__control:focus{outline:none}.settings{margin-left:0;margin-right:0;text-align:center}.settings__option__header{margin-bottom:0.5em}#waveform{background-size:contain;background-repeat:no-repeat;background-position:center center;width:100%;height:100%;position:absolute;top:0;left:0}.low{z-index:700}.overlay__container{width:100%;max-width:100%;height:3.125em;position:relative;z-index:800}#overlay__object{z-index:700;max-height:100%;min-width:100%;fill:"transparent"}#overlay__object.theme--light{stroke:rgb(127.5, 127.5, 127.5)}#overlay__object.theme--dark{stroke:rgb(165.75, 165.75, 165.75)}.scroll-guide__container{text-align:center;z-index:700;width:20%;position:fixed;left:50%;transform:translate(-50%, 0)}.scroll-guide__text{font-size:1.25em}.pages__container{overflow:auto;max-height:55vh;height:100%;max-width:100%;width:100%;position:relative;display:-webkit-inline-flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between;border-radius:0.3125em 0.3125em 0 0;transition:margin-right 0.5s}.page{overflow-y:hidden;overflow-x:auto;flex-grow:1;min-width:99.6%;width:100%;max-width:55em}.page__container{display:grid;grid-template-columns:[col-start] [col-end];grid-template-rows:[row-start] 5% [row-end] 95%;grid-template-areas:"image page-no" "image text";justify-items:stretch}.page__counter{grid-area:page-no;margin:0.625em 0 0 0.9375em;text-align:right;padding-right:0.9375em;max-height:5rem}.page__col__image{grid-area:image;max-height:100%;text-align:center;margin:5%;padding:0;border-radius:0 0 0 0;position:relative}.page__col__image img{max-height:55vh;max-width:95%;object-fit:contain}.page__col__img-placeholder{cursor:pointer}.page__col__text{grid-area:text}.page.two-column-layout-page{grid-template-columns:40% auto}.page.one-column-layout-page{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:center;overflow-y:auto}.page.one-column-layout-page .page__col__image img{max-height:33vh !important}.page.one-column-layout-page .page__counter{width:100%;display:block;text-align:center}.hide-page-counter .page__counter{display:none}.pages__container.vertical{flex-direction:column !important}.pages__container.vertical>.page{min-height:100%}.paragraph__container{overflow-y:auto;min-width:40%;padding-bottom:0.75em}.sentence{margin:0 1.5em;text-align:left;max-width:90%}.sentence__container{margin:3.75em 0.625em 3.75em 0.625em;scroll-behavior:smooth;max-width:100%;position:relative;overflow-y:auto;overflow-x:hidden}.sentence__container__buttons{position:absolute;top:0;right:0}.sentence__text{font-size:1.5em;padding:0}.sentence__word{font-size:1.5em}.sentence__translation .sentence__text,.sentence[annotation-id] .sentence__text,.sentence__translation .sentence__word{color:#777;font-style:italic;font-size:95%}.sentence__translation__button{margin-left:10px}.sentence__translation__button i{font-size:medium}.paragraph.visually_aligned .sentence .sentence__text,.paragraph.visually_aligned .sentence .sentence__word{display:table-cell}.paragraph.visually_aligned .sentence .sentence__text:empty{display:none}.paragraph.visually_aligned{display:table}.paragraph.visually_aligned .sentence{display:table-row}.read-along-container{max-width:75em;margin:0 auto;overflow-y:hidden;overflow-x:hidden;padding:0.3125em;position:relative}.read-along-container--fullscreen{max-width:80%;min-width:80%}.slot__header{margin-bottom:0.3125em}.slot__subheader{margin-top:0;margin-left:1em}.settings-background{position:fixed;top:0;left:0;height:100vh;width:100vw;background-color:rgba(0, 0, 0, 0.075);z-index:900;-webkit-backdrop-filter:blur(5px) !important;backdrop-filter:blur(5px) !important}.settings{height:55vh;max-height:55vh;width:375px;max-width:375px;position:fixed;z-index:1000;top:15vh;left:calc((100% - 375px) / 2);overflow-x:hidden;transition:0.5s}.settings h3{border-bottom:1px solid #ccc;padding:10px;margin:0}.settings h3 button{float:inline-start;margin-top:0;margin-bottom:0}.settings>.close{position:relative;float:inline-end;background-color:inherit;color:inherit;font-size:18px;display:inline-block;padding:0.275rem 0.75rem;font-weight:400;line-height:1.5;text-align:center;text-decoration:none;vertical-align:middle;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;border:0;transition:color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out}.settings>.close:hover{color:#fff;background-color:#bb2d3b;border-color:#bb2d3b;box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075)}.settings p{cursor:pointer;text-align:left;color:inherit;margin:0.5em 1em}.settings p select,.settings p button{margin-right:1em;width:80px;text-align:justify}.settings p button{margin:0 1em 0 0;padding:0 0.0625em}.settings>.footer{position:absolute;bottom:0;right:0;left:0;padding:0.01em 1em;height:3em;display:flex;flex-grow:0;flex-shrink:0;flex-direction:row;align-content:space-between;justify-content:space-between}.settings>.footer>div{flex-grow:8}.settings>.footer>button{border:1px solid #ccc;padding:0.25em 0.5em !important}.settings>.footer>button:hover{background-color:rgba(0, 0, 0, 0.15);box-shadow:1px 1px 1px rgba(0, 0, 0, 0.15)}.settings button:disabled{background-color:rgba(200, 200, 200, 0.15);color:#ccc}.settings p.version{padding:1em;font-size:0.7em;font-weight:100;color:#ccc}.settings.theme--dark{color:#fff}@media screen and (max-width: 385px){.settings{width:95vw;max-width:95vw;left:2.5vw;overflow:auto}.settings p{margin-bottom:1em;border-bottom:1px solid #ccc}.settings p select,.settings p button{display:block;width:80%}}button:focus,input:focus{box-shadow:0 1px 1px rgba(0, 0, 0, 0.15)}#annotationsMenu{position:absolute;bottom:4em;right:0.3125em;z-index:1000;width:fit-content;width:-moz-fit-content;display:flex;flex-direction:column;border-radius:0.3125em}#annotationsMenu h3{margin:0.3125em 0;padding:0.3125em 0.5em}#annotationsMenu button{display:flex;justify-content:flex-start;align-content:baseline;font-size:medium;padding:0.5em}#annotationsMenu button .material-icons-outlined{font-size:inherit;border-radius:0;margin-right:0.3125em}.sentence.invisible[annotation-id]{display:none}.loader{border:16px solid #eee;border-radius:50%;border-right-color:#aa0;border-bottom-color:#a33;border-left-color:#111;width:10rem;height:10rem;-webkit-animation:spin 3s linear infinite;animation:spin 3s linear infinite;position:fixed;top:calc(50vh - 10rem);left:calc(50vw - 10rem);z-index:1000;box-shadow:0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19)}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.alert{display:flex;padding:1rem 1rem;margin-bottom:1rem;border:1px solid transparent;border-radius:0.25rem;transition-delay:2s;transition:visibility 5s, height 5s}.alert.status-success{color:#0f5132;background-color:#d1e7dd;border-color:#badbcc}.alert.status-error{color:#842029;background-color:#f8d7da;border-color:#f5c2c7}.alert.fade{visibility:collapse;height:0 !important;overflow:hidden !important;line-height:0 !important;padding:0 !important;margin:0 !important;border:0 !important}.alert>span.material-icons{padding-inline-end:0.3em}.animate-transition,.ripple,.reading{transition:background 0.4s}.animate-transition:active,.ripple:active,.reading:active{transition:background 0s}.ripple,.reading{background-position:center;padding:0.0625em}.ripple:active,.reading:active{background-size:100%}.progress{position:absolute;top:0;left:0;height:100%;width:0}.progress.theme--light{background-color:rgba(127.5, 127.5, 127.5, 0.2)}.progress.theme--dark{background-color:rgba(165.75, 165.75, 165.75, 0.2)}.material-icons{font-family:"Material Icons";font-weight:normal;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-feature-settings:"liga";-webkit-font-smoothing:antialiased}.material-icons-outlined{font-family:"Material Icons Outlined";font-weight:normal;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-feature-settings:"liga";-webkit-font-smoothing:antialiased}[contenteditable][data-placeholder]:empty:before{content:attr(data-placeholder);position:absolute;color:gray;cursor:text;background-color:transparent}.drop-area{border:2px dashed #ccc;border-radius:20px;width:50%;font-family:sans-serif;margin:50px auto;padding:20px}.drop-area.highlight{border-color:purple}p{margin-top:0}.my-form{margin-bottom:10px}#gallery{margin-top:10px}#gallery img{width:150px;margin-bottom:10px;margin-right:10px;vertical-align:middle}.button{display:inline-block;padding:10px;background:#ccc;cursor:pointer;border-radius:5px;border:1px solid #ccc}.button:hover{background:#ddd}.fileElem{display:none}#img-remover{margin:60px;position:absolute;z-index:700;border-radius:50px;color:red}#image-container{display:contents}'},923:(e,t,r)=>{var n={"./error-message_2.entry.js":[568,792]};function o(e){if(!r.o(n,e))return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=n[e],o=t[0];return r.e(t[1]).then((()=>r(o)))}o.keys=()=>Object.keys(n),o.id=923,e.exports=o}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.e=()=>Promise.resolve(),r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";var e=r(474);(()=>{const t="file:///C:/Users/joanise/sandboxes/Studio-Web/dist/packages/web-component/dist/esm/web-component.js",r={};return r.resourcesUrl=new URL(".",t).href,(0,e.p)(r)})().then((async t=>(await void 0,(0,e.b)([["error-message_2",[[1,"read-along",{href:[1],audio:[1],svgOverlay:[1,"svg-overlay"],theme:[1537],language:[1537],cssUrl:[1,"css-url"],useAssetsFolder:[4,"use-assets-folder"],imageAssetsFolder:[1,"image-assets-folder"],pageScrolling:[1,"page-scrolling"],mode:[1],scrollBehaviour:[1537,"scroll-behaviour"],displayTranslation:[4,"display-translation"],playbackRateRange:[2,"playback-rate-range"],autoPauseAtEndOfPage:[1540,"auto-pause-at-end-of-page"],playing:[32],fullscreen:[32],autoScroll:[32],hasLoaded:[32],images:[32],invalidImages:[32],translations:[32],settingsVisible:[32],userPreferencesDirty:[32],annotations:[32],annotationsMenuVisible:[32],getCurrentWord:[64],getImages:[64],updateSpriteAlignments:[64],getReadAlongElement:[64],getAlignments:[64],getTranslations:[64],changeTheme:[64]},[[9,"wheel","wheelHandler"],[0,"fullscreenchange","fullScreenHandler"],[0,"keydown","handleKeyDown"]],{audio_howl_sprites:["wheelHandler"]}],[0,"error-message",{msg:[1],data_cy:[1],timeout:[2],open:[32]}]]]],t))))})()})(); \ No newline at end of file diff --git a/packages/web-component/package.json b/packages/web-component/package.json index 4ed44cd9..672ce257 100644 --- a/packages/web-component/package.json +++ b/packages/web-component/package.json @@ -1,6 +1,6 @@ { "name": "@readalongs/web-component", - "version": "1.5.2", + "version": "1.5.3", "description": "ReadAlong Web Component", "main": "dist/index.cjs.js", "module": "dist/index.js",