Huge News!Announcing our $40M Series B led by Abstract Ventures.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 5.3.2 to 6.0.0

core/index.js

4

core/big-transcript.js

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

!function(t){"function"==typeof define&&define.amd?define(t):t()}((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 a(t,e){return t!=t?e==e:t!==e}function l(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)}}}function $(t,e){t.appendChild(e)}function y(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function b(t){const e=k("style");return w(y(t),e),e.sheet}function w(t,e){$(t.head||t,e)}function v(t,e,n){t.insertBefore(e,n||null)}function x(t){t.parentNode.removeChild(t)}function k(t){return document.createElement(t)}function E(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function T(t){return document.createTextNode(t)}function C(){return T(" ")}function _(){return T("")}function P(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function z(t,e,n,o){null===n?t.style.removeProperty(e):t.style.setProperty(e,n,o?"important":"")}function S(t,e,n){t.classList[n?"add":"remove"](e)}function D(t){const e={};for(const n of t)e[n.name]=n.value;return e}const I=new Map;let R,F=0;function N(t,e,n,o,i,r,s,c=0){const a=16.666/o;let l="{\n";for(let t=0;t<=1;t+=a){const o=e+(n-e)*r(t);l+=100*t+`%{${s(o,1-o)}}\n`}const u=l+`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=y(t),{stylesheet:h,rules:g}=I.get(f)||function(t,e){const n={stylesheet:b(e),rules:{}};return I.set(t,n),n}(f,t);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`,F+=1,d}function A(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(", "),F-=i,F||h((()=>{F||(I.forEach((t=>{const{stylesheet:e}=t;let n=e.cssRules.length;for(;n--;)e.deleteRule(n);t.rules={}})),I.clear())})))}function B(t){R=t}function M(){if(!R)throw new Error("Function called outside component initialization");return R}const j=[],O=[],L=[],U=[],V=Promise.resolve();let H=!1;function W(t){L.push(t)}const q=new Set;let G,J=0;function K(){const t=R;do{for(;J<j.length;){const t=j[J];J++,B(t),Q(t.$$)}for(B(null),j.length=0,J=0;O.length;)O.pop()();for(let t=0;t<L.length;t+=1){const e=L[t];q.has(e)||(q.add(e),e())}L.length=0}while(j.length);for(;U.length;)U.pop()();H=!1,q.clear(),B(t)}function Q(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(W)}}function X(t,e,n){t.dispatchEvent(function(t,e,{bubbles:n=!1,cancelable:o=!1}={}){const i=document.createEvent("CustomEvent");return i.initCustomEvent(t,n,o,e),i}(`${e?"intro":"outro"}${n}`))}const Y=new Set;function Z(t,e){t&&t.i&&(Y.delete(t),t.i(e))}const tt={duration:0};function et(n,o,i){let r,c,a=o(n,i),l=!1,u=0;function d(){r&&A(n,r)}function h(){const{delay:o=0,duration:i=300,easing:s=e,tick:h=t,css:g}=a||tt;g&&(r=N(n,0,1,i,o,s,g,u++)),h(0,1);const p=f()+o,$=p+i;c&&c.abort(),l=!0,W((()=>X(n,!0,"start"))),c=m((t=>{if(l){if(t>=$)return h(1,0),X(n,!0,"end"),d(),l=!1;if(t>=p){const e=s((t-p)/i);h(e,1-e)}}return l}))}let g=!1;return{start(){g||(g=!0,A(n),s(a)?(a=a(),(G||(G=Promise.resolve(),G.then((()=>{G=null}))),G).then(h)):h())},invalidate(){g=!1},end(){l&&(d(),l=!1)}}}const nt="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function ot(t,e,n,i){const{fragment:c,on_mount:a,on_destroy:l,after_update:u}=t.$$;c&&c.m(e,n),i||W((()=>{const e=a.map(o).filter(s);l?l.push(...e):r(e),t.$$.on_mount=[]})),u.forEach(W)}function it(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 rt(t,e){-1===t.$$.dirty[0]&&(j.push(t),H||(H=!0,V.then(K)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function st(e,n,o,s,c,a,l,u=[-1]){const d=R;B(e);const f=e.$$={fragment:null,ctx:null,props:a,update:t,not_equal:c,bound:i(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(d?d.$$.context:[])),callbacks:i(),dirty:u,skip_bound:!1,root:n.target||d.$$.root};l&&l(f.root);let h=!1;if(f.ctx=o?o(e,n.props||{},((t,n,...o)=>{const i=o.length?o[0]:n;return f.ctx&&c(f.ctx[t],f.ctx[t]=i)&&(!f.skip_bound&&f.bound[t]&&f.bound[t](i),h&&rt(e,t)),n})):[],f.update(),h=!0,r(f.before_update),f.fragment=!!s&&s(f.ctx),n.target){if(n.hydrate){const t=function(t){return Array.from(t.childNodes)}(n.target);f.fragment&&f.fragment.l(t),t.forEach(x)}else f.fragment&&f.fragment.c();n.intro&&Z(e.$$.fragment),ot(e,n.target,n.anchor,n.customElement),K()}B(d)}let ct;"function"==typeof HTMLElement&&(ct=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(){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&&!l(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});var at,lt,ut,dt,ft,ht,gt;function pt(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 mt(t){return t<.5?4*t*t*t:.5*Math.pow(2*t-2,3)+1}function $t(t,{delay:e=0,speed:n,duration:o,easing:i=mt}={}){let r=t.getTotalLength();const s=getComputedStyle(t);return"butt"!==s.strokeLinecap&&(r+=parseInt(s.strokeWidth)),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[t.Failed=0]="Failed",t[t.NoBrowserSupport=1]="NoBrowserSupport",t[t.NoAudioConsent=2]="NoAudioConsent",t[t.__UnrecoverableErrors=3]="__UnrecoverableErrors",t[t.Disconnected=4]="Disconnected",t[t.Disconnecting=5]="Disconnecting",t[t.Connecting=6]="Connecting",t[t.Preinitialized=7]="Preinitialized",t[t.Initializing=8]="Initializing",t[t.Connected=9]="Connected",t[t.Stopping=10]="Stopping",t[t.Starting=11]="Starting",t[t.Recording=12]="Recording"}(at||(at={})),function(t){t.SpeechlyFirstConnect="SpeechlyFirstConnect"}(lt||(lt={})),function(t){t.speechlypoweron="speechlypoweron",t.holdstart="holdstart",t.holdend="holdend",t.speechstate="speechstate",t.speechsegment="speechsegment",t.speechhandled="speechhandled",t.showhint="showhint",t.transcriptdrawerhint="hint",t.speechlyintroready="speechlyintroready",t.speechlyintroclosed="speechlyintroclosed"}(ut||(ut={})),function(t){t.Mic="mic",t.MicActive="micactive",t.Error="error",t.Denied="denied"}(dt||(dt={})),function(t){t.Hold="hold",t.Click="click",t.Noninteractive="noninteractive"}(ft||(ft={})),function(t){t.None="none",t.Connecting="connecting",t.Busy="busy"}(ht||(ht={})),function(t){t.None="none",t.Whirl="whirl"}(gt||(gt={})),at.Disconnected,at.Disconnecting,at.Connecting,at.Preinitialized,at.Initializing,at.Connected,at.Starting,at.Recording,at.Stopping,at.Failed,at.NoBrowserSupport,at.NoAudioConsent;const yt=[0,1];function bt(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),a=r-s;return(1-a)*t[s]+a*t[c]}function wt(t){!function(t,e,n){const o=y(t);if(!o.getElementById(e)){const t=k("style");t.id=e,t.textContent=n,w(o,t)}}(t,"svelte-1fz8oog","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}")}function vt(e){let n;return{c(){n=k("canvas"),z(n,"color",e[0]),z(n,"display","block"),z(n,"width","1.35rem"),z(n,"height","1.5rem"),z(n,"margin","0"),z(n,"padding","0 0.8rem 0 0rem"),z(n,"flex-grow","0"),z(n,"flex-shrink","0"),z(n,"flex-basis","1.35rem"),P(n,"class","svelte-1fz8oog")},m(t,o){v(t,n,o),e[3](n)},p(t,[e]){1&e&&z(n,"color",t[0])},i:t,o:t,d(t){t&&x(n),e[3](null)}}}function xt(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,a=[0,0];const l=(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()};var u;return u=()=>{let t;const e=2*(a.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?a[0]=.15*s+.85*a[0]:a[0]=.0625+.75*a[0];let h=1;for(;h<a.length;)a[h]=.25*a[h-1]+.5*a[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<a.length;h++){const t=a[h]*r.height;t*r.height>2*g?l(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?l(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)}},M().$$.on_mount.push(u),t.$$set=t=>{"color"in t&&n(0,o=t.color)},[o,r,i,function(t){O[t?"unshift":"push"]((()=>{r=t,n(1,r)}))}]}class kt 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&&!l(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}{constructor(t){super(),st(this,t,xt,vt,c,{color:0,updateVU:2},wt)}get updateVU(){return this.$$.ctx[2]}}const Et=[];function Tt(t){return"[object Date]"===Object.prototype.toString.call(t)}function Ct(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)=>Ct(t[n],e)));return t=>n.map((e=>e(t)))}if("object"===n){if(!t||!e)throw new Error("Object cannot be null");if(Tt(t)&&Tt(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]=Ct(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 _t(o,i={}){const r=function(e,n=t){let o;const i=new Set;function r(t){if(c(e,t)&&(e=t,o)){const t=!Et.length;for(const t of i)t[1](),Et.push(t,e);if(t){for(let t=0;t<Et.length;t+=2)Et[t][0](Et[t+1]);Et.length=0}}}return{set:r,update:function(t){r(t(e))},subscribe:function(s,c=t){const a=[s,c];return i.add(a),1===i.size&&(o=n(r)||t),s(e),()=>{i.delete(a),0===i.size&&(o(),o=null)}}}}(o);let s,a=o;function l(t,c){if(null==o)return r.set(o=t),Promise.resolve();a=t;let l=s,u=!1,{delay:d=0,duration:h=400,easing:g=e,interpolate:p=Ct}=n(n({},i),c);if(0===h)return l&&(l.abort(),l=null),r.set(o=a),Promise.resolve();const $=f()+d;let y;return s=m((e=>{if(e<$)return!0;u||(y=p(o,t),"function"==typeof h&&(h=h(o,t)),u=!0),l&&(l.abort(),l=null);const n=e-$;return n>h?(r.set(o=t),!1):(r.set(o=y(g(n/h))),!0)})),s.promise}return{set:l,update:(t,e)=>l(t(a,o),e),subscribe:r.subscribe}}const{window:Pt}=nt;function zt(t,e,n){const o=t.slice();return o[42]=e[n],o[44]=n,o}function St(t){let e;return{c(){e=k("div"),P(e,"class","TransscriptItemBgDiv")},m(t,n){v(t,e,n)},d(t){t&&x(e)}}}function Dt(e){let n,o;return{c(){n=k("div"),n.textContent="Listening...",P(n,"class","listening")},m(t,e){v(t,n,e)},i(t){o||W((()=>{o=et(n,e[21],{duration:400}),o.start()}))},o:t,d(t){t&&x(n)}}}function It(e){let n,o;return{c(){n=k("div"),P(n,"class","TransscriptItemBgDiv")},m(t,e){v(t,n,e)},p(t,n){e=t},i(t){o||W((()=>{o=et(n,e[21],{duration:e[14]}),o.start()}))},o:t,d(t){t&&x(n)}}}function Rt(t){let e,n;return{c(){e=k("span"),P(e,"style",n=t[44]<t[11].length-1?"width:0.25em;":t[13]?"width:1.2em;":"")},m(t,n){v(t,e,n)},p(t,o){10240&o[0]&&n!==(n=t[44]<t[11].length-1?"width:0.25em;":t[13]?"width:1.2em;":"")&&P(e,"style",n)},d(t){t&&x(e)}}}function Ft(e){let n,o,i,r,s,c,a,l=e[42].word+"",u=e[16]&&It(e),d=e[44]<e[11].length&&Rt(e);return{c(){n=k("div"),u&&u.c(),o=C(),i=k("div"),r=T(l),s=C(),d&&d.c(),P(i,"class","TransscriptItemContent"),P(n,"class",a="TranscriptItem "+e[23](e[42])),S(n,"Entity",null!==e[42].entityType),S(n,"Final",e[42].isFinal)},m(t,e){v(t,n,e),u&&u.m(n,null),$(n,o),$(n,i),$(i,r),$(i,s),d&&d.m(i,null)},p(t,s){(e=t)[16]?u?65536&s[0]&&Z(u,1):(u=It(e),u.c(),Z(u,1),u.m(n,o)):u&&(u.d(1),u=null),2048&s[0]&&l!==(l=e[42].word+"")&&function(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}(r,l),e[44]<e[11].length?d?d.p(e,s):(d=Rt(e),d.c(),d.m(i,null)):d&&(d.d(1),d=null),2048&s[0]&&a!==(a="TranscriptItem "+e[23](e[42]))&&P(n,"class",a),2048&s[0]&&S(n,"Entity",null!==e[42].entityType),2048&s[0]&&S(n,"Final",e[42].isFinal)},i(t){Z(u),c||W((()=>{c=et(i,e[21],{duration:e[14]}),c.start()}))},o:t,d(t){t&&x(n),u&&u.d(),d&&d.d()}}}function Nt(e){let n,o,i,r,s,c,a,l;return{c(){n=k("div"),o=k("div"),i=C(),r=k("div"),s=E("svg"),c=E("path"),P(o,"class","TransscriptItemBgDiv"),z(o,"background-color",e[5]),P(c,"stroke","currentColor"),P(c,"stroke-width","3"),P(c,"d","M7.191 11.444l4.059 6.107 7.376-12.949"),P(c,"fill","none"),P(c,"fill-rule","evenodd"),z(s,"width","2rem"),z(s,"height","2rem"),z(s,"position","absolute"),z(s,"transform","translate(-0.6rem, -0.5rem)"),z(s,"stroke","#eee"),P(s,"viewBox","0 0 24 24"),P(s,"xmlns","http://www.w3.org/2000/svg"),z(r,"width","1.0rem"),z(r,"height","1rem"),z(r,"position","relative"),P(n,"class","TranscriptItem")},m(t,e){v(t,n,e),$(n,o),$(n,i),$(n,r),$(r,s),$(s,c)},p(t,e){32&e[0]&&z(o,"background-color",t[5])},i(t){a||W((()=>{a=et(c,e[20],{duration:500}),a.start()})),l||W((()=>{l=et(n,e[21],{duration:200,maxWidth:3}),l.start()}))},o:t,d(t){t&&x(n)}}}function At(t){let e;return{c(){e=k("link"),P(e,"href","https://fonts.googleapis.com/css2?family=Saira+Condensed:wght@700&display=swap"),P(e,"rel","stylesheet")},m(t,n){v(t,e,n)},d(t){t&&x(e)}}}function Bt(t){let e;return{c(){e=k("link"),P(e,"href",t[10]),P(e,"rel","stylesheet")},m(t,n){v(t,e,n)},p(t,n){1024&n[0]&&P(e,"href",t[10])},d(t){t&&x(e)}}}function Mt(e){let n,o,i,r,s,c,a,l,u,d,f,h,g,p,m,y=e[16]&&St(),b={color:e[5]};s=new kt({props:b}),e[34](s);let w=e[17]&&Dt(e),E=e[11],T=[];for(let t=0;t<E.length;t+=1)T[t]=Ft(zt(e,E,t));let D=e[13]&&Nt(e),I=e[15]&&At(),R=void 0!==e[10]&&Bt(e);return{c(){var g;n=k("main"),o=k("div"),y&&y.c(),i=C(),r=k("div"),(g=s.$$.fragment)&&g.c(),c=C(),w&&w.c(),a=C();for(let t=0;t<T.length;t+=1)T[t].c();l=C(),D&&D.c(),u=C(),I&&I.c(),d=_(),f=C(),R&&R.c(),h=_(),this.c=t,P(r,"class","TransscriptItemContent"),P(o,"class","TranscriptItem"),P(n,"class","BigTranscript"),z(n,"--voffset",e[1]),z(n,"--hoffset",e[2]),z(n,"--fontsize",e[3]),z(n,"--color",e[4]),z(n,"--highlight-color",e[5]),z(n,"--text-bg-color",e[6]),z(n,"--gradient-stop1",e[7]),z(n,"--gradient-stop2",e[8]),z(n,"--marginbottom",e[9]),z(n,"--transition",e[18].transition),z(n,"opacity",e[18].transition),z(n,"max-height",10*bt(yt,e[18].transition,0,.6)+"rem"),z(n,"visibility",0!==e[18].transition?"visible":"hidden"),S(n,"placementTop","top"===e[0]),S(n,"defaultTypography",e[15])},m(t,b){v(t,n,b),$(n,o),y&&y.m(o,null),$(o,i),$(o,r),ot(s,r,null),$(r,c),w&&w.m(r,null),$(n,a);for(let t=0;t<T.length;t+=1)T[t].m(n,null);var x,k,E,C;$(n,l),D&&D.m(n,null),v(t,u,b),I&&I.m(document.head,null),$(document.head,d),v(t,f,b),R&&R.m(t,b),v(t,h,b),g=!0,p||(x=Pt,k="message",E=e[22],x.addEventListener(k,E,C),m=()=>x.removeEventListener(k,E,C),p=!0)},p(t,e){t[16]?y||(y=St(),y.c(),y.m(o,i)):y&&(y.d(1),y=null);const c={};if(32&e[0]&&(c.color=t[5]),s.$set(c),t[17]?w?131072&e[0]&&Z(w,1):(w=Dt(t),w.c(),Z(w,1),w.m(r,null)):w&&(w.d(1),w=null),8464384&e[0]){let o;for(E=t[11],o=0;o<E.length;o+=1){const i=zt(t,E,o);T[o]?(T[o].p(i,e),Z(T[o],1)):(T[o]=Ft(i),T[o].c(),Z(T[o],1),T[o].m(n,l))}for(;o<T.length;o+=1)T[o].d(1);T.length=E.length}t[13]?D?(D.p(t,e),8192&e[0]&&Z(D,1)):(D=Nt(t),D.c(),Z(D,1),D.m(n,null)):D&&(D.d(1),D=null),(!g||2&e[0])&&z(n,"--voffset",t[1]),(!g||4&e[0])&&z(n,"--hoffset",t[2]),(!g||8&e[0])&&z(n,"--fontsize",t[3]),(!g||16&e[0])&&z(n,"--color",t[4]),(!g||32&e[0])&&z(n,"--highlight-color",t[5]),(!g||64&e[0])&&z(n,"--text-bg-color",t[6]),(!g||128&e[0])&&z(n,"--gradient-stop1",t[7]),(!g||256&e[0])&&z(n,"--gradient-stop2",t[8]),(!g||512&e[0])&&z(n,"--marginbottom",t[9]),(!g||262144&e[0])&&z(n,"--transition",t[18].transition),(!g||262144&e[0])&&z(n,"opacity",t[18].transition),(!g||262144&e[0])&&z(n,"max-height",10*bt(yt,t[18].transition,0,.6)+"rem"),(!g||262144&e[0])&&z(n,"visibility",0!==t[18].transition?"visible":"hidden"),1&e[0]&&S(n,"placementTop","top"===t[0]),32768&e[0]&&S(n,"defaultTypography",t[15]),t[15]?I||(I=At(),I.c(),I.m(d.parentNode,d)):I&&(I.d(1),I=null),void 0!==t[10]?R?R.p(t,e):(R=Bt(t),R.c(),R.m(h.parentNode,h)):R&&(R.d(1),R=null)},i(t){if(!g){Z(s.$$.fragment,t),Z(w);for(let t=0;t<E.length;t+=1)Z(T[t]);Z(D),g=!0}},o(t){!function(t,e,n,o){if(t&&t.o){if(Y.has(t))return;Y.add(t),(void 0).c.push((()=>{Y.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}(s.$$.fragment,t),g=!1},d(t){t&&x(n),y&&y.d(),e[34](null),it(s),w&&w.d(),function(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}(T,t),D&&D.d(),t&&x(u),I&&I.d(t),x(d),t&&x(f),R&&R.d(t),t&&x(h),p=!1,m()}}}function jt(t,e,n){let o,i,r,s,c,a,l,d,{placement:f}=e,{voffset:h="3rem"}=e,{hoffset:g="2rem"}=e,{fontsize:p="1.5rem"}=e,{color:m="#ffffff"}=e,{highlightcolor:$="#15e8b5"}=e,{backgroundcolor:y="#202020"}=e,{gradientstop1:b="#ffffff88"}=e,{gradientstop2:w="#ffffffcc"}=e,{marginbottom:v="0rem"}=e,{formattext:x}=e,{demomode:k}=e,{customcssurl:E}=e,{customtypography:T}=e,C=[],_=null,P=null,z=at.Disconnected,S=!1,D=!1,I=!1,R=_t({transition:0},{duration:200});u(t,R,(t=>n(18,l=t)));const F=M(),N=pt($t),A=pt(((t,{delay:e=0,duration:n=350,maxWidth:o=10})=>({delay:e,duration:n,css:t=>`\n max-width: ${bt(yt,t,0,1)*o}rem;\n `}))),B=t=>{n(13,I=I||t)},j=t=>{n(30,z=t),z===at.Recording&&(n(13,I=!1),n(11,C=[]),P=null)},L=t=>{if(void 0===t)return;d&&(s||z===at.Recording)&&d.updateVU(.5*Math.random()+.5,75*Math.random()+75),t.isFinal?U(C.length>0?s?3500:2e3:0):C.length>0&&(S||n(31,S=!0),U(2e3));const e=`${t.contextId}/${t.id}`;null!==P?P!==e&&(n(13,I=!1),P=e):P=e,n(11,C=[]),t.words.forEach((t=>{n(11,C[t.index]={word:t.value,serialNumber:t.index,entityType:null,isFinal:t.isFinal,hide:!1},C)})),r?t.entities.forEach((t=>{n(11,C[t.startPosition].word=t.value,C),n(11,C[t.startPosition].entityType=t.type,C),n(11,C[t.startPosition].isFinal=t.isFinal,C),n(11,C[t.startPosition].hide=!1,C);for(let e=t.startPosition+1;e<t.endPosition;e++)C[e]&&n(11,C[e].hide=!0,C)})):t.entities.forEach((t=>{for(let e=t.startPosition;e<t.endPosition;e++)C[e]&&(n(11,C[e].entityType=t.type,C),n(11,C[e].isFinal=t.isFinal,C))})),n(11,C=C.filter((t=>!t.hide)))},U=(t=0)=>{V(),_=window.setTimeout((()=>{_=null,S&&n(31,S=!1)}),t)},V=()=>{null!==_&&(window.clearTimeout(_),_=null)};return t.$$set=t=>{"placement"in t&&n(0,f=t.placement),"voffset"in t&&n(1,h=t.voffset),"hoffset"in t&&n(2,g=t.hoffset),"fontsize"in t&&n(3,p=t.fontsize),"color"in t&&n(4,m=t.color),"highlightcolor"in t&&n(5,$=t.highlightcolor),"backgroundcolor"in t&&n(6,y=t.backgroundcolor),"gradientstop1"in t&&n(7,b=t.gradientstop1),"gradientstop2"in t&&n(8,w=t.gradientstop2),"marginbottom"in t&&n(9,v=t.marginbottom),"formattext"in t&&n(24,x=t.formattext),"demomode"in t&&n(25,k=t.demomode),"customcssurl"in t&&n(10,E=t.customcssurl),"customtypography"in t&&n(26,T=t.customtypography)},t.$$.update=()=>{if(2048&t.$$.dirty[0]&&n(17,o=0===C.length),64&t.$$.dirty[0]&&n(16,i="none"!==y),16777216&t.$$.dirty[0]&&(r=void 0===x||"false"!==x),33554432&t.$$.dirty[0]&&n(33,s=void 0!==k&&"false"!==k),67108864&t.$$.dirty[0]&&n(15,c=void 0===T||"false"===T),4&t.$$.dirty[1]&&n(14,a=s?800:350),1073741824&t.$$.dirty[0]|3&t.$$.dirty[1]){const t=z===at.Recording||S;t!==D&&(e="visibilitychanged",l=t,F.dispatchEvent(new CustomEvent(e,{detail:l,composed:!0}))),n(32,D=t),R.set({transition:D?1:0})}var e,l;4&t.$$.dirty[1]&&(s||U(0))},[f,h,g,p,m,$,y,b,w,v,E,C,d,I,a,c,i,o,l,R,N,A,t=>{switch(t.data.type){case ut.speechsegment:L(t.data.segment);break;case ut.speechhandled:B(t.data.success);break;case ut.speechstate:j(t.data.state)}},t=>t.entityType||"",x,k,T,B,j,L,z,S,D,s,function(t){O[t?"unshift":"push"]((()=>{d=t,n(12,d)}))}]}class Ot extends ct{constructor(t){super(),this.shadowRoot.innerHTML="<style>main{position:relative;user-select:none;display:flex;flex-direction:row;justify-content:start;flex-wrap:wrap;margin-bottom:calc(var(--marginbottom) * var(--transition));height:fit-content}.defaultTypography{font-family:'Saira Condensed', sans-serif;text-transform:uppercase;color:var(--color);font-size:var(--fontsize);line-height:135%}.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;white-space:nowrap}.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, var(--gradient-stop1), var(--gradient-stop2), var(--gradient-stop1), var(--gradient-stop2), var(--gradient-stop1));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:D(this.attributes),customElement:!0},jt,Mt,a,{placement:0,voffset:1,hoffset:2,fontsize:3,color:4,highlightcolor:5,backgroundcolor:6,gradientstop1:7,gradientstop2:8,marginbottom:9,formattext:24,demomode:25,customcssurl:10,customtypography:26,speechhandled:27,speechstate:28,speechsegment:29},null,[-1,-1]),t&&(t.target&&v(t.target,this,t.anchor),t.props&&(this.$set(t.props),K()))}static get observedAttributes(){return["placement","voffset","hoffset","fontsize","color","highlightcolor","backgroundcolor","gradientstop1","gradientstop2","marginbottom","formattext","demomode","customcssurl","customtypography","speechhandled","speechstate","speechsegment"]}get placement(){return this.$$.ctx[0]}set placement(t){this.$$set({placement:t}),K()}get voffset(){return this.$$.ctx[1]}set voffset(t){this.$$set({voffset:t}),K()}get hoffset(){return this.$$.ctx[2]}set hoffset(t){this.$$set({hoffset:t}),K()}get fontsize(){return this.$$.ctx[3]}set fontsize(t){this.$$set({fontsize:t}),K()}get color(){return this.$$.ctx[4]}set color(t){this.$$set({color:t}),K()}get highlightcolor(){return this.$$.ctx[5]}set highlightcolor(t){this.$$set({highlightcolor:t}),K()}get backgroundcolor(){return this.$$.ctx[6]}set backgroundcolor(t){this.$$set({backgroundcolor:t}),K()}get gradientstop1(){return this.$$.ctx[7]}set gradientstop1(t){this.$$set({gradientstop1:t}),K()}get gradientstop2(){return this.$$.ctx[8]}set gradientstop2(t){this.$$set({gradientstop2:t}),K()}get marginbottom(){return this.$$.ctx[9]}set marginbottom(t){this.$$set({marginbottom:t}),K()}get formattext(){return this.$$.ctx[24]}set formattext(t){this.$$set({formattext:t}),K()}get demomode(){return this.$$.ctx[25]}set demomode(t){this.$$set({demomode:t}),K()}get customcssurl(){return this.$$.ctx[10]}set customcssurl(t){this.$$set({customcssurl:t}),K()}get customtypography(){return this.$$.ctx[26]}set customtypography(t){this.$$set({customtypography:t}),K()}get speechhandled(){return this.$$.ctx[27]}get speechstate(){return this.$$.ctx[28]}get speechsegment(){return this.$$.ctx[29]}}customElements.get("big-transcript")?console.warn("Skipping re-defining customElement big-transcript"):customElements.define("big-transcript",Ot)}));
!function(t){"function"==typeof define&&define.amd?define(t):t()}((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 r(){return Object.create(null)}function i(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 a(t,e){return t!=t?e==e:t!==e}function l(t){return 0===Object.keys(t).length}function d(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 u="undefined"!=typeof window;let h=u?()=>window.performance.now():()=>Date.now(),f=u?t=>requestAnimationFrame(t):t;const p=new Set;function g(t){p.forEach((e=>{e.c(t)||(p.delete(e),e.f())})),0!==p.size&&f(g)}function m(t){let e;return 0===p.size&&f(g),{promise:new Promise((n=>{p.add(e={c:t,f:n})})),abort(){p.delete(e)}}}function $(t,e){t.appendChild(e)}function y(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function b(t){const e=T("style");return v(y(t),e),e.sheet}function v(t,e){$(t.head||t,e)}function w(t,e,n){t.insertBefore(e,n||null)}function x(t){t.parentNode.removeChild(t)}function T(t){return document.createElement(t)}function E(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function S(t){return document.createTextNode(t)}function C(){return S(" ")}function k(){return S("")}function A(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function _(t,e,n,o){null===n?t.style.removeProperty(e):t.style.setProperty(e,n,o?"important":"")}function P(t,e,n){t.classList[n?"add":"remove"](e)}function O(t){const e={};for(const n of t)e[n.name]=n.value;return e}const R=new Map;let F,z=0;function I(t,e,n,o,r,i,s,c=0){const a=16.666/o;let l="{\n";for(let t=0;t<=1;t+=a){const o=e+(n-e)*i(t);l+=100*t+`%{${s(o,1-o)}}\n`}const d=l+`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)}_${c}`,h=y(t),{stylesheet:f,rules:p}=R.get(h)||function(t,e){const n={stylesheet:b(e),rules:{}};return R.set(t,n),n}(h,t);p[u]||(p[u]=!0,f.insertRule(`@keyframes ${u} ${d}`,f.cssRules.length));const g=t.style.animation||"";return t.style.animation=`${g?`${g}, `:""}${u} ${o}ms linear ${r}ms 1 both`,z+=1,u}function N(t,e){const n=(t.style.animation||"").split(", "),o=n.filter(e?t=>t.indexOf(e)<0:t=>-1===t.indexOf("__svelte")),r=n.length-o.length;r&&(t.style.animation=o.join(", "),z-=r,z||f((()=>{z||(R.forEach((t=>{const{stylesheet:e}=t;let n=e.cssRules.length;for(;n--;)e.deleteRule(n);t.rules={}})),R.clear())})))}function D(t){F=t}function B(){if(!F)throw new Error("Function called outside component initialization");return F}const M=[],L=[],j=[],H=[],U=Promise.resolve();let V=!1;function W(t){j.push(t)}const X=new Set;let q,K=0;function Y(){const t=F;do{for(;K<M.length;){const t=M[K];K++,D(t),Z(t.$$)}for(D(null),M.length=0,K=0;L.length;)L.pop()();for(let t=0;t<j.length;t+=1){const e=j[t];X.has(e)||(X.add(e),e())}j.length=0}while(M.length);for(;H.length;)H.pop()();V=!1,X.clear(),D(t)}function Z(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(W)}}function G(t,e,n){t.dispatchEvent(function(t,e,{bubbles:n=!1,cancelable:o=!1}={}){const r=document.createEvent("CustomEvent");return r.initCustomEvent(t,n,o,e),r}(`${e?"intro":"outro"}${n}`))}const J=new Set;function Q(t,e){t&&t.i&&(J.delete(t),t.i(e))}const tt={duration:0};function et(n,o,r){let i,c,a=o(n,r),l=!1,d=0;function u(){i&&N(n,i)}function f(){const{delay:o=0,duration:r=300,easing:s=e,tick:f=t,css:p}=a||tt;p&&(i=I(n,0,1,r,o,s,p,d++)),f(0,1);const g=h()+o,$=g+r;c&&c.abort(),l=!0,W((()=>G(n,!0,"start"))),c=m((t=>{if(l){if(t>=$)return f(1,0),G(n,!0,"end"),u(),l=!1;if(t>=g){const e=s((t-g)/r);f(e,1-e)}}return l}))}let p=!1;return{start(){p||(p=!0,N(n),s(a)?(a=a(),(q||(q=Promise.resolve(),q.then((()=>{q=null}))),q).then(f)):f())},invalidate(){p=!1},end(){l&&(u(),l=!1)}}}const nt="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function ot(t,e,n,r){const{fragment:c,on_mount:a,on_destroy:l,after_update:d}=t.$$;c&&c.m(e,n),r||W((()=>{const e=a.map(o).filter(s);l?l.push(...e):i(e),t.$$.on_mount=[]})),d.forEach(W)}function rt(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 it(t,e){-1===t.$$.dirty[0]&&(M.push(t),V||(V=!0,U.then(Y)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function st(e,n,o,s,c,a,l,d=[-1]){const u=F;D(e);const h=e.$$={fragment:null,ctx:null,props:a,update:t,not_equal:c,bound:r(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(u?u.$$.context:[])),callbacks:r(),dirty:d,skip_bound:!1,root:n.target||u.$$.root};l&&l(h.root);let f=!1;if(h.ctx=o?o(e,n.props||{},((t,n,...o)=>{const r=o.length?o[0]:n;return h.ctx&&c(h.ctx[t],h.ctx[t]=r)&&(!h.skip_bound&&h.bound[t]&&h.bound[t](r),f&&it(e,t)),n})):[],h.update(),f=!0,i(h.before_update),h.fragment=!!s&&s(h.ctx),n.target){if(n.hydrate){const t=function(t){return Array.from(t.childNodes)}(n.target);h.fragment&&h.fragment.l(t),t.forEach(x)}else h.fragment&&h.fragment.c();n.intro&&Q(e.$$.fragment),ot(e,n.target,n.anchor,n.customElement),Y()}D(u)}let ct;"function"==typeof HTMLElement&&(ct=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(){i(this.$$.on_disconnect)}$destroy(){rt(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&&!l(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});var at,lt,dt,ut,ht;!function(t){t.NoAudioConsent="NoAudioConsent",t.NoBrowserSupport="NoBrowserSupport",t.Stopped="Stopped",t.Starting="Starting",t.Started="Started"}(at||(at={})),function(t){t.Started="started",t.Stopped="stopped",t.SegmentEnd="segment_end",t.Transcript="transcript",t.Entity="entity",t.Intent="intent",t.TentativeTranscript="tentative_transcript",t.TentativeEntities="tentative_entities",t.TentativeIntent="tentative_intent"}(lt||(lt={})),function(t){t.Opened="WEBSOCKET_OPEN",t.Closed="WEBSOCKET_CLOSED",t.AudioProcessorReady="SOURCE_SAMPLE_RATE_SET_SUCCESS",t.VadSignalHigh="VadSignalHigh",t.VadSignalLow="VadSignalLow"}(dt||(dt={})),function(t){t.connect="connect",t.initAudioProcessor="initAudioProcessor",t.adjustAudioProcessor="adjustAudioProcessor",t.SET_SHARED_ARRAY_BUFFERS="SET_SHARED_ARRAY_BUFFERS",t.CLOSE="CLOSE",t.START_CONTEXT="START_CONTEXT",t.SWITCH_CONTEXT="SWITCH_CONTEXT",t.STOP_CONTEXT="STOP_CONTEXT",t.AUDIO="AUDIO",t.startStream="startStream",t.stopStream="stopStream",t.setContextOptions="setContextOptions"}(ut||(ut={})),function(t){t[t.Failed=0]="Failed",t[t.Disconnected=1]="Disconnected",t[t.Connected=2]="Connected",t[t.Active=3]="Active"}(ht||(ht={})),new Map([[ht.Failed,"Failed"],[ht.Disconnected,"Disconnected"],[ht.Connected,"Connected"],[ht.Active,"Active"]]);for(var ft=[],pt=0;pt<256;++pt)ft.push((pt+256).toString(16).substr(1));var gt,mt,$t,yt,bt,vt,wt,xt,Tt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Et={exports:{}};function St(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){return t<.5?4*t*t*t:.5*Math.pow(2*t-2,3)+1}function kt(t,{delay:e=0,speed:n,duration:o,easing:r=Ct}={}){let i=t.getTotalLength();const s=getComputedStyle(t);return"butt"!==s.strokeLinecap&&(i+=parseInt(s.strokeWidth)),void 0===o?o=void 0===n?800:i/n:"function"==typeof o&&(o=o(i)),{delay:e,duration:o,easing:r,css:(t,e)=>`stroke-dasharray: ${t*i} ${e*i}`}}
/*! http://mths.be/base64 v0.1.0 by @mathias | MIT license */
gt=Et,mt=Et.exports,function(t){var e=mt,n=gt&&gt.exports==e&&gt,o="object"==typeof Tt&&Tt;o.global!==o&&o.window!==o||(t=o);var r=function(t){this.message=t};(r.prototype=new Error).name="InvalidCharacterError";var i=function(t){throw new r(t)},s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=/[\t\n\f\r ]/g,a={encode:function(t){t=String(t),/[^\0-\xFF]/.test(t)&&i("The string to be encoded contains characters outside of the Latin1 range.");for(var e,n,o,r,c=t.length%3,a="",l=-1,d=t.length-c;++l<d;)e=t.charCodeAt(l)<<16,n=t.charCodeAt(++l)<<8,o=t.charCodeAt(++l),a+=s.charAt((r=e+n+o)>>18&63)+s.charAt(r>>12&63)+s.charAt(r>>6&63)+s.charAt(63&r);return 2==c?(e=t.charCodeAt(l)<<8,n=t.charCodeAt(++l),a+=s.charAt((r=e+n)>>10)+s.charAt(r>>4&63)+s.charAt(r<<2&63)+"="):1==c&&(r=t.charCodeAt(l),a+=s.charAt(r>>2)+s.charAt(r<<4&63)+"=="),a},decode:function(t){var e=(t=String(t).replace(c,"")).length;e%4==0&&(e=(t=t.replace(/==?$/,"")).length),(e%4==1||/[^+a-zA-Z0-9/]/.test(t))&&i("Invalid character: the string to be decoded is not correctly encoded.");for(var n,o,r=0,a="",l=-1;++l<e;)o=s.indexOf(t.charAt(l)),n=r%4?64*n+o:o,r++%4&&(a+=String.fromCharCode(255&n>>(-2*r&6)));return a},version:"0.1.0"};if(e&&!e.nodeType)if(n)n.exports=a;else for(var l in a)a.hasOwnProperty(l)&&(e[l]=a[l]);else t.base64=a}(Tt),function(t){t.SpeechlyFirstConnect="SpeechlyFirstConnect"}($t||($t={})),function(t){t.speechlypoweron="speechlypoweron",t.holdstart="holdstart",t.holdend="holdend",t.speechstate="speechstate",t.audiosourcestate="audiosourcestate",t.speechsegment="speechsegment",t.speechhandled="speechhandled",t.showhint="showhint",t.transcriptdrawerhint="hint",t.speechlyintroready="speechlyintroready",t.speechlyintroclosed="speechlyintroclosed",t.startcontext="startcontext",t.stopcontext="stopcontext",t.requeststartmicrophone="requeststartmicrophone"}(yt||(yt={})),function(t){t.Mic="mic",t.MicActive="micactive",t.Error="error",t.Denied="denied"}(bt||(bt={})),function(t){t.Hold="hold",t.Click="click",t.Noninteractive="noninteractive"}(vt||(vt={})),function(t){t.None="none",t.Connecting="connecting",t.Busy="busy"}(wt||(wt={})),function(t){t.None="none",t.Whirl="whirl"}(xt||(xt={})),ht.Disconnected,ht.Connected,ht.Active,ht.Failed,at.NoBrowserSupport,at.NoAudioConsent;const At=[0,1];function _t(t,e,n,o){if(e<n)return t[0];if(e>o)return t[t.length-1];let r=(o-n)/(t.length-1);if(r<=0)return t[0];let i=(e-n)/r,s=Math.floor(i),c=Math.ceil(i),a=i-s;return(1-a)*t[s]+a*t[c]}function Pt(t){!function(t,e,n){const o=y(t);if(!o.getElementById(e)){const t=T("style");t.id=e,t.textContent=n,v(o,t)}}(t,"svelte-1fz8oog","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}")}function Ot(e){let n;return{c(){n=T("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"),A(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&&x(n),e[3](null)}}}function Rt(t,e,n){let{color:o="#60e0ff"}=e;const r=(t,e)=>{s=Date.now()>c?t:Math.max(s,t),c=Date.now()+e};let i,s=0,c=0,a=[0,0];const l=(t,e,n,o,r,i)=>{o<2*i&&(i=o/2),r<2*i&&(i=r/2),t.beginPath(),t.moveTo(e+i,n),t.arcTo(e+o,n,e+o,n+r,i),t.arcTo(e+o,n+r,e,n+r,i),t.arcTo(e,n+r,e,n,i),t.arcTo(e,n,e+o,n,i),t.closePath()};var d;return d=()=>{let t;const e=2*(a.length-1)+1,o=3*e+1*(e-1),d=()=>{if(t=requestAnimationFrame(d),!i)return;const e=i.getContext("2d");if(!e)return;let r=(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(i).getPropertyValue("width").slice(0,-2)),h=Number.parseInt(getComputedStyle(i).getPropertyValue("height").slice(0,-2));n(1,i.width=u*r,i),n(1,i.height=h*r,i),Date.now()<c?a[0]=.15*s+.85*a[0]:a[0]=.0625+.75*a[0];let f=1;for(;f<a.length;)a[f]=.25*a[f-1]+.5*a[f]+.0625,f++;e.clearRect(0,0,i.width,i.height);const p=3/o*i.width*.5,g=4/o*i.width;for(e.fillStyle=i.style.color||"#000000",f=0;f<a.length;f++){const t=a[f]*i.height;t*i.height>2*p?l(e,.5*i.width-p+f*g,.5*(i.height-t),2*p,t,p):(e.beginPath(),e.arc(.5*i.width+f*g,.5*i.height,t*i.height*.5,0,2*Math.PI)),e.fill(),f>0&&(t*i.height>2*p?l(e,.5*i.width-p-f*g,.5*(i.height-t),2*p,t,p):(e.beginPath(),e.arc(.5*i.width-f*g,.5*i.height,t*i.height*.5,0,2*Math.PI)),e.fill())}};return d(),r(1,500),()=>{cancelAnimationFrame(t)}},B().$$.on_mount.push(d),t.$$set=t=>{"color"in t&&n(0,o=t.color)},[o,i,r,function(t){L[t?"unshift":"push"]((()=>{i=t,n(1,i)}))}]}class Ft extends class{$destroy(){rt(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&&!l(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}{constructor(t){super(),st(this,t,Rt,Ot,c,{color:0,updateVU:2},Pt)}get updateVU(){return this.$$.ctx[2]}}const zt=[];function It(t){return"[object Date]"===Object.prototype.toString.call(t)}function Nt(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)=>Nt(t[n],e)));return t=>n.map((e=>e(t)))}if("object"===n){if(!t||!e)throw new Error("Object cannot be null");if(It(t)&&It(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]=Nt(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 Dt(o,r={}){const i=function(e,n=t){let o;const r=new Set;function i(t){if(c(e,t)&&(e=t,o)){const t=!zt.length;for(const t of r)t[1](),zt.push(t,e);if(t){for(let t=0;t<zt.length;t+=2)zt[t][0](zt[t+1]);zt.length=0}}}return{set:i,update:function(t){i(t(e))},subscribe:function(s,c=t){const a=[s,c];return r.add(a),1===r.size&&(o=n(i)||t),s(e),()=>{r.delete(a),0===r.size&&(o(),o=null)}}}}(o);let s,a=o;function l(t,c){if(null==o)return i.set(o=t),Promise.resolve();a=t;let l=s,d=!1,{delay:u=0,duration:f=400,easing:p=e,interpolate:g=Nt}=n(n({},r),c);if(0===f)return l&&(l.abort(),l=null),i.set(o=a),Promise.resolve();const $=h()+u;let y;return s=m((e=>{if(e<$)return!0;d||(y=g(o,t),"function"==typeof f&&(f=f(o,t)),d=!0),l&&(l.abort(),l=null);const n=e-$;return n>f?(i.set(o=t),!1):(i.set(o=y(p(n/f))),!0)})),s.promise}return{set:l,update:(t,e)=>l(t(a,o),e),subscribe:i.subscribe}}const{window:Bt}=nt;function Mt(t,e,n){const o=t.slice();return o[42]=e[n],o[44]=n,o}function Lt(t){let e;return{c(){e=T("div"),A(e,"class","TransscriptItemBgDiv")},m(t,n){w(t,e,n)},d(t){t&&x(e)}}}function jt(e){let n,o;return{c(){n=T("div"),n.textContent="Listening...",A(n,"class","listening")},m(t,e){w(t,n,e)},i(t){o||W((()=>{o=et(n,e[21],{duration:400}),o.start()}))},o:t,d(t){t&&x(n)}}}function Ht(e){let n,o;return{c(){n=T("div"),A(n,"class","TransscriptItemBgDiv")},m(t,e){w(t,n,e)},p(t,n){e=t},i(t){o||W((()=>{o=et(n,e[21],{duration:e[14]}),o.start()}))},o:t,d(t){t&&x(n)}}}function Ut(t){let e,n;return{c(){e=T("span"),A(e,"style",n=t[44]<t[11].length-1?"width:0.25em;":t[13]?"width:1.2em;":"")},m(t,n){w(t,e,n)},p(t,o){10240&o[0]&&n!==(n=t[44]<t[11].length-1?"width:0.25em;":t[13]?"width:1.2em;":"")&&A(e,"style",n)},d(t){t&&x(e)}}}function Vt(e){let n,o,r,i,s,c,a,l=e[42].word+"",d=e[16]&&Ht(e),u=e[44]<e[11].length&&Ut(e);return{c(){n=T("div"),d&&d.c(),o=C(),r=T("div"),i=S(l),s=C(),u&&u.c(),A(r,"class","TransscriptItemContent"),A(n,"class",a="TranscriptItem "+e[23](e[42])),P(n,"Entity",null!==e[42].entityType),P(n,"Final",e[42].isFinal)},m(t,e){w(t,n,e),d&&d.m(n,null),$(n,o),$(n,r),$(r,i),$(r,s),u&&u.m(r,null)},p(t,s){(e=t)[16]?d?65536&s[0]&&Q(d,1):(d=Ht(e),d.c(),Q(d,1),d.m(n,o)):d&&(d.d(1),d=null),2048&s[0]&&l!==(l=e[42].word+"")&&function(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}(i,l),e[44]<e[11].length?u?u.p(e,s):(u=Ut(e),u.c(),u.m(r,null)):u&&(u.d(1),u=null),2048&s[0]&&a!==(a="TranscriptItem "+e[23](e[42]))&&A(n,"class",a),2048&s[0]&&P(n,"Entity",null!==e[42].entityType),2048&s[0]&&P(n,"Final",e[42].isFinal)},i(t){Q(d),c||W((()=>{c=et(r,e[21],{duration:e[14]}),c.start()}))},o:t,d(t){t&&x(n),d&&d.d(),u&&u.d()}}}function Wt(e){let n,o,r,i,s,c,a,l;return{c(){n=T("div"),o=T("div"),r=C(),i=T("div"),s=E("svg"),c=E("path"),A(o,"class","TransscriptItemBgDiv"),_(o,"background-color",e[5]),A(c,"stroke","currentColor"),A(c,"stroke-width","3"),A(c,"d","M7.191 11.444l4.059 6.107 7.376-12.949"),A(c,"fill","none"),A(c,"fill-rule","evenodd"),_(s,"width","2rem"),_(s,"height","2rem"),_(s,"position","absolute"),_(s,"transform","translate(-0.6rem, -0.5rem)"),_(s,"stroke","#eee"),A(s,"viewBox","0 0 24 24"),A(s,"xmlns","http://www.w3.org/2000/svg"),_(i,"width","1.0rem"),_(i,"height","1rem"),_(i,"position","relative"),A(n,"class","TranscriptItem")},m(t,e){w(t,n,e),$(n,o),$(n,r),$(n,i),$(i,s),$(s,c)},p(t,e){32&e[0]&&_(o,"background-color",t[5])},i(t){a||W((()=>{a=et(c,e[20],{duration:500}),a.start()})),l||W((()=>{l=et(n,e[21],{duration:200,maxWidth:3}),l.start()}))},o:t,d(t){t&&x(n)}}}function Xt(t){let e;return{c(){e=T("link"),A(e,"href","https://fonts.googleapis.com/css2?family=Saira+Condensed:wght@700&display=swap"),A(e,"rel","stylesheet")},m(t,n){w(t,e,n)},d(t){t&&x(e)}}}function qt(t){let e;return{c(){e=T("link"),A(e,"href",t[10]),A(e,"rel","stylesheet")},m(t,n){w(t,e,n)},p(t,n){1024&n[0]&&A(e,"href",t[10])},d(t){t&&x(e)}}}function Kt(e){let n,o,r,i,s,c,a,l,d,u,h,f,p,g,m,y=e[16]&&Lt(),b={color:e[5]};s=new Ft({props:b}),e[34](s);let v=e[17]&&jt(e),E=e[11],S=[];for(let t=0;t<E.length;t+=1)S[t]=Vt(Mt(e,E,t));let O=e[13]&&Wt(e),R=e[15]&&Xt(),F=void 0!==e[10]&&qt(e);return{c(){var p;n=T("main"),o=T("div"),y&&y.c(),r=C(),i=T("div"),(p=s.$$.fragment)&&p.c(),c=C(),v&&v.c(),a=C();for(let t=0;t<S.length;t+=1)S[t].c();l=C(),O&&O.c(),d=C(),R&&R.c(),u=k(),h=C(),F&&F.c(),f=k(),this.c=t,A(i,"class","TransscriptItemContent"),A(o,"class","TranscriptItem"),A(n,"class","BigTranscript"),_(n,"--voffset",e[1]),_(n,"--hoffset",e[2]),_(n,"--fontsize",e[3]),_(n,"--color",e[4]),_(n,"--highlight-color",e[5]),_(n,"--text-bg-color",e[6]),_(n,"--gradient-stop1",e[7]),_(n,"--gradient-stop2",e[8]),_(n,"--marginbottom",e[9]),_(n,"--transition",e[18].transition),_(n,"opacity",e[18].transition),_(n,"max-height",10*_t(At,e[18].transition,0,.6)+"rem"),_(n,"visibility",0!==e[18].transition?"visible":"hidden"),P(n,"placementTop","top"===e[0]),P(n,"defaultTypography",e[15])},m(t,b){w(t,n,b),$(n,o),y&&y.m(o,null),$(o,r),$(o,i),ot(s,i,null),$(i,c),v&&v.m(i,null),$(n,a);for(let t=0;t<S.length;t+=1)S[t].m(n,null);var x,T,E,C;$(n,l),O&&O.m(n,null),w(t,d,b),R&&R.m(document.head,null),$(document.head,u),w(t,h,b),F&&F.m(t,b),w(t,f,b),p=!0,g||(x=Bt,T="message",E=e[22],x.addEventListener(T,E,C),m=()=>x.removeEventListener(T,E,C),g=!0)},p(t,e){t[16]?y||(y=Lt(),y.c(),y.m(o,r)):y&&(y.d(1),y=null);const c={};if(32&e[0]&&(c.color=t[5]),s.$set(c),t[17]?v?131072&e[0]&&Q(v,1):(v=jt(t),v.c(),Q(v,1),v.m(i,null)):v&&(v.d(1),v=null),8464384&e[0]){let o;for(E=t[11],o=0;o<E.length;o+=1){const r=Mt(t,E,o);S[o]?(S[o].p(r,e),Q(S[o],1)):(S[o]=Vt(r),S[o].c(),Q(S[o],1),S[o].m(n,l))}for(;o<S.length;o+=1)S[o].d(1);S.length=E.length}t[13]?O?(O.p(t,e),8192&e[0]&&Q(O,1)):(O=Wt(t),O.c(),Q(O,1),O.m(n,null)):O&&(O.d(1),O=null),(!p||2&e[0])&&_(n,"--voffset",t[1]),(!p||4&e[0])&&_(n,"--hoffset",t[2]),(!p||8&e[0])&&_(n,"--fontsize",t[3]),(!p||16&e[0])&&_(n,"--color",t[4]),(!p||32&e[0])&&_(n,"--highlight-color",t[5]),(!p||64&e[0])&&_(n,"--text-bg-color",t[6]),(!p||128&e[0])&&_(n,"--gradient-stop1",t[7]),(!p||256&e[0])&&_(n,"--gradient-stop2",t[8]),(!p||512&e[0])&&_(n,"--marginbottom",t[9]),(!p||262144&e[0])&&_(n,"--transition",t[18].transition),(!p||262144&e[0])&&_(n,"opacity",t[18].transition),(!p||262144&e[0])&&_(n,"max-height",10*_t(At,t[18].transition,0,.6)+"rem"),(!p||262144&e[0])&&_(n,"visibility",0!==t[18].transition?"visible":"hidden"),1&e[0]&&P(n,"placementTop","top"===t[0]),32768&e[0]&&P(n,"defaultTypography",t[15]),t[15]?R||(R=Xt(),R.c(),R.m(u.parentNode,u)):R&&(R.d(1),R=null),void 0!==t[10]?F?F.p(t,e):(F=qt(t),F.c(),F.m(f.parentNode,f)):F&&(F.d(1),F=null)},i(t){if(!p){Q(s.$$.fragment,t),Q(v);for(let t=0;t<E.length;t+=1)Q(S[t]);Q(O),p=!0}},o(t){!function(t,e,n,o){if(t&&t.o){if(J.has(t))return;J.add(t),(void 0).c.push((()=>{J.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}(s.$$.fragment,t),p=!1},d(t){t&&x(n),y&&y.d(),e[34](null),rt(s),v&&v.d(),function(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}(S,t),O&&O.d(),t&&x(d),R&&R.d(t),x(u),t&&x(h),F&&F.d(t),t&&x(f),g=!1,m()}}}function Yt(t,e,n){let o,r,i,s,c,a,l,u,{placement:h}=e,{voffset:f="3rem"}=e,{hoffset:p="2rem"}=e,{fontsize:g="1.5rem"}=e,{color:m="#ffffff"}=e,{highlightcolor:$="#15e8b5"}=e,{backgroundcolor:y="#202020"}=e,{gradientstop1:b="#ffffff88"}=e,{gradientstop2:v="#ffffffcc"}=e,{marginbottom:w="0rem"}=e,{formattext:x}=e,{demomode:T}=e,{customcssurl:E}=e,{customtypography:S}=e,C=[],k=null,A=null,_=ht.Disconnected,P=!1,O=!1,R=!1,F=Dt({transition:0},{duration:200});d(t,F,(t=>n(18,l=t)));const z=B(),I=St(kt),N=St(((t,{delay:e=0,duration:n=350,maxWidth:o=10})=>({delay:e,duration:n,css:t=>`\n max-width: ${_t(At,t,0,1)*o}rem;\n `}))),D=t=>{n(13,R=R||t)},M=t=>{n(30,_=t),_===ht.Active&&(n(13,R=!1),n(11,C=[]),A=null)},j=t=>{if(void 0===t)return;u&&(s||_===ht.Active)&&u.updateVU(.5*Math.random()+.5,75*Math.random()+75),t.isFinal?H(C.length>0?s?3500:2e3:0):C.length>0&&(P||n(31,P=!0),H(2e3));const e=`${t.contextId}/${t.id}`;null!==A?A!==e&&(n(13,R=!1),A=e):A=e,n(11,C=[]),t.words.forEach((t=>{n(11,C[t.index]={word:t.value,serialNumber:t.index,entityType:null,isFinal:t.isFinal,hide:!1},C)})),i?t.entities.forEach((t=>{n(11,C[t.startPosition].word=t.value,C),n(11,C[t.startPosition].entityType=t.type,C),n(11,C[t.startPosition].isFinal=t.isFinal,C),n(11,C[t.startPosition].hide=!1,C);for(let e=t.startPosition+1;e<t.endPosition;e++)C[e]&&n(11,C[e].hide=!0,C)})):t.entities.forEach((t=>{for(let e=t.startPosition;e<t.endPosition;e++)C[e]&&(n(11,C[e].entityType=t.type,C),n(11,C[e].isFinal=t.isFinal,C))})),n(11,C=C.filter((t=>!t.hide)))},H=(t=0)=>{U(),k=window.setTimeout((()=>{k=null,P&&n(31,P=!1)}),t)},U=()=>{null!==k&&(window.clearTimeout(k),k=null)};return t.$$set=t=>{"placement"in t&&n(0,h=t.placement),"voffset"in t&&n(1,f=t.voffset),"hoffset"in t&&n(2,p=t.hoffset),"fontsize"in t&&n(3,g=t.fontsize),"color"in t&&n(4,m=t.color),"highlightcolor"in t&&n(5,$=t.highlightcolor),"backgroundcolor"in t&&n(6,y=t.backgroundcolor),"gradientstop1"in t&&n(7,b=t.gradientstop1),"gradientstop2"in t&&n(8,v=t.gradientstop2),"marginbottom"in t&&n(9,w=t.marginbottom),"formattext"in t&&n(24,x=t.formattext),"demomode"in t&&n(25,T=t.demomode),"customcssurl"in t&&n(10,E=t.customcssurl),"customtypography"in t&&n(26,S=t.customtypography)},t.$$.update=()=>{if(2048&t.$$.dirty[0]&&n(17,o=0===C.length),64&t.$$.dirty[0]&&n(16,r="none"!==y),16777216&t.$$.dirty[0]&&(i=void 0===x||"false"!==x),33554432&t.$$.dirty[0]&&n(33,s=void 0!==T&&"false"!==T),67108864&t.$$.dirty[0]&&n(15,c=void 0===S||"false"===S),4&t.$$.dirty[1]&&n(14,a=s?800:350),1073741824&t.$$.dirty[0]|3&t.$$.dirty[1]){const t=_===ht.Active||P;t!==O&&(e="visibilitychanged",l=t,z.dispatchEvent(new CustomEvent(e,{detail:l,composed:!0}))),n(32,O=t),F.set({transition:O?1:0})}var e,l;4&t.$$.dirty[1]&&(s||H(0))},[h,f,p,g,m,$,y,b,v,w,E,C,u,R,a,c,r,o,l,F,I,N,t=>{switch(t.data.type){case yt.speechsegment:j(t.data.segment);break;case yt.speechhandled:D(t.data.success);break;case yt.speechstate:M(t.data.state)}},t=>t.entityType||"",x,T,S,D,M,j,_,P,O,s,function(t){L[t?"unshift":"push"]((()=>{u=t,n(12,u)}))}]}class Zt extends ct{constructor(t){super(),this.shadowRoot.innerHTML="<style>main{position:relative;user-select:none;display:flex;flex-direction:row;justify-content:start;flex-wrap:wrap;margin-bottom:calc(var(--marginbottom) * var(--transition));height:fit-content}.defaultTypography{font-family:'Saira Condensed', sans-serif;text-transform:uppercase;color:var(--color);font-size:var(--fontsize);line-height:135%}.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;white-space:nowrap}.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, var(--gradient-stop1), var(--gradient-stop2), var(--gradient-stop1), var(--gradient-stop2), var(--gradient-stop1));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:O(this.attributes),customElement:!0},Yt,Kt,a,{placement:0,voffset:1,hoffset:2,fontsize:3,color:4,highlightcolor:5,backgroundcolor:6,gradientstop1:7,gradientstop2:8,marginbottom:9,formattext:24,demomode:25,customcssurl:10,customtypography:26,speechhandled:27,speechstate:28,speechsegment:29},null,[-1,-1]),t&&(t.target&&w(t.target,this,t.anchor),t.props&&(this.$set(t.props),Y()))}static get observedAttributes(){return["placement","voffset","hoffset","fontsize","color","highlightcolor","backgroundcolor","gradientstop1","gradientstop2","marginbottom","formattext","demomode","customcssurl","customtypography","speechhandled","speechstate","speechsegment"]}get placement(){return this.$$.ctx[0]}set placement(t){this.$$set({placement:t}),Y()}get voffset(){return this.$$.ctx[1]}set voffset(t){this.$$set({voffset:t}),Y()}get hoffset(){return this.$$.ctx[2]}set hoffset(t){this.$$set({hoffset:t}),Y()}get fontsize(){return this.$$.ctx[3]}set fontsize(t){this.$$set({fontsize:t}),Y()}get color(){return this.$$.ctx[4]}set color(t){this.$$set({color:t}),Y()}get highlightcolor(){return this.$$.ctx[5]}set highlightcolor(t){this.$$set({highlightcolor:t}),Y()}get backgroundcolor(){return this.$$.ctx[6]}set backgroundcolor(t){this.$$set({backgroundcolor:t}),Y()}get gradientstop1(){return this.$$.ctx[7]}set gradientstop1(t){this.$$set({gradientstop1:t}),Y()}get gradientstop2(){return this.$$.ctx[8]}set gradientstop2(t){this.$$set({gradientstop2:t}),Y()}get marginbottom(){return this.$$.ctx[9]}set marginbottom(t){this.$$set({marginbottom:t}),Y()}get formattext(){return this.$$.ctx[24]}set formattext(t){this.$$set({formattext:t}),Y()}get demomode(){return this.$$.ctx[25]}set demomode(t){this.$$set({demomode:t}),Y()}get customcssurl(){return this.$$.ctx[10]}set customcssurl(t){this.$$set({customcssurl:t}),Y()}get customtypography(){return this.$$.ctx[26]}set customtypography(t){this.$$set({customtypography:t}),Y()}get speechhandled(){return this.$$.ctx[27]}get speechstate(){return this.$$.ctx[28]}get speechsegment(){return this.$$.ctx[29]}}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,4 @@

!function(t){"function"==typeof define&&define.amd?define(t):t()}((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 s(t,e){return t!=t?e==e:t!==e}function c(t){return 0===Object.keys(t).length}function a(t,e){t.appendChild(e)}function l(t,e,n){const o=function(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;if(e&&e.host)return e;return t.ownerDocument}(t);if(!o.getElementById(e)){const t=f("style");t.id=e,t.textContent=n,function(t,e){a(t.head||t,e)}(o,t)}}function d(t,e,n){t.insertBefore(e,n||null)}function u(t){t.parentNode.removeChild(t)}function f(t){return document.createElement(t)}function h(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function p(t){return document.createTextNode(t)}function g(){return p(" ")}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){null===n?t.style.removeProperty(e):t.style.setProperty(e,n,o?"important":"")}function x(t,e,n){t.classList[n?"add":"remove"](e)}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 k(){if(!b)throw new Error("Function called outside component initialization");return b}const z=[],E=[],M=[],_=[],C=Promise.resolve();let N=!1;function D(t){M.push(t)}const B=new Set;let F=0;function S(){const t=b;do{for(;F<z.length;){const t=z[F];F++,y(t),L(t.$$)}for(y(null),z.length=0,F=0;E.length;)E.pop()();for(let t=0;t<M.length;t+=1){const e=M[t];B.has(e)||(B.add(e),e())}M.length=0}while(z.length);for(;_.length;)_.pop()();N=!1,B.clear(),y(t)}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(D)}}const A=new Set;function R(t,e){t&&t.i&&(A.delete(t),t.i(e))}function I(t,e,n,o){if(t&&t.o){if(A.has(t))return;A.add(t),undefined.c.push((()=>{A.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}const P="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function T(t){t&&t.c()}function V(t,n,r,s){const{fragment:c,on_mount:a,on_destroy:l,after_update:d}=t.$$;c&&c.m(n,r),s||D((()=>{const n=a.map(e).filter(i);l?l.push(...n):o(n),t.$$.on_mount=[]})),d.forEach(D)}function G(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 H(t,e){-1===t.$$.dirty[0]&&(z.push(t),N||(N=!0,C.then(S)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function j(e,i,r,s,c,a,l,d=[-1]){const f=b;y(e);const h=e.$$={fragment:null,ctx:null,props:a,update:t,not_equal:c,bound:n(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(i.context||(f?f.$$.context:[])),callbacks:n(),dirty:d,skip_bound:!1,root:i.target||f.$$.root};l&&l(h.root);let p=!1;if(h.ctx=r?r(e,i.props||{},((t,n,...o)=>{const i=o.length?o[0]:n;return h.ctx&&c(h.ctx[t],h.ctx[t]=i)&&(!h.skip_bound&&h.bound[t]&&h.bound[t](i),p&&H(e,t)),n})):[],h.update(),p=!0,o(h.before_update),h.fragment=!!s&&s(h.ctx),i.target){if(i.hydrate){const t=function(t){return Array.from(t.childNodes)}(i.target);h.fragment&&h.fragment.l(t),t.forEach(u)}else h.fragment&&h.fragment.c();i.intro&&R(e.$$.fragment),V(e,i.target,i.anchor,i.customElement),S()}y(f)}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(){G(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)}});class U{$destroy(){G(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)}}function q(t){l(t,"svelte-1mwhwtl",".Frame.svelte-1mwhwtl{position:absolute;width:100%;height:100%;top:50%;left:50%;transform-origin:50% 50%;transform:translate(-50%, -50%) rotate(var(--fx-rotation));transition:width 0.1s, height 0.1s;pointer-events:none;user-select:none}")}function W(e){let n,o,i,r,s,c,l;return{c(){n=h("svg"),o=h("defs"),i=h("linearGradient"),r=h("stop"),s=h("stop"),c=h("circle"),l=h("circle"),$(r,"stop-color","var(--gradient-stop1)"),$(r,"offset","0%"),$(s,"stop-color","var(--gradient-stop2)"),$(s,"offset","100%"),$(i,"x1","50%"),$(i,"y1","0%"),$(i,"x2","50%"),$(i,"y2","100%"),$(i,"id","a"),$(c,"cx","46"),$(c,"cy","46"),$(c,"r",e[0]),$(c,"stroke","none"),$(c,"fill","var(--frame-background)"),$(l,"cx","46"),$(l,"cy","46"),$(l,"r",e[0]),$(l,"stroke","url(#a)"),$(l,"stroke-width","var(--frame-stroke-width)"),$(l,"fill","none"),$(n,"class","Frame svelte-1mwhwtl"),$(n,"viewBox","0 0 92 92"),$(n,"xmlns","http://www.w3.org/2000/svg")},m(t,e){d(t,n,e),a(n,o),a(o,i),a(i,r),a(i,s),a(n,c),a(n,l)},p(t,[e]){1&e&&$(c,"r",t[0]),1&e&&$(l,"r",t[0])},i:t,o:t,d(t){t&&u(n)}}}function J(t,e,n){let{frameRadius:o=46}=e;return t.$$set=t=>{"frameRadius"in t&&n(0,o=t.frameRadius)},[o]}class K extends U{constructor(t){super(),j(this,t,J,W,r,{frameRadius:0},q)}}var Q,X,Y,Z,tt,et,nt;!function(t){t[t.Failed=0]="Failed",t[t.NoBrowserSupport=1]="NoBrowserSupport",t[t.NoAudioConsent=2]="NoAudioConsent",t[t.__UnrecoverableErrors=3]="__UnrecoverableErrors",t[t.Disconnected=4]="Disconnected",t[t.Disconnecting=5]="Disconnecting",t[t.Connecting=6]="Connecting",t[t.Preinitialized=7]="Preinitialized",t[t.Initializing=8]="Initializing",t[t.Connected=9]="Connected",t[t.Stopping=10]="Stopping",t[t.Starting=11]="Starting",t[t.Recording=12]="Recording"}(Q||(Q={})),function(t){t.SpeechlyFirstConnect="SpeechlyFirstConnect"}(X||(X={})),function(t){t.speechlypoweron="speechlypoweron",t.holdstart="holdstart",t.holdend="holdend",t.speechstate="speechstate",t.speechsegment="speechsegment",t.speechhandled="speechhandled",t.showhint="showhint",t.transcriptdrawerhint="hint",t.speechlyintroready="speechlyintroready",t.speechlyintroclosed="speechlyintroclosed"}(Y||(Y={})),function(t){t.Mic="mic",t.MicActive="micactive",t.Error="error",t.Denied="denied"}(Z||(Z={})),function(t){t.Hold="hold",t.Click="click",t.Noninteractive="noninteractive"}(tt||(tt={})),function(t){t.None="none",t.Connecting="connecting",t.Busy="busy"}(et||(et={})),function(t){t.None="none",t.Whirl="whirl"}(nt||(nt={}));const ot={[Q.Disconnected]:{icon:"mic",behaviour:"click",effect:"none",triggerFx:"whirl"},[Q.Disconnecting]:{icon:"mic",behaviour:"noninteractive",effect:"connecting"},[Q.Connecting]:{icon:"mic",behaviour:"noninteractive",effect:"connecting"},[Q.Preinitialized]:{icon:"mic",behaviour:"hold",effect:"none",triggerFx:"whirl"},[Q.Initializing]:{icon:"mic",behaviour:"noninteractive",effect:"connecting"},[Q.Connected]:{icon:"mic",behaviour:"hold",effect:"none",triggerFx:"whirl"},[Q.Starting]:{icon:"mic",behaviour:"hold",effect:"connecting"},[Q.Recording]:{icon:"micactive",behaviour:"hold",effect:"none"},[Q.Stopping]:{icon:"mic",behaviour:"noninteractive",effect:"busy"},[Q.Failed]:{icon:"error",behaviour:"click",effect:"none"},[Q.NoBrowserSupport]:{icon:"error",behaviour:"click",effect:"none"},[Q.NoAudioConsent]:{icon:"denied",behaviour:"click",effect:"none"}};function it(t){l(t,"svelte-s2u2hd",".Icon.svelte-s2u2hd{position:absolute;width:var(--icon-size);height:var(--icon-size);top:50%;left:50%;transform:translate(-50%, -50%);pointer-events:none;transition:0.25s;opacity:var(--icon-opacity)}")}function rt(t){let e,n,o,i,r,s,c,l,f,g,m,v,x;return{c(){e=h("svg"),n=h("linearGradient"),o=h("animate"),i=h("animate"),r=h("stop"),s=h("stop"),c=h("stop"),l=h("stop"),f=h("stop"),g=p(">\n "),m=h("g"),v=h("path"),x=h("rect"),$(o,"attributeName","y1"),$(o,"values","-200%; 0%;"),$(o,"dur","2s"),$(o,"repeatCount","indefinite"),$(i,"attributeName","y2"),$(i,"values","200%; 400%;"),$(i,"dur","2s"),$(i,"repeatCount","indefinite"),$(r,"offset","0%"),$(r,"stop-color","var(--gradient-stop1)"),$(s,"offset","25%"),$(s,"stop-color","var(--gradient-stop2)"),$(c,"offset","50%"),$(c,"stop-color","var(--gradient-stop1)"),$(l,"offset","75%"),$(l,"stop-color","var(--gradient-stop2)"),$(f,"offset","100%"),$(f,"stop-color","var(--gradient-stop1)"),$(n,"id","gradient"),$(n,"x1","50%"),$(n,"y1","-200%"),$(n,"x2","50%"),$(n,"y2","200%"),$(v,"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"),$(x,"x","20"),$(x,"y","1"),$(x,"width","16"),$(x,"height","37"),$(x,"rx","8"),$(m,"fill","url(#gradient)"),$(m,"fill-rule","evenodd"),$(e,"class","Icon svelte-s2u2hd"),$(e,"viewBox","0 0 56 56"),$(e,"xmlns","http://www.w3.org/2000/svg")},m(t,u){d(t,e,u),a(e,n),a(n,o),a(n,i),a(n,r),a(n,s),a(n,c),a(n,l),a(n,f),a(e,g),a(e,m),a(m,v),a(m,x)},d(t){t&&u(e)}}}function st(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","var(--icon-color)"),$(n,"fill-rule","evenodd"),$(e,"class","Icon svelte-s2u2hd"),$(e,"viewBox","0 0 56 56"),$(e,"xmlns","http://www.w3.org/2000/svg")},m(t,r){d(t,e,r),a(e,n),a(n,o),a(n,i)},d(t){t&&u(e)}}}function ct(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","var(--icon-color)"),$(n,"fill-rule","evenodd"),$(e,"class","Icon svelte-s2u2hd"),$(e,"viewBox","0 0 56 56"),$(e,"xmlns","http://www.w3.org/2000/svg")},m(t,r){d(t,e,r),a(e,n),a(n,o),a(n,i)},d(t){t&&u(e)}}}function at(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","var(--icon-color)"),$(n,"fill-rule","nonzero"),$(e,"class","Icon svelte-s2u2hd"),$(e,"viewBox","0 0 56 56"),$(e,"xmlns","http://www.w3.org/2000/svg")},m(t,r){d(t,e,r),a(e,n),a(n,o),a(n,i)},d(t){t&&u(e)}}}function lt(e){let n,o,i,r,s=e[0]===Z.MicActive&&rt(),c=e[0]===Z.Mic&&st(),a=e[0]===Z.Error&&ct(),l=e[0]===Z.Denied&&at();return{c(){s&&s.c(),n=g(),c&&c.c(),o=g(),a&&a.c(),i=g(),l&&l.c(),r=p("")},m(t,e){s&&s.m(t,e),d(t,n,e),c&&c.m(t,e),d(t,o,e),a&&a.m(t,e),d(t,i,e),l&&l.m(t,e),d(t,r,e)},p(t,[e]){t[0]===Z.MicActive?s||(s=rt(),s.c(),s.m(n.parentNode,n)):s&&(s.d(1),s=null),t[0]===Z.Mic?c||(c=st(),c.c(),c.m(o.parentNode,o)):c&&(c.d(1),c=null),t[0]===Z.Error?a||(a=ct(),a.c(),a.m(i.parentNode,i)):a&&(a.d(1),a=null),t[0]===Z.Denied?l||(l=at(),l.c(),l.m(r.parentNode,r)):l&&(l.d(1),l=null)},i:t,o:t,d(t){s&&s.d(t),t&&u(n),c&&c.d(t),t&&u(o),a&&a.d(t),t&&u(i),l&&l.d(t),t&&u(r)}}}function dt(t,e,n){let{icon:o=Z.Mic}=e;return t.$$set=t=>{"icon"in t&&n(0,o=t.icon)},[o]}class ut extends U{constructor(t){super(),j(this,t,dt,lt,r,{icon:0},it)}}function ft(t){l(t,"svelte-1fpkb0k",".Fx.svelte-1fpkb0k{position:absolute;width:var(--fx-size);height:var(--fx-size);top:50%;left:50%;transform-origin:50% 50%;transform:translate(-50%, -50%) rotate(var(--fx-rotation));pointer-events:none;opacity:var(--fx-opacity)}")}function ht(e){let n,o,i,r,s,c,l,f;return{c(){n=h("svg"),o=h("defs"),i=h("linearGradient"),r=h("stop"),s=h("stop"),c=h("filter"),l=h("feGaussianBlur"),f=h("circle"),$(r,"stop-color","var(--fx-gradient-stop1)"),$(r,"offset","0%"),$(s,"stop-color","var(--fx-gradient-stop2)"),$(s,"offset","100%"),$(i,"x1","50%"),$(i,"y1","10%"),$(i,"x2","50%"),$(i,"y2","100%"),$(i,"id","a"),$(l,"stdDeviation","18"),$(l,"in","SourceGraphic"),$(c,"x","-35%"),$(c,"y","-35%"),$(c,"width","170%"),$(c,"height","170%"),$(c,"filterUnits","objectBoundingBox"),$(c,"id","b"),$(f,"filter","url(#b)"),$(f,"cx","124"),$(f,"cy","124"),$(f,"r","79"),$(f,"fill","url(#a)"),$(f,"fillrule","evenodd"),$(n,"class","Fx svelte-1fpkb0k"),$(n,"viewBox","0 0 246 246"),$(n,"xmlns","http://www.w3.org/2000/svg")},m(t,e){d(t,n,e),a(n,o),a(o,i),a(i,r),a(i,s),a(o,c),a(c,l),a(n,f)},p:t,i:t,o:t,d(t){t&&u(n)}}}class pt extends U{constructor(t){super(),j(this,t,null,ht,r,{},ft)}}const{window:gt}=P;function mt(t){let e;return{c(){e=f("link"),$(e,"href",t[9]),$(e,"rel","stylesheet")},m(t,n){d(t,e,n)},p(t,n){512&n[0]&&$(e,"href",t[9])},d(t){t&&u(e)}}}function $t(e){let n,i,r,s,c,l,h,p,w,b,y,k,z=void 0!==e[9]&&mt(e);return r=new pt({}),c=new K({props:{frameRadius:e[16]}}),h=new ut({props:{icon:e[15].icon}}),{c(){z&&z.c(),n=g(),i=f("main"),T(r.$$.fragment),s=g(),T(c.$$.fragment),l=g(),T(h.$$.fragment),p=g(),w=f("slot"),this.c=t,$(i,"class","HoldableButton"),v(i,"width",e[0]),v(i,"height",e[0]),v(i,"--gradient-stop1",e[5]),v(i,"--gradient-stop2",e[6]),v(i,"--fx-gradient-stop1",e[7]||e[5]),v(i,"--fx-gradient-stop2",e[8]||e[6]),v(i,"--fx-rotation",e[11][1]+"deg"),v(i,"--fx-opacity",e[14][1]),v(i,"--fx-size",e[2]),v(i,"--icon-opacity",e[13][1]),v(i,"--icon-size",e[1]),v(i,"--icon-color",e[4]),v(i,"--frame-stroke-width",e[17]),v(i,"--frame-background",e[3]),v(i,"transform","scale("+e[12][1]+")"),x(i,"pressed",e[10])},m(t,o){z&&z.m(t,o),d(t,n,o),d(t,i,o),V(r,i,null),a(i,s),V(c,i,null),a(i,l),V(h,i,null),a(i,p),a(i,w),b=!0,y||(k=[m(gt,"mouseup",e[19]),m(gt,"keydown",e[20]),m(gt,"keyup",e[21]),m(i,"mousedown",e[18]),m(i,"touchstart",e[18]),m(i,"dragstart",e[18]),m(i,"mouseup",e[19]),m(i,"touchend",e[19],{passive:!0}),m(i,"dragend",e[19])],y=!0)},p(t,e){void 0!==t[9]?z?z.p(t,e):(z=mt(t),z.c(),z.m(n.parentNode,n)):z&&(z.d(1),z=null);const o={};65536&e[0]&&(o.frameRadius=t[16]),c.$set(o);const r={};32768&e[0]&&(r.icon=t[15].icon),h.$set(r),(!b||1&e[0])&&v(i,"width",t[0]),(!b||1&e[0])&&v(i,"height",t[0]),(!b||32&e[0])&&v(i,"--gradient-stop1",t[5]),(!b||64&e[0])&&v(i,"--gradient-stop2",t[6]),(!b||160&e[0])&&v(i,"--fx-gradient-stop1",t[7]||t[5]),(!b||320&e[0])&&v(i,"--fx-gradient-stop2",t[8]||t[6]),(!b||2048&e[0])&&v(i,"--fx-rotation",t[11][1]+"deg"),(!b||16384&e[0])&&v(i,"--fx-opacity",t[14][1]),(!b||4&e[0])&&v(i,"--fx-size",t[2]),(!b||8192&e[0])&&v(i,"--icon-opacity",t[13][1]),(!b||2&e[0])&&v(i,"--icon-size",t[1]),(!b||16&e[0])&&v(i,"--icon-color",t[4]),(!b||131072&e[0])&&v(i,"--frame-stroke-width",t[17]),(!b||8&e[0])&&v(i,"--frame-background",t[3]),(!b||4096&e[0])&&v(i,"transform","scale("+t[12][1]+")"),1024&e[0]&&x(i,"pressed",t[10])},i(t){b||(R(r.$$.fragment,t),R(c.$$.fragment,t),R(h.$$.fragment,t),b=!0)},o(t){I(r.$$.fragment,t),I(c.$$.fragment,t),I(h.$$.fragment,t),b=!1},d(t){z&&z.d(t),t&&u(n),t&&u(i),G(r),G(c),G(h),y=!1,o(k)}}}function vt(t,e,n){let o,i,r,s,{icon:c=Q.Disconnected}=e,{capturekey:a=" "}=e,{hide:l}=e,{size:d="80px"}=e,{holdscale:u="1.35"}=e,{borderscale:f="0.075"}=e,{iconsize:h="60%"}=e,{fxsize:p="250%"}=e,{backgroundcolor:g="#ffffff"}=e,{iconcolor:m="#000000"}=e,{gradientstop1:$="#15e8b5"}=e,{gradientstop2:v="#4fa1f9"}=e,{fxgradientstop1:x}=e,{fxgradientstop2:w}=e,{customcssurl:b}=e;let y=!1,z=0,E=[0,0],M=[0,0],_=[1,1],C=[0,0],N=ot[c],D=null,B=0,F=0;const S=k(),L=(t,e)=>{S.dispatchEvent(new CustomEvent(t,{detail:e,composed:!0}))};var A;A=()=>{n(12,M=[1,0]);let t=null;const e=()=>{B=F,F=(new Date).getTime();const i=F-(B||F);N.effect===et.Connecting&&n(13,_[0]=.25*Math.cos(F/2500*Math.PI*2)+.25,_),N.effect===et.Busy&&n(13,_[0]=.25*Math.cos(F/1e3*Math.PI*2)+.25,_),n(12,M=[M[0],P(M[1],o?M[0]:0,.2,i)]),n(13,_=[_[0],P(_[1],_[0],.08,i)]),n(14,C=[C[0],P(C[1],C[0],.08,i)]),n(11,E=[E[0]+2.5,P(E[1],E[0],.05,i)]),t=requestAnimationFrame(e)};return e(),()=>cancelAnimationFrame(t)},k().$$.on_mount.push(A);const R=t=>{t.preventDefault(),t.stopPropagation(),o&&!y&&(n(10,y=!0),z=Date.now(),T(),N.triggerFx===nt.Whirl&&n(11,E[0]+=720,E),N.behaviour===tt.Click&&null===D&&(D=window.setTimeout((()=>{n(14,C[0]=0,C),D=null}),500)),S.onholdstart&&S.onholdstart(),L(Y.holdstart))},I=()=>{if(y){n(10,y=!1);const t={timeMs:Date.now()-z};T(),null!==D&&window.clearTimeout(D),S.onholdend&&S.onholdend(t),L("holdend",t)}},P=(t,e,n,o)=>t*(1-(n=Math.pow(n,1e3/60/o)))+e*n,T=(t=5)=>{void 0!==navigator.vibrate&&navigator.vibrate(t)};return t.$$set=t=>{"icon"in t&&n(22,c=t.icon),"capturekey"in t&&n(23,a=t.capturekey),"hide"in t&&n(24,l=t.hide),"size"in t&&n(0,d=t.size),"holdscale"in t&&n(25,u=t.holdscale),"borderscale"in t&&n(26,f=t.borderscale),"iconsize"in t&&n(1,h=t.iconsize),"fxsize"in t&&n(2,p=t.fxsize),"backgroundcolor"in t&&n(3,g=t.backgroundcolor),"iconcolor"in t&&n(4,m=t.iconcolor),"gradientstop1"in t&&n(5,$=t.gradientstop1),"gradientstop2"in t&&n(6,v=t.gradientstop2),"fxgradientstop1"in t&&n(7,x=t.fxgradientstop1),"fxgradientstop2"in t&&n(8,w=t.fxgradientstop2),"customcssurl"in t&&n(9,b=t.customcssurl)},t.$$.update=()=>{16777216&t.$$.dirty[0]&&(o=void 0===l||"false"===l),67108864&t.$$.dirty[0]&&n(17,i=""+46*f),67108864&t.$$.dirty[0]&&n(16,r=46-23*f),33554432&t.$$.dirty[0]&&(s=u),4195328&t.$$.dirty[0]&&((t,e)=>{switch(n(15,N=ot[e]),n(12,M[0]=t?s:1,M),n(14,C[0]=t||e==Q.Recording?1:0,C),N.icon){case Z.MicActive:case Z.Mic:case Z.Denied:case Z.Error:n(13,_[0]=1,_)}})(y,c)},[d,h,p,g,m,$,v,x,w,b,y,E,M,_,C,N,r,i,R,I,t=>{a&&(t.key===a&&(document.hasFocus()&&document.activeElement!==document.body&&document.activeElement!==document.documentElement&&document.activeElement||null||(t.repeat?(t.preventDefault(),t.stopPropagation()):R(t))))},t=>{t.key===a&&I()},c,a,l,u,f,()=>y]}class xt extends O{constructor(t){super(),this.shadowRoot.innerHTML="<style>main{text-align:left;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}</style>",j(this,{target:this.shadowRoot,props:w(this.attributes),customElement:!0},vt,$t,s,{icon:22,capturekey:23,hide:24,size:0,holdscale:25,borderscale:26,iconsize:1,fxsize:2,backgroundcolor:3,iconcolor:4,gradientstop1:5,gradientstop2:6,fxgradientstop1:7,fxgradientstop2:8,customcssurl:9,isbuttonpressed:27},null,[-1,-1]),t&&(t.target&&d(t.target,this,t.anchor),t.props&&(this.$set(t.props),S()))}static get observedAttributes(){return["icon","capturekey","hide","size","holdscale","borderscale","iconsize","fxsize","backgroundcolor","iconcolor","gradientstop1","gradientstop2","fxgradientstop1","fxgradientstop2","customcssurl","isbuttonpressed"]}get icon(){return this.$$.ctx[22]}set icon(t){this.$$set({icon:t}),S()}get capturekey(){return this.$$.ctx[23]}set capturekey(t){this.$$set({capturekey:t}),S()}get hide(){return this.$$.ctx[24]}set hide(t){this.$$set({hide:t}),S()}get size(){return this.$$.ctx[0]}set size(t){this.$$set({size:t}),S()}get holdscale(){return this.$$.ctx[25]}set holdscale(t){this.$$set({holdscale:t}),S()}get borderscale(){return this.$$.ctx[26]}set borderscale(t){this.$$set({borderscale:t}),S()}get iconsize(){return this.$$.ctx[1]}set iconsize(t){this.$$set({iconsize:t}),S()}get fxsize(){return this.$$.ctx[2]}set fxsize(t){this.$$set({fxsize:t}),S()}get backgroundcolor(){return this.$$.ctx[3]}set backgroundcolor(t){this.$$set({backgroundcolor:t}),S()}get iconcolor(){return this.$$.ctx[4]}set iconcolor(t){this.$$set({iconcolor:t}),S()}get gradientstop1(){return this.$$.ctx[5]}set gradientstop1(t){this.$$set({gradientstop1:t}),S()}get gradientstop2(){return this.$$.ctx[6]}set gradientstop2(t){this.$$set({gradientstop2:t}),S()}get fxgradientstop1(){return this.$$.ctx[7]}set fxgradientstop1(t){this.$$set({fxgradientstop1:t}),S()}get fxgradientstop2(){return this.$$.ctx[8]}set fxgradientstop2(t){this.$$set({fxgradientstop2:t}),S()}get customcssurl(){return this.$$.ctx[9]}set customcssurl(t){this.$$set({customcssurl:t}),S()}get isbuttonpressed(){return this.$$.ctx[27]}}customElements.get("holdable-button")?console.warn("Skipping re-defining customElement holdable-button"):customElements.define("holdable-button",xt)}));
!function(t){"function"==typeof define&&define.amd?define(t):t()}((function(){"use strict";function t(){}function e(t){return t()}function n(){return Object.create(null)}function o(t){t.forEach(e)}function r(t){return"function"==typeof t}function i(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function s(t,e){return t!=t?e==e:t!==e}function c(t){return 0===Object.keys(t).length}function a(t,e){t.appendChild(e)}function d(t,e,n){const o=function(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;if(e&&e.host)return e;return t.ownerDocument}(t);if(!o.getElementById(e)){const t=f("style");t.id=e,t.textContent=n,function(t,e){a(t.head||t,e)}(o,t)}}function l(t,e,n){t.insertBefore(e,n||null)}function u(t){t.parentNode.removeChild(t)}function f(t){return document.createElement(t)}function h(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function p(t){return document.createTextNode(t)}function g(){return p(" ")}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){null===n?t.style.removeProperty(e):t.style.setProperty(e,n,o?"important":"")}function x(t,e,n){t.classList[n?"add":"remove"](e)}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 k(){if(!b)throw new Error("Function called outside component initialization");return b}const E=[],S=[],A=[],C=[],z=Promise.resolve();let _=!1;function T(t){A.push(t)}const M=new Set;let N=0;function O(){const t=b;do{for(;N<E.length;){const t=E[N];N++,y(t),F(t.$$)}for(y(null),E.length=0,N=0;S.length;)S.pop()();for(let t=0;t<A.length;t+=1){const e=A[t];M.has(e)||(M.add(e),e())}A.length=0}while(E.length);for(;C.length;)C.pop()();_=!1,M.clear(),y(t)}function F(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(T)}}const D=new Set;function L(t,e){t&&t.i&&(D.delete(t),t.i(e))}function R(t,e,n,o){if(t&&t.o){if(D.has(t))return;D.add(t),undefined.c.push((()=>{D.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}const B="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function P(t){t&&t.c()}function I(t,n,i,s){const{fragment:c,on_mount:a,on_destroy:d,after_update:l}=t.$$;c&&c.m(n,i),s||T((()=>{const n=a.map(e).filter(r);d?d.push(...n):o(n),t.$$.on_mount=[]})),l.forEach(T)}function V(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 H(t,e){-1===t.$$.dirty[0]&&(E.push(t),_||(_=!0,z.then(O)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function j(e,r,i,s,c,a,d,l=[-1]){const f=b;y(e);const h=e.$$={fragment:null,ctx:null,props:a,update:t,not_equal:c,bound:n(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(r.context||(f?f.$$.context:[])),callbacks:n(),dirty:l,skip_bound:!1,root:r.target||f.$$.root};d&&d(h.root);let p=!1;if(h.ctx=i?i(e,r.props||{},((t,n,...o)=>{const r=o.length?o[0]:n;return h.ctx&&c(h.ctx[t],h.ctx[t]=r)&&(!h.skip_bound&&h.bound[t]&&h.bound[t](r),p&&H(e,t)),n})):[],h.update(),p=!0,o(h.before_update),h.fragment=!!s&&s(h.ctx),r.target){if(r.hydrate){const t=function(t){return Array.from(t.childNodes)}(r.target);h.fragment&&h.fragment.l(t),t.forEach(u)}else h.fragment&&h.fragment.c();r.intro&&L(e.$$.fragment),I(e,r.target,r.anchor,r.customElement),O()}y(f)}let U;"function"==typeof HTMLElement&&(U=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(e).filter(r);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){o(this.$$.on_disconnect)}$destroy(){V(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)}});class W{$destroy(){V(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)}}function X(t){d(t,"svelte-1mwhwtl",".Frame.svelte-1mwhwtl{position:absolute;width:100%;height:100%;top:50%;left:50%;transform-origin:50% 50%;transform:translate(-50%, -50%) rotate(var(--fx-rotation));transition:width 0.1s, height 0.1s;pointer-events:none;user-select:none}")}function G(e){let n,o,r,i,s,c,d;return{c(){n=h("svg"),o=h("defs"),r=h("linearGradient"),i=h("stop"),s=h("stop"),c=h("circle"),d=h("circle"),$(i,"stop-color","var(--gradient-stop1)"),$(i,"offset","0%"),$(s,"stop-color","var(--gradient-stop2)"),$(s,"offset","100%"),$(r,"x1","50%"),$(r,"y1","0%"),$(r,"x2","50%"),$(r,"y2","100%"),$(r,"id","a"),$(c,"cx","46"),$(c,"cy","46"),$(c,"r",e[0]),$(c,"stroke","none"),$(c,"fill","var(--frame-background)"),$(d,"cx","46"),$(d,"cy","46"),$(d,"r",e[0]),$(d,"stroke","url(#a)"),$(d,"stroke-width","var(--frame-stroke-width)"),$(d,"fill","none"),$(n,"class","Frame svelte-1mwhwtl"),$(n,"viewBox","0 0 92 92"),$(n,"xmlns","http://www.w3.org/2000/svg")},m(t,e){l(t,n,e),a(n,o),a(o,r),a(r,i),a(r,s),a(n,c),a(n,d)},p(t,[e]){1&e&&$(c,"r",t[0]),1&e&&$(d,"r",t[0])},i:t,o:t,d(t){t&&u(n)}}}function q(t,e,n){let{frameRadius:o=46}=e;return t.$$set=t=>{"frameRadius"in t&&n(0,o=t.frameRadius)},[o]}class K extends W{constructor(t){super(),j(this,t,q,G,i,{frameRadius:0},X)}}var Y,Z,J,Q,tt;!function(t){t.NoAudioConsent="NoAudioConsent",t.NoBrowserSupport="NoBrowserSupport",t.Stopped="Stopped",t.Starting="Starting",t.Started="Started"}(Y||(Y={})),function(t){t.Started="started",t.Stopped="stopped",t.SegmentEnd="segment_end",t.Transcript="transcript",t.Entity="entity",t.Intent="intent",t.TentativeTranscript="tentative_transcript",t.TentativeEntities="tentative_entities",t.TentativeIntent="tentative_intent"}(Z||(Z={})),function(t){t.Opened="WEBSOCKET_OPEN",t.Closed="WEBSOCKET_CLOSED",t.AudioProcessorReady="SOURCE_SAMPLE_RATE_SET_SUCCESS",t.VadSignalHigh="VadSignalHigh",t.VadSignalLow="VadSignalLow"}(J||(J={})),function(t){t.connect="connect",t.initAudioProcessor="initAudioProcessor",t.adjustAudioProcessor="adjustAudioProcessor",t.SET_SHARED_ARRAY_BUFFERS="SET_SHARED_ARRAY_BUFFERS",t.CLOSE="CLOSE",t.START_CONTEXT="START_CONTEXT",t.SWITCH_CONTEXT="SWITCH_CONTEXT",t.STOP_CONTEXT="STOP_CONTEXT",t.AUDIO="AUDIO",t.startStream="startStream",t.stopStream="stopStream",t.setContextOptions="setContextOptions"}(Q||(Q={})),function(t){t[t.Failed=0]="Failed",t[t.Disconnected=1]="Disconnected",t[t.Connected=2]="Connected",t[t.Active=3]="Active"}(tt||(tt={})),new Map([[tt.Failed,"Failed"],[tt.Disconnected,"Disconnected"],[tt.Connected,"Connected"],[tt.Active,"Active"]]);for(var et=[],nt=0;nt<256;++nt)et.push((nt+256).toString(16).substr(1));var ot,rt,it,st,ct,at,dt,lt,ut="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},ft={exports:{}};
/*! http://mths.be/base64 v0.1.0 by @mathias | MIT license */
ot=ft,rt=ft.exports,function(t){var e=rt,n=ot&&ot.exports==e&&ot,o="object"==typeof ut&&ut;o.global!==o&&o.window!==o||(t=o);var r=function(t){this.message=t};(r.prototype=new Error).name="InvalidCharacterError";var i=function(t){throw new r(t)},s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=/[\t\n\f\r ]/g,a={encode:function(t){t=String(t),/[^\0-\xFF]/.test(t)&&i("The string to be encoded contains characters outside of the Latin1 range.");for(var e,n,o,r,c=t.length%3,a="",d=-1,l=t.length-c;++d<l;)e=t.charCodeAt(d)<<16,n=t.charCodeAt(++d)<<8,o=t.charCodeAt(++d),a+=s.charAt((r=e+n+o)>>18&63)+s.charAt(r>>12&63)+s.charAt(r>>6&63)+s.charAt(63&r);return 2==c?(e=t.charCodeAt(d)<<8,n=t.charCodeAt(++d),a+=s.charAt((r=e+n)>>10)+s.charAt(r>>4&63)+s.charAt(r<<2&63)+"="):1==c&&(r=t.charCodeAt(d),a+=s.charAt(r>>2)+s.charAt(r<<4&63)+"=="),a},decode:function(t){var e=(t=String(t).replace(c,"")).length;e%4==0&&(e=(t=t.replace(/==?$/,"")).length),(e%4==1||/[^+a-zA-Z0-9/]/.test(t))&&i("Invalid character: the string to be decoded is not correctly encoded.");for(var n,o,r=0,a="",d=-1;++d<e;)o=s.indexOf(t.charAt(d)),n=r%4?64*n+o:o,r++%4&&(a+=String.fromCharCode(255&n>>(-2*r&6)));return a},version:"0.1.0"};if(e&&!e.nodeType)if(n)n.exports=a;else for(var d in a)a.hasOwnProperty(d)&&(e[d]=a[d]);else t.base64=a}(ut),function(t){t.SpeechlyFirstConnect="SpeechlyFirstConnect"}(it||(it={})),function(t){t.speechlypoweron="speechlypoweron",t.holdstart="holdstart",t.holdend="holdend",t.speechstate="speechstate",t.audiosourcestate="audiosourcestate",t.speechsegment="speechsegment",t.speechhandled="speechhandled",t.showhint="showhint",t.transcriptdrawerhint="hint",t.speechlyintroready="speechlyintroready",t.speechlyintroclosed="speechlyintroclosed",t.startcontext="startcontext",t.stopcontext="stopcontext",t.requeststartmicrophone="requeststartmicrophone"}(st||(st={})),function(t){t.Mic="mic",t.MicActive="micactive",t.Error="error",t.Denied="denied"}(ct||(ct={})),function(t){t.Hold="hold",t.Click="click",t.Noninteractive="noninteractive"}(at||(at={})),function(t){t.None="none",t.Connecting="connecting",t.Busy="busy"}(dt||(dt={})),function(t){t.None="none",t.Whirl="whirl"}(lt||(lt={}));const ht={[tt.Disconnected]:{icon:"mic",behaviour:"click",effect:"none",triggerFx:"whirl"},[tt.Connected]:{icon:"mic",behaviour:"hold",effect:"none",triggerFx:"whirl"},[tt.Active]:{icon:"micactive",behaviour:"hold",effect:"none"},[tt.Failed]:{icon:"error",behaviour:"click",effect:"none"},[Y.NoBrowserSupport]:{icon:"error",behaviour:"click",effect:"none"},[Y.NoAudioConsent]:{icon:"denied",behaviour:"click",effect:"none"}};function pt(t){d(t,"svelte-s2u2hd",".Icon.svelte-s2u2hd{position:absolute;width:var(--icon-size);height:var(--icon-size);top:50%;left:50%;transform:translate(-50%, -50%);pointer-events:none;transition:0.25s;opacity:var(--icon-opacity)}")}function gt(t){let e,n,o,r,i,s,c,d,f,g,m,v,x;return{c(){e=h("svg"),n=h("linearGradient"),o=h("animate"),r=h("animate"),i=h("stop"),s=h("stop"),c=h("stop"),d=h("stop"),f=h("stop"),g=p(">\n "),m=h("g"),v=h("path"),x=h("rect"),$(o,"attributeName","y1"),$(o,"values","-200%; 0%;"),$(o,"dur","2s"),$(o,"repeatCount","indefinite"),$(r,"attributeName","y2"),$(r,"values","200%; 400%;"),$(r,"dur","2s"),$(r,"repeatCount","indefinite"),$(i,"offset","0%"),$(i,"stop-color","var(--gradient-stop1)"),$(s,"offset","25%"),$(s,"stop-color","var(--gradient-stop2)"),$(c,"offset","50%"),$(c,"stop-color","var(--gradient-stop1)"),$(d,"offset","75%"),$(d,"stop-color","var(--gradient-stop2)"),$(f,"offset","100%"),$(f,"stop-color","var(--gradient-stop1)"),$(n,"id","gradient"),$(n,"x1","50%"),$(n,"y1","-200%"),$(n,"x2","50%"),$(n,"y2","200%"),$(v,"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"),$(x,"x","20"),$(x,"y","1"),$(x,"width","16"),$(x,"height","37"),$(x,"rx","8"),$(m,"fill","url(#gradient)"),$(m,"fill-rule","evenodd"),$(e,"class","Icon svelte-s2u2hd"),$(e,"viewBox","0 0 56 56"),$(e,"xmlns","http://www.w3.org/2000/svg")},m(t,u){l(t,e,u),a(e,n),a(n,o),a(n,r),a(n,i),a(n,s),a(n,c),a(n,d),a(n,f),a(e,g),a(e,m),a(m,v),a(m,x)},d(t){t&&u(e)}}}function mt(t){let e,n,o,r;return{c(){e=h("svg"),n=h("g"),o=h("path"),r=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"),$(r,"x","20"),$(r,"y","1"),$(r,"width","16"),$(r,"height","37"),$(r,"rx","8"),$(n,"fill","var(--icon-color)"),$(n,"fill-rule","evenodd"),$(e,"class","Icon svelte-s2u2hd"),$(e,"viewBox","0 0 56 56"),$(e,"xmlns","http://www.w3.org/2000/svg")},m(t,i){l(t,e,i),a(e,n),a(n,o),a(n,r)},d(t){t&&u(e)}}}function $t(t){let e,n,o,r;return{c(){e=h("svg"),n=h("g"),o=h("path"),r=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"),$(r,"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","var(--icon-color)"),$(n,"fill-rule","evenodd"),$(e,"class","Icon svelte-s2u2hd"),$(e,"viewBox","0 0 56 56"),$(e,"xmlns","http://www.w3.org/2000/svg")},m(t,i){l(t,e,i),a(e,n),a(n,o),a(n,r)},d(t){t&&u(e)}}}function vt(t){let e,n,o,r;return{c(){e=h("svg"),n=h("g"),o=h("path"),r=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"),$(r,"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","var(--icon-color)"),$(n,"fill-rule","nonzero"),$(e,"class","Icon svelte-s2u2hd"),$(e,"viewBox","0 0 56 56"),$(e,"xmlns","http://www.w3.org/2000/svg")},m(t,i){l(t,e,i),a(e,n),a(n,o),a(n,r)},d(t){t&&u(e)}}}function xt(e){let n,o,r,i,s=e[0]===ct.MicActive&&gt(),c=e[0]===ct.Mic&&mt(),a=e[0]===ct.Error&&$t(),d=e[0]===ct.Denied&&vt();return{c(){s&&s.c(),n=g(),c&&c.c(),o=g(),a&&a.c(),r=g(),d&&d.c(),i=p("")},m(t,e){s&&s.m(t,e),l(t,n,e),c&&c.m(t,e),l(t,o,e),a&&a.m(t,e),l(t,r,e),d&&d.m(t,e),l(t,i,e)},p(t,[e]){t[0]===ct.MicActive?s||(s=gt(),s.c(),s.m(n.parentNode,n)):s&&(s.d(1),s=null),t[0]===ct.Mic?c||(c=mt(),c.c(),c.m(o.parentNode,o)):c&&(c.d(1),c=null),t[0]===ct.Error?a||(a=$t(),a.c(),a.m(r.parentNode,r)):a&&(a.d(1),a=null),t[0]===ct.Denied?d||(d=vt(),d.c(),d.m(i.parentNode,i)):d&&(d.d(1),d=null)},i:t,o:t,d(t){s&&s.d(t),t&&u(n),c&&c.d(t),t&&u(o),a&&a.d(t),t&&u(r),d&&d.d(t),t&&u(i)}}}function wt(t,e,n){let{icon:o=ct.Mic}=e;return t.$$set=t=>{"icon"in t&&n(0,o=t.icon)},[o]}class bt extends W{constructor(t){super(),j(this,t,wt,xt,i,{icon:0},pt)}}function yt(t){d(t,"svelte-1fpkb0k",".Fx.svelte-1fpkb0k{position:absolute;width:var(--fx-size);height:var(--fx-size);top:50%;left:50%;transform-origin:50% 50%;transform:translate(-50%, -50%) rotate(var(--fx-rotation));pointer-events:none;opacity:var(--fx-opacity)}")}function kt(e){let n,o,r,i,s,c,d,f;return{c(){n=h("svg"),o=h("defs"),r=h("linearGradient"),i=h("stop"),s=h("stop"),c=h("filter"),d=h("feGaussianBlur"),f=h("circle"),$(i,"stop-color","var(--fx-gradient-stop1)"),$(i,"offset","0%"),$(s,"stop-color","var(--fx-gradient-stop2)"),$(s,"offset","100%"),$(r,"x1","50%"),$(r,"y1","10%"),$(r,"x2","50%"),$(r,"y2","100%"),$(r,"id","a"),$(d,"stdDeviation","18"),$(d,"in","SourceGraphic"),$(c,"x","-35%"),$(c,"y","-35%"),$(c,"width","170%"),$(c,"height","170%"),$(c,"filterUnits","objectBoundingBox"),$(c,"id","b"),$(f,"filter","url(#b)"),$(f,"cx","124"),$(f,"cy","124"),$(f,"r","79"),$(f,"fill","url(#a)"),$(f,"fillrule","evenodd"),$(n,"class","Fx svelte-1fpkb0k"),$(n,"viewBox","0 0 246 246"),$(n,"xmlns","http://www.w3.org/2000/svg")},m(t,e){l(t,n,e),a(n,o),a(o,r),a(r,i),a(r,s),a(o,c),a(c,d),a(n,f)},p:t,i:t,o:t,d(t){t&&u(n)}}}class Et extends W{constructor(t){super(),j(this,t,null,kt,i,{},yt)}}const{window:St}=B;function At(t){let e;return{c(){e=f("link"),$(e,"href",t[9]),$(e,"rel","stylesheet")},m(t,n){l(t,e,n)},p(t,n){512&n[0]&&$(e,"href",t[9])},d(t){t&&u(e)}}}function Ct(e){let n,r,i,s,c,d,h,p,w,b,y,k,E=void 0!==e[9]&&At(e);return i=new Et({}),c=new K({props:{frameRadius:e[16]}}),h=new bt({props:{icon:e[15].icon}}),{c(){E&&E.c(),n=g(),r=f("main"),P(i.$$.fragment),s=g(),P(c.$$.fragment),d=g(),P(h.$$.fragment),p=g(),w=f("slot"),this.c=t,$(r,"class","HoldableButton"),v(r,"width",e[0]),v(r,"height",e[0]),v(r,"--gradient-stop1",e[5]),v(r,"--gradient-stop2",e[6]),v(r,"--fx-gradient-stop1",e[7]||e[5]),v(r,"--fx-gradient-stop2",e[8]||e[6]),v(r,"--fx-rotation",e[11][1]+"deg"),v(r,"--fx-opacity",e[14][1]),v(r,"--fx-size",e[2]),v(r,"--icon-opacity",e[13][1]),v(r,"--icon-size",e[1]),v(r,"--icon-color",e[4]),v(r,"--frame-stroke-width",e[17]),v(r,"--frame-background",e[3]),v(r,"transform","scale("+e[12][1]+")"),x(r,"pressed",e[10])},m(t,o){E&&E.m(t,o),l(t,n,o),l(t,r,o),I(i,r,null),a(r,s),I(c,r,null),a(r,d),I(h,r,null),a(r,p),a(r,w),b=!0,y||(k=[m(St,"mouseup",e[19]),m(St,"keydown",e[20]),m(St,"keyup",e[21]),m(r,"mousedown",e[18]),m(r,"touchstart",e[18]),m(r,"dragstart",e[18]),m(r,"mouseup",e[19]),m(r,"touchend",e[19],{passive:!0}),m(r,"dragend",e[19])],y=!0)},p(t,e){void 0!==t[9]?E?E.p(t,e):(E=At(t),E.c(),E.m(n.parentNode,n)):E&&(E.d(1),E=null);const o={};65536&e[0]&&(o.frameRadius=t[16]),c.$set(o);const i={};32768&e[0]&&(i.icon=t[15].icon),h.$set(i),(!b||1&e[0])&&v(r,"width",t[0]),(!b||1&e[0])&&v(r,"height",t[0]),(!b||32&e[0])&&v(r,"--gradient-stop1",t[5]),(!b||64&e[0])&&v(r,"--gradient-stop2",t[6]),(!b||160&e[0])&&v(r,"--fx-gradient-stop1",t[7]||t[5]),(!b||320&e[0])&&v(r,"--fx-gradient-stop2",t[8]||t[6]),(!b||2048&e[0])&&v(r,"--fx-rotation",t[11][1]+"deg"),(!b||16384&e[0])&&v(r,"--fx-opacity",t[14][1]),(!b||4&e[0])&&v(r,"--fx-size",t[2]),(!b||8192&e[0])&&v(r,"--icon-opacity",t[13][1]),(!b||2&e[0])&&v(r,"--icon-size",t[1]),(!b||16&e[0])&&v(r,"--icon-color",t[4]),(!b||131072&e[0])&&v(r,"--frame-stroke-width",t[17]),(!b||8&e[0])&&v(r,"--frame-background",t[3]),(!b||4096&e[0])&&v(r,"transform","scale("+t[12][1]+")"),1024&e[0]&&x(r,"pressed",t[10])},i(t){b||(L(i.$$.fragment,t),L(c.$$.fragment,t),L(h.$$.fragment,t),b=!0)},o(t){R(i.$$.fragment,t),R(c.$$.fragment,t),R(h.$$.fragment,t),b=!1},d(t){E&&E.d(t),t&&u(n),t&&u(r),V(i),V(c),V(h),y=!1,o(k)}}}function zt(t,e,n){let o,r,i,s,{icon:c=tt.Disconnected}=e,{capturekey:a=" "}=e,{hide:d}=e,{size:l="80px"}=e,{holdscale:u="1.35"}=e,{borderscale:f="0.075"}=e,{iconsize:h="60%"}=e,{fxsize:p="250%"}=e,{backgroundcolor:g="#ffffff"}=e,{iconcolor:m="#000000"}=e,{gradientstop1:$="#15e8b5"}=e,{gradientstop2:v="#4fa1f9"}=e,{fxgradientstop1:x}=e,{fxgradientstop2:w}=e,{customcssurl:b}=e;let y=!1,E=0,S=[0,0],A=[0,0],C=[1,1],z=[0,0],_=ht[c],T=null,M=0,N=0;const O=k(),F=(t,e)=>{O.dispatchEvent(new CustomEvent(t,{detail:e,composed:!0}))};var D;D=()=>{n(12,A=[1,0]);let t=null;const e=()=>{M=N,N=(new Date).getTime();const r=N-(M||N);_.effect===dt.Connecting&&n(13,C[0]=.25*Math.cos(N/2500*Math.PI*2)+.25,C),_.effect===dt.Busy&&n(13,C[0]=.25*Math.cos(N/1e3*Math.PI*2)+.25,C),n(12,A=[A[0],B(A[1],o?A[0]:0,.2,r)]),n(13,C=[C[0],B(C[1],C[0],.08,r)]),n(14,z=[z[0],B(z[1],z[0],.08,r)]),n(11,S=[S[0]+2.5,B(S[1],S[0],.05,r)]),t=requestAnimationFrame(e)};return e(),()=>cancelAnimationFrame(t)},k().$$.on_mount.push(D);const L=t=>{t.preventDefault(),t.stopPropagation(),o&&!y&&(n(10,y=!0),E=Date.now(),P(),_.triggerFx===lt.Whirl&&n(11,S[0]+=720,S),_.behaviour===at.Click&&null===T&&(T=window.setTimeout((()=>{n(14,z[0]=0,z),T=null}),500)),O.onholdstart&&O.onholdstart(),F(st.holdstart))},R=()=>{if(y){n(10,y=!1);const t={timeMs:Date.now()-E};P(),null!==T&&window.clearTimeout(T),O.onholdend&&O.onholdend(t),F("holdend",t)}},B=(t,e,n,o)=>t*(1-(n=Math.pow(n,1e3/60/o)))+e*n,P=(t=5)=>{void 0!==navigator.vibrate&&navigator.vibrate(t)};return t.$$set=t=>{"icon"in t&&n(22,c=t.icon),"capturekey"in t&&n(23,a=t.capturekey),"hide"in t&&n(24,d=t.hide),"size"in t&&n(0,l=t.size),"holdscale"in t&&n(25,u=t.holdscale),"borderscale"in t&&n(26,f=t.borderscale),"iconsize"in t&&n(1,h=t.iconsize),"fxsize"in t&&n(2,p=t.fxsize),"backgroundcolor"in t&&n(3,g=t.backgroundcolor),"iconcolor"in t&&n(4,m=t.iconcolor),"gradientstop1"in t&&n(5,$=t.gradientstop1),"gradientstop2"in t&&n(6,v=t.gradientstop2),"fxgradientstop1"in t&&n(7,x=t.fxgradientstop1),"fxgradientstop2"in t&&n(8,w=t.fxgradientstop2),"customcssurl"in t&&n(9,b=t.customcssurl)},t.$$.update=()=>{16777216&t.$$.dirty[0]&&(o=void 0===d||"false"===d),67108864&t.$$.dirty[0]&&n(17,r=""+46*f),67108864&t.$$.dirty[0]&&n(16,i=46-23*f),33554432&t.$$.dirty[0]&&(s=u),4195328&t.$$.dirty[0]&&((t,e)=>{switch(n(15,_=ht[e]),n(12,A[0]=t?s:1,A),n(14,z[0]=t||e==tt.Active?1:0,z),_.icon){case ct.MicActive:case ct.Mic:case ct.Denied:case ct.Error:n(13,C[0]=1,C)}})(y,c)},[l,h,p,g,m,$,v,x,w,b,y,S,A,C,z,_,i,r,L,R,t=>{a&&(t.key===a&&(document.hasFocus()&&document.activeElement!==document.body&&document.activeElement!==document.documentElement&&document.activeElement||null||(t.repeat?(t.preventDefault(),t.stopPropagation()):L(t))))},t=>{t.key===a&&R()},c,a,d,u,f,()=>y]}class _t extends U{constructor(t){super(),this.shadowRoot.innerHTML="<style>main{text-align:left;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}</style>",j(this,{target:this.shadowRoot,props:w(this.attributes),customElement:!0},zt,Ct,s,{icon:22,capturekey:23,hide:24,size:0,holdscale:25,borderscale:26,iconsize:1,fxsize:2,backgroundcolor:3,iconcolor:4,gradientstop1:5,gradientstop2:6,fxgradientstop1:7,fxgradientstop2:8,customcssurl:9,isbuttonpressed:27},null,[-1,-1]),t&&(t.target&&l(t.target,this,t.anchor),t.props&&(this.$set(t.props),O()))}static get observedAttributes(){return["icon","capturekey","hide","size","holdscale","borderscale","iconsize","fxsize","backgroundcolor","iconcolor","gradientstop1","gradientstop2","fxgradientstop1","fxgradientstop2","customcssurl","isbuttonpressed"]}get icon(){return this.$$.ctx[22]}set icon(t){this.$$set({icon:t}),O()}get capturekey(){return this.$$.ctx[23]}set capturekey(t){this.$$set({capturekey:t}),O()}get hide(){return this.$$.ctx[24]}set hide(t){this.$$set({hide:t}),O()}get size(){return this.$$.ctx[0]}set size(t){this.$$set({size:t}),O()}get holdscale(){return this.$$.ctx[25]}set holdscale(t){this.$$set({holdscale:t}),O()}get borderscale(){return this.$$.ctx[26]}set borderscale(t){this.$$set({borderscale:t}),O()}get iconsize(){return this.$$.ctx[1]}set iconsize(t){this.$$set({iconsize:t}),O()}get fxsize(){return this.$$.ctx[2]}set fxsize(t){this.$$set({fxsize:t}),O()}get backgroundcolor(){return this.$$.ctx[3]}set backgroundcolor(t){this.$$set({backgroundcolor:t}),O()}get iconcolor(){return this.$$.ctx[4]}set iconcolor(t){this.$$set({iconcolor:t}),O()}get gradientstop1(){return this.$$.ctx[5]}set gradientstop1(t){this.$$set({gradientstop1:t}),O()}get gradientstop2(){return this.$$.ctx[6]}set gradientstop2(t){this.$$set({gradientstop2:t}),O()}get fxgradientstop1(){return this.$$.ctx[7]}set fxgradientstop1(t){this.$$set({fxgradientstop1:t}),O()}get fxgradientstop2(){return this.$$.ctx[8]}set fxgradientstop2(t){this.$$set({fxgradientstop2:t}),O()}get customcssurl(){return this.$$.ctx[9]}set customcssurl(t){this.$$set({customcssurl:t}),O()}get isbuttonpressed(){return this.$$.ctx[27]}}customElements.get("holdable-button")?console.warn("Skipping re-defining customElement holdable-button"):customElements.define("holdable-button",_t)}));
//# sourceMappingURL=holdable-button.js.map

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

!function(t){"function"==typeof define&&define.amd?define(t):t()}((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 c(t,e){return t!=t?e==e:t!==e}function l(t){return 0===Object.keys(t).length}const a="undefined"!=typeof window;let u=a?()=>window.performance.now():()=>Date.now(),d=a?t=>requestAnimationFrame(t):t;const p=new Set;function h(t){p.forEach((e=>{e.c(t)||(p.delete(e),e.f())})),0!==p.size&&d(h)}function f(t,e){t.appendChild(e)}function m(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function g(t){const e=$("style");return y(m(t),e),e.sheet}function y(t,e){f(t.head||t,e)}function b(t,e,n){t.insertBefore(e,n||null)}function w(t){t.parentNode.removeChild(t)}function $(t){return document.createElement(t)}function v(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function x(t){return document.createTextNode(t)}function k(){return x(" ")}function z(){return x("")}function C(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 E(t,e,n,o){null===n?t.style.removeProperty(e):t.style.setProperty(e,n,o?"important":"")}function S(t,e,n){t.classList[n?"add":"remove"](e)}function N(t){const e={};for(const n of t)e[n.name]=n.value;return e}const M=new Map;let T,A=0;function L(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}`,p=m(t),{stylesheet:h,rules:f}=M.get(p)||function(t,e){const n={stylesheet:g(e),rules:{}};return M.set(t,n),n}(p,t);f[d]||(f[d]=!0,h.insertRule(`@keyframes ${d} ${u}`,h.cssRules.length));const y=t.style.animation||"";return t.style.animation=`${y?`${y}, `:""}${d} ${o}ms linear ${i}ms 1 both`,A+=1,d}function P(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||(M.forEach((t=>{const{stylesheet:e}=t;let n=e.cssRules.length;for(;n--;)e.deleteRule(n);t.rules={}})),M.clear())})))}function D(t){T=t}function I(){if(!T)throw new Error("Function called outside component initialization");return T}const R=[],B=[],O=[],F=[],H=Promise.resolve();let V=!1;function j(t){O.push(t)}const q=new Set;let U,G=0;function W(){const t=T;do{for(;G<R.length;){const t=R[G];G++,D(t),J(t.$$)}for(D(null),R.length=0,G=0;B.length;)B.pop()();for(let t=0;t<O.length;t+=1){const e=O[t];q.has(e)||(q.add(e),e())}O.length=0}while(R.length);for(;F.length;)F.pop()();V=!1,q.clear(),D(t)}function J(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)}}function K(t,e,n){t.dispatchEvent(function(t,e,{bubbles:n=!1,cancelable:o=!1}={}){const i=document.createEvent("CustomEvent");return i.initCustomEvent(t,n,o,e),i}(`${e?"intro":"outro"}${n}`))}const Q=new Set;let X;function Y(){X={r:0,c:[],p:X}}function Z(){X.r||i(X.c),X=X.p}function tt(t,e){t&&t.i&&(Q.delete(t),t.i(e))}function et(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 nt={duration:0};function ot(n,o,s,c){let l=o(n,s),a=c?0:1,f=null,m=null,g=null;function y(){g&&P(n,g)}function b(t,e){const n=t.b-a;return e*=Math.abs(n),{a:a,b:t.b,d:n,duration:e,start:t.start,end:t.start+e,group:t.group}}function w(o){const{delay:r=0,duration:s=300,easing:c=e,tick:w=t,css:$}=l||nt,v={start:u()+r,b:o};o||(v.group=X,X.r+=1),f||m?m=v:($&&(y(),g=L(n,a,o,s,r,c,$)),o&&w(0,1),f=b(v,s),j((()=>K(n,o,"start"))),function(t){let e;0===p.size&&d(h),new Promise((n=>{p.add(e={c:t,f:n})}))}((t=>{if(m&&t>m.start&&(f=b(m,s),m=null,K(n,f.b,"start"),$&&(y(),g=L(n,a,f.b,f.duration,0,c,l.css))),f)if(t>=f.end)w(a=f.b,1-a),K(n,f.b,"end"),m||(f.b?y():--f.group.r||i(f.group.c)),f=null;else if(t>=f.start){const e=t-f.start;a=f.a+f.d*c(e/f.duration),w(a,1-a)}return!(!f&&!m)})))}return{run(t){r(l)?(U||(U=Promise.resolve(),U.then((()=>{U=null}))),U).then((()=>{l=l(),w(t)})):w(t)},end(){y(),f=m=null}}}const it="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function rt(t,e,o,s){const{fragment:c,on_mount:l,on_destroy:a,after_update:u}=t.$$;c&&c.m(e,o),s||j((()=>{const e=l.map(n).filter(r);a?a.push(...e):i(e),t.$$.on_mount=[]})),u.forEach(j)}function st(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 ct(t,e){-1===t.$$.dirty[0]&&(R.push(t),V||(V=!0,H.then(W)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function lt(e,n,r,s,c,l,a,u=[-1]){const d=T;D(e);const p=e.$$={fragment:null,ctx:null,props:l,update:t,not_equal:c,bound:o(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(d?d.$$.context:[])),callbacks:o(),dirty:u,skip_bound:!1,root:n.target||d.$$.root};a&&a(p.root);let h=!1;if(p.ctx=r?r(e,n.props||{},((t,n,...o)=>{const i=o.length?o[0]:n;return p.ctx&&c(p.ctx[t],p.ctx[t]=i)&&(!p.skip_bound&&p.bound[t]&&p.bound[t](i),h&&ct(e,t)),n})):[],p.update(),h=!0,i(p.before_update),p.fragment=!!s&&s(p.ctx),n.target){if(n.hydrate){const t=function(t){return Array.from(t.childNodes)}(n.target);p.fragment&&p.fragment.l(t),t.forEach(w)}else p.fragment&&p.fragment.c();n.intro&&tt(e.$$.fragment),rt(e,n.target,n.anchor,n.customElement),W()}D(d)}let at;"function"==typeof HTMLElement&&(at=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(){st(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&&!l(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});function ut(t,{delay:n=0,duration:o=400,easing:i=e}={}){const r=+getComputedStyle(t).opacity;return{delay:n,duration:o,easing:i,css:t=>"opacity: "+t*r}}var dt,pt,ht,ft,mt,gt,yt;function bt(t){!function(t,e,n){const o=m(t);if(!o.getElementById(e)){const t=$("style");t.id=e,t.textContent=n,y(o,t)}}(t,"svelte-s2u2hd",".Icon.svelte-s2u2hd{position:absolute;width:var(--icon-size);height:var(--icon-size);top:50%;left:50%;transform:translate(-50%, -50%);pointer-events:none;transition:0.25s;opacity:var(--icon-opacity)}")}function wt(t){let e,n,o,i,r,s,c,l,a,u,d,p,h;return{c(){e=v("svg"),n=v("linearGradient"),o=v("animate"),i=v("animate"),r=v("stop"),s=v("stop"),c=v("stop"),l=v("stop"),a=v("stop"),u=x(">\n "),d=v("g"),p=v("path"),h=v("rect"),_(o,"attributeName","y1"),_(o,"values","-200%; 0%;"),_(o,"dur","2s"),_(o,"repeatCount","indefinite"),_(i,"attributeName","y2"),_(i,"values","200%; 400%;"),_(i,"dur","2s"),_(i,"repeatCount","indefinite"),_(r,"offset","0%"),_(r,"stop-color","var(--gradient-stop1)"),_(s,"offset","25%"),_(s,"stop-color","var(--gradient-stop2)"),_(c,"offset","50%"),_(c,"stop-color","var(--gradient-stop1)"),_(l,"offset","75%"),_(l,"stop-color","var(--gradient-stop2)"),_(a,"offset","100%"),_(a,"stop-color","var(--gradient-stop1)"),_(n,"id","gradient"),_(n,"x1","50%"),_(n,"y1","-200%"),_(n,"x2","50%"),_(n,"y2","200%"),_(p,"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"),_(h,"x","20"),_(h,"y","1"),_(h,"width","16"),_(h,"height","37"),_(h,"rx","8"),_(d,"fill","url(#gradient)"),_(d,"fill-rule","evenodd"),_(e,"class","Icon svelte-s2u2hd"),_(e,"viewBox","0 0 56 56"),_(e,"xmlns","http://www.w3.org/2000/svg")},m(t,m){b(t,e,m),f(e,n),f(n,o),f(n,i),f(n,r),f(n,s),f(n,c),f(n,l),f(n,a),f(e,u),f(e,d),f(d,p),f(d,h)},d(t){t&&w(e)}}}function $t(t){let e,n,o,i;return{c(){e=v("svg"),n=v("g"),o=v("path"),i=v("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","var(--icon-color)"),_(n,"fill-rule","evenodd"),_(e,"class","Icon svelte-s2u2hd"),_(e,"viewBox","0 0 56 56"),_(e,"xmlns","http://www.w3.org/2000/svg")},m(t,r){b(t,e,r),f(e,n),f(n,o),f(n,i)},d(t){t&&w(e)}}}function vt(t){let e,n,o,i;return{c(){e=v("svg"),n=v("g"),o=v("path"),i=v("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","var(--icon-color)"),_(n,"fill-rule","evenodd"),_(e,"class","Icon svelte-s2u2hd"),_(e,"viewBox","0 0 56 56"),_(e,"xmlns","http://www.w3.org/2000/svg")},m(t,r){b(t,e,r),f(e,n),f(n,o),f(n,i)},d(t){t&&w(e)}}}function xt(t){let e,n,o,i;return{c(){e=v("svg"),n=v("g"),o=v("path"),i=v("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","var(--icon-color)"),_(n,"fill-rule","nonzero"),_(e,"class","Icon svelte-s2u2hd"),_(e,"viewBox","0 0 56 56"),_(e,"xmlns","http://www.w3.org/2000/svg")},m(t,r){b(t,e,r),f(e,n),f(n,o),f(n,i)},d(t){t&&w(e)}}}function kt(e){let n,o,i,r,s=e[0]===ft.MicActive&&wt(),c=e[0]===ft.Mic&&$t(),l=e[0]===ft.Error&&vt(),a=e[0]===ft.Denied&&xt();return{c(){s&&s.c(),n=k(),c&&c.c(),o=k(),l&&l.c(),i=k(),a&&a.c(),r=z()},m(t,e){s&&s.m(t,e),b(t,n,e),c&&c.m(t,e),b(t,o,e),l&&l.m(t,e),b(t,i,e),a&&a.m(t,e),b(t,r,e)},p(t,[e]){t[0]===ft.MicActive?s||(s=wt(),s.c(),s.m(n.parentNode,n)):s&&(s.d(1),s=null),t[0]===ft.Mic?c||(c=$t(),c.c(),c.m(o.parentNode,o)):c&&(c.d(1),c=null),t[0]===ft.Error?l||(l=vt(),l.c(),l.m(i.parentNode,i)):l&&(l.d(1),l=null),t[0]===ft.Denied?a||(a=xt(),a.c(),a.m(r.parentNode,r)):a&&(a.d(1),a=null)},i:t,o:t,d(t){s&&s.d(t),t&&w(n),c&&c.d(t),t&&w(o),l&&l.d(t),t&&w(i),a&&a.d(t),t&&w(r)}}}function zt(t,e,n){let{icon:o=ft.Mic}=e;return t.$$set=t=>{"icon"in t&&n(0,o=t.icon)},[o]}!function(t){t[t.Failed=0]="Failed",t[t.NoBrowserSupport=1]="NoBrowserSupport",t[t.NoAudioConsent=2]="NoAudioConsent",t[t.__UnrecoverableErrors=3]="__UnrecoverableErrors",t[t.Disconnected=4]="Disconnected",t[t.Disconnecting=5]="Disconnecting",t[t.Connecting=6]="Connecting",t[t.Preinitialized=7]="Preinitialized",t[t.Initializing=8]="Initializing",t[t.Connected=9]="Connected",t[t.Stopping=10]="Stopping",t[t.Starting=11]="Starting",t[t.Recording=12]="Recording"}(dt||(dt={})),function(t){t.SpeechlyFirstConnect="SpeechlyFirstConnect"}(pt||(pt={})),function(t){t.speechlypoweron="speechlypoweron",t.holdstart="holdstart",t.holdend="holdend",t.speechstate="speechstate",t.speechsegment="speechsegment",t.speechhandled="speechhandled",t.showhint="showhint",t.transcriptdrawerhint="hint",t.speechlyintroready="speechlyintroready",t.speechlyintroclosed="speechlyintroclosed"}(ht||(ht={})),function(t){t.Mic="mic",t.MicActive="micactive",t.Error="error",t.Denied="denied"}(ft||(ft={})),function(t){t.Hold="hold",t.Click="click",t.Noninteractive="noninteractive"}(mt||(mt={})),function(t){t.None="none",t.Connecting="connecting",t.Busy="busy"}(gt||(gt={})),function(t){t.None="none",t.Whirl="whirl"}(yt||(yt={})),dt.Disconnected,dt.Disconnecting,dt.Connecting,dt.Preinitialized,dt.Initializing,dt.Connected,dt.Starting,dt.Recording,dt.Stopping,dt.Failed,dt.NoBrowserSupport,dt.NoAudioConsent;class Ct extends class{$destroy(){st(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&&!l(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}{constructor(t){super(),lt(this,t,zt,kt,s,{icon:0},bt)}}const{window:_t}=it;function Et(t){let e;return{c(){e=$("link"),_(e,"href","https://fonts.googleapis.com/css2?family=Saira+Condensed:wght@700&display=swap"),_(e,"rel","stylesheet")},m(t,n){b(t,e,n)},d(t){t&&w(e)}}}function St(t){let e;return{c(){e=$("link"),_(e,"href",t[3]),_(e,"rel","stylesheet")},m(t,n){b(t,e,n)},p(t,n){8&n&&_(e,"href",t[3])},d(t){t&&w(e)}}}function Nt(t){let e,n,o,i,r,s,c,l,a,u,d,p;const h=[Pt,Lt,At,Tt,Mt],m=[];function g(t,e){return t[4]===Ot||t[4]===dt.Initializing?0:t[4]===Ft?1:t[4]===dt.NoAudioConsent?2:t[4]===dt.NoBrowserSupport?3:4}return s=g(t),c=m[s]=h[s](t),{c(){e=$("modalbg"),o=k(),i=$("modalcontent"),r=$("main"),c.c(),l=k(),a=$("footer"),a.innerHTML='Voice input is automatically transcribed by <a target="_blank" href="https://speechly.com/" rel="noopener noreferrer">Speechly</a> and can be used to improve the quality of service under <a target="_blank" href="https://www.speechly.com/privacy/terms-and-conditions" rel="noopener noreferrer">terms of use</a>.',_(i,"class",t[1]),S(i,"defaultTypography",t[7])},m(n,c){b(n,e,c),b(n,o,c),b(n,i,c),f(i,r),m[s].m(r,null),f(i,l),f(i,a),u=!0,d||(p=C(e,"click",t[9]),d=!0)},p(t,e){let n=s;s=g(t),s===n?m[s].p(t,e):(Y(),et(m[n],1,1,(()=>{m[n]=null})),Z(),c=m[s],c?c.p(t,e):(c=m[s]=h[s](t),c.c()),tt(c,1),c.m(r,null)),(!u||2&e)&&_(i,"class",t[1]),130&e&&S(i,"defaultTypography",t[7])},i(o){u||(j((()=>{n||(n=ot(e,t[8],{duration:200},!0)),n.run(1)})),tt(c),u=!0)},o(o){n||(n=ot(e,t[8],{duration:200},!1)),n.run(0),et(c),u=!1},d(t){t&&w(e),t&&n&&n.end(),t&&w(o),t&&w(i),m[s].d(),d=!1,p()}}}function Mt(e){let n,o,i,r,s,c,l,a;function u(t,e){return t[2]?It:Dt}let d=u(e),p=d(e);return{c(){n=$("h2"),n.textContent="Failed to connect to Speechly",o=k(),i=$("p"),p.c(),r=k(),s=$("options"),c=$("button"),c.textContent="Ok, got it",_(c,"class","button button-primary")},m(t,u){b(t,n,u),b(t,o,u),b(t,i,u),p.m(i,null),b(t,r,u),b(t,s,u),f(s,c),l||(a=C(c,"click",e[9]),l=!0)},p(t,e){d===(d=u(t))&&p?p.p(t,e):(p.d(1),p=d(t),p&&(p.c(),p.m(i,null)))},i:t,o:t,d(t){t&&w(n),t&&w(o),t&&w(i),p.d(),t&&w(r),t&&w(s),l=!1,a()}}}function Tt(e){let n,o,i,r,s,c,l,a;return{c(){n=$("h2"),n.textContent="Unsupported browser",o=k(),i=$("p"),i.textContent="To use voice input, please visit this site using a supported browser.",r=k(),s=$("options"),c=$("button"),c.textContent="Ok, got it",_(c,"class","button button-primary")},m(t,u){b(t,n,u),b(t,o,u),b(t,i,u),b(t,r,u),b(t,s,u),f(s,c),l||(a=C(c,"click",e[9]),l=!0)},p:t,i:t,o:t,d(t){t&&w(n),t&&w(o),t&&w(i),t&&w(r),t&&w(s),l=!1,a()}}}function At(e){let n,o,r,s,c,l,a,u,d,p;return{c(){n=$("h2"),n.textContent="Microphone blocked",o=k(),r=$("p"),r.textContent=`To use voice input, ${window.location.hostname} needs access to your microphone. Check your\n browser preferences to allow microphone access and reload the page.`,s=k(),c=$("options"),l=$("button"),l.textContent="Ok, got it",a=k(),u=$("button"),u.textContent="Reload page",_(l,"class","button button-secondary"),_(u,"class","button button-primary")},m(t,i){b(t,n,i),b(t,o,i),b(t,r,i),b(t,s,i),b(t,c,i),f(c,l),f(c,a),f(c,u),d||(p=[C(l,"click",e[9]),C(u,"click",e[18])],d=!0)},p:t,i:t,o:t,d(t){t&&w(n),t&&w(o),t&&w(r),t&&w(s),t&&w(c),d=!1,i(p)}}}function Lt(e){let n,o,r,s,c,l,a,u,d,p;return{c(){n=$("h2"),n.textContent="HTTPS required",o=k(),r=$("p"),r.textContent="To use the voice interface, please visit this site using the secure\n HTTPS protocol.",s=k(),c=$("options"),l=$("button"),l.textContent="Ok, got it",a=k(),u=$("button"),u.textContent="Try with HTTPS",_(l,"class","button button-secondary"),_(u,"class","button button-primary")},m(t,i){b(t,n,i),b(t,o,i),b(t,r,i),b(t,s,i),b(t,c,i),f(c,l),f(c,a),f(c,u),d||(p=[C(l,"click",e[9]),C(u,"click",e[13])],d=!0)},p:t,i:t,o:t,d(t){t&&w(n),t&&w(o),t&&w(r),t&&w(s),t&&w(c),d=!1,i(p)}}}function Pt(t){let e,n,o,i,r,s,c,l,a,u,d,p,h,m,g,y,v,z,S,N=window.location.hostname+"";d=new Ct({});let M=t[5]&&Rt(t);return{c(){var t;e=$("h2"),e.innerHTML='<slot name="priming-title">Allow microphone</slot>',n=k(),o=$("p"),i=$("slot"),r=x("To use voice input, press "),s=$("strong"),s.textContent="Allow",c=x(" to give "),l=x(N),a=x(" access to your microphone.\n Audio is only captured when "),u=$("span"),(t=d.$$.fragment)&&t.c(),p=x(" button is pressed."),h=k(),m=$("options"),g=$("button"),g.textContent="Not now",y=k(),M&&M.c(),E(u,"display","inline-block"),E(u,"position","relative"),E(u,"color","white"),E(u,"width","20px"),E(u,"height","10px"),E(u,"--icon-color","white"),E(u,"--icon-size","20px"),_(i,"name","priming-body"),_(g,"class","button button-secondary")},m(w,$){b(w,e,$),b(w,n,$),b(w,o,$),f(o,i),f(i,r),f(i,s),f(i,c),f(i,l),f(i,a),f(i,u),rt(d,u,null),f(i,p),b(w,h,$),b(w,m,$),f(m,g),f(m,y),M&&M.m(m,null),v=!0,z||(S=C(g,"click",t[9]),z=!0)},p(t,e){t[5]?M?M.p(t,e):(M=Rt(t),M.c(),M.m(m,null)):M&&(M.d(1),M=null)},i(t){v||(tt(d.$$.fragment,t),v=!0)},o(t){et(d.$$.fragment,t),v=!1},d(t){t&&w(e),t&&w(n),t&&w(o),st(d),t&&w(h),t&&w(m),M&&M.d(),z=!1,S()}}}function Dt(e){let n;return{c(){n=x("Please check that your application has been successfully deployed.")},m(t,e){b(t,n,e)},p:t,d(t){t&&w(n)}}}function It(t){let e,n,o;return{c(){e=x("Please check that your application (App ID: "),n=x(t[2]),o=x(") has been successfully deployed.")},m(t,i){b(t,e,i),b(t,n,i),b(t,o,i)},p(t,e){4&e&&function(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}(n,t[2])},d(t){t&&w(e),t&&w(n),t&&w(o)}}}function Rt(t){let e,n,o,i,r;return{c(){e=$("button"),n=x("Allow"),_(e,"class","button button-primary"),e.disabled=o=t[4]===dt.Initializing},m(o,s){b(o,e,s),f(e,n),i||(r=C(e,"click",t[10]),i=!0)},p(t,n){16&n&&o!==(o=t[4]===dt.Initializing)&&(e.disabled=o)},d(t){t&&w(e),i=!1,r()}}}function Bt(e){let n,o,r,s,c,l,a,u=e[7]&&Et(),d=void 0!==e[3]&&St(e),p=e[6]&&Nt(e);return{c(){u&&u.c(),n=z(),o=k(),d&&d.c(),r=k(),s=$("modal"),p&&p.c(),this.c=t,E(s,"--remsize",e[0])},m(t,i){u&&u.m(document.head,null),f(document.head,n),b(t,o,i),d&&d.m(t,i),b(t,r,i),b(t,s,i),p&&p.m(s,null),c=!0,l||(a=[C(_t,"keydown",e[11]),C(_t,"message",e[12])],l=!0)},p(t,[e]){t[7]?u||(u=Et(),u.c(),u.m(n.parentNode,n)):u&&(u.d(1),u=null),void 0!==t[3]?d?d.p(t,e):(d=St(t),d.c(),d.m(r.parentNode,r)):d&&(d.d(1),d=null),t[6]?p?(p.p(t,e),64&e&&tt(p,1)):(p=Nt(t),p.c(),tt(p,1),p.m(s,null)):p&&(Y(),et(p,1,1,(()=>{p=null})),Z()),(!c||1&e)&&E(s,"--remsize",t[0])},i(t){c||(tt(p),c=!0)},o(t){et(p),c=!1},d(t){u&&u.d(t),w(n),t&&w(o),d&&d.d(t),t&&w(r),t&&w(s),p&&p.d(),l=!1,i(a)}}}const Ot="PagePriming",Ft="HttpsRequired";function Ht(t,e,n){let o,i,{hide:r="auto"}=e,{clientstate:s}=e,{remsize:c="1.0rem"}=e,{position:l="fixed"}=e,{appid:a}=e,{customcssurl:u}=e,{customtypography:d}=e,p=!0;const h=(()=>{const t=I();return(e,n)=>{t.dispatchEvent(new CustomEvent(e,{detail:n,composed:!0}))}})(),f=(m=ut,function(t,e){if(!t.hasOwnProperty("ownerDocument")){Object.defineProperty(t,"ownerDocument",{get:function(){return t.parentElement}});let e=t;for(;e.parentElement;)e=e.parentElement;t.parentElement.head=e}return m(t,e)});var m;let g=!1,y=Ot,b=null,w=!1;var $;$=()=>{n(17,g=!0),window.postMessage({type:ht.speechlyintroready},"*")},I().$$.on_mount.push($);const v=(t={})=>{n(6,o=!1),h("speechlyintroclosed",t),window.postMessage(Object.assign({type:ht.speechlyintroclosed},t),"*")},x=t=>{var e,i;("auto"===r&&n(6,o=!0),b&&(window.clearTimeout(b),b=null),"https:"===(null===(e=null===window||void 0===window?void 0:window.location)||void 0===e?void 0:e.protocol)||("localhost"===(i=window.location.hostname)||"[::1]"===i||null!==i.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/)))?n(4,y=t):n(4,y=Ft)},k=t=>{switch(t){case dt.Initializing:y===Ot?(n(4,y=t),b=window.setTimeout((()=>{b=null,"auto"===r&&n(6,o=!0)}),500)):n(6,o=!0);break;case dt.Connected:case dt.Starting:case dt.Recording:p&&(p=!1,b?(window.clearTimeout(b),b=null,v()):v({firstrun:!0}));break;case dt.Failed:case dt.NoAudioConsent:case dt.NoBrowserSupport:x(t)}};return t.$$set=t=>{"hide"in t&&n(14,r=t.hide),"clientstate"in t&&n(15,s=t.clientstate),"remsize"in t&&n(0,c=t.remsize),"position"in t&&n(1,l=t.position),"appid"in t&&n(2,a=t.appid),"customcssurl"in t&&n(3,u=t.customcssurl),"customtypography"in t&&n(16,d=t.customtypography)},t.$$.update=()=>{32768&t.$$.dirty&&s&&k(parseInt(s)),147456&t.$$.dirty&&n(6,o=g&&"false"===r),65536&t.$$.dirty&&n(7,i=void 0===d||"false"===d)},[c,l,a,u,y,w,o,i,f,v,()=>{window.SpeechlyClient.initialize()},t=>{g&&"Escape"===t.key&&(t.preventDefault(),v())},t=>{switch(t.data.type){case ht.speechlypoweron:"auto"===r&&n(6,o=!0),n(5,w=!0);break;case ht.speechstate:k(t.data.state);break;case ht.holdstart:switch(t.data.state){case dt.Failed:case dt.NoAudioConsent:case dt.NoBrowserSupport:x(t.data.state)}}},()=>{const t=window.location.href.replace("http:","https:");window.location.replace(t)},r,s,d,g,()=>{window.location.reload()}]}class Vt extends at{constructor(t){super(),this.shadowRoot.innerHTML="<style>modal{font-size:var(--remsize);pointer-events:none;height:100%}modalbg{position:fixed;top:0;bottom:0;left:0;right:0;overflow:hidden;z-index:2000;pointer-events:auto;background-color:rgba(0,0,0,0.75);backdrop-filter:blur(3px)}modalcontent{z-index:2001;pointer-events:auto;box-sizing:border-box;width:100%;min-height:100%;padding:1.5rem;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#fff}modalcontent.fixed{position:fixed;top:0;left:0;right:0;bottom:0;overflow-x:hidden;overflow-y:auto}modalcontent.absolute{position:absolute;top:0;left:0;right:0;height:100vh}.defaultTypography{font-family:-apple-system, system-ui, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif;color:#fff;font-size:1rem;line-height:1.5}.defaultTypography h2{font-family:'Saira Condensed', sans-serif;padding:0;margin:0;text-transform:uppercase;color:#fff;font-size:1.5rem;line-height:1.25}main{position:relative;box-sizing:border-box;width:100%;max-width:400px;margin:auto 0;padding:1.5rem 0}options{display:flex;margin-top:2rem;gap:8px}.button{background-color:transparent;box-sizing:border-box;border:1px solid transparent;border-radius:999px;cursor:pointer;font-family:inherit;font-size:1rem;font-weight:600;line-height:1.25;min-width:7rem;padding:0.5rem 1.5rem;transition:all 0.15s ease;white-space:nowrap;-webkit-tap-highlight-color:transparent}.button[disabled],.button:disabled{cursor:auto;opacity:0.5;pointer-events:none}.button-secondary{border-color:#fff;color:#fff}.button-secondary:hover{border-color:#ccc;color:#ccc}.button-primary{background-color:#fff;border-color:#fff;color:#000}.button-primary:hover{border-color:#ccc;background-color:#ccc;color:#000}footer{box-sizing:border-box;font-size:0.75rem;color:#999;margin:0}a,a:visited{color:#999;transition:all 0.15s ease;-webkit-tap-highlight-color:transparent}a:hover{color:#ccc}</style>",lt(this,{target:this.shadowRoot,props:N(this.attributes),customElement:!0},Ht,Bt,c,{hide:14,clientstate:15,remsize:0,position:1,appid:2,customcssurl:3,customtypography:16},null),t&&(t.target&&b(t.target,this,t.anchor),t.props&&(this.$set(t.props),W()))}static get observedAttributes(){return["hide","clientstate","remsize","position","appid","customcssurl","customtypography"]}get hide(){return this.$$.ctx[14]}set hide(t){this.$$set({hide:t}),W()}get clientstate(){return this.$$.ctx[15]}set clientstate(t){this.$$set({clientstate:t}),W()}get remsize(){return this.$$.ctx[0]}set remsize(t){this.$$set({remsize:t}),W()}get position(){return this.$$.ctx[1]}set position(t){this.$$set({position:t}),W()}get appid(){return this.$$.ctx[2]}set appid(t){this.$$set({appid:t}),W()}get customcssurl(){return this.$$.ctx[3]}set customcssurl(t){this.$$set({customcssurl:t}),W()}get customtypography(){return this.$$.ctx[16]}set customtypography(t){this.$$set({customtypography:t}),W()}}customElements.get("intro-popup")?console.warn("Skipping re-defining customElement intro-popup"):customElements.define("intro-popup",Vt)}));
!function(t){"function"==typeof define&&define.amd?define(t):t()}((function(){"use strict";function t(){}const e=t=>t;function n(t){return t()}function o(){return Object.create(null)}function r(t){t.forEach(n)}function i(t){return"function"==typeof t}function s(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 a(t){return 0===Object.keys(t).length}const l="undefined"!=typeof window;let u=l?()=>window.performance.now():()=>Date.now(),d=l?t=>requestAnimationFrame(t):t;const p=new Set;function h(t){p.forEach((e=>{e.c(t)||(p.delete(e),e.f())})),0!==p.size&&d(h)}function f(t,e){t.appendChild(e)}function m(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function g(t){const e=w("style");return y(m(t),e),e.sheet}function y(t,e){f(t.head||t,e)}function b(t,e,n){t.insertBefore(e,n||null)}function v(t){t.parentNode.removeChild(t)}function w(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 S(){return x(" ")}function C(){return x("")}function E(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function T(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function A(t,e,n,o){null===n?t.style.removeProperty(e):t.style.setProperty(e,n,o?"important":"")}function k(t,e,n){t.classList[n?"add":"remove"](e)}function _(t){const e={};for(const n of t)e[n.name]=n.value;return e}const z=new Map;let N,O=0;function M(t,e,n,o,r,i,s,c=0){const a=16.666/o;let l="{\n";for(let t=0;t<=1;t+=a){const o=e+(n-e)*i(t);l+=100*t+`%{${s(o,1-o)}}\n`}const u=l+`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}`,p=m(t),{stylesheet:h,rules:f}=z.get(p)||function(t,e){const n={stylesheet:g(e),rules:{}};return z.set(t,n),n}(p,t);f[d]||(f[d]=!0,h.insertRule(`@keyframes ${d} ${u}`,h.cssRules.length));const y=t.style.animation||"";return t.style.animation=`${y?`${y}, `:""}${d} ${o}ms linear ${r}ms 1 both`,O+=1,d}function L(t,e){const n=(t.style.animation||"").split(", "),o=n.filter(e?t=>t.indexOf(e)<0:t=>-1===t.indexOf("__svelte")),r=n.length-o.length;r&&(t.style.animation=o.join(", "),O-=r,O||d((()=>{O||(z.forEach((t=>{const{stylesheet:e}=t;let n=e.cssRules.length;for(;n--;)e.deleteRule(n);t.rules={}})),z.clear())})))}function P(t){N=t}function R(){if(!N)throw new Error("Function called outside component initialization");return N}const D=[],F=[],B=[],I=[],H=Promise.resolve();let V=!1;function j(t){B.push(t)}const q=new Set;let U,X=0;function W(){const t=N;do{for(;X<D.length;){const t=D[X];X++,P(t),K(t.$$)}for(P(null),D.length=0,X=0;F.length;)F.pop()();for(let t=0;t<B.length;t+=1){const e=B[t];q.has(e)||(q.add(e),e())}B.length=0}while(D.length);for(;I.length;)I.pop()();V=!1,q.clear(),P(t)}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(j)}}function Y(t,e,n){t.dispatchEvent(function(t,e,{bubbles:n=!1,cancelable:o=!1}={}){const r=document.createEvent("CustomEvent");return r.initCustomEvent(t,n,o,e),r}(`${e?"intro":"outro"}${n}`))}const G=new Set;let Z;function J(){Z={r:0,c:[],p:Z}}function Q(){Z.r||r(Z.c),Z=Z.p}function tt(t,e){t&&t.i&&(G.delete(t),t.i(e))}function et(t,e,n,o){if(t&&t.o){if(G.has(t))return;G.add(t),Z.c.push((()=>{G.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}const nt={duration:0};function ot(n,o,s,c){let a=o(n,s),l=c?0:1,f=null,m=null,g=null;function y(){g&&L(n,g)}function b(t,e){const n=t.b-l;return e*=Math.abs(n),{a:l,b:t.b,d:n,duration:e,start:t.start,end:t.start+e,group:t.group}}function v(o){const{delay:i=0,duration:s=300,easing:c=e,tick:v=t,css:w}=a||nt,$={start:u()+i,b:o};o||($.group=Z,Z.r+=1),f||m?m=$:(w&&(y(),g=M(n,l,o,s,i,c,w)),o&&v(0,1),f=b($,s),j((()=>Y(n,o,"start"))),function(t){let e;0===p.size&&d(h),new Promise((n=>{p.add(e={c:t,f:n})}))}((t=>{if(m&&t>m.start&&(f=b(m,s),m=null,Y(n,f.b,"start"),w&&(y(),g=M(n,l,f.b,f.duration,0,c,a.css))),f)if(t>=f.end)v(l=f.b,1-l),Y(n,f.b,"end"),m||(f.b?y():--f.group.r||r(f.group.c)),f=null;else if(t>=f.start){const e=t-f.start;l=f.a+f.d*c(e/f.duration),v(l,1-l)}return!(!f&&!m)})))}return{run(t){i(a)?(U||(U=Promise.resolve(),U.then((()=>{U=null}))),U).then((()=>{a=a(),v(t)})):v(t)},end(){y(),f=m=null}}}const rt="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function it(t,e,o,s){const{fragment:c,on_mount:a,on_destroy:l,after_update:u}=t.$$;c&&c.m(e,o),s||j((()=>{const e=a.map(n).filter(i);l?l.push(...e):r(e),t.$$.on_mount=[]})),u.forEach(j)}function st(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 ct(t,e){-1===t.$$.dirty[0]&&(D.push(t),V||(V=!0,H.then(W)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function at(e,n,i,s,c,a,l,u=[-1]){const d=N;P(e);const p=e.$$={fragment:null,ctx:null,props:a,update:t,not_equal:c,bound:o(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(d?d.$$.context:[])),callbacks:o(),dirty:u,skip_bound:!1,root:n.target||d.$$.root};l&&l(p.root);let h=!1;if(p.ctx=i?i(e,n.props||{},((t,n,...o)=>{const r=o.length?o[0]:n;return p.ctx&&c(p.ctx[t],p.ctx[t]=r)&&(!p.skip_bound&&p.bound[t]&&p.bound[t](r),h&&ct(e,t)),n})):[],p.update(),h=!0,r(p.before_update),p.fragment=!!s&&s(p.ctx),n.target){if(n.hydrate){const t=function(t){return Array.from(t.childNodes)}(n.target);p.fragment&&p.fragment.l(t),t.forEach(v)}else p.fragment&&p.fragment.c();n.intro&&tt(e.$$.fragment),it(e,n.target,n.anchor,n.customElement),W()}P(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(i);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){r(this.$$.on_disconnect)}$destroy(){st(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 ut(t,{delay:n=0,duration:o=400,easing:r=e}={}){const i=+getComputedStyle(t).opacity;return{delay:n,duration:o,easing:r,css:t=>"opacity: "+t*i}}var dt,pt,ht,ft,mt;!function(t){t.NoAudioConsent="NoAudioConsent",t.NoBrowserSupport="NoBrowserSupport",t.Stopped="Stopped",t.Starting="Starting",t.Started="Started"}(dt||(dt={})),function(t){t.Started="started",t.Stopped="stopped",t.SegmentEnd="segment_end",t.Transcript="transcript",t.Entity="entity",t.Intent="intent",t.TentativeTranscript="tentative_transcript",t.TentativeEntities="tentative_entities",t.TentativeIntent="tentative_intent"}(pt||(pt={})),function(t){t.Opened="WEBSOCKET_OPEN",t.Closed="WEBSOCKET_CLOSED",t.AudioProcessorReady="SOURCE_SAMPLE_RATE_SET_SUCCESS",t.VadSignalHigh="VadSignalHigh",t.VadSignalLow="VadSignalLow"}(ht||(ht={})),function(t){t.connect="connect",t.initAudioProcessor="initAudioProcessor",t.adjustAudioProcessor="adjustAudioProcessor",t.SET_SHARED_ARRAY_BUFFERS="SET_SHARED_ARRAY_BUFFERS",t.CLOSE="CLOSE",t.START_CONTEXT="START_CONTEXT",t.SWITCH_CONTEXT="SWITCH_CONTEXT",t.STOP_CONTEXT="STOP_CONTEXT",t.AUDIO="AUDIO",t.startStream="startStream",t.stopStream="stopStream",t.setContextOptions="setContextOptions"}(ft||(ft={})),function(t){t[t.Failed=0]="Failed",t[t.Disconnected=1]="Disconnected",t[t.Connected=2]="Connected",t[t.Active=3]="Active"}(mt||(mt={})),new Map([[mt.Failed,"Failed"],[mt.Disconnected,"Disconnected"],[mt.Connected,"Connected"],[mt.Active,"Active"]]);for(var gt=[],yt=0;yt<256;++yt)gt.push((yt+256).toString(16).substr(1));var bt,vt,wt,$t,xt,St,Ct,Et,Tt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},At={exports:{}};function kt(t){!function(t,e,n){const o=m(t);if(!o.getElementById(e)){const t=w("style");t.id=e,t.textContent=n,y(o,t)}}(t,"svelte-s2u2hd",".Icon.svelte-s2u2hd{position:absolute;width:var(--icon-size);height:var(--icon-size);top:50%;left:50%;transform:translate(-50%, -50%);pointer-events:none;transition:0.25s;opacity:var(--icon-opacity)}")}function _t(t){let e,n,o,r,i,s,c,a,l,u,d,p,h;return{c(){e=$("svg"),n=$("linearGradient"),o=$("animate"),r=$("animate"),i=$("stop"),s=$("stop"),c=$("stop"),a=$("stop"),l=$("stop"),u=x(">\n "),d=$("g"),p=$("path"),h=$("rect"),T(o,"attributeName","y1"),T(o,"values","-200%; 0%;"),T(o,"dur","2s"),T(o,"repeatCount","indefinite"),T(r,"attributeName","y2"),T(r,"values","200%; 400%;"),T(r,"dur","2s"),T(r,"repeatCount","indefinite"),T(i,"offset","0%"),T(i,"stop-color","var(--gradient-stop1)"),T(s,"offset","25%"),T(s,"stop-color","var(--gradient-stop2)"),T(c,"offset","50%"),T(c,"stop-color","var(--gradient-stop1)"),T(a,"offset","75%"),T(a,"stop-color","var(--gradient-stop2)"),T(l,"offset","100%"),T(l,"stop-color","var(--gradient-stop1)"),T(n,"id","gradient"),T(n,"x1","50%"),T(n,"y1","-200%"),T(n,"x2","50%"),T(n,"y2","200%"),T(p,"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"),T(h,"x","20"),T(h,"y","1"),T(h,"width","16"),T(h,"height","37"),T(h,"rx","8"),T(d,"fill","url(#gradient)"),T(d,"fill-rule","evenodd"),T(e,"class","Icon svelte-s2u2hd"),T(e,"viewBox","0 0 56 56"),T(e,"xmlns","http://www.w3.org/2000/svg")},m(t,m){b(t,e,m),f(e,n),f(n,o),f(n,r),f(n,i),f(n,s),f(n,c),f(n,a),f(n,l),f(e,u),f(e,d),f(d,p),f(d,h)},d(t){t&&v(e)}}}function zt(t){let e,n,o,r;return{c(){e=$("svg"),n=$("g"),o=$("path"),r=$("rect"),T(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"),T(r,"x","20"),T(r,"y","1"),T(r,"width","16"),T(r,"height","37"),T(r,"rx","8"),T(n,"fill","var(--icon-color)"),T(n,"fill-rule","evenodd"),T(e,"class","Icon svelte-s2u2hd"),T(e,"viewBox","0 0 56 56"),T(e,"xmlns","http://www.w3.org/2000/svg")},m(t,i){b(t,e,i),f(e,n),f(n,o),f(n,r)},d(t){t&&v(e)}}}function Nt(t){let e,n,o,r;return{c(){e=$("svg"),n=$("g"),o=$("path"),r=$("path"),T(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"),T(o,"fill-rule","nonzero"),T(r,"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"),T(n,"fill","var(--icon-color)"),T(n,"fill-rule","evenodd"),T(e,"class","Icon svelte-s2u2hd"),T(e,"viewBox","0 0 56 56"),T(e,"xmlns","http://www.w3.org/2000/svg")},m(t,i){b(t,e,i),f(e,n),f(n,o),f(n,r)},d(t){t&&v(e)}}}function Ot(t){let e,n,o,r;return{c(){e=$("svg"),n=$("g"),o=$("path"),r=$("path"),T(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"),T(r,"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"),T(n,"fill","var(--icon-color)"),T(n,"fill-rule","nonzero"),T(e,"class","Icon svelte-s2u2hd"),T(e,"viewBox","0 0 56 56"),T(e,"xmlns","http://www.w3.org/2000/svg")},m(t,i){b(t,e,i),f(e,n),f(n,o),f(n,r)},d(t){t&&v(e)}}}function Mt(e){let n,o,r,i,s=e[0]===xt.MicActive&&_t(),c=e[0]===xt.Mic&&zt(),a=e[0]===xt.Error&&Nt(),l=e[0]===xt.Denied&&Ot();return{c(){s&&s.c(),n=S(),c&&c.c(),o=S(),a&&a.c(),r=S(),l&&l.c(),i=C()},m(t,e){s&&s.m(t,e),b(t,n,e),c&&c.m(t,e),b(t,o,e),a&&a.m(t,e),b(t,r,e),l&&l.m(t,e),b(t,i,e)},p(t,[e]){t[0]===xt.MicActive?s||(s=_t(),s.c(),s.m(n.parentNode,n)):s&&(s.d(1),s=null),t[0]===xt.Mic?c||(c=zt(),c.c(),c.m(o.parentNode,o)):c&&(c.d(1),c=null),t[0]===xt.Error?a||(a=Nt(),a.c(),a.m(r.parentNode,r)):a&&(a.d(1),a=null),t[0]===xt.Denied?l||(l=Ot(),l.c(),l.m(i.parentNode,i)):l&&(l.d(1),l=null)},i:t,o:t,d(t){s&&s.d(t),t&&v(n),c&&c.d(t),t&&v(o),a&&a.d(t),t&&v(r),l&&l.d(t),t&&v(i)}}}function Lt(t,e,n){let{icon:o=xt.Mic}=e;return t.$$set=t=>{"icon"in t&&n(0,o=t.icon)},[o]}
/*! http://mths.be/base64 v0.1.0 by @mathias | MIT license */
bt=At,vt=At.exports,function(t){var e=vt,n=bt&&bt.exports==e&&bt,o="object"==typeof Tt&&Tt;o.global!==o&&o.window!==o||(t=o);var r=function(t){this.message=t};(r.prototype=new Error).name="InvalidCharacterError";var i=function(t){throw new r(t)},s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=/[\t\n\f\r ]/g,a={encode:function(t){t=String(t),/[^\0-\xFF]/.test(t)&&i("The string to be encoded contains characters outside of the Latin1 range.");for(var e,n,o,r,c=t.length%3,a="",l=-1,u=t.length-c;++l<u;)e=t.charCodeAt(l)<<16,n=t.charCodeAt(++l)<<8,o=t.charCodeAt(++l),a+=s.charAt((r=e+n+o)>>18&63)+s.charAt(r>>12&63)+s.charAt(r>>6&63)+s.charAt(63&r);return 2==c?(e=t.charCodeAt(l)<<8,n=t.charCodeAt(++l),a+=s.charAt((r=e+n)>>10)+s.charAt(r>>4&63)+s.charAt(r<<2&63)+"="):1==c&&(r=t.charCodeAt(l),a+=s.charAt(r>>2)+s.charAt(r<<4&63)+"=="),a},decode:function(t){var e=(t=String(t).replace(c,"")).length;e%4==0&&(e=(t=t.replace(/==?$/,"")).length),(e%4==1||/[^+a-zA-Z0-9/]/.test(t))&&i("Invalid character: the string to be decoded is not correctly encoded.");for(var n,o,r=0,a="",l=-1;++l<e;)o=s.indexOf(t.charAt(l)),n=r%4?64*n+o:o,r++%4&&(a+=String.fromCharCode(255&n>>(-2*r&6)));return a},version:"0.1.0"};if(e&&!e.nodeType)if(n)n.exports=a;else for(var l in a)a.hasOwnProperty(l)&&(e[l]=a[l]);else t.base64=a}(Tt),function(t){t.SpeechlyFirstConnect="SpeechlyFirstConnect"}(wt||(wt={})),function(t){t.speechlypoweron="speechlypoweron",t.holdstart="holdstart",t.holdend="holdend",t.speechstate="speechstate",t.audiosourcestate="audiosourcestate",t.speechsegment="speechsegment",t.speechhandled="speechhandled",t.showhint="showhint",t.transcriptdrawerhint="hint",t.speechlyintroready="speechlyintroready",t.speechlyintroclosed="speechlyintroclosed",t.startcontext="startcontext",t.stopcontext="stopcontext",t.requeststartmicrophone="requeststartmicrophone"}($t||($t={})),function(t){t.Mic="mic",t.MicActive="micactive",t.Error="error",t.Denied="denied"}(xt||(xt={})),function(t){t.Hold="hold",t.Click="click",t.Noninteractive="noninteractive"}(St||(St={})),function(t){t.None="none",t.Connecting="connecting",t.Busy="busy"}(Ct||(Ct={})),function(t){t.None="none",t.Whirl="whirl"}(Et||(Et={})),mt.Disconnected,mt.Connected,mt.Active,mt.Failed,dt.NoBrowserSupport,dt.NoAudioConsent;class Pt extends class{$destroy(){st(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){super(),at(this,t,Lt,Mt,s,{icon:0},kt)}}const{window:Rt}=rt;function Dt(t){let e;return{c(){e=w("link"),T(e,"href","https://fonts.googleapis.com/css2?family=Saira+Condensed:wght@700&display=swap"),T(e,"rel","stylesheet")},m(t,n){b(t,e,n)},d(t){t&&v(e)}}}function Ft(t){let e;return{c(){e=w("link"),T(e,"href",t[3]),T(e,"rel","stylesheet")},m(t,n){b(t,e,n)},p(t,n){8&n&&T(e,"href",t[3])},d(t){t&&v(e)}}}function Bt(t){let e,n,o,r,i,s,c,a,l,u,d,p;const h=[qt,jt,Vt,Ht,It],m=[];function g(t,e){return t[4]===Yt||t[4]===dt.Starting?0:t[4]===Gt?1:t[4]===dt.NoAudioConsent?2:t[4]===dt.NoBrowserSupport?3:4}return s=g(t),c=m[s]=h[s](t),{c(){e=w("modalbg"),o=S(),r=w("modalcontent"),i=w("main"),c.c(),a=S(),l=w("footer"),l.innerHTML='Voice input is automatically transcribed by <a target="_blank" href="https://speechly.com/" rel="noopener noreferrer">Speechly</a> and can be used to improve the quality of service under <a target="_blank" href="https://www.speechly.com/privacy/terms-and-conditions" rel="noopener noreferrer">terms of use</a>.',T(r,"class",t[1]),k(r,"defaultTypography",t[7])},m(n,c){b(n,e,c),b(n,o,c),b(n,r,c),f(r,i),m[s].m(i,null),f(r,a),f(r,l),u=!0,d||(p=E(e,"click",t[9]),d=!0)},p(t,e){let n=s;s=g(t),s===n?m[s].p(t,e):(J(),et(m[n],1,1,(()=>{m[n]=null})),Q(),c=m[s],c?c.p(t,e):(c=m[s]=h[s](t),c.c()),tt(c,1),c.m(i,null)),(!u||2&e)&&T(r,"class",t[1]),130&e&&k(r,"defaultTypography",t[7])},i(o){u||(j((()=>{n||(n=ot(e,t[8],{duration:200},!0)),n.run(1)})),tt(c),u=!0)},o(o){n||(n=ot(e,t[8],{duration:200},!1)),n.run(0),et(c),u=!1},d(t){t&&v(e),t&&n&&n.end(),t&&v(o),t&&v(r),m[s].d(),d=!1,p()}}}function It(e){let n,o,r,i,s,c,a,l;function u(t,e){return t[2]?Xt:Ut}let d=u(e),p=d(e);return{c(){n=w("h2"),n.textContent="Failed to connect to Speechly",o=S(),r=w("p"),p.c(),i=S(),s=w("options"),c=w("button"),c.textContent="Ok, got it",T(c,"class","button button-primary")},m(t,u){b(t,n,u),b(t,o,u),b(t,r,u),p.m(r,null),b(t,i,u),b(t,s,u),f(s,c),a||(l=E(c,"click",e[9]),a=!0)},p(t,e){d===(d=u(t))&&p?p.p(t,e):(p.d(1),p=d(t),p&&(p.c(),p.m(r,null)))},i:t,o:t,d(t){t&&v(n),t&&v(o),t&&v(r),p.d(),t&&v(i),t&&v(s),a=!1,l()}}}function Ht(e){let n,o,r,i,s,c,a,l;return{c(){n=w("h2"),n.textContent="Unsupported browser",o=S(),r=w("p"),r.textContent="To use voice input, please visit this site using a supported browser.",i=S(),s=w("options"),c=w("button"),c.textContent="Ok, got it",T(c,"class","button button-primary")},m(t,u){b(t,n,u),b(t,o,u),b(t,r,u),b(t,i,u),b(t,s,u),f(s,c),a||(l=E(c,"click",e[9]),a=!0)},p:t,i:t,o:t,d(t){t&&v(n),t&&v(o),t&&v(r),t&&v(i),t&&v(s),a=!1,l()}}}function Vt(e){let n,o,i,s,c,a,l,u,d,p;return{c(){n=w("h2"),n.textContent="Microphone blocked",o=S(),i=w("p"),i.textContent=`To use voice input, ${window.location.hostname} needs access to your microphone. Check your\n browser preferences to allow microphone access and reload the page.`,s=S(),c=w("options"),a=w("button"),a.textContent="Ok, got it",l=S(),u=w("button"),u.textContent="Reload page",T(a,"class","button button-secondary"),T(u,"class","button button-primary")},m(t,r){b(t,n,r),b(t,o,r),b(t,i,r),b(t,s,r),b(t,c,r),f(c,a),f(c,l),f(c,u),d||(p=[E(a,"click",e[9]),E(u,"click",e[19])],d=!0)},p:t,i:t,o:t,d(t){t&&v(n),t&&v(o),t&&v(i),t&&v(s),t&&v(c),d=!1,r(p)}}}function jt(e){let n,o,i,s,c,a,l,u,d,p;return{c(){n=w("h2"),n.textContent="HTTPS required",o=S(),i=w("p"),i.textContent="To use the voice interface, please visit this site using the secure\n HTTPS protocol.",s=S(),c=w("options"),a=w("button"),a.textContent="Ok, got it",l=S(),u=w("button"),u.textContent="Try with HTTPS",T(a,"class","button button-secondary"),T(u,"class","button button-primary")},m(t,r){b(t,n,r),b(t,o,r),b(t,i,r),b(t,s,r),b(t,c,r),f(c,a),f(c,l),f(c,u),d||(p=[E(a,"click",e[9]),E(u,"click",e[13])],d=!0)},p:t,i:t,o:t,d(t){t&&v(n),t&&v(o),t&&v(i),t&&v(s),t&&v(c),d=!1,r(p)}}}function qt(t){let e,n,o,r,i,s,c,a,l,u,d,p,h,m,g,y,$,C,k,_=window.location.hostname+"";d=new Pt({});let z=t[5]&&Wt(t);return{c(){var t;e=w("h2"),e.innerHTML='<slot name="priming-title">Allow microphone</slot>',n=S(),o=w("p"),r=w("slot"),i=x("To use voice input, press "),s=w("strong"),s.textContent="Allow",c=x(" to give "),a=x(_),l=x(" access to your microphone.\n Audio is only captured when "),u=w("span"),(t=d.$$.fragment)&&t.c(),p=x(" button is pressed."),h=S(),m=w("options"),g=w("button"),g.textContent="Not now",y=S(),z&&z.c(),A(u,"display","inline-block"),A(u,"position","relative"),A(u,"color","white"),A(u,"width","20px"),A(u,"height","10px"),A(u,"--icon-color","white"),A(u,"--icon-size","20px"),T(r,"name","priming-body"),T(g,"class","button button-secondary")},m(v,w){b(v,e,w),b(v,n,w),b(v,o,w),f(o,r),f(r,i),f(r,s),f(r,c),f(r,a),f(r,l),f(r,u),it(d,u,null),f(r,p),b(v,h,w),b(v,m,w),f(m,g),f(m,y),z&&z.m(m,null),$=!0,C||(k=E(g,"click",t[9]),C=!0)},p(t,e){t[5]?z?z.p(t,e):(z=Wt(t),z.c(),z.m(m,null)):z&&(z.d(1),z=null)},i(t){$||(tt(d.$$.fragment,t),$=!0)},o(t){et(d.$$.fragment,t),$=!1},d(t){t&&v(e),t&&v(n),t&&v(o),st(d),t&&v(h),t&&v(m),z&&z.d(),C=!1,k()}}}function Ut(e){let n;return{c(){n=x("Please check that your application has been successfully deployed.")},m(t,e){b(t,n,e)},p:t,d(t){t&&v(n)}}}function Xt(t){let e,n,o;return{c(){e=x("Please check that your application (App ID: "),n=x(t[2]),o=x(") has been successfully deployed.")},m(t,r){b(t,e,r),b(t,n,r),b(t,o,r)},p(t,e){4&e&&function(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}(n,t[2])},d(t){t&&v(e),t&&v(n),t&&v(o)}}}function Wt(t){let e,n,o,r,i;return{c(){e=w("button"),n=x("Allow"),T(e,"class","button button-primary"),e.disabled=o=t[4]===dt.Starting},m(o,s){b(o,e,s),f(e,n),r||(i=E(e,"click",t[10]),r=!0)},p(t,n){16&n&&o!==(o=t[4]===dt.Starting)&&(e.disabled=o)},d(t){t&&v(e),r=!1,i()}}}function Kt(e){let n,o,i,s,c,a,l,u=e[7]&&Dt(),d=void 0!==e[3]&&Ft(e),p=e[6]&&Bt(e);return{c(){u&&u.c(),n=C(),o=S(),d&&d.c(),i=S(),s=w("modal"),p&&p.c(),this.c=t,A(s,"--remsize",e[0])},m(t,r){u&&u.m(document.head,null),f(document.head,n),b(t,o,r),d&&d.m(t,r),b(t,i,r),b(t,s,r),p&&p.m(s,null),c=!0,a||(l=[E(Rt,"keydown",e[11]),E(Rt,"message",e[12])],a=!0)},p(t,[e]){t[7]?u||(u=Dt(),u.c(),u.m(n.parentNode,n)):u&&(u.d(1),u=null),void 0!==t[3]?d?d.p(t,e):(d=Ft(t),d.c(),d.m(i.parentNode,i)):d&&(d.d(1),d=null),t[6]?p?(p.p(t,e),64&e&&tt(p,1)):(p=Bt(t),p.c(),tt(p,1),p.m(s,null)):p&&(J(),et(p,1,1,(()=>{p=null})),Q()),(!c||1&e)&&A(s,"--remsize",t[0])},i(t){c||(tt(p),c=!0)},o(t){et(p),c=!1},d(t){u&&u.d(t),v(n),t&&v(o),d&&d.d(t),t&&v(i),t&&v(s),p&&p.d(),a=!1,r(l)}}}const Yt="PagePriming",Gt="HttpsRequired";function Zt(t,e,n){let o,r;var i=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(r,i){function s(t){try{a(o.next(t))}catch(t){i(t)}}function c(t){try{a(o.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,c)}a((o=o.apply(t,e||[])).next())}))};let{hide:s="auto"}=e,{clientstate:c}=e,{microphonestate:a}=e,{remsize:l="1.0rem"}=e,{position:u="fixed"}=e,{appid:d}=e,{customcssurl:p}=e,{customtypography:h}=e,f=!0;const m=(()=>{const t=R();return(e,n)=>{t.dispatchEvent(new CustomEvent(e,{detail:n,composed:!0}))}})(),g=(y=ut,function(t,e){if(!t.hasOwnProperty("ownerDocument")){Object.defineProperty(t,"ownerDocument",{get:function(){return t.parentElement}});let e=t;for(;e.parentElement;)e=e.parentElement;t.parentElement.head=e}return y(t,e)});var y;let b=!1,v=Yt,w=null,$=!1;var x;x=()=>{n(18,b=!0),window.postMessage({type:$t.speechlyintroready},"*")},R().$$.on_mount.push(x);const S=(t={})=>{n(6,o=!1),m("speechlyintroclosed",t),window.postMessage(Object.assign({type:$t.speechlyintroclosed},t),"*")},C=t=>{var e,r;("auto"===s&&n(6,o=!0),w&&(window.clearTimeout(w),w=null),"https:"===(null===(e=null===window||void 0===window?void 0:window.location)||void 0===e?void 0:e.protocol)||("localhost"===(r=window.location.hostname)||"[::1]"===r||null!==r.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/)))?n(4,v=t):n(4,v=Gt)},E=t=>{switch(t){case dt.Starting:v===Yt?(n(4,v=t),w=window.setTimeout((()=>{w=null,"auto"===s&&n(6,o=!0)}),500)):n(6,o=!0);break;case dt.Started:f&&(f=!1,w?(window.clearTimeout(w),w=null,S()):S({firstrun:!0}));break;case dt.NoAudioConsent:case dt.NoBrowserSupport:C(t)}},T=t=>{if(t===mt.Failed)C(t)};return t.$$set=t=>{"hide"in t&&n(14,s=t.hide),"clientstate"in t&&n(15,c=t.clientstate),"microphonestate"in t&&n(16,a=t.microphonestate),"remsize"in t&&n(0,l=t.remsize),"position"in t&&n(1,u=t.position),"appid"in t&&n(2,d=t.appid),"customcssurl"in t&&n(3,p=t.customcssurl),"customtypography"in t&&n(17,h=t.customtypography)},t.$$.update=()=>{32768&t.$$.dirty&&c&&T(parseInt(c)),65536&t.$$.dirty&&a&&E(a),278528&t.$$.dirty&&n(6,o=b&&"false"===s),131072&t.$$.dirty&&n(7,r=void 0===h||"false"===h)},[l,u,d,p,v,$,o,r,g,S,()=>i(void 0,void 0,void 0,(function*(){m($t.requeststartmicrophone)})),t=>{b&&"Escape"===t.key&&(t.preventDefault(),S())},t=>{switch(t.data.type){case $t.speechlypoweron:"auto"===s&&n(6,o=!0),n(5,$=!0);break;case $t.speechstate:T(t.data.state);break;case $t.audiosourcestate:E(t.data.state);break;case $t.holdstart:switch(t.data.audioSourceState){case dt.NoAudioConsent:case dt.NoBrowserSupport:C(t.data.audioSourceState);break;default:if(t.data.state===mt.Failed)C(t.data.state)}}},()=>{const t=window.location.href.replace("http:","https:");window.location.replace(t)},s,c,a,h,b,()=>{window.location.reload()}]}class Jt extends lt{constructor(t){super(),this.shadowRoot.innerHTML="<style>modal{font-size:var(--remsize);pointer-events:none;height:100%}modalbg{position:fixed;top:0;bottom:0;left:0;right:0;overflow:hidden;z-index:2000;pointer-events:auto;background-color:rgba(0,0,0,0.75);backdrop-filter:blur(3px)}modalcontent{z-index:2001;pointer-events:auto;box-sizing:border-box;width:100%;min-height:100%;padding:1.5rem;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#fff}modalcontent.fixed{position:fixed;top:0;left:0;right:0;bottom:0;overflow-x:hidden;overflow-y:auto}modalcontent.absolute{position:absolute;top:0;left:0;right:0;height:100vh}.defaultTypography{font-family:-apple-system, system-ui, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif;color:#fff;font-size:1rem;line-height:1.5}.defaultTypography h2{font-family:'Saira Condensed', sans-serif;padding:0;margin:0;text-transform:uppercase;color:#fff;font-size:1.5rem;line-height:1.25}main{position:relative;box-sizing:border-box;width:100%;max-width:400px;margin:auto 0;padding:1.5rem 0}options{display:flex;margin-top:2rem;gap:8px}.button{background-color:transparent;box-sizing:border-box;border:1px solid transparent;border-radius:999px;cursor:pointer;font-family:inherit;font-size:1rem;font-weight:600;line-height:1.25;min-width:7rem;padding:0.5rem 1.5rem;transition:all 0.15s ease;white-space:nowrap;-webkit-tap-highlight-color:transparent}.button[disabled],.button:disabled{cursor:auto;opacity:0.5;pointer-events:none}.button-secondary{border-color:#fff;color:#fff}.button-secondary:hover{border-color:#ccc;color:#ccc}.button-primary{background-color:#fff;border-color:#fff;color:#000}.button-primary:hover{border-color:#ccc;background-color:#ccc;color:#000}footer{box-sizing:border-box;font-size:0.75rem;color:#999;margin:0}a,a:visited{color:#999;transition:all 0.15s ease;-webkit-tap-highlight-color:transparent}a:hover{color:#ccc}</style>",at(this,{target:this.shadowRoot,props:_(this.attributes),customElement:!0},Zt,Kt,c,{hide:14,clientstate:15,microphonestate:16,remsize:0,position:1,appid:2,customcssurl:3,customtypography:17},null),t&&(t.target&&b(t.target,this,t.anchor),t.props&&(this.$set(t.props),W()))}static get observedAttributes(){return["hide","clientstate","microphonestate","remsize","position","appid","customcssurl","customtypography"]}get hide(){return this.$$.ctx[14]}set hide(t){this.$$set({hide:t}),W()}get clientstate(){return this.$$.ctx[15]}set clientstate(t){this.$$set({clientstate:t}),W()}get microphonestate(){return this.$$.ctx[16]}set microphonestate(t){this.$$set({microphonestate:t}),W()}get remsize(){return this.$$.ctx[0]}set remsize(t){this.$$set({remsize:t}),W()}get position(){return this.$$.ctx[1]}set position(t){this.$$set({position:t}),W()}get appid(){return this.$$.ctx[2]}set appid(t){this.$$set({appid:t}),W()}get customcssurl(){return this.$$.ctx[3]}set customcssurl(t){this.$$set({customcssurl:t}),W()}get customtypography(){return this.$$.ctx[17]}set customtypography(t){this.$$set({customtypography:t}),W()}}customElements.get("intro-popup")?console.warn("Skipping re-defining customElement intro-popup"):customElements.define("intro-popup",Jt)}));
//# sourceMappingURL=intro-popup.js.map

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

!function(t){"function"==typeof define&&define.amd?define(t):t()}((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 a(t,e){return t!=t?e==e:t!==e}function l(t){return 0===Object.keys(t).length}function h(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 u=d?()=>window.performance.now():()=>Date.now(),f=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&&f(p)}function m(t){let e;return 0===g.size&&f(p),{promise:new Promise((n=>{g.add(e={c:t,f:n})})),abort(){g.delete(e)}}}function $(t,e){t.appendChild(e)}function y(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function b(t){const e=k("style");return x(y(t),e),e.sheet}function x(t,e){$(t.head||t,e)}function w(t,e,n){t.insertBefore(e,n||null)}function v(t){t.parentNode.removeChild(t)}function k(t){return document.createElement(t)}function z(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function T(t){return document.createTextNode(t)}function E(){return T(" ")}function C(){return T("")}function _(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function P(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:P(t,e,n)}function R(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function D(t,e,n,o){null===n?t.style.removeProperty(e):t.style.setProperty(e,n,o?"important":"")}function I(t,e,n){t.classList[n?"add":"remove"](e)}function N(t){const e={};for(const n of t)e[n.name]=n.value;return e}const F=new Map;let A,M=0;function B(t,e,n,o,i,r,s,c=0){const a=16.666/o;let l="{\n";for(let t=0;t<=1;t+=a){const o=e+(n-e)*r(t);l+=100*t+`%{${s(o,1-o)}}\n`}const h=l+`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}(h)}_${c}`,u=y(t),{stylesheet:f,rules:g}=F.get(u)||function(t,e){const n={stylesheet:b(e),rules:{}};return F.set(t,n),n}(u,t);g[d]||(g[d]=!0,f.insertRule(`@keyframes ${d} ${h}`,f.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 j(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||f((()=>{M||(F.forEach((t=>{const{stylesheet:e}=t;let n=e.cssRules.length;for(;n--;)e.deleteRule(n);t.rules={}})),F.clear())})))}function O(t){A=t}function L(){if(!A)throw new Error("Function called outside component initialization");return A}const H=[],U=[],V=[],W=[],q=Promise.resolve();let J=!1;function G(t){V.push(t)}const K=new Set;let Q,X=0;function Y(){const t=A;do{for(;X<H.length;){const t=H[X];X++,O(t),Z(t.$$)}for(O(null),H.length=0,X=0;U.length;)U.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(H.length);for(;W.length;)W.pop()();J=!1,K.clear(),O(t)}function Z(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)}}function tt(t,e,n){t.dispatchEvent(function(t,e,{bubbles:n=!1,cancelable:o=!1}={}){const i=document.createEvent("CustomEvent");return i.initCustomEvent(t,n,o,e),i}(`${e?"intro":"outro"}${n}`))}const et=new Set;function nt(t,e){t&&t.i&&(et.delete(t),t.i(e))}const ot={duration:0};function it(n,o,i){let r,c,a=o(n,i),l=!1,h=0;function d(){r&&j(n,r)}function f(){const{delay:o=0,duration:i=300,easing:s=e,tick:f=t,css:g}=a||ot;g&&(r=B(n,0,1,i,o,s,g,h++)),f(0,1);const p=u()+o,$=p+i;c&&c.abort(),l=!0,G((()=>tt(n,!0,"start"))),c=m((t=>{if(l){if(t>=$)return f(1,0),tt(n,!0,"end"),d(),l=!1;if(t>=p){const e=s((t-p)/i);f(e,1-e)}}return l}))}let g=!1;return{start(){g||(g=!0,j(n),s(a)?(a=a(),(Q||(Q=Promise.resolve(),Q.then((()=>{Q=null}))),Q).then(f)):f())},invalidate(){g=!1},end(){l&&(d(),l=!1)}}}const rt="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function st(t,e,n,i){const{fragment:c,on_mount:a,on_destroy:l,after_update:h}=t.$$;c&&c.m(e,n),i||G((()=>{const e=a.map(o).filter(s);l?l.push(...e):r(e),t.$$.on_mount=[]})),h.forEach(G)}function ct(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 at(t,e){-1===t.$$.dirty[0]&&(H.push(t),J||(J=!0,q.then(Y)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function lt(e,n,o,s,c,a,l,h=[-1]){const d=A;O(e);const u=e.$$={fragment:null,ctx:null,props:a,update:t,not_equal:c,bound:i(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(d?d.$$.context:[])),callbacks:i(),dirty:h,skip_bound:!1,root:n.target||d.$$.root};l&&l(u.root);let f=!1;if(u.ctx=o?o(e,n.props||{},((t,n,...o)=>{const i=o.length?o[0]:n;return u.ctx&&c(u.ctx[t],u.ctx[t]=i)&&(!u.skip_bound&&u.bound[t]&&u.bound[t](i),f&&at(e,t)),n})):[],u.update(),f=!0,r(u.before_update),u.fragment=!!s&&s(u.ctx),n.target){if(n.hydrate){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&&nt(e.$$.fragment),st(e,n.target,n.anchor,n.customElement),Y()}O(d)}let ht;"function"==typeof HTMLElement&&(ht=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(){ct(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&&!l(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});var dt,ut,ft,gt,pt,mt,$t;function yt(t){return t<.5?4*t*t*t:.5*Math.pow(2*t-2,3)+1}function bt(t){return t*t*t}function xt(t){const e=t-1;return e*e*e+1}!function(t){t[t.Failed=0]="Failed",t[t.NoBrowserSupport=1]="NoBrowserSupport",t[t.NoAudioConsent=2]="NoAudioConsent",t[t.__UnrecoverableErrors=3]="__UnrecoverableErrors",t[t.Disconnected=4]="Disconnected",t[t.Disconnecting=5]="Disconnecting",t[t.Connecting=6]="Connecting",t[t.Preinitialized=7]="Preinitialized",t[t.Initializing=8]="Initializing",t[t.Connected=9]="Connected",t[t.Stopping=10]="Stopping",t[t.Starting=11]="Starting",t[t.Recording=12]="Recording"}(dt||(dt={})),function(t){t.SpeechlyFirstConnect="SpeechlyFirstConnect"}(ut||(ut={})),function(t){t.speechlypoweron="speechlypoweron",t.holdstart="holdstart",t.holdend="holdend",t.speechstate="speechstate",t.speechsegment="speechsegment",t.speechhandled="speechhandled",t.showhint="showhint",t.transcriptdrawerhint="hint",t.speechlyintroready="speechlyintroready",t.speechlyintroclosed="speechlyintroclosed"}(ft||(ft={})),function(t){t.Mic="mic",t.MicActive="micactive",t.Error="error",t.Denied="denied"}(gt||(gt={})),function(t){t.Hold="hold",t.Click="click",t.Noninteractive="noninteractive"}(pt||(pt={})),function(t){t.None="none",t.Connecting="connecting",t.Busy="busy"}(mt||(mt={})),function(t){t.None="none",t.Whirl="whirl"}($t||($t={})),dt.Disconnected,dt.Disconnecting,dt.Connecting,dt.Preinitialized,dt.Initializing,dt.Connected,dt.Starting,dt.Recording,dt.Stopping,dt.Failed,dt.NoBrowserSupport,dt.NoAudioConsent;const wt=[];function vt(t){return"[object Date]"===Object.prototype.toString.call(t)}function kt(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)=>kt(t[n],e)));return t=>n.map((e=>e(t)))}if("object"===n){if(!t||!e)throw new Error("Object cannot be null");if(vt(t)&&vt(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]=kt(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 zt(o,i={}){const r=function(e,n=t){let o;const i=new Set;function r(t){if(c(e,t)&&(e=t,o)){const t=!wt.length;for(const t of i)t[1](),wt.push(t,e);if(t){for(let t=0;t<wt.length;t+=2)wt[t][0](wt[t+1]);wt.length=0}}}return{set:r,update:function(t){r(t(e))},subscribe:function(s,c=t){const a=[s,c];return i.add(a),1===i.size&&(o=n(r)||t),s(e),()=>{i.delete(a),0===i.size&&(o(),o=null)}}}}(o);let s,a=o;function l(t,c){if(null==o)return r.set(o=t),Promise.resolve();a=t;let l=s,h=!1,{delay:d=0,duration:f=400,easing:g=e,interpolate:p=kt}=n(n({},i),c);if(0===f)return l&&(l.abort(),l=null),r.set(o=a),Promise.resolve();const $=u()+d;let y;return s=m((e=>{if(e<$)return!0;h||(y=p(o,t),"function"==typeof f&&(f=f(o,t)),h=!0),l&&(l.abort(),l=null);const n=e-$;return n>f?(r.set(o=t),!1):(r.set(o=y(g(n/f))),!0)})),s.promise}return{set:l,update:(t,e)=>l(t(a,o),e),subscribe:r.subscribe}}function Tt(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 Et(t,{delay:e=0,speed:n,duration:o,easing:i=yt}={}){let r=t.getTotalLength();const s=getComputedStyle(t);return"butt"!==s.strokeLinecap&&(r+=parseInt(s.strokeWidth)),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}`}}const Ct=[0,1];function _t(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),a=r-s;return(1-a)*t[s]+a*t[c]}function Pt(t){!function(t,e,n){const o=y(t);if(!o.getElementById(e)){const t=k("style");t.id=e,t.textContent=n,x(o,t)}}(t,"svelte-1fz8oog","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}")}function St(e){let n;return{c(){n=k("canvas"),D(n,"color",e[0]),D(n,"display","block"),D(n,"width","1.35rem"),D(n,"height","1.5rem"),D(n,"margin","0"),D(n,"padding","0 0.8rem 0 0rem"),D(n,"flex-grow","0"),D(n,"flex-shrink","0"),D(n,"flex-basis","1.35rem"),P(n,"class","svelte-1fz8oog")},m(t,o){w(t,n,o),e[3](n)},p(t,[e]){1&e&&D(n,"color",t[0])},i:t,o:t,d(t){t&&v(n),e[3](null)}}}function Rt(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,a=[0,0];const l=(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()};var h;return h=()=>{let t;const e=2*(a.length-1)+1,o=3*e+1*(e-1),h=()=>{if(t=requestAnimationFrame(h),!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)),u=Number.parseInt(getComputedStyle(r).getPropertyValue("height").slice(0,-2));n(1,r.width=d*i,r),n(1,r.height=u*i,r),Date.now()<c?a[0]=.15*s+.85*a[0]:a[0]=.0625+.75*a[0];let f=1;for(;f<a.length;)a[f]=.25*a[f-1]+.5*a[f]+.0625,f++;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",f=0;f<a.length;f++){const t=a[f]*r.height;t*r.height>2*g?l(e,.5*r.width-g+f*p,.5*(r.height-t),2*g,t,g):(e.beginPath(),e.arc(.5*r.width+f*p,.5*r.height,t*r.height*.5,0,2*Math.PI)),e.fill(),f>0&&(t*r.height>2*g?l(e,.5*r.width-g-f*p,.5*(r.height-t),2*g,t,g):(e.beginPath(),e.arc(.5*r.width-f*p,.5*r.height,t*r.height*.5,0,2*Math.PI)),e.fill())}};return h(),i(1,500),()=>{cancelAnimationFrame(t)}},L().$$.on_mount.push(h),t.$$set=t=>{"color"in t&&n(0,o=t.color)},[o,r,i,function(t){U[t?"unshift":"push"]((()=>{r=t,n(1,r)}))}]}class Dt extends class{$destroy(){ct(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&&!l(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}{constructor(t){super(),lt(this,t,Rt,St,c,{color:0,updateVU:2},Pt)}get updateVU(){return this.$$.ctx[2]}}const{window:It}=rt;function Nt(t,e,n){const o=t.slice();return o[42]=e[n],o[44]=n,o}function Ft(t){let e;return{c(){e=k("div"),P(e,"class","TransscriptItemBgDiv")},m(t,n){w(t,e,n)},d(t){t&&v(e)}}}function At(e){let n,o;return{c(){n=k("div"),n.textContent="Listening...",P(n,"class","listening")},m(t,e){w(t,n,e)},i(t){o||G((()=>{o=it(n,e[21],{duration:400}),o.start()}))},o:t,d(t){t&&v(n)}}}function Mt(e){let n,o;return{c(){n=k("div"),P(n,"class","TransscriptItemBgDiv")},m(t,e){w(t,n,e)},p(t,n){e=t},i(t){o||G((()=>{o=it(n,e[21],{duration:e[14]}),o.start()}))},o:t,d(t){t&&v(n)}}}function Bt(t){let e,n;return{c(){e=k("span"),P(e,"style",n=t[44]<t[11].length-1?"width:0.25em;":t[13]?"width:1.2em;":"")},m(t,n){w(t,e,n)},p(t,o){10240&o[0]&&n!==(n=t[44]<t[11].length-1?"width:0.25em;":t[13]?"width:1.2em;":"")&&P(e,"style",n)},d(t){t&&v(e)}}}function jt(e){let n,o,i,r,s,c,a,l=e[42].word+"",h=e[16]&&Mt(e),d=e[44]<e[11].length&&Bt(e);return{c(){n=k("div"),h&&h.c(),o=E(),i=k("div"),r=T(l),s=E(),d&&d.c(),P(i,"class","TransscriptItemContent"),P(n,"class",a="TranscriptItem "+e[23](e[42])),I(n,"Entity",null!==e[42].entityType),I(n,"Final",e[42].isFinal)},m(t,e){w(t,n,e),h&&h.m(n,null),$(n,o),$(n,i),$(i,r),$(i,s),d&&d.m(i,null)},p(t,s){(e=t)[16]?h?65536&s[0]&&nt(h,1):(h=Mt(e),h.c(),nt(h,1),h.m(n,o)):h&&(h.d(1),h=null),2048&s[0]&&l!==(l=e[42].word+"")&&R(r,l),e[44]<e[11].length?d?d.p(e,s):(d=Bt(e),d.c(),d.m(i,null)):d&&(d.d(1),d=null),2048&s[0]&&a!==(a="TranscriptItem "+e[23](e[42]))&&P(n,"class",a),2048&s[0]&&I(n,"Entity",null!==e[42].entityType),2048&s[0]&&I(n,"Final",e[42].isFinal)},i(t){nt(h),c||G((()=>{c=it(i,e[21],{duration:e[14]}),c.start()}))},o:t,d(t){t&&v(n),h&&h.d(),d&&d.d()}}}function Ot(e){let n,o,i,r,s,c,a,l;return{c(){n=k("div"),o=k("div"),i=E(),r=k("div"),s=z("svg"),c=z("path"),P(o,"class","TransscriptItemBgDiv"),D(o,"background-color",e[5]),P(c,"stroke","currentColor"),P(c,"stroke-width","3"),P(c,"d","M7.191 11.444l4.059 6.107 7.376-12.949"),P(c,"fill","none"),P(c,"fill-rule","evenodd"),D(s,"width","2rem"),D(s,"height","2rem"),D(s,"position","absolute"),D(s,"transform","translate(-0.6rem, -0.5rem)"),D(s,"stroke","#eee"),P(s,"viewBox","0 0 24 24"),P(s,"xmlns","http://www.w3.org/2000/svg"),D(r,"width","1.0rem"),D(r,"height","1rem"),D(r,"position","relative"),P(n,"class","TranscriptItem")},m(t,e){w(t,n,e),$(n,o),$(n,i),$(n,r),$(r,s),$(s,c)},p(t,e){32&e[0]&&D(o,"background-color",t[5])},i(t){a||G((()=>{a=it(c,e[20],{duration:500}),a.start()})),l||G((()=>{l=it(n,e[21],{duration:200,maxWidth:3}),l.start()}))},o:t,d(t){t&&v(n)}}}function Lt(t){let e;return{c(){e=k("link"),P(e,"href","https://fonts.googleapis.com/css2?family=Saira+Condensed:wght@700&display=swap"),P(e,"rel","stylesheet")},m(t,n){w(t,e,n)},d(t){t&&v(e)}}}function Ht(t){let e;return{c(){e=k("link"),P(e,"href",t[10]),P(e,"rel","stylesheet")},m(t,n){w(t,e,n)},p(t,n){1024&n[0]&&P(e,"href",t[10])},d(t){t&&v(e)}}}function Ut(e){let n,o,i,r,s,c,a,l,h,d,u,f,g,p,m,y=e[16]&&Ft(),b={color:e[5]};s=new Dt({props:b}),e[34](s);let x=e[17]&&At(e),z=e[11],T=[];for(let t=0;t<z.length;t+=1)T[t]=jt(Nt(e,z,t));let S=e[13]&&Ot(e),R=e[15]&&Lt(),N=void 0!==e[10]&&Ht(e);return{c(){var g;n=k("main"),o=k("div"),y&&y.c(),i=E(),r=k("div"),(g=s.$$.fragment)&&g.c(),c=E(),x&&x.c(),a=E();for(let t=0;t<T.length;t+=1)T[t].c();l=E(),S&&S.c(),h=E(),R&&R.c(),d=C(),u=E(),N&&N.c(),f=C(),this.c=t,P(r,"class","TransscriptItemContent"),P(o,"class","TranscriptItem"),P(n,"class","BigTranscript"),D(n,"--voffset",e[1]),D(n,"--hoffset",e[2]),D(n,"--fontsize",e[3]),D(n,"--color",e[4]),D(n,"--highlight-color",e[5]),D(n,"--text-bg-color",e[6]),D(n,"--gradient-stop1",e[7]),D(n,"--gradient-stop2",e[8]),D(n,"--marginbottom",e[9]),D(n,"--transition",e[18].transition),D(n,"opacity",e[18].transition),D(n,"max-height",10*_t(Ct,e[18].transition,0,.6)+"rem"),D(n,"visibility",0!==e[18].transition?"visible":"hidden"),I(n,"placementTop","top"===e[0]),I(n,"defaultTypography",e[15])},m(t,b){w(t,n,b),$(n,o),y&&y.m(o,null),$(o,i),$(o,r),st(s,r,null),$(r,c),x&&x.m(r,null),$(n,a);for(let t=0;t<T.length;t+=1)T[t].m(n,null);$(n,l),S&&S.m(n,null),w(t,h,b),R&&R.m(document.head,null),$(document.head,d),w(t,u,b),N&&N.m(t,b),w(t,f,b),g=!0,p||(m=_(It,"message",e[22]),p=!0)},p(t,e){t[16]?y||(y=Ft(),y.c(),y.m(o,i)):y&&(y.d(1),y=null);const c={};if(32&e[0]&&(c.color=t[5]),s.$set(c),t[17]?x?131072&e[0]&&nt(x,1):(x=At(t),x.c(),nt(x,1),x.m(r,null)):x&&(x.d(1),x=null),8464384&e[0]){let o;for(z=t[11],o=0;o<z.length;o+=1){const i=Nt(t,z,o);T[o]?(T[o].p(i,e),nt(T[o],1)):(T[o]=jt(i),T[o].c(),nt(T[o],1),T[o].m(n,l))}for(;o<T.length;o+=1)T[o].d(1);T.length=z.length}t[13]?S?(S.p(t,e),8192&e[0]&&nt(S,1)):(S=Ot(t),S.c(),nt(S,1),S.m(n,null)):S&&(S.d(1),S=null),(!g||2&e[0])&&D(n,"--voffset",t[1]),(!g||4&e[0])&&D(n,"--hoffset",t[2]),(!g||8&e[0])&&D(n,"--fontsize",t[3]),(!g||16&e[0])&&D(n,"--color",t[4]),(!g||32&e[0])&&D(n,"--highlight-color",t[5]),(!g||64&e[0])&&D(n,"--text-bg-color",t[6]),(!g||128&e[0])&&D(n,"--gradient-stop1",t[7]),(!g||256&e[0])&&D(n,"--gradient-stop2",t[8]),(!g||512&e[0])&&D(n,"--marginbottom",t[9]),(!g||262144&e[0])&&D(n,"--transition",t[18].transition),(!g||262144&e[0])&&D(n,"opacity",t[18].transition),(!g||262144&e[0])&&D(n,"max-height",10*_t(Ct,t[18].transition,0,.6)+"rem"),(!g||262144&e[0])&&D(n,"visibility",0!==t[18].transition?"visible":"hidden"),1&e[0]&&I(n,"placementTop","top"===t[0]),32768&e[0]&&I(n,"defaultTypography",t[15]),t[15]?R||(R=Lt(),R.c(),R.m(d.parentNode,d)):R&&(R.d(1),R=null),void 0!==t[10]?N?N.p(t,e):(N=Ht(t),N.c(),N.m(f.parentNode,f)):N&&(N.d(1),N=null)},i(t){if(!g){nt(s.$$.fragment,t),nt(x);for(let t=0;t<z.length;t+=1)nt(T[t]);nt(S),g=!0}},o(t){!function(t,e,n,o){if(t&&t.o){if(et.has(t))return;et.add(t),(void 0).c.push((()=>{et.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}(s.$$.fragment,t),g=!1},d(t){t&&v(n),y&&y.d(),e[34](null),ct(s),x&&x.d(),function(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}(T,t),S&&S.d(),t&&v(h),R&&R.d(t),v(d),t&&v(u),N&&N.d(t),t&&v(f),p=!1,m()}}}function Vt(t,e,n){let o,i,r,s,c,a,l,d,{placement:u}=e,{voffset:f="3rem"}=e,{hoffset:g="2rem"}=e,{fontsize:p="1.5rem"}=e,{color:m="#ffffff"}=e,{highlightcolor:$="#15e8b5"}=e,{backgroundcolor:y="#202020"}=e,{gradientstop1:b="#ffffff88"}=e,{gradientstop2:x="#ffffffcc"}=e,{marginbottom:w="0rem"}=e,{formattext:v}=e,{demomode:k}=e,{customcssurl:z}=e,{customtypography:T}=e,E=[],C=null,_=null,P=dt.Disconnected,S=!1,R=!1,D=!1,I=zt({transition:0},{duration:200});h(t,I,(t=>n(18,l=t)));const N=L(),F=Tt(Et),A=Tt(((t,{delay:e=0,duration:n=350,maxWidth:o=10})=>({delay:e,duration:n,css:t=>`\n max-width: ${_t(Ct,t,0,1)*o}rem;\n `}))),M=t=>{n(13,D=D||t)},B=t=>{n(30,P=t),P===dt.Recording&&(n(13,D=!1),n(11,E=[]),_=null)},j=t=>{if(void 0===t)return;d&&(s||P===dt.Recording)&&d.updateVU(.5*Math.random()+.5,75*Math.random()+75),t.isFinal?O(E.length>0?s?3500:2e3:0):E.length>0&&(S||n(31,S=!0),O(2e3));const e=`${t.contextId}/${t.id}`;null!==_?_!==e&&(n(13,D=!1),_=e):_=e,n(11,E=[]),t.words.forEach((t=>{n(11,E[t.index]={word:t.value,serialNumber:t.index,entityType:null,isFinal:t.isFinal,hide:!1},E)})),r?t.entities.forEach((t=>{n(11,E[t.startPosition].word=t.value,E),n(11,E[t.startPosition].entityType=t.type,E),n(11,E[t.startPosition].isFinal=t.isFinal,E),n(11,E[t.startPosition].hide=!1,E);for(let e=t.startPosition+1;e<t.endPosition;e++)E[e]&&n(11,E[e].hide=!0,E)})):t.entities.forEach((t=>{for(let e=t.startPosition;e<t.endPosition;e++)E[e]&&(n(11,E[e].entityType=t.type,E),n(11,E[e].isFinal=t.isFinal,E))})),n(11,E=E.filter((t=>!t.hide)))},O=(t=0)=>{H(),C=window.setTimeout((()=>{C=null,S&&n(31,S=!1)}),t)},H=()=>{null!==C&&(window.clearTimeout(C),C=null)};return t.$$set=t=>{"placement"in t&&n(0,u=t.placement),"voffset"in t&&n(1,f=t.voffset),"hoffset"in t&&n(2,g=t.hoffset),"fontsize"in t&&n(3,p=t.fontsize),"color"in t&&n(4,m=t.color),"highlightcolor"in t&&n(5,$=t.highlightcolor),"backgroundcolor"in t&&n(6,y=t.backgroundcolor),"gradientstop1"in t&&n(7,b=t.gradientstop1),"gradientstop2"in t&&n(8,x=t.gradientstop2),"marginbottom"in t&&n(9,w=t.marginbottom),"formattext"in t&&n(24,v=t.formattext),"demomode"in t&&n(25,k=t.demomode),"customcssurl"in t&&n(10,z=t.customcssurl),"customtypography"in t&&n(26,T=t.customtypography)},t.$$.update=()=>{if(2048&t.$$.dirty[0]&&n(17,o=0===E.length),64&t.$$.dirty[0]&&n(16,i="none"!==y),16777216&t.$$.dirty[0]&&(r=void 0===v||"false"!==v),33554432&t.$$.dirty[0]&&n(33,s=void 0!==k&&"false"!==k),67108864&t.$$.dirty[0]&&n(15,c=void 0===T||"false"===T),4&t.$$.dirty[1]&&n(14,a=s?800:350),1073741824&t.$$.dirty[0]|3&t.$$.dirty[1]){const t=P===dt.Recording||S;t!==R&&(e="visibilitychanged",l=t,N.dispatchEvent(new CustomEvent(e,{detail:l,composed:!0}))),n(32,R=t),I.set({transition:R?1:0})}var e,l;4&t.$$.dirty[1]&&(s||O(0))},[u,f,g,p,m,$,y,b,x,w,z,E,d,D,a,c,i,o,l,I,F,A,t=>{switch(t.data.type){case ft.speechsegment:j(t.data.segment);break;case ft.speechhandled:M(t.data.success);break;case ft.speechstate:B(t.data.state)}},t=>t.entityType||"",v,k,T,M,B,j,P,S,R,s,function(t){U[t?"unshift":"push"]((()=>{d=t,n(12,d)}))}]}class Wt extends ht{constructor(t){super(),this.shadowRoot.innerHTML="<style>main{position:relative;user-select:none;display:flex;flex-direction:row;justify-content:start;flex-wrap:wrap;margin-bottom:calc(var(--marginbottom) * var(--transition));height:fit-content}.defaultTypography{font-family:'Saira Condensed', sans-serif;text-transform:uppercase;color:var(--color);font-size:var(--fontsize);line-height:135%}.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;white-space:nowrap}.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, var(--gradient-stop1), var(--gradient-stop2), var(--gradient-stop1), var(--gradient-stop2), var(--gradient-stop1));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>",lt(this,{target:this.shadowRoot,props:N(this.attributes),customElement:!0},Vt,Ut,a,{placement:0,voffset:1,hoffset:2,fontsize:3,color:4,highlightcolor:5,backgroundcolor:6,gradientstop1:7,gradientstop2:8,marginbottom:9,formattext:24,demomode:25,customcssurl:10,customtypography:26,speechhandled:27,speechstate:28,speechsegment:29},null,[-1,-1]),t&&(t.target&&w(t.target,this,t.anchor),t.props&&(this.$set(t.props),Y()))}static get observedAttributes(){return["placement","voffset","hoffset","fontsize","color","highlightcolor","backgroundcolor","gradientstop1","gradientstop2","marginbottom","formattext","demomode","customcssurl","customtypography","speechhandled","speechstate","speechsegment"]}get placement(){return this.$$.ctx[0]}set placement(t){this.$$set({placement:t}),Y()}get voffset(){return this.$$.ctx[1]}set voffset(t){this.$$set({voffset:t}),Y()}get hoffset(){return this.$$.ctx[2]}set hoffset(t){this.$$set({hoffset:t}),Y()}get fontsize(){return this.$$.ctx[3]}set fontsize(t){this.$$set({fontsize:t}),Y()}get color(){return this.$$.ctx[4]}set color(t){this.$$set({color:t}),Y()}get highlightcolor(){return this.$$.ctx[5]}set highlightcolor(t){this.$$set({highlightcolor:t}),Y()}get backgroundcolor(){return this.$$.ctx[6]}set backgroundcolor(t){this.$$set({backgroundcolor:t}),Y()}get gradientstop1(){return this.$$.ctx[7]}set gradientstop1(t){this.$$set({gradientstop1:t}),Y()}get gradientstop2(){return this.$$.ctx[8]}set gradientstop2(t){this.$$set({gradientstop2:t}),Y()}get marginbottom(){return this.$$.ctx[9]}set marginbottom(t){this.$$set({marginbottom:t}),Y()}get formattext(){return this.$$.ctx[24]}set formattext(t){this.$$set({formattext:t}),Y()}get demomode(){return this.$$.ctx[25]}set demomode(t){this.$$set({demomode:t}),Y()}get customcssurl(){return this.$$.ctx[10]}set customcssurl(t){this.$$set({customcssurl:t}),Y()}get customtypography(){return this.$$.ctx[26]}set customtypography(t){this.$$set({customtypography:t}),Y()}get speechhandled(){return this.$$.ctx[27]}get speechstate(){return this.$$.ctx[28]}get speechsegment(){return this.$$.ctx[29]}}function qt(t){let e;return{c(){e=k("link"),P(e,"href",t[11]),P(e,"rel","stylesheet")},m(t,n){w(t,e,n)},p(t,n){2048&n[0]&&P(e,"href",t[11])},d(t){t&&v(e)}}}function Jt(e){let n,o,i,s,c,a,l,h,d,u,f=void 0!==e[11]&&qt(e);return{c(){f&&f.c(),n=E(),o=k("main"),i=k("div"),s=k("div"),c=k("big-transcript"),a=E(),l=k("div"),h=T(e[13]),this.c=t,S(c,"customtypography",e[12]),S(c,"customcssurl",e[11]),S(c,"formattext",e[9]),S(c,"fontsize",e[1]),S(c,"color",e[3]),S(c,"backgroundcolor","none"),S(c,"highlightcolor",e[5]),S(c,"gradientstop1",e[7]),S(c,"gradientstop2",e[8]),S(c,"demomode",e[10]),P(l,"class","hint"),D(l,"opacity",e[18].opacity),I(l,"defaultTypography",e[15]),P(s,"class","pad"),P(i,"class","drawer"),D(i,"background-color",e[6]),D(i,"opacity",e[16].opacity),D(i,"transform","translate(0px, "+e[17].y+"rem)"),P(o,"class","placementTop"),D(o,"--height",e[0]),D(o,"--smalltextcolor",e[4]),D(o,"--hintfontsize",e[2])},m(t,r){f&&f.m(t,r),w(t,n,r),w(t,o,r),$(o,i),$(i,s),$(s,c),e[29](c),$(s,a),$(s,l),$(l,h),d||(u=[_(window,"message",e[23]),_(c,"visibilitychanged",e[22])],d=!0)},p(t,e){void 0!==t[11]?f?f.p(t,e):(f=qt(t),f.c(),f.m(n.parentNode,n)):f&&(f.d(1),f=null),4096&e[0]&&S(c,"customtypography",t[12]),2048&e[0]&&S(c,"customcssurl",t[11]),512&e[0]&&S(c,"formattext",t[9]),2&e[0]&&S(c,"fontsize",t[1]),8&e[0]&&S(c,"color",t[3]),32&e[0]&&S(c,"highlightcolor",t[5]),128&e[0]&&S(c,"gradientstop1",t[7]),256&e[0]&&S(c,"gradientstop2",t[8]),1024&e[0]&&S(c,"demomode",t[10]),8192&e[0]&&R(h,t[13]),262144&e[0]&&D(l,"opacity",t[18].opacity),32768&e[0]&&I(l,"defaultTypography",t[15]),64&e[0]&&D(i,"background-color",t[6]),65536&e[0]&&D(i,"opacity",t[16].opacity),131072&e[0]&&D(i,"transform","translate(0px, "+t[17].y+"rem)"),1&e[0]&&D(o,"--height",t[0]),16&e[0]&&D(o,"--smalltextcolor",t[4]),4&e[0]&&D(o,"--hintfontsize",t[2])},i:t,o:t,d(t){f&&f.d(t),t&&v(n),t&&v(o),e[29](null),d=!1,r(u)}}}function Gt(t,n,o){let i,r,s,c,a,{height:l="8rem"}=n,{hint:d=""}=n,{fontsize:u="1.5rem"}=n,{hintfontsize:f="0.9rem"}=n,{color:g="#ffffff"}=n,{smalltextcolor:p="#ffffff70"}=n,{highlightcolor:m="#15e8b5"}=n,{backgroundcolor:$="#202020"}=n,{gradientstop1:y="#ffffff88"}=n,{gradientstop2:b="#ffffffcc"}=n,{formattext:x}=n,{demomode:w}=n,{customcssurl:v}=n,{customtypography:k}=n,z=[],T=0,E="";const C=(t,e=!0)=>{R.set({opacity:0}),a&&e&&a.speechsegment(t),t.isFinal&&(T++,T<z.length?o(13,E=z[T]):o(13,E=z[Math.floor(Math.random()*z.length)]))},_=t=>{T=0,o(24,d=t),z=[];try{z=JSON.parse(d),("string"==typeof z||z instanceof String)&&(z=[z])}catch(t){z[0]=d||""}o(13,E=z[T])};let P=zt({y:-1},{duration:200});h(t,P,(t=>o(17,s=t)));let S=zt({opacity:0},{duration:200,easing:e});h(t,S,(t=>o(16,r=t)));let R=zt({opacity:0},{duration:200,delay:200,easing:e});h(t,R,(t=>o(18,c=t)));return t.$$set=t=>{"height"in t&&o(0,l=t.height),"hint"in t&&o(24,d=t.hint),"fontsize"in t&&o(1,u=t.fontsize),"hintfontsize"in t&&o(2,f=t.hintfontsize),"color"in t&&o(3,g=t.color),"smalltextcolor"in t&&o(4,p=t.smalltextcolor),"highlightcolor"in t&&o(5,m=t.highlightcolor),"backgroundcolor"in t&&o(6,$=t.backgroundcolor),"gradientstop1"in t&&o(7,y=t.gradientstop1),"gradientstop2"in t&&o(8,b=t.gradientstop2),"formattext"in t&&o(9,x=t.formattext),"demomode"in t&&o(10,w=t.demomode),"customcssurl"in t&&o(11,v=t.customcssurl),"customtypography"in t&&o(12,k=t.customtypography)},t.$$.update=()=>{16777216&t.$$.dirty[0]&&_(d),4096&t.$$.dirty[0]&&o(15,i=void 0===k||"false"===k)},[l,u,f,g,p,m,$,y,b,x,w,v,k,E,a,i,r,s,c,P,S,R,t=>{!1===t.detail?(P.set({y:-1},{easing:bt}),S.set({opacity:0}),R.set({opacity:0})):(P.set({y:0},{easing:xt}),S.set({opacity:1}),R.set({opacity:1}))},t=>{switch(t.data.type){case ft.speechsegment:C(t.data.segment,!1);break;case ft.transcriptdrawerhint:_(t.data.hint)}},d,t=>{a&&a.speechhandled(t)},t=>{a&&a.speechstate(t)},C,_,function(t){U[t?"unshift":"push"]((()=>{a=t,o(14,a)}))}]}customElements.get("big-transcript")?console.warn("Skipping re-defining customElement big-transcript"):customElements.define("big-transcript",Wt);class Kt extends ht{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{margin-top:0.15rem}.defaultTypography{font-family:'Saira Condensed', sans-serif;text-transform:uppercase;color:var(--smalltextcolor);font-size:var(--hintfontsize);line-height:135%}</style>",lt(this,{target:this.shadowRoot,props:N(this.attributes),customElement:!0},Gt,Jt,a,{height:0,hint:24,fontsize:1,hintfontsize:2,color:3,smalltextcolor:4,highlightcolor:5,backgroundcolor:6,gradientstop1:7,gradientstop2:8,formattext:9,demomode:10,customcssurl:11,customtypography:12,speechhandled:25,speechstate:26,speechsegment:27,sethint:28},null,[-1,-1]),t&&(t.target&&w(t.target,this,t.anchor),t.props&&(this.$set(t.props),Y()))}static get observedAttributes(){return["height","hint","fontsize","hintfontsize","color","smalltextcolor","highlightcolor","backgroundcolor","gradientstop1","gradientstop2","formattext","demomode","customcssurl","customtypography","speechhandled","speechstate","speechsegment","sethint"]}get height(){return this.$$.ctx[0]}set height(t){this.$$set({height:t}),Y()}get hint(){return this.$$.ctx[24]}set hint(t){this.$$set({hint:t}),Y()}get fontsize(){return this.$$.ctx[1]}set fontsize(t){this.$$set({fontsize:t}),Y()}get hintfontsize(){return this.$$.ctx[2]}set hintfontsize(t){this.$$set({hintfontsize:t}),Y()}get color(){return this.$$.ctx[3]}set color(t){this.$$set({color:t}),Y()}get smalltextcolor(){return this.$$.ctx[4]}set smalltextcolor(t){this.$$set({smalltextcolor:t}),Y()}get highlightcolor(){return this.$$.ctx[5]}set highlightcolor(t){this.$$set({highlightcolor:t}),Y()}get backgroundcolor(){return this.$$.ctx[6]}set backgroundcolor(t){this.$$set({backgroundcolor:t}),Y()}get gradientstop1(){return this.$$.ctx[7]}set gradientstop1(t){this.$$set({gradientstop1:t}),Y()}get gradientstop2(){return this.$$.ctx[8]}set gradientstop2(t){this.$$set({gradientstop2:t}),Y()}get formattext(){return this.$$.ctx[9]}set formattext(t){this.$$set({formattext:t}),Y()}get demomode(){return this.$$.ctx[10]}set demomode(t){this.$$set({demomode:t}),Y()}get customcssurl(){return this.$$.ctx[11]}set customcssurl(t){this.$$set({customcssurl:t}),Y()}get customtypography(){return this.$$.ctx[12]}set customtypography(t){this.$$set({customtypography:t}),Y()}get speechhandled(){return this.$$.ctx[25]}get speechstate(){return this.$$.ctx[26]}get speechsegment(){return this.$$.ctx[27]}get sethint(){return this.$$.ctx[28]}}customElements.get("transcript-drawer")?console.warn("Skipping re-defining customElement transcript-drawer"):customElements.define("transcript-drawer",Kt)}));
!function(t){"function"==typeof define&&define.amd?define(t):t()}((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 r(){return Object.create(null)}function i(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 a(t,e){return t!=t?e==e:t!==e}function l(t){return 0===Object.keys(t).length}function d(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 h="undefined"!=typeof window;let u=h?()=>window.performance.now():()=>Date.now(),f=h?t=>requestAnimationFrame(t):t;const p=new Set;function g(t){p.forEach((e=>{e.c(t)||(p.delete(e),e.f())})),0!==p.size&&f(g)}function m(t){let e;return 0===p.size&&f(g),{promise:new Promise((n=>{p.add(e={c:t,f:n})})),abort(){p.delete(e)}}}function $(t,e){t.appendChild(e)}function y(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function b(t){const e=T("style");return x(y(t),e),e.sheet}function x(t,e){$(t.head||t,e)}function v(t,e,n){t.insertBefore(e,n||null)}function w(t){t.parentNode.removeChild(t)}function T(t){return document.createElement(t)}function k(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function E(t){return document.createTextNode(t)}function S(){return E(" ")}function C(){return E("")}function A(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 z(t,e,n){e in t?t[e]="boolean"==typeof t[e]&&""===n||n:_(t,e,n)}function P(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function O(t,e,n,o){null===n?t.style.removeProperty(e):t.style.setProperty(e,n,o?"important":"")}function R(t,e,n){t.classList[n?"add":"remove"](e)}function F(t){const e={};for(const n of t)e[n.name]=n.value;return e}const N=new Map;let I,D=0;function M(t,e,n,o,r,i,s,c=0){const a=16.666/o;let l="{\n";for(let t=0;t<=1;t+=a){const o=e+(n-e)*i(t);l+=100*t+`%{${s(o,1-o)}}\n`}const d=l+`100% {${s(n,1-n)}}\n}`,h=`__svelte_${function(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}(d)}_${c}`,u=y(t),{stylesheet:f,rules:p}=N.get(u)||function(t,e){const n={stylesheet:b(e),rules:{}};return N.set(t,n),n}(u,t);p[h]||(p[h]=!0,f.insertRule(`@keyframes ${h} ${d}`,f.cssRules.length));const g=t.style.animation||"";return t.style.animation=`${g?`${g}, `:""}${h} ${o}ms linear ${r}ms 1 both`,D+=1,h}function B(t,e){const n=(t.style.animation||"").split(", "),o=n.filter(e?t=>t.indexOf(e)<0:t=>-1===t.indexOf("__svelte")),r=n.length-o.length;r&&(t.style.animation=o.join(", "),D-=r,D||f((()=>{D||(N.forEach((t=>{const{stylesheet:e}=t;let n=e.cssRules.length;for(;n--;)e.deleteRule(n);t.rules={}})),N.clear())})))}function L(t){I=t}function j(){if(!I)throw new Error("Function called outside component initialization");return I}const H=[],U=[],V=[],W=[],X=Promise.resolve();let q=!1;function K(t){V.push(t)}const Y=new Set;let J,Z=0;function G(){const t=I;do{for(;Z<H.length;){const t=H[Z];Z++,L(t),Q(t.$$)}for(L(null),H.length=0,Z=0;U.length;)U.pop()();for(let t=0;t<V.length;t+=1){const e=V[t];Y.has(e)||(Y.add(e),e())}V.length=0}while(H.length);for(;W.length;)W.pop()();q=!1,Y.clear(),L(t)}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(K)}}function tt(t,e,n){t.dispatchEvent(function(t,e,{bubbles:n=!1,cancelable:o=!1}={}){const r=document.createEvent("CustomEvent");return r.initCustomEvent(t,n,o,e),r}(`${e?"intro":"outro"}${n}`))}const et=new Set;function nt(t,e){t&&t.i&&(et.delete(t),t.i(e))}const ot={duration:0};function rt(n,o,r){let i,c,a=o(n,r),l=!1,d=0;function h(){i&&B(n,i)}function f(){const{delay:o=0,duration:r=300,easing:s=e,tick:f=t,css:p}=a||ot;p&&(i=M(n,0,1,r,o,s,p,d++)),f(0,1);const g=u()+o,$=g+r;c&&c.abort(),l=!0,K((()=>tt(n,!0,"start"))),c=m((t=>{if(l){if(t>=$)return f(1,0),tt(n,!0,"end"),h(),l=!1;if(t>=g){const e=s((t-g)/r);f(e,1-e)}}return l}))}let p=!1;return{start(){p||(p=!0,B(n),s(a)?(a=a(),(J||(J=Promise.resolve(),J.then((()=>{J=null}))),J).then(f)):f())},invalidate(){p=!1},end(){l&&(h(),l=!1)}}}const it="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function st(t,e,n,r){const{fragment:c,on_mount:a,on_destroy:l,after_update:d}=t.$$;c&&c.m(e,n),r||K((()=>{const e=a.map(o).filter(s);l?l.push(...e):i(e),t.$$.on_mount=[]})),d.forEach(K)}function ct(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 at(t,e){-1===t.$$.dirty[0]&&(H.push(t),q||(q=!0,X.then(G)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function lt(e,n,o,s,c,a,l,d=[-1]){const h=I;L(e);const u=e.$$={fragment:null,ctx:null,props:a,update:t,not_equal:c,bound:r(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(h?h.$$.context:[])),callbacks:r(),dirty:d,skip_bound:!1,root:n.target||h.$$.root};l&&l(u.root);let f=!1;if(u.ctx=o?o(e,n.props||{},((t,n,...o)=>{const r=o.length?o[0]:n;return u.ctx&&c(u.ctx[t],u.ctx[t]=r)&&(!u.skip_bound&&u.bound[t]&&u.bound[t](r),f&&at(e,t)),n})):[],u.update(),f=!0,i(u.before_update),u.fragment=!!s&&s(u.ctx),n.target){if(n.hydrate){const t=function(t){return Array.from(t.childNodes)}(n.target);u.fragment&&u.fragment.l(t),t.forEach(w)}else u.fragment&&u.fragment.c();n.intro&&nt(e.$$.fragment),st(e,n.target,n.anchor,n.customElement),G()}L(h)}let dt;"function"==typeof HTMLElement&&(dt=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(){i(this.$$.on_disconnect)}$destroy(){ct(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&&!l(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});var ht,ut,ft,pt,gt;!function(t){t.NoAudioConsent="NoAudioConsent",t.NoBrowserSupport="NoBrowserSupport",t.Stopped="Stopped",t.Starting="Starting",t.Started="Started"}(ht||(ht={})),function(t){t.Started="started",t.Stopped="stopped",t.SegmentEnd="segment_end",t.Transcript="transcript",t.Entity="entity",t.Intent="intent",t.TentativeTranscript="tentative_transcript",t.TentativeEntities="tentative_entities",t.TentativeIntent="tentative_intent"}(ut||(ut={})),function(t){t.Opened="WEBSOCKET_OPEN",t.Closed="WEBSOCKET_CLOSED",t.AudioProcessorReady="SOURCE_SAMPLE_RATE_SET_SUCCESS",t.VadSignalHigh="VadSignalHigh",t.VadSignalLow="VadSignalLow"}(ft||(ft={})),function(t){t.connect="connect",t.initAudioProcessor="initAudioProcessor",t.adjustAudioProcessor="adjustAudioProcessor",t.SET_SHARED_ARRAY_BUFFERS="SET_SHARED_ARRAY_BUFFERS",t.CLOSE="CLOSE",t.START_CONTEXT="START_CONTEXT",t.SWITCH_CONTEXT="SWITCH_CONTEXT",t.STOP_CONTEXT="STOP_CONTEXT",t.AUDIO="AUDIO",t.startStream="startStream",t.stopStream="stopStream",t.setContextOptions="setContextOptions"}(pt||(pt={})),function(t){t[t.Failed=0]="Failed",t[t.Disconnected=1]="Disconnected",t[t.Connected=2]="Connected",t[t.Active=3]="Active"}(gt||(gt={})),new Map([[gt.Failed,"Failed"],[gt.Disconnected,"Disconnected"],[gt.Connected,"Connected"],[gt.Active,"Active"]]);for(var mt=[],$t=0;$t<256;++$t)mt.push(($t+256).toString(16).substr(1));var yt,bt,xt,vt,wt,Tt,kt,Et,St="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Ct={exports:{}};function At(t){return t<.5?4*t*t*t:.5*Math.pow(2*t-2,3)+1}function _t(t){return t*t*t}function zt(t){const e=t-1;return e*e*e+1}
/*! http://mths.be/base64 v0.1.0 by @mathias | MIT license */
yt=Ct,bt=Ct.exports,function(t){var e=bt,n=yt&&yt.exports==e&&yt,o="object"==typeof St&&St;o.global!==o&&o.window!==o||(t=o);var r=function(t){this.message=t};(r.prototype=new Error).name="InvalidCharacterError";var i=function(t){throw new r(t)},s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=/[\t\n\f\r ]/g,a={encode:function(t){t=String(t),/[^\0-\xFF]/.test(t)&&i("The string to be encoded contains characters outside of the Latin1 range.");for(var e,n,o,r,c=t.length%3,a="",l=-1,d=t.length-c;++l<d;)e=t.charCodeAt(l)<<16,n=t.charCodeAt(++l)<<8,o=t.charCodeAt(++l),a+=s.charAt((r=e+n+o)>>18&63)+s.charAt(r>>12&63)+s.charAt(r>>6&63)+s.charAt(63&r);return 2==c?(e=t.charCodeAt(l)<<8,n=t.charCodeAt(++l),a+=s.charAt((r=e+n)>>10)+s.charAt(r>>4&63)+s.charAt(r<<2&63)+"="):1==c&&(r=t.charCodeAt(l),a+=s.charAt(r>>2)+s.charAt(r<<4&63)+"=="),a},decode:function(t){var e=(t=String(t).replace(c,"")).length;e%4==0&&(e=(t=t.replace(/==?$/,"")).length),(e%4==1||/[^+a-zA-Z0-9/]/.test(t))&&i("Invalid character: the string to be decoded is not correctly encoded.");for(var n,o,r=0,a="",l=-1;++l<e;)o=s.indexOf(t.charAt(l)),n=r%4?64*n+o:o,r++%4&&(a+=String.fromCharCode(255&n>>(-2*r&6)));return a},version:"0.1.0"};if(e&&!e.nodeType)if(n)n.exports=a;else for(var l in a)a.hasOwnProperty(l)&&(e[l]=a[l]);else t.base64=a}(St),function(t){t.SpeechlyFirstConnect="SpeechlyFirstConnect"}(xt||(xt={})),function(t){t.speechlypoweron="speechlypoweron",t.holdstart="holdstart",t.holdend="holdend",t.speechstate="speechstate",t.audiosourcestate="audiosourcestate",t.speechsegment="speechsegment",t.speechhandled="speechhandled",t.showhint="showhint",t.transcriptdrawerhint="hint",t.speechlyintroready="speechlyintroready",t.speechlyintroclosed="speechlyintroclosed",t.startcontext="startcontext",t.stopcontext="stopcontext",t.requeststartmicrophone="requeststartmicrophone"}(vt||(vt={})),function(t){t.Mic="mic",t.MicActive="micactive",t.Error="error",t.Denied="denied"}(wt||(wt={})),function(t){t.Hold="hold",t.Click="click",t.Noninteractive="noninteractive"}(Tt||(Tt={})),function(t){t.None="none",t.Connecting="connecting",t.Busy="busy"}(kt||(kt={})),function(t){t.None="none",t.Whirl="whirl"}(Et||(Et={})),gt.Disconnected,gt.Connected,gt.Active,gt.Failed,ht.NoBrowserSupport,ht.NoAudioConsent;const Pt=[];function Ot(t){return"[object Date]"===Object.prototype.toString.call(t)}function Rt(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)=>Rt(t[n],e)));return t=>n.map((e=>e(t)))}if("object"===n){if(!t||!e)throw new Error("Object cannot be null");if(Ot(t)&&Ot(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]=Rt(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 Ft(o,r={}){const i=function(e,n=t){let o;const r=new Set;function i(t){if(c(e,t)&&(e=t,o)){const t=!Pt.length;for(const t of r)t[1](),Pt.push(t,e);if(t){for(let t=0;t<Pt.length;t+=2)Pt[t][0](Pt[t+1]);Pt.length=0}}}return{set:i,update:function(t){i(t(e))},subscribe:function(s,c=t){const a=[s,c];return r.add(a),1===r.size&&(o=n(i)||t),s(e),()=>{r.delete(a),0===r.size&&(o(),o=null)}}}}(o);let s,a=o;function l(t,c){if(null==o)return i.set(o=t),Promise.resolve();a=t;let l=s,d=!1,{delay:h=0,duration:f=400,easing:p=e,interpolate:g=Rt}=n(n({},r),c);if(0===f)return l&&(l.abort(),l=null),i.set(o=a),Promise.resolve();const $=u()+h;let y;return s=m((e=>{if(e<$)return!0;d||(y=g(o,t),"function"==typeof f&&(f=f(o,t)),d=!0),l&&(l.abort(),l=null);const n=e-$;return n>f?(i.set(o=t),!1):(i.set(o=y(p(n/f))),!0)})),s.promise}return{set:l,update:(t,e)=>l(t(a,o),e),subscribe:i.subscribe}}function Nt(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 It(t,{delay:e=0,speed:n,duration:o,easing:r=At}={}){let i=t.getTotalLength();const s=getComputedStyle(t);return"butt"!==s.strokeLinecap&&(i+=parseInt(s.strokeWidth)),void 0===o?o=void 0===n?800:i/n:"function"==typeof o&&(o=o(i)),{delay:e,duration:o,easing:r,css:(t,e)=>`stroke-dasharray: ${t*i} ${e*i}`}}const Dt=[0,1];function Mt(t,e,n,o){if(e<n)return t[0];if(e>o)return t[t.length-1];let r=(o-n)/(t.length-1);if(r<=0)return t[0];let i=(e-n)/r,s=Math.floor(i),c=Math.ceil(i),a=i-s;return(1-a)*t[s]+a*t[c]}function Bt(t){!function(t,e,n){const o=y(t);if(!o.getElementById(e)){const t=T("style");t.id=e,t.textContent=n,x(o,t)}}(t,"svelte-1fz8oog","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}")}function Lt(e){let n;return{c(){n=T("canvas"),O(n,"color",e[0]),O(n,"display","block"),O(n,"width","1.35rem"),O(n,"height","1.5rem"),O(n,"margin","0"),O(n,"padding","0 0.8rem 0 0rem"),O(n,"flex-grow","0"),O(n,"flex-shrink","0"),O(n,"flex-basis","1.35rem"),_(n,"class","svelte-1fz8oog")},m(t,o){v(t,n,o),e[3](n)},p(t,[e]){1&e&&O(n,"color",t[0])},i:t,o:t,d(t){t&&w(n),e[3](null)}}}function jt(t,e,n){let{color:o="#60e0ff"}=e;const r=(t,e)=>{s=Date.now()>c?t:Math.max(s,t),c=Date.now()+e};let i,s=0,c=0,a=[0,0];const l=(t,e,n,o,r,i)=>{o<2*i&&(i=o/2),r<2*i&&(i=r/2),t.beginPath(),t.moveTo(e+i,n),t.arcTo(e+o,n,e+o,n+r,i),t.arcTo(e+o,n+r,e,n+r,i),t.arcTo(e,n+r,e,n,i),t.arcTo(e,n,e+o,n,i),t.closePath()};var d;return d=()=>{let t;const e=2*(a.length-1)+1,o=3*e+1*(e-1),d=()=>{if(t=requestAnimationFrame(d),!i)return;const e=i.getContext("2d");if(!e)return;let r=(t=>{var e=t.backingStorePixelRatio||t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return(window.devicePixelRatio||1)/e})(e),h=Number.parseInt(getComputedStyle(i).getPropertyValue("width").slice(0,-2)),u=Number.parseInt(getComputedStyle(i).getPropertyValue("height").slice(0,-2));n(1,i.width=h*r,i),n(1,i.height=u*r,i),Date.now()<c?a[0]=.15*s+.85*a[0]:a[0]=.0625+.75*a[0];let f=1;for(;f<a.length;)a[f]=.25*a[f-1]+.5*a[f]+.0625,f++;e.clearRect(0,0,i.width,i.height);const p=3/o*i.width*.5,g=4/o*i.width;for(e.fillStyle=i.style.color||"#000000",f=0;f<a.length;f++){const t=a[f]*i.height;t*i.height>2*p?l(e,.5*i.width-p+f*g,.5*(i.height-t),2*p,t,p):(e.beginPath(),e.arc(.5*i.width+f*g,.5*i.height,t*i.height*.5,0,2*Math.PI)),e.fill(),f>0&&(t*i.height>2*p?l(e,.5*i.width-p-f*g,.5*(i.height-t),2*p,t,p):(e.beginPath(),e.arc(.5*i.width-f*g,.5*i.height,t*i.height*.5,0,2*Math.PI)),e.fill())}};return d(),r(1,500),()=>{cancelAnimationFrame(t)}},j().$$.on_mount.push(d),t.$$set=t=>{"color"in t&&n(0,o=t.color)},[o,i,r,function(t){U[t?"unshift":"push"]((()=>{i=t,n(1,i)}))}]}class Ht extends class{$destroy(){ct(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&&!l(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}{constructor(t){super(),lt(this,t,jt,Lt,c,{color:0,updateVU:2},Bt)}get updateVU(){return this.$$.ctx[2]}}const{window:Ut}=it;function Vt(t,e,n){const o=t.slice();return o[42]=e[n],o[44]=n,o}function Wt(t){let e;return{c(){e=T("div"),_(e,"class","TransscriptItemBgDiv")},m(t,n){v(t,e,n)},d(t){t&&w(e)}}}function Xt(e){let n,o;return{c(){n=T("div"),n.textContent="Listening...",_(n,"class","listening")},m(t,e){v(t,n,e)},i(t){o||K((()=>{o=rt(n,e[21],{duration:400}),o.start()}))},o:t,d(t){t&&w(n)}}}function qt(e){let n,o;return{c(){n=T("div"),_(n,"class","TransscriptItemBgDiv")},m(t,e){v(t,n,e)},p(t,n){e=t},i(t){o||K((()=>{o=rt(n,e[21],{duration:e[14]}),o.start()}))},o:t,d(t){t&&w(n)}}}function Kt(t){let e,n;return{c(){e=T("span"),_(e,"style",n=t[44]<t[11].length-1?"width:0.25em;":t[13]?"width:1.2em;":"")},m(t,n){v(t,e,n)},p(t,o){10240&o[0]&&n!==(n=t[44]<t[11].length-1?"width:0.25em;":t[13]?"width:1.2em;":"")&&_(e,"style",n)},d(t){t&&w(e)}}}function Yt(e){let n,o,r,i,s,c,a,l=e[42].word+"",d=e[16]&&qt(e),h=e[44]<e[11].length&&Kt(e);return{c(){n=T("div"),d&&d.c(),o=S(),r=T("div"),i=E(l),s=S(),h&&h.c(),_(r,"class","TransscriptItemContent"),_(n,"class",a="TranscriptItem "+e[23](e[42])),R(n,"Entity",null!==e[42].entityType),R(n,"Final",e[42].isFinal)},m(t,e){v(t,n,e),d&&d.m(n,null),$(n,o),$(n,r),$(r,i),$(r,s),h&&h.m(r,null)},p(t,s){(e=t)[16]?d?65536&s[0]&&nt(d,1):(d=qt(e),d.c(),nt(d,1),d.m(n,o)):d&&(d.d(1),d=null),2048&s[0]&&l!==(l=e[42].word+"")&&P(i,l),e[44]<e[11].length?h?h.p(e,s):(h=Kt(e),h.c(),h.m(r,null)):h&&(h.d(1),h=null),2048&s[0]&&a!==(a="TranscriptItem "+e[23](e[42]))&&_(n,"class",a),2048&s[0]&&R(n,"Entity",null!==e[42].entityType),2048&s[0]&&R(n,"Final",e[42].isFinal)},i(t){nt(d),c||K((()=>{c=rt(r,e[21],{duration:e[14]}),c.start()}))},o:t,d(t){t&&w(n),d&&d.d(),h&&h.d()}}}function Jt(e){let n,o,r,i,s,c,a,l;return{c(){n=T("div"),o=T("div"),r=S(),i=T("div"),s=k("svg"),c=k("path"),_(o,"class","TransscriptItemBgDiv"),O(o,"background-color",e[5]),_(c,"stroke","currentColor"),_(c,"stroke-width","3"),_(c,"d","M7.191 11.444l4.059 6.107 7.376-12.949"),_(c,"fill","none"),_(c,"fill-rule","evenodd"),O(s,"width","2rem"),O(s,"height","2rem"),O(s,"position","absolute"),O(s,"transform","translate(-0.6rem, -0.5rem)"),O(s,"stroke","#eee"),_(s,"viewBox","0 0 24 24"),_(s,"xmlns","http://www.w3.org/2000/svg"),O(i,"width","1.0rem"),O(i,"height","1rem"),O(i,"position","relative"),_(n,"class","TranscriptItem")},m(t,e){v(t,n,e),$(n,o),$(n,r),$(n,i),$(i,s),$(s,c)},p(t,e){32&e[0]&&O(o,"background-color",t[5])},i(t){a||K((()=>{a=rt(c,e[20],{duration:500}),a.start()})),l||K((()=>{l=rt(n,e[21],{duration:200,maxWidth:3}),l.start()}))},o:t,d(t){t&&w(n)}}}function Zt(t){let e;return{c(){e=T("link"),_(e,"href","https://fonts.googleapis.com/css2?family=Saira+Condensed:wght@700&display=swap"),_(e,"rel","stylesheet")},m(t,n){v(t,e,n)},d(t){t&&w(e)}}}function Gt(t){let e;return{c(){e=T("link"),_(e,"href",t[10]),_(e,"rel","stylesheet")},m(t,n){v(t,e,n)},p(t,n){1024&n[0]&&_(e,"href",t[10])},d(t){t&&w(e)}}}function Qt(e){let n,o,r,i,s,c,a,l,d,h,u,f,p,g,m,y=e[16]&&Wt(),b={color:e[5]};s=new Ht({props:b}),e[34](s);let x=e[17]&&Xt(e),k=e[11],E=[];for(let t=0;t<k.length;t+=1)E[t]=Yt(Vt(e,k,t));let z=e[13]&&Jt(e),P=e[15]&&Zt(),F=void 0!==e[10]&&Gt(e);return{c(){var p;n=T("main"),o=T("div"),y&&y.c(),r=S(),i=T("div"),(p=s.$$.fragment)&&p.c(),c=S(),x&&x.c(),a=S();for(let t=0;t<E.length;t+=1)E[t].c();l=S(),z&&z.c(),d=S(),P&&P.c(),h=C(),u=S(),F&&F.c(),f=C(),this.c=t,_(i,"class","TransscriptItemContent"),_(o,"class","TranscriptItem"),_(n,"class","BigTranscript"),O(n,"--voffset",e[1]),O(n,"--hoffset",e[2]),O(n,"--fontsize",e[3]),O(n,"--color",e[4]),O(n,"--highlight-color",e[5]),O(n,"--text-bg-color",e[6]),O(n,"--gradient-stop1",e[7]),O(n,"--gradient-stop2",e[8]),O(n,"--marginbottom",e[9]),O(n,"--transition",e[18].transition),O(n,"opacity",e[18].transition),O(n,"max-height",10*Mt(Dt,e[18].transition,0,.6)+"rem"),O(n,"visibility",0!==e[18].transition?"visible":"hidden"),R(n,"placementTop","top"===e[0]),R(n,"defaultTypography",e[15])},m(t,b){v(t,n,b),$(n,o),y&&y.m(o,null),$(o,r),$(o,i),st(s,i,null),$(i,c),x&&x.m(i,null),$(n,a);for(let t=0;t<E.length;t+=1)E[t].m(n,null);$(n,l),z&&z.m(n,null),v(t,d,b),P&&P.m(document.head,null),$(document.head,h),v(t,u,b),F&&F.m(t,b),v(t,f,b),p=!0,g||(m=A(Ut,"message",e[22]),g=!0)},p(t,e){t[16]?y||(y=Wt(),y.c(),y.m(o,r)):y&&(y.d(1),y=null);const c={};if(32&e[0]&&(c.color=t[5]),s.$set(c),t[17]?x?131072&e[0]&&nt(x,1):(x=Xt(t),x.c(),nt(x,1),x.m(i,null)):x&&(x.d(1),x=null),8464384&e[0]){let o;for(k=t[11],o=0;o<k.length;o+=1){const r=Vt(t,k,o);E[o]?(E[o].p(r,e),nt(E[o],1)):(E[o]=Yt(r),E[o].c(),nt(E[o],1),E[o].m(n,l))}for(;o<E.length;o+=1)E[o].d(1);E.length=k.length}t[13]?z?(z.p(t,e),8192&e[0]&&nt(z,1)):(z=Jt(t),z.c(),nt(z,1),z.m(n,null)):z&&(z.d(1),z=null),(!p||2&e[0])&&O(n,"--voffset",t[1]),(!p||4&e[0])&&O(n,"--hoffset",t[2]),(!p||8&e[0])&&O(n,"--fontsize",t[3]),(!p||16&e[0])&&O(n,"--color",t[4]),(!p||32&e[0])&&O(n,"--highlight-color",t[5]),(!p||64&e[0])&&O(n,"--text-bg-color",t[6]),(!p||128&e[0])&&O(n,"--gradient-stop1",t[7]),(!p||256&e[0])&&O(n,"--gradient-stop2",t[8]),(!p||512&e[0])&&O(n,"--marginbottom",t[9]),(!p||262144&e[0])&&O(n,"--transition",t[18].transition),(!p||262144&e[0])&&O(n,"opacity",t[18].transition),(!p||262144&e[0])&&O(n,"max-height",10*Mt(Dt,t[18].transition,0,.6)+"rem"),(!p||262144&e[0])&&O(n,"visibility",0!==t[18].transition?"visible":"hidden"),1&e[0]&&R(n,"placementTop","top"===t[0]),32768&e[0]&&R(n,"defaultTypography",t[15]),t[15]?P||(P=Zt(),P.c(),P.m(h.parentNode,h)):P&&(P.d(1),P=null),void 0!==t[10]?F?F.p(t,e):(F=Gt(t),F.c(),F.m(f.parentNode,f)):F&&(F.d(1),F=null)},i(t){if(!p){nt(s.$$.fragment,t),nt(x);for(let t=0;t<k.length;t+=1)nt(E[t]);nt(z),p=!0}},o(t){!function(t,e,n,o){if(t&&t.o){if(et.has(t))return;et.add(t),(void 0).c.push((()=>{et.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}(s.$$.fragment,t),p=!1},d(t){t&&w(n),y&&y.d(),e[34](null),ct(s),x&&x.d(),function(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}(E,t),z&&z.d(),t&&w(d),P&&P.d(t),w(h),t&&w(u),F&&F.d(t),t&&w(f),g=!1,m()}}}function te(t,e,n){let o,r,i,s,c,a,l,h,{placement:u}=e,{voffset:f="3rem"}=e,{hoffset:p="2rem"}=e,{fontsize:g="1.5rem"}=e,{color:m="#ffffff"}=e,{highlightcolor:$="#15e8b5"}=e,{backgroundcolor:y="#202020"}=e,{gradientstop1:b="#ffffff88"}=e,{gradientstop2:x="#ffffffcc"}=e,{marginbottom:v="0rem"}=e,{formattext:w}=e,{demomode:T}=e,{customcssurl:k}=e,{customtypography:E}=e,S=[],C=null,A=null,_=gt.Disconnected,z=!1,P=!1,O=!1,R=Ft({transition:0},{duration:200});d(t,R,(t=>n(18,l=t)));const F=j(),N=Nt(It),I=Nt(((t,{delay:e=0,duration:n=350,maxWidth:o=10})=>({delay:e,duration:n,css:t=>`\n max-width: ${Mt(Dt,t,0,1)*o}rem;\n `}))),D=t=>{n(13,O=O||t)},M=t=>{n(30,_=t),_===gt.Active&&(n(13,O=!1),n(11,S=[]),A=null)},B=t=>{if(void 0===t)return;h&&(s||_===gt.Active)&&h.updateVU(.5*Math.random()+.5,75*Math.random()+75),t.isFinal?L(S.length>0?s?3500:2e3:0):S.length>0&&(z||n(31,z=!0),L(2e3));const e=`${t.contextId}/${t.id}`;null!==A?A!==e&&(n(13,O=!1),A=e):A=e,n(11,S=[]),t.words.forEach((t=>{n(11,S[t.index]={word:t.value,serialNumber:t.index,entityType:null,isFinal:t.isFinal,hide:!1},S)})),i?t.entities.forEach((t=>{n(11,S[t.startPosition].word=t.value,S),n(11,S[t.startPosition].entityType=t.type,S),n(11,S[t.startPosition].isFinal=t.isFinal,S),n(11,S[t.startPosition].hide=!1,S);for(let e=t.startPosition+1;e<t.endPosition;e++)S[e]&&n(11,S[e].hide=!0,S)})):t.entities.forEach((t=>{for(let e=t.startPosition;e<t.endPosition;e++)S[e]&&(n(11,S[e].entityType=t.type,S),n(11,S[e].isFinal=t.isFinal,S))})),n(11,S=S.filter((t=>!t.hide)))},L=(t=0)=>{H(),C=window.setTimeout((()=>{C=null,z&&n(31,z=!1)}),t)},H=()=>{null!==C&&(window.clearTimeout(C),C=null)};return t.$$set=t=>{"placement"in t&&n(0,u=t.placement),"voffset"in t&&n(1,f=t.voffset),"hoffset"in t&&n(2,p=t.hoffset),"fontsize"in t&&n(3,g=t.fontsize),"color"in t&&n(4,m=t.color),"highlightcolor"in t&&n(5,$=t.highlightcolor),"backgroundcolor"in t&&n(6,y=t.backgroundcolor),"gradientstop1"in t&&n(7,b=t.gradientstop1),"gradientstop2"in t&&n(8,x=t.gradientstop2),"marginbottom"in t&&n(9,v=t.marginbottom),"formattext"in t&&n(24,w=t.formattext),"demomode"in t&&n(25,T=t.demomode),"customcssurl"in t&&n(10,k=t.customcssurl),"customtypography"in t&&n(26,E=t.customtypography)},t.$$.update=()=>{if(2048&t.$$.dirty[0]&&n(17,o=0===S.length),64&t.$$.dirty[0]&&n(16,r="none"!==y),16777216&t.$$.dirty[0]&&(i=void 0===w||"false"!==w),33554432&t.$$.dirty[0]&&n(33,s=void 0!==T&&"false"!==T),67108864&t.$$.dirty[0]&&n(15,c=void 0===E||"false"===E),4&t.$$.dirty[1]&&n(14,a=s?800:350),1073741824&t.$$.dirty[0]|3&t.$$.dirty[1]){const t=_===gt.Active||z;t!==P&&(e="visibilitychanged",l=t,F.dispatchEvent(new CustomEvent(e,{detail:l,composed:!0}))),n(32,P=t),R.set({transition:P?1:0})}var e,l;4&t.$$.dirty[1]&&(s||L(0))},[u,f,p,g,m,$,y,b,x,v,k,S,h,O,a,c,r,o,l,R,N,I,t=>{switch(t.data.type){case vt.speechsegment:B(t.data.segment);break;case vt.speechhandled:D(t.data.success);break;case vt.speechstate:M(t.data.state)}},t=>t.entityType||"",w,T,E,D,M,B,_,z,P,s,function(t){U[t?"unshift":"push"]((()=>{h=t,n(12,h)}))}]}class ee extends dt{constructor(t){super(),this.shadowRoot.innerHTML="<style>main{position:relative;user-select:none;display:flex;flex-direction:row;justify-content:start;flex-wrap:wrap;margin-bottom:calc(var(--marginbottom) * var(--transition));height:fit-content}.defaultTypography{font-family:'Saira Condensed', sans-serif;text-transform:uppercase;color:var(--color);font-size:var(--fontsize);line-height:135%}.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;white-space:nowrap}.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, var(--gradient-stop1), var(--gradient-stop2), var(--gradient-stop1), var(--gradient-stop2), var(--gradient-stop1));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>",lt(this,{target:this.shadowRoot,props:F(this.attributes),customElement:!0},te,Qt,a,{placement:0,voffset:1,hoffset:2,fontsize:3,color:4,highlightcolor:5,backgroundcolor:6,gradientstop1:7,gradientstop2:8,marginbottom:9,formattext:24,demomode:25,customcssurl:10,customtypography:26,speechhandled:27,speechstate:28,speechsegment:29},null,[-1,-1]),t&&(t.target&&v(t.target,this,t.anchor),t.props&&(this.$set(t.props),G()))}static get observedAttributes(){return["placement","voffset","hoffset","fontsize","color","highlightcolor","backgroundcolor","gradientstop1","gradientstop2","marginbottom","formattext","demomode","customcssurl","customtypography","speechhandled","speechstate","speechsegment"]}get placement(){return this.$$.ctx[0]}set placement(t){this.$$set({placement:t}),G()}get voffset(){return this.$$.ctx[1]}set voffset(t){this.$$set({voffset:t}),G()}get hoffset(){return this.$$.ctx[2]}set hoffset(t){this.$$set({hoffset:t}),G()}get fontsize(){return this.$$.ctx[3]}set fontsize(t){this.$$set({fontsize:t}),G()}get color(){return this.$$.ctx[4]}set color(t){this.$$set({color:t}),G()}get highlightcolor(){return this.$$.ctx[5]}set highlightcolor(t){this.$$set({highlightcolor:t}),G()}get backgroundcolor(){return this.$$.ctx[6]}set backgroundcolor(t){this.$$set({backgroundcolor:t}),G()}get gradientstop1(){return this.$$.ctx[7]}set gradientstop1(t){this.$$set({gradientstop1:t}),G()}get gradientstop2(){return this.$$.ctx[8]}set gradientstop2(t){this.$$set({gradientstop2:t}),G()}get marginbottom(){return this.$$.ctx[9]}set marginbottom(t){this.$$set({marginbottom:t}),G()}get formattext(){return this.$$.ctx[24]}set formattext(t){this.$$set({formattext:t}),G()}get demomode(){return this.$$.ctx[25]}set demomode(t){this.$$set({demomode:t}),G()}get customcssurl(){return this.$$.ctx[10]}set customcssurl(t){this.$$set({customcssurl:t}),G()}get customtypography(){return this.$$.ctx[26]}set customtypography(t){this.$$set({customtypography:t}),G()}get speechhandled(){return this.$$.ctx[27]}get speechstate(){return this.$$.ctx[28]}get speechsegment(){return this.$$.ctx[29]}}function ne(t){let e;return{c(){e=T("link"),_(e,"href",t[11]),_(e,"rel","stylesheet")},m(t,n){v(t,e,n)},p(t,n){2048&n[0]&&_(e,"href",t[11])},d(t){t&&w(e)}}}function oe(e){let n,o,r,s,c,a,l,d,h,u,f=void 0!==e[11]&&ne(e);return{c(){f&&f.c(),n=S(),o=T("main"),r=T("div"),s=T("div"),c=T("big-transcript"),a=S(),l=T("div"),d=E(e[13]),this.c=t,z(c,"customtypography",e[12]),z(c,"customcssurl",e[11]),z(c,"formattext",e[9]),z(c,"fontsize",e[1]),z(c,"color",e[3]),z(c,"backgroundcolor","none"),z(c,"highlightcolor",e[5]),z(c,"gradientstop1",e[7]),z(c,"gradientstop2",e[8]),z(c,"demomode",e[10]),_(l,"class","hint"),O(l,"opacity",e[18].opacity),R(l,"defaultTypography",e[15]),_(s,"class","pad"),_(r,"class","drawer"),O(r,"background-color",e[6]),O(r,"opacity",e[16].opacity),O(r,"transform","translate(0px, "+e[17].y+"rem)"),_(o,"class","placementTop"),O(o,"--height",e[0]),O(o,"--smalltextcolor",e[4]),O(o,"--hintfontsize",e[2])},m(t,i){f&&f.m(t,i),v(t,n,i),v(t,o,i),$(o,r),$(r,s),$(s,c),e[29](c),$(s,a),$(s,l),$(l,d),h||(u=[A(window,"message",e[23]),A(c,"visibilitychanged",e[22])],h=!0)},p(t,e){void 0!==t[11]?f?f.p(t,e):(f=ne(t),f.c(),f.m(n.parentNode,n)):f&&(f.d(1),f=null),4096&e[0]&&z(c,"customtypography",t[12]),2048&e[0]&&z(c,"customcssurl",t[11]),512&e[0]&&z(c,"formattext",t[9]),2&e[0]&&z(c,"fontsize",t[1]),8&e[0]&&z(c,"color",t[3]),32&e[0]&&z(c,"highlightcolor",t[5]),128&e[0]&&z(c,"gradientstop1",t[7]),256&e[0]&&z(c,"gradientstop2",t[8]),1024&e[0]&&z(c,"demomode",t[10]),8192&e[0]&&P(d,t[13]),262144&e[0]&&O(l,"opacity",t[18].opacity),32768&e[0]&&R(l,"defaultTypography",t[15]),64&e[0]&&O(r,"background-color",t[6]),65536&e[0]&&O(r,"opacity",t[16].opacity),131072&e[0]&&O(r,"transform","translate(0px, "+t[17].y+"rem)"),1&e[0]&&O(o,"--height",t[0]),16&e[0]&&O(o,"--smalltextcolor",t[4]),4&e[0]&&O(o,"--hintfontsize",t[2])},i:t,o:t,d(t){f&&f.d(t),t&&w(n),t&&w(o),e[29](null),h=!1,i(u)}}}function re(t,n,o){let r,i,s,c,a,{height:l="8rem"}=n,{hint:h=""}=n,{fontsize:u="1.5rem"}=n,{hintfontsize:f="0.9rem"}=n,{color:p="#ffffff"}=n,{smalltextcolor:g="#ffffff70"}=n,{highlightcolor:m="#15e8b5"}=n,{backgroundcolor:$="#202020"}=n,{gradientstop1:y="#ffffff88"}=n,{gradientstop2:b="#ffffffcc"}=n,{formattext:x}=n,{demomode:v}=n,{customcssurl:w}=n,{customtypography:T}=n,k=[],E=0,S="";const C=(t,e=!0)=>{P.set({opacity:0}),a&&e&&a.speechsegment(t),t.isFinal&&(E++,E<k.length?o(13,S=k[E]):o(13,S=k[Math.floor(Math.random()*k.length)]))},A=t=>{E=0,o(24,h=t),k=[];try{k=JSON.parse(h),("string"==typeof k||k instanceof String)&&(k=[k])}catch(t){k[0]=h||""}o(13,S=k[E])};let _=Ft({y:-1},{duration:200});d(t,_,(t=>o(17,s=t)));let z=Ft({opacity:0},{duration:200,easing:e});d(t,z,(t=>o(16,i=t)));let P=Ft({opacity:0},{duration:200,delay:200,easing:e});d(t,P,(t=>o(18,c=t)));return t.$$set=t=>{"height"in t&&o(0,l=t.height),"hint"in t&&o(24,h=t.hint),"fontsize"in t&&o(1,u=t.fontsize),"hintfontsize"in t&&o(2,f=t.hintfontsize),"color"in t&&o(3,p=t.color),"smalltextcolor"in t&&o(4,g=t.smalltextcolor),"highlightcolor"in t&&o(5,m=t.highlightcolor),"backgroundcolor"in t&&o(6,$=t.backgroundcolor),"gradientstop1"in t&&o(7,y=t.gradientstop1),"gradientstop2"in t&&o(8,b=t.gradientstop2),"formattext"in t&&o(9,x=t.formattext),"demomode"in t&&o(10,v=t.demomode),"customcssurl"in t&&o(11,w=t.customcssurl),"customtypography"in t&&o(12,T=t.customtypography)},t.$$.update=()=>{16777216&t.$$.dirty[0]&&A(h),4096&t.$$.dirty[0]&&o(15,r=void 0===T||"false"===T)},[l,u,f,p,g,m,$,y,b,x,v,w,T,S,a,r,i,s,c,_,z,P,t=>{!1===t.detail?(_.set({y:-1},{easing:_t}),z.set({opacity:0}),P.set({opacity:0})):(_.set({y:0},{easing:zt}),z.set({opacity:1}),P.set({opacity:1}))},t=>{switch(t.data.type){case vt.speechsegment:C(t.data.segment,!1);break;case vt.transcriptdrawerhint:A(t.data.hint)}},h,t=>{a&&a.speechhandled(t)},t=>{a&&a.speechstate(t)},C,A,function(t){U[t?"unshift":"push"]((()=>{a=t,o(14,a)}))}]}customElements.get("big-transcript")?console.warn("Skipping re-defining customElement big-transcript"):customElements.define("big-transcript",ee);class ie extends dt{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{margin-top:0.15rem}.defaultTypography{font-family:'Saira Condensed', sans-serif;text-transform:uppercase;color:var(--smalltextcolor);font-size:var(--hintfontsize);line-height:135%}</style>",lt(this,{target:this.shadowRoot,props:F(this.attributes),customElement:!0},re,oe,a,{height:0,hint:24,fontsize:1,hintfontsize:2,color:3,smalltextcolor:4,highlightcolor:5,backgroundcolor:6,gradientstop1:7,gradientstop2:8,formattext:9,demomode:10,customcssurl:11,customtypography:12,speechhandled:25,speechstate:26,speechsegment:27,sethint:28},null,[-1,-1]),t&&(t.target&&v(t.target,this,t.anchor),t.props&&(this.$set(t.props),G()))}static get observedAttributes(){return["height","hint","fontsize","hintfontsize","color","smalltextcolor","highlightcolor","backgroundcolor","gradientstop1","gradientstop2","formattext","demomode","customcssurl","customtypography","speechhandled","speechstate","speechsegment","sethint"]}get height(){return this.$$.ctx[0]}set height(t){this.$$set({height:t}),G()}get hint(){return this.$$.ctx[24]}set hint(t){this.$$set({hint:t}),G()}get fontsize(){return this.$$.ctx[1]}set fontsize(t){this.$$set({fontsize:t}),G()}get hintfontsize(){return this.$$.ctx[2]}set hintfontsize(t){this.$$set({hintfontsize:t}),G()}get color(){return this.$$.ctx[3]}set color(t){this.$$set({color:t}),G()}get smalltextcolor(){return this.$$.ctx[4]}set smalltextcolor(t){this.$$set({smalltextcolor:t}),G()}get highlightcolor(){return this.$$.ctx[5]}set highlightcolor(t){this.$$set({highlightcolor:t}),G()}get backgroundcolor(){return this.$$.ctx[6]}set backgroundcolor(t){this.$$set({backgroundcolor:t}),G()}get gradientstop1(){return this.$$.ctx[7]}set gradientstop1(t){this.$$set({gradientstop1:t}),G()}get gradientstop2(){return this.$$.ctx[8]}set gradientstop2(t){this.$$set({gradientstop2:t}),G()}get formattext(){return this.$$.ctx[9]}set formattext(t){this.$$set({formattext:t}),G()}get demomode(){return this.$$.ctx[10]}set demomode(t){this.$$set({demomode:t}),G()}get customcssurl(){return this.$$.ctx[11]}set customcssurl(t){this.$$set({customcssurl:t}),G()}get customtypography(){return this.$$.ctx[12]}set customtypography(t){this.$$set({customtypography:t}),G()}get speechhandled(){return this.$$.ctx[25]}get speechstate(){return this.$$.ctx[26]}get speechsegment(){return this.$$.ctx[27]}get sethint(){return this.$$.ctx[28]}}customElements.get("transcript-drawer")?console.warn("Skipping re-defining customElement transcript-drawer"):customElements.define("transcript-drawer",ie)}));
//# sourceMappingURL=transcript-drawer.js.map

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

!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){"use strict";function e(){}const t=e=>e;function n(e){return e()}function o(){return Object.create(null)}function r(e){e.forEach(n)}function i(e){return"function"==typeof e}let s;function c(e,t){return s||(s=document.createElement("a")),s.href=t,e===s.href}function a(e,t){return e!=e?t==t:e!==t}const l="undefined"!=typeof window;let d=l?()=>window.performance.now():()=>Date.now(),u=l?e=>requestAnimationFrame(e):e;const f=new Set;function h(e){f.forEach((t=>{t.c(e)||(f.delete(t),t.f())})),0!==f.size&&u(h)}function p(e,t){e.appendChild(t)}function m(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function g(e){const t=y("style");return function(e,t){p(e.head||e,t)}(m(e),t),t.sheet}function b(e,t,n){e.insertBefore(t,n||null)}function $(e){e.parentNode.removeChild(e)}function y(e){return document.createElement(e)}function v(e){return document.createTextNode(e)}function w(e,t,n,o){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o)}function x(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function z(e,t,n,o){null===n?e.style.removeProperty(t):e.style.setProperty(t,n,o?"important":"")}function _(e){const t={};for(const n of e)t[n.name]=n.value;return t}const k=new Map;let E,C=0;function S(e,t,n,o,r,i,s,c=0){const a=16.666/o;let l="{\n";for(let e=0;e<=1;e+=a){const o=t+(n-t)*i(e);l+=100*e+`%{${s(o,1-o)}}\n`}const d=l+`100% {${s(n,1-n)}}\n}`,u=`__svelte_${function(e){let t=5381,n=e.length;for(;n--;)t=(t<<5)-t^e.charCodeAt(n);return t>>>0}(d)}_${c}`,f=m(e),{stylesheet:h,rules:p}=k.get(f)||function(e,t){const n={stylesheet:g(t),rules:{}};return k.set(e,n),n}(f,e);p[u]||(p[u]=!0,h.insertRule(`@keyframes ${u} ${d}`,h.cssRules.length));const b=e.style.animation||"";return e.style.animation=`${b?`${b}, `:""}${u} ${o}ms linear ${r}ms 1 both`,C+=1,u}function N(e,t){const n=(e.style.animation||"").split(", "),o=n.filter(t?e=>e.indexOf(t)<0:e=>-1===e.indexOf("__svelte")),r=n.length-o.length;r&&(e.style.animation=o.join(", "),C-=r,C||u((()=>{C||(k.forEach((e=>{const{stylesheet:t}=e;let n=t.cssRules.length;for(;n--;)t.deleteRule(n);e.rules={}})),k.clear())})))}function D(e){E=e}function A(){if(!E)throw new Error("Function called outside component initialization");return E}const R=[],P=[],M=[],F=[],O=Promise.resolve();let T=!1;function B(e){M.push(e)}const L=new Set;let j,H=0;function I(){const e=E;do{for(;H<R.length;){const e=R[H];H++,D(e),q(e.$$)}for(D(null),R.length=0,H=0;P.length;)P.pop()();for(let e=0;e<M.length;e+=1){const t=M[e];L.has(t)||(L.add(t),t())}M.length=0}while(R.length);for(;F.length;)F.pop()();T=!1,L.clear(),D(e)}function q(e){if(null!==e.fragment){e.update(),r(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(B)}}function U(e,t,n){e.dispatchEvent(function(e,t,{bubbles:n=!1,cancelable:o=!1}={}){const r=document.createEvent("CustomEvent");return r.initCustomEvent(e,n,o,t),r}(`${t?"intro":"outro"}${n}`))}const W=new Set;let Y;function G(e,t){e&&e.i&&(W.delete(e),e.i(t))}function J(e,t,n,o){if(e&&e.o){if(W.has(e))return;W.add(e),Y.c.push((()=>{W.delete(e),o&&(n&&e.d(1),o())})),e.o(t)}}const K={duration:0};function Q(n,o,s,c){let a=o(n,s),l=c?0:1,p=null,m=null,g=null;function b(){g&&N(n,g)}function $(e,t){const n=e.b-l;return t*=Math.abs(n),{a:l,b:e.b,d:n,duration:t,start:e.start,end:e.start+t,group:e.group}}function y(o){const{delay:i=0,duration:s=300,easing:c=t,tick:y=e,css:v}=a||K,w={start:d()+i,b:o};o||(w.group=Y,Y.r+=1),p||m?m=w:(v&&(b(),g=S(n,l,o,s,i,c,v)),o&&y(0,1),p=$(w,s),B((()=>U(n,o,"start"))),function(e){let t;0===f.size&&u(h),new Promise((n=>{f.add(t={c:e,f:n})}))}((e=>{if(m&&e>m.start&&(p=$(m,s),m=null,U(n,p.b,"start"),v&&(b(),g=S(n,l,p.b,p.duration,0,c,a.css))),p)if(e>=p.end)y(l=p.b,1-l),U(n,p.b,"end"),m||(p.b?b():--p.group.r||r(p.group.c)),p=null;else if(e>=p.start){const t=e-p.start;l=p.a+p.d*c(t/p.duration),y(l,1-l)}return!(!p&&!m)})))}return{run(e){i(a)?(j||(j=Promise.resolve(),j.then((()=>{j=null}))),j).then((()=>{a=a(),y(e)})):y(e)},end(){b(),p=m=null}}}const V="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function X(e,t){-1===e.$$.dirty[0]&&(R.push(e),T||(T=!0,O.then(I)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function Z(t,s,c,a,l,d,u,f=[-1]){const h=E;D(t);const p=t.$$={fragment:null,ctx:null,props:d,update:e,not_equal:l,bound:o(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(s.context||(h?h.$$.context:[])),callbacks:o(),dirty:f,skip_bound:!1,root:s.target||h.$$.root};u&&u(p.root);let m=!1;if(p.ctx=c?c(t,s.props||{},((e,n,...o)=>{const r=o.length?o[0]:n;return p.ctx&&l(p.ctx[e],p.ctx[e]=r)&&(!p.skip_bound&&p.bound[e]&&p.bound[e](r),m&&X(t,e)),n})):[],p.update(),m=!0,r(p.before_update),p.fragment=!!a&&a(p.ctx),s.target){if(s.hydrate){const e=function(e){return Array.from(e.childNodes)}(s.target);p.fragment&&p.fragment.l(e),e.forEach($)}else p.fragment&&p.fragment.c();s.intro&&G(t.$$.fragment),function(e,t,o,s){const{fragment:c,on_mount:a,on_destroy:l,after_update:d}=e.$$;c&&c.m(t,o),s||B((()=>{const t=a.map(n).filter(i);l?l.push(...t):r(t),e.$$.on_mount=[]})),d.forEach(B)}(t,s.target,s.anchor,s.customElement),I()}D(h)}let ee;function te(e,{delay:n=0,duration:o=400,easing:r=t}={}){const i=+getComputedStyle(e).opacity;return{delay:n,duration:o,easing:r,css:e=>"opacity: "+e*i}}var ne,oe,re,ie,se,ce,ae;"function"==typeof HTMLElement&&(ee=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:e}=this.$$;this.$$.on_disconnect=e.map(n).filter(i);for(const e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(e,t,n){this[e]=n}disconnectedCallback(){r(this.$$.on_disconnect)}$destroy(){!function(e,t){const n=e.$$;null!==n.fragment&&(r(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}(this,1),this.$destroy=e}$on(e,t){const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}),function(e){e[e.Failed=0]="Failed",e[e.NoBrowserSupport=1]="NoBrowserSupport",e[e.NoAudioConsent=2]="NoAudioConsent",e[e.__UnrecoverableErrors=3]="__UnrecoverableErrors",e[e.Disconnected=4]="Disconnected",e[e.Disconnecting=5]="Disconnecting",e[e.Connecting=6]="Connecting",e[e.Preinitialized=7]="Preinitialized",e[e.Initializing=8]="Initializing",e[e.Connected=9]="Connected",e[e.Stopping=10]="Stopping",e[e.Starting=11]="Starting",e[e.Recording=12]="Recording"}(ne||(ne={})),function(e){e.SpeechlyFirstConnect="SpeechlyFirstConnect"}(oe||(oe={})),function(e){e.speechlypoweron="speechlypoweron",e.holdstart="holdstart",e.holdend="holdend",e.speechstate="speechstate",e.speechsegment="speechsegment",e.speechhandled="speechhandled",e.showhint="showhint",e.transcriptdrawerhint="hint",e.speechlyintroready="speechlyintroready",e.speechlyintroclosed="speechlyintroclosed"}(re||(re={})),function(e){e.Mic="mic",e.MicActive="micactive",e.Error="error",e.Denied="denied"}(ie||(ie={})),function(e){e.Hold="hold",e.Click="click",e.Noninteractive="noninteractive"}(se||(se={})),function(e){e.None="none",e.Connecting="connecting",e.Busy="busy"}(ce||(ce={})),function(e){e.None="none",e.Whirl="whirl"}(ae||(ae={})),ne.Disconnected,ne.Disconnecting,ne.Connecting,ne.Preinitialized,ne.Initializing,ne.Connected,ne.Starting,ne.Recording,ne.Stopping,ne.Failed,ne.NoBrowserSupport,ne.NoAudioConsent;const{window:le}=V;function de(e){let t,n,o,r,i,s,a,l,d,u,f,h;return{c(){t=y("modalcontent"),n=y("animation"),o=y("button"),r=v(" "),i=y("video"),s=y("source"),l=v("\n Your browser does not support the video tag."),x(o,"class","close"),c(s.src,a=e[0])||x(s,"src",a),x(s,"type","video/mp4"),x(i,"width","100%"),x(i,"height","auto"),i.autoplay=!0,i.muted=!0,i.loop=!0,x(t,"class",e[2])},m(c,a){b(c,t,a),p(t,n),p(n,o),p(n,r),p(n,i),p(i,s),p(i,l),u=!0,f||(h=w(o,"click",e[5]),f=!0)},p(e,n){(!u||1&n&&!c(s.src,a=e[0]))&&x(s,"src",a),(!u||4&n)&&x(t,"class",e[2])},i(n){u||(B((()=>{d||(d=Q(t,e[4],{},!0)),d.run(1)})),u=!0)},o(n){d||(d=Q(t,e[4],{},!1)),d.run(0),u=!1},d(e){e&&$(t),e&&d&&d.end(),f=!1,h()}}}function ue(t){let n,o,i,s,c=t[3]&&de(t);return{c(){n=y("modal"),c&&c.c(),this.c=e,z(n,"--remsize",t[1])},m(e,r){b(e,n,r),c&&c.m(n,null),o=!0,i||(s=w(le,"keydown",t[6]),i=!0)},p(e,[t]){e[3]?c?(c.p(e,t),8&t&&G(c,1)):(c=de(e),c.c(),G(c,1),c.m(n,null)):c&&(Y={r:0,c:[],p:Y},J(c,1,1,(()=>{c=null})),Y.r||r(Y.c),Y=Y.p),(!o||2&t)&&z(n,"--remsize",e[1])},i(e){o||(G(c),o=!0)},o(e){J(c),o=!1},d(e){e&&$(n),c&&c.d(),i=!1,s()}}}function fe(e,t,n){let o,{video:r=""}=t,{hide:i}=t,{remsize:s="1.0rem"}=t,{position:c="fixed"}=t;const a=(()=>{const e=A();return(t,n)=>{e.dispatchEvent(new CustomEvent(t,{detail:n,composed:!0}))}})(),l=(d=te,function(e,t){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 d(e,t)});var d;let u=!1;var f;f=()=>{n(8,u=!0)},A().$$.on_mount.push(f);const h=()=>{n(3,o=!1),a("speechlyvideoclosed"),window.postMessage({type:"speechlyvideoclosed"},"*")};return e.$$set=e=>{"video"in e&&n(0,r=e.video),"hide"in e&&n(7,i=e.hide),"remsize"in e&&n(1,s=e.remsize),"position"in e&&n(2,c=e.position)},e.$$.update=()=>{384&e.$$.dirty&&n(3,o=u&&"false"===i)},[r,s,c,o,l,h,e=>{u&&"Escape"===e.key&&(e.preventDefault(),h())},i,u]}class he extends ee{constructor(e){super(),this.shadowRoot.innerHTML="<style>modal{font-size:var(--remsize);height:100%}modalcontent{z-index:2001;pointer-events:none}modalcontent.fixed{position:fixed;top:0;left:0;right:0;bottom:0;overflow-x:hidden;overflow-y:auto}modalcontent.absolute{position:absolute;top:0;left:0;right:0;height:100vh}animation{position:absolute;box-sizing:border-box;width:300px;margin:1rem;top:0;right:0;border-radius:8px;pointer-events:auto}video{box-sizing:border-box;width:100%;border-radius:0.5rem;overflow:hidden;border:1px solid #0002}.close{--button-size:1.5rem;display:block;box-sizing:border-box;position:absolute;z-index:1000;top:0.25rem;right:0.25rem;margin:0;padding:0;width:var(--button-size);height:var(--button-size);border:0;color:black;border-radius:1.5rem;background:transparent;box-shadow:0 0 0 1px transparent;transition:transform 0.2s cubic-bezier(0.25, 0.1, 0.25, 1),\n background 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);-webkit-appearance:none}.close:before,.close:after{content:'';display:block;box-sizing:border-box;position:absolute;top:50%;width:calc(var(--button-size) - 0.5rem);height:1px;background:#728195;transform-origin:center;transition:height 0.2s cubic-bezier(0.25, 0.1, 0.25, 1),\n background 0.2s cubic-bezier(0.25, 0.1, 0.25, 1)}.close:before{-webkit-transform:translate(0, -50%) rotate(45deg);-moz-transform:translate(0, -50%) rotate(45deg);transform:translate(0, -50%) rotate(45deg);left:0.25rem}.close:after{-webkit-transform:translate(0, -50%) rotate(-45deg);-moz-transform:translate(0, -50%) rotate(-45deg);transform:translate(0, -50%) rotate(-45deg);left:0.25rem}.close:hover{background:#ffffff}.close:hover:before,.close:hover:after{height:2px;background:black}.close:focus{border-color:#3399ff;box-shadow:0 0 0 2px #3399ff}.close:active{transform:scale(0.9)}.close:hover,.close:focus,.close:active{outline:none}</style>",Z(this,{target:this.shadowRoot,props:_(this.attributes),customElement:!0},fe,ue,a,{video:0,hide:7,remsize:1,position:2},null),e&&(e.target&&b(e.target,this,e.anchor),e.props&&(this.$set(e.props),I()))}static get observedAttributes(){return["video","hide","remsize","position"]}get video(){return this.$$.ctx[0]}set video(e){this.$$set({video:e}),I()}get hide(){return this.$$.ctx[7]}set hide(e){this.$$set({hide:e}),I()}get remsize(){return this.$$.ctx[1]}set remsize(e){this.$$set({remsize:e}),I()}get position(){return this.$$.ctx[2]}set position(e){this.$$set({position:e}),I()}}customElements.get("video-guide")?console.warn("Skipping re-defining customElement video-guide"):customElements.define("video-guide",he)}));
!function(t){"function"==typeof define&&define.amd?define(t):t()}((function(){"use strict";function t(){}const e=t=>t;function n(t){return t()}function o(){return Object.create(null)}function r(t){t.forEach(n)}function i(t){return"function"==typeof t}let s;function c(t,e){return s||(s=document.createElement("a")),s.href=e,t===s.href}function a(t,e){return t!=t?e==e:t!==e}const d="undefined"!=typeof window;let l=d?()=>window.performance.now():()=>Date.now(),u=d?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 p(t,e){t.appendChild(e)}function m(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function g(t){const e=v("style");return function(t,e){p(t.head||t,e)}(m(t),e),e.sheet}function b(t,e,n){t.insertBefore(e,n||null)}function $(t){t.parentNode.removeChild(t)}function v(t){return document.createElement(t)}function y(t){return document.createTextNode(t)}function w(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 x(t,e,n,o){null===n?t.style.removeProperty(e):t.style.setProperty(e,n,o?"important":"")}function S(t){const e={};for(const n of t)e[n.name]=n.value;return e}const C=new Map;let A,_=0;function T(t,e,n,o,r,i,s,c=0){const a=16.666/o;let d="{\n";for(let t=0;t<=1;t+=a){const o=e+(n-e)*i(t);d+=100*t+`%{${s(o,1-o)}}\n`}const l=d+`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}(l)}_${c}`,f=m(t),{stylesheet:h,rules:p}=C.get(f)||function(t,e){const n={stylesheet:g(e),rules:{}};return C.set(t,n),n}(f,t);p[u]||(p[u]=!0,h.insertRule(`@keyframes ${u} ${l}`,h.cssRules.length));const b=t.style.animation||"";return t.style.animation=`${b?`${b}, `:""}${u} ${o}ms linear ${r}ms 1 both`,_+=1,u}function k(t,e){const n=(t.style.animation||"").split(", "),o=n.filter(e?t=>t.indexOf(e)<0:t=>-1===t.indexOf("__svelte")),r=n.length-o.length;r&&(t.style.animation=o.join(", "),_-=r,_||u((()=>{_||(C.forEach((t=>{const{stylesheet:e}=t;let n=e.cssRules.length;for(;n--;)e.deleteRule(n);t.rules={}})),C.clear())})))}function z(t){A=t}function O(){if(!A)throw new Error("Function called outside component initialization");return A}const N=[],R=[],D=[],P=[],F=Promise.resolve();let L=!1;function M(t){D.push(t)}const H=new Set;let B,I=0;function j(){const t=A;do{for(;I<N.length;){const t=N[I];I++,z(t),U(t.$$)}for(z(null),N.length=0,I=0;R.length;)R.pop()();for(let t=0;t<D.length;t+=1){const e=D[t];H.has(e)||(H.add(e),e())}D.length=0}while(N.length);for(;P.length;)P.pop()();L=!1,H.clear(),z(t)}function U(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(M)}}function X(t,e,n){t.dispatchEvent(function(t,e,{bubbles:n=!1,cancelable:o=!1}={}){const r=document.createEvent("CustomEvent");return r.initCustomEvent(t,n,o,e),r}(`${e?"intro":"outro"}${n}`))}const W=new Set;let q;function V(t,e){t&&t.i&&(W.delete(t),t.i(e))}function Y(t,e,n,o){if(t&&t.o){if(W.has(t))return;W.add(t),q.c.push((()=>{W.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}const K={duration:0};function Z(n,o,s,c){let a=o(n,s),d=c?0:1,p=null,m=null,g=null;function b(){g&&k(n,g)}function $(t,e){const n=t.b-d;return e*=Math.abs(n),{a:d,b:t.b,d:n,duration:e,start:t.start,end:t.start+e,group:t.group}}function v(o){const{delay:i=0,duration:s=300,easing:c=e,tick:v=t,css:y}=a||K,w={start:l()+i,b:o};o||(w.group=q,q.r+=1),p||m?m=w:(y&&(b(),g=T(n,d,o,s,i,c,y)),o&&v(0,1),p=$(w,s),M((()=>X(n,o,"start"))),function(t){let e;0===f.size&&u(h),new Promise((n=>{f.add(e={c:t,f:n})}))}((t=>{if(m&&t>m.start&&(p=$(m,s),m=null,X(n,p.b,"start"),y&&(b(),g=T(n,d,p.b,p.duration,0,c,a.css))),p)if(t>=p.end)v(d=p.b,1-d),X(n,p.b,"end"),m||(p.b?b():--p.group.r||r(p.group.c)),p=null;else if(t>=p.start){const e=t-p.start;d=p.a+p.d*c(e/p.duration),v(d,1-d)}return!(!p&&!m)})))}return{run(t){i(a)?(B||(B=Promise.resolve(),B.then((()=>{B=null}))),B).then((()=>{a=a(),v(t)})):v(t)},end(){b(),p=m=null}}}const G="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function J(t,e){-1===t.$$.dirty[0]&&(N.push(t),L||(L=!0,F.then(j)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function Q(e,s,c,a,d,l,u,f=[-1]){const h=A;z(e);const p=e.$$={fragment:null,ctx:null,props:l,update:t,not_equal:d,bound:o(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(s.context||(h?h.$$.context:[])),callbacks:o(),dirty:f,skip_bound:!1,root:s.target||h.$$.root};u&&u(p.root);let m=!1;if(p.ctx=c?c(e,s.props||{},((t,n,...o)=>{const r=o.length?o[0]:n;return p.ctx&&d(p.ctx[t],p.ctx[t]=r)&&(!p.skip_bound&&p.bound[t]&&p.bound[t](r),m&&J(e,t)),n})):[],p.update(),m=!0,r(p.before_update),p.fragment=!!a&&a(p.ctx),s.target){if(s.hydrate){const t=function(t){return Array.from(t.childNodes)}(s.target);p.fragment&&p.fragment.l(t),t.forEach($)}else p.fragment&&p.fragment.c();s.intro&&V(e.$$.fragment),function(t,e,o,s){const{fragment:c,on_mount:a,on_destroy:d,after_update:l}=t.$$;c&&c.m(e,o),s||M((()=>{const e=a.map(n).filter(i);d?d.push(...e):r(e),t.$$.on_mount=[]})),l.forEach(M)}(e,s.target,s.anchor,s.customElement),j()}z(h)}let tt;function et(t,{delay:n=0,duration:o=400,easing:r=e}={}){const i=+getComputedStyle(t).opacity;return{delay:n,duration:o,easing:r,css:t=>"opacity: "+t*i}}var nt,ot,rt,it,st;"function"==typeof HTMLElement&&(tt=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(n).filter(i);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)}}),function(t){t.NoAudioConsent="NoAudioConsent",t.NoBrowserSupport="NoBrowserSupport",t.Stopped="Stopped",t.Starting="Starting",t.Started="Started"}(nt||(nt={})),function(t){t.Started="started",t.Stopped="stopped",t.SegmentEnd="segment_end",t.Transcript="transcript",t.Entity="entity",t.Intent="intent",t.TentativeTranscript="tentative_transcript",t.TentativeEntities="tentative_entities",t.TentativeIntent="tentative_intent"}(ot||(ot={})),function(t){t.Opened="WEBSOCKET_OPEN",t.Closed="WEBSOCKET_CLOSED",t.AudioProcessorReady="SOURCE_SAMPLE_RATE_SET_SUCCESS",t.VadSignalHigh="VadSignalHigh",t.VadSignalLow="VadSignalLow"}(rt||(rt={})),function(t){t.connect="connect",t.initAudioProcessor="initAudioProcessor",t.adjustAudioProcessor="adjustAudioProcessor",t.SET_SHARED_ARRAY_BUFFERS="SET_SHARED_ARRAY_BUFFERS",t.CLOSE="CLOSE",t.START_CONTEXT="START_CONTEXT",t.SWITCH_CONTEXT="SWITCH_CONTEXT",t.STOP_CONTEXT="STOP_CONTEXT",t.AUDIO="AUDIO",t.startStream="startStream",t.stopStream="stopStream",t.setContextOptions="setContextOptions"}(it||(it={})),function(t){t[t.Failed=0]="Failed",t[t.Disconnected=1]="Disconnected",t[t.Connected=2]="Connected",t[t.Active=3]="Active"}(st||(st={})),new Map([[st.Failed,"Failed"],[st.Disconnected,"Disconnected"],[st.Connected,"Connected"],[st.Active,"Active"]]);for(var ct=[],at=0;at<256;++at)ct.push((at+256).toString(16).substr(1));var dt,lt,ut,ft,ht,pt,mt,gt,bt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},$t={exports:{}};
/*! http://mths.be/base64 v0.1.0 by @mathias | MIT license */
dt=$t,lt=$t.exports,function(t){var e=lt,n=dt&&dt.exports==e&&dt,o="object"==typeof bt&&bt;o.global!==o&&o.window!==o||(t=o);var r=function(t){this.message=t};(r.prototype=new Error).name="InvalidCharacterError";var i=function(t){throw new r(t)},s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=/[\t\n\f\r ]/g,a={encode:function(t){t=String(t),/[^\0-\xFF]/.test(t)&&i("The string to be encoded contains characters outside of the Latin1 range.");for(var e,n,o,r,c=t.length%3,a="",d=-1,l=t.length-c;++d<l;)e=t.charCodeAt(d)<<16,n=t.charCodeAt(++d)<<8,o=t.charCodeAt(++d),a+=s.charAt((r=e+n+o)>>18&63)+s.charAt(r>>12&63)+s.charAt(r>>6&63)+s.charAt(63&r);return 2==c?(e=t.charCodeAt(d)<<8,n=t.charCodeAt(++d),a+=s.charAt((r=e+n)>>10)+s.charAt(r>>4&63)+s.charAt(r<<2&63)+"="):1==c&&(r=t.charCodeAt(d),a+=s.charAt(r>>2)+s.charAt(r<<4&63)+"=="),a},decode:function(t){var e=(t=String(t).replace(c,"")).length;e%4==0&&(e=(t=t.replace(/==?$/,"")).length),(e%4==1||/[^+a-zA-Z0-9/]/.test(t))&&i("Invalid character: the string to be decoded is not correctly encoded.");for(var n,o,r=0,a="",d=-1;++d<e;)o=s.indexOf(t.charAt(d)),n=r%4?64*n+o:o,r++%4&&(a+=String.fromCharCode(255&n>>(-2*r&6)));return a},version:"0.1.0"};if(e&&!e.nodeType)if(n)n.exports=a;else for(var d in a)a.hasOwnProperty(d)&&(e[d]=a[d]);else t.base64=a}(bt),function(t){t.SpeechlyFirstConnect="SpeechlyFirstConnect"}(ut||(ut={})),function(t){t.speechlypoweron="speechlypoweron",t.holdstart="holdstart",t.holdend="holdend",t.speechstate="speechstate",t.audiosourcestate="audiosourcestate",t.speechsegment="speechsegment",t.speechhandled="speechhandled",t.showhint="showhint",t.transcriptdrawerhint="hint",t.speechlyintroready="speechlyintroready",t.speechlyintroclosed="speechlyintroclosed",t.startcontext="startcontext",t.stopcontext="stopcontext",t.requeststartmicrophone="requeststartmicrophone"}(ft||(ft={})),function(t){t.Mic="mic",t.MicActive="micactive",t.Error="error",t.Denied="denied"}(ht||(ht={})),function(t){t.Hold="hold",t.Click="click",t.Noninteractive="noninteractive"}(pt||(pt={})),function(t){t.None="none",t.Connecting="connecting",t.Busy="busy"}(mt||(mt={})),function(t){t.None="none",t.Whirl="whirl"}(gt||(gt={})),st.Disconnected,st.Connected,st.Active,st.Failed,nt.NoBrowserSupport,nt.NoAudioConsent;const{window:vt}=G;function yt(t){let e,n,o,r,i,s,a,d,l,u,f,h;return{c(){e=v("modalcontent"),n=v("animation"),o=v("button"),r=y(" "),i=v("video"),s=v("source"),d=y("\n Your browser does not support the video tag."),E(o,"class","close"),c(s.src,a=t[0])||E(s,"src",a),E(s,"type","video/mp4"),E(i,"width","100%"),E(i,"height","auto"),i.autoplay=!0,i.muted=!0,i.loop=!0,E(e,"class",t[2])},m(c,a){b(c,e,a),p(e,n),p(n,o),p(n,r),p(n,i),p(i,s),p(i,d),u=!0,f||(h=w(o,"click",t[5]),f=!0)},p(t,n){(!u||1&n&&!c(s.src,a=t[0]))&&E(s,"src",a),(!u||4&n)&&E(e,"class",t[2])},i(n){u||(M((()=>{l||(l=Z(e,t[4],{},!0)),l.run(1)})),u=!0)},o(n){l||(l=Z(e,t[4],{},!1)),l.run(0),u=!1},d(t){t&&$(e),t&&l&&l.end(),f=!1,h()}}}function wt(e){let n,o,i,s,c=e[3]&&yt(e);return{c(){n=v("modal"),c&&c.c(),this.c=t,x(n,"--remsize",e[1])},m(t,r){b(t,n,r),c&&c.m(n,null),o=!0,i||(s=w(vt,"keydown",e[6]),i=!0)},p(t,[e]){t[3]?c?(c.p(t,e),8&e&&V(c,1)):(c=yt(t),c.c(),V(c,1),c.m(n,null)):c&&(q={r:0,c:[],p:q},Y(c,1,1,(()=>{c=null})),q.r||r(q.c),q=q.p),(!o||2&e)&&x(n,"--remsize",t[1])},i(t){o||(V(c),o=!0)},o(t){Y(c),o=!1},d(t){t&&$(n),c&&c.d(),i=!1,s()}}}function Et(t,e,n){let o,{video:r=""}=e,{hide:i}=e,{remsize:s="1.0rem"}=e,{position:c="fixed"}=e;const a=(()=>{const t=O();return(e,n)=>{t.dispatchEvent(new CustomEvent(e,{detail:n,composed:!0}))}})(),d=(l=et,function(t,e){if(!t.hasOwnProperty("ownerDocument")){Object.defineProperty(t,"ownerDocument",{get:function(){return t.parentElement}});let e=t;for(;e.parentElement;)e=e.parentElement;t.parentElement.head=e}return l(t,e)});var l;let u=!1;var f;f=()=>{n(8,u=!0)},O().$$.on_mount.push(f);const h=()=>{n(3,o=!1),a("speechlyvideoclosed"),window.postMessage({type:"speechlyvideoclosed"},"*")};return t.$$set=t=>{"video"in t&&n(0,r=t.video),"hide"in t&&n(7,i=t.hide),"remsize"in t&&n(1,s=t.remsize),"position"in t&&n(2,c=t.position)},t.$$.update=()=>{384&t.$$.dirty&&n(3,o=u&&"false"===i)},[r,s,c,o,d,h,t=>{u&&"Escape"===t.key&&(t.preventDefault(),h())},i,u]}class xt extends tt{constructor(t){super(),this.shadowRoot.innerHTML="<style>modal{font-size:var(--remsize);height:100%}modalcontent{z-index:2001;pointer-events:none}modalcontent.fixed{position:fixed;top:0;left:0;right:0;bottom:0;overflow-x:hidden;overflow-y:auto}modalcontent.absolute{position:absolute;top:0;left:0;right:0;height:100vh}animation{position:absolute;box-sizing:border-box;width:300px;margin:1rem;top:0;right:0;border-radius:8px;pointer-events:auto}video{box-sizing:border-box;width:100%;border-radius:0.5rem;overflow:hidden;border:1px solid #0002}.close{--button-size:1.5rem;display:block;box-sizing:border-box;position:absolute;z-index:1000;top:0.25rem;right:0.25rem;margin:0;padding:0;width:var(--button-size);height:var(--button-size);border:0;color:black;border-radius:1.5rem;background:transparent;box-shadow:0 0 0 1px transparent;transition:transform 0.2s cubic-bezier(0.25, 0.1, 0.25, 1),\n background 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);-webkit-appearance:none}.close:before,.close:after{content:'';display:block;box-sizing:border-box;position:absolute;top:50%;width:calc(var(--button-size) - 0.5rem);height:1px;background:#728195;transform-origin:center;transition:height 0.2s cubic-bezier(0.25, 0.1, 0.25, 1),\n background 0.2s cubic-bezier(0.25, 0.1, 0.25, 1)}.close:before{-webkit-transform:translate(0, -50%) rotate(45deg);-moz-transform:translate(0, -50%) rotate(45deg);transform:translate(0, -50%) rotate(45deg);left:0.25rem}.close:after{-webkit-transform:translate(0, -50%) rotate(-45deg);-moz-transform:translate(0, -50%) rotate(-45deg);transform:translate(0, -50%) rotate(-45deg);left:0.25rem}.close:hover{background:#ffffff}.close:hover:before,.close:hover:after{height:2px;background:black}.close:focus{border-color:#3399ff;box-shadow:0 0 0 2px #3399ff}.close:active{transform:scale(0.9)}.close:hover,.close:focus,.close:active{outline:none}</style>",Q(this,{target:this.shadowRoot,props:S(this.attributes),customElement:!0},Et,wt,a,{video:0,hide:7,remsize:1,position:2},null),t&&(t.target&&b(t.target,this,t.anchor),t.props&&(this.$set(t.props),j()))}static get observedAttributes(){return["video","hide","remsize","position"]}get video(){return this.$$.ctx[0]}set video(t){this.$$set({video:t}),j()}get hide(){return this.$$.ctx[7]}set hide(t){this.$$set({hide:t}),j()}get remsize(){return this.$$.ctx[1]}set remsize(t){this.$$set({remsize:t}),j()}get position(){return this.$$.ctx[2]}set position(t){this.$$set({position:t}),j()}}customElements.get("video-guide")?console.warn("Skipping re-defining customElement video-guide"):customElements.define("video-guide",xt)}));
//# sourceMappingURL=video-guide.js.map
{
"name": "@speechly/browser-ui",
"description": "Ready-made UI components to build a reactive voice interface to a web site or app. Uses Speechly's real-time cloud API for speech-to-text and NLU.",
"version": "5.3.2",
"version": "6.0.0",
"scripts": {
"build": "rimraf core && rollup -c --silent && mv core/types/src/* core && rimraf core/types",
"build:watch": "rollup -c --silent && mv core/types/src/* core",
"build": "rimraf core && rollup -c --silent",
"build:watch": "rollup -c --silent",
"dev": "rollup -c -w",

@@ -34,3 +34,3 @@ "start": "sirv core --no-clear --host",

"dependencies": {
"@speechly/browser-client": "1.5.0"
"@speechly/browser-client": "^2.4.0"
},

@@ -40,2 +40,4 @@ "files": [

],
"main": "./core/index.js",
"types": "./core/types/index.d.ts",
"publishConfig": {

@@ -42,0 +44,0 @@ "access": "public"

@@ -35,4 +35,3 @@ <div align="center" markdown="1">

- [Transcript Drawer](https://docs.speechly.com/ui-components/big-transcript/) is an alternative to Big Transcript that slides down from the top of the viewport. It displays usage hints along with the real-time speech-to-text transcript and feedback.
- Intro Popup (optional) provides a customizable introduction to voice features, guides the user through browser mic permission setup and helps recover from common problems.
- [Error Panel](https://docs.speechly.com/ui-components/error-panel/) is an alternative to Intro Popup. It helps recover from common problems.
- [Intro Popup](https://docs.speechly.com/ui-components/intro-popup/) provides a customizable introduction to voice features, guides the user through browser mic permission setup and helps recover from common problems.

@@ -39,0 +38,0 @@ ## Documentation

import type { IAppearance } from "./types";
import { ClientState } from "../node_modules/@speechly/browser-client/src/speechly/types";
import { DecoderState } from "@speechly/browser-client";
import { AudioSourceState } from "@speechly/browser-client";
// Copy of ClientState. If used directly from browser-client, rollup includes the whole of
// browser-client in big-transcript, resulting in a 90kb filesize instead of ~20kb
export { ClientState }
export { DecoderState, AudioSourceState }

@@ -17,2 +18,3 @@ export const enum LocalStorageKeys {

speechstate = "speechstate",
audiosourcestate = "audiosourcestate",
speechsegment = "speechsegment",

@@ -24,2 +26,5 @@ speechhandled = "speechhandled",

speechlyintroclosed = "speechlyintroclosed",
startcontext = "startcontext",
stopcontext = "stopcontext",
requeststartmicrophone = "requeststartmicrophone"
}

@@ -52,14 +57,8 @@

export const clientStateToAppearance: {[state: string]: IAppearance} = {
[ClientState.Disconnected]: { icon: Icon.Mic, behaviour: Behaviour.Click, effect: Effect.None, triggerFx: TriggerFx.Whirl},
[ClientState.Disconnecting]: { icon: Icon.Mic, behaviour: Behaviour.Noninteractive, effect: Effect.Connecting},
[ClientState.Connecting]: { icon: Icon.Mic, behaviour: Behaviour.Noninteractive, effect: Effect.Connecting},
[ClientState.Preinitialized]: { icon: Icon.Mic, behaviour: Behaviour.Hold, effect: Effect.None, triggerFx: TriggerFx.Whirl},
[ClientState.Initializing]: { icon: Icon.Mic, behaviour: Behaviour.Noninteractive, effect: Effect.Connecting},
[ClientState.Connected]: { icon: Icon.Mic, behaviour: Behaviour.Hold, effect: Effect.None, triggerFx: TriggerFx.Whirl},
[ClientState.Starting]: { icon: Icon.Mic, behaviour: Behaviour.Hold, effect: Effect.Connecting},
[ClientState.Recording]: { icon: Icon.MicActive, behaviour: Behaviour.Hold, effect: Effect.None},
[ClientState.Stopping]: { icon: Icon.Mic, behaviour: Behaviour.Noninteractive, effect: Effect.Busy},
[ClientState.Failed]: { icon: Icon.Error, behaviour: Behaviour.Click, effect: Effect.None},
[ClientState.NoBrowserSupport]: { icon: Icon.Error, behaviour: Behaviour.Click, effect: Effect.None},
[ClientState.NoAudioConsent]: { icon: Icon.Denied, behaviour: Behaviour.Click, effect: Effect.None},
[DecoderState.Disconnected]: { icon: Icon.Mic, behaviour: Behaviour.Click, effect: Effect.None, triggerFx: TriggerFx.Whirl},
[DecoderState.Connected]: { icon: Icon.Mic, behaviour: Behaviour.Hold, effect: Effect.None, triggerFx: TriggerFx.Whirl},
[DecoderState.Active]: { icon: Icon.MicActive, behaviour: Behaviour.Hold, effect: Effect.None},
[DecoderState.Failed]: { icon: Icon.Error, behaviour: Behaviour.Click, effect: Effect.None},
[AudioSourceState.NoBrowserSupport]: { icon: Icon.Error, behaviour: Behaviour.Click, effect: Effect.None},
[AudioSourceState.NoAudioConsent]: { icon: Icon.Denied, behaviour: Behaviour.Click, effect: Effect.None},
}
import type { Behaviour, Effect, Icon, TriggerFx } from "./constants"
export type { Segment, Intent, Word, Entity } from "../node_modules/@speechly/browser-client/src/speechly/types";
export type { Segment, Intent, Word, Entity } from "@speechly/browser-client";

@@ -5,0 +5,0 @@ export type ITaggedWord = {

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 not supported yet

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 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

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 not supported yet

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 not supported yet

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