New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@speechly/browser-ui

Package Overview
Dependencies
Maintainers
6
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@speechly/browser-ui - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1

2

big-transcript.js

@@ -1,2 +0,2 @@

!function(){"use strict";function t(){}const e=t=>t;function n(t){return t()}function o(){return Object.create(null)}function i(t){t.forEach(n)}function r(t){return"function"==typeof t}function s(t,e){return t!=t?e==e:t!==e}const l="undefined"!=typeof window;let c=l?()=>window.performance.now():()=>Date.now(),a=l?t=>requestAnimationFrame(t):t;const d=new Set;function u(t){d.forEach((e=>{e.c(t)||(d.delete(e),e.f())})),0!==d.size&&a(u)}function f(t){let e;return 0===d.size&&a(u),{promise:new Promise((n=>{d.add(e={c:t,f:n})})),abort(){d.delete(e)}}}let h=!1;const g=new Set;function p(t,e){h&&g.delete(e),e.parentNode!==t&&t.appendChild(e)}function m(t,e,n){h&&g.delete(e),(e.parentNode!==t||n&&e.nextSibling!==n)&&t.insertBefore(e,n||null)}function v(t){h?g.add(t):t.parentNode&&t.parentNode.removeChild(t)}function w(t){return document.createElement(t)}function $(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function y(t){return document.createTextNode(t)}function b(){return y(" ")}function x(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function C(t,e,n){e in t?t[e]="boolean"==typeof t[e]&&""===n||n:x(t,e,n)}function k(t,e,n,o){t.style.setProperty(e,n,o?"important":"")}function _(t,e,n){t.classList[n?"add":"remove"](e)}function S(t){const e={};for(const n of t)e[n.name]=n.value;return e}const E=new Set;let N,T=0;function P(t,e,n,o,i,r,s,l=0){const c=16.666/o;let a="{\n";for(let t=0;t<=1;t+=c){const o=e+(n-e)*r(t);a+=100*t+`%{${s(o,1-o)}}\n`}const d=a+`100% {${s(n,1-n)}}\n}`,u=`__svelte_${function(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}(d)}_${l}`,f=t.ownerDocument;E.add(f);const h=f.__svelte_stylesheet||(f.__svelte_stylesheet=f.head.appendChild(w("style")).sheet),g=f.__svelte_rules||(f.__svelte_rules={});g[u]||(g[u]=!0,h.insertRule(`@keyframes ${u} ${d}`,h.cssRules.length));const p=t.style.animation||"";return t.style.animation=`${p?`${p}, `:""}${u} ${o}ms linear ${i}ms 1 both`,T+=1,u}function R(t,e){const n=(t.style.animation||"").split(", "),o=n.filter(e?t=>t.indexOf(e)<0:t=>-1===t.indexOf("__svelte")),i=n.length-o.length;i&&(t.style.animation=o.join(", "),T-=i,T||a((()=>{T||(E.forEach((t=>{const e=t.__svelte_stylesheet;let n=e.cssRules.length;for(;n--;)e.deleteRule(n);t.__svelte_rules={}})),E.clear())})))}function M(t){N=t}function z(){if(!N)throw new Error("Function called outside component initialization");return N}function B(t){z().$$.on_mount.push(t)}const D=[],F=[],I=[],L=[],A=Promise.resolve();let H=!1;function O(t){I.push(t)}let j=!1;const V=new Set;function U(){if(!j){j=!0;do{for(let t=0;t<D.length;t+=1){const e=D[t];M(e),q(e.$$)}for(M(null),D.length=0;F.length;)F.pop()();for(let t=0;t<I.length;t+=1){const e=I[t];V.has(e)||(V.add(e),e())}I.length=0}while(D.length);for(;L.length;)L.pop()();H=!1,j=!1,V.clear()}}function q(t){if(null!==t.fragment){t.update(),i(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(O)}}let W;function G(){return W||(W=Promise.resolve(),W.then((()=>{W=null}))),W}function J(t,e,n){t.dispatchEvent(function(t,e){const n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!1,!1,e),n}(`${e?"intro":"outro"}${n}`))}const K=new Set;let Q;function X(t,e){t&&t.i&&(K.delete(t),t.i(e))}function Y(t,e,n,o){if(t&&t.o){if(K.has(t))return;K.add(t),Q.c.push((()=>{K.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}const Z={duration:0};function tt(n,o,i){let s,l,a=o(n,i),d=!1,u=0;function h(){s&&R(n,s)}function g(){const{delay:o=0,duration:i=300,easing:r=e,tick:g=t,css:p}=a||Z;p&&(s=P(n,0,1,i,o,r,p,u++)),g(0,1);const m=c()+o,v=m+i;l&&l.abort(),d=!0,O((()=>J(n,!0,"start"))),l=f((t=>{if(d){if(t>=v)return g(1,0),J(n,!0,"end"),h(),d=!1;if(t>=m){const e=r((t-m)/i);g(e,1-e)}}return d}))}let p=!1;return{start(){p||(R(n),r(a)?(a=a(),G().then(g)):g())},invalidate(){p=!1},end(){d&&(h(),d=!1)}}}const et="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function nt(t,e){-1===t.$$.dirty[0]&&(D.push(t),H||(H=!0,A.then(U)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function ot(e,s,l,c,a,d,u=[-1]){const f=N;M(e);const p=e.$$={fragment:null,ctx:null,props:d,update:t,not_equal:a,bound:o(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(f?f.$$.context:s.context||[]),callbacks:o(),dirty:u,skip_bound:!1};let m=!1;if(p.ctx=l?l(e,s.props||{},((t,n,...o)=>{const i=o.length?o[0]:n;return p.ctx&&a(p.ctx[t],p.ctx[t]=i)&&(!p.skip_bound&&p.bound[t]&&p.bound[t](i),m&&nt(e,t)),n})):[],p.update(),m=!0,i(p.before_update),p.fragment=!!c&&c(p.ctx),s.target){if(s.hydrate){h=!0;const t=function(t){return Array.from(t.childNodes)}(s.target);p.fragment&&p.fragment.l(t),t.forEach(v)}else p.fragment&&p.fragment.c();s.intro&&X(e.$$.fragment),function(t,e,o,s){const{fragment:l,on_mount:c,on_destroy:a,after_update:d}=t.$$;l&&l.m(e,o),s||O((()=>{const e=c.map(n).filter(r);a?a.push(...e):i(e),t.$$.on_mount=[]})),d.forEach(O)}(e,s.target,s.anchor,s.customElement),function(){h=!1;for(const t of g)t.parentNode.removeChild(t);g.clear()}(),U()}M(f)}let it;"function"==typeof HTMLElement&&(it=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(n).filter(r);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){i(this.$$.on_disconnect)}$destroy(){!function(t,e){const n=t.$$;null!==n.fragment&&(i(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});var rt,st,lt,ct,at,dt=(function(t,e){var n;Object.defineProperty(e,"__esModule",{value:!0}),(n=e.ClientState||(e.ClientState={}))[n.Failed=0]="Failed",n[n.NoBrowserSupport=1]="NoBrowserSupport",n[n.NoAudioConsent=2]="NoAudioConsent",n[n.Disconnected=3]="Disconnected",n[n.Disconnecting=4]="Disconnecting",n[n.Connecting=5]="Connecting",n[n.Connected=6]="Connected",n[n.Starting=7]="Starting",n[n.Stopping=8]="Stopping",n[n.Recording=9]="Recording"}(rt={exports:{}},rt.exports),rt.exports);function ut(t){return function(e,n){if(!e.hasOwnProperty("ownerDocument")){Object.defineProperty(e,"ownerDocument",{get:function(){return e.parentElement}});let t=e;for(;t.parentElement;)t=t.parentElement;e.parentElement.head=t}return t(e,n)}}function ft(t){return t<.5?4*t*t*t:.5*Math.pow(2*t-2,3)+1}function ht(t,{delay:e=0,speed:n,duration:o,easing:i=ft}={}){const r=t.getTotalLength();return void 0===o?o=void 0===n?800:r/n:"function"==typeof o&&(o=o(r)),{delay:e,duration:o,easing:i,css:(t,e)=>`stroke-dasharray: ${t*r} ${e*r}`}}!function(t){t.Failed="Failed",t.NoBrowserSupport="NoBrowserSupport",t.NoAudioConsent="NoAudioConsent",t.Idle="Idle",t.Connecting="Connecting",t.Ready="Ready",t.Recording="Recording",t.Loading="Loading"}(st||(st={})),function(t){t.Poweron="poweron",t.Mic="mic",t.Error="error",t.Denied="denied"}(lt||(lt={})),function(t){t.Hold="hold",t.Click="click",t.Noninteractive="noninteractive"}(ct||(ct={})),function(t){t.None="none",t.Connecting="connecting",t.Busy="busy"}(at||(at={})),dt.ClientState.Disconnected,lt.Poweron,ct.Click,at.None,dt.ClientState.Disconnecting,lt.Poweron,ct.Noninteractive,at.Connecting,dt.ClientState.Connecting,lt.Poweron,ct.Noninteractive,at.Connecting,dt.ClientState.Connected,lt.Mic,ct.Hold,at.None,dt.ClientState.Starting,lt.Mic,ct.Hold,at.Connecting,dt.ClientState.Recording,lt.Mic,ct.Hold,at.None,dt.ClientState.Stopping,lt.Mic,ct.Noninteractive,at.Busy,dt.ClientState.Failed,lt.Error,ct.Click,at.None,dt.ClientState.NoBrowserSupport,lt.Error,ct.Click,at.None,dt.ClientState.NoAudioConsent,lt.Denied,ct.Click,at.None,st.Idle,lt.Poweron,ct.Click,at.None,st.Connecting,lt.Poweron,ct.Noninteractive,at.Connecting,st.Ready,lt.Mic,ct.Hold,at.None,st.Recording,lt.Mic,ct.Hold,at.None,st.Loading,lt.Mic,ct.Noninteractive,at.Busy,st.Failed,lt.Error,ct.Click,at.None,st.NoBrowserSupport,lt.Error,ct.Click,at.None,st.NoAudioConsent,lt.Denied,ct.Click,at.None;const gt=[0,1];function pt(t,e,n,o){if(e<n)return t[0];if(e>o)return t[t.length-1];let i=(o-n)/(t.length-1);if(i<=0)return t[0];let r=(e-n)/i,s=Math.floor(r),l=Math.ceil(r),c=r-s;return(1-c)*t[s]+c*t[l]}function mt(e){let n;return{c(){n=w("canvas"),this.c=t,k(n,"color",e[0])},m(t,o){m(t,n,o),e[2](n)},p(t,[e]){1&e&&k(n,"color",t[0])},i:t,o:t,d(t){t&&v(n),e[2](null)}}}function vt(t,e,n){let o,{color:i="#60e0ff"}=e,r=0,s=0,l=[0,0];const c=z(),a=(t,e,n,o,i,r)=>{o<2*r&&(r=o/2),i<2*r&&(r=i/2),t.beginPath(),t.moveTo(e+r,n),t.arcTo(e+o,n,e+o,n+i,r),t.arcTo(e+o,n+i,e,n+i,r),t.arcTo(e,n+i,e,n,r),t.arcTo(e,n,e+o,n,r),t.closePath()};return B((()=>{let t;const e=2*(l.length-1)+1,i=3*e+1*(e-1),d=(t,e)=>{r=Date.now()>s?t:Math.max(r,t),s=Date.now()+e},u=()=>{if(t=requestAnimationFrame(u),!o)return;const e=o.getContext("2d");if(!e)return;let c=(t=>{var e=t.backingStorePixelRatio||t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return(window.devicePixelRatio||1)/e})(e),d=Number.parseInt(getComputedStyle(o).getPropertyValue("width").slice(0,-2)),f=Number.parseInt(getComputedStyle(o).getPropertyValue("height").slice(0,-2));n(1,o.width=d*c,o),n(1,o.height=f*c,o),Date.now()<s?l[0]=.15*r+.85*l[0]:l[0]=.0625+.75*l[0];let h=1;for(;h<l.length;)l[h]=.25*l[h-1]+.5*l[h]+.0625,h++;e.clearRect(0,0,o.width,o.height);const g=3/i*o.width*.5,p=4/i*o.width;for(e.fillStyle=o.style.color||"#000000",h=0;h<l.length;h++){const t=l[h]*o.height;t*o.height>2*g?a(e,.5*o.width-g+h*p,.5*(o.height-t),2*g,t,g):(e.beginPath(),e.arc(.5*o.width+h*p,.5*o.height,t*o.height*.5,0,2*Math.PI)),e.fill(),h>0&&(t*o.height>2*g?a(e,.5*o.width-g-h*p,.5*(o.height-t),2*g,t,g):(e.beginPath(),e.arc(.5*o.width-h*p,.5*o.height,t*o.height*.5,0,2*Math.PI)),e.fill())}};u(),d(1,350);const f=t=>d(.5*Math.random()+.5,75*Math.random()+75);return c.addEventListener("updateVU",f),()=>{cancelAnimationFrame(t),c.removeEventListener("updateVU",f)}})),t.$$set=t=>{"color"in t&&n(0,i=t.color)},[i,o,function(t){F[t?"unshift":"push"]((()=>{o=t,n(1,o)}))}]}customElements.define("vu-meter",class extends it{constructor(t){super(),this.shadowRoot.innerHTML="<style>canvas{display:block;width:1.35rem;height:1.5rem;margin:0;padding:0 0.8rem 0 0rem}</style>",ot(this,{target:this.shadowRoot,props:S(this.attributes),customElement:!0},vt,mt,s,{color:0}),t&&(t.target&&m(t.target,this,t.anchor),t.props&&(this.$set(t.props),U()))}static get observedAttributes(){return["color"]}get color(){return this.$$.ctx[0]}set color(t){this.$set({color:t}),U()}});const{window:wt}=et;function $t(t,e,n){const o=t.slice();return o[28]=e[n],o[30]=n,o}function yt(n){let o,s,l,a,d,u,h,g,$,y,k,_,S,E=n[10]&&bt(n),N=n[6],T=[];for(let t=0;t<N.length;t+=1)T[t]=Ct($t(n,N,t));let M=n[9]&&kt(n);return{c(){o=w("div"),s=w("div"),l=w("div"),a=b(),d=w("div"),u=w("vu-meter"),h=b(),E&&E.c(),$=b();for(let t=0;t<T.length;t+=1)T[t].c();y=b(),M&&M.c(),x(l,"class","TransscriptItemBgDiv"),C(u,"color",n[4]),x(d,"class","TransscriptItemContent"),x(s,"class","TranscriptItem"),x(o,"class","BigTranscript")},m(t,e){m(t,o,e),p(o,s),p(s,l),p(s,a),p(s,d),p(d,u),n[18](u),p(d,h),E&&E.m(d,null),p(o,$);for(let t=0;t<T.length;t+=1)T[t].m(o,null);p(o,y),M&&M.m(o,null),S=!0},p(t,e){if((!S||16&e)&&C(u,"color",t[4]),t[10]?E?1024&e&&X(E,1):(E=bt(t),E.c(),X(E,1),E.m(d,null)):E&&(E.d(1),E=null),33344&e){let n;for(N=t[6],n=0;n<N.length;n+=1){const i=$t(t,N,n);T[n]?(T[n].p(i,e),X(T[n],1)):(T[n]=Ct(i),T[n].c(),X(T[n],1),T[n].m(o,y))}for(;n<T.length;n+=1)T[n].d(1);T.length=N.length}t[9]?M?(M.p(t,e),512&e&&X(M,1)):(M=kt(t),M.c(),X(M,1),M.m(o,null)):M&&(M.d(1),M=null)},i(t){if(!S){X(E),g||O((()=>{g=tt(s,n[13],{duration:200}),g.start()}));for(let t=0;t<N.length;t+=1)X(T[t]);X(M),O((()=>{_&&_.end(1),k||(k=tt(o,n[12],{})),k.start()})),S=!0}},o(s){k&&k.invalidate(),_=function(n,o,s){let l,a=o(n,s),d=!0;const u=Q;function h(){const{delay:o=0,duration:r=300,easing:s=e,tick:h=t,css:g}=a||Z;g&&(l=P(n,1,0,r,o,s,g));const p=c()+o,m=p+r;O((()=>J(n,!1,"start"))),f((t=>{if(d){if(t>=m)return h(0,1),J(n,!1,"end"),--u.r||i(u.c),!1;if(t>=p){const e=s((t-p)/r);h(1-e,e)}}return d}))}return u.r+=1,r(a)?G().then((()=>{a=a(),h()})):h(),{end(t){t&&a.tick&&a.tick(1,0),d&&(l&&R(n,l),d=!1)}}}(o,n[12],{}),S=!1},d(t){t&&v(o),n[18](null),E&&E.d(),function(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}(T,t),M&&M.d(),t&&_&&_.end()}}}function bt(e){let n,o;return{c(){n=w("div"),n.textContent="Listening...",x(n,"class","listening")},m(t,e){m(t,n,e)},i(t){o||O((()=>{o=tt(n,e[13],{duration:400}),o.start()}))},o:t,d(t){t&&v(n)}}}function xt(t){let e,n;return{c(){e=w("span"),x(e,"style",n=t[30]<t[6].length-1?"width:0.25em;":t[9]?"width:1.2em;":"")},m(t,n){m(t,e,n)},p(t,o){576&o&&n!==(n=t[30]<t[6].length-1?"width:0.25em;":t[9]?"width:1.2em;":"")&&x(e,"style",n)},d(t){t&&v(e)}}}function Ct(e){let n,o,i,r,s,l,c,a,d,u=e[28].word+"",f=e[30]<e[6].length&&xt(e);return{c(){n=w("div"),o=w("div"),r=b(),s=w("div"),l=y(u),c=b(),f&&f.c(),x(o,"class","TransscriptItemBgDiv"),x(s,"class","TransscriptItemContent"),x(n,"class",d="TranscriptItem "+e[15](e[28])),_(n,"Entity",null!==e[28].entityType),_(n,"Final",e[28].isFinal)},m(t,e){m(t,n,e),p(n,o),p(n,r),p(n,s),p(s,l),p(s,c),f&&f.m(s,null)},p(t,e){64&e&&u!==(u=t[28].word+"")&&function(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}(l,u),t[30]<t[6].length?f?f.p(t,e):(f=xt(t),f.c(),f.m(s,null)):f&&(f.d(1),f=null),64&e&&d!==(d="TranscriptItem "+t[15](t[28]))&&x(n,"class",d),64&e&&_(n,"Entity",null!==t[28].entityType),64&e&&_(n,"Final",t[28].isFinal)},i(t){i||O((()=>{i=tt(o,e[13],{}),i.start()})),a||O((()=>{a=tt(s,e[13],{}),a.start()}))},o:t,d(t){t&&v(n),f&&f.d()}}}function kt(e){let n,o,i,r,s,l,c,a;return{c(){n=w("div"),o=w("div"),i=b(),r=w("div"),s=$("svg"),l=$("path"),x(o,"class","TransscriptItemBgDiv"),k(o,"background-color",e[4]),x(l,"stroke","currentColor"),x(l,"stroke-width","3"),x(l,"d","M7.191 11.444l4.059 6.107 7.376-12.949"),x(l,"fill","none"),x(l,"fill-rule","evenodd"),k(s,"width","2rem"),k(s,"height","2rem"),k(s,"position","absolute"),k(s,"transform","translate(-0.5rem, -0.5rem)"),k(s,"stroke","#eee"),x(s,"viewBox","0 0 24 24"),x(s,"xmlns","http://www.w3.org/2000/svg"),k(r,"width","1.0rem"),k(r,"height","1rem"),k(r,"position","relative"),x(n,"class","TranscriptItem")},m(t,e){m(t,n,e),p(n,o),p(n,i),p(n,r),p(r,s),p(s,l)},p(t,e){16&e&&k(o,"background-color",t[4])},i(t){c||O((()=>{c=tt(l,e[11],{duration:500}),c.start()})),a||O((()=>{a=tt(n,e[13],{duration:200,maxWidth:3}),a.start()}))},o:t,d(t){t&&v(n)}}}function _t(e){let n,o,r,s,l,c,a=e[7]&&yt(e);return{c(){n=w("main"),a&&a.c(),o=b(),r=w("link"),this.c=t,k(n,"--voffset",e[1]),k(n,"--hoffset",e[2]),k(n,"--fontsize",e[3]),k(n,"--highlight-color",e[4]),k(n,"--text-bg-color",e[5]),_(n,"placementTop","top"===e[0]),x(r,"href","https://fonts.googleapis.com/css2?family=Saira+Condensed:wght@700&display=swap"),x(r,"rel","stylesheet")},m(t,i){var d,u,f,h;m(t,n,i),a&&a.m(n,null),m(t,o,i),p(document.head,r),s=!0,l||(d=wt,u="message",f=e[14],d.addEventListener(u,f,h),c=()=>d.removeEventListener(u,f,h),l=!0)},p(t,[e]){t[7]?a?(a.p(t,e),128&e&&X(a,1)):(a=yt(t),a.c(),X(a,1),a.m(n,null)):a&&(Q={r:0,c:[],p:Q},Y(a,1,1,(()=>{a=null})),Q.r||i(Q.c),Q=Q.p),(!s||2&e)&&k(n,"--voffset",t[1]),(!s||4&e)&&k(n,"--hoffset",t[2]),(!s||8&e)&&k(n,"--fontsize",t[3]),(!s||16&e)&&k(n,"--highlight-color",t[4]),(!s||32&e)&&k(n,"--text-bg-color",t[5]),1&e&&_(n,"placementTop","top"===t[0])},i(t){s||(X(a),s=!0)},o(t){Y(a),s=!1},d(t){t&&v(n),a&&a.d(),t&&v(o),v(r),l=!1,c()}}}function St(t,e,n){let o,i,{placement:r}=e,{voffset:s="3rem"}=e,{hoffset:l="2rem"}=e,{fontsize:c="1.5rem"}=e,{highlightcolor:a="#15e8b5"}=e,{textbgcolor:d="#202020"}=e,u=[],f=!1,h=null,g=null,p=dt.ClientState.Disconnected,m=!1,v=!1,w=!1;const $=z(),y=(t,e)=>{$.dispatchEvent(new CustomEvent(t,{detail:e,composed:!0}))},b=ut(ht),x=ut(((t,{delay:e=0,duration:n=400})=>({delay:e,duration:n,easing:ft,css:t=>`\n opacity: ${pt(gt,t,0,1)};\n max-height: ${10*pt(gt,t,0,.6)}rem;\n `}))),C=ut(((t,{delay:e=0,duration:n=350,maxWidth:o=10})=>({delay:e,duration:n,css:t=>`\n max-width: ${pt(gt,t,0,1)*o}rem;\n `}))),k=t=>{if(void 0===t)return;i&&f&&i.dispatchEvent(new CustomEvent("updateVU",{detail:{level:1,seekTimeMs:1e3}})),t.isFinal?S(u.length>0?2e3:0):u.length>0&&(m||n(17,m=!0),S(2e3));const e=`${t.contextId}/${t.id}`;null!==g?g!==e&&(n(9,w=!1),g=e):g=e,n(6,u=[]),t.words.forEach((t=>{n(6,u[t.index]={word:t.value,serialNumber:t.index,entityType:null,isFinal:t.isFinal,hide:!1},u)})),t.entities.forEach((t=>{n(6,u[t.startPosition].word=t.value,u),n(6,u[t.startPosition].entityType=t.type,u),n(6,u[t.startPosition].isFinal=t.isFinal,u),n(6,u[t.startPosition].hide=!1,u);for(let e=t.startPosition+1;e<t.endPosition;e++)u[e]&&n(6,u[e].hide=!0,u)})),n(6,u=u.filter((t=>!t.hide)))};$.onSegmentUpdate=k;const _=t=>{y("debug","big-transcript.ping 1")},S=(t=0)=>{E(),h=window.setTimeout((()=>{h=null,m&&n(17,m=!1)}),t)},E=()=>{null!==h&&(window.clearTimeout(h),h=null)};return B((()=>{const t=t=>k(t.detail);return $.addEventListener("speechsegment",t),$.addEventListener("ping",_),()=>{cancelAnimationFrame(null),$.removeEventListener("speechsegment",t),$.removeEventListener("ping",_)}})),t.$$set=t=>{"placement"in t&&n(0,r=t.placement),"voffset"in t&&n(1,s=t.voffset),"hoffset"in t&&n(2,l=t.hoffset),"fontsize"in t&&n(3,c=t.fontsize),"highlightcolor"in t&&n(4,a=t.highlightcolor),"textbgcolor"in t&&n(5,d=t.textbgcolor)},t.$$.update=()=>{if(64&t.$$.dirty&&n(10,o=0===u.length),196736&t.$$.dirty){const t=p===dt.ClientState.Recording||m;t!==v&&y("visibilitychanged",t),n(7,v=t)}},[r,s,l,c,a,d,u,v,i,w,o,b,x,C,t=>{switch(t.data.type){case"speechsegment":k(t.data.segment);break;case"holdstart":f=!0;break;case"holdend":f=!1;break;case"speechhandled":t.data.success&&n(9,w=!0);break;case"speechstate":n(16,p=t.data.state),p===dt.ClientState.Recording&&(n(9,w=!1),n(6,u=[]),g=null)}},t=>t.entityType||"",p,m,function(t){F[t?"unshift":"push"]((()=>{i=t,n(8,i)}))}]}customElements.define("big-transcript",class extends it{constructor(t){super(),this.shadowRoot.innerHTML="<style>.BigTranscript{position:relative;user-select:none;font-family:'Saira Condensed', sans-serif;text-transform:uppercase;color:#fff;font-size:var(--fontsize);line-height:135%;display:flex;flex-direction:row;justify-content:start;flex-wrap:wrap}.TranscriptItem{position:relative;display:flex;flex-direction:row;align-items:center}.Entity{color:var(--highlight-color)}.TransscriptItemContent{z-index:1;display:flex;flex-wrap:nowrap;flex-direction:row;align-items:center;overflow:hidden}.TransscriptItemBgDiv{position:absolute;box-sizing:content-box;width:100%;height:100%;top:-0.2rem;left:-0.8rem;margin:0;padding:0.2rem 0.8rem;background-color:var(--text-bg-color);z-index:-1}.placementTop{position:fixed;top:0;left:0;right:0;bottom:0;margin:var(--voffset) var(--hoffset) 0 var(--hoffset);z-index:50;pointer-events:none}.listening{animation:flow 1s linear infinite;background:linear-gradient(-60deg, #fff8, #fffc, #fff8, #fffc, #fff8);background-size:200%;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;-webkit-box-decoration-break:clone}@keyframes flow{0%{background-position:100% 50%}100%{background-position:0% 50%}}</style>",ot(this,{target:this.shadowRoot,props:S(this.attributes),customElement:!0},St,_t,s,{placement:0,voffset:1,hoffset:2,fontsize:3,highlightcolor:4,textbgcolor:5}),t&&(t.target&&m(t.target,this,t.anchor),t.props&&(this.$set(t.props),U()))}static get observedAttributes(){return["placement","voffset","hoffset","fontsize","highlightcolor","textbgcolor"]}get placement(){return this.$$.ctx[0]}set placement(t){this.$set({placement:t}),U()}get voffset(){return this.$$.ctx[1]}set voffset(t){this.$set({voffset:t}),U()}get hoffset(){return this.$$.ctx[2]}set hoffset(t){this.$set({hoffset:t}),U()}get fontsize(){return this.$$.ctx[3]}set fontsize(t){this.$set({fontsize:t}),U()}get highlightcolor(){return this.$$.ctx[4]}set highlightcolor(t){this.$set({highlightcolor:t}),U()}get textbgcolor(){return this.$$.ctx[5]}set textbgcolor(t){this.$set({textbgcolor:t}),U()}})}();
!function(){"use strict";function t(){}const e=t=>t;function n(t){return t()}function o(){return Object.create(null)}function i(t){t.forEach(n)}function r(t){return"function"==typeof t}function s(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function l(t,e){return t!=t?e==e:t!==e}function c(t){return 0===Object.keys(t).length}const a="undefined"!=typeof window;let d=a?()=>window.performance.now():()=>Date.now(),u=a?t=>requestAnimationFrame(t):t;const f=new Set;function h(t){f.forEach((e=>{e.c(t)||(f.delete(e),e.f())})),0!==f.size&&u(h)}function g(t){let e;return 0===f.size&&u(h),{promise:new Promise((n=>{f.add(e={c:t,f:n})})),abort(){f.delete(e)}}}let p=!1;const m=new Set;function $(t,e){p&&m.delete(e),e.parentNode!==t&&t.appendChild(e)}function w(t,e,n){p&&m.delete(e),(e.parentNode!==t||n&&e.nextSibling!==n)&&t.insertBefore(e,n||null)}function v(t){p?m.add(t):t.parentNode&&t.parentNode.removeChild(t)}function y(t){return document.createElement(t)}function b(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function x(t){return document.createTextNode(t)}function C(){return x(" ")}function k(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function _(t,e,n,o){t.style.setProperty(e,n,o?"important":"")}function S(t,e,n){t.classList[n?"add":"remove"](e)}function E(t){const e={};for(const n of t)e[n.name]=n.value;return e}const N=new Set;let T,P=0;function z(t,e,n,o,i,r,s,l=0){const c=16.666/o;let a="{\n";for(let t=0;t<=1;t+=c){const o=e+(n-e)*r(t);a+=100*t+`%{${s(o,1-o)}}\n`}const d=a+`100% {${s(n,1-n)}}\n}`,u=`__svelte_${function(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}(d)}_${l}`,f=t.ownerDocument;N.add(f);const h=f.__svelte_stylesheet||(f.__svelte_stylesheet=f.head.appendChild(y("style")).sheet),g=f.__svelte_rules||(f.__svelte_rules={});g[u]||(g[u]=!0,h.insertRule(`@keyframes ${u} ${d}`,h.cssRules.length));const p=t.style.animation||"";return t.style.animation=`${p?`${p}, `:""}${u} ${o}ms linear ${i}ms 1 both`,P+=1,u}function R(t,e){const n=(t.style.animation||"").split(", "),o=n.filter(e?t=>t.indexOf(e)<0:t=>-1===t.indexOf("__svelte")),i=n.length-o.length;i&&(t.style.animation=o.join(", "),P-=i,P||u((()=>{P||(N.forEach((t=>{const e=t.__svelte_stylesheet;let n=e.cssRules.length;for(;n--;)e.deleteRule(n);t.__svelte_rules={}})),N.clear())})))}function B(t){T=t}function M(){if(!T)throw new Error("Function called outside component initialization");return T}function D(t){M().$$.on_mount.push(t)}const I=[],F=[],A=[],L=[],H=Promise.resolve();let O=!1;function j(t){A.push(t)}let V=!1;const U=new Set;function q(){if(!V){V=!0;do{for(let t=0;t<I.length;t+=1){const e=I[t];B(e),W(e.$$)}for(B(null),I.length=0;F.length;)F.pop()();for(let t=0;t<A.length;t+=1){const e=A[t];U.has(e)||(U.add(e),e())}A.length=0}while(I.length);for(;L.length;)L.pop()();O=!1,V=!1,U.clear()}}function W(t){if(null!==t.fragment){t.update(),i(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(j)}}let G;function J(){return G||(G=Promise.resolve(),G.then((()=>{G=null}))),G}function K(t,e,n){t.dispatchEvent(function(t,e){const n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!1,!1,e),n}(`${e?"intro":"outro"}${n}`))}const Q=new Set;let X;function Y(t,e){t&&t.i&&(Q.delete(t),t.i(e))}function Z(t,e,n,o){if(t&&t.o){if(Q.has(t))return;Q.add(t),X.c.push((()=>{Q.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}const tt={duration:0};function et(n,o,i){let s,l,c=o(n,i),a=!1,u=0;function f(){s&&R(n,s)}function h(){const{delay:o=0,duration:i=300,easing:r=e,tick:h=t,css:p}=c||tt;p&&(s=z(n,0,1,i,o,r,p,u++)),h(0,1);const m=d()+o,$=m+i;l&&l.abort(),a=!0,j((()=>K(n,!0,"start"))),l=g((t=>{if(a){if(t>=$)return h(1,0),K(n,!0,"end"),f(),a=!1;if(t>=m){const e=r((t-m)/i);h(e,1-e)}}return a}))}let p=!1;return{start(){p||(R(n),r(c)?(c=c(),J().then(h)):h())},invalidate(){p=!1},end(){a&&(f(),a=!1)}}}const nt="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function ot(t,e,o,s){const{fragment:l,on_mount:c,on_destroy:a,after_update:d}=t.$$;l&&l.m(e,o),s||j((()=>{const e=c.map(n).filter(r);a?a.push(...e):i(e),t.$$.on_mount=[]})),d.forEach(j)}function it(t,e){const n=t.$$;null!==n.fragment&&(i(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function rt(t,e){-1===t.$$.dirty[0]&&(I.push(t),O||(O=!0,H.then(q)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function st(e,n,r,s,l,c,a=[-1]){const d=T;B(e);const u=e.$$={fragment:null,ctx:null,props:c,update:t,not_equal:l,bound:o(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(d?d.$$.context:n.context||[]),callbacks:o(),dirty:a,skip_bound:!1};let f=!1;if(u.ctx=r?r(e,n.props||{},((t,n,...o)=>{const i=o.length?o[0]:n;return u.ctx&&l(u.ctx[t],u.ctx[t]=i)&&(!u.skip_bound&&u.bound[t]&&u.bound[t](i),f&&rt(e,t)),n})):[],u.update(),f=!0,i(u.before_update),u.fragment=!!s&&s(u.ctx),n.target){if(n.hydrate){p=!0;const t=function(t){return Array.from(t.childNodes)}(n.target);u.fragment&&u.fragment.l(t),t.forEach(v)}else u.fragment&&u.fragment.c();n.intro&&Y(e.$$.fragment),ot(e,n.target,n.anchor,n.customElement),function(){p=!1;for(const t of m)t.parentNode.removeChild(t);m.clear()}(),q()}B(d)}let lt;"function"==typeof HTMLElement&&(lt=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(n).filter(r);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){i(this.$$.on_disconnect)}$destroy(){it(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){this.$$set&&!c(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});var ct,at,dt,ut,ft,ht=(function(t,e){var n;Object.defineProperty(e,"__esModule",{value:!0}),(n=e.ClientState||(e.ClientState={}))[n.Failed=0]="Failed",n[n.NoBrowserSupport=1]="NoBrowserSupport",n[n.NoAudioConsent=2]="NoAudioConsent",n[n.Disconnected=3]="Disconnected",n[n.Disconnecting=4]="Disconnecting",n[n.Connecting=5]="Connecting",n[n.Connected=6]="Connected",n[n.Starting=7]="Starting",n[n.Stopping=8]="Stopping",n[n.Recording=9]="Recording"}(ct={exports:{}},ct.exports),ct.exports);function gt(t){return function(e,n){if(!e.hasOwnProperty("ownerDocument")){Object.defineProperty(e,"ownerDocument",{get:function(){return e.parentElement}});let t=e;for(;t.parentElement;)t=t.parentElement;e.parentElement.head=t}return t(e,n)}}function pt(t){return t<.5?4*t*t*t:.5*Math.pow(2*t-2,3)+1}function mt(t,{delay:e=0,speed:n,duration:o,easing:i=pt}={}){const r=t.getTotalLength();return void 0===o?o=void 0===n?800:r/n:"function"==typeof o&&(o=o(r)),{delay:e,duration:o,easing:i,css:(t,e)=>`stroke-dasharray: ${t*r} ${e*r}`}}!function(t){t.Failed="Failed",t.NoBrowserSupport="NoBrowserSupport",t.NoAudioConsent="NoAudioConsent",t.Idle="Idle",t.Connecting="Connecting",t.Ready="Ready",t.Recording="Recording",t.Loading="Loading"}(at||(at={})),function(t){t.Poweron="poweron",t.Mic="mic",t.Error="error",t.Denied="denied"}(dt||(dt={})),function(t){t.Hold="hold",t.Click="click",t.Noninteractive="noninteractive"}(ut||(ut={})),function(t){t.None="none",t.Connecting="connecting",t.Busy="busy"}(ft||(ft={})),ht.ClientState.Disconnected,dt.Poweron,ut.Click,ft.None,ht.ClientState.Disconnecting,dt.Poweron,ut.Noninteractive,ft.Connecting,ht.ClientState.Connecting,dt.Poweron,ut.Noninteractive,ft.Connecting,ht.ClientState.Connected,dt.Mic,ut.Hold,ft.None,ht.ClientState.Starting,dt.Mic,ut.Hold,ft.Connecting,ht.ClientState.Recording,dt.Mic,ut.Hold,ft.None,ht.ClientState.Stopping,dt.Mic,ut.Noninteractive,ft.Busy,ht.ClientState.Failed,dt.Error,ut.Click,ft.None,ht.ClientState.NoBrowserSupport,dt.Error,ut.Click,ft.None,ht.ClientState.NoAudioConsent,dt.Denied,ut.Click,ft.None,at.Idle,dt.Poweron,ut.Click,ft.None,at.Connecting,dt.Poweron,ut.Noninteractive,ft.Connecting,at.Ready,dt.Mic,ut.Hold,ft.None,at.Recording,dt.Mic,ut.Hold,ft.None,at.Loading,dt.Mic,ut.Noninteractive,ft.Busy,at.Failed,dt.Error,ut.Click,ft.None,at.NoBrowserSupport,dt.Error,ut.Click,ft.None,at.NoAudioConsent,dt.Denied,ut.Click,ft.None;const $t=[0,1];function wt(t,e,n,o){if(e<n)return t[0];if(e>o)return t[t.length-1];let i=(o-n)/(t.length-1);if(i<=0)return t[0];let r=(e-n)/i,s=Math.floor(r),l=Math.ceil(r),c=r-s;return(1-c)*t[s]+c*t[l]}function vt(e){let n;return{c(){n=y("canvas"),_(n,"color",e[0]),_(n,"display","block"),_(n,"width","1.35rem"),_(n,"height","1.5rem"),_(n,"margin","0"),_(n,"padding","0 0.8rem 0 0rem"),_(n,"flex-grow","0"),_(n,"flex-shrink","0"),_(n,"flex-basis","1.35rem"),k(n,"class","svelte-1fz8oog")},m(t,o){w(t,n,o),e[3](n)},p(t,[e]){1&e&&_(n,"color",t[0])},i:t,o:t,d(t){t&&v(n),e[3](null)}}}function yt(t,e,n){let{color:o="#60e0ff"}=e;const i=(t,e)=>{s=Date.now()>l?t:Math.max(s,t),l=Date.now()+e};let r,s=0,l=0,c=[0,0];const a=(t,e,n,o,i,r)=>{o<2*r&&(r=o/2),i<2*r&&(r=i/2),t.beginPath(),t.moveTo(e+r,n),t.arcTo(e+o,n,e+o,n+i,r),t.arcTo(e+o,n+i,e,n+i,r),t.arcTo(e,n+i,e,n,r),t.arcTo(e,n,e+o,n,r),t.closePath()};return D((()=>{let t;const e=2*(c.length-1)+1,o=3*e+1*(e-1),d=()=>{if(t=requestAnimationFrame(d),!r)return;const e=r.getContext("2d");if(!e)return;let i=(t=>{var e=t.backingStorePixelRatio||t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return(window.devicePixelRatio||1)/e})(e),u=Number.parseInt(getComputedStyle(r).getPropertyValue("width").slice(0,-2)),f=Number.parseInt(getComputedStyle(r).getPropertyValue("height").slice(0,-2));n(1,r.width=u*i,r),n(1,r.height=f*i,r),Date.now()<l?c[0]=.15*s+.85*c[0]:c[0]=.0625+.75*c[0];let h=1;for(;h<c.length;)c[h]=.25*c[h-1]+.5*c[h]+.0625,h++;e.clearRect(0,0,r.width,r.height);const g=3/o*r.width*.5,p=4/o*r.width;for(e.fillStyle=r.style.color||"#000000",h=0;h<c.length;h++){const t=c[h]*r.height;t*r.height>2*g?a(e,.5*r.width-g+h*p,.5*(r.height-t),2*g,t,g):(e.beginPath(),e.arc(.5*r.width+h*p,.5*r.height,t*r.height*.5,0,2*Math.PI)),e.fill(),h>0&&(t*r.height>2*g?a(e,.5*r.width-g-h*p,.5*(r.height-t),2*g,t,g):(e.beginPath(),e.arc(.5*r.width-h*p,.5*r.height,t*r.height*.5,0,2*Math.PI)),e.fill())}};return d(),i(1,500),()=>{cancelAnimationFrame(t)}})),t.$$set=t=>{"color"in t&&n(0,o=t.color)},[o,r,i,function(t){F[t?"unshift":"push"]((()=>{r=t,n(1,r)}))}]}class bt extends class{$destroy(){it(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){this.$$set&&!c(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}{constructor(t){var e;super(),document.getElementById("svelte-1fz8oog-style")||((e=y("style")).id="svelte-1fz8oog-style",e.textContent="canvas.svelte-1fz8oog{display:block;width:1.35rem;height:1.5rem;margin:0;padding:0 0.8rem 0 0rem;flex-grow:0;flex-shrink:0;flex-basis:1.35rem}",$(document.head,e)),st(this,t,yt,vt,s,{color:0,updateVU:2})}get updateVU(){return this.$$.ctx[2]}}const{window:xt}=nt;function Ct(t,e,n){const o=t.slice();return o[28]=e[n],o[30]=n,o}function kt(n){let o,s,l,c,a,u,f,h,p,m,b,x,_,S={color:n[4]};u=new bt({props:S}),n[18](u);let E=n[10]&&_t(n),N=n[6],T=[];for(let t=0;t<N.length;t+=1)T[t]=Et(Ct(n,N,t));let P=n[9]&&Nt(n);return{c(){var t;o=y("div"),s=y("div"),l=y("div"),c=C(),a=y("div"),(t=u.$$.fragment)&&t.c(),f=C(),E&&E.c(),p=C();for(let t=0;t<T.length;t+=1)T[t].c();m=C(),P&&P.c(),k(l,"class","TransscriptItemBgDiv"),k(a,"class","TransscriptItemContent"),k(s,"class","TranscriptItem"),k(o,"class","BigTranscript")},m(t,e){w(t,o,e),$(o,s),$(s,l),$(s,c),$(s,a),ot(u,a,null),$(a,f),E&&E.m(a,null),$(o,p);for(let t=0;t<T.length;t+=1)T[t].m(o,null);$(o,m),P&&P.m(o,null),_=!0},p(t,e){const n={};if(16&e&&(n.color=t[4]),u.$set(n),t[10]?E?1024&e&&Y(E,1):(E=_t(t),E.c(),Y(E,1),E.m(a,null)):E&&(E.d(1),E=null),33344&e){let n;for(N=t[6],n=0;n<N.length;n+=1){const i=Ct(t,N,n);T[n]?(T[n].p(i,e),Y(T[n],1)):(T[n]=Et(i),T[n].c(),Y(T[n],1),T[n].m(o,m))}for(;n<T.length;n+=1)T[n].d(1);T.length=N.length}t[9]?P?(P.p(t,e),512&e&&Y(P,1)):(P=Nt(t),P.c(),Y(P,1),P.m(o,null)):P&&(P.d(1),P=null)},i(t){if(!_){Y(u.$$.fragment,t),Y(E),h||j((()=>{h=et(s,n[13],{duration:200}),h.start()}));for(let t=0;t<N.length;t+=1)Y(T[t]);Y(P),j((()=>{x&&x.end(1),b||(b=et(o,n[12],{})),b.start()})),_=!0}},o(s){Z(u.$$.fragment,s),b&&b.invalidate(),x=function(n,o,s){let l,c=o(n,s),a=!0;const u=X;function f(){const{delay:o=0,duration:r=300,easing:s=e,tick:f=t,css:h}=c||tt;h&&(l=z(n,1,0,r,o,s,h));const p=d()+o,m=p+r;j((()=>K(n,!1,"start"))),g((t=>{if(a){if(t>=m)return f(0,1),K(n,!1,"end"),--u.r||i(u.c),!1;if(t>=p){const e=s((t-p)/r);f(1-e,e)}}return a}))}return u.r+=1,r(c)?J().then((()=>{c=c(),f()})):f(),{end(t){t&&c.tick&&c.tick(1,0),a&&(l&&R(n,l),a=!1)}}}(o,n[12],{}),_=!1},d(t){t&&v(o),n[18](null),it(u),E&&E.d(),function(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}(T,t),P&&P.d(),t&&x&&x.end()}}}function _t(e){let n,o;return{c(){n=y("div"),n.textContent="Listening...",k(n,"class","listening")},m(t,e){w(t,n,e)},i(t){o||j((()=>{o=et(n,e[13],{duration:400}),o.start()}))},o:t,d(t){t&&v(n)}}}function St(t){let e,n;return{c(){e=y("span"),k(e,"style",n=t[30]<t[6].length-1?"width:0.25em;":t[9]?"width:1.2em;":"")},m(t,n){w(t,e,n)},p(t,o){576&o&&n!==(n=t[30]<t[6].length-1?"width:0.25em;":t[9]?"width:1.2em;":"")&&k(e,"style",n)},d(t){t&&v(e)}}}function Et(e){let n,o,i,r,s,l,c,a,d,u=e[28].word+"",f=e[30]<e[6].length&&St(e);return{c(){n=y("div"),o=y("div"),r=C(),s=y("div"),l=x(u),c=C(),f&&f.c(),k(o,"class","TransscriptItemBgDiv"),k(s,"class","TransscriptItemContent"),k(n,"class",d="TranscriptItem "+e[15](e[28])),S(n,"Entity",null!==e[28].entityType),S(n,"Final",e[28].isFinal)},m(t,e){w(t,n,e),$(n,o),$(n,r),$(n,s),$(s,l),$(s,c),f&&f.m(s,null)},p(t,e){64&e&&u!==(u=t[28].word+"")&&function(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}(l,u),t[30]<t[6].length?f?f.p(t,e):(f=St(t),f.c(),f.m(s,null)):f&&(f.d(1),f=null),64&e&&d!==(d="TranscriptItem "+t[15](t[28]))&&k(n,"class",d),64&e&&S(n,"Entity",null!==t[28].entityType),64&e&&S(n,"Final",t[28].isFinal)},i(t){i||j((()=>{i=et(o,e[13],{}),i.start()})),a||j((()=>{a=et(s,e[13],{}),a.start()}))},o:t,d(t){t&&v(n),f&&f.d()}}}function Nt(e){let n,o,i,r,s,l,c,a;return{c(){n=y("div"),o=y("div"),i=C(),r=y("div"),s=b("svg"),l=b("path"),k(o,"class","TransscriptItemBgDiv"),_(o,"background-color",e[4]),k(l,"stroke","currentColor"),k(l,"stroke-width","3"),k(l,"d","M7.191 11.444l4.059 6.107 7.376-12.949"),k(l,"fill","none"),k(l,"fill-rule","evenodd"),_(s,"width","2rem"),_(s,"height","2rem"),_(s,"position","absolute"),_(s,"transform","translate(-0.5rem, -0.5rem)"),_(s,"stroke","#eee"),k(s,"viewBox","0 0 24 24"),k(s,"xmlns","http://www.w3.org/2000/svg"),_(r,"width","1.0rem"),_(r,"height","1rem"),_(r,"position","relative"),k(n,"class","TranscriptItem")},m(t,e){w(t,n,e),$(n,o),$(n,i),$(n,r),$(r,s),$(s,l)},p(t,e){16&e&&_(o,"background-color",t[4])},i(t){c||j((()=>{c=et(l,e[11],{duration:500}),c.start()})),a||j((()=>{a=et(n,e[13],{duration:200,maxWidth:3}),a.start()}))},o:t,d(t){t&&v(n)}}}function Tt(e){let n,o,r,s,l,c,a=e[7]&&kt(e);return{c(){n=y("main"),a&&a.c(),o=C(),r=y("link"),this.c=t,_(n,"--voffset",e[1]),_(n,"--hoffset",e[2]),_(n,"--fontsize",e[3]),_(n,"--highlight-color",e[4]),_(n,"--text-bg-color",e[5]),S(n,"placementTop","top"===e[0]),k(r,"href","https://fonts.googleapis.com/css2?family=Saira+Condensed:wght@700&display=swap"),k(r,"rel","stylesheet")},m(t,i){var d,u,f,h;w(t,n,i),a&&a.m(n,null),w(t,o,i),$(document.head,r),s=!0,l||(d=xt,u="message",f=e[14],d.addEventListener(u,f,h),c=()=>d.removeEventListener(u,f,h),l=!0)},p(t,[e]){t[7]?a?(a.p(t,e),128&e&&Y(a,1)):(a=kt(t),a.c(),Y(a,1),a.m(n,null)):a&&(X={r:0,c:[],p:X},Z(a,1,1,(()=>{a=null})),X.r||i(X.c),X=X.p),(!s||2&e)&&_(n,"--voffset",t[1]),(!s||4&e)&&_(n,"--hoffset",t[2]),(!s||8&e)&&_(n,"--fontsize",t[3]),(!s||16&e)&&_(n,"--highlight-color",t[4]),(!s||32&e)&&_(n,"--text-bg-color",t[5]),1&e&&S(n,"placementTop","top"===t[0])},i(t){s||(Y(a),s=!0)},o(t){Z(a),s=!1},d(t){t&&v(n),a&&a.d(),t&&v(o),v(r),l=!1,c()}}}function Pt(t,e,n){let o,i,{placement:r}=e,{voffset:s="3rem"}=e,{hoffset:l="2rem"}=e,{fontsize:c="1.5rem"}=e,{highlightcolor:a="#15e8b5"}=e,{textbgcolor:d="#202020"}=e,u=[],f=!1,h=null,g=null,p=ht.ClientState.Disconnected,m=!1,$=!1,w=!1;const v=M(),y=(t,e)=>{v.dispatchEvent(new CustomEvent(t,{detail:e,composed:!0}))},b=gt(mt),x=gt(((t,{delay:e=0,duration:n=400})=>({delay:e,duration:n,easing:pt,css:t=>`\n opacity: ${wt($t,t,0,1)};\n max-height: ${10*wt($t,t,0,.6)}rem;\n `}))),C=gt(((t,{delay:e=0,duration:n=350,maxWidth:o=10})=>({delay:e,duration:n,css:t=>`\n max-width: ${wt($t,t,0,1)*o}rem;\n `}))),k=t=>{if(void 0===t)return;i&&f&&i.updateVU(.5*Math.random()+.5,75*Math.random()+75),t.isFinal?S(u.length>0?2e3:0):u.length>0&&(m||n(17,m=!0),S(2e3));const e=`${t.contextId}/${t.id}`;null!==g?g!==e&&(n(9,w=!1),g=e):g=e,n(6,u=[]),t.words.forEach((t=>{n(6,u[t.index]={word:t.value,serialNumber:t.index,entityType:null,isFinal:t.isFinal,hide:!1},u)})),t.entities.forEach((t=>{n(6,u[t.startPosition].word=t.value,u),n(6,u[t.startPosition].entityType=t.type,u),n(6,u[t.startPosition].isFinal=t.isFinal,u),n(6,u[t.startPosition].hide=!1,u);for(let e=t.startPosition+1;e<t.endPosition;e++)u[e]&&n(6,u[e].hide=!0,u)})),n(6,u=u.filter((t=>!t.hide)))};v.onSegmentUpdate=k;const _=t=>{y("debug","big-transcript.ping 1")},S=(t=0)=>{E(),h=window.setTimeout((()=>{h=null,m&&n(17,m=!1)}),t)},E=()=>{null!==h&&(window.clearTimeout(h),h=null)};return D((()=>{const t=t=>k(t.detail);return v.addEventListener("speechsegment",t),v.addEventListener("ping",_),()=>{cancelAnimationFrame(null),v.removeEventListener("speechsegment",t),v.removeEventListener("ping",_)}})),t.$$set=t=>{"placement"in t&&n(0,r=t.placement),"voffset"in t&&n(1,s=t.voffset),"hoffset"in t&&n(2,l=t.hoffset),"fontsize"in t&&n(3,c=t.fontsize),"highlightcolor"in t&&n(4,a=t.highlightcolor),"textbgcolor"in t&&n(5,d=t.textbgcolor)},t.$$.update=()=>{if(64&t.$$.dirty&&n(10,o=0===u.length),196736&t.$$.dirty){const t=p===ht.ClientState.Recording||m;t!==$&&y("visibilitychanged",t),n(7,$=t)}},[r,s,l,c,a,d,u,$,i,w,o,b,x,C,t=>{switch(t.data.type){case"speechsegment":k(t.data.segment);break;case"holdstart":f=!0;break;case"holdend":f=!1;break;case"speechhandled":t.data.success&&n(9,w=!0);break;case"speechstate":n(16,p=t.data.state),p===ht.ClientState.Recording&&(n(9,w=!1),n(6,u=[]),g=null)}},t=>t.entityType||"",p,m,function(t){F[t?"unshift":"push"]((()=>{i=t,n(8,i)}))}]}class zt extends lt{constructor(t){super(),this.shadowRoot.innerHTML="<style>.BigTranscript{position:relative;user-select:none;font-family:'Saira Condensed', sans-serif;text-transform:uppercase;color:#fff;font-size:var(--fontsize);line-height:135%;display:flex;flex-direction:row;justify-content:start;flex-wrap:wrap}.TranscriptItem{position:relative;display:flex;flex-direction:row;align-items:center}.Entity{color:var(--highlight-color)}.TransscriptItemContent{z-index:1;display:flex;flex-wrap:nowrap;flex-direction:row;align-items:center;overflow:hidden}.TransscriptItemBgDiv{position:absolute;box-sizing:content-box;width:100%;height:100%;top:-0.2rem;left:-0.8rem;margin:0;padding:0.2rem 0.8rem;background-color:var(--text-bg-color);z-index:-1}.placementTop{position:fixed;top:0;left:0;right:0;bottom:0;margin:var(--voffset) var(--hoffset) 0 var(--hoffset);z-index:50;pointer-events:none}.listening{animation:flow 1s linear infinite;background:linear-gradient(-60deg, #fff8, #fffc, #fff8, #fffc, #fff8);background-size:200%;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;-webkit-box-decoration-break:clone}@keyframes flow{0%{background-position:100% 50%}100%{background-position:0% 50%}}</style>",st(this,{target:this.shadowRoot,props:E(this.attributes),customElement:!0},Pt,Tt,l,{placement:0,voffset:1,hoffset:2,fontsize:3,highlightcolor:4,textbgcolor:5}),t&&(t.target&&w(t.target,this,t.anchor),t.props&&(this.$set(t.props),q()))}static get observedAttributes(){return["placement","voffset","hoffset","fontsize","highlightcolor","textbgcolor"]}get placement(){return this.$$.ctx[0]}set placement(t){this.$set({placement:t}),q()}get voffset(){return this.$$.ctx[1]}set voffset(t){this.$set({voffset:t}),q()}get hoffset(){return this.$$.ctx[2]}set hoffset(t){this.$set({hoffset:t}),q()}get fontsize(){return this.$$.ctx[3]}set fontsize(t){this.$set({fontsize:t}),q()}get highlightcolor(){return this.$$.ctx[4]}set highlightcolor(t){this.$set({highlightcolor:t}),q()}get textbgcolor(){return this.$$.ctx[5]}set textbgcolor(t){this.$set({textbgcolor:t}),q()}}customElements.get("big-transcript")?console.warn("Skipping re-defining customElement big-transcript"):customElements.define("big-transcript",zt)}();
//# sourceMappingURL=big-transcript.js.map

@@ -1,2 +0,2 @@

!function(){"use strict";function t(){}function e(t){return t()}function n(){return Object.create(null)}function o(t){t.forEach(e)}function i(t){return"function"==typeof t}function r(t,e){return t!=t?e==e:t!==e}let c=!1;const s=new Set;function a(t,e){c&&s.delete(e),e.parentNode!==t&&t.appendChild(e)}function l(t,e,n){c&&s.delete(e),(e.parentNode!==t||n&&e.nextSibling!==n)&&t.insertBefore(e,n||null)}function d(t){c?s.add(t):t.parentNode&&t.parentNode.removeChild(t)}function u(t){return document.createElement(t)}function h(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function f(t){return document.createTextNode(t)}function p(){return f(" ")}function g(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function m(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function v(t,e,n){e in t?t[e]="boolean"==typeof t[e]&&""===n||n:m(t,e,n)}function w(t,e,n,o){t.style.setProperty(e,n,o?"important":"")}function $(t){const e={};for(const n of t)e[n.name]=n.value;return e}let b;function y(t){b=t}function x(){if(!b)throw new Error("Function called outside component initialization");return b}const C=[],N=[],E=[],M=[],k=Promise.resolve();let S=!1;function z(t){E.push(t)}let _=!1;const B=new Set;function L(){if(!_){_=!0;do{for(let t=0;t<C.length;t+=1){const e=C[t];y(e),D(e.$$)}for(y(null),C.length=0;N.length;)N.pop()();for(let t=0;t<E.length;t+=1){const e=E[t];B.has(e)||(B.add(e),e())}E.length=0}while(C.length);for(;M.length;)M.pop()();S=!1,_=!1,B.clear()}}function D(t){if(null!==t.fragment){t.update(),o(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(z)}}const R=new Set;const P="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function A(t,e){-1===t.$$.dirty[0]&&(C.push(t),S||(S=!0,k.then(L)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function F(r,a,l,u,h,f,p=[-1]){const g=b;y(r);const m=r.$$={fragment:null,ctx:null,props:f,update:t,not_equal:h,bound:n(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(g?g.$$.context:a.context||[]),callbacks:n(),dirty:p,skip_bound:!1};let v=!1;if(m.ctx=l?l(r,a.props||{},((t,e,...n)=>{const o=n.length?n[0]:e;return m.ctx&&h(m.ctx[t],m.ctx[t]=o)&&(!m.skip_bound&&m.bound[t]&&m.bound[t](o),v&&A(r,t)),e})):[],m.update(),v=!0,o(m.before_update),m.fragment=!!u&&u(m.ctx),a.target){if(a.hydrate){c=!0;const t=function(t){return Array.from(t.childNodes)}(a.target);m.fragment&&m.fragment.l(t),t.forEach(d)}else m.fragment&&m.fragment.c();a.intro&&((w=r.$$.fragment)&&w.i&&(R.delete(w),w.i($))),function(t,n,r,c){const{fragment:s,on_mount:a,on_destroy:l,after_update:d}=t.$$;s&&s.m(n,r),c||z((()=>{const n=a.map(e).filter(i);l?l.push(...n):o(n),t.$$.on_mount=[]})),d.forEach(z)}(r,a.target,a.anchor,a.customElement),function(){c=!1;for(const t of s)t.parentNode.removeChild(t);s.clear()}(),L()}var w,$;y(g)}let H;function T(e){let n,o,i,r,c,s,u,f;return{c(){n=h("svg"),o=h("defs"),i=h("linearGradient"),r=h("stop"),c=h("stop"),s=h("g"),u=h("path"),f=h("path"),this.c=t,m(r,"stop-color","var(--gradient-stop1)"),m(r,"offset","0%"),m(c,"stop-color","var(--gradient-stop2)"),m(c,"offset","100%"),m(i,"x1","50%"),m(i,"y1","0%"),m(i,"x2","50%"),m(i,"y2","100%"),m(i,"id","a"),m(u,"d","M46 3.119c23.683 0 42.881 19.198 42.881 42.881S69.683 88.881 46 88.881 3.119 69.683 3.119 46 22.317 3.119 46 3.119z"),m(u,"fill","#FFF"),m(f,"d","M46 0C20.595 0 0 20.595 0 46s20.595 46 46 46 46-20.595 46-46S71.405 0 46 0zm0 3.119c23.683 0 42.881 19.198 42.881 42.881S69.683 88.881 46 88.881 3.119 69.683 3.119 46 22.317 3.119 46 3.119z"),m(f,"fill","url(#a)"),m(s,"fill","none"),m(s,"fillrule","nonzero"),m(n,"class","buttonFrameEl"),m(n,"viewBox","0 0 92 92"),m(n,"xmlns","http://www.w3.org/2000/svg")},m(t,e){l(t,n,e),a(n,o),a(o,i),a(i,r),a(i,c),a(n,s),a(s,u),a(s,f)},p:t,i:t,o:t,d(t){t&&d(n)}}}"function"==typeof HTMLElement&&(H=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(e).filter(i);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){o(this.$$.on_disconnect)}$destroy(){!function(t,e){const n=t.$$;null!==n.fragment&&(o(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});customElements.define("mic-frame",class extends H{constructor(t){super(),this.shadowRoot.innerHTML="<style>svg{position:absolute;width:100%;height:100%;pointer-events:none;user-select:none;transform:rotate(var(--fx-rotation))}</style>",F(this,{target:this.shadowRoot,props:$(this.attributes),customElement:!0},null,T,r,{}),t&&t.target&&l(t.target,this,t.anchor)}});var I,V,j,G,O,q=(function(t,e){var n;Object.defineProperty(e,"__esModule",{value:!0}),(n=e.ClientState||(e.ClientState={}))[n.Failed=0]="Failed",n[n.NoBrowserSupport=1]="NoBrowserSupport",n[n.NoAudioConsent=2]="NoAudioConsent",n[n.Disconnected=3]="Disconnected",n[n.Disconnecting=4]="Disconnecting",n[n.Connecting=5]="Connecting",n[n.Connected=6]="Connected",n[n.Starting=7]="Starting",n[n.Stopping=8]="Stopping",n[n.Recording=9]="Recording"}(I={exports:{}},I.exports),I.exports);!function(t){t.Failed="Failed",t.NoBrowserSupport="NoBrowserSupport",t.NoAudioConsent="NoAudioConsent",t.Idle="Idle",t.Connecting="Connecting",t.Ready="Ready",t.Recording="Recording",t.Loading="Loading"}(V||(V={})),function(t){t.Poweron="poweron",t.Mic="mic",t.Error="error",t.Denied="denied"}(j||(j={})),function(t){t.Hold="hold",t.Click="click",t.Noninteractive="noninteractive"}(G||(G={})),function(t){t.None="none",t.Connecting="connecting",t.Busy="busy"}(O||(O={}));const U={[q.ClientState.Disconnected]:{icon:j.Poweron,behaviour:G.Click,effect:O.None},[q.ClientState.Disconnecting]:{icon:j.Poweron,behaviour:G.Noninteractive,effect:O.Connecting},[q.ClientState.Connecting]:{icon:j.Poweron,behaviour:G.Noninteractive,effect:O.Connecting},[q.ClientState.Connected]:{icon:j.Mic,behaviour:G.Hold,effect:O.None},[q.ClientState.Starting]:{icon:j.Mic,behaviour:G.Hold,effect:O.Connecting},[q.ClientState.Recording]:{icon:j.Mic,behaviour:G.Hold,effect:O.None},[q.ClientState.Stopping]:{icon:j.Mic,behaviour:G.Noninteractive,effect:O.Busy},[q.ClientState.Failed]:{icon:j.Error,behaviour:G.Click,effect:O.None},[q.ClientState.NoBrowserSupport]:{icon:j.Error,behaviour:G.Click,effect:O.None},[q.ClientState.NoAudioConsent]:{icon:j.Denied,behaviour:G.Click,effect:O.None},[V.Idle]:{icon:j.Poweron,behaviour:G.Click,effect:O.None},[V.Connecting]:{icon:j.Poweron,behaviour:G.Noninteractive,effect:O.Connecting},[V.Ready]:{icon:j.Mic,behaviour:G.Hold,effect:O.None},[V.Recording]:{icon:j.Mic,behaviour:G.Hold,effect:O.None},[V.Loading]:{icon:j.Mic,behaviour:G.Noninteractive,effect:O.Busy},[V.Failed]:{icon:j.Error,behaviour:G.Click,effect:O.None},[V.NoBrowserSupport]:{icon:j.Error,behaviour:G.Click,effect:O.None},[V.NoAudioConsent]:{icon:j.Denied,behaviour:G.Click,effect:O.None}};function J(t){let e,n,o,i;return{c(){e=h("svg"),n=h("g"),o=h("path"),i=h("rect"),m(o,"d","M42 26h4v4c0 9.265-7 16.895-16 17.89V55h-4v-7.11c-8.892-.982-15.833-8.444-15.997-17.56L10 30v-4h4v4c0 7.732 6.268 14 14 14 7.628 0 13.83-6.1 13.997-13.687L42 30v-4z"),m(i,"x","20"),m(i,"y","1"),m(i,"width","16"),m(i,"height","37"),m(i,"rx","8"),m(n,"fill","#000"),m(n,"fillrule","evenodd"),m(e,"class","buttonIconEl"),m(e,"viewBox","0 0 56 56"),m(e,"xmlns","http://www.w3.org/2000/svg")},m(t,r){l(t,e,r),a(e,n),a(n,o),a(n,i)},d(t){t&&d(e)}}}function K(t){let e,n,o,i;return{c(){e=h("svg"),n=h("g"),o=h("path"),i=h("path"),m(o,"d","M42 26h4v4c0 9.265-7 16.895-16 17.89V55h-4v-7.11c-8.892-.982-15.833-8.444-15.997-17.56L10 30v-4h4v4c0 7.732 6.268 14 14 14 7.628 0 13.83-6.1 13.997-13.687L42 30v-4z"),m(o,"fillrule","nonzero"),m(i,"d","M37 13.081V31a8 8 0 11-16 0v-1.919l16-16zM26 1a8 8 0 018 8v1.319L18 26.318V9a8 8 0 018-8zM37.969 7.932l3.74-7.35 3.018 2.625zM39.654 10.608l7.531-3.359.695 3.94z"),m(n,"fill","#000"),m(n,"fillrule","evenodd"),m(e,"class","buttonIconEl"),m(e,"viewBox","0 0 56 56"),m(e,"xmlns","http://www.w3.org/2000/svg")},m(t,r){l(t,e,r),a(e,n),a(n,o),a(n,i)},d(t){t&&d(e)}}}function Q(t){let e,n,o,i;return{c(){e=h("svg"),n=h("g"),o=h("path"),i=h("path"),m(o,"d","M36 14.828V30a8 8 0 01-15.961.79l15.96-15.962zM28 1a8 8 0 018 8v.172L20 25.173V9a8 8 0 018-8z"),m(i,"d","M42 26h4v4c0 9.265-7 16.895-16 17.89V55h-4v-7.11c-8.892-.982-15.833-8.444-15.997-17.56L10 30v-4h4v4c0 7.732 6.268 14 14 14 7.628 0 13.83-6.1 13.997-13.687L42 30v-4z"),m(n,"fill","#000"),m(n,"fillrule","nonzero"),m(e,"class","buttonIconEl"),m(e,"viewBox","0 0 56 56"),m(e,"xmlns","http://www.w3.org/2000/svg")},m(t,r){l(t,e,r),a(e,n),a(n,o),a(n,i)},d(t){t&&d(e)}}}function W(t){let e,n,o,i;return{c(){e=h("svg"),n=h("g"),o=h("path"),i=h("rect"),m(o,"d","M52 28c0 13.255-10.745 24-24 24S4 41.255 4 28c0-8.921 4.867-16.705 12.091-20.842l1.984 3.474C12.055 14.08 8 20.566 8 28c0 11.046 8.954 20 20 20s20-8.954 20-20c0-7.434-4.056-13.92-10.075-17.368L39.91 7.16C47.133 11.296 52 19.079 52 28z"),m(o,"fillrule","nonzero"),m(i,"x","24"),m(i,"y","1"),m(i,"width","8"),m(i,"height","23"),m(i,"rx","4"),m(n,"fill","#000"),m(n,"fillrule","evenodd"),m(e,"class","buttonIconEl"),m(e,"viewBox","0 0 56 56"),m(e,"xmlns","http://www.w3.org/2000/svg")},m(t,r){l(t,e,r),a(e,n),a(n,o),a(n,i)},d(t){t&&d(e)}}}function X(e){let n,o,i,r,c=e[0]===j.Mic&&J(),s=e[0]===j.Error&&K(),a=e[0]===j.Denied&&Q(),u=e[0]===j.Poweron&&W();return{c(){c&&c.c(),n=p(),s&&s.c(),o=p(),a&&a.c(),i=p(),u&&u.c(),r=f(""),this.c=t},m(t,e){c&&c.m(t,e),l(t,n,e),s&&s.m(t,e),l(t,o,e),a&&a.m(t,e),l(t,i,e),u&&u.m(t,e),l(t,r,e)},p(t,[e]){t[0]===j.Mic?c||(c=J(),c.c(),c.m(n.parentNode,n)):c&&(c.d(1),c=null),t[0]===j.Error?s||(s=K(),s.c(),s.m(o.parentNode,o)):s&&(s.d(1),s=null),t[0]===j.Denied?a||(a=Q(),a.c(),a.m(i.parentNode,i)):a&&(a.d(1),a=null),t[0]===j.Poweron?u||(u=W(),u.c(),u.m(r.parentNode,r)):u&&(u.d(1),u=null)},i:t,o:t,d(t){c&&c.d(t),t&&d(n),s&&s.d(t),t&&d(o),a&&a.d(t),t&&d(i),u&&u.d(t),t&&d(r)}}}function Y(t,e,n){let{icon:o=j.Mic}=e;return t.$$set=t=>{"icon"in t&&n(0,o=t.icon)},[o]}function Z(e){let n,o,i,r,c,s,u,f;return{c(){n=h("svg"),o=h("defs"),i=h("linearGradient"),r=h("stop"),c=h("stop"),s=h("filter"),u=h("feGaussianBlur"),f=h("circle"),this.c=t,m(r,"stop-color","var(--gradient-stop1)"),m(r,"offset","0%"),m(c,"stop-color","var(--gradient-stop2)"),m(c,"offset","100%"),m(i,"x1","50%"),m(i,"y1","10%"),m(i,"x2","50%"),m(i,"y2","100%"),m(i,"id","a"),m(u,"stdDeviation","18"),m(u,"in","SourceGraphic"),m(s,"x","-35%"),m(s,"y","-35%"),m(s,"width","170%"),m(s,"height","170%"),m(s,"filterUnits","objectBoundingBox"),m(s,"id","b"),m(f,"filter","url(#b)"),m(f,"cx","124"),m(f,"cy","124"),m(f,"r","79"),m(f,"fill","url(#a)"),m(f,"fillrule","evenodd"),m(n,"viewBox","0 0 246 246"),m(n,"xmlns","http://www.w3.org/2000/svg")},m(t,e){l(t,n,e),a(n,o),a(o,i),a(i,r),a(i,c),a(o,s),a(s,u),a(n,f)},p:t,i:t,o:t,d(t){t&&d(n)}}}customElements.define("mic-icon",class extends H{constructor(t){super(),this.shadowRoot.innerHTML="<style>svg{position:absolute;width:60%;height:60%;top:50%;left:50%;transform:translate(-50%, -50%);pointer-events:none;transition:0.25s}</style>",F(this,{target:this.shadowRoot,props:$(this.attributes),customElement:!0},Y,X,r,{icon:0}),t&&(t.target&&l(t.target,this,t.anchor),t.props&&(this.$set(t.props),L()))}static get observedAttributes(){return["icon"]}get icon(){return this.$$.ctx[0]}set icon(t){this.$set({icon:t}),L()}});customElements.define("mic-fx",class extends H{constructor(t){super(),this.shadowRoot.innerHTML="<style>svg{top:-75%;left:-75%;height:250%;width:250%;position:absolute;pointer-events:none;transform:rotate(var(--fx-rotation))}</style>",F(this,{target:this.shadowRoot,props:$(this.attributes),customElement:!0},null,Z,r,{}),t&&t.target&&l(t.target,this,t.anchor)}});const{window:tt}=P;function et(e){let n,i,r,c,s,h,f,$,b,y,x,C;return{c(){n=u("main"),i=u("div"),r=u("mic-fx"),c=p(),s=u("mic-frame"),h=p(),f=u("mic-icon"),b=p(),y=u("slot"),this.c=t,w(r,"opacity",e[6][1]),w(r,"transform","rotate("+e[3][1]+"deg)"),v(f,"icon",$=e[7].icon),w(f,"opacity",e[5][1]),m(i,"class","ButtonComponents"),w(i,"transform","scale("+e[4][1]+")"),w(n,"width",e[0]),w(n,"height",e[0]),w(n,"--gradient-stop1",e[1]),w(n,"--gradient-stop2",e[2]),w(n,"--fx-rotation",e[3][1]+"deg")},m(t,o){l(t,n,o),a(n,i),a(i,r),a(i,c),a(i,s),a(i,h),a(i,f),a(n,b),a(n,y),x||(C=[g(tt,"mouseup",e[9]),g(tt,"keydown",e[10]),g(tt,"keyup",e[11]),g(n,"mousedown",e[8]),g(n,"touchstart",e[8]),g(n,"dragstart",e[8]),g(n,"mouseup",e[9]),g(n,"touchend",e[9],{passive:!0}),g(n,"dragend",e[9])],x=!0)},p(t,[e]){64&e&&w(r,"opacity",t[6][1]),8&e&&w(r,"transform","rotate("+t[3][1]+"deg)"),128&e&&$!==($=t[7].icon)&&v(f,"icon",$),32&e&&w(f,"opacity",t[5][1]),16&e&&w(i,"transform","scale("+t[4][1]+")"),1&e&&w(n,"width",t[0]),1&e&&w(n,"height",t[0]),2&e&&w(n,"--gradient-stop1",t[1]),4&e&&w(n,"--gradient-stop2",t[2]),8&e&&w(n,"--fx-rotation",t[3][1]+"deg")},i:t,o:t,d(t){t&&d(n),x=!1,o(C)}}}function nt(t,e,n){let o,{icon:i=V.Idle}=e,{capturekey:r=" "}=e,{size:c="6rem"}=e,{gradientstop1:s="#15e8b5"}=e,{gradientstop2:a="#4fa1f9"}=e,{hide:l}=e,d=!1,u=0,h=[0,0],f=[0,0],p=[1,1],g=[0,0],m=U[i],v=null,w=0,$=0;const b=x(),y=(t,e)=>{b.dispatchEvent(new CustomEvent(t,{detail:e,composed:!0}))};!function(t){x().$$.on_mount.push(t)}((()=>{n(4,f=[1,0]);let t=null;const e=()=>{w=$,$=(new Date).getTime();const i=$-(w||$);m.effect===O.Connecting&&n(5,p[0]=.25*Math.cos($/2500*Math.PI*2)+.25,p),m.effect===O.Busy&&n(5,p[0]=.25*Math.cos($/1e3*Math.PI*2)+.25,p),n(4,f=[f[0],E(f[1],o?f[0]:0,.2,i)]),n(5,p=[p[0],E(p[1],p[0],.08,i)]),n(6,g=[g[0],E(g[1],g[0],.08,i)]),n(3,h=[h[0]+2.5,E(h[1],h[0],.05,i)]),t=requestAnimationFrame(e)};return e(),()=>cancelAnimationFrame(t)}));const C=t=>{t.preventDefault(),t.stopPropagation(),o&&!d&&(n(15,d=!0),u=Date.now(),n(4,f[0]=1.35,f),n(6,g[0]=1,g),M(),m.behaviour===G.Click&&(n(3,h[0]+=720,h),null===v&&(v=window.setTimeout((()=>{n(6,g[0]=0,g),v=null}),500))),b.onholdstart&&b.onholdstart(),y("holdstart"))},N=()=>{if(d){n(4,f[0]=1,f),n(6,g[0]=0,g),n(15,d=!1);const t={timeMs:Date.now()-u};M(),null!==v&&window.clearTimeout(v),b.onholdend&&b.onholdend(t),y("holdend",t)}},E=(t,e,n,o)=>t*(1-(n=Math.pow(n,1e3/60/o)))+e*n,M=(t=5)=>{void 0!==navigator.vibrate&&navigator.vibrate(t)};return t.$$set=t=>{"icon"in t&&n(12,i=t.icon),"capturekey"in t&&n(13,r=t.capturekey),"size"in t&&n(0,c=t.size),"gradientstop1"in t&&n(1,s=t.gradientstop1),"gradientstop2"in t&&n(2,a=t.gradientstop2),"hide"in t&&n(14,l=t.hide)},t.$$.update=()=>{16384&t.$$.dirty&&(o=void 0===l||"false"===l),36864&t.$$.dirty&&(d||(t=>{if(m!==t)switch(n(7,m=t),t.icon){case j.Mic:case j.Denied:case j.Error:n(5,p[0]=1,p)}})(U[i]))},[c,s,a,h,f,p,g,m,C,N,t=>{r&&(t.key===r&&(document.hasFocus()&&document.activeElement!==document.body&&document.activeElement!==document.documentElement&&document.activeElement||null||(t.repeat?(t.preventDefault(),t.stopPropagation()):C(t))))},t=>{t.key===r&&N()},i,r,l,d]}customElements.define("holdable-button",class extends H{constructor(t){super(),this.shadowRoot.innerHTML="<style>main{position:relative;pointer-events:auto;cursor:pointer;border-radius:50%;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none !important;-webkit-user-select:none !important}.ButtonComponents{width:100%;height:100%}</style>",F(this,{target:this.shadowRoot,props:$(this.attributes),customElement:!0},nt,et,r,{icon:12,capturekey:13,size:0,gradientstop1:1,gradientstop2:2,hide:14}),t&&(t.target&&l(t.target,this,t.anchor),t.props&&(this.$set(t.props),L()))}static get observedAttributes(){return["icon","capturekey","size","gradientstop1","gradientstop2","hide"]}get icon(){return this.$$.ctx[12]}set icon(t){this.$set({icon:t}),L()}get capturekey(){return this.$$.ctx[13]}set capturekey(t){this.$set({capturekey:t}),L()}get size(){return this.$$.ctx[0]}set size(t){this.$set({size:t}),L()}get gradientstop1(){return this.$$.ctx[1]}set gradientstop1(t){this.$set({gradientstop1:t}),L()}get gradientstop2(){return this.$$.ctx[2]}set gradientstop2(t){this.$set({gradientstop2:t}),L()}get hide(){return this.$$.ctx[14]}set hide(t){this.$set({hide:t}),L()}})}();
!function(){"use strict";function t(){}function e(t){return t()}function n(){return Object.create(null)}function o(t){t.forEach(e)}function i(t){return"function"==typeof t}function r(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function c(t,e){return t!=t?e==e:t!==e}function s(t){return 0===Object.keys(t).length}let a=!1;const l=new Set;function u(t,e){a&&l.delete(e),e.parentNode!==t&&t.appendChild(e)}function d(t,e,n){a&&l.delete(e),(e.parentNode!==t||n&&e.nextSibling!==n)&&t.insertBefore(e,n||null)}function f(t){a?l.add(t):t.parentNode&&t.parentNode.removeChild(t)}function p(t){return document.createElement(t)}function h(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function g(){return t=" ",document.createTextNode(t);var t}function m(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function $(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function v(t,e,n,o){t.style.setProperty(e,n,o?"important":"")}function w(t){const e={};for(const n of t)e[n.name]=n.value;return e}let b;function y(t){b=t}function x(){if(!b)throw new Error("Function called outside component initialization");return b}const C=[],k=[],N=[],S=[],E=Promise.resolve();let M=!1;function _(t){N.push(t)}let z=!1;const B=new Set;function D(){if(!z){z=!0;do{for(let t=0;t<C.length;t+=1){const e=C[t];y(e),L(e.$$)}for(y(null),C.length=0;k.length;)k.pop()();for(let t=0;t<N.length;t+=1){const e=N[t];B.has(e)||(B.add(e),e())}N.length=0}while(C.length);for(;S.length;)S.pop()();M=!1,z=!1,B.clear()}}function L(t){if(null!==t.fragment){t.update(),o(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(_)}}const P=new Set;function F(t,e){t&&t.i&&(P.delete(t),t.i(e))}function A(t,e,n,o){if(t&&t.o){if(P.has(t))return;P.add(t),undefined.c.push((()=>{P.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}const R="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function I(t){t&&t.c()}function H(t,n,r,c){const{fragment:s,on_mount:a,on_destroy:l,after_update:u}=t.$$;s&&s.m(n,r),c||_((()=>{const n=a.map(e).filter(i);l?l.push(...n):o(n),t.$$.on_mount=[]})),u.forEach(_)}function T(t,e){const n=t.$$;null!==n.fragment&&(o(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function V(t,e){-1===t.$$.dirty[0]&&(C.push(t),M||(M=!0,E.then(D)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function j(e,i,r,c,s,u,d=[-1]){const p=b;y(e);const h=e.$$={fragment:null,ctx:null,props:u,update:t,not_equal:s,bound:n(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(p?p.$$.context:i.context||[]),callbacks:n(),dirty:d,skip_bound:!1};let g=!1;if(h.ctx=r?r(e,i.props||{},((t,n,...o)=>{const i=o.length?o[0]:n;return h.ctx&&s(h.ctx[t],h.ctx[t]=i)&&(!h.skip_bound&&h.bound[t]&&h.bound[t](i),g&&V(e,t)),n})):[],h.update(),g=!0,o(h.before_update),h.fragment=!!c&&c(h.ctx),i.target){if(i.hydrate){a=!0;const t=function(t){return Array.from(t.childNodes)}(i.target);h.fragment&&h.fragment.l(t),t.forEach(f)}else h.fragment&&h.fragment.c();i.intro&&F(e.$$.fragment),H(e,i.target,i.anchor,i.customElement),function(){a=!1;for(const t of l)t.parentNode.removeChild(t);l.clear()}(),D()}y(p)}let O;"function"==typeof HTMLElement&&(O=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(e).filter(i);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){o(this.$$.on_disconnect)}$destroy(){T(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){this.$$set&&!s(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});class G{$destroy(){T(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){this.$$set&&!s(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}function q(e){let n,o,i,r,c,s,a,l;return{c(){n=h("svg"),o=h("defs"),i=h("linearGradient"),r=h("stop"),c=h("stop"),s=h("g"),a=h("path"),l=h("path"),$(r,"stop-color","var(--gradient-stop1)"),$(r,"offset","0%"),$(c,"stop-color","var(--gradient-stop2)"),$(c,"offset","100%"),$(i,"x1","50%"),$(i,"y1","0%"),$(i,"x2","50%"),$(i,"y2","100%"),$(i,"id","a"),$(a,"d","M46 3.119c23.683 0 42.881 19.198 42.881 42.881S69.683 88.881 46 88.881 3.119 69.683 3.119 46 22.317 3.119 46 3.119z"),$(a,"fill","#FFF"),$(l,"d","M46 0C20.595 0 0 20.595 0 46s20.595 46 46 46 46-20.595 46-46S71.405 0 46 0zm0 3.119c23.683 0 42.881 19.198 42.881 42.881S69.683 88.881 46 88.881 3.119 69.683 3.119 46 22.317 3.119 46 3.119z"),$(l,"fill","url(#a)"),$(s,"fill","none"),$(s,"fillrule","nonzero"),$(n,"class","buttonFrameEl"),$(n,"viewBox","0 0 92 92"),$(n,"xmlns","http://www.w3.org/2000/svg"),v(n,"position","absolute"),v(n,"width","100%"),v(n,"height","100%"),v(n,"pointer-events","none"),v(n,"user-select","none"),v(n,"transform","rotate(var(--fx-rotation))")},m(t,e){d(t,n,e),u(n,o),u(o,i),u(i,r),u(i,c),u(n,s),u(s,a),u(s,l)},p:t,i:t,o:t,d(t){t&&f(n)}}}class U extends G{constructor(t){super(),j(this,t,null,q,c,{})}}var J,K,Q,W,X,Y=(function(t,e){var n;Object.defineProperty(e,"__esModule",{value:!0}),(n=e.ClientState||(e.ClientState={}))[n.Failed=0]="Failed",n[n.NoBrowserSupport=1]="NoBrowserSupport",n[n.NoAudioConsent=2]="NoAudioConsent",n[n.Disconnected=3]="Disconnected",n[n.Disconnecting=4]="Disconnecting",n[n.Connecting=5]="Connecting",n[n.Connected=6]="Connected",n[n.Starting=7]="Starting",n[n.Stopping=8]="Stopping",n[n.Recording=9]="Recording"}(J={exports:{}},J.exports),J.exports);!function(t){t.Failed="Failed",t.NoBrowserSupport="NoBrowserSupport",t.NoAudioConsent="NoAudioConsent",t.Idle="Idle",t.Connecting="Connecting",t.Ready="Ready",t.Recording="Recording",t.Loading="Loading"}(K||(K={})),function(t){t.Poweron="poweron",t.Mic="mic",t.Error="error",t.Denied="denied"}(Q||(Q={})),function(t){t.Hold="hold",t.Click="click",t.Noninteractive="noninteractive"}(W||(W={})),function(t){t.None="none",t.Connecting="connecting",t.Busy="busy"}(X||(X={}));const Z={[Y.ClientState.Disconnected]:{icon:Q.Poweron,behaviour:W.Click,effect:X.None},[Y.ClientState.Disconnecting]:{icon:Q.Poweron,behaviour:W.Noninteractive,effect:X.Connecting},[Y.ClientState.Connecting]:{icon:Q.Poweron,behaviour:W.Noninteractive,effect:X.Connecting},[Y.ClientState.Connected]:{icon:Q.Mic,behaviour:W.Hold,effect:X.None},[Y.ClientState.Starting]:{icon:Q.Mic,behaviour:W.Hold,effect:X.Connecting},[Y.ClientState.Recording]:{icon:Q.Mic,behaviour:W.Hold,effect:X.None},[Y.ClientState.Stopping]:{icon:Q.Mic,behaviour:W.Noninteractive,effect:X.Busy},[Y.ClientState.Failed]:{icon:Q.Error,behaviour:W.Click,effect:X.None},[Y.ClientState.NoBrowserSupport]:{icon:Q.Error,behaviour:W.Click,effect:X.None},[Y.ClientState.NoAudioConsent]:{icon:Q.Denied,behaviour:W.Click,effect:X.None},[K.Idle]:{icon:Q.Poweron,behaviour:W.Click,effect:X.None},[K.Connecting]:{icon:Q.Poweron,behaviour:W.Noninteractive,effect:X.Connecting},[K.Ready]:{icon:Q.Mic,behaviour:W.Hold,effect:X.None},[K.Recording]:{icon:Q.Mic,behaviour:W.Hold,effect:X.None},[K.Loading]:{icon:Q.Mic,behaviour:W.Noninteractive,effect:X.Busy},[K.Failed]:{icon:Q.Error,behaviour:W.Click,effect:X.None},[K.NoBrowserSupport]:{icon:Q.Error,behaviour:W.Click,effect:X.None},[K.NoAudioConsent]:{icon:Q.Denied,behaviour:W.Click,effect:X.None}};function tt(t){let e,n,o,i;return{c(){e=h("svg"),n=h("g"),o=h("path"),i=h("rect"),$(o,"d","M42 26h4v4c0 9.265-7 16.895-16 17.89V55h-4v-7.11c-8.892-.982-15.833-8.444-15.997-17.56L10 30v-4h4v4c0 7.732 6.268 14 14 14 7.628 0 13.83-6.1 13.997-13.687L42 30v-4z"),$(i,"x","20"),$(i,"y","1"),$(i,"width","16"),$(i,"height","37"),$(i,"rx","8"),$(n,"fill","#000"),$(n,"fill-rule","evenodd"),$(e,"class","buttonIconEl"),$(e,"viewBox","0 0 56 56"),$(e,"xmlns","http://www.w3.org/2000/svg")},m(t,r){d(t,e,r),u(e,n),u(n,o),u(n,i)},d(t){t&&f(e)}}}function et(t){let e,n,o,i;return{c(){e=h("svg"),n=h("g"),o=h("path"),i=h("path"),$(o,"d","M42 26h4v4c0 9.265-7 16.895-16 17.89V55h-4v-7.11c-8.892-.982-15.833-8.444-15.997-17.56L10 30v-4h4v4c0 7.732 6.268 14 14 14 7.628 0 13.83-6.1 13.997-13.687L42 30v-4z"),$(o,"fill-rule","nonzero"),$(i,"d","M37 13.081V31a8 8 0 11-16 0v-1.919l16-16zM26 1a8 8 0 018 8v1.319L18 26.318V9a8 8 0 018-8zM37.969 7.932l3.74-7.35 3.018 2.625zM39.654 10.608l7.531-3.359.695 3.94z"),$(n,"fill","#000"),$(n,"fill-rule","evenodd"),$(e,"class","buttonIconEl"),$(e,"viewBox","0 0 56 56"),$(e,"xmlns","http://www.w3.org/2000/svg")},m(t,r){d(t,e,r),u(e,n),u(n,o),u(n,i)},d(t){t&&f(e)}}}function nt(t){let e,n,o,i;return{c(){e=h("svg"),n=h("g"),o=h("path"),i=h("path"),$(o,"d","M36 14.828V30a8 8 0 01-15.961.79l15.96-15.962zM28 1a8 8 0 018 8v.172L20 25.173V9a8 8 0 018-8z"),$(i,"d","M42 26h4v4c0 9.265-7 16.895-16 17.89V55h-4v-7.11c-8.892-.982-15.833-8.444-15.997-17.56L10 30v-4h4v4c0 7.732 6.268 14 14 14 7.628 0 13.83-6.1 13.997-13.687L42 30v-4z"),$(n,"fill","#000"),$(n,"fill-rule","nonzero"),$(e,"class","buttonIconEl"),$(e,"viewBox","0 0 56 56"),$(e,"xmlns","http://www.w3.org/2000/svg")},m(t,r){d(t,e,r),u(e,n),u(n,o),u(n,i)},d(t){t&&f(e)}}}function ot(t){let e,n,o,i;return{c(){e=h("svg"),n=h("g"),o=h("path"),i=h("rect"),$(o,"d","M52 28c0 13.255-10.745 24-24 24S4 41.255 4 28c0-8.921 4.867-16.705 12.091-20.842l1.984 3.474C12.055 14.08 8 20.566 8 28c0 11.046 8.954 20 20 20s20-8.954 20-20c0-7.434-4.056-13.92-10.075-17.368L39.91 7.16C47.133 11.296 52 19.079 52 28z"),$(o,"fill-rule","nonzero"),$(i,"x","24"),$(i,"y","1"),$(i,"width","8"),$(i,"height","23"),$(i,"rx","4"),$(n,"fill","#000"),$(n,"fill-rule","evenodd"),$(e,"class","buttonIconEl"),$(e,"viewBox","0 0 56 56"),$(e,"xmlns","http://www.w3.org/2000/svg")},m(t,r){d(t,e,r),u(e,n),u(n,o),u(n,i)},d(t){t&&f(e)}}}function it(e){let n,o,i,r,c=e[0]===Q.Mic&&tt(),s=e[0]===Q.Error&&et(),a=e[0]===Q.Denied&&nt(),l=e[0]===Q.Poweron&&ot();return{c(){n=p("div"),c&&c.c(),o=g(),s&&s.c(),i=g(),a&&a.c(),r=g(),l&&l.c(),v(n,"position","absolute"),v(n,"width","60%"),v(n,"height","60%"),v(n,"top","50%"),v(n,"left","50%"),v(n,"transform","translate(-50%, -50%)"),v(n,"pointer-events","none"),v(n,"transition","0.25s"),v(n,"opacity","var(--icon-opacity)")},m(t,e){d(t,n,e),c&&c.m(n,null),u(n,o),s&&s.m(n,null),u(n,i),a&&a.m(n,null),u(n,r),l&&l.m(n,null)},p(t,[e]){t[0]===Q.Mic?c||(c=tt(),c.c(),c.m(n,o)):c&&(c.d(1),c=null),t[0]===Q.Error?s||(s=et(),s.c(),s.m(n,i)):s&&(s.d(1),s=null),t[0]===Q.Denied?a||(a=nt(),a.c(),a.m(n,r)):a&&(a.d(1),a=null),t[0]===Q.Poweron?l||(l=ot(),l.c(),l.m(n,null)):l&&(l.d(1),l=null)},i:t,o:t,d(t){t&&f(n),c&&c.d(),s&&s.d(),a&&a.d(),l&&l.d()}}}function rt(t,e,n){let{icon:o=Q.Mic}=e;return t.$$set=t=>{"icon"in t&&n(0,o=t.icon)},[o]}class ct extends G{constructor(t){super(),j(this,t,rt,it,r,{icon:0})}}function st(e){let n,o,i,r,c,s,a,l;return{c(){n=h("svg"),o=h("defs"),i=h("linearGradient"),r=h("stop"),c=h("stop"),s=h("filter"),a=h("feGaussianBlur"),l=h("circle"),$(r,"stop-color","var(--gradient-stop1)"),$(r,"offset","0%"),$(c,"stop-color","var(--gradient-stop2)"),$(c,"offset","100%"),$(i,"x1","50%"),$(i,"y1","10%"),$(i,"x2","50%"),$(i,"y2","100%"),$(i,"id","a"),$(a,"stdDeviation","18"),$(a,"in","SourceGraphic"),$(s,"x","-35%"),$(s,"y","-35%"),$(s,"width","170%"),$(s,"height","170%"),$(s,"filterUnits","objectBoundingBox"),$(s,"id","b"),$(l,"filter","url(#b)"),$(l,"cx","124"),$(l,"cy","124"),$(l,"r","79"),$(l,"fill","url(#a)"),$(l,"fillrule","evenodd"),$(n,"viewBox","0 0 246 246"),$(n,"xmlns","http://www.w3.org/2000/svg"),v(n,"top","-75%"),v(n,"left","-75%"),v(n,"height","250%"),v(n,"width","250%"),v(n,"position","absolute"),v(n,"pointer-events","none"),v(n,"opacity","var(--fx-opacity)"),v(n,"transform","rotate(var(--fx-rotation))")},m(t,e){d(t,n,e),u(n,o),u(o,i),u(i,r),u(i,c),u(o,s),u(s,a),u(n,l)},p:t,i:t,o:t,d(t){t&&f(n)}}}class at extends G{constructor(t){super(),j(this,t,null,st,r,{})}}const{window:lt}=R;function ut(e){let n,i,r,c,s,a,l,h,w,b,y,x;return r=new at({}),s=new U({}),l=new ct({props:{icon:e[7].icon}}),{c(){n=p("main"),i=p("div"),I(r.$$.fragment),c=g(),I(s.$$.fragment),a=g(),I(l.$$.fragment),h=g(),w=p("slot"),this.c=t,$(i,"class","ButtonComponents"),v(i,"transform","scale("+e[4][1]+")"),v(n,"width",e[0]),v(n,"height",e[0]),v(n,"--gradient-stop1",e[1]),v(n,"--gradient-stop2",e[2]),v(n,"--fx-rotation",e[3][1]+"deg"),v(n,"--fx-opacity",e[6][1]),v(n,"--icon-opacity",e[5][1])},m(t,o){d(t,n,o),u(n,i),H(r,i,null),u(i,c),H(s,i,null),u(i,a),H(l,i,null),u(n,h),u(n,w),b=!0,y||(x=[m(lt,"mouseup",e[9]),m(lt,"keydown",e[10]),m(lt,"keyup",e[11]),m(n,"mousedown",e[8]),m(n,"touchstart",e[8]),m(n,"dragstart",e[8]),m(n,"mouseup",e[9]),m(n,"touchend",e[9],{passive:!0}),m(n,"dragend",e[9])],y=!0)},p(t,[e]){const o={};128&e&&(o.icon=t[7].icon),l.$set(o),(!b||16&e)&&v(i,"transform","scale("+t[4][1]+")"),(!b||1&e)&&v(n,"width",t[0]),(!b||1&e)&&v(n,"height",t[0]),(!b||2&e)&&v(n,"--gradient-stop1",t[1]),(!b||4&e)&&v(n,"--gradient-stop2",t[2]),(!b||8&e)&&v(n,"--fx-rotation",t[3][1]+"deg"),(!b||64&e)&&v(n,"--fx-opacity",t[6][1]),(!b||32&e)&&v(n,"--icon-opacity",t[5][1])},i(t){b||(F(r.$$.fragment,t),F(s.$$.fragment,t),F(l.$$.fragment,t),b=!0)},o(t){A(r.$$.fragment,t),A(s.$$.fragment,t),A(l.$$.fragment,t),b=!1},d(t){t&&f(n),T(r),T(s),T(l),y=!1,o(x)}}}function dt(t,e,n){let o,{icon:i=K.Idle}=e,{capturekey:r=" "}=e,{size:c="6rem"}=e,{gradientstop1:s="#15e8b5"}=e,{gradientstop2:a="#4fa1f9"}=e,{hide:l}=e,u=!1,d=0,f=[0,0],p=[0,0],h=[1,1],g=[0,0],m=Z[i],$=null,v=0,w=0;const b=x(),y=(t,e)=>{b.dispatchEvent(new CustomEvent(t,{detail:e,composed:!0}))};!function(t){x().$$.on_mount.push(t)}((()=>{n(4,p=[1,0]);let t=null;const e=()=>{v=w,w=(new Date).getTime();const i=w-(v||w);m.effect===X.Connecting&&n(5,h[0]=.25*Math.cos(w/2500*Math.PI*2)+.25,h),m.effect===X.Busy&&n(5,h[0]=.25*Math.cos(w/1e3*Math.PI*2)+.25,h),n(4,p=[p[0],N(p[1],o?p[0]:0,.2,i)]),n(5,h=[h[0],N(h[1],h[0],.08,i)]),n(6,g=[g[0],N(g[1],g[0],.08,i)]),n(3,f=[f[0]+2.5,N(f[1],f[0],.05,i)]),t=requestAnimationFrame(e)};return e(),()=>cancelAnimationFrame(t)}));const C=t=>{t.preventDefault(),t.stopPropagation(),o&&!u&&(n(15,u=!0),d=Date.now(),n(4,p[0]=1.35,p),n(6,g[0]=1,g),S(),m.behaviour===W.Click&&(n(3,f[0]+=720,f),null===$&&($=window.setTimeout((()=>{n(6,g[0]=0,g),$=null}),500))),b.onholdstart&&b.onholdstart(),y("holdstart"))},k=()=>{if(u){n(4,p[0]=1,p),n(6,g[0]=0,g),n(15,u=!1);const t={timeMs:Date.now()-d};S(),null!==$&&window.clearTimeout($),b.onholdend&&b.onholdend(t),y("holdend",t)}},N=(t,e,n,o)=>t*(1-(n=Math.pow(n,1e3/60/o)))+e*n,S=(t=5)=>{void 0!==navigator.vibrate&&navigator.vibrate(t)};return t.$$set=t=>{"icon"in t&&n(12,i=t.icon),"capturekey"in t&&n(13,r=t.capturekey),"size"in t&&n(0,c=t.size),"gradientstop1"in t&&n(1,s=t.gradientstop1),"gradientstop2"in t&&n(2,a=t.gradientstop2),"hide"in t&&n(14,l=t.hide)},t.$$.update=()=>{16384&t.$$.dirty&&(o=void 0===l||"false"===l),36864&t.$$.dirty&&(u||(t=>{if(m!==t)switch(n(7,m=t),t.icon){case Q.Mic:case Q.Denied:case Q.Error:n(5,h[0]=1,h)}})(Z[i]))},[c,s,a,f,p,h,g,m,C,k,t=>{r&&(t.key===r&&(document.hasFocus()&&document.activeElement!==document.body&&document.activeElement!==document.documentElement&&document.activeElement||null||(t.repeat?(t.preventDefault(),t.stopPropagation()):C(t))))},t=>{t.key===r&&k()},i,r,l,u]}class ft extends O{constructor(t){super(),this.shadowRoot.innerHTML="<style>main{position:relative;pointer-events:auto;cursor:pointer;border-radius:50%;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none !important;-webkit-user-select:none !important}.ButtonComponents{width:100%;height:100%}</style>",j(this,{target:this.shadowRoot,props:w(this.attributes),customElement:!0},dt,ut,c,{icon:12,capturekey:13,size:0,gradientstop1:1,gradientstop2:2,hide:14}),t&&(t.target&&d(t.target,this,t.anchor),t.props&&(this.$set(t.props),D()))}static get observedAttributes(){return["icon","capturekey","size","gradientstop1","gradientstop2","hide"]}get icon(){return this.$$.ctx[12]}set icon(t){this.$set({icon:t}),D()}get capturekey(){return this.$$.ctx[13]}set capturekey(t){this.$set({capturekey:t}),D()}get size(){return this.$$.ctx[0]}set size(t){this.$set({size:t}),D()}get gradientstop1(){return this.$$.ctx[1]}set gradientstop1(t){this.$set({gradientstop1:t}),D()}get gradientstop2(){return this.$$.ctx[2]}set gradientstop2(t){this.$set({gradientstop2:t}),D()}get hide(){return this.$$.ctx[14]}set hide(t){this.$set({hide:t}),D()}}customElements.get("holdable-button")?console.warn("Skipping re-defining customElement holdable-button"):customElements.define("holdable-button",ft)}();
//# sourceMappingURL=holdable-button.js.map
{
"name": "@speechly/browser-ui",
"version": "1.3.0",
"version": "1.3.1",
"files": [

@@ -5,0 +5,0 @@ "**/*"

@@ -1,2 +0,2 @@

!function(){"use strict";function t(){}const e=t=>t;function n(t,e){for(const n in e)t[n]=e[n];return t}function o(t){return t()}function i(){return Object.create(null)}function r(t){t.forEach(o)}function s(t){return"function"==typeof t}function c(t,e){return t!=t?e==e:t!==e}function l(e,n,o){e.$$.on_destroy.push(function(e,...n){if(null==e)return t;const o=e.subscribe(...n);return o.unsubscribe?()=>o.unsubscribe():o}(n,o))}const a="undefined"!=typeof window;let u=a?()=>window.performance.now():()=>Date.now(),d=a?t=>requestAnimationFrame(t):t;const f=new Set;function h(t){f.forEach((e=>{e.c(t)||(f.delete(e),e.f())})),0!==f.size&&d(h)}function g(t){let e;return 0===f.size&&d(h),{promise:new Promise((n=>{f.add(e={c:t,f:n})})),abort(){f.delete(e)}}}let p=!1;const m=new Set;function y(t,e){p&&m.delete(e),e.parentNode!==t&&t.appendChild(e)}function b(t,e,n){p&&m.delete(e),(e.parentNode!==t||n&&e.nextSibling!==n)&&t.insertBefore(e,n||null)}function w(t){p?m.add(t):t.parentNode&&t.parentNode.removeChild(t)}function v(t){return document.createElement(t)}function $(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function x(t){return document.createTextNode(t)}function C(){return x(" ")}function k(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function E(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function S(t,e,n){e in t?t[e]="boolean"==typeof t[e]&&""===n||n:E(t,e,n)}function _(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function T(t,e,n,o){t.style.setProperty(e,n,o?"important":"")}function N(t,e,n){t.classList[n?"add":"remove"](e)}function P(t){const e={};for(const n of t)e[n.name]=n.value;return e}const R=new Set;let M,A=0;function z(t,e,n,o,i,r,s,c=0){const l=16.666/o;let a="{\n";for(let t=0;t<=1;t+=l){const o=e+(n-e)*r(t);a+=100*t+`%{${s(o,1-o)}}\n`}const u=a+`100% {${s(n,1-n)}}\n}`,d=`__svelte_${function(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}(u)}_${c}`,f=t.ownerDocument;R.add(f);const h=f.__svelte_stylesheet||(f.__svelte_stylesheet=f.head.appendChild(v("style")).sheet),g=f.__svelte_rules||(f.__svelte_rules={});g[d]||(g[d]=!0,h.insertRule(`@keyframes ${d} ${u}`,h.cssRules.length));const p=t.style.animation||"";return t.style.animation=`${p?`${p}, `:""}${d} ${o}ms linear ${i}ms 1 both`,A+=1,d}function D(t,e){const n=(t.style.animation||"").split(", "),o=n.filter(e?t=>t.indexOf(e)<0:t=>-1===t.indexOf("__svelte")),i=n.length-o.length;i&&(t.style.animation=o.join(", "),A-=i,A||d((()=>{A||(R.forEach((t=>{const e=t.__svelte_stylesheet;let n=e.cssRules.length;for(;n--;)e.deleteRule(n);t.__svelte_rules={}})),R.clear())})))}function B(t){M=t}function F(){if(!M)throw new Error("Function called outside component initialization");return M}function I(t){F().$$.on_mount.push(t)}const L=[],j=[],O=[],H=[],V=Promise.resolve();let U=!1;function q(t){O.push(t)}let W=!1;const G=new Set;function J(){if(!W){W=!0;do{for(let t=0;t<L.length;t+=1){const e=L[t];B(e),K(e.$$)}for(B(null),L.length=0;j.length;)j.pop()();for(let t=0;t<O.length;t+=1){const e=O[t];G.has(e)||(G.add(e),e())}O.length=0}while(L.length);for(;H.length;)H.pop()();U=!1,W=!1,G.clear()}}function K(t){if(null!==t.fragment){t.update(),r(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(q)}}let Q;function X(){return Q||(Q=Promise.resolve(),Q.then((()=>{Q=null}))),Q}function Y(t,e,n){t.dispatchEvent(function(t,e){const n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!1,!1,e),n}(`${e?"intro":"outro"}${n}`))}const Z=new Set;let tt;function et(t,e){t&&t.i&&(Z.delete(t),t.i(e))}function nt(t,e,n,o){if(t&&t.o){if(Z.has(t))return;Z.add(t),tt.c.push((()=>{Z.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}const ot={duration:0};function it(n,o,i){let r,c,l=o(n,i),a=!1,d=0;function f(){r&&D(n,r)}function h(){const{delay:o=0,duration:i=300,easing:s=e,tick:h=t,css:p}=l||ot;p&&(r=z(n,0,1,i,o,s,p,d++)),h(0,1);const m=u()+o,y=m+i;c&&c.abort(),a=!0,q((()=>Y(n,!0,"start"))),c=g((t=>{if(a){if(t>=y)return h(1,0),Y(n,!0,"end"),f(),a=!1;if(t>=m){const e=s((t-m)/i);h(e,1-e)}}return a}))}let p=!1;return{start(){p||(D(n),s(l)?(l=l(),X().then(h)):h())},invalidate(){p=!1},end(){a&&(f(),a=!1)}}}const rt="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function st(t,e){-1===t.$$.dirty[0]&&(L.push(t),U||(U=!0,V.then(J)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function ct(e,n,c,l,a,u,d=[-1]){const f=M;B(e);const h=e.$$={fragment:null,ctx:null,props:u,update:t,not_equal:a,bound:i(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(f?f.$$.context:n.context||[]),callbacks:i(),dirty:d,skip_bound:!1};let g=!1;if(h.ctx=c?c(e,n.props||{},((t,n,...o)=>{const i=o.length?o[0]:n;return h.ctx&&a(h.ctx[t],h.ctx[t]=i)&&(!h.skip_bound&&h.bound[t]&&h.bound[t](i),g&&st(e,t)),n})):[],h.update(),g=!0,r(h.before_update),h.fragment=!!l&&l(h.ctx),n.target){if(n.hydrate){p=!0;const t=function(t){return Array.from(t.childNodes)}(n.target);h.fragment&&h.fragment.l(t),t.forEach(w)}else h.fragment&&h.fragment.c();n.intro&&et(e.$$.fragment),function(t,e,n,i){const{fragment:c,on_mount:l,on_destroy:a,after_update:u}=t.$$;c&&c.m(e,n),i||q((()=>{const e=l.map(o).filter(s);a?a.push(...e):r(e),t.$$.on_mount=[]})),u.forEach(q)}(e,n.target,n.anchor,n.customElement),function(){p=!1;for(const t of m)t.parentNode.removeChild(t);m.clear()}(),J()}B(f)}let lt;function at(t){return t<.5?4*t*t*t:.5*Math.pow(2*t-2,3)+1}function ut(t){return t*t*t}function dt(t){const e=t-1;return e*e*e+1}"function"==typeof HTMLElement&&(lt=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(o).filter(s);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){r(this.$$.on_disconnect)}$destroy(){!function(t,e){const n=t.$$;null!==n.fragment&&(r(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});const ft=[];function ht(t){return"[object Date]"===Object.prototype.toString.call(t)}function gt(t,e){if(t===e||t!=t)return()=>t;const n=typeof t;if(n!==typeof e||Array.isArray(t)!==Array.isArray(e))throw new Error("Cannot interpolate values of different type");if(Array.isArray(t)){const n=e.map(((e,n)=>gt(t[n],e)));return t=>n.map((e=>e(t)))}if("object"===n){if(!t||!e)throw new Error("Object cannot be null");if(ht(t)&&ht(e)){t=t.getTime();const n=(e=e.getTime())-t;return e=>new Date(t+e*n)}const n=Object.keys(e),o={};return n.forEach((n=>{o[n]=gt(t[n],e[n])})),t=>{const e={};return n.forEach((n=>{e[n]=o[n](t)})),e}}if("number"===n){const n=e-t;return e=>t+e*n}throw new Error(`Cannot interpolate ${n} values`)}function pt(o,i={}){const r=function(e,n=t){let o;const i=[];function r(t){if(r=t,((n=e)!=n?r==r:n!==r||n&&"object"==typeof n||"function"==typeof n)&&(e=t,o)){const t=!ft.length;for(let t=0;t<i.length;t+=1){const n=i[t];n[1](),ft.push(n,e)}if(t){for(let t=0;t<ft.length;t+=2)ft[t][0](ft[t+1]);ft.length=0}}var n,r}return{set:r,update:function(t){r(t(e))},subscribe:function(s,c=t){const l=[s,c];return i.push(l),1===i.length&&(o=n(r)||t),s(e),()=>{const t=i.indexOf(l);-1!==t&&i.splice(t,1),0===i.length&&(o(),o=null)}}}}(o);let s,c=o;function l(t,l){if(null==o)return r.set(o=t),Promise.resolve();c=t;let a=s,d=!1,{delay:f=0,duration:h=400,easing:p=e,interpolate:m=gt}=n(n({},i),l);if(0===h)return a&&(a.abort(),a=null),r.set(o=c),Promise.resolve();const y=u()+f;let b;return s=g((e=>{if(e<y)return!0;d||(b=m(o,t),"function"==typeof h&&(h=h(o,t)),d=!0),a&&(a.abort(),a=null);const n=e-y;return n>h?(r.set(o=t),!1):(r.set(o=b(p(n/h))),!0)})),s.promise}return{set:l,update:(t,e)=>l(t(c,o),e),subscribe:r.subscribe}}var mt,yt,bt,wt,vt,$t=(function(t,e){var n;Object.defineProperty(e,"__esModule",{value:!0}),(n=e.ClientState||(e.ClientState={}))[n.Failed=0]="Failed",n[n.NoBrowserSupport=1]="NoBrowserSupport",n[n.NoAudioConsent=2]="NoAudioConsent",n[n.Disconnected=3]="Disconnected",n[n.Disconnecting=4]="Disconnecting",n[n.Connecting=5]="Connecting",n[n.Connected=6]="Connected",n[n.Starting=7]="Starting",n[n.Stopping=8]="Stopping",n[n.Recording=9]="Recording"}(mt={exports:{}},mt.exports),mt.exports);function xt(t){return function(e,n){if(!e.hasOwnProperty("ownerDocument")){Object.defineProperty(e,"ownerDocument",{get:function(){return e.parentElement}});let t=e;for(;t.parentElement;)t=t.parentElement;e.parentElement.head=t}return t(e,n)}}function Ct(t,{delay:e=0,speed:n,duration:o,easing:i=at}={}){const r=t.getTotalLength();return void 0===o?o=void 0===n?800:r/n:"function"==typeof o&&(o=o(r)),{delay:e,duration:o,easing:i,css:(t,e)=>`stroke-dasharray: ${t*r} ${e*r}`}}!function(t){t.Failed="Failed",t.NoBrowserSupport="NoBrowserSupport",t.NoAudioConsent="NoAudioConsent",t.Idle="Idle",t.Connecting="Connecting",t.Ready="Ready",t.Recording="Recording",t.Loading="Loading"}(yt||(yt={})),function(t){t.Poweron="poweron",t.Mic="mic",t.Error="error",t.Denied="denied"}(bt||(bt={})),function(t){t.Hold="hold",t.Click="click",t.Noninteractive="noninteractive"}(wt||(wt={})),function(t){t.None="none",t.Connecting="connecting",t.Busy="busy"}(vt||(vt={})),$t.ClientState.Disconnected,bt.Poweron,wt.Click,vt.None,$t.ClientState.Disconnecting,bt.Poweron,wt.Noninteractive,vt.Connecting,$t.ClientState.Connecting,bt.Poweron,wt.Noninteractive,vt.Connecting,$t.ClientState.Connected,bt.Mic,wt.Hold,vt.None,$t.ClientState.Starting,bt.Mic,wt.Hold,vt.Connecting,$t.ClientState.Recording,bt.Mic,wt.Hold,vt.None,$t.ClientState.Stopping,bt.Mic,wt.Noninteractive,vt.Busy,$t.ClientState.Failed,bt.Error,wt.Click,vt.None,$t.ClientState.NoBrowserSupport,bt.Error,wt.Click,vt.None,$t.ClientState.NoAudioConsent,bt.Denied,wt.Click,vt.None,yt.Idle,bt.Poweron,wt.Click,vt.None,yt.Connecting,bt.Poweron,wt.Noninteractive,vt.Connecting,yt.Ready,bt.Mic,wt.Hold,vt.None,yt.Recording,bt.Mic,wt.Hold,vt.None,yt.Loading,bt.Mic,wt.Noninteractive,vt.Busy,yt.Failed,bt.Error,wt.Click,vt.None,yt.NoBrowserSupport,bt.Error,wt.Click,vt.None,yt.NoAudioConsent,bt.Denied,wt.Click,vt.None;const kt=[0,1];function Et(t,e,n,o){if(e<n)return t[0];if(e>o)return t[t.length-1];let i=(o-n)/(t.length-1);if(i<=0)return t[0];let r=(e-n)/i,s=Math.floor(r),c=Math.ceil(r),l=r-s;return(1-l)*t[s]+l*t[c]}function St(e){let n;return{c(){n=v("canvas"),this.c=t,T(n,"color",e[0])},m(t,o){b(t,n,o),e[2](n)},p(t,[e]){1&e&&T(n,"color",t[0])},i:t,o:t,d(t){t&&w(n),e[2](null)}}}function _t(t,e,n){let o,{color:i="#60e0ff"}=e,r=0,s=0,c=[0,0];const l=F(),a=(t,e,n,o,i,r)=>{o<2*r&&(r=o/2),i<2*r&&(r=i/2),t.beginPath(),t.moveTo(e+r,n),t.arcTo(e+o,n,e+o,n+i,r),t.arcTo(e+o,n+i,e,n+i,r),t.arcTo(e,n+i,e,n,r),t.arcTo(e,n,e+o,n,r),t.closePath()};return I((()=>{let t;const e=2*(c.length-1)+1,i=3*e+1*(e-1),u=(t,e)=>{r=Date.now()>s?t:Math.max(r,t),s=Date.now()+e},d=()=>{if(t=requestAnimationFrame(d),!o)return;const e=o.getContext("2d");if(!e)return;let l=(t=>{var e=t.backingStorePixelRatio||t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return(window.devicePixelRatio||1)/e})(e),u=Number.parseInt(getComputedStyle(o).getPropertyValue("width").slice(0,-2)),f=Number.parseInt(getComputedStyle(o).getPropertyValue("height").slice(0,-2));n(1,o.width=u*l,o),n(1,o.height=f*l,o),Date.now()<s?c[0]=.15*r+.85*c[0]:c[0]=.0625+.75*c[0];let h=1;for(;h<c.length;)c[h]=.25*c[h-1]+.5*c[h]+.0625,h++;e.clearRect(0,0,o.width,o.height);const g=3/i*o.width*.5,p=4/i*o.width;for(e.fillStyle=o.style.color||"#000000",h=0;h<c.length;h++){const t=c[h]*o.height;t*o.height>2*g?a(e,.5*o.width-g+h*p,.5*(o.height-t),2*g,t,g):(e.beginPath(),e.arc(.5*o.width+h*p,.5*o.height,t*o.height*.5,0,2*Math.PI)),e.fill(),h>0&&(t*o.height>2*g?a(e,.5*o.width-g-h*p,.5*(o.height-t),2*g,t,g):(e.beginPath(),e.arc(.5*o.width-h*p,.5*o.height,t*o.height*.5,0,2*Math.PI)),e.fill())}};d(),u(1,350);const f=t=>u(.5*Math.random()+.5,75*Math.random()+75);return l.addEventListener("updateVU",f),()=>{cancelAnimationFrame(t),l.removeEventListener("updateVU",f)}})),t.$$set=t=>{"color"in t&&n(0,i=t.color)},[i,o,function(t){j[t?"unshift":"push"]((()=>{o=t,n(1,o)}))}]}customElements.define("vu-meter",class extends lt{constructor(t){super(),this.shadowRoot.innerHTML="<style>canvas{display:block;width:1.35rem;height:1.5rem;margin:0;padding:0 0.8rem 0 0rem}</style>",ct(this,{target:this.shadowRoot,props:P(this.attributes),customElement:!0},_t,St,c,{color:0}),t&&(t.target&&b(t.target,this,t.anchor),t.props&&(this.$set(t.props),J()))}static get observedAttributes(){return["color"]}get color(){return this.$$.ctx[0]}set color(t){this.$set({color:t}),J()}});const{window:Tt}=rt;function Nt(t,e,n){const o=t.slice();return o[28]=e[n],o[30]=n,o}function Pt(n){let o,i,c,l,a,d,f,h,p,m,$,x,k,_=n[10]&&Rt(n),T=n[6],N=[];for(let t=0;t<T.length;t+=1)N[t]=At(Nt(n,T,t));let P=n[9]&&zt(n);return{c(){o=v("div"),i=v("div"),c=v("div"),l=C(),a=v("div"),d=v("vu-meter"),f=C(),_&&_.c(),p=C();for(let t=0;t<N.length;t+=1)N[t].c();m=C(),P&&P.c(),E(c,"class","TransscriptItemBgDiv"),S(d,"color",n[4]),E(a,"class","TransscriptItemContent"),E(i,"class","TranscriptItem"),E(o,"class","BigTranscript")},m(t,e){b(t,o,e),y(o,i),y(i,c),y(i,l),y(i,a),y(a,d),n[18](d),y(a,f),_&&_.m(a,null),y(o,p);for(let t=0;t<N.length;t+=1)N[t].m(o,null);y(o,m),P&&P.m(o,null),k=!0},p(t,e){if((!k||16&e)&&S(d,"color",t[4]),t[10]?_?1024&e&&et(_,1):(_=Rt(t),_.c(),et(_,1),_.m(a,null)):_&&(_.d(1),_=null),33344&e){let n;for(T=t[6],n=0;n<T.length;n+=1){const i=Nt(t,T,n);N[n]?(N[n].p(i,e),et(N[n],1)):(N[n]=At(i),N[n].c(),et(N[n],1),N[n].m(o,m))}for(;n<N.length;n+=1)N[n].d(1);N.length=T.length}t[9]?P?(P.p(t,e),512&e&&et(P,1)):(P=zt(t),P.c(),et(P,1),P.m(o,null)):P&&(P.d(1),P=null)},i(t){if(!k){et(_),h||q((()=>{h=it(i,n[13],{duration:200}),h.start()}));for(let t=0;t<T.length;t+=1)et(N[t]);et(P),q((()=>{x&&x.end(1),$||($=it(o,n[12],{})),$.start()})),k=!0}},o(i){$&&$.invalidate(),x=function(n,o,i){let c,l=o(n,i),a=!0;const d=tt;function f(){const{delay:o=0,duration:i=300,easing:s=e,tick:f=t,css:h}=l||ot;h&&(c=z(n,1,0,i,o,s,h));const p=u()+o,m=p+i;q((()=>Y(n,!1,"start"))),g((t=>{if(a){if(t>=m)return f(0,1),Y(n,!1,"end"),--d.r||r(d.c),!1;if(t>=p){const e=s((t-p)/i);f(1-e,e)}}return a}))}return d.r+=1,s(l)?X().then((()=>{l=l(),f()})):f(),{end(t){t&&l.tick&&l.tick(1,0),a&&(c&&D(n,c),a=!1)}}}(o,n[12],{}),k=!1},d(t){t&&w(o),n[18](null),_&&_.d(),function(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}(N,t),P&&P.d(),t&&x&&x.end()}}}function Rt(e){let n,o;return{c(){n=v("div"),n.textContent="Listening...",E(n,"class","listening")},m(t,e){b(t,n,e)},i(t){o||q((()=>{o=it(n,e[13],{duration:400}),o.start()}))},o:t,d(t){t&&w(n)}}}function Mt(t){let e,n;return{c(){e=v("span"),E(e,"style",n=t[30]<t[6].length-1?"width:0.25em;":t[9]?"width:1.2em;":"")},m(t,n){b(t,e,n)},p(t,o){576&o&&n!==(n=t[30]<t[6].length-1?"width:0.25em;":t[9]?"width:1.2em;":"")&&E(e,"style",n)},d(t){t&&w(e)}}}function At(e){let n,o,i,r,s,c,l,a,u,d=e[28].word+"",f=e[30]<e[6].length&&Mt(e);return{c(){n=v("div"),o=v("div"),r=C(),s=v("div"),c=x(d),l=C(),f&&f.c(),E(o,"class","TransscriptItemBgDiv"),E(s,"class","TransscriptItemContent"),E(n,"class",u="TranscriptItem "+e[15](e[28])),N(n,"Entity",null!==e[28].entityType),N(n,"Final",e[28].isFinal)},m(t,e){b(t,n,e),y(n,o),y(n,r),y(n,s),y(s,c),y(s,l),f&&f.m(s,null)},p(t,e){64&e&&d!==(d=t[28].word+"")&&_(c,d),t[30]<t[6].length?f?f.p(t,e):(f=Mt(t),f.c(),f.m(s,null)):f&&(f.d(1),f=null),64&e&&u!==(u="TranscriptItem "+t[15](t[28]))&&E(n,"class",u),64&e&&N(n,"Entity",null!==t[28].entityType),64&e&&N(n,"Final",t[28].isFinal)},i(t){i||q((()=>{i=it(o,e[13],{}),i.start()})),a||q((()=>{a=it(s,e[13],{}),a.start()}))},o:t,d(t){t&&w(n),f&&f.d()}}}function zt(e){let n,o,i,r,s,c,l,a;return{c(){n=v("div"),o=v("div"),i=C(),r=v("div"),s=$("svg"),c=$("path"),E(o,"class","TransscriptItemBgDiv"),T(o,"background-color",e[4]),E(c,"stroke","currentColor"),E(c,"stroke-width","3"),E(c,"d","M7.191 11.444l4.059 6.107 7.376-12.949"),E(c,"fill","none"),E(c,"fill-rule","evenodd"),T(s,"width","2rem"),T(s,"height","2rem"),T(s,"position","absolute"),T(s,"transform","translate(-0.5rem, -0.5rem)"),T(s,"stroke","#eee"),E(s,"viewBox","0 0 24 24"),E(s,"xmlns","http://www.w3.org/2000/svg"),T(r,"width","1.0rem"),T(r,"height","1rem"),T(r,"position","relative"),E(n,"class","TranscriptItem")},m(t,e){b(t,n,e),y(n,o),y(n,i),y(n,r),y(r,s),y(s,c)},p(t,e){16&e&&T(o,"background-color",t[4])},i(t){l||q((()=>{l=it(c,e[11],{duration:500}),l.start()})),a||q((()=>{a=it(n,e[13],{duration:200,maxWidth:3}),a.start()}))},o:t,d(t){t&&w(n)}}}function Dt(e){let n,o,i,s,c,l,a=e[7]&&Pt(e);return{c(){n=v("main"),a&&a.c(),o=C(),i=v("link"),this.c=t,T(n,"--voffset",e[1]),T(n,"--hoffset",e[2]),T(n,"--fontsize",e[3]),T(n,"--highlight-color",e[4]),T(n,"--text-bg-color",e[5]),N(n,"placementTop","top"===e[0]),E(i,"href","https://fonts.googleapis.com/css2?family=Saira+Condensed:wght@700&display=swap"),E(i,"rel","stylesheet")},m(t,r){b(t,n,r),a&&a.m(n,null),b(t,o,r),y(document.head,i),s=!0,c||(l=k(Tt,"message",e[14]),c=!0)},p(t,[e]){t[7]?a?(a.p(t,e),128&e&&et(a,1)):(a=Pt(t),a.c(),et(a,1),a.m(n,null)):a&&(tt={r:0,c:[],p:tt},nt(a,1,1,(()=>{a=null})),tt.r||r(tt.c),tt=tt.p),(!s||2&e)&&T(n,"--voffset",t[1]),(!s||4&e)&&T(n,"--hoffset",t[2]),(!s||8&e)&&T(n,"--fontsize",t[3]),(!s||16&e)&&T(n,"--highlight-color",t[4]),(!s||32&e)&&T(n,"--text-bg-color",t[5]),1&e&&N(n,"placementTop","top"===t[0])},i(t){s||(et(a),s=!0)},o(t){nt(a),s=!1},d(t){t&&w(n),a&&a.d(),t&&w(o),w(i),c=!1,l()}}}function Bt(t,e,n){let o,i,{placement:r}=e,{voffset:s="3rem"}=e,{hoffset:c="2rem"}=e,{fontsize:l="1.5rem"}=e,{highlightcolor:a="#15e8b5"}=e,{textbgcolor:u="#202020"}=e,d=[],f=!1,h=null,g=null,p=$t.ClientState.Disconnected,m=!1,y=!1,b=!1;const w=F(),v=(t,e)=>{w.dispatchEvent(new CustomEvent(t,{detail:e,composed:!0}))},$=xt(Ct),x=xt(((t,{delay:e=0,duration:n=400})=>({delay:e,duration:n,easing:at,css:t=>`\n opacity: ${Et(kt,t,0,1)};\n max-height: ${10*Et(kt,t,0,.6)}rem;\n `}))),C=xt(((t,{delay:e=0,duration:n=350,maxWidth:o=10})=>({delay:e,duration:n,css:t=>`\n max-width: ${Et(kt,t,0,1)*o}rem;\n `}))),k=t=>{if(void 0===t)return;i&&f&&i.dispatchEvent(new CustomEvent("updateVU",{detail:{level:1,seekTimeMs:1e3}})),t.isFinal?S(d.length>0?2e3:0):d.length>0&&(m||n(17,m=!0),S(2e3));const e=`${t.contextId}/${t.id}`;null!==g?g!==e&&(n(9,b=!1),g=e):g=e,n(6,d=[]),t.words.forEach((t=>{n(6,d[t.index]={word:t.value,serialNumber:t.index,entityType:null,isFinal:t.isFinal,hide:!1},d)})),t.entities.forEach((t=>{n(6,d[t.startPosition].word=t.value,d),n(6,d[t.startPosition].entityType=t.type,d),n(6,d[t.startPosition].isFinal=t.isFinal,d),n(6,d[t.startPosition].hide=!1,d);for(let e=t.startPosition+1;e<t.endPosition;e++)d[e]&&n(6,d[e].hide=!0,d)})),n(6,d=d.filter((t=>!t.hide)))};w.onSegmentUpdate=k;const E=t=>{v("debug","big-transcript.ping 1")},S=(t=0)=>{_(),h=window.setTimeout((()=>{h=null,m&&n(17,m=!1)}),t)},_=()=>{null!==h&&(window.clearTimeout(h),h=null)};return I((()=>{const t=t=>k(t.detail);return w.addEventListener("speechsegment",t),w.addEventListener("ping",E),()=>{cancelAnimationFrame(null),w.removeEventListener("speechsegment",t),w.removeEventListener("ping",E)}})),t.$$set=t=>{"placement"in t&&n(0,r=t.placement),"voffset"in t&&n(1,s=t.voffset),"hoffset"in t&&n(2,c=t.hoffset),"fontsize"in t&&n(3,l=t.fontsize),"highlightcolor"in t&&n(4,a=t.highlightcolor),"textbgcolor"in t&&n(5,u=t.textbgcolor)},t.$$.update=()=>{if(64&t.$$.dirty&&n(10,o=0===d.length),196736&t.$$.dirty){const t=p===$t.ClientState.Recording||m;t!==y&&v("visibilitychanged",t),n(7,y=t)}},[r,s,c,l,a,u,d,y,i,b,o,$,x,C,t=>{switch(t.data.type){case"speechsegment":k(t.data.segment);break;case"holdstart":f=!0;break;case"holdend":f=!1;break;case"speechhandled":t.data.success&&n(9,b=!0);break;case"speechstate":n(16,p=t.data.state),p===$t.ClientState.Recording&&(n(9,b=!1),n(6,d=[]),g=null)}},t=>t.entityType||"",p,m,function(t){j[t?"unshift":"push"]((()=>{i=t,n(8,i)}))}]}function Ft(e){let n,o,i,s,c,l,a,u,d;return{c(){n=v("main"),o=v("div"),i=v("div"),s=v("big-transcript"),c=C(),l=v("div"),a=x(e[1]),this.c=t,S(s,"textbgcolor",e[2]),E(l,"class","hint"),T(l,"opacity",e[5].opacity),E(i,"class","pad"),E(o,"class","drawer"),T(o,"background-color",e[2]),T(o,"opacity",e[3].opacity),T(o,"transform","translate(0px, "+e[4].y+"rem)"),E(n,"class","placementTop"),T(n,"--height",e[0])},m(t,r){b(t,n,r),y(n,o),y(o,i),y(i,s),y(i,c),y(i,l),y(l,a),u||(d=[k(window,"message",e[10]),k(s,"visibilitychanged",e[9])],u=!0)},p(t,[e]){4&e&&S(s,"textbgcolor",t[2]),2&e&&_(a,t[1]),32&e&&T(l,"opacity",t[5].opacity),4&e&&T(o,"background-color",t[2]),8&e&&T(o,"opacity",t[3].opacity),16&e&&T(o,"transform","translate(0px, "+t[4].y+"rem)"),1&e&&T(n,"--height",t[0])},i:t,o:t,d(t){t&&w(n),u=!1,r(d)}}}function It(t,n,o){let i,r,s,{height:c="8rem"}=n,{hint:a='Try: "Show me blue jeans"'}=n,{textbgcolor:u="#202020"}=n,d=pt({y:-1},{duration:200});l(t,d,(t=>o(4,r=t)));let f=pt({opacity:0},{duration:200,easing:e});l(t,f,(t=>o(3,i=t)));let h=pt({opacity:0},{duration:200,delay:200,easing:e});l(t,h,(t=>o(5,s=t)));return t.$$set=t=>{"height"in t&&o(0,c=t.height),"hint"in t&&o(1,a=t.hint),"textbgcolor"in t&&o(2,u=t.textbgcolor)},[c,a,u,i,r,s,d,f,h,t=>{!1===t.detail?(d.set({y:-1},{easing:ut}),f.set({opacity:0}),h.set({opacity:0})):(d.set({y:0},{easing:dt}),f.set({opacity:1}),h.set({opacity:1}))},t=>{switch(t.data.type){case"speechsegment":h.set({opacity:0})}}]}customElements.define("big-transcript",class extends lt{constructor(t){super(),this.shadowRoot.innerHTML="<style>.BigTranscript{position:relative;user-select:none;font-family:'Saira Condensed', sans-serif;text-transform:uppercase;color:#fff;font-size:var(--fontsize);line-height:135%;display:flex;flex-direction:row;justify-content:start;flex-wrap:wrap}.TranscriptItem{position:relative;display:flex;flex-direction:row;align-items:center}.Entity{color:var(--highlight-color)}.TransscriptItemContent{z-index:1;display:flex;flex-wrap:nowrap;flex-direction:row;align-items:center;overflow:hidden}.TransscriptItemBgDiv{position:absolute;box-sizing:content-box;width:100%;height:100%;top:-0.2rem;left:-0.8rem;margin:0;padding:0.2rem 0.8rem;background-color:var(--text-bg-color);z-index:-1}.placementTop{position:fixed;top:0;left:0;right:0;bottom:0;margin:var(--voffset) var(--hoffset) 0 var(--hoffset);z-index:50;pointer-events:none}.listening{animation:flow 1s linear infinite;background:linear-gradient(-60deg, #fff8, #fffc, #fff8, #fffc, #fff8);background-size:200%;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;-webkit-box-decoration-break:clone}@keyframes flow{0%{background-position:100% 50%}100%{background-position:0% 50%}}</style>",ct(this,{target:this.shadowRoot,props:P(this.attributes),customElement:!0},Bt,Dt,c,{placement:0,voffset:1,hoffset:2,fontsize:3,highlightcolor:4,textbgcolor:5}),t&&(t.target&&b(t.target,this,t.anchor),t.props&&(this.$set(t.props),J()))}static get observedAttributes(){return["placement","voffset","hoffset","fontsize","highlightcolor","textbgcolor"]}get placement(){return this.$$.ctx[0]}set placement(t){this.$set({placement:t}),J()}get voffset(){return this.$$.ctx[1]}set voffset(t){this.$set({voffset:t}),J()}get hoffset(){return this.$$.ctx[2]}set hoffset(t){this.$set({hoffset:t}),J()}get fontsize(){return this.$$.ctx[3]}set fontsize(t){this.$set({fontsize:t}),J()}get highlightcolor(){return this.$$.ctx[4]}set highlightcolor(t){this.$set({highlightcolor:t}),J()}get textbgcolor(){return this.$$.ctx[5]}set textbgcolor(t){this.$set({textbgcolor:t}),J()}});customElements.define("transcript-drawer",class extends lt{constructor(t){super(),this.shadowRoot.innerHTML="<style>.placementTop{position:fixed;top:0;left:0;right:0;bottom:0;z-index:60;pointer-events:none}.drawer{width:100%;min-height:var(--height);display:flex;flex-direction:column;justify-content:flex-end;box-shadow:0 0 0.35rem #0004}.pad{position:relative;padding:2rem 2rem 0.65rem 1.5rem}.hint{font-family:'Saira Condensed', sans-serif;text-transform:uppercase;color:#fff7;font-size:0.9rem;line-height:135%;margin-top:0.15rem}</style>",ct(this,{target:this.shadowRoot,props:P(this.attributes),customElement:!0},It,Ft,c,{height:0,hint:1,textbgcolor:2}),t&&(t.target&&b(t.target,this,t.anchor),t.props&&(this.$set(t.props),J()))}static get observedAttributes(){return["height","hint","textbgcolor"]}get height(){return this.$$.ctx[0]}set height(t){this.$set({height:t}),J()}get hint(){return this.$$.ctx[1]}set hint(t){this.$set({hint:t}),J()}get textbgcolor(){return this.$$.ctx[2]}set textbgcolor(t){this.$set({textbgcolor:t}),J()}})}();
!function(){"use strict";function t(){}const e=t=>t;function n(t,e){for(const n in e)t[n]=e[n];return t}function o(t){return t()}function i(){return Object.create(null)}function r(t){t.forEach(o)}function s(t){return"function"==typeof t}function c(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function l(t,e){return t!=t?e==e:t!==e}function a(t){return 0===Object.keys(t).length}function u(e,n,o){e.$$.on_destroy.push(function(e,...n){if(null==e)return t;const o=e.subscribe(...n);return o.unsubscribe?()=>o.unsubscribe():o}(n,o))}const d="undefined"!=typeof window;let f=d?()=>window.performance.now():()=>Date.now(),h=d?t=>requestAnimationFrame(t):t;const g=new Set;function p(t){g.forEach((e=>{e.c(t)||(g.delete(e),e.f())})),0!==g.size&&h(p)}function m(t){let e;return 0===g.size&&h(p),{promise:new Promise((n=>{g.add(e={c:t,f:n})})),abort(){g.delete(e)}}}let y=!1;const $=new Set;function b(t,e){y&&$.delete(e),e.parentNode!==t&&t.appendChild(e)}function w(t,e,n){y&&$.delete(e),(e.parentNode!==t||n&&e.nextSibling!==n)&&t.insertBefore(e,n||null)}function v(t){y?$.add(t):t.parentNode&&t.parentNode.removeChild(t)}function x(t){return document.createElement(t)}function C(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function k(t){return document.createTextNode(t)}function E(){return k(" ")}function _(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function S(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function N(t,e,n){e in t?t[e]="boolean"==typeof t[e]&&""===n||n:S(t,e,n)}function T(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function P(t,e,n,o){t.style.setProperty(e,n,o?"important":"")}function z(t,e,n){t.classList[n?"add":"remove"](e)}function R(t){const e={};for(const n of t)e[n.name]=n.value;return e}const A=new Set;let D,M=0;function B(t,e,n,o,i,r,s,c=0){const l=16.666/o;let a="{\n";for(let t=0;t<=1;t+=l){const o=e+(n-e)*r(t);a+=100*t+`%{${s(o,1-o)}}\n`}const u=a+`100% {${s(n,1-n)}}\n}`,d=`__svelte_${function(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}(u)}_${c}`,f=t.ownerDocument;A.add(f);const h=f.__svelte_stylesheet||(f.__svelte_stylesheet=f.head.appendChild(x("style")).sheet),g=f.__svelte_rules||(f.__svelte_rules={});g[d]||(g[d]=!0,h.insertRule(`@keyframes ${d} ${u}`,h.cssRules.length));const p=t.style.animation||"";return t.style.animation=`${p?`${p}, `:""}${d} ${o}ms linear ${i}ms 1 both`,M+=1,d}function I(t,e){const n=(t.style.animation||"").split(", "),o=n.filter(e?t=>t.indexOf(e)<0:t=>-1===t.indexOf("__svelte")),i=n.length-o.length;i&&(t.style.animation=o.join(", "),M-=i,M||h((()=>{M||(A.forEach((t=>{const e=t.__svelte_stylesheet;let n=e.cssRules.length;for(;n--;)e.deleteRule(n);t.__svelte_rules={}})),A.clear())})))}function F(t){D=t}function L(){if(!D)throw new Error("Function called outside component initialization");return D}function j(t){L().$$.on_mount.push(t)}const O=[],H=[],V=[],U=[],q=Promise.resolve();let W=!1;function G(t){V.push(t)}let J=!1;const K=new Set;function Q(){if(!J){J=!0;do{for(let t=0;t<O.length;t+=1){const e=O[t];F(e),X(e.$$)}for(F(null),O.length=0;H.length;)H.pop()();for(let t=0;t<V.length;t+=1){const e=V[t];K.has(e)||(K.add(e),e())}V.length=0}while(O.length);for(;U.length;)U.pop()();W=!1,J=!1,K.clear()}}function X(t){if(null!==t.fragment){t.update(),r(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(G)}}let Y;function Z(){return Y||(Y=Promise.resolve(),Y.then((()=>{Y=null}))),Y}function tt(t,e,n){t.dispatchEvent(function(t,e){const n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!1,!1,e),n}(`${e?"intro":"outro"}${n}`))}const et=new Set;let nt;function ot(t,e){t&&t.i&&(et.delete(t),t.i(e))}function it(t,e,n,o){if(t&&t.o){if(et.has(t))return;et.add(t),nt.c.push((()=>{et.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}const rt={duration:0};function st(n,o,i){let r,c,l=o(n,i),a=!1,u=0;function d(){r&&I(n,r)}function h(){const{delay:o=0,duration:i=300,easing:s=e,tick:h=t,css:g}=l||rt;g&&(r=B(n,0,1,i,o,s,g,u++)),h(0,1);const p=f()+o,y=p+i;c&&c.abort(),a=!0,G((()=>tt(n,!0,"start"))),c=m((t=>{if(a){if(t>=y)return h(1,0),tt(n,!0,"end"),d(),a=!1;if(t>=p){const e=s((t-p)/i);h(e,1-e)}}return a}))}let g=!1;return{start(){g||(I(n),s(l)?(l=l(),Z().then(h)):h())},invalidate(){g=!1},end(){a&&(d(),a=!1)}}}const ct="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function lt(t,e,n,i){const{fragment:c,on_mount:l,on_destroy:a,after_update:u}=t.$$;c&&c.m(e,n),i||G((()=>{const e=l.map(o).filter(s);a?a.push(...e):r(e),t.$$.on_mount=[]})),u.forEach(G)}function at(t,e){const n=t.$$;null!==n.fragment&&(r(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function ut(t,e){-1===t.$$.dirty[0]&&(O.push(t),W||(W=!0,q.then(Q)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function dt(e,n,o,s,c,l,a=[-1]){const u=D;F(e);const d=e.$$={fragment:null,ctx:null,props:l,update:t,not_equal:c,bound:i(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(u?u.$$.context:n.context||[]),callbacks:i(),dirty:a,skip_bound:!1};let f=!1;if(d.ctx=o?o(e,n.props||{},((t,n,...o)=>{const i=o.length?o[0]:n;return d.ctx&&c(d.ctx[t],d.ctx[t]=i)&&(!d.skip_bound&&d.bound[t]&&d.bound[t](i),f&&ut(e,t)),n})):[],d.update(),f=!0,r(d.before_update),d.fragment=!!s&&s(d.ctx),n.target){if(n.hydrate){y=!0;const t=function(t){return Array.from(t.childNodes)}(n.target);d.fragment&&d.fragment.l(t),t.forEach(v)}else d.fragment&&d.fragment.c();n.intro&&ot(e.$$.fragment),lt(e,n.target,n.anchor,n.customElement),function(){y=!1;for(const t of $)t.parentNode.removeChild(t);$.clear()}(),Q()}F(u)}let ft;"function"==typeof HTMLElement&&(ft=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(o).filter(s);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){r(this.$$.on_disconnect)}$destroy(){at(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){this.$$set&&!a(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});function ht(t){return t<.5?4*t*t*t:.5*Math.pow(2*t-2,3)+1}function gt(t){return t*t*t}function pt(t){const e=t-1;return e*e*e+1}const mt=[];function yt(t){return"[object Date]"===Object.prototype.toString.call(t)}function $t(t,e){if(t===e||t!=t)return()=>t;const n=typeof t;if(n!==typeof e||Array.isArray(t)!==Array.isArray(e))throw new Error("Cannot interpolate values of different type");if(Array.isArray(t)){const n=e.map(((e,n)=>$t(t[n],e)));return t=>n.map((e=>e(t)))}if("object"===n){if(!t||!e)throw new Error("Object cannot be null");if(yt(t)&&yt(e)){t=t.getTime();const n=(e=e.getTime())-t;return e=>new Date(t+e*n)}const n=Object.keys(e),o={};return n.forEach((n=>{o[n]=$t(t[n],e[n])})),t=>{const e={};return n.forEach((n=>{e[n]=o[n](t)})),e}}if("number"===n){const n=e-t;return e=>t+e*n}throw new Error(`Cannot interpolate ${n} values`)}function bt(o,i={}){const r=function(e,n=t){let o;const i=[];function r(t){if(c(e,t)&&(e=t,o)){const t=!mt.length;for(let t=0;t<i.length;t+=1){const n=i[t];n[1](),mt.push(n,e)}if(t){for(let t=0;t<mt.length;t+=2)mt[t][0](mt[t+1]);mt.length=0}}}return{set:r,update:function(t){r(t(e))},subscribe:function(s,c=t){const l=[s,c];return i.push(l),1===i.length&&(o=n(r)||t),s(e),()=>{const t=i.indexOf(l);-1!==t&&i.splice(t,1),0===i.length&&(o(),o=null)}}}}(o);let s,l=o;function a(t,c){if(null==o)return r.set(o=t),Promise.resolve();l=t;let a=s,u=!1,{delay:d=0,duration:h=400,easing:g=e,interpolate:p=$t}=n(n({},i),c);if(0===h)return a&&(a.abort(),a=null),r.set(o=l),Promise.resolve();const y=f()+d;let $;return s=m((e=>{if(e<y)return!0;u||($=p(o,t),"function"==typeof h&&(h=h(o,t)),u=!0),a&&(a.abort(),a=null);const n=e-y;return n>h?(r.set(o=t),!1):(r.set(o=$(g(n/h))),!0)})),s.promise}return{set:a,update:(t,e)=>a(t(l,o),e),subscribe:r.subscribe}}var wt,vt,xt,Ct,kt,Et=(function(t,e){var n;Object.defineProperty(e,"__esModule",{value:!0}),(n=e.ClientState||(e.ClientState={}))[n.Failed=0]="Failed",n[n.NoBrowserSupport=1]="NoBrowserSupport",n[n.NoAudioConsent=2]="NoAudioConsent",n[n.Disconnected=3]="Disconnected",n[n.Disconnecting=4]="Disconnecting",n[n.Connecting=5]="Connecting",n[n.Connected=6]="Connected",n[n.Starting=7]="Starting",n[n.Stopping=8]="Stopping",n[n.Recording=9]="Recording"}(wt={exports:{}},wt.exports),wt.exports);function _t(t){return function(e,n){if(!e.hasOwnProperty("ownerDocument")){Object.defineProperty(e,"ownerDocument",{get:function(){return e.parentElement}});let t=e;for(;t.parentElement;)t=t.parentElement;e.parentElement.head=t}return t(e,n)}}function St(t,{delay:e=0,speed:n,duration:o,easing:i=ht}={}){const r=t.getTotalLength();return void 0===o?o=void 0===n?800:r/n:"function"==typeof o&&(o=o(r)),{delay:e,duration:o,easing:i,css:(t,e)=>`stroke-dasharray: ${t*r} ${e*r}`}}!function(t){t.Failed="Failed",t.NoBrowserSupport="NoBrowserSupport",t.NoAudioConsent="NoAudioConsent",t.Idle="Idle",t.Connecting="Connecting",t.Ready="Ready",t.Recording="Recording",t.Loading="Loading"}(vt||(vt={})),function(t){t.Poweron="poweron",t.Mic="mic",t.Error="error",t.Denied="denied"}(xt||(xt={})),function(t){t.Hold="hold",t.Click="click",t.Noninteractive="noninteractive"}(Ct||(Ct={})),function(t){t.None="none",t.Connecting="connecting",t.Busy="busy"}(kt||(kt={})),Et.ClientState.Disconnected,xt.Poweron,Ct.Click,kt.None,Et.ClientState.Disconnecting,xt.Poweron,Ct.Noninteractive,kt.Connecting,Et.ClientState.Connecting,xt.Poweron,Ct.Noninteractive,kt.Connecting,Et.ClientState.Connected,xt.Mic,Ct.Hold,kt.None,Et.ClientState.Starting,xt.Mic,Ct.Hold,kt.Connecting,Et.ClientState.Recording,xt.Mic,Ct.Hold,kt.None,Et.ClientState.Stopping,xt.Mic,Ct.Noninteractive,kt.Busy,Et.ClientState.Failed,xt.Error,Ct.Click,kt.None,Et.ClientState.NoBrowserSupport,xt.Error,Ct.Click,kt.None,Et.ClientState.NoAudioConsent,xt.Denied,Ct.Click,kt.None,vt.Idle,xt.Poweron,Ct.Click,kt.None,vt.Connecting,xt.Poweron,Ct.Noninteractive,kt.Connecting,vt.Ready,xt.Mic,Ct.Hold,kt.None,vt.Recording,xt.Mic,Ct.Hold,kt.None,vt.Loading,xt.Mic,Ct.Noninteractive,kt.Busy,vt.Failed,xt.Error,Ct.Click,kt.None,vt.NoBrowserSupport,xt.Error,Ct.Click,kt.None,vt.NoAudioConsent,xt.Denied,Ct.Click,kt.None;const Nt=[0,1];function Tt(t,e,n,o){if(e<n)return t[0];if(e>o)return t[t.length-1];let i=(o-n)/(t.length-1);if(i<=0)return t[0];let r=(e-n)/i,s=Math.floor(r),c=Math.ceil(r),l=r-s;return(1-l)*t[s]+l*t[c]}function Pt(e){let n;return{c(){n=x("canvas"),P(n,"color",e[0]),P(n,"display","block"),P(n,"width","1.35rem"),P(n,"height","1.5rem"),P(n,"margin","0"),P(n,"padding","0 0.8rem 0 0rem"),P(n,"flex-grow","0"),P(n,"flex-shrink","0"),P(n,"flex-basis","1.35rem"),S(n,"class","svelte-1fz8oog")},m(t,o){w(t,n,o),e[3](n)},p(t,[e]){1&e&&P(n,"color",t[0])},i:t,o:t,d(t){t&&v(n),e[3](null)}}}function zt(t,e,n){let{color:o="#60e0ff"}=e;const i=(t,e)=>{s=Date.now()>c?t:Math.max(s,t),c=Date.now()+e};let r,s=0,c=0,l=[0,0];const a=(t,e,n,o,i,r)=>{o<2*r&&(r=o/2),i<2*r&&(r=i/2),t.beginPath(),t.moveTo(e+r,n),t.arcTo(e+o,n,e+o,n+i,r),t.arcTo(e+o,n+i,e,n+i,r),t.arcTo(e,n+i,e,n,r),t.arcTo(e,n,e+o,n,r),t.closePath()};return j((()=>{let t;const e=2*(l.length-1)+1,o=3*e+1*(e-1),u=()=>{if(t=requestAnimationFrame(u),!r)return;const e=r.getContext("2d");if(!e)return;let i=(t=>{var e=t.backingStorePixelRatio||t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return(window.devicePixelRatio||1)/e})(e),d=Number.parseInt(getComputedStyle(r).getPropertyValue("width").slice(0,-2)),f=Number.parseInt(getComputedStyle(r).getPropertyValue("height").slice(0,-2));n(1,r.width=d*i,r),n(1,r.height=f*i,r),Date.now()<c?l[0]=.15*s+.85*l[0]:l[0]=.0625+.75*l[0];let h=1;for(;h<l.length;)l[h]=.25*l[h-1]+.5*l[h]+.0625,h++;e.clearRect(0,0,r.width,r.height);const g=3/o*r.width*.5,p=4/o*r.width;for(e.fillStyle=r.style.color||"#000000",h=0;h<l.length;h++){const t=l[h]*r.height;t*r.height>2*g?a(e,.5*r.width-g+h*p,.5*(r.height-t),2*g,t,g):(e.beginPath(),e.arc(.5*r.width+h*p,.5*r.height,t*r.height*.5,0,2*Math.PI)),e.fill(),h>0&&(t*r.height>2*g?a(e,.5*r.width-g-h*p,.5*(r.height-t),2*g,t,g):(e.beginPath(),e.arc(.5*r.width-h*p,.5*r.height,t*r.height*.5,0,2*Math.PI)),e.fill())}};return u(),i(1,500),()=>{cancelAnimationFrame(t)}})),t.$$set=t=>{"color"in t&&n(0,o=t.color)},[o,r,i,function(t){H[t?"unshift":"push"]((()=>{r=t,n(1,r)}))}]}class Rt extends class{$destroy(){at(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){this.$$set&&!a(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}{constructor(t){var e;super(),document.getElementById("svelte-1fz8oog-style")||((e=x("style")).id="svelte-1fz8oog-style",e.textContent="canvas.svelte-1fz8oog{display:block;width:1.35rem;height:1.5rem;margin:0;padding:0 0.8rem 0 0rem;flex-grow:0;flex-shrink:0;flex-basis:1.35rem}",b(document.head,e)),dt(this,t,zt,Pt,c,{color:0,updateVU:2})}get updateVU(){return this.$$.ctx[2]}}const{window:At}=ct;function Dt(t,e,n){const o=t.slice();return o[28]=e[n],o[30]=n,o}function Mt(n){let o,i,c,l,a,u,d,h,g,p,y,$,C,k={color:n[4]};u=new Rt({props:k}),n[18](u);let _=n[10]&&Bt(n),N=n[6],T=[];for(let t=0;t<N.length;t+=1)T[t]=Ft(Dt(n,N,t));let P=n[9]&&Lt(n);return{c(){var t;o=x("div"),i=x("div"),c=x("div"),l=E(),a=x("div"),(t=u.$$.fragment)&&t.c(),d=E(),_&&_.c(),g=E();for(let t=0;t<T.length;t+=1)T[t].c();p=E(),P&&P.c(),S(c,"class","TransscriptItemBgDiv"),S(a,"class","TransscriptItemContent"),S(i,"class","TranscriptItem"),S(o,"class","BigTranscript")},m(t,e){w(t,o,e),b(o,i),b(i,c),b(i,l),b(i,a),lt(u,a,null),b(a,d),_&&_.m(a,null),b(o,g);for(let t=0;t<T.length;t+=1)T[t].m(o,null);b(o,p),P&&P.m(o,null),C=!0},p(t,e){const n={};if(16&e&&(n.color=t[4]),u.$set(n),t[10]?_?1024&e&&ot(_,1):(_=Bt(t),_.c(),ot(_,1),_.m(a,null)):_&&(_.d(1),_=null),33344&e){let n;for(N=t[6],n=0;n<N.length;n+=1){const i=Dt(t,N,n);T[n]?(T[n].p(i,e),ot(T[n],1)):(T[n]=Ft(i),T[n].c(),ot(T[n],1),T[n].m(o,p))}for(;n<T.length;n+=1)T[n].d(1);T.length=N.length}t[9]?P?(P.p(t,e),512&e&&ot(P,1)):(P=Lt(t),P.c(),ot(P,1),P.m(o,null)):P&&(P.d(1),P=null)},i(t){if(!C){ot(u.$$.fragment,t),ot(_),h||G((()=>{h=st(i,n[13],{duration:200}),h.start()}));for(let t=0;t<N.length;t+=1)ot(T[t]);ot(P),G((()=>{$&&$.end(1),y||(y=st(o,n[12],{})),y.start()})),C=!0}},o(i){it(u.$$.fragment,i),y&&y.invalidate(),$=function(n,o,i){let c,l=o(n,i),a=!0;const u=nt;function d(){const{delay:o=0,duration:i=300,easing:s=e,tick:d=t,css:h}=l||rt;h&&(c=B(n,1,0,i,o,s,h));const g=f()+o,p=g+i;G((()=>tt(n,!1,"start"))),m((t=>{if(a){if(t>=p)return d(0,1),tt(n,!1,"end"),--u.r||r(u.c),!1;if(t>=g){const e=s((t-g)/i);d(1-e,e)}}return a}))}return u.r+=1,s(l)?Z().then((()=>{l=l(),d()})):d(),{end(t){t&&l.tick&&l.tick(1,0),a&&(c&&I(n,c),a=!1)}}}(o,n[12],{}),C=!1},d(t){t&&v(o),n[18](null),at(u),_&&_.d(),function(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}(T,t),P&&P.d(),t&&$&&$.end()}}}function Bt(e){let n,o;return{c(){n=x("div"),n.textContent="Listening...",S(n,"class","listening")},m(t,e){w(t,n,e)},i(t){o||G((()=>{o=st(n,e[13],{duration:400}),o.start()}))},o:t,d(t){t&&v(n)}}}function It(t){let e,n;return{c(){e=x("span"),S(e,"style",n=t[30]<t[6].length-1?"width:0.25em;":t[9]?"width:1.2em;":"")},m(t,n){w(t,e,n)},p(t,o){576&o&&n!==(n=t[30]<t[6].length-1?"width:0.25em;":t[9]?"width:1.2em;":"")&&S(e,"style",n)},d(t){t&&v(e)}}}function Ft(e){let n,o,i,r,s,c,l,a,u,d=e[28].word+"",f=e[30]<e[6].length&&It(e);return{c(){n=x("div"),o=x("div"),r=E(),s=x("div"),c=k(d),l=E(),f&&f.c(),S(o,"class","TransscriptItemBgDiv"),S(s,"class","TransscriptItemContent"),S(n,"class",u="TranscriptItem "+e[15](e[28])),z(n,"Entity",null!==e[28].entityType),z(n,"Final",e[28].isFinal)},m(t,e){w(t,n,e),b(n,o),b(n,r),b(n,s),b(s,c),b(s,l),f&&f.m(s,null)},p(t,e){64&e&&d!==(d=t[28].word+"")&&T(c,d),t[30]<t[6].length?f?f.p(t,e):(f=It(t),f.c(),f.m(s,null)):f&&(f.d(1),f=null),64&e&&u!==(u="TranscriptItem "+t[15](t[28]))&&S(n,"class",u),64&e&&z(n,"Entity",null!==t[28].entityType),64&e&&z(n,"Final",t[28].isFinal)},i(t){i||G((()=>{i=st(o,e[13],{}),i.start()})),a||G((()=>{a=st(s,e[13],{}),a.start()}))},o:t,d(t){t&&v(n),f&&f.d()}}}function Lt(e){let n,o,i,r,s,c,l,a;return{c(){n=x("div"),o=x("div"),i=E(),r=x("div"),s=C("svg"),c=C("path"),S(o,"class","TransscriptItemBgDiv"),P(o,"background-color",e[4]),S(c,"stroke","currentColor"),S(c,"stroke-width","3"),S(c,"d","M7.191 11.444l4.059 6.107 7.376-12.949"),S(c,"fill","none"),S(c,"fill-rule","evenodd"),P(s,"width","2rem"),P(s,"height","2rem"),P(s,"position","absolute"),P(s,"transform","translate(-0.5rem, -0.5rem)"),P(s,"stroke","#eee"),S(s,"viewBox","0 0 24 24"),S(s,"xmlns","http://www.w3.org/2000/svg"),P(r,"width","1.0rem"),P(r,"height","1rem"),P(r,"position","relative"),S(n,"class","TranscriptItem")},m(t,e){w(t,n,e),b(n,o),b(n,i),b(n,r),b(r,s),b(s,c)},p(t,e){16&e&&P(o,"background-color",t[4])},i(t){l||G((()=>{l=st(c,e[11],{duration:500}),l.start()})),a||G((()=>{a=st(n,e[13],{duration:200,maxWidth:3}),a.start()}))},o:t,d(t){t&&v(n)}}}function jt(e){let n,o,i,s,c,l,a=e[7]&&Mt(e);return{c(){n=x("main"),a&&a.c(),o=E(),i=x("link"),this.c=t,P(n,"--voffset",e[1]),P(n,"--hoffset",e[2]),P(n,"--fontsize",e[3]),P(n,"--highlight-color",e[4]),P(n,"--text-bg-color",e[5]),z(n,"placementTop","top"===e[0]),S(i,"href","https://fonts.googleapis.com/css2?family=Saira+Condensed:wght@700&display=swap"),S(i,"rel","stylesheet")},m(t,r){w(t,n,r),a&&a.m(n,null),w(t,o,r),b(document.head,i),s=!0,c||(l=_(At,"message",e[14]),c=!0)},p(t,[e]){t[7]?a?(a.p(t,e),128&e&&ot(a,1)):(a=Mt(t),a.c(),ot(a,1),a.m(n,null)):a&&(nt={r:0,c:[],p:nt},it(a,1,1,(()=>{a=null})),nt.r||r(nt.c),nt=nt.p),(!s||2&e)&&P(n,"--voffset",t[1]),(!s||4&e)&&P(n,"--hoffset",t[2]),(!s||8&e)&&P(n,"--fontsize",t[3]),(!s||16&e)&&P(n,"--highlight-color",t[4]),(!s||32&e)&&P(n,"--text-bg-color",t[5]),1&e&&z(n,"placementTop","top"===t[0])},i(t){s||(ot(a),s=!0)},o(t){it(a),s=!1},d(t){t&&v(n),a&&a.d(),t&&v(o),v(i),c=!1,l()}}}function Ot(t,e,n){let o,i,{placement:r}=e,{voffset:s="3rem"}=e,{hoffset:c="2rem"}=e,{fontsize:l="1.5rem"}=e,{highlightcolor:a="#15e8b5"}=e,{textbgcolor:u="#202020"}=e,d=[],f=!1,h=null,g=null,p=Et.ClientState.Disconnected,m=!1,y=!1,$=!1;const b=L(),w=(t,e)=>{b.dispatchEvent(new CustomEvent(t,{detail:e,composed:!0}))},v=_t(St),x=_t(((t,{delay:e=0,duration:n=400})=>({delay:e,duration:n,easing:ht,css:t=>`\n opacity: ${Tt(Nt,t,0,1)};\n max-height: ${10*Tt(Nt,t,0,.6)}rem;\n `}))),C=_t(((t,{delay:e=0,duration:n=350,maxWidth:o=10})=>({delay:e,duration:n,css:t=>`\n max-width: ${Tt(Nt,t,0,1)*o}rem;\n `}))),k=t=>{if(void 0===t)return;i&&f&&i.updateVU(.5*Math.random()+.5,75*Math.random()+75),t.isFinal?_(d.length>0?2e3:0):d.length>0&&(m||n(17,m=!0),_(2e3));const e=`${t.contextId}/${t.id}`;null!==g?g!==e&&(n(9,$=!1),g=e):g=e,n(6,d=[]),t.words.forEach((t=>{n(6,d[t.index]={word:t.value,serialNumber:t.index,entityType:null,isFinal:t.isFinal,hide:!1},d)})),t.entities.forEach((t=>{n(6,d[t.startPosition].word=t.value,d),n(6,d[t.startPosition].entityType=t.type,d),n(6,d[t.startPosition].isFinal=t.isFinal,d),n(6,d[t.startPosition].hide=!1,d);for(let e=t.startPosition+1;e<t.endPosition;e++)d[e]&&n(6,d[e].hide=!0,d)})),n(6,d=d.filter((t=>!t.hide)))};b.onSegmentUpdate=k;const E=t=>{w("debug","big-transcript.ping 1")},_=(t=0)=>{S(),h=window.setTimeout((()=>{h=null,m&&n(17,m=!1)}),t)},S=()=>{null!==h&&(window.clearTimeout(h),h=null)};return j((()=>{const t=t=>k(t.detail);return b.addEventListener("speechsegment",t),b.addEventListener("ping",E),()=>{cancelAnimationFrame(null),b.removeEventListener("speechsegment",t),b.removeEventListener("ping",E)}})),t.$$set=t=>{"placement"in t&&n(0,r=t.placement),"voffset"in t&&n(1,s=t.voffset),"hoffset"in t&&n(2,c=t.hoffset),"fontsize"in t&&n(3,l=t.fontsize),"highlightcolor"in t&&n(4,a=t.highlightcolor),"textbgcolor"in t&&n(5,u=t.textbgcolor)},t.$$.update=()=>{if(64&t.$$.dirty&&n(10,o=0===d.length),196736&t.$$.dirty){const t=p===Et.ClientState.Recording||m;t!==y&&w("visibilitychanged",t),n(7,y=t)}},[r,s,c,l,a,u,d,y,i,$,o,v,x,C,t=>{switch(t.data.type){case"speechsegment":k(t.data.segment);break;case"holdstart":f=!0;break;case"holdend":f=!1;break;case"speechhandled":t.data.success&&n(9,$=!0);break;case"speechstate":n(16,p=t.data.state),p===Et.ClientState.Recording&&(n(9,$=!1),n(6,d=[]),g=null)}},t=>t.entityType||"",p,m,function(t){H[t?"unshift":"push"]((()=>{i=t,n(8,i)}))}]}class Ht extends ft{constructor(t){super(),this.shadowRoot.innerHTML="<style>.BigTranscript{position:relative;user-select:none;font-family:'Saira Condensed', sans-serif;text-transform:uppercase;color:#fff;font-size:var(--fontsize);line-height:135%;display:flex;flex-direction:row;justify-content:start;flex-wrap:wrap}.TranscriptItem{position:relative;display:flex;flex-direction:row;align-items:center}.Entity{color:var(--highlight-color)}.TransscriptItemContent{z-index:1;display:flex;flex-wrap:nowrap;flex-direction:row;align-items:center;overflow:hidden}.TransscriptItemBgDiv{position:absolute;box-sizing:content-box;width:100%;height:100%;top:-0.2rem;left:-0.8rem;margin:0;padding:0.2rem 0.8rem;background-color:var(--text-bg-color);z-index:-1}.placementTop{position:fixed;top:0;left:0;right:0;bottom:0;margin:var(--voffset) var(--hoffset) 0 var(--hoffset);z-index:50;pointer-events:none}.listening{animation:flow 1s linear infinite;background:linear-gradient(-60deg, #fff8, #fffc, #fff8, #fffc, #fff8);background-size:200%;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;-webkit-box-decoration-break:clone}@keyframes flow{0%{background-position:100% 50%}100%{background-position:0% 50%}}</style>",dt(this,{target:this.shadowRoot,props:R(this.attributes),customElement:!0},Ot,jt,l,{placement:0,voffset:1,hoffset:2,fontsize:3,highlightcolor:4,textbgcolor:5}),t&&(t.target&&w(t.target,this,t.anchor),t.props&&(this.$set(t.props),Q()))}static get observedAttributes(){return["placement","voffset","hoffset","fontsize","highlightcolor","textbgcolor"]}get placement(){return this.$$.ctx[0]}set placement(t){this.$set({placement:t}),Q()}get voffset(){return this.$$.ctx[1]}set voffset(t){this.$set({voffset:t}),Q()}get hoffset(){return this.$$.ctx[2]}set hoffset(t){this.$set({hoffset:t}),Q()}get fontsize(){return this.$$.ctx[3]}set fontsize(t){this.$set({fontsize:t}),Q()}get highlightcolor(){return this.$$.ctx[4]}set highlightcolor(t){this.$set({highlightcolor:t}),Q()}get textbgcolor(){return this.$$.ctx[5]}set textbgcolor(t){this.$set({textbgcolor:t}),Q()}}function Vt(e){let n,o,i,s,c,l,a,u,d;return{c(){n=x("main"),o=x("div"),i=x("div"),s=x("big-transcript"),c=E(),l=x("div"),a=k(e[1]),this.c=t,N(s,"textbgcolor",e[2]),S(l,"class","hint"),P(l,"opacity",e[5].opacity),S(i,"class","pad"),S(o,"class","drawer"),P(o,"background-color",e[2]),P(o,"opacity",e[3].opacity),P(o,"transform","translate(0px, "+e[4].y+"rem)"),S(n,"class","placementTop"),P(n,"--height",e[0])},m(t,r){w(t,n,r),b(n,o),b(o,i),b(i,s),b(i,c),b(i,l),b(l,a),u||(d=[_(window,"message",e[10]),_(s,"visibilitychanged",e[9])],u=!0)},p(t,[e]){4&e&&N(s,"textbgcolor",t[2]),2&e&&T(a,t[1]),32&e&&P(l,"opacity",t[5].opacity),4&e&&P(o,"background-color",t[2]),8&e&&P(o,"opacity",t[3].opacity),16&e&&P(o,"transform","translate(0px, "+t[4].y+"rem)"),1&e&&P(n,"--height",t[0])},i:t,o:t,d(t){t&&v(n),u=!1,r(d)}}}function Ut(t,n,o){let i,r,s,{height:c="8rem"}=n,{hint:l=""}=n,{textbgcolor:a="#202020"}=n,d=bt({y:-1},{duration:200});u(t,d,(t=>o(4,r=t)));let f=bt({opacity:0},{duration:200,easing:e});u(t,f,(t=>o(3,i=t)));let h=bt({opacity:0},{duration:200,delay:200,easing:e});u(t,h,(t=>o(5,s=t)));return t.$$set=t=>{"height"in t&&o(0,c=t.height),"hint"in t&&o(1,l=t.hint),"textbgcolor"in t&&o(2,a=t.textbgcolor)},[c,l,a,i,r,s,d,f,h,t=>{!1===t.detail?(d.set({y:-1},{easing:gt}),f.set({opacity:0}),h.set({opacity:0})):(d.set({y:0},{easing:pt}),f.set({opacity:1}),h.set({opacity:1}))},t=>{switch(t.data.type){case"speechsegment":h.set({opacity:0})}}]}customElements.get("big-transcript")?console.warn("Skipping re-defining customElement big-transcript"):customElements.define("big-transcript",Ht);class qt extends ft{constructor(t){super(),this.shadowRoot.innerHTML="<style>.placementTop{position:fixed;top:0;left:0;right:0;bottom:0;z-index:60;pointer-events:none}.drawer{width:100%;min-height:var(--height);display:flex;flex-direction:column;justify-content:flex-end;box-shadow:0 0 0.35rem #0004}.pad{position:relative;padding:2rem 2rem 0.65rem 1.5rem}.hint{font-family:'Saira Condensed', sans-serif;text-transform:uppercase;color:#fff7;font-size:0.9rem;line-height:135%;margin-top:0.15rem}</style>",dt(this,{target:this.shadowRoot,props:R(this.attributes),customElement:!0},Ut,Vt,l,{height:0,hint:1,textbgcolor:2}),t&&(t.target&&w(t.target,this,t.anchor),t.props&&(this.$set(t.props),Q()))}static get observedAttributes(){return["height","hint","textbgcolor"]}get height(){return this.$$.ctx[0]}set height(t){this.$set({height:t}),Q()}get hint(){return this.$$.ctx[1]}set hint(t){this.$set({hint:t}),Q()}get textbgcolor(){return this.$$.ctx[2]}set textbgcolor(t){this.$set({textbgcolor:t}),Q()}}customElements.get("transcript-drawer")?console.warn("Skipping re-defining customElement transcript-drawer"):customElements.define("transcript-drawer",qt)}();
//# sourceMappingURL=transcript-drawer.js.map

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc