@speechly/browser-ui
Advanced tools
Comparing version 5.1.0-beta.6 to 5.1.0
export {}; | ||
//# sourceMappingURL=big-transcript.d.ts.map |
@@ -1,3 +0,2 @@ | ||
!function(t){"function"==typeof define&&define.amd?define(t):t()}((function(){"use strict";function t(){}const n=t=>t;function e(t,n){for(const e in n)t[e]=n[e];return t}function r(t){return t()}function o(){return Object.create(null)}function i(t){t.forEach(r)}function a(t){return"function"==typeof t}function s(t,n){return t!=t?n==n:t!==n||t&&"object"==typeof t||"function"==typeof t}function c(t,n){return t!=t?n==n:t!==n}function u(t){return 0===Object.keys(t).length}function l(n,e,r){n.$$.on_destroy.push(function(n,...e){if(null==n)return t;const r=n.subscribe(...e);return r.unsubscribe?()=>r.unsubscribe():r}(e,r))}const f="undefined"!=typeof window;let d=f?()=>window.performance.now():()=>Date.now(),h=f?t=>requestAnimationFrame(t):t;const g=new Set;function p(t){g.forEach((n=>{n.c(t)||(g.delete(n),n.f())})),0!==g.size&&h(p)}function m(t){let n;return 0===g.size&&h(p),{promise:new Promise((e=>{g.add(n={c:t,f:e})})),abort(){g.delete(n)}}}function v(t,n){t.appendChild(n)}function y(t){if(!t)return document;const n=t.getRootNode?t.getRootNode():t.ownerDocument;return n&&n.host?n:t.ownerDocument}function b(t,n){v(t.head||t,n)}function $(t,n,e){t.insertBefore(n,e||null)}function w(t){t.parentNode.removeChild(t)}function S(t){return document.createElement(t)}function C(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function x(t){return document.createTextNode(t)}function M(){return x(" ")}function T(t,n,e){null==e?t.removeAttribute(n):t.getAttribute(n)!==e&&t.setAttribute(n,e)}function A(t,n,e,r){t.style.setProperty(n,e,r?"important":"")}function E(t,n,e){t.classList[e?"add":"remove"](n)}function k(t){const n={};for(const e of t)n[e.name]=e.value;return n}const I=new Set;let P,N=0;function B(t,n,e,r,o,i,a,s=0){const c=16.666/r;let u="{\n";for(let t=0;t<=1;t+=c){const r=n+(e-n)*i(t);u+=100*t+`%{${a(r,1-r)}}\n`}const l=u+`100% {${a(e,1-e)}}\n}`,f=`__svelte_${function(t){let n=5381,e=t.length;for(;e--;)n=(n<<5)-n^t.charCodeAt(e);return n>>>0}(l)}_${s}`,d=y(t);I.add(d);const h=d.__svelte_stylesheet||(d.__svelte_stylesheet=function(t){const n=S("style");return b(y(t),n),n}(t).sheet),g=d.__svelte_rules||(d.__svelte_rules={});g[f]||(g[f]=!0,h.insertRule(`@keyframes ${f} ${l}`,h.cssRules.length));const p=t.style.animation||"";return t.style.animation=`${p?`${p}, `:""}${f} ${r}ms linear ${o}ms 1 both`,N+=1,f}function R(t,n){const e=(t.style.animation||"").split(", "),r=e.filter(n?t=>t.indexOf(n)<0:t=>-1===t.indexOf("__svelte")),o=e.length-r.length;o&&(t.style.animation=r.join(", "),N-=o,N||h((()=>{N||(I.forEach((t=>{const n=t.__svelte_stylesheet;let e=n.cssRules.length;for(;e--;)n.deleteRule(e);t.__svelte_rules={}})),I.clear())})))}function _(t){P=t}function F(){if(!P)throw new Error("Function called outside component initialization");return P}const D=[],G=[],O=[],L=[],z=Promise.resolve();let j=!1;function K(t){O.push(t)}let U=!1;const H=new Set;function V(){if(!U){U=!0;do{for(let t=0;t<D.length;t+=1){const n=D[t];_(n),W(n.$$)}for(_(null),D.length=0;G.length;)G.pop()();for(let t=0;t<O.length;t+=1){const n=O[t];H.has(n)||(H.add(n),n())}O.length=0}while(D.length);for(;L.length;)L.pop()();j=!1,U=!1,H.clear()}}function W(t){if(null!==t.fragment){t.update(),i(t.before_update);const n=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,n),t.after_update.forEach(K)}}let Z;function J(t,n,e){t.dispatchEvent(function(t,n,e=!1){const r=document.createEvent("CustomEvent");return r.initCustomEvent(t,e,!1,n),r}(`${n?"intro":"outro"}${e}`))}const Y=new Set;function q(t,n){t&&t.i&&(Y.delete(t),t.i(n))}const Q={duration:0};function X(e,r,o){let i,s,c=r(e,o),u=!1,l=0;function f(){i&&R(e,i)}function h(){const{delay:r=0,duration:o=300,easing:a=n,tick:h=t,css:g}=c||Q;g&&(i=B(e,0,1,o,r,a,g,l++)),h(0,1);const p=d()+r,v=p+o;s&&s.abort(),u=!0,K((()=>J(e,!0,"start"))),s=m((t=>{if(u){if(t>=v)return h(1,0),J(e,!0,"end"),f(),u=!1;if(t>=p){const n=a((t-p)/o);h(n,1-n)}}return u}))}let g=!1;return{start(){g||(g=!0,R(e),a(c)?(c=c(),(Z||(Z=Promise.resolve(),Z.then((()=>{Z=null}))),Z).then(h)):h())},invalidate(){g=!1},end(){u&&(f(),u=!1)}}}const tt="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function nt(t,n,e,o){const{fragment:s,on_mount:c,on_destroy:u,after_update:l}=t.$$;s&&s.m(n,e),o||K((()=>{const n=c.map(r).filter(a);u?u.push(...n):i(n),t.$$.on_mount=[]})),l.forEach(K)}function et(t,n){const e=t.$$;null!==e.fragment&&(i(e.on_destroy),e.fragment&&e.fragment.d(n),e.on_destroy=e.fragment=null,e.ctx=[])}function rt(t,n){-1===t.$$.dirty[0]&&(D.push(t),j||(j=!0,z.then(V)),t.$$.dirty.fill(0)),t.$$.dirty[n/31|0]|=1<<n%31}function ot(n,e,r,a,s,c,u,l=[-1]){const f=P;_(n);const d=n.$$={fragment:null,ctx:null,props:c,update:t,not_equal:s,bound:o(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(f?f.$$.context:[])),callbacks:o(),dirty:l,skip_bound:!1,root:e.target||f.$$.root};u&&u(d.root);let h=!1;if(d.ctx=r?r(n,e.props||{},((t,e,...r)=>{const o=r.length?r[0]:e;return d.ctx&&s(d.ctx[t],d.ctx[t]=o)&&(!d.skip_bound&&d.bound[t]&&d.bound[t](o),h&&rt(n,t)),e})):[],d.update(),h=!0,i(d.before_update),d.fragment=!!a&&a(d.ctx),e.target){if(e.hydrate){const t=function(t){return Array.from(t.childNodes)}(e.target);d.fragment&&d.fragment.l(t),t.forEach(w)}else d.fragment&&d.fragment.c();e.intro&&q(n.$$.fragment),nt(n,e.target,e.anchor,e.customElement),V()}_(f)}let it;"function"==typeof HTMLElement&&(it=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(r).filter(a);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,n,e){this[t]=e}disconnectedCallback(){i(this.$$.on_disconnect)}$destroy(){et(this,1),this.$destroy=t}$on(t,n){const e=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return e.push(n),()=>{const t=e.indexOf(n);-1!==t&&e.splice(t,1)}}$set(t){this.$$set&&!u(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});var at;!function(t){t[t.Failed=0]="Failed",t[t.NoBrowserSupport=1]="NoBrowserSupport",t[t.NoAudioConsent=2]="NoAudioConsent",t[t.Disconnected=3]="Disconnected",t[t.Disconnecting=4]="Disconnecting",t[t.Connecting=5]="Connecting",t[t.Connected=6]="Connected",t[t.Starting=7]="Starting",t[t.Stopping=8]="Stopping",t[t.Recording=9]="Recording"}(at||(at={})),new Map([[at.Failed,"Failed"],[at.NoBrowserSupport,"NoBrowserSupport"],[at.NoAudioConsent,"NoAudioConsent"],[at.Disconnecting,"Disconnecting"],[at.Disconnected,"Disconnected"],[at.Connecting,"Connecting"],[at.Connected,"Connected"],[at.Starting,"Starting"],[at.Stopping,"Stopping"],[at.Recording,"Recording"]]);var st="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var ct,ut,lt=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},ft=lt;function dt(t,n,e,r){return t.call(r,n[e],e,n)}var ht=function(t,n,e){var r,o=0;for(r in null==ct&&function(){for(var t in ut=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],ct=!0,{toString:null})ct=!1}(),t)if(!1===dt(n,t,r,e))break;if(ct)for(var i=t.constructor,a=!!i&&t===i.prototype;(r=ut[o++])&&("constructor"===r&&(a||!ft(t,r))||t[r]===Object.prototype[r]||!1!==dt(n,t,r,e)););},gt=ht;var pt=function(t){var n=[];return gt(t,(function(t,e){"function"==typeof t&&n.push(e)})),n.sort()};var mt=function(t,n,e){var r=t.length;n=null==n?0:n<0?Math.max(r+n,0):Math.min(n,r),e=null==e?r:e<0?Math.max(r+e,0):Math.min(e,r);for(var o=[];n<e;)o.push(t[n++]);return o},vt=mt;var yt=function(t,n,e){var r=vt(arguments,2);return function(){return t.apply(n,r.concat(vt(arguments)))}};var bt=function(t,n,e){if(null!=t)for(var r=-1,o=t.length;++r<o&&!1!==n.call(e,t[r],r,t););},$t=pt,wt=yt,St=bt,Ct=mt;var xt=function(t,n){var e=arguments.length>1?Ct(arguments,1):$t(t);St(e,(function(n){t[n]=wt(t[n],t)}))},Mt=lt,Tt=ht;var At=function(t,n,e){Tt(t,(function(r,o){if(Mt(t,o))return n.call(e,t[o],o,t)}))};var Et=function(t){return t};var kt=function(t){return function(n){return n[t]}},It=/^\[object (.*)\]$/,Pt=Object.prototype.toString;var Nt=function(t){return null===t?"Null":undefined===t?"Undefined":It.exec(Pt.call(t))[1]},Bt=Nt;var Rt=function(t,n){return Bt(t)===n},_t=Rt,Ft=Array.isArray||function(t){return _t(t,"Array")},Dt=At,Gt=Ft;function Ot(t,n){for(var e=-1,r=t.length;++e<r;)if(Lt(t[e],n))return!0;return!1}function Lt(t,n){return t&&"object"==typeof t?Gt(t)&&Gt(n)?function(t,n){for(var e=-1,r=n.length;++e<r;)if(!Ot(t,n[e]))return!1;return!0}(t,n):function(t,n){var e=!0;return Dt(n,(function(n,r){if(!Lt(t[r],n))return e=!1})),e}(t,n):t===n}var zt=Lt,jt=Et,Kt=kt,Ut=zt;var Ht=function(t,n){if(null==t)return jt;switch(typeof t){case"function":return void 0!==n?function(e,r,o){return t.call(n,e,r,o)}:t;case"object":return function(n){return Ut(n,t)};case"string":case"number":return Kt(t)}},Vt=At,Wt=Ht;var Zt=function(t,n,e){n=Wt(n,e);var r=!1;return Vt(t,(function(e,o){if(n(e,o,t))return r=!0,!1})),r},Jt=Zt;var Yt=function(t,n){return Jt(t,(function(t){return t===n}))};var qt=function(t){return!!t&&"object"==typeof t&&t.constructor===Object},Qt=At,Xt=qt;var tn=function t(n,e){for(var r,o=0,i=arguments.length;++o<i;)(r=arguments[o])&&Qt(r,(function(e,r){var o=n[r];null==o?n[r]=e:Xt(o)&&Xt(e)&&t(o,e)}));return n},nn=At,en=qt;function rn(t,n){for(var e,r=0,o=arguments.length;++r<o;)(e=arguments[r])&&nn(e,on,t);return t}function on(t,n){var e=this[n];en(t)&&en(e)?rn(e,t):this[n]=t}var an=rn,sn=At,cn=Ht;var un=function(t,n,e){n=cn(n,e);var r=!0;return sn(t,(function(e,o){if(!n(e,o,t))return r=!1,!1})),r},ln=Rt;var fn=function(t){return ln(t,"Object")};var dn=lt,hn=un,gn=fn,pn=function(t,n){return t===n?0!==t||1/t==1/n:t!=t&&n!=n};function mn(t,n){return dn(this,n)}var vn=function(t,n,e){return e=e||pn,gn(t)&&gn(n)?hn(t,function(t){return function(n,e){return dn(this,e)&&t(n,this[e])}}(e),n)&&hn(n,mn,t):e(t,n)},yn=bt,bn=mt,$n=At;var wn=function(t,n){return yn(bn(arguments,1),(function(n){$n(n,(function(n,e){null==t[e]&&(t[e]=n)}))})),t},Sn=At,Cn=Ht;var xn=function(t,n,e){n=Cn(n,e);var r={};return Sn(t,(function(t,e,o){n(t,e,o)&&(r[e]=t)})),r},Mn=Zt,Tn=Ht;var An=function(t,n,e){var r;return n=Tn(n,e),Mn(t,(function(t,e,o){if(n(t,e,o))return r=t,!0})),r},En=At,kn=qt;function In(t,n,e,r){return En(t,(function(t,o){var i=e?e+"."+o:o;0!==r&&kn(t)?In(t,n,i,r-1):n[i]=t})),n}var Pn=function(t,n){return null==t?{}:In(t,{},"",n=null==n?-1:n)};var Nn=function(t,n){for(var e=n.split("."),r=e.pop();n=e.shift();)if(null==(t=t[n]))return;return t[r]},Bn=Nn;var Rn=function(t,n){return undefined!==Bn(t,n)},_n=At,Fn=Object.keys||function(t){var n=[];return _n(t,(function(t,e){n.push(e)})),n},Dn=At,Gn=Ht;var On=function(t,n,e){n=Gn(n,e);var r={};return Dn(t,(function(t,e,o){r[e]=n(t,e,o)})),r},Ln=At;var zn=function(t,n){var e=!0;return Ln(n,(function(n,r){if(t[r]!==n)return e=!1})),e},jn=Ht;var Kn=function(t,n,e){if(null!=t&&t.length){if(t.length&&!n)return Math.max.apply(Math,t);n=jn(n,e);for(var r,o,i,a=-1/0,s=-1,c=t.length;++s<c;)(i=n(o=t[s],s,t))>a&&(a=i,r=o);return r}return 1/0},Un=At;var Hn=function(t){var n=[];return Un(t,(function(t,e){n.push(t)})),n},Vn=Kn,Wn=Hn;var Zn=At;function Jn(t,n){this[n]=t}var Yn=function(t,n){for(var e,r=0,o=arguments.length;++r<o;)null!=(e=arguments[r])&&Zn(e,Jn,t);return t},qn=Nt,Qn=qt,Xn=Yn;var te=function(t){switch(qn(t)){case"Object":return Qn(r=t)?Xn({},r):r;case"Array":return t.slice();case"RegExp":return e="",e+=(n=t).multiline?"m":"",e+=n.global?"g":"",e+=n.ignoreCase?"i":"",new RegExp(n.source,e);case"Date":return new Date(+t);default:return t}var n,e,r},ne=At,ee=Nt,re=qt;function oe(t,n){switch(ee(t)){case"Object":return function(t,n){if(re(t)){var e={};return ne(t,(function(t,e){this[e]=oe(t,n)}),e),e}return n?n(t):t}(t,n);case"Array":return function(t,n){var e=[],r=-1,o=t.length;for(;++r<o;)e[r]=oe(t[r],n);return e}(t,n);default:return te(t)}}var ie=lt,ae=oe,se=fn;var ce=function t(){var n,e,r,o,i=1;for(o=ae(arguments[0]);r=arguments[i++];)for(n in r)ie(r,n)&&(e=r[n],se(e)&&se(o[n])?o[n]=t(o[n],e):o[n]=ae(e));return o},ue=Ht;var le=function(t,n,e){if(null!=t&&t.length){if(t.length&&!n)return Math.min.apply(Math,t);n=ue(n,e);for(var r,o,i,a=1/0,s=-1,c=t.length;++s<c;)(i=n(o=t[s],s,t))<a&&(a=i,r=o);return r}return-1/0},fe=le,de=Hn;var he=bt;var ge=function(t,n){return n?(he(n.split("."),(function(n){t[n]||(t[n]={}),t=t[n]})),t):t};var pe=function(t,n,e){if(e=e||0,null==t)return-1;for(var r=t.length,o=e<0?r+e:e;o<r;){if(t[o]===n)return o;o++}return-1},me=pe;var ve=mt,ye=function(t,n){return-1!==me(t,n)};var be=function(t,n){var e="string"!=typeof arguments[1]?arguments[1]:ve(arguments,1),r={};for(var o in t)t.hasOwnProperty(o)&&!ye(e,o)&&(r[o]=t[o]);return r},$e=mt;var we=function(t,n){for(var e,r="string"!=typeof arguments[1]?arguments[1]:$e(arguments,1),o={},i=0;e=r[i++];)o[e]=t[e];return o},Se=On,Ce=kt;var xe=At;var Me=function(t){var n=0;return xe(t,(function(){n++})),n},Te=At,Ae=Me;var Ee=function(t,n,e,r){var o=arguments.length>2;if(!Ae(t)&&!o)throw new Error("reduce of empty object with no initial value");return Te(t,(function(t,i,a){o?e=n.call(r,e,t,i,a):(e=t,o=!0)})),e},ke=xn,Ie=Ht;var Pe=Rt;var Ne=function(t){return Pe(t,"Function")};var Be=function(t,n){var e=t[n];if(void 0!==e)return Ne(e)?e.call(t):e},Re=ge;var _e=function(t,n,e){var r=/^(.+)\.(.+)$/.exec(n);r?Re(t,r[1])[r[2]]=e:t[n]=e},Fe=Rn;var De=function(t,n){if(Fe(t,n)){for(var e=n.split("."),r=e.pop();n=e.shift();)t=t[n];return delete t[r]}return!0},Ge={bindAll:xt,contains:Yt,deepFillIn:tn,deepMatches:zt,deepMixIn:an,equals:vn,every:un,fillIn:wn,filter:xn,find:An,flatten:Pn,forIn:ht,forOwn:At,functions:pt,get:Nn,has:Rn,hasOwn:lt,keys:Fn,map:On,matches:zn,max:function(t,n){return Vn(Wn(t),n)},merge:ce,min:function(t,n){return fe(de(t),n)},mixIn:Yn,namespace:ge,omit:be,pick:we,pluck:function(t,n){return Se(t,Ce(n))},reduce:Ee,reject:function(t,n,e){return n=Ie(n,e),ke(t,(function(t,e,r){return!n(t,e,r)}),e)},result:Be,set:_e,size:Me,some:Zt,unset:De,values:Hn};(function(){var t,n;n=Ge,t=function(){function t(){}return t.prototype.getCountry=function(n){return t.prototype.countries[n]},t.prototype.getCode=function(e){var r,o;return o=null,null!=e&&-1!==(r=n.values(t.prototype.countries).indexOf(e))&&(o=Object.keys(t.prototype.countries)[r]),o},t.prototype.getCountries=function(){return n.values(t.prototype.countries)},t.prototype.getCodes=function(){return Object.keys(t.prototype.countries)},t.prototype.getData=function(){return t.prototype.countries},t.prototype.countries={AF:"Afghanistan",AX:"Åland Islands",AL:"Albania",DZ:"Algeria",AS:"American Samoa",AD:"Andorra",AO:"Angola",AI:"Anguilla",AQ:"Antarctica",AG:"Antigua and Barbuda",AR:"Argentina",AM:"Armenia",AW:"Aruba",AU:"Australia",AT:"Austria",AZ:"Azerbaijan",BS:"Bahamas",BH:"Bahrain",BD:"Bangladesh",BB:"Barbados",BY:"Belarus",BE:"Belgium",BZ:"Belize",BJ:"Benin",BM:"Bermuda",BT:"Bhutan",BO:"Bolivia, Plurinational State of",BQ:"Bonaire, Sint Eustatius and Saba",BA:"Bosnia and Herzegovina",BW:"Botswana",BV:"Bouvet Island",BR:"Brazil",IO:"British Indian Ocean Territory",BN:"Brunei Darussalam",BG:"Bulgaria",BF:"Burkina Faso",BI:"Burundi",KH:"Cambodia",CM:"Cameroon",CA:"Canada",CV:"Cape Verde",KY:"Cayman Islands",CF:"Central African Republic",TD:"Chad",CL:"Chile",CN:"China",CX:"Christmas Island",CC:"Cocos (Keeling) Islands",CO:"Colombia",KM:"Comoros",CG:"Congo",CD:"Congo, the Democratic Republic of the",CK:"Cook Islands",CR:"Costa Rica",CI:"Côte d'Ivoire",HR:"Croatia",CU:"Cuba",CW:"Curaçao",CY:"Cyprus",CZ:"Czech Republic",DK:"Denmark",DJ:"Djibouti",DM:"Dominica",DO:"Dominican Republic",EC:"Ecuador",EG:"Egypt",SV:"El Salvador",GQ:"Equatorial Guinea",ER:"Eritrea",EE:"Estonia",ET:"Ethiopia",FK:"Falkland Islands (Malvinas)",FO:"Faroe Islands",FJ:"Fiji",FI:"Finland",FR:"France",GF:"French Guiana",PF:"French Polynesia",TF:"French Southern Territories",GA:"Gabon",GM:"Gambia",GE:"Georgia",DE:"Germany",GH:"Ghana",GI:"Gibraltar",GR:"Greece",GL:"Greenland",GD:"Grenada",GP:"Guadeloupe",GU:"Guam",GT:"Guatemala",GG:"Guernsey",GN:"Guinea",GW:"Guinea-Bissau",GY:"Guyana",HT:"Haiti",HM:"Heard Island and McDonald Mcdonald Islands",VA:"Holy See (Vatican City State)",HN:"Honduras",HK:"Hong Kong",HU:"Hungary",IS:"Iceland",IN:"India",ID:"Indonesia",IR:"Iran, Islamic Republic of",IQ:"Iraq",IE:"Ireland",IM:"Isle of Man",IL:"Israel",IT:"Italy",JM:"Jamaica",JP:"Japan",JE:"Jersey",JO:"Jordan",KZ:"Kazakhstan",KE:"Kenya",KI:"Kiribati",KP:"Korea, Democratic People's Republic of",KR:"Korea, Republic of",KW:"Kuwait",KG:"Kyrgyzstan",LA:"Lao People's Democratic Republic",LV:"Latvia",LB:"Lebanon",LS:"Lesotho",LR:"Liberia",LY:"Libya",LI:"Liechtenstein",LT:"Lithuania",LU:"Luxembourg",MO:"Macao",MK:"Macedonia, the Former Yugoslav Republic of",MG:"Madagascar",MW:"Malawi",MY:"Malaysia",MV:"Maldives",ML:"Mali",MT:"Malta",MH:"Marshall Islands",MQ:"Martinique",MR:"Mauritania",MU:"Mauritius",YT:"Mayotte",MX:"Mexico",FM:"Micronesia, Federated States of",MD:"Moldova, Republic of",MC:"Monaco",MN:"Mongolia",ME:"Montenegro",MS:"Montserrat",MA:"Morocco",MZ:"Mozambique",MM:"Myanmar",NA:"Namibia",NR:"Nauru",NP:"Nepal",NL:"Netherlands",NC:"New Caledonia",NZ:"New Zealand",NI:"Nicaragua",NE:"Niger",NG:"Nigeria",NU:"Niue",NF:"Norfolk Island",MP:"Northern Mariana Islands",NO:"Norway",OM:"Oman",PK:"Pakistan",PW:"Palau",PS:"Palestine, State of",PA:"Panama",PG:"Papua New Guinea",PY:"Paraguay",PE:"Peru",PH:"Philippines",PN:"Pitcairn",PL:"Poland",PT:"Portugal",PR:"Puerto Rico",QA:"Qatar",RE:"Réunion",RO:"Romania",RU:"Russian Federation",RW:"Rwanda",BL:"Saint Barthélemy",SH:"Saint Helena, Ascension and Tristan da Cunha",KN:"Saint Kitts and Nevis",LC:"Saint Lucia",MF:"Saint Martin (French part)",PM:"Saint Pierre and Miquelon",VC:"Saint Vincent and the Grenadines",WS:"Samoa",SM:"San Marino",ST:"Sao Tome and Principe",SA:"Saudi Arabia",SN:"Senegal",RS:"Serbia",SC:"Seychelles",SL:"Sierra Leone",SG:"Singapore",SX:"Sint Maarten (Dutch part)",SK:"Slovakia",SI:"Slovenia",SB:"Solomon Islands",SO:"Somalia",ZA:"South Africa",GS:"South Georgia and the South Sandwich Islands",SS:"South Sudan",ES:"Spain",LK:"Sri Lanka",SD:"Sudan",SR:"Suriname",SJ:"Svalbard and Jan Mayen",SZ:"Swaziland",SE:"Sweden",CH:"Switzerland",SY:"Syrian Arab Republic",TW:"Taiwan, Province of China",TJ:"Tajikistan",TZ:"Tanzania, United Republic of",TH:"Thailand",TL:"Timor-Leste",TG:"Togo",TK:"Tokelau",TO:"Tonga",TT:"Trinidad and Tobago",TN:"Tunisia",TR:"Turkey",TM:"Turkmenistan",TC:"Turks and Caicos Islands",TV:"Tuvalu",UG:"Uganda",UA:"Ukraine",AE:"United Arab Emirates",GB:"United Kingdom",US:"United States",UM:"United States Minor Outlying Islands",UY:"Uruguay",UZ:"Uzbekistan",VU:"Vanuatu",VE:"Venezuela, Bolivarian Republic of",VN:"Viet Nam",VG:"Virgin Islands, British",VI:"Virgin Islands, U.S.",WF:"Wallis and Futuna",EH:"Western Sahara",YE:"Yemen",ZM:"Zambia",ZW:"Zimbabwe"},t}(),null!=null||new t}).call(st);for(var Oe=[],Le=0;Le<256;++Le)Oe.push((Le+256).toString(16).substr(1));var ze,je,Ke,Ue,He,Ve,We,Ze={exports:{}}; | ||
/*! http://mths.be/base64 v0.1.0 by @mathias | MIT license */function Je(t){return function(n,e){if(!n.hasOwnProperty("ownerDocument")){Object.defineProperty(n,"ownerDocument",{get:function(){return n.parentElement}});let t=n;for(;t.parentElement;)t=t.parentElement;n.parentElement.head=t}return t(n,e)}}function Ye(t){return t<.5?4*t*t*t:.5*Math.pow(2*t-2,3)+1}function qe(t,{delay:n=0,speed:e,duration:r,easing:o=Ye}={}){let i=t.getTotalLength();const a=getComputedStyle(t);return"butt"!==a.strokeLinecap&&(i+=parseInt(a.strokeWidth)),void 0===r?r=void 0===e?800:i/e:"function"==typeof r&&(r=r(i)),{delay:n,duration:r,easing:o,css:(t,n)=>`stroke-dasharray: ${t*i} ${n*i}`}}ze=Ze,je=Ze.exports,function(t){var n=je,e=ze&&ze.exports==n&&ze,r="object"==typeof st&&st;r.global!==r&&r.window!==r||(t=r);var o=function(t){this.message=t};(o.prototype=new Error).name="InvalidCharacterError";var i=function(t){throw new o(t)},a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=/[\t\n\f\r ]/g,c={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 n,e,r,o,s=t.length%3,c="",u=-1,l=t.length-s;++u<l;)n=t.charCodeAt(u)<<16,e=t.charCodeAt(++u)<<8,r=t.charCodeAt(++u),c+=a.charAt((o=n+e+r)>>18&63)+a.charAt(o>>12&63)+a.charAt(o>>6&63)+a.charAt(63&o);return 2==s?(n=t.charCodeAt(u)<<8,e=t.charCodeAt(++u),c+=a.charAt((o=n+e)>>10)+a.charAt(o>>4&63)+a.charAt(o<<2&63)+"="):1==s&&(o=t.charCodeAt(u),c+=a.charAt(o>>2)+a.charAt(o<<4&63)+"=="),c},decode:function(t){var n=(t=String(t).replace(s,"")).length;n%4==0&&(n=(t=t.replace(/==?$/,"")).length),(n%4==1||/[^+a-zA-Z0-9/]/.test(t))&&i("Invalid character: the string to be decoded is not correctly encoded.");for(var e,r,o=0,c="",u=-1;++u<n;)r=a.indexOf(t.charAt(u)),e=o%4?64*e+r:r,o++%4&&(c+=String.fromCharCode(255&e>>(-2*o&6)));return c},version:"0.1.0"};if(n&&!n.nodeType)if(e)e.exports=c;else for(var u in c)c.hasOwnProperty(u)&&(n[u]=c[u]);else t.base64=c}(st),function(t){t.Opened="WEBSOCKET_OPEN",t.SourceSampleRateSetSuccess="SOURSE_SAMPLE_RATE_SET_SUCCESS",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"}(Ke||(Ke={})),function(t){t.Failed="Failed",t.NoBrowserSupport="NoBrowserSupport",t.NoAudioConsent="NoAudioConsent",t.Idle="Idle",t.Connecting="Connecting",t.Ready="Ready",t.Recording="Recording",t.Loading="Loading"}(Ue||(Ue={})),function(t){t.Poweron="poweron",t.Mic="mic",t.Error="error",t.Denied="denied"}(He||(He={})),function(t){t.Hold="hold",t.Click="click",t.Noninteractive="noninteractive"}(Ve||(Ve={})),function(t){t.None="none",t.Connecting="connecting",t.Busy="busy"}(We||(We={})),at.Disconnected,He.Poweron,Ve.Click,We.None,at.Disconnecting,He.Poweron,Ve.Noninteractive,We.Connecting,at.Connecting,He.Poweron,Ve.Noninteractive,We.Connecting,at.Connected,He.Mic,Ve.Hold,We.None,at.Starting,He.Mic,Ve.Hold,We.Connecting,at.Recording,He.Mic,Ve.Hold,We.None,at.Stopping,He.Mic,Ve.Noninteractive,We.Busy,at.Failed,He.Error,Ve.Click,We.None,at.NoBrowserSupport,He.Error,Ve.Click,We.None,at.NoAudioConsent,He.Denied,Ve.Click,We.None;const Qe=[0,1];function Xe(t,n,e,r){if(n<e)return t[0];if(n>r)return t[t.length-1];let o=(r-e)/(t.length-1);if(o<=0)return t[0];let i=(n-e)/o,a=Math.floor(i),s=Math.ceil(i),c=i-a;return(1-c)*t[a]+c*t[s]}function tr(t){!function(t,n,e){const r=y(t);if(!r.getElementById(n)){const t=S("style");t.id=n,t.textContent=e,b(r,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 nr(n){let e;return{c(){e=S("canvas"),A(e,"color",n[0]),A(e,"display","block"),A(e,"width","1.35rem"),A(e,"height","1.5rem"),A(e,"margin","0"),A(e,"padding","0 0.8rem 0 0rem"),A(e,"flex-grow","0"),A(e,"flex-shrink","0"),A(e,"flex-basis","1.35rem"),T(e,"class","svelte-1fz8oog")},m(t,r){$(t,e,r),n[3](e)},p(t,[n]){1&n&&A(e,"color",t[0])},i:t,o:t,d(t){t&&w(e),n[3](null)}}}function er(t,n,e){let{color:r="#60e0ff"}=n;const o=(t,n)=>{a=Date.now()>s?t:Math.max(a,t),s=Date.now()+n};let i,a=0,s=0,c=[0,0];const u=(t,n,e,r,o,i)=>{r<2*i&&(i=r/2),o<2*i&&(i=o/2),t.beginPath(),t.moveTo(n+i,e),t.arcTo(n+r,e,n+r,e+o,i),t.arcTo(n+r,e+o,n,e+o,i),t.arcTo(n,e+o,n,e,i),t.arcTo(n,e,n+r,e,i),t.closePath()};var l;return l=()=>{let t;const n=2*(c.length-1)+1,r=3*n+1*(n-1),l=()=>{if(t=requestAnimationFrame(l),!i)return;const n=i.getContext("2d");if(!n)return;let o=(t=>{var n=t.backingStorePixelRatio||t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return(window.devicePixelRatio||1)/n})(n),f=Number.parseInt(getComputedStyle(i).getPropertyValue("width").slice(0,-2)),d=Number.parseInt(getComputedStyle(i).getPropertyValue("height").slice(0,-2));e(1,i.width=f*o,i),e(1,i.height=d*o,i),Date.now()<s?c[0]=.15*a+.85*c[0]:c[0]=.0625+.75*c[0];let h=1;for(;h<c.length;)c[h]=.25*c[h-1]+.5*c[h]+.0625,h++;n.clearRect(0,0,i.width,i.height);const g=3/r*i.width*.5,p=4/r*i.width;for(n.fillStyle=i.style.color||"#000000",h=0;h<c.length;h++){const t=c[h]*i.height;t*i.height>2*g?u(n,.5*i.width-g+h*p,.5*(i.height-t),2*g,t,g):(n.beginPath(),n.arc(.5*i.width+h*p,.5*i.height,t*i.height*.5,0,2*Math.PI)),n.fill(),h>0&&(t*i.height>2*g?u(n,.5*i.width-g-h*p,.5*(i.height-t),2*g,t,g):(n.beginPath(),n.arc(.5*i.width-h*p,.5*i.height,t*i.height*.5,0,2*Math.PI)),n.fill())}};return l(),o(1,500),()=>{cancelAnimationFrame(t)}},F().$$.on_mount.push(l),t.$$set=t=>{"color"in t&&e(0,r=t.color)},[r,i,o,function(t){G[t?"unshift":"push"]((()=>{i=t,e(1,i)}))}]}class rr extends class{$destroy(){et(this,1),this.$destroy=t}$on(t,n){const e=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return e.push(n),()=>{const t=e.indexOf(n);-1!==t&&e.splice(t,1)}}$set(t){this.$$set&&!u(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}{constructor(t){super(),ot(this,t,er,nr,s,{color:0,updateVU:2},tr)}get updateVU(){return this.$$.ctx[2]}}const or=[];function ir(t){return"[object Date]"===Object.prototype.toString.call(t)}function ar(t,n){if(t===n||t!=t)return()=>t;const e=typeof t;if(e!==typeof n||Array.isArray(t)!==Array.isArray(n))throw new Error("Cannot interpolate values of different type");if(Array.isArray(t)){const e=n.map(((n,e)=>ar(t[e],n)));return t=>e.map((n=>n(t)))}if("object"===e){if(!t||!n)throw new Error("Object cannot be null");if(ir(t)&&ir(n)){t=t.getTime();const e=(n=n.getTime())-t;return n=>new Date(t+n*e)}const e=Object.keys(n),r={};return e.forEach((e=>{r[e]=ar(t[e],n[e])})),t=>{const n={};return e.forEach((e=>{n[e]=r[e](t)})),n}}if("number"===e){const e=n-t;return n=>t+n*e}throw new Error(`Cannot interpolate ${e} values`)}function sr(r,o={}){const i=function(n,e=t){let r;const o=new Set;function i(t){if(s(n,t)&&(n=t,r)){const t=!or.length;for(const t of o)t[1](),or.push(t,n);if(t){for(let t=0;t<or.length;t+=2)or[t][0](or[t+1]);or.length=0}}}return{set:i,update:function(t){i(t(n))},subscribe:function(a,s=t){const c=[a,s];return o.add(c),1===o.size&&(r=e(i)||t),a(n),()=>{o.delete(c),0===o.size&&(r(),r=null)}}}}(r);let a,c=r;function u(t,s){if(null==r)return i.set(r=t),Promise.resolve();c=t;let u=a,l=!1,{delay:f=0,duration:h=400,easing:g=n,interpolate:p=ar}=e(e({},o),s);if(0===h)return u&&(u.abort(),u=null),i.set(r=c),Promise.resolve();const v=d()+f;let y;return a=m((n=>{if(n<v)return!0;l||(y=p(r,t),"function"==typeof h&&(h=h(r,t)),l=!0),u&&(u.abort(),u=null);const e=n-v;return e>h?(i.set(r=t),!1):(i.set(r=y(g(e/h))),!0)})),a.promise}return{set:u,update:(t,n)=>u(t(c,r),n),subscribe:i.subscribe}}const{window:cr}=tt;function ur(t,n,e){const r=t.slice();return r[39]=n[e],r[41]=e,r}function lr(t){let n;return{c(){n=S("div"),T(n,"class","TransscriptItemBgDiv")},m(t,e){$(t,n,e)},d(t){t&&w(n)}}}function fr(n){let e,r;return{c(){e=S("div"),e.textContent="Listening...",T(e,"class","listening")},m(t,n){$(t,e,n)},i(t){r||K((()=>{r=X(e,n[19],{duration:400}),r.start()}))},o:t,d(t){t&&w(e)}}}function dr(n){let e,r;return{c(){e=S("div"),T(e,"class","TransscriptItemBgDiv")},m(t,n){$(t,e,n)},p(t,e){n=t},i(t){r||K((()=>{r=X(e,n[19],{duration:n[13]}),r.start()}))},o:t,d(t){t&&w(e)}}}function hr(t){let n,e;return{c(){n=S("span"),T(n,"style",e=t[41]<t[10].length-1?"width:0.25em;":t[12]?"width:1.2em;":"")},m(t,e){$(t,n,e)},p(t,r){5120&r[0]&&e!==(e=t[41]<t[10].length-1?"width:0.25em;":t[12]?"width:1.2em;":"")&&T(n,"style",e)},d(t){t&&w(n)}}}function gr(n){let e,r,o,i,a,s,c,u=n[39].word+"",l=n[14]&&dr(n),f=n[41]<n[10].length&&hr(n);return{c(){e=S("div"),l&&l.c(),r=M(),o=S("div"),i=x(u),a=M(),f&&f.c(),T(o,"class","TransscriptItemContent"),T(e,"class",c="TranscriptItem "+n[21](n[39])),E(e,"Entity",null!==n[39].entityType),E(e,"Final",n[39].isFinal)},m(t,n){$(t,e,n),l&&l.m(e,null),v(e,r),v(e,o),v(o,i),v(o,a),f&&f.m(o,null)},p(t,a){(n=t)[14]?l?16384&a[0]&&q(l,1):(l=dr(n),l.c(),q(l,1),l.m(e,r)):l&&(l.d(1),l=null),1024&a[0]&&u!==(u=n[39].word+"")&&function(t,n){n=""+n,t.wholeText!==n&&(t.data=n)}(i,u),n[41]<n[10].length?f?f.p(n,a):(f=hr(n),f.c(),f.m(o,null)):f&&(f.d(1),f=null),1024&a[0]&&c!==(c="TranscriptItem "+n[21](n[39]))&&T(e,"class",c),1024&a[0]&&E(e,"Entity",null!==n[39].entityType),1024&a[0]&&E(e,"Final",n[39].isFinal)},i(t){q(l),s||K((()=>{s=X(o,n[19],{duration:n[13]}),s.start()}))},o:t,d(t){t&&w(e),l&&l.d(),f&&f.d()}}}function pr(n){let e,r,o,i,a,s,c,u;return{c(){e=S("div"),r=S("div"),o=M(),i=S("div"),a=C("svg"),s=C("path"),T(r,"class","TransscriptItemBgDiv"),A(r,"background-color",n[5]),T(s,"stroke","currentColor"),T(s,"stroke-width","3"),T(s,"d","M7.191 11.444l4.059 6.107 7.376-12.949"),T(s,"fill","none"),T(s,"fill-rule","evenodd"),A(a,"width","2rem"),A(a,"height","2rem"),A(a,"position","absolute"),A(a,"transform","translate(-0.6rem, -0.5rem)"),A(a,"stroke","#eee"),T(a,"viewBox","0 0 24 24"),T(a,"xmlns","http://www.w3.org/2000/svg"),A(i,"width","1.0rem"),A(i,"height","1rem"),A(i,"position","relative"),T(e,"class","TranscriptItem")},m(t,n){$(t,e,n),v(e,r),v(e,o),v(e,i),v(i,a),v(a,s)},p(t,n){32&n[0]&&A(r,"background-color",t[5])},i(t){c||K((()=>{c=X(s,n[18],{duration:500}),c.start()})),u||K((()=>{u=X(e,n[19],{duration:200,maxWidth:3}),u.start()}))},o:t,d(t){t&&w(e)}}}function mr(n){let e,r,o,i,a,s,c,u,l,f,d,h,g,p,m=n[14]&&lr(),y={color:n[5]};s=new rr({props:y}),n[31](s);let b=n[15]&&fr(n),C=n[10],x=[];for(let t=0;t<C.length;t+=1)x[t]=gr(ur(n,C,t));let k=n[12]&&pr(n);return{c(){var h;e=S("main"),r=S("div"),o=S("div"),m&&m.c(),i=M(),a=S("div"),(h=s.$$.fragment)&&h.c(),c=M(),b&&b.c(),u=M();for(let t=0;t<x.length;t+=1)x[t].c();l=M(),k&&k.c(),f=M(),d=S("link"),this.c=t,T(a,"class","TransscriptItemContent"),T(o,"class","TranscriptItem"),T(r,"class","BigTranscript"),A(e,"--voffset",n[1]),A(e,"--hoffset",n[2]),A(e,"--fontsize",n[3]),A(e,"--color",n[4]),A(e,"--highlight-color",n[5]),A(e,"--text-bg-color",n[6]),A(e,"--gradient-stop1",n[7]),A(e,"--gradient-stop2",n[8]),A(e,"--marginbottom",n[9]),A(e,"--transition",n[16].transition),A(e,"opacity",n[16].transition),A(e,"max-height",10*Xe(Qe,n[16].transition,0,.6)+"rem"),A(e,"visibility",0!==n[16].transition?"visible":"hidden"),E(e,"placementTop","top"===n[0]),T(d,"href","https://fonts.googleapis.com/css2?family=Saira+Condensed:wght@700&display=swap"),T(d,"rel","stylesheet")},m(t,y){$(t,e,y),v(e,r),v(r,o),m&&m.m(o,null),v(o,i),v(o,a),nt(s,a,null),v(a,c),b&&b.m(a,null),v(r,u);for(let t=0;t<x.length;t+=1)x[t].m(r,null);var w,S,C,M;v(r,l),k&&k.m(r,null),$(t,f,y),v(document.head,d),h=!0,g||(w=cr,S="message",C=n[20],w.addEventListener(S,C,M),p=()=>w.removeEventListener(S,C,M),g=!0)},p(t,n){t[14]?m||(m=lr(),m.c(),m.m(o,i)):m&&(m.d(1),m=null);const c={};if(32&n[0]&&(c.color=t[5]),s.$set(c),t[15]?b?32768&n[0]&&q(b,1):(b=fr(t),b.c(),q(b,1),b.m(a,null)):b&&(b.d(1),b=null),2118656&n[0]){let e;for(C=t[10],e=0;e<C.length;e+=1){const o=ur(t,C,e);x[e]?(x[e].p(o,n),q(x[e],1)):(x[e]=gr(o),x[e].c(),q(x[e],1),x[e].m(r,l))}for(;e<x.length;e+=1)x[e].d(1);x.length=C.length}t[12]?k?(k.p(t,n),4096&n[0]&&q(k,1)):(k=pr(t),k.c(),q(k,1),k.m(r,null)):k&&(k.d(1),k=null),(!h||2&n[0])&&A(e,"--voffset",t[1]),(!h||4&n[0])&&A(e,"--hoffset",t[2]),(!h||8&n[0])&&A(e,"--fontsize",t[3]),(!h||16&n[0])&&A(e,"--color",t[4]),(!h||32&n[0])&&A(e,"--highlight-color",t[5]),(!h||64&n[0])&&A(e,"--text-bg-color",t[6]),(!h||128&n[0])&&A(e,"--gradient-stop1",t[7]),(!h||256&n[0])&&A(e,"--gradient-stop2",t[8]),(!h||512&n[0])&&A(e,"--marginbottom",t[9]),(!h||65536&n[0])&&A(e,"--transition",t[16].transition),(!h||65536&n[0])&&A(e,"opacity",t[16].transition),(!h||65536&n[0])&&A(e,"max-height",10*Xe(Qe,t[16].transition,0,.6)+"rem"),(!h||65536&n[0])&&A(e,"visibility",0!==t[16].transition?"visible":"hidden"),1&n[0]&&E(e,"placementTop","top"===t[0])},i(t){if(!h){q(s.$$.fragment,t),q(b);for(let t=0;t<C.length;t+=1)q(x[t]);q(k),h=!0}},o(t){!function(t,n,e,r){if(t&&t.o){if(Y.has(t))return;Y.add(t),(void 0).c.push((()=>{Y.delete(t),r&&(e&&t.d(1),r())})),t.o(n)}}(s.$$.fragment,t),h=!1},d(t){t&&w(e),m&&m.d(),n[31](null),et(s),b&&b.d(),function(t,n){for(let e=0;e<t.length;e+=1)t[e]&&t[e].d(n)}(x,t),k&&k.d(),t&&w(f),w(d),g=!1,p()}}}function vr(t,n,e){let r,o,i,a,s,c,u,{placement:f}=n,{voffset:d="3rem"}=n,{hoffset:h="2rem"}=n,{fontsize:g="1.5rem"}=n,{color:p="#ffffff"}=n,{highlightcolor:m="#15e8b5"}=n,{backgroundcolor:v="#202020"}=n,{gradientstop1:y="#ffffff88"}=n,{gradientstop2:b="#ffffffcc"}=n,{marginbottom:$="0rem"}=n,{formattext:w}=n,{demomode:S}=n,C=[],x=null,M=null,T=at.Disconnected,A=!1,E=!1,k=!1,I=sr({transition:0},{duration:200});l(t,I,(t=>e(16,c=t)));const P=F(),N=Je(qe),B=Je(((t,{delay:n=0,duration:e=350,maxWidth:r=10})=>({delay:n,duration:e,css:t=>`\n max-width: ${Xe(Qe,t,0,1)*r}rem;\n `}))),R=t=>{e(12,k=k||t)},_=t=>{e(27,T=t),T===at.Recording&&(e(12,k=!1),e(10,C=[]),M=null)},D=t=>{if(void 0===t)return;u&&(a||T===at.Recording)&&u.updateVU(.5*Math.random()+.5,75*Math.random()+75),t.isFinal?O(C.length>0?a?3500:2e3:0):C.length>0&&(A||e(28,A=!0),O(2e3));const n=`${t.contextId}/${t.id}`;null!==M?M!==n&&(e(12,k=!1),M=n):M=n,e(10,C=[]),t.words.forEach((t=>{e(10,C[t.index]={word:t.value,serialNumber:t.index,entityType:null,isFinal:t.isFinal,hide:!1},C)})),i?t.entities.forEach((t=>{e(10,C[t.startPosition].word=t.value,C),e(10,C[t.startPosition].entityType=t.type,C),e(10,C[t.startPosition].isFinal=t.isFinal,C),e(10,C[t.startPosition].hide=!1,C);for(let n=t.startPosition+1;n<t.endPosition;n++)C[n]&&e(10,C[n].hide=!0,C)})):t.entities.forEach((t=>{for(let n=t.startPosition;n<t.endPosition;n++)C[n]&&(e(10,C[n].entityType=t.type,C),e(10,C[n].isFinal=t.isFinal,C))})),e(10,C=C.filter((t=>!t.hide)))},O=(t=0)=>{L(),x=window.setTimeout((()=>{x=null,A&&e(28,A=!1)}),t)},L=()=>{null!==x&&(window.clearTimeout(x),x=null)};return t.$$set=t=>{"placement"in t&&e(0,f=t.placement),"voffset"in t&&e(1,d=t.voffset),"hoffset"in t&&e(2,h=t.hoffset),"fontsize"in t&&e(3,g=t.fontsize),"color"in t&&e(4,p=t.color),"highlightcolor"in t&&e(5,m=t.highlightcolor),"backgroundcolor"in t&&e(6,v=t.backgroundcolor),"gradientstop1"in t&&e(7,y=t.gradientstop1),"gradientstop2"in t&&e(8,b=t.gradientstop2),"marginbottom"in t&&e(9,$=t.marginbottom),"formattext"in t&&e(22,w=t.formattext),"demomode"in t&&e(23,S=t.demomode)},t.$$.update=()=>{if(1024&t.$$.dirty[0]&&e(15,r=0===C.length),64&t.$$.dirty[0]&&e(14,o="none"!==v),4194304&t.$$.dirty[0]&&(i=void 0===w||"false"!==w),8388608&t.$$.dirty[0]&&e(30,a=void 0!==S&&"false"!==S),1073741824&t.$$.dirty[0]&&e(13,s=a?800:350),939524096&t.$$.dirty[0]){const t=T===at.Recording||A;t!==E&&(n="visibilitychanged",c=t,P.dispatchEvent(new CustomEvent(n,{detail:c,composed:!0}))),e(29,E=t),I.set({transition:E?1:0})}var n,c;1073741824&t.$$.dirty[0]&&(a||O(0))},[f,d,h,g,p,m,v,y,b,$,C,u,k,s,o,r,c,I,N,B,t=>{switch(t.data.type){case"speechsegment":D(t.data.segment);break;case"speechhandled":R(t.data.success);break;case"speechstate":_(t.data.state)}},t=>t.entityType||"",w,S,R,_,D,T,A,E,a,function(t){G[t?"unshift":"push"]((()=>{u=t,e(11,u)}))}]}class yr extends it{constructor(t){super(),this.shadowRoot.innerHTML="<style>.BigTranscript{position:relative;user-select:none;font-family:'Saira Condensed', sans-serif;text-transform:uppercase;color:var(--color);font-size:var(--fontsize);line-height:135%;display:flex;flex-direction:row;justify-content:start;flex-wrap:wrap;margin-bottom:calc(var(--marginbottom) * var(--transition))}.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>",ot(this,{target:this.shadowRoot,props:k(this.attributes),customElement:!0},vr,mr,c,{placement:0,voffset:1,hoffset:2,fontsize:3,color:4,highlightcolor:5,backgroundcolor:6,gradientstop1:7,gradientstop2:8,marginbottom:9,formattext:22,demomode:23,speechhandled:24,speechstate:25,speechsegment:26},null,[-1,-1]),t&&(t.target&&$(t.target,this,t.anchor),t.props&&(this.$set(t.props),V()))}static get observedAttributes(){return["placement","voffset","hoffset","fontsize","color","highlightcolor","backgroundcolor","gradientstop1","gradientstop2","marginbottom","formattext","demomode","speechhandled","speechstate","speechsegment"]}get placement(){return this.$$.ctx[0]}set placement(t){this.$$set({placement:t}),V()}get voffset(){return this.$$.ctx[1]}set voffset(t){this.$$set({voffset:t}),V()}get hoffset(){return this.$$.ctx[2]}set hoffset(t){this.$$set({hoffset:t}),V()}get fontsize(){return this.$$.ctx[3]}set fontsize(t){this.$$set({fontsize:t}),V()}get color(){return this.$$.ctx[4]}set color(t){this.$$set({color:t}),V()}get highlightcolor(){return this.$$.ctx[5]}set highlightcolor(t){this.$$set({highlightcolor:t}),V()}get backgroundcolor(){return this.$$.ctx[6]}set backgroundcolor(t){this.$$set({backgroundcolor:t}),V()}get gradientstop1(){return this.$$.ctx[7]}set gradientstop1(t){this.$$set({gradientstop1:t}),V()}get gradientstop2(){return this.$$.ctx[8]}set gradientstop2(t){this.$$set({gradientstop2:t}),V()}get marginbottom(){return this.$$.ctx[9]}set marginbottom(t){this.$$set({marginbottom:t}),V()}get formattext(){return this.$$.ctx[22]}set formattext(t){this.$$set({formattext:t}),V()}get demomode(){return this.$$.ctx[23]}set demomode(t){this.$$set({demomode:t}),V()}get speechhandled(){return this.$$.ctx[24]}get speechstate(){return this.$$.ctx[25]}get speechsegment(){return this.$$.ctx[26]}}customElements.get("big-transcript")?console.warn("Skipping re-defining customElement big-transcript"):customElements.define("big-transcript",yr)})); | ||
!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 l(t,e){return t!=t?e==e:t!==e}function a(t){return 0===Object.keys(t).length}function u(e,n,o){e.$$.on_destroy.push(function(e,...n){if(null==e)return t;const o=e.subscribe(...n);return o.unsubscribe?()=>o.unsubscribe():o}(n,o))}const d="undefined"!=typeof window;let h=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,e){$(t.head||t,e)}function w(t,e,n){t.insertBefore(e,n||null)}function v(t){t.parentNode.removeChild(t)}function x(t){return document.createElement(t)}function k(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function _(t){return document.createTextNode(t)}function T(){return _(" ")}function E(){return _("")}function C(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function S(t,e,n,o){t.style.setProperty(e,n,o?"important":"")}function P(t,e,n){t.classList[n?"add":"remove"](e)}function z(t){const e={};for(const n of t)e[n.name]=n.value;return e}const D=new Set;let R,F=0;function N(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}`,h=y(t);D.add(h);const f=h.__svelte_stylesheet||(h.__svelte_stylesheet=function(t){const e=x("style");return b(y(t),e),e}(t).sheet),g=h.__svelte_rules||(h.__svelte_rules={});g[d]||(g[d]=!0,f.insertRule(`@keyframes ${d} ${u}`,f.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||f((()=>{F||(D.forEach((t=>{const e=t.__svelte_stylesheet;let n=e.cssRules.length;for(;n--;)e.deleteRule(n);t.__svelte_rules={}})),D.clear())})))}function I(t){R=t}function B(){if(!R)throw new Error("Function called outside component initialization");return R}const M=[],j=[],O=[],L=[],V=Promise.resolve();let H=!1;function W(t){O.push(t)}let q=!1;const U=new Set;function G(){if(!q){q=!0;do{for(let t=0;t<M.length;t+=1){const e=M[t];I(e),J(e.$$)}for(I(null),M.length=0;j.length;)j.pop()();for(let t=0;t<O.length;t+=1){const e=O[t];U.has(e)||(U.add(e),e())}O.length=0}while(M.length);for(;L.length;)L.pop()();H=!1,q=!1,U.clear()}}function J(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)}}let K;function Q(t,e,n){t.dispatchEvent(function(t,e,n=!1){const o=document.createEvent("CustomEvent");return o.initCustomEvent(t,n,!1,e),o}(`${e?"intro":"outro"}${n}`))}const X=new Set;function Y(t,e){t&&t.i&&(X.delete(t),t.i(e))}const Z={duration:0};function tt(n,o,i){let r,c,l=o(n,i),a=!1,u=0;function d(){r&&A(n,r)}function f(){const{delay:o=0,duration:i=300,easing:s=e,tick:f=t,css:g}=l||Z;g&&(r=N(n,0,1,i,o,s,g,u++)),f(0,1);const p=h()+o,$=p+i;c&&c.abort(),a=!0,W((()=>Q(n,!0,"start"))),c=m((t=>{if(a){if(t>=$)return f(1,0),Q(n,!0,"end"),d(),a=!1;if(t>=p){const e=s((t-p)/i);f(e,1-e)}}return a}))}let g=!1;return{start(){g||(g=!0,A(n),s(l)?(l=l(),(K||(K=Promise.resolve(),K.then((()=>{K=null}))),K).then(f)):f())},invalidate(){g=!1},end(){a&&(d(),a=!1)}}}const et="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function nt(t,e,n,i){const{fragment:c,on_mount:l,on_destroy:a,after_update:u}=t.$$;c&&c.m(e,n),i||W((()=>{const e=l.map(o).filter(s);a?a.push(...e):r(e),t.$$.on_mount=[]})),u.forEach(W)}function ot(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 it(t,e){-1===t.$$.dirty[0]&&(M.push(t),H||(H=!0,V.then(G)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function rt(e,n,o,s,c,l,a,u=[-1]){const d=R;I(e);const h=e.$$={fragment:null,ctx:null,props:l,update:t,not_equal:c,bound:i(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(d?d.$$.context:[])),callbacks:i(),dirty:u,skip_bound:!1,root:n.target||d.$$.root};a&&a(h.root);let f=!1;if(h.ctx=o?o(e,n.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),f&&it(e,t)),n})):[],h.update(),f=!0,r(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(v)}else h.fragment&&h.fragment.c();n.intro&&Y(e.$$.fragment),nt(e,n.target,n.anchor,n.customElement),G()}I(d)}let st;"function"==typeof HTMLElement&&(st=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(){ot(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)}});var ct,lt,at,ut,dt,ht,ft;function gt(t){return function(e,n){if(!e.hasOwnProperty("ownerDocument")){Object.defineProperty(e,"ownerDocument",{get:function(){return e.parentElement}});let t=e;for(;t.parentElement;)t=t.parentElement;e.parentElement.head=t}return t(e,n)}}function pt(t){return t<.5?4*t*t*t:.5*Math.pow(2*t-2,3)+1}function mt(t,{delay:e=0,speed:n,duration:o,easing:i=pt}={}){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.Disconnected=3]="Disconnected",t[t.Disconnecting=4]="Disconnecting",t[t.Connecting=5]="Connecting",t[t.Connected=6]="Connected",t[t.Starting=7]="Starting",t[t.Stopping=8]="Stopping",t[t.Recording=9]="Recording"}(ct||(ct={})),function(t){t.SpeechlyFirstConnect="SpeechlyFirstConnect"}(lt||(lt={})),function(t){t.speechlypoweron="speechlypoweron",t.holdstart="holdstart",t.holdend="holdend",t.speechlystarting="speechlystarting",t.speechstate="speechstate",t.initialized="initialized",t.speechsegment="speechsegment",t.speechhandled="speechhandled",t.showhint="showhint",t.transcriptdrawerhint="hint",t.speechlyintroready="speechlyintroready",t.speechlyintroclosed="speechlyintroclosed"}(at||(at={})),function(t){t.Mic="mic",t.MicActive="micactive",t.Error="error",t.Denied="denied"}(ut||(ut={})),function(t){t.Hold="hold",t.Click="click",t.Noninteractive="noninteractive"}(dt||(dt={})),function(t){t.None="none",t.Connecting="connecting",t.Busy="busy"}(ht||(ht={})),function(t){t.None="none",t.Whirl="whirl"}(ft||(ft={})),ct.Disconnected,ct.Disconnecting,ct.Connecting,ct.Connected,ct.Starting,ct.Recording,ct.Stopping,ct.Failed,ct.NoBrowserSupport,ct.NoAudioConsent;const $t=[0,1];function yt(t,e,n,o){if(e<n)return t[0];if(e>o)return t[t.length-1];let i=(o-n)/(t.length-1);if(i<=0)return t[0];let r=(e-n)/i,s=Math.floor(r),c=Math.ceil(r),l=r-s;return(1-l)*t[s]+l*t[c]}function bt(t){!function(t,e,n){const o=y(t);if(!o.getElementById(e)){const t=x("style");t.id=e,t.textContent=n,b(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 wt(e){let n;return{c(){n=x("canvas"),S(n,"color",e[0]),S(n,"display","block"),S(n,"width","1.35rem"),S(n,"height","1.5rem"),S(n,"margin","0"),S(n,"padding","0 0.8rem 0 0rem"),S(n,"flex-grow","0"),S(n,"flex-shrink","0"),S(n,"flex-basis","1.35rem"),C(n,"class","svelte-1fz8oog")},m(t,o){w(t,n,o),e[3](n)},p(t,[e]){1&e&&S(n,"color",t[0])},i:t,o:t,d(t){t&&v(n),e[3](null)}}}function vt(t,e,n){let{color:o="#60e0ff"}=e;const i=(t,e)=>{s=Date.now()>c?t:Math.max(s,t),c=Date.now()+e};let r,s=0,c=0,l=[0,0];const a=(t,e,n,o,i,r)=>{o<2*r&&(r=o/2),i<2*r&&(r=i/2),t.beginPath(),t.moveTo(e+r,n),t.arcTo(e+o,n,e+o,n+i,r),t.arcTo(e+o,n+i,e,n+i,r),t.arcTo(e,n+i,e,n,r),t.arcTo(e,n,e+o,n,r),t.closePath()};var u;return u=()=>{let t;const e=2*(l.length-1)+1,o=3*e+1*(e-1),u=()=>{if(t=requestAnimationFrame(u),!r)return;const e=r.getContext("2d");if(!e)return;let i=(t=>{var e=t.backingStorePixelRatio||t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return(window.devicePixelRatio||1)/e})(e),d=Number.parseInt(getComputedStyle(r).getPropertyValue("width").slice(0,-2)),h=Number.parseInt(getComputedStyle(r).getPropertyValue("height").slice(0,-2));n(1,r.width=d*i,r),n(1,r.height=h*i,r),Date.now()<c?l[0]=.15*s+.85*l[0]:l[0]=.0625+.75*l[0];let f=1;for(;f<l.length;)l[f]=.25*l[f-1]+.5*l[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<l.length;f++){const t=l[f]*r.height;t*r.height>2*g?a(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?a(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 u(),i(1,500),()=>{cancelAnimationFrame(t)}},B().$$.on_mount.push(u),t.$$set=t=>{"color"in t&&n(0,o=t.color)},[o,r,i,function(t){j[t?"unshift":"push"]((()=>{r=t,n(1,r)}))}]}class xt extends class{$destroy(){ot(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(),rt(this,t,vt,wt,c,{color:0,updateVU:2},bt)}get updateVU(){return this.$$.ctx[2]}}const kt=[];function _t(t){return"[object Date]"===Object.prototype.toString.call(t)}function Tt(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)=>Tt(t[n],e)));return t=>n.map((e=>e(t)))}if("object"===n){if(!t||!e)throw new Error("Object cannot be null");if(_t(t)&&_t(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]=Tt(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 Et(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=!kt.length;for(const t of i)t[1](),kt.push(t,e);if(t){for(let t=0;t<kt.length;t+=2)kt[t][0](kt[t+1]);kt.length=0}}}return{set:r,update:function(t){r(t(e))},subscribe:function(s,c=t){const l=[s,c];return i.add(l),1===i.size&&(o=n(r)||t),s(e),()=>{i.delete(l),0===i.size&&(o(),o=null)}}}}(o);let s,l=o;function a(t,c){if(null==o)return r.set(o=t),Promise.resolve();l=t;let a=s,u=!1,{delay:d=0,duration:f=400,easing:g=e,interpolate:p=Tt}=n(n({},i),c);if(0===f)return a&&(a.abort(),a=null),r.set(o=l),Promise.resolve();const $=h()+d;let y;return s=m((e=>{if(e<$)return!0;u||(y=p(o,t),"function"==typeof f&&(f=f(o,t)),u=!0),a&&(a.abort(),a=null);const n=e-$;return n>f?(r.set(o=t),!1):(r.set(o=y(g(n/f))),!0)})),s.promise}return{set:a,update:(t,e)=>a(t(l,o),e),subscribe:r.subscribe}}const{window:Ct}=et;function St(t,e,n){const o=t.slice();return o[42]=e[n],o[44]=n,o}function Pt(t){let e;return{c(){e=x("div"),C(e,"class","TransscriptItemBgDiv")},m(t,n){w(t,e,n)},d(t){t&&v(e)}}}function zt(e){let n,o;return{c(){n=x("div"),n.textContent="Listening...",C(n,"class","listening")},m(t,e){w(t,n,e)},i(t){o||W((()=>{o=tt(n,e[21],{duration:400}),o.start()}))},o:t,d(t){t&&v(n)}}}function Dt(e){let n,o;return{c(){n=x("div"),C(n,"class","TransscriptItemBgDiv")},m(t,e){w(t,n,e)},p(t,n){e=t},i(t){o||W((()=>{o=tt(n,e[21],{duration:e[14]}),o.start()}))},o:t,d(t){t&&v(n)}}}function Rt(t){let e,n;return{c(){e=x("span"),C(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;":"")&&C(e,"style",n)},d(t){t&&v(e)}}}function Ft(e){let n,o,i,r,s,c,l,a=e[42].word+"",u=e[16]&&Dt(e),d=e[44]<e[11].length&&Rt(e);return{c(){n=x("div"),u&&u.c(),o=T(),i=x("div"),r=_(a),s=T(),d&&d.c(),C(i,"class","TransscriptItemContent"),C(n,"class",l="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),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]&&Y(u,1):(u=Dt(e),u.c(),Y(u,1),u.m(n,o)):u&&(u.d(1),u=null),2048&s[0]&&a!==(a=e[42].word+"")&&function(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}(r,a),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]&&l!==(l="TranscriptItem "+e[23](e[42]))&&C(n,"class",l),2048&s[0]&&P(n,"Entity",null!==e[42].entityType),2048&s[0]&&P(n,"Final",e[42].isFinal)},i(t){Y(u),c||W((()=>{c=tt(i,e[21],{duration:e[14]}),c.start()}))},o:t,d(t){t&&v(n),u&&u.d(),d&&d.d()}}}function Nt(e){let n,o,i,r,s,c,l,a;return{c(){n=x("div"),o=x("div"),i=T(),r=x("div"),s=k("svg"),c=k("path"),C(o,"class","TransscriptItemBgDiv"),S(o,"background-color",e[5]),C(c,"stroke","currentColor"),C(c,"stroke-width","3"),C(c,"d","M7.191 11.444l4.059 6.107 7.376-12.949"),C(c,"fill","none"),C(c,"fill-rule","evenodd"),S(s,"width","2rem"),S(s,"height","2rem"),S(s,"position","absolute"),S(s,"transform","translate(-0.6rem, -0.5rem)"),S(s,"stroke","#eee"),C(s,"viewBox","0 0 24 24"),C(s,"xmlns","http://www.w3.org/2000/svg"),S(r,"width","1.0rem"),S(r,"height","1rem"),S(r,"position","relative"),C(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]&&S(o,"background-color",t[5])},i(t){l||W((()=>{l=tt(c,e[20],{duration:500}),l.start()})),a||W((()=>{a=tt(n,e[21],{duration:200,maxWidth:3}),a.start()}))},o:t,d(t){t&&v(n)}}}function At(t){let e;return{c(){e=x("link"),C(e,"href","https://fonts.googleapis.com/css2?family=Saira+Condensed:wght@700&display=swap"),C(e,"rel","stylesheet")},m(t,n){w(t,e,n)},d(t){t&&v(e)}}}function It(t){let e;return{c(){e=x("link"),C(e,"href",t[10]),C(e,"rel","stylesheet")},m(t,n){w(t,e,n)},p(t,n){1024&n[0]&&C(e,"href",t[10])},d(t){t&&v(e)}}}function Bt(e){let n,o,i,r,s,c,l,a,u,d,h,f,g,p,m,y=e[16]&&Pt(),b={color:e[5]};s=new xt({props:b}),e[34](s);let k=e[17]&&zt(e),_=e[11],z=[];for(let t=0;t<_.length;t+=1)z[t]=Ft(St(e,_,t));let D=e[13]&&Nt(e),R=e[15]&&At(),F=void 0!==e[10]&&It(e);return{c(){var g;n=x("main"),o=x("div"),y&&y.c(),i=T(),r=x("div"),(g=s.$$.fragment)&&g.c(),c=T(),k&&k.c(),l=T();for(let t=0;t<z.length;t+=1)z[t].c();a=T(),D&&D.c(),u=T(),R&&R.c(),d=E(),h=T(),F&&F.c(),f=E(),this.c=t,C(r,"class","TransscriptItemContent"),C(o,"class","TranscriptItem"),C(n,"class","BigTranscript"),S(n,"--voffset",e[1]),S(n,"--hoffset",e[2]),S(n,"--fontsize",e[3]),S(n,"--color",e[4]),S(n,"--highlight-color",e[5]),S(n,"--text-bg-color",e[6]),S(n,"--gradient-stop1",e[7]),S(n,"--gradient-stop2",e[8]),S(n,"--marginbottom",e[9]),S(n,"--transition",e[18].transition),S(n,"opacity",e[18].transition),S(n,"max-height",10*yt($t,e[18].transition,0,.6)+"rem"),S(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,i),$(o,r),nt(s,r,null),$(r,c),k&&k.m(r,null),$(n,l);for(let t=0;t<z.length;t+=1)z[t].m(n,null);var v,x,_,T;$(n,a),D&&D.m(n,null),w(t,u,b),R&&R.m(document.head,null),$(document.head,d),w(t,h,b),F&&F.m(t,b),w(t,f,b),g=!0,p||(v=Ct,x="message",_=e[22],v.addEventListener(x,_,T),m=()=>v.removeEventListener(x,_,T),p=!0)},p(t,e){t[16]?y||(y=Pt(),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]?k?131072&e[0]&&Y(k,1):(k=zt(t),k.c(),Y(k,1),k.m(r,null)):k&&(k.d(1),k=null),8464384&e[0]){let o;for(_=t[11],o=0;o<_.length;o+=1){const i=St(t,_,o);z[o]?(z[o].p(i,e),Y(z[o],1)):(z[o]=Ft(i),z[o].c(),Y(z[o],1),z[o].m(n,a))}for(;o<z.length;o+=1)z[o].d(1);z.length=_.length}t[13]?D?(D.p(t,e),8192&e[0]&&Y(D,1)):(D=Nt(t),D.c(),Y(D,1),D.m(n,null)):D&&(D.d(1),D=null),(!g||2&e[0])&&S(n,"--voffset",t[1]),(!g||4&e[0])&&S(n,"--hoffset",t[2]),(!g||8&e[0])&&S(n,"--fontsize",t[3]),(!g||16&e[0])&&S(n,"--color",t[4]),(!g||32&e[0])&&S(n,"--highlight-color",t[5]),(!g||64&e[0])&&S(n,"--text-bg-color",t[6]),(!g||128&e[0])&&S(n,"--gradient-stop1",t[7]),(!g||256&e[0])&&S(n,"--gradient-stop2",t[8]),(!g||512&e[0])&&S(n,"--marginbottom",t[9]),(!g||262144&e[0])&&S(n,"--transition",t[18].transition),(!g||262144&e[0])&&S(n,"opacity",t[18].transition),(!g||262144&e[0])&&S(n,"max-height",10*yt($t,t[18].transition,0,.6)+"rem"),(!g||262144&e[0])&&S(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=At(),R.c(),R.m(d.parentNode,d)):R&&(R.d(1),R=null),void 0!==t[10]?F?F.p(t,e):(F=It(t),F.c(),F.m(f.parentNode,f)):F&&(F.d(1),F=null)},i(t){if(!g){Y(s.$$.fragment,t),Y(k);for(let t=0;t<_.length;t+=1)Y(z[t]);Y(D),g=!0}},o(t){!function(t,e,n,o){if(t&&t.o){if(X.has(t))return;X.add(t),(void 0).c.push((()=>{X.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),ot(s),k&&k.d(),function(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}(z,t),D&&D.d(),t&&v(u),R&&R.d(t),v(d),t&&v(h),F&&F.d(t),t&&v(f),p=!1,m()}}}function Mt(t,e,n){let o,i,r,s,c,l,a,d,{placement:h}=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:w="#ffffffcc"}=e,{marginbottom:v="0rem"}=e,{formattext:x}=e,{demomode:k}=e,{customcssurl:_}=e,{customtypography:T}=e,E=[],C=null,S=null,P=ct.Disconnected,z=!1,D=!1,R=!1,F=Et({transition:0},{duration:200});u(t,F,(t=>n(18,a=t)));const N=B(),A=gt(mt),I=gt(((t,{delay:e=0,duration:n=350,maxWidth:o=10})=>({delay:e,duration:n,css:t=>`\n max-width: ${yt($t,t,0,1)*o}rem;\n `}))),M=t=>{n(13,R=R||t)},O=t=>{n(30,P=t),P===ct.Recording&&(n(13,R=!1),n(11,E=[]),S=null)},L=t=>{if(void 0===t)return;d&&(s||P===ct.Recording)&&d.updateVU(.5*Math.random()+.5,75*Math.random()+75),t.isFinal?V(E.length>0?s?3500:2e3:0):E.length>0&&(z||n(31,z=!0),V(2e3));const e=`${t.contextId}/${t.id}`;null!==S?S!==e&&(n(13,R=!1),S=e):S=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)))},V=(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,h=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,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,_=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===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,l=s?800:350),1073741824&t.$$.dirty[0]|3&t.$$.dirty[1]){const t=P===ct.Recording||z;t!==D&&(e="visibilitychanged",a=t,N.dispatchEvent(new CustomEvent(e,{detail:a,composed:!0}))),n(32,D=t),F.set({transition:D?1:0})}var e,a;4&t.$$.dirty[1]&&(s||V(0))},[h,f,g,p,m,$,y,b,w,v,_,E,d,R,l,c,i,o,a,F,A,I,t=>{switch(t.data.type){case at.speechsegment:L(t.data.segment);break;case at.speechhandled:M(t.data.success);break;case at.speechstate:O(t.data.state)}},t=>t.entityType||"",x,k,T,M,O,L,P,z,D,s,function(t){j[t?"unshift":"push"]((()=>{d=t,n(12,d)}))}]}class jt extends st{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>",rt(this,{target:this.shadowRoot,props:z(this.attributes),customElement:!0},Mt,Bt,l,{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),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]}}customElements.get("big-transcript")?console.warn("Skipping re-defining customElement big-transcript"):customElements.define("big-transcript",jt)})); | ||
//# sourceMappingURL=big-transcript.js.map |
export {}; | ||
//# sourceMappingURL=call-out.d.ts.map |
@@ -1,2 +0,2 @@ | ||
!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 s(t){return"function"==typeof t}function i(t,e){return t!=t?e==e:t!==e}const a="undefined"!=typeof window;let c=a?()=>window.performance.now():()=>Date.now(),l=a?t=>requestAnimationFrame(t):t;const u=new Set;function d(t){u.forEach((e=>{e.c(t)||(u.delete(e),e.f())})),0!==u.size&&l(d)}function f(t){let e;return 0===u.size&&l(d),{promise:new Promise((n=>{u.add(e={c:t,f:n})})),abort(){u.delete(e)}}}function h(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 $(t){const e=v("style");return function(t,e){h(t.head||t,e)}(m(t),e),e}function p(t,e,n){t.insertBefore(e,n||null)}function g(t){t.parentNode.removeChild(t)}function v(t){return document.createElement(t)}function w(){return t=" ",document.createTextNode(t);var t}function b(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function x(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function y(t,e,n,o){t.style.setProperty(e,n,o?"important":"")}function _(t){const e={};for(const n of t)e[n.name]=n.value;return e}const k=new Set;let z,E=0;function C(t,e,n,o,r,s,i,a=0){const c=16.666/o;let l="{\n";for(let t=0;t<=1;t+=c){const o=e+(n-e)*s(t);l+=100*t+`%{${i(o,1-o)}}\n`}const u=l+`100% {${i(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)}_${a}`,f=m(t);k.add(f);const h=f.__svelte_stylesheet||(f.__svelte_stylesheet=$(t).sheet),p=f.__svelte_rules||(f.__svelte_rules={});p[d]||(p[d]=!0,h.insertRule(`@keyframes ${d} ${u}`,h.cssRules.length));const g=t.style.animation||"";return t.style.animation=`${g?`${g}, `:""}${d} ${o}ms linear ${r}ms 1 both`,E+=1,d}function D(t,e){const n=(t.style.animation||"").split(", "),o=n.filter(e?t=>t.indexOf(e)<0:t=>-1===t.indexOf("__svelte")),r=n.length-o.length;r&&(t.style.animation=o.join(", "),E-=r,E||l((()=>{E||(k.forEach((t=>{const e=t.__svelte_stylesheet;let n=e.cssRules.length;for(;n--;)e.deleteRule(n);t.__svelte_rules={}})),k.clear())})))}function S(t){z=t}const A=[],R=[],T=[],L=[],O=Promise.resolve();let P=!1;function M(t){T.push(t)}let N=!1;const j=new Set;function H(){if(!N){N=!0;do{for(let t=0;t<A.length;t+=1){const e=A[t];S(e),q(e.$$)}for(S(null),A.length=0;R.length;)R.pop()();for(let t=0;t<T.length;t+=1){const e=T[t];j.has(e)||(j.add(e),e())}T.length=0}while(A.length);for(;L.length;)L.pop()();P=!1,N=!1,j.clear()}}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(M)}}let B;function F(){return B||(B=Promise.resolve(),B.then((()=>{B=null}))),B}function G(t,e,n){t.dispatchEvent(function(t,e,n=!1){const o=document.createEvent("CustomEvent");return o.initCustomEvent(t,n,!1,e),o}(`${e?"intro":"outro"}${n}`))}const I=new Set;let J;function K(t,e){t&&t.i&&(I.delete(t),t.i(e))}function Q(t,e,n,o){if(t&&t.o){if(I.has(t))return;I.add(t),J.c.push((()=>{I.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}const U={duration:0};function V(t,e){-1===t.$$.dirty[0]&&(A.push(t),P||(P=!0,O.then(H)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function W(e,i,a,c,l,u,d,f=[-1]){const h=z;S(e);const m=e.$$={fragment:null,ctx:null,props:u,update:t,not_equal:l,bound:o(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(i.context||(h?h.$$.context:[])),callbacks:o(),dirty:f,skip_bound:!1,root:i.target||h.$$.root};d&&d(m.root);let $=!1;if(m.ctx=a?a(e,i.props||{},((t,n,...o)=>{const r=o.length?o[0]:n;return m.ctx&&l(m.ctx[t],m.ctx[t]=r)&&(!m.skip_bound&&m.bound[t]&&m.bound[t](r),$&&V(e,t)),n})):[],m.update(),$=!0,r(m.before_update),m.fragment=!!c&&c(m.ctx),i.target){if(i.hydrate){const t=function(t){return Array.from(t.childNodes)}(i.target);m.fragment&&m.fragment.l(t),t.forEach(g)}else m.fragment&&m.fragment.c();i.intro&&K(e.$$.fragment),function(t,e,o,i){const{fragment:a,on_mount:c,on_destroy:l,after_update:u}=t.$$;a&&a.m(e,o),i||M((()=>{const e=c.map(n).filter(s);l?l.push(...e):r(e),t.$$.on_mount=[]})),u.forEach(M)}(e,i.target,i.anchor,i.customElement),H()}S(h)}let X;function Y(n){let o,i,a,l,u,d,m,$,_,k,z=tt;return{c(){o=v("div"),i=v("div"),i.innerHTML="<slot></slot>",a=w(),l=v("div"),u=w(),z&&z.c(),x(i,"class","CalloutDiv"),function(t,e,n){t.classList[n?"add":"remove"](e)}(i,"useShadow",tt),x(l,"class","ArrowDiv"),y(l,"--ax","50%"),y(l,"--ay","100%"),x(o,"class","CalloutContainerDiv")},m(t,e){p(t,o,e),h(o,i),h(o,a),h(o,l),h(o,u),z&&z.m(o,null),$=!0,_||(k=[b(o,"mousedown",n[8]),b(o,"touchstart",n[8]),b(o,"dragstart",n[8])],_=!0)},p:t,i(r){$||(M((()=>{m&&m.end(1),d=function(n,o,r){let i,a,l=o(n,r),u=!1,d=0;function h(){i&&D(n,i)}function m(){const{delay:o=0,duration:r=300,easing:s=e,tick:m=t,css:$}=l||U;$&&(i=C(n,0,1,r,o,s,$,d++)),m(0,1);const p=c()+o,g=p+r;a&&a.abort(),u=!0,M((()=>G(n,!0,"start"))),a=f((t=>{if(u){if(t>=g)return m(1,0),G(n,!0,"end"),h(),u=!1;if(t>=p){const e=s((t-p)/r);m(e,1-e)}}return u}))}let $=!1;return{start(){$||($=!0,D(n),s(l)?(l=l(),F().then(m)):m())},invalidate(){$=!1},end(){u&&(h(),u=!1)}}}(o,n[7],{}),d.start()})),$=!0)},o(i){d&&d.invalidate(),m=function(n,o,i){let a,l=o(n,i),u=!0;const d=J;function h(){const{delay:o=0,duration:s=300,easing:i=e,tick:h=t,css:m}=l||U;m&&(a=C(n,1,0,s,o,i,m));const $=c()+o,p=$+s;M((()=>G(n,!1,"start"))),f((t=>{if(u){if(t>=p)return h(0,1),G(n,!1,"end"),--d.r||r(d.c),!1;if(t>=$){const e=i((t-$)/s);h(1-e,e)}}return u}))}return d.r+=1,s(l)?F().then((()=>{l=l(),h()})):h(),{end(t){t&&l.tick&&l.tick(1,0),u&&(a&&D(n,a),u=!1)}}}(o,n[7],{}),$=!1},d(t){t&&g(o),z&&z.d(),t&&m&&m.end(),_=!1,r(k)}}}function Z(e){let n,o,s,i,a=e[3]&&Y(e);return{c(){n=v("main"),a&&a.c(),o=w(),s=v("link"),this.c=t,y(n,"--ax",e[4].x),y(n,"--ay",e[4].y),y(n,"--halign",e[5].x),y(n,"--valign",e[5].y),y(n,"--borderradius",et),y(n,"--arrowpad",`${e[6].value}${e[6].unit}`),y(n,"--textcolor",e[1]),y(n,"--backgroundcolor",e[2]),y(n,"--size",`${e[6].value*Math.sqrt(2)}${e[6].unit}`),y(n,"--fontsize",e[0]),y(n,"--offsetx","0rem"),y(n,"--offsety",`${e[6].value}${e[6].unit}`),x(s,"href","https://fonts.googleapis.com/css2?family=Saira+Condensed:wght@700&display=swap"),x(s,"rel","stylesheet")},m(t,e){p(t,n,e),a&&a.m(n,null),p(t,o,e),h(document.head,s),i=!0},p(t,[e]){t[3]?a?(a.p(t,e),8&e&&K(a,1)):(a=Y(t),a.c(),K(a,1),a.m(n,null)):a&&(J={r:0,c:[],p:J},Q(a,1,1,(()=>{a=null})),J.r||r(J.c),J=J.p),(!i||2&e)&&y(n,"--textcolor",t[1]),(!i||4&e)&&y(n,"--backgroundcolor",t[2]),(!i||1&e)&&y(n,"--fontsize",t[0])},i(t){i||(K(a),i=!0)},o(t){Q(a),i=!1},d(t){t&&g(n),a&&a.d(),t&&g(o),g(s)}}}"function"==typeof HTMLElement&&(X=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(n).filter(s);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){r(this.$$.on_disconnect)}$destroy(){!function(t,e){const n=t.$$;null!==n.fragment&&(r(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});let tt=!1,et="0rem";function nt(t,e,n){let{show:o}=e,{showtime:r=1e4}=e,{fontsize:s="1.2rem"}=e,{textcolor:i="#ffffff"}=e,{backgroundcolor:a="#202020"}=e,c=null,l=!1;const u=(d=(t,{duration:e=250})=>({duration:e,css:t=>`\n clip-path: circle(${100*t}% at center);\n `}),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 d(t,e)});var d;return t.$$set=t=>{"show"in t&&n(9,o=t.show),"showtime"in t&&n(10,r=t.showtime),"fontsize"in t&&n(0,s=t.fontsize),"textcolor"in t&&n(1,i=t.textcolor),"backgroundcolor"in t&&n(2,a=t.backgroundcolor)},t.$$.update=()=>{512&t.$$.dirty&&(t=>{null!==c&&(window.clearTimeout(c),c=null),void 0!==t&&"false"!==t?c=window.setTimeout((()=>{n(3,l=!0),c=null,r>0&&(c=window.setTimeout((()=>{n(3,l=!1),c=null}),r))}),500):n(3,l=!1)})(o)},[s,i,a,l,{x:"50%",y:"10%"},{x:"50%",y:"100%"},{value:.55,unit:"rem"},u,t=>{t.preventDefault(),t.stopPropagation(),n(3,l=!1)},o,r]}class ot extends X{constructor(t){super(),this.shadowRoot.innerHTML="<style>main{margin:0;padding:0}.CalloutContainerDiv{position:absolute;left:var(--ax);top:var(--ay);transform:translate(calc(-1 * var(--halign)), calc(-1 * var(--valign)));padding:var(--arrowpad);z-index:10;pointer-events:auto}.CalloutDiv{position:relative;box-sizing:border-box;min-width:8rem;border-radius:var(--borderradius);padding:0.50rem 1rem;background-color:var(--backgroundcolor);text-align:center;user-select:none;z-index:10;color:var(--textcolor);font-family:'Saira Condensed', sans-serif;font-size:var(--fontsize);line-height:120%;text-transform:uppercase}.useShadow{box-shadow:0 0.2rem 0.5rem #00000040}.ArrowDiv{position:absolute;left:calc(var(--ax) - var(--offsetx));top:calc(var(--ay) - var(--offsety));transform:translate(-50%, -50%) rotate(45deg);width:var(--size);height:var(--size);background-color:var(--backgroundcolor);z-index:10}.ArrowShadowDiv{position:absolute;left:calc(var(--ax) - var(--offsetx));top:calc(var(--ay) - var(--offsety));transform:translate(-50%, -50%) rotate(45deg);width:var(--size);height:var(--size);background-color:var(--backgroundcolor);background-color:#00000000;box-shadow:0 0.2rem 0.5rem #00000040;z-index:9}</style>",W(this,{target:this.shadowRoot,props:_(this.attributes),customElement:!0},nt,Z,i,{show:9,showtime:10,fontsize:0,textcolor:1,backgroundcolor:2},null),t&&(t.target&&p(t.target,this,t.anchor),t.props&&(this.$set(t.props),H()))}static get observedAttributes(){return["show","showtime","fontsize","textcolor","backgroundcolor"]}get show(){return this.$$.ctx[9]}set show(t){this.$$set({show:t}),H()}get showtime(){return this.$$.ctx[10]}set showtime(t){this.$$set({showtime:t}),H()}get fontsize(){return this.$$.ctx[0]}set fontsize(t){this.$$set({fontsize:t}),H()}get textcolor(){return this.$$.ctx[1]}set textcolor(t){this.$$set({textcolor:t}),H()}get backgroundcolor(){return this.$$.ctx[2]}set backgroundcolor(t){this.$$set({backgroundcolor:t}),H()}}customElements.get("call-out")?console.warn("Skipping re-defining customElement call-out"):customElements.define("call-out",ot)})); | ||
!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}const a="undefined"!=typeof window;let c=a?()=>window.performance.now():()=>Date.now(),l=a?t=>requestAnimationFrame(t):t;const u=new Set;function d(t){u.forEach((e=>{e.c(t)||(u.delete(e),e.f())})),0!==u.size&&l(d)}function f(t){let e;return 0===u.size&&l(d),{promise:new Promise((n=>{u.add(e={c:t,f:n})})),abort(){u.delete(e)}}}function h(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 $(t){const e=v("style");return function(t,e){h(t.head||t,e)}(m(t),e),e}function g(t,e,n){t.insertBefore(e,n||null)}function p(t){t.parentNode.removeChild(t)}function v(t){return document.createElement(t)}function w(){return t=" ",document.createTextNode(t);var t}function b(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function x(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function y(t,e,n,o){t.style.setProperty(e,n,o?"important":"")}function _(t){const e={};for(const n of t)e[n.name]=n.value;return e}const k=new Set;let E,C=0;function D(t,e,n,o,r,i,s,a=0){const c=16.666/o;let l="{\n";for(let t=0;t<=1;t+=c){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)}_${a}`,f=m(t);k.add(f);const h=f.__svelte_stylesheet||(f.__svelte_stylesheet=$(t).sheet),g=f.__svelte_rules||(f.__svelte_rules={});g[d]||(g[d]=!0,h.insertRule(`@keyframes ${d} ${u}`,h.cssRules.length));const p=t.style.animation||"";return t.style.animation=`${p?`${p}, `:""}${d} ${o}ms linear ${r}ms 1 both`,C+=1,d}function z(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(", "),C-=r,C||l((()=>{C||(k.forEach((t=>{const e=t.__svelte_stylesheet;let n=e.cssRules.length;for(;n--;)e.deleteRule(n);t.__svelte_rules={}})),k.clear())})))}function A(t){E=t}const S=[],R=[],T=[],L=[],O=Promise.resolve();let P=!1;function M(t){T.push(t)}let N=!1;const j=new Set;function H(){if(!N){N=!0;do{for(let t=0;t<S.length;t+=1){const e=S[t];A(e),q(e.$$)}for(A(null),S.length=0;R.length;)R.pop()();for(let t=0;t<T.length;t+=1){const e=T[t];j.has(e)||(j.add(e),e())}T.length=0}while(S.length);for(;L.length;)L.pop()();P=!1,N=!1,j.clear()}}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(M)}}let B;function F(){return B||(B=Promise.resolve(),B.then((()=>{B=null}))),B}function G(t,e,n){t.dispatchEvent(function(t,e,n=!1){const o=document.createEvent("CustomEvent");return o.initCustomEvent(t,n,!1,e),o}(`${e?"intro":"outro"}${n}`))}const I=new Set;let J;function K(t,e){t&&t.i&&(I.delete(t),t.i(e))}function Q(t,e,n,o){if(t&&t.o){if(I.has(t))return;I.add(t),J.c.push((()=>{I.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}const U={duration:0};function V(t,e){-1===t.$$.dirty[0]&&(S.push(t),P||(P=!0,O.then(H)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function W(e,s,a,c,l,u,d,f=[-1]){const h=E;A(e);const m=e.$$={fragment:null,ctx:null,props:u,update:t,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};d&&d(m.root);let $=!1;if(m.ctx=a?a(e,s.props||{},((t,n,...o)=>{const r=o.length?o[0]:n;return m.ctx&&l(m.ctx[t],m.ctx[t]=r)&&(!m.skip_bound&&m.bound[t]&&m.bound[t](r),$&&V(e,t)),n})):[],m.update(),$=!0,r(m.before_update),m.fragment=!!c&&c(m.ctx),s.target){if(s.hydrate){const t=function(t){return Array.from(t.childNodes)}(s.target);m.fragment&&m.fragment.l(t),t.forEach(p)}else m.fragment&&m.fragment.c();s.intro&&K(e.$$.fragment),function(t,e,o,s){const{fragment:a,on_mount:c,on_destroy:l,after_update:u}=t.$$;a&&a.m(e,o),s||M((()=>{const e=c.map(n).filter(i);l?l.push(...e):r(e),t.$$.on_mount=[]})),u.forEach(M)}(e,s.target,s.anchor,s.customElement),H()}A(h)}let X;function Y(n){let o,s,a,l,u,d,m,$,_,k,E=tt;return{c(){o=v("div"),s=v("div"),s.innerHTML="<slot></slot>",a=w(),l=v("div"),u=w(),E&&E.c(),x(s,"class","CalloutDiv"),function(t,e,n){t.classList[n?"add":"remove"](e)}(s,"useShadow",tt),x(l,"class","ArrowDiv"),y(l,"--ax",n[3].x),y(l,"--ay","100%"),x(o,"class","CalloutContainerDiv"),y(o,"width",n[1])},m(t,e){g(t,o,e),h(o,s),h(o,a),h(o,l),h(o,u),E&&E.m(o,null),$=!0,_||(k=[b(o,"mousedown",n[7]),b(o,"touchstart",n[7]),b(o,"dragstart",n[7])],_=!0)},p(t,e){(!$||8&e)&&y(l,"--ax",t[3].x),(!$||2&e)&&y(o,"width",t[1])},i(r){$||(M((()=>{m&&m.end(1),d=function(n,o,r){let s,a,l=o(n,r),u=!1,d=0;function h(){s&&z(n,s)}function m(){const{delay:o=0,duration:r=300,easing:i=e,tick:m=t,css:$}=l||U;$&&(s=D(n,0,1,r,o,i,$,d++)),m(0,1);const g=c()+o,p=g+r;a&&a.abort(),u=!0,M((()=>G(n,!0,"start"))),a=f((t=>{if(u){if(t>=p)return m(1,0),G(n,!0,"end"),h(),u=!1;if(t>=g){const e=i((t-g)/r);m(e,1-e)}}return u}))}let $=!1;return{start(){$||($=!0,z(n),i(l)?(l=l(),F().then(m)):m())},invalidate(){$=!1},end(){u&&(h(),u=!1)}}}(o,n[6],{}),d.start()})),$=!0)},o(s){d&&d.invalidate(),m=function(n,o,s){let a,l=o(n,s),u=!0;const d=J;function h(){const{delay:o=0,duration:i=300,easing:s=e,tick:h=t,css:m}=l||U;m&&(a=D(n,1,0,i,o,s,m));const $=c()+o,g=$+i;M((()=>G(n,!1,"start"))),f((t=>{if(u){if(t>=g)return h(0,1),G(n,!1,"end"),--d.r||r(d.c),!1;if(t>=$){const e=s((t-$)/i);h(1-e,e)}}return u}))}return d.r+=1,i(l)?F().then((()=>{l=l(),h()})):h(),{end(t){t&&l.tick&&l.tick(1,0),u&&(a&&z(n,a),u=!1)}}}(o,n[6],{}),$=!1},d(t){t&&p(o),E&&E.d(),t&&m&&m.end(),_=!1,r(k)}}}function Z(e){let n,o,i=e[2]&&Y(e);return{c(){n=v("main"),i&&i.c(),this.c=t,y(n,"--ax",e[4].x),y(n,"--ay",e[4].y),y(n,"--halign",e[3].x),y(n,"--valign",e[3].y),y(n,"--borderradius",et),y(n,"--arrowpad",`${e[5].value}${e[5].unit}`),y(n,"--backgroundcolor",e[0]),y(n,"--size",`${e[5].value*Math.sqrt(2)}${e[5].unit}`),y(n,"--offsetx","0rem"),y(n,"--offsety",`${e[5].value}${e[5].unit}`)},m(t,e){g(t,n,e),i&&i.m(n,null),o=!0},p(t,[e]){t[2]?i?(i.p(t,e),4&e&&K(i,1)):(i=Y(t),i.c(),K(i,1),i.m(n,null)):i&&(J={r:0,c:[],p:J},Q(i,1,1,(()=>{i=null})),J.r||r(J.c),J=J.p),(!o||8&e)&&y(n,"--halign",t[3].x),(!o||8&e)&&y(n,"--valign",t[3].y),(!o||1&e)&&y(n,"--backgroundcolor",t[0])},i(t){o||(K(i),o=!0)},o(t){Q(i),o=!1},d(t){t&&p(n),i&&i.d()}}}"function"==typeof HTMLElement&&(X=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)}});let tt=!1,et="0rem";function nt(t,e,n){let o,{show:r}=e,{showtime:i=1e4}=e,{backgroundcolor:s="#202020"}=e,{xalign:a="50%"}=e,{width:c="auto"}=e,l=null,u=!1;const d=(f=(t,{duration:e=250})=>({duration:e,css:t=>`\n clip-path: circle(${100*t}% at ${o.x} 50%);\n `}),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 f(t,e)});var f;return t.$$set=t=>{"show"in t&&n(8,r=t.show),"showtime"in t&&n(9,i=t.showtime),"backgroundcolor"in t&&n(0,s=t.backgroundcolor),"xalign"in t&&n(10,a=t.xalign),"width"in t&&n(1,c=t.width)},t.$$.update=()=>{1024&t.$$.dirty&&n(3,o={x:a,y:"100%"}),256&t.$$.dirty&&(t=>{null!==l&&(window.clearTimeout(l),l=null),void 0!==t&&"false"!==t?l=window.setTimeout((()=>{n(2,u=!0),l=null,i>0&&(l=window.setTimeout((()=>{n(2,u=!1),l=null}),i))}),500):n(2,u=!1)})(r)},[s,c,u,o,{x:"50%",y:"10%"},{value:.55,unit:"rem"},d,t=>{t.preventDefault(),t.stopPropagation(),n(2,u=!1)},r,i,a]}class ot extends X{constructor(t){super(),this.shadowRoot.innerHTML="<style>main{margin:0;padding:0}.CalloutContainerDiv{position:absolute;left:var(--ax);top:var(--ay);transform:translate(calc(-1 * var(--halign)), calc(-1 * var(--valign)));padding:var(--arrowpad);z-index:10;pointer-events:auto}.CalloutDiv{position:relative;box-sizing:border-box;min-width:8rem;border-radius:var(--borderradius);padding:0.50rem 1rem;background-color:var(--backgroundcolor);text-align:center;user-select:none;z-index:10}.useShadow{box-shadow:0 0.2rem 0.5rem #00000040}.ArrowDiv{position:absolute;left:calc(var(--ax) - var(--offsetx));top:calc(var(--ay) - var(--offsety));transform:translate(-50%, -50%) rotate(45deg);width:var(--size);height:var(--size);background-color:var(--backgroundcolor);z-index:10}.ArrowShadowDiv{position:absolute;left:calc(var(--ax) - var(--offsetx));top:calc(var(--ay) - var(--offsety));transform:translate(-50%, -50%) rotate(45deg);width:var(--size);height:var(--size);background-color:var(--backgroundcolor);background-color:#00000000;box-shadow:0 0.2rem 0.5rem #00000040;z-index:9}</style>",W(this,{target:this.shadowRoot,props:_(this.attributes),customElement:!0},nt,Z,s,{show:8,showtime:9,backgroundcolor:0,xalign:10,width:1},null),t&&(t.target&&g(t.target,this,t.anchor),t.props&&(this.$set(t.props),H()))}static get observedAttributes(){return["show","showtime","backgroundcolor","xalign","width"]}get show(){return this.$$.ctx[8]}set show(t){this.$$set({show:t}),H()}get showtime(){return this.$$.ctx[9]}set showtime(t){this.$$set({showtime:t}),H()}get backgroundcolor(){return this.$$.ctx[0]}set backgroundcolor(t){this.$$set({backgroundcolor:t}),H()}get xalign(){return this.$$.ctx[10]}set xalign(t){this.$$set({xalign:t}),H()}get width(){return this.$$.ctx[1]}set width(t){this.$$set({width:t}),H()}}customElements.get("call-out")?console.warn("Skipping re-defining customElement call-out"):customElements.define("call-out",ot)})); | ||
//# sourceMappingURL=call-out.js.map |
@@ -1,4 +0,5 @@ | ||
import type { Segment } from "@speechly/browser-client"; | ||
import type { Segment } from "./types"; | ||
export declare type SpeechSegmentCallback = (s: Segment) => void; | ||
export declare const startDemo: (demoStrings: string[], onSegmentCallback?: SpeechSegmentCallback) => void; | ||
export declare const stopDemo: () => void; | ||
//# sourceMappingURL=demomode.d.ts.map |
@@ -66,3 +66,2 @@ var timeout = undefined; | ||
const id = 0; | ||
//const contextId = "e310e11e-95d4-4f22-98dd-388a1bd84718" | ||
if (lastToken === undefined) | ||
@@ -69,0 +68,0 @@ lastToken = tokenizedSal.tokens.length; |
export {}; | ||
//# sourceMappingURL=error-panel.d.ts.map |
@@ -1,3 +0,2 @@ | ||
!function(n){"function"==typeof define&&define.amd?define(n):n()}((function(){"use strict";function n(){}function t(n){return n()}function e(){return Object.create(null)}function r(n){n.forEach(t)}function o(n){return"function"==typeof n}function a(n,t){return n!=n?t==t:n!==t}function i(n,t){n.appendChild(t)}function c(n,t,e){n.insertBefore(t,e||null)}function u(n){n.parentNode.removeChild(n)}function s(n){return document.createElement(n)}function l(n){return document.createTextNode(n)}function d(){return l(" ")}function f(n,t,e,r){return n.addEventListener(t,e,r),()=>n.removeEventListener(t,e,r)}function p(n,t,e){null==e?n.removeAttribute(t):n.getAttribute(t)!==e&&n.setAttribute(t,e)}function h(n,t,e){n.classList[e?"add":"remove"](t)}function g(n){const t={};for(const e of n)t[e.name]=e.value;return t}let m;function v(n){m=n}const S=[],b=[],y=[],C=[],w=Promise.resolve();let M=!1;function A(n){y.push(n)}let T=!1;const N=new Set;function I(){if(!T){T=!0;do{for(let n=0;n<S.length;n+=1){const t=S[n];v(t),B(t.$$)}for(v(null),S.length=0;b.length;)b.pop()();for(let n=0;n<y.length;n+=1){const t=y[n];N.has(t)||(N.add(t),t())}y.length=0}while(S.length);for(;C.length;)C.pop()();M=!1,T=!1,N.clear()}}function B(n){if(null!==n.fragment){n.update(),r(n.before_update);const t=n.dirty;n.dirty=[-1],n.fragment&&n.fragment.p(n.ctx,t),n.after_update.forEach(A)}}const E=new Set;const R="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function x(n,t){-1===n.$$.dirty[0]&&(S.push(n),M||(M=!0,w.then(I)),n.$$.dirty.fill(0)),n.$$.dirty[t/31|0]|=1<<t%31}function $(a,i,c,s,l,d,f,p=[-1]){const h=m;v(a);const g=a.$$={fragment:null,ctx:null,props:d,update:n,not_equal:l,bound:e(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(i.context||(h?h.$$.context:[])),callbacks:e(),dirty:p,skip_bound:!1,root:i.target||h.$$.root};f&&f(g.root);let S=!1;if(g.ctx=c?c(a,i.props||{},((n,t,...e)=>{const r=e.length?e[0]:t;return g.ctx&&l(g.ctx[n],g.ctx[n]=r)&&(!g.skip_bound&&g.bound[n]&&g.bound[n](r),S&&x(a,n)),t})):[],g.update(),S=!0,r(g.before_update),g.fragment=!!s&&s(g.ctx),i.target){if(i.hydrate){const n=function(n){return Array.from(n.childNodes)}(i.target);g.fragment&&g.fragment.l(n),n.forEach(u)}else g.fragment&&g.fragment.c();i.intro&&((b=a.$$.fragment)&&b.i&&(E.delete(b),b.i(y))),function(n,e,a,i){const{fragment:c,on_mount:u,on_destroy:s,after_update:l}=n.$$;c&&c.m(e,a),i||A((()=>{const e=u.map(t).filter(o);s?s.push(...e):r(e),n.$$.on_mount=[]})),l.forEach(A)}(a,i.target,i.anchor,i.customElement),I()}var b,y;v(h)}let P;var G;"function"==typeof HTMLElement&&(P=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:n}=this.$$;this.$$.on_disconnect=n.map(t).filter(o);for(const n in this.$$.slotted)this.appendChild(this.$$.slotted[n])}attributeChangedCallback(n,t,e){this[n]=e}disconnectedCallback(){r(this.$$.on_disconnect)}$destroy(){!function(n,t){const e=n.$$;null!==e.fragment&&(r(e.on_destroy),e.fragment&&e.fragment.d(t),e.on_destroy=e.fragment=null,e.ctx=[])}(this,1),this.$destroy=n}$on(n,t){const e=this.$$.callbacks[n]||(this.$$.callbacks[n]=[]);return e.push(t),()=>{const n=e.indexOf(t);-1!==n&&e.splice(n,1)}}$set(n){var t;this.$$set&&(t=n,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(n),this.$$.skip_bound=!1)}}),function(n){n[n.Failed=0]="Failed",n[n.NoBrowserSupport=1]="NoBrowserSupport",n[n.NoAudioConsent=2]="NoAudioConsent",n[n.Disconnected=3]="Disconnected",n[n.Disconnecting=4]="Disconnecting",n[n.Connecting=5]="Connecting",n[n.Connected=6]="Connected",n[n.Starting=7]="Starting",n[n.Stopping=8]="Stopping",n[n.Recording=9]="Recording"}(G||(G={})),new Map([[G.Failed,"Failed"],[G.NoBrowserSupport,"NoBrowserSupport"],[G.NoAudioConsent,"NoAudioConsent"],[G.Disconnecting,"Disconnecting"],[G.Disconnected,"Disconnected"],[G.Connecting,"Connecting"],[G.Connected,"Connected"],[G.Starting,"Starting"],[G.Stopping,"Stopping"],[G.Recording,"Recording"]]);var k="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var L,O,F=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},D=F;function H(n,t,e,r){return n.call(r,t[e],e,t)}var K=function(n,t,e){var r,o=0;for(r in null==L&&function(){for(var n in O=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],L=!0,{toString:null})L=!1}(),n)if(!1===H(t,n,r,e))break;if(L)for(var a=n.constructor,i=!!a&&n===a.prototype;(r=O[o++])&&("constructor"===r&&(i||!D(n,r))||n[r]===Object.prototype[r]||!1!==H(t,n,r,e)););},_=K;var U=function(n){var t=[];return _(n,(function(n,e){"function"==typeof n&&t.push(e)})),t.sort()};var j=function(n,t,e){var r=n.length;t=null==t?0:t<0?Math.max(r+t,0):Math.min(t,r),e=null==e?r:e<0?Math.max(r+e,0):Math.min(e,r);for(var o=[];t<e;)o.push(n[t++]);return o},z=j;var V=function(n,t,e){var r=z(arguments,2);return function(){return n.apply(t,r.concat(z(arguments)))}};var Z=function(n,t,e){if(null!=n)for(var r=-1,o=n.length;++r<o&&!1!==t.call(e,n[r],r,n););},W=U,J=V,q=Z,Y=j;var Q=function(n,t){var e=arguments.length>1?Y(arguments,1):W(n);q(e,(function(t){n[t]=J(n[t],n)}))},X=F,nn=K;var tn=function(n,t,e){nn(n,(function(r,o){if(X(n,o))return t.call(e,n[o],o,n)}))};var en=function(n){return n};var rn=function(n){return function(t){return t[n]}},on=/^\[object (.*)\]$/,an=Object.prototype.toString;var cn=function(n){return null===n?"Null":undefined===n?"Undefined":on.exec(an.call(n))[1]},un=cn;var sn=function(n,t){return un(n)===t},ln=sn,dn=Array.isArray||function(n){return ln(n,"Array")},fn=tn,pn=dn;function hn(n,t){for(var e=-1,r=n.length;++e<r;)if(gn(n[e],t))return!0;return!1}function gn(n,t){return n&&"object"==typeof n?pn(n)&&pn(t)?function(n,t){for(var e=-1,r=t.length;++e<r;)if(!hn(n,t[e]))return!1;return!0}(n,t):function(n,t){var e=!0;return fn(t,(function(t,r){if(!gn(n[r],t))return e=!1})),e}(n,t):n===t}var mn=gn,vn=en,Sn=rn,bn=mn;var yn=function(n,t){if(null==n)return vn;switch(typeof n){case"function":return void 0!==t?function(e,r,o){return n.call(t,e,r,o)}:n;case"object":return function(t){return bn(t,n)};case"string":case"number":return Sn(n)}},Cn=tn,wn=yn;var Mn=function(n,t,e){t=wn(t,e);var r=!1;return Cn(n,(function(e,o){if(t(e,o,n))return r=!0,!1})),r},An=Mn;var Tn=function(n,t){return An(n,(function(n){return n===t}))};var Nn=function(n){return!!n&&"object"==typeof n&&n.constructor===Object},In=tn,Bn=Nn;var En=function n(t,e){for(var r,o=0,a=arguments.length;++o<a;)(r=arguments[o])&&In(r,(function(e,r){var o=t[r];null==o?t[r]=e:Bn(o)&&Bn(e)&&n(o,e)}));return t},Rn=tn,xn=Nn;function $n(n,t){for(var e,r=0,o=arguments.length;++r<o;)(e=arguments[r])&&Rn(e,Pn,n);return n}function Pn(n,t){var e=this[t];xn(n)&&xn(e)?$n(e,n):this[t]=n}var Gn=$n,kn=tn,Ln=yn;var On=function(n,t,e){t=Ln(t,e);var r=!0;return kn(n,(function(e,o){if(!t(e,o,n))return r=!1,!1})),r},Fn=sn;var Dn=function(n){return Fn(n,"Object")};var Hn=F,Kn=On,_n=Dn,Un=function(n,t){return n===t?0!==n||1/n==1/t:n!=n&&t!=t};function jn(n,t){return Hn(this,t)}var zn=function(n,t,e){return e=e||Un,_n(n)&&_n(t)?Kn(n,function(n){return function(t,e){return Hn(this,e)&&n(t,this[e])}}(e),t)&&Kn(t,jn,n):e(n,t)},Vn=Z,Zn=j,Wn=tn;var Jn=function(n,t){return Vn(Zn(arguments,1),(function(t){Wn(t,(function(t,e){null==n[e]&&(n[e]=t)}))})),n},qn=tn,Yn=yn;var Qn=function(n,t,e){t=Yn(t,e);var r={};return qn(n,(function(n,e,o){t(n,e,o)&&(r[e]=n)})),r},Xn=Mn,nt=yn;var tt=function(n,t,e){var r;return t=nt(t,e),Xn(n,(function(n,e,o){if(t(n,e,o))return r=n,!0})),r},et=tn,rt=Nn;function ot(n,t,e,r){return et(n,(function(n,o){var a=e?e+"."+o:o;0!==r&&rt(n)?ot(n,t,a,r-1):t[a]=n})),t}var at=function(n,t){return null==n?{}:ot(n,{},"",t=null==t?-1:t)};var it=function(n,t){for(var e=t.split("."),r=e.pop();t=e.shift();)if(null==(n=n[t]))return;return n[r]},ct=it;var ut=function(n,t){return undefined!==ct(n,t)},st=tn,lt=Object.keys||function(n){var t=[];return st(n,(function(n,e){t.push(e)})),t},dt=tn,ft=yn;var pt=function(n,t,e){t=ft(t,e);var r={};return dt(n,(function(n,e,o){r[e]=t(n,e,o)})),r},ht=tn;var gt=function(n,t){var e=!0;return ht(t,(function(t,r){if(n[r]!==t)return e=!1})),e},mt=yn;var vt=function(n,t,e){if(null!=n&&n.length){if(n.length&&!t)return Math.max.apply(Math,n);t=mt(t,e);for(var r,o,a,i=-1/0,c=-1,u=n.length;++c<u;)(a=t(o=n[c],c,n))>i&&(i=a,r=o);return r}return 1/0},St=tn;var bt=function(n){var t=[];return St(n,(function(n,e){t.push(n)})),t},yt=vt,Ct=bt;var wt=tn;function Mt(n,t){this[t]=n}var At=function(n,t){for(var e,r=0,o=arguments.length;++r<o;)null!=(e=arguments[r])&&wt(e,Mt,n);return n},Tt=cn,Nt=Nn,It=At;var Bt=function(n){switch(Tt(n)){case"Object":return Nt(r=n)?It({},r):r;case"Array":return n.slice();case"RegExp":return e="",e+=(t=n).multiline?"m":"",e+=t.global?"g":"",e+=t.ignoreCase?"i":"",new RegExp(t.source,e);case"Date":return new Date(+n);default:return n}var t,e,r},Et=tn,Rt=cn,xt=Nn;function $t(n,t){switch(Rt(n)){case"Object":return function(n,t){if(xt(n)){var e={};return Et(n,(function(n,e){this[e]=$t(n,t)}),e),e}return t?t(n):n}(n,t);case"Array":return function(n,t){var e=[],r=-1,o=n.length;for(;++r<o;)e[r]=$t(n[r],t);return e}(n,t);default:return Bt(n)}}var Pt=F,Gt=$t,kt=Dn;var Lt=function n(){var t,e,r,o,a=1;for(o=Gt(arguments[0]);r=arguments[a++];)for(t in r)Pt(r,t)&&(e=r[t],kt(e)&&kt(o[t])?o[t]=n(o[t],e):o[t]=Gt(e));return o},Ot=yn;var Ft=function(n,t,e){if(null!=n&&n.length){if(n.length&&!t)return Math.min.apply(Math,n);t=Ot(t,e);for(var r,o,a,i=1/0,c=-1,u=n.length;++c<u;)(a=t(o=n[c],c,n))<i&&(i=a,r=o);return r}return-1/0},Dt=Ft,Ht=bt;var Kt=Z;var _t=function(n,t){return t?(Kt(t.split("."),(function(t){n[t]||(n[t]={}),n=n[t]})),n):n};var Ut=function(n,t,e){if(e=e||0,null==n)return-1;for(var r=n.length,o=e<0?r+e:e;o<r;){if(n[o]===t)return o;o++}return-1},jt=Ut;var zt=j,Vt=function(n,t){return-1!==jt(n,t)};var Zt=function(n,t){var e="string"!=typeof arguments[1]?arguments[1]:zt(arguments,1),r={};for(var o in n)n.hasOwnProperty(o)&&!Vt(e,o)&&(r[o]=n[o]);return r},Wt=j;var Jt=function(n,t){for(var e,r="string"!=typeof arguments[1]?arguments[1]:Wt(arguments,1),o={},a=0;e=r[a++];)o[e]=n[e];return o},qt=pt,Yt=rn;var Qt=tn;var Xt=function(n){var t=0;return Qt(n,(function(){t++})),t},ne=tn,te=Xt;var ee=function(n,t,e,r){var o=arguments.length>2;if(!te(n)&&!o)throw new Error("reduce of empty object with no initial value");return ne(n,(function(n,a,i){o?e=t.call(r,e,n,a,i):(e=n,o=!0)})),e},re=Qn,oe=yn;var ae=sn;var ie=function(n){return ae(n,"Function")};var ce=function(n,t){var e=n[t];if(void 0!==e)return ie(e)?e.call(n):e},ue=_t;var se=function(n,t,e){var r=/^(.+)\.(.+)$/.exec(t);r?ue(n,r[1])[r[2]]=e:n[t]=e},le=ut;var de=function(n,t){if(le(n,t)){for(var e=t.split("."),r=e.pop();t=e.shift();)n=n[t];return delete n[r]}return!0},fe={bindAll:Q,contains:Tn,deepFillIn:En,deepMatches:mn,deepMixIn:Gn,equals:zn,every:On,fillIn:Jn,filter:Qn,find:tt,flatten:at,forIn:K,forOwn:tn,functions:U,get:it,has:ut,hasOwn:F,keys:lt,map:pt,matches:gt,max:function(n,t){return yt(Ct(n),t)},merge:Lt,min:function(n,t){return Dt(Ht(n),t)},mixIn:At,namespace:_t,omit:Zt,pick:Jt,pluck:function(n,t){return qt(n,Yt(t))},reduce:ee,reject:function(n,t,e){return t=oe(t,e),re(n,(function(n,e,r){return!t(n,e,r)}),e)},result:ce,set:se,size:Xt,some:Mn,unset:de,values:bt};(function(){var n,t;t=fe,n=function(){function n(){}return n.prototype.getCountry=function(t){return n.prototype.countries[t]},n.prototype.getCode=function(e){var r,o;return o=null,null!=e&&-1!==(r=t.values(n.prototype.countries).indexOf(e))&&(o=Object.keys(n.prototype.countries)[r]),o},n.prototype.getCountries=function(){return t.values(n.prototype.countries)},n.prototype.getCodes=function(){return Object.keys(n.prototype.countries)},n.prototype.getData=function(){return n.prototype.countries},n.prototype.countries={AF:"Afghanistan",AX:"Åland Islands",AL:"Albania",DZ:"Algeria",AS:"American Samoa",AD:"Andorra",AO:"Angola",AI:"Anguilla",AQ:"Antarctica",AG:"Antigua and Barbuda",AR:"Argentina",AM:"Armenia",AW:"Aruba",AU:"Australia",AT:"Austria",AZ:"Azerbaijan",BS:"Bahamas",BH:"Bahrain",BD:"Bangladesh",BB:"Barbados",BY:"Belarus",BE:"Belgium",BZ:"Belize",BJ:"Benin",BM:"Bermuda",BT:"Bhutan",BO:"Bolivia, Plurinational State of",BQ:"Bonaire, Sint Eustatius and Saba",BA:"Bosnia and Herzegovina",BW:"Botswana",BV:"Bouvet Island",BR:"Brazil",IO:"British Indian Ocean Territory",BN:"Brunei Darussalam",BG:"Bulgaria",BF:"Burkina Faso",BI:"Burundi",KH:"Cambodia",CM:"Cameroon",CA:"Canada",CV:"Cape Verde",KY:"Cayman Islands",CF:"Central African Republic",TD:"Chad",CL:"Chile",CN:"China",CX:"Christmas Island",CC:"Cocos (Keeling) Islands",CO:"Colombia",KM:"Comoros",CG:"Congo",CD:"Congo, the Democratic Republic of the",CK:"Cook Islands",CR:"Costa Rica",CI:"Côte d'Ivoire",HR:"Croatia",CU:"Cuba",CW:"Curaçao",CY:"Cyprus",CZ:"Czech Republic",DK:"Denmark",DJ:"Djibouti",DM:"Dominica",DO:"Dominican Republic",EC:"Ecuador",EG:"Egypt",SV:"El Salvador",GQ:"Equatorial Guinea",ER:"Eritrea",EE:"Estonia",ET:"Ethiopia",FK:"Falkland Islands (Malvinas)",FO:"Faroe Islands",FJ:"Fiji",FI:"Finland",FR:"France",GF:"French Guiana",PF:"French Polynesia",TF:"French Southern Territories",GA:"Gabon",GM:"Gambia",GE:"Georgia",DE:"Germany",GH:"Ghana",GI:"Gibraltar",GR:"Greece",GL:"Greenland",GD:"Grenada",GP:"Guadeloupe",GU:"Guam",GT:"Guatemala",GG:"Guernsey",GN:"Guinea",GW:"Guinea-Bissau",GY:"Guyana",HT:"Haiti",HM:"Heard Island and McDonald Mcdonald Islands",VA:"Holy See (Vatican City State)",HN:"Honduras",HK:"Hong Kong",HU:"Hungary",IS:"Iceland",IN:"India",ID:"Indonesia",IR:"Iran, Islamic Republic of",IQ:"Iraq",IE:"Ireland",IM:"Isle of Man",IL:"Israel",IT:"Italy",JM:"Jamaica",JP:"Japan",JE:"Jersey",JO:"Jordan",KZ:"Kazakhstan",KE:"Kenya",KI:"Kiribati",KP:"Korea, Democratic People's Republic of",KR:"Korea, Republic of",KW:"Kuwait",KG:"Kyrgyzstan",LA:"Lao People's Democratic Republic",LV:"Latvia",LB:"Lebanon",LS:"Lesotho",LR:"Liberia",LY:"Libya",LI:"Liechtenstein",LT:"Lithuania",LU:"Luxembourg",MO:"Macao",MK:"Macedonia, the Former Yugoslav Republic of",MG:"Madagascar",MW:"Malawi",MY:"Malaysia",MV:"Maldives",ML:"Mali",MT:"Malta",MH:"Marshall Islands",MQ:"Martinique",MR:"Mauritania",MU:"Mauritius",YT:"Mayotte",MX:"Mexico",FM:"Micronesia, Federated States of",MD:"Moldova, Republic of",MC:"Monaco",MN:"Mongolia",ME:"Montenegro",MS:"Montserrat",MA:"Morocco",MZ:"Mozambique",MM:"Myanmar",NA:"Namibia",NR:"Nauru",NP:"Nepal",NL:"Netherlands",NC:"New Caledonia",NZ:"New Zealand",NI:"Nicaragua",NE:"Niger",NG:"Nigeria",NU:"Niue",NF:"Norfolk Island",MP:"Northern Mariana Islands",NO:"Norway",OM:"Oman",PK:"Pakistan",PW:"Palau",PS:"Palestine, State of",PA:"Panama",PG:"Papua New Guinea",PY:"Paraguay",PE:"Peru",PH:"Philippines",PN:"Pitcairn",PL:"Poland",PT:"Portugal",PR:"Puerto Rico",QA:"Qatar",RE:"Réunion",RO:"Romania",RU:"Russian Federation",RW:"Rwanda",BL:"Saint Barthélemy",SH:"Saint Helena, Ascension and Tristan da Cunha",KN:"Saint Kitts and Nevis",LC:"Saint Lucia",MF:"Saint Martin (French part)",PM:"Saint Pierre and Miquelon",VC:"Saint Vincent and the Grenadines",WS:"Samoa",SM:"San Marino",ST:"Sao Tome and Principe",SA:"Saudi Arabia",SN:"Senegal",RS:"Serbia",SC:"Seychelles",SL:"Sierra Leone",SG:"Singapore",SX:"Sint Maarten (Dutch part)",SK:"Slovakia",SI:"Slovenia",SB:"Solomon Islands",SO:"Somalia",ZA:"South Africa",GS:"South Georgia and the South Sandwich Islands",SS:"South Sudan",ES:"Spain",LK:"Sri Lanka",SD:"Sudan",SR:"Suriname",SJ:"Svalbard and Jan Mayen",SZ:"Swaziland",SE:"Sweden",CH:"Switzerland",SY:"Syrian Arab Republic",TW:"Taiwan, Province of China",TJ:"Tajikistan",TZ:"Tanzania, United Republic of",TH:"Thailand",TL:"Timor-Leste",TG:"Togo",TK:"Tokelau",TO:"Tonga",TT:"Trinidad and Tobago",TN:"Tunisia",TR:"Turkey",TM:"Turkmenistan",TC:"Turks and Caicos Islands",TV:"Tuvalu",UG:"Uganda",UA:"Ukraine",AE:"United Arab Emirates",GB:"United Kingdom",US:"United States",UM:"United States Minor Outlying Islands",UY:"Uruguay",UZ:"Uzbekistan",VU:"Vanuatu",VE:"Venezuela, Bolivarian Republic of",VN:"Viet Nam",VG:"Virgin Islands, British",VI:"Virgin Islands, U.S.",WF:"Wallis and Futuna",EH:"Western Sahara",YE:"Yemen",ZM:"Zambia",ZW:"Zimbabwe"},n}(),null!=null||new n}).call(k);for(var pe=[],he=0;he<256;++he)pe.push((he+256).toString(16).substr(1));var ge,me,ve,Se,be,ye,Ce,we={exports:{}}; | ||
/*! http://mths.be/base64 v0.1.0 by @mathias | MIT license */ge=we,me=we.exports,function(n){var t=me,e=ge&&ge.exports==t&&ge,r="object"==typeof k&&k;r.global!==r&&r.window!==r||(n=r);var o=function(n){this.message=n};(o.prototype=new Error).name="InvalidCharacterError";var a=function(n){throw new o(n)},i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=/[\t\n\f\r ]/g,u={encode:function(n){n=String(n),/[^\0-\xFF]/.test(n)&&a("The string to be encoded contains characters outside of the Latin1 range.");for(var t,e,r,o,c=n.length%3,u="",s=-1,l=n.length-c;++s<l;)t=n.charCodeAt(s)<<16,e=n.charCodeAt(++s)<<8,r=n.charCodeAt(++s),u+=i.charAt((o=t+e+r)>>18&63)+i.charAt(o>>12&63)+i.charAt(o>>6&63)+i.charAt(63&o);return 2==c?(t=n.charCodeAt(s)<<8,e=n.charCodeAt(++s),u+=i.charAt((o=t+e)>>10)+i.charAt(o>>4&63)+i.charAt(o<<2&63)+"="):1==c&&(o=n.charCodeAt(s),u+=i.charAt(o>>2)+i.charAt(o<<4&63)+"=="),u},decode:function(n){var t=(n=String(n).replace(c,"")).length;t%4==0&&(t=(n=n.replace(/==?$/,"")).length),(t%4==1||/[^+a-zA-Z0-9/]/.test(n))&&a("Invalid character: the string to be decoded is not correctly encoded.");for(var e,r,o=0,u="",s=-1;++s<t;)r=i.indexOf(n.charAt(s)),e=o%4?64*e+r:r,o++%4&&(u+=String.fromCharCode(255&e>>(-2*o&6)));return u},version:"0.1.0"};if(t&&!t.nodeType)if(e)e.exports=u;else for(var s in u)u.hasOwnProperty(s)&&(t[s]=u[s]);else n.base64=u}(k),function(n){n.Opened="WEBSOCKET_OPEN",n.SourceSampleRateSetSuccess="SOURSE_SAMPLE_RATE_SET_SUCCESS",n.Started="started",n.Stopped="stopped",n.SegmentEnd="segment_end",n.Transcript="transcript",n.Entity="entity",n.Intent="intent",n.TentativeTranscript="tentative_transcript",n.TentativeEntities="tentative_entities",n.TentativeIntent="tentative_intent"}(ve||(ve={})),function(n){n.Failed="Failed",n.NoBrowserSupport="NoBrowserSupport",n.NoAudioConsent="NoAudioConsent",n.Idle="Idle",n.Connecting="Connecting",n.Ready="Ready",n.Recording="Recording",n.Loading="Loading"}(Se||(Se={})),function(n){n.Poweron="poweron",n.Mic="mic",n.Error="error",n.Denied="denied"}(be||(be={})),function(n){n.Hold="hold",n.Click="click",n.Noninteractive="noninteractive"}(ye||(ye={})),function(n){n.None="none",n.Connecting="connecting",n.Busy="busy"}(Ce||(Ce={})),G.Disconnected,be.Poweron,ye.Click,Ce.None,G.Disconnecting,be.Poweron,ye.Noninteractive,Ce.Connecting,G.Connecting,be.Poweron,ye.Noninteractive,Ce.Connecting,G.Connected,be.Mic,ye.Hold,Ce.None,G.Starting,be.Mic,ye.Hold,Ce.Connecting,G.Recording,be.Mic,ye.Hold,Ce.None,G.Stopping,be.Mic,ye.Noninteractive,Ce.Busy,G.Failed,be.Error,ye.Click,Ce.None,G.NoBrowserSupport,be.Error,ye.Click,Ce.None,G.NoAudioConsent,be.Denied,ye.Click,Ce.None;const{window:Me}=R;function Ae(n){let t,e,r,o,a,l,p,h,g=n[2]===Re&&Te(n),m=n[2]===G.NoAudioConsent&&Ne(),v=n[2]===G.NoBrowserSupport&&Ie(),S=n[2]===xe&&Be();return{c(){t=s("errorDiv"),e=s("errorLeft"),e.textContent="×",r=d(),g&&g.c(),o=d(),m&&m.c(),a=d(),v&&v.c(),l=d(),S&&S.c()},m(u,s){c(u,t,s),i(t,e),i(t,r),g&&g.m(t,null),i(t,o),m&&m.m(t,null),i(t,a),v&&v.m(t,null),i(t,l),S&&S.m(t,null),p||(h=f(e,"click",n[4]),p=!0)},p(n,e){n[2]===Re?g?g.p(n,e):(g=Te(n),g.c(),g.m(t,o)):g&&(g.d(1),g=null),n[2]===G.NoAudioConsent?m?m.p(n,e):(m=Ne(),m.c(),m.m(t,a)):m&&(m.d(1),m=null),n[2]===G.NoBrowserSupport?v||(v=Ie(),v.c(),v.m(t,l)):v&&(v.d(1),v=null),n[2]===xe?S?S.p(n,e):(S=Be(),S.c(),S.m(t,null)):S&&(S.d(1),S=null)},d(n){n&&u(t),g&&g.d(),m&&m.d(),v&&v.d(),S&&S.d(),p=!1,h()}}}function Te(n){let t,e,r,o,a,f,h,g,m,v,S,b,y,C,w=n[1].appId+"";return{c(){t=s("errorRight"),e=s("h1"),e.textContent="Failed to connect Speechly",r=d(),o=s("p"),a=l("Please check that Speechly application id '"),f=l(w),h=l("' has been successfully deployed."),g=d(),m=s("p"),v=s("a"),v.textContent="Troubleshooting",S=l("\n \n "),b=s("a"),y=l("Reload"),p(v,"href","https://docs.speechly.com/faq/#error-invalid-app-id"),p(b,"href",C=window.location.href)},m(n,u){c(n,t,u),i(t,e),i(t,r),i(t,o),i(o,a),i(o,f),i(o,h),i(t,g),i(t,m),i(m,v),i(m,S),i(m,b),i(b,y)},p(n,t){2&t&&w!==(w=n[1].appId+"")&&function(n,t){t=""+t,n.wholeText!==t&&(n.data=t)}(f,w)},d(n){n&&u(t)}}}function Ne(t){let e,r,o,a,f,h,g,m,v,S;return{c(){e=s("errorRight"),r=s("h1"),r.textContent="No Mic Permission",o=d(),a=s("p"),a.textContent="To use the voice interface, please allow your web browser access the\n microphone and reload.",f=d(),h=s("p"),g=s("a"),g.textContent="Troubleshooting",m=l("\n \n "),v=s("a"),S=l("Reload"),p(g,"href","https://docs.speechly.com/faq/#error-no-audio-consent"),p(v,"href",window.location.href)},m(n,t){c(n,e,t),i(e,r),i(e,o),i(e,a),i(e,f),i(e,h),i(h,g),i(h,m),i(h,v),i(v,S)},p:n,d(n){n&&u(e)}}}function Ie(n){let t;return{c(){t=s("errorRight"),t.innerHTML='<h1>Unsupported Browser</h1> \n <p>To use the voice interface, please visit this site using a supported\n browser.</p> \n <p><a href="https://docs.speechly.com/client-libraries/supported-browsers/#error-no-browser-support">Troubleshooting</a></p>'},m(n,e){c(n,t,e)},d(n){n&&u(t)}}}function Be(t){let e,r,o,a,f,h,g,m,v,S;return{c(){e=s("errorRight"),r=s("h1"),r.textContent="HTTPS Required",o=d(),a=s("p"),a.textContent="To use the voice interface, please visit this site using the secure\n https:// protocol.",f=d(),h=s("p"),g=s("a"),g.textContent="Troubleshooting",m=l("\n \n "),v=s("a"),S=l("Try with HTTPS"),p(g,"href","https://docs.speechly.com/faq/#error-https-required"),p(v,"href",window.location.href.replace(/^http(?!s)/,"https"))},m(n,t){c(n,e,t),i(e,r),i(e,o),i(e,a),i(e,f),i(e,h),i(h,g),i(h,m),i(h,v),i(v,S)},p:n,d(n){n&&u(e)}}}function Ee(t){let e,r,o,a,l,g=t[2]&&Ae(t);return{c(){e=s("link"),r=d(),o=s("main"),g&&g.c(),this.c=n,p(e,"href","https://fonts.googleapis.com/css2?family=Saira+Condensed:wght@700&display=swap"),p(e,"rel","stylesheet"),h(o,"bottom","bottom"===t[0])},m(n,u){i(document.head,e),c(n,r,u),c(n,o,u),g&&g.m(o,null),a||(l=f(Me,"message",t[3]),a=!0)},p(n,[t]){n[2]?g?g.p(n,t):(g=Ae(n),g.c(),g.m(o,null)):g&&(g.d(1),g=null),1&t&&h(o,"bottom","bottom"===n[0])},i:n,o:n,d(n){u(e),n&&u(r),n&&u(o),g&&g.d(),a=!1,l()}}}const Re="InvaldAppId",xe="HttpsRequired";function $e(n,t,e){let{placement:r=null}=t,o={};let a=null;const i=(n,t)=>{e(1,o={appId:t})},c=n=>{var t,r;switch(n){case G.Failed:e(2,a=Re);break;case G.NoAudioConsent:case G.NoBrowserSupport:if("https:"!==(null===(t=null===window||void 0===window?void 0:window.location)||void 0===t?void 0:t.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}$/))){e(2,a=xe);break}e(2,a=n)}};return n.$$set=n=>{"placement"in n&&e(0,r=n.placement)},[r,o,a,n=>{switch(n.data.type){case"holdstart":c(n.data.state);break;case"initialized":console.log(n.data),i(n.data.status,n.data.appId)}},()=>{e(2,a=null)}]}class Pe extends P{constructor(n){super(),this.shadowRoot.innerHTML="<style>main.bottom{position:fixed;bottom:0;left:0;right:0;min-height:10em;z-index:51;user-select:none;pointer-events:none}errorDiv{box-sizing:border-box;position:relative;width:100%;min-height:10em;background-color:white;user-select:text;pointer-events:all;color:black;display:flex;box-shadow:0 0 8px #00000040;flex-direction:row}errorLeft{box-sizing:border-box;width:2rem;background-color:red;padding:0.2rem 0.2rem;color:#ffffff;display:flex;flex-direction:column;align-items:center;justify-content:start;font-size:1.5rem;cursor:pointer}errorRight{background-color:white;padding:1rem 3rem 1rem 1rem;overflow:auto;flex-grow:1}h1{font-size:1.5rem;margin:0;padding:0 0 0.5rem 0;font-family:'Saira Condensed', sans-serif;text-transform:uppercase}p{margin:0;padding:0 0 0.5rem 0;color:#999}a{color:#000}</style>",$(this,{target:this.shadowRoot,props:g(this.attributes),customElement:!0},$e,Ee,a,{placement:0},null),n&&(n.target&&c(n.target,this,n.anchor),n.props&&(this.$set(n.props),I()))}static get observedAttributes(){return["placement"]}get placement(){return this.$$.ctx[0]}set placement(n){this.$$set({placement:n}),I()}}customElements.get("error-panel")?console.warn("Skipping re-defining customElement error-panel"):customElements.define("error-panel",Pe)})); | ||
!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){"use strict";function e(){}function t(e){return e()}function n(){return Object.create(null)}function o(e){e.forEach(t)}function r(e){return"function"==typeof e}function i(e,t){return e!=e?t==t:e!==t}function c(e,t){e.appendChild(t)}function s(e,t,n){e.insertBefore(t,n||null)}function l(e){e.parentNode.removeChild(e)}function a(e){return document.createElement(e)}function d(e){return document.createTextNode(e)}function u(){return d(" ")}function p(e,t,n,o){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o)}function h(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function f(e,t,n){e.classList[n?"add":"remove"](t)}function m(e){const t={};for(const n of e)t[n.name]=n.value;return t}let g;function w(e){g=e}const b=[],$=[],y=[],x=[],v=Promise.resolve();let C=!1;function k(e){y.push(e)}let S=!1;const _=new Set;function T(){if(!S){S=!0;do{for(let e=0;e<b.length;e+=1){const t=b[e];w(t),N(t.$$)}for(w(null),b.length=0;$.length;)$.pop()();for(let e=0;e<y.length;e+=1){const t=y[e];_.has(t)||(_.add(t),t())}y.length=0}while(b.length);for(;x.length;)x.pop()();C=!1,S=!1,_.clear()}}function N(e){if(null!==e.fragment){e.update(),o(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(k)}}const E=new Set;const R="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function A(e,t){-1===e.$$.dirty[0]&&(b.push(e),C||(C=!0,v.then(T)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function B(i,c,s,a,d,u,p,h=[-1]){const f=g;w(i);const m=i.$$={fragment:null,ctx:null,props:u,update:e,not_equal:d,bound:n(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(c.context||(f?f.$$.context:[])),callbacks:n(),dirty:h,skip_bound:!1,root:c.target||f.$$.root};p&&p(m.root);let b=!1;if(m.ctx=s?s(i,c.props||{},((e,t,...n)=>{const o=n.length?n[0]:t;return m.ctx&&d(m.ctx[e],m.ctx[e]=o)&&(!m.skip_bound&&m.bound[e]&&m.bound[e](o),b&&A(i,e)),t})):[],m.update(),b=!0,o(m.before_update),m.fragment=!!a&&a(m.ctx),c.target){if(c.hydrate){const e=function(e){return Array.from(e.childNodes)}(c.target);m.fragment&&m.fragment.l(e),e.forEach(l)}else m.fragment&&m.fragment.c();c.intro&&(($=i.$$.fragment)&&$.i&&(E.delete($),$.i(y))),function(e,n,i,c){const{fragment:s,on_mount:l,on_destroy:a,after_update:d}=e.$$;s&&s.m(n,i),c||k((()=>{const n=l.map(t).filter(r);a?a.push(...n):o(n),e.$$.on_mount=[]})),d.forEach(k)}(i,c.target,c.anchor,c.customElement),T()}var $,y;w(f)}let D;var L,z,H,M,q,F,I;"function"==typeof HTMLElement&&(D=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:e}=this.$$;this.$$.on_disconnect=e.map(t).filter(r);for(const e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(e,t,n){this[e]=n}disconnectedCallback(){o(this.$$.on_disconnect)}$destroy(){!function(e,t){const n=e.$$;null!==n.fragment&&(o(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.Disconnected=3]="Disconnected",e[e.Disconnecting=4]="Disconnecting",e[e.Connecting=5]="Connecting",e[e.Connected=6]="Connected",e[e.Starting=7]="Starting",e[e.Stopping=8]="Stopping",e[e.Recording=9]="Recording"}(L||(L={})),function(e){e.SpeechlyFirstConnect="SpeechlyFirstConnect"}(z||(z={})),function(e){e.speechlypoweron="speechlypoweron",e.holdstart="holdstart",e.holdend="holdend",e.speechlystarting="speechlystarting",e.speechstate="speechstate",e.initialized="initialized",e.speechsegment="speechsegment",e.speechhandled="speechhandled",e.showhint="showhint",e.transcriptdrawerhint="hint",e.speechlyintroready="speechlyintroready",e.speechlyintroclosed="speechlyintroclosed"}(H||(H={})),function(e){e.Mic="mic",e.MicActive="micactive",e.Error="error",e.Denied="denied"}(M||(M={})),function(e){e.Hold="hold",e.Click="click",e.Noninteractive="noninteractive"}(q||(q={})),function(e){e.None="none",e.Connecting="connecting",e.Busy="busy"}(F||(F={})),function(e){e.None="none",e.Whirl="whirl"}(I||(I={})),L.Disconnected,L.Disconnecting,L.Connecting,L.Connected,L.Starting,L.Recording,L.Stopping,L.Failed,L.NoBrowserSupport,L.NoAudioConsent;const{window:P}=R;function j(e){let t,n,o,r,i,d,h,f,m=e[2]===K&&O(e),g=e[2]===L.NoAudioConsent&&U(),w=e[2]===L.NoBrowserSupport&&W(),b=e[2]===Q&&G();return{c(){t=a("errorDiv"),n=a("errorLeft"),n.textContent="×",o=u(),m&&m.c(),r=u(),g&&g.c(),i=u(),w&&w.c(),d=u(),b&&b.c()},m(l,a){s(l,t,a),c(t,n),c(t,o),m&&m.m(t,null),c(t,r),g&&g.m(t,null),c(t,i),w&&w.m(t,null),c(t,d),b&&b.m(t,null),h||(f=p(n,"click",e[4]),h=!0)},p(e,n){e[2]===K?m?m.p(e,n):(m=O(e),m.c(),m.m(t,r)):m&&(m.d(1),m=null),e[2]===L.NoAudioConsent?g?g.p(e,n):(g=U(),g.c(),g.m(t,i)):g&&(g.d(1),g=null),e[2]===L.NoBrowserSupport?w||(w=W(),w.c(),w.m(t,d)):w&&(w.d(1),w=null),e[2]===Q?b?b.p(e,n):(b=G(),b.c(),b.m(t,null)):b&&(b.d(1),b=null)},d(e){e&&l(t),m&&m.d(),g&&g.d(),w&&w.d(),b&&b.d(),h=!1,f()}}}function O(e){let t,n,o,r,i,p,f,m,g,w,b,$,y,x,v=e[1].appId+"";return{c(){t=a("errorRight"),n=a("h1"),n.textContent="Failed to connect Speechly",o=u(),r=a("p"),i=d("Please check that Speechly application id '"),p=d(v),f=d("' has been successfully deployed."),m=u(),g=a("p"),w=a("a"),w.textContent="Troubleshooting",b=d("\n \n "),$=a("a"),y=d("Reload"),h(w,"href","https://docs.speechly.com/faq/#error-invalid-app-id"),h($,"href",x=window.location.href)},m(e,l){s(e,t,l),c(t,n),c(t,o),c(t,r),c(r,i),c(r,p),c(r,f),c(t,m),c(t,g),c(g,w),c(g,b),c(g,$),c($,y)},p(e,t){2&t&&v!==(v=e[1].appId+"")&&function(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}(p,v)},d(e){e&&l(t)}}}function U(t){let n,o,r,i,p,f,m,g,w,b;return{c(){n=a("errorRight"),o=a("h1"),o.textContent="No Mic Permission",r=u(),i=a("p"),i.textContent="To use the voice interface, please allow your web browser access the\n microphone and reload.",p=u(),f=a("p"),m=a("a"),m.textContent="Troubleshooting",g=d("\n \n "),w=a("a"),b=d("Reload"),h(m,"href","https://docs.speechly.com/faq/#error-no-audio-consent"),h(w,"href",window.location.href)},m(e,t){s(e,n,t),c(n,o),c(n,r),c(n,i),c(n,p),c(n,f),c(f,m),c(f,g),c(f,w),c(w,b)},p:e,d(e){e&&l(n)}}}function W(e){let t;return{c(){t=a("errorRight"),t.innerHTML='<h1>Unsupported Browser</h1> \n <p>To use the voice interface, please visit this site using a supported\n browser.</p> \n <p><a href="https://docs.speechly.com/client-libraries/supported-browsers/#error-no-browser-support">Troubleshooting</a></p>'},m(e,n){s(e,t,n)},d(e){e&&l(t)}}}function G(t){let n,o,r,i,p,f,m,g,w,b;return{c(){n=a("errorRight"),o=a("h1"),o.textContent="HTTPS Required",r=u(),i=a("p"),i.textContent="To use the voice interface, please visit this site using the secure\n https:// protocol.",p=u(),f=a("p"),m=a("a"),m.textContent="Troubleshooting",g=d("\n \n "),w=a("a"),b=d("Try with HTTPS"),h(m,"href","https://docs.speechly.com/faq/#error-https-required"),h(w,"href",window.location.href.replace(/^http(?!s)/,"https"))},m(e,t){s(e,n,t),c(n,o),c(n,r),c(n,i),c(n,p),c(n,f),c(f,m),c(f,g),c(f,w),c(w,b)},p:e,d(e){e&&l(n)}}}function J(t){let n,o,r,i,d,m=t[2]&&j(t);return{c(){n=a("link"),o=u(),r=a("main"),m&&m.c(),this.c=e,h(n,"href","https://fonts.googleapis.com/css2?family=Saira+Condensed:wght@700&display=swap"),h(n,"rel","stylesheet"),f(r,"bottom","bottom"===t[0])},m(e,l){c(document.head,n),s(e,o,l),s(e,r,l),m&&m.m(r,null),i||(d=p(P,"message",t[3]),i=!0)},p(e,[t]){e[2]?m?m.p(e,t):(m=j(e),m.c(),m.m(r,null)):m&&(m.d(1),m=null),1&t&&f(r,"bottom","bottom"===e[0])},i:e,o:e,d(e){l(n),e&&l(o),e&&l(r),m&&m.d(),i=!1,d()}}}const K="InvaldAppId",Q="HttpsRequired";function V(e,t,n){let{placement:o=null}=t,r={};let i=null;const c=(e,t)=>{n(1,r={appId:t})},s=e=>{var t,o;switch(e){case L.Failed:n(2,i=K);break;case L.NoAudioConsent:case L.NoBrowserSupport:if("https:"!==(null===(t=null===window||void 0===window?void 0:window.location)||void 0===t?void 0:t.protocol)&&("localhost"!==(o=window.location.hostname)&&"[::1]"!==o&&null===o.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/))){n(2,i=Q);break}n(2,i=e)}};return e.$$set=e=>{"placement"in e&&n(0,o=e.placement)},[o,r,i,e=>{switch(e.data.type){case H.holdstart:s(e.data.state);break;case H.initialized:console.log(e.data),c(e.data.state,e.data.appId)}},()=>{n(2,i=null)}]}class X extends D{constructor(e){super(),this.shadowRoot.innerHTML="<style>main.bottom{position:fixed;bottom:0;left:0;right:0;min-height:10em;z-index:51;user-select:none;pointer-events:none}errorDiv{box-sizing:border-box;position:relative;width:100%;min-height:10em;background-color:white;user-select:text;pointer-events:all;color:black;display:flex;box-shadow:0 0 8px #00000040;flex-direction:row}errorLeft{box-sizing:border-box;width:2rem;background-color:red;padding:0.2rem 0.2rem;color:#ffffff;display:flex;flex-direction:column;align-items:center;justify-content:start;font-size:1.5rem;cursor:pointer}errorRight{background-color:white;padding:1rem 3rem 1rem 1rem;overflow:auto;flex-grow:1}h1{font-size:1.5rem;margin:0;padding:0 0 0.5rem 0;font-family:'Saira Condensed', sans-serif;text-transform:uppercase}p{margin:0;padding:0 0 0.5rem 0;color:#999}a{color:#000}</style>",B(this,{target:this.shadowRoot,props:m(this.attributes),customElement:!0},V,J,i,{placement:0},null),e&&(e.target&&s(e.target,this,e.anchor),e.props&&(this.$set(e.props),T()))}static get observedAttributes(){return["placement"]}get placement(){return this.$$.ctx[0]}set placement(e){this.$$set({placement:e}),T()}}customElements.get("error-panel")?console.warn("Skipping re-defining customElement error-panel"):customElements.define("error-panel",X)})); | ||
//# sourceMappingURL=error-panel.js.map |
export declare const createDispatchUnbounded: () => (name: string, detail?: {}) => void; | ||
//# sourceMappingURL=fixDispatch.d.ts.map |
export default function fix(transtion: any): (node: any, params: any) => any; | ||
//# sourceMappingURL=fixTransition.d.ts.map |
export {}; | ||
//# sourceMappingURL=holdable-button.d.ts.map |
@@ -1,3 +0,2 @@ | ||
!function(n){"function"==typeof define&&define.amd?define(n):n()}((function(){"use strict";function n(){}function t(n){return n()}function e(){return Object.create(null)}function r(n){n.forEach(t)}function o(n){return"function"==typeof n}function i(n,t){return n!=n?t==t:n!==t||n&&"object"==typeof n||"function"==typeof n}function a(n,t){return n!=n?t==t:n!==t}function c(n){return 0===Object.keys(n).length}function u(n,t){n.appendChild(t)}function s(n,t,e){n.insertBefore(t,e||null)}function l(n){n.parentNode.removeChild(n)}function d(n){return document.createElement(n)}function f(n){return document.createElementNS("http://www.w3.org/2000/svg",n)}function p(){return n=" ",document.createTextNode(n);var n}function h(n,t,e,r){return n.addEventListener(t,e,r),()=>n.removeEventListener(t,e,r)}function g(n,t,e){null==e?n.removeAttribute(t):n.getAttribute(t)!==e&&n.setAttribute(t,e)}function v(n,t,e,r){n.style.setProperty(t,e,r?"important":"")}function m(n){const t={};for(const e of n)t[e.name]=e.value;return t}let y;function b(n){y=n}function S(){if(!y)throw new Error("Function called outside component initialization");return y}const w=[],$=[],C=[],M=[],A=Promise.resolve();let E=!1;function x(n){C.push(n)}let B=!1;const N=new Set;function I(){if(!B){B=!0;do{for(let n=0;n<w.length;n+=1){const t=w[n];b(t),T(t.$$)}for(b(null),w.length=0;$.length;)$.pop()();for(let n=0;n<C.length;n+=1){const t=C[n];N.has(t)||(N.add(t),t())}C.length=0}while(w.length);for(;M.length;)M.pop()();E=!1,B=!1,N.clear()}}function T(n){if(null!==n.fragment){n.update(),r(n.before_update);const t=n.dirty;n.dirty=[-1],n.fragment&&n.fragment.p(n.ctx,t),n.after_update.forEach(x)}}const k=new Set;function R(n,t){n&&n.i&&(k.delete(n),n.i(t))}function G(n,t,e,r){if(n&&n.o){if(k.has(n))return;k.add(n),undefined.c.push((()=>{k.delete(n),r&&(e&&n.d(1),r())})),n.o(t)}}const P="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function L(n){n&&n.c()}function D(n,e,i,a){const{fragment:c,on_mount:u,on_destroy:s,after_update:l}=n.$$;c&&c.m(e,i),a||x((()=>{const e=u.map(t).filter(o);s?s.push(...e):r(e),n.$$.on_mount=[]})),l.forEach(x)}function F(n,t){const e=n.$$;null!==e.fragment&&(r(e.on_destroy),e.fragment&&e.fragment.d(t),e.on_destroy=e.fragment=null,e.ctx=[])}function O(n,t){-1===n.$$.dirty[0]&&(w.push(n),E||(E=!0,A.then(I)),n.$$.dirty.fill(0)),n.$$.dirty[t/31|0]|=1<<t%31}function z(t,o,i,a,c,u,s,d=[-1]){const f=y;b(t);const p=t.$$={fragment:null,ctx:null,props:u,update:n,not_equal:c,bound:e(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(o.context||(f?f.$$.context:[])),callbacks:e(),dirty:d,skip_bound:!1,root:o.target||f.$$.root};s&&s(p.root);let h=!1;if(p.ctx=i?i(t,o.props||{},((n,e,...r)=>{const o=r.length?r[0]:e;return p.ctx&&c(p.ctx[n],p.ctx[n]=o)&&(!p.skip_bound&&p.bound[n]&&p.bound[n](o),h&&O(t,n)),e})):[],p.update(),h=!0,r(p.before_update),p.fragment=!!a&&a(p.ctx),o.target){if(o.hydrate){const n=function(n){return Array.from(n.childNodes)}(o.target);p.fragment&&p.fragment.l(n),n.forEach(l)}else p.fragment&&p.fragment.c();o.intro&&R(t.$$.fragment),D(t,o.target,o.anchor,o.customElement),I()}b(f)}let _;"function"==typeof HTMLElement&&(_=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:n}=this.$$;this.$$.on_disconnect=n.map(t).filter(o);for(const n in this.$$.slotted)this.appendChild(this.$$.slotted[n])}attributeChangedCallback(n,t,e){this[n]=e}disconnectedCallback(){r(this.$$.on_disconnect)}$destroy(){F(this,1),this.$destroy=n}$on(n,t){const e=this.$$.callbacks[n]||(this.$$.callbacks[n]=[]);return e.push(t),()=>{const n=e.indexOf(t);-1!==n&&e.splice(n,1)}}$set(n){this.$$set&&!c(n)&&(this.$$.skip_bound=!0,this.$$set(n),this.$$.skip_bound=!1)}});class K{$destroy(){F(this,1),this.$destroy=n}$on(n,t){const e=this.$$.callbacks[n]||(this.$$.callbacks[n]=[]);return e.push(t),()=>{const n=e.indexOf(t);-1!==n&&e.splice(n,1)}}$set(n){this.$$set&&!c(n)&&(this.$$.skip_bound=!0,this.$$set(n),this.$$.skip_bound=!1)}}function H(t){let e,r,o,i,a,c,d,p;return{c(){e=f("svg"),r=f("defs"),o=f("linearGradient"),i=f("stop"),a=f("stop"),c=f("g"),d=f("path"),p=f("path"),g(i,"stop-color","var(--gradient-stop1)"),g(i,"offset","0%"),g(a,"stop-color","var(--gradient-stop2)"),g(a,"offset","100%"),g(o,"x1","50%"),g(o,"y1","0%"),g(o,"x2","50%"),g(o,"y2","100%"),g(o,"id","a"),g(d,"d","M46 3.119c23.683 0 42.881 19.198 42.881 42.881S69.683 88.881 46 88.881 3.119 69.683 3.119 46 22.317 3.119 46 3.119z"),g(d,"fill","#FFF"),g(p,"d","M46 0C20.595 0 0 20.595 0 46s20.595 46 46 46 46-20.595 46-46S71.405 0 46 0zm0 3.119c23.683 0 42.881 19.198 42.881 42.881S69.683 88.881 46 88.881 3.119 69.683 3.119 46 22.317 3.119 46 3.119z"),g(p,"fill","url(#a)"),g(c,"fill","none"),g(c,"fillrule","nonzero"),g(e,"class","buttonFrameEl"),g(e,"viewBox","0 0 92 92"),g(e,"xmlns","http://www.w3.org/2000/svg"),v(e,"position","absolute"),v(e,"width","100%"),v(e,"height","100%"),v(e,"pointer-events","none"),v(e,"user-select","none"),v(e,"transform","rotate(var(--fx-rotation))")},m(n,t){s(n,e,t),u(e,r),u(r,o),u(o,i),u(o,a),u(e,c),u(c,d),u(c,p)},p:n,i:n,o:n,d(n){n&&l(e)}}}class U extends K{constructor(n){super(),z(this,n,null,H,i,{})}}var V;!function(n){n[n.Failed=0]="Failed",n[n.NoBrowserSupport=1]="NoBrowserSupport",n[n.NoAudioConsent=2]="NoAudioConsent",n[n.Disconnected=3]="Disconnected",n[n.Disconnecting=4]="Disconnecting",n[n.Connecting=5]="Connecting",n[n.Connected=6]="Connected",n[n.Starting=7]="Starting",n[n.Stopping=8]="Stopping",n[n.Recording=9]="Recording"}(V||(V={})),new Map([[V.Failed,"Failed"],[V.NoBrowserSupport,"NoBrowserSupport"],[V.NoAudioConsent,"NoAudioConsent"],[V.Disconnecting,"Disconnecting"],[V.Disconnected,"Disconnected"],[V.Connecting,"Connecting"],[V.Connected,"Connected"],[V.Starting,"Starting"],[V.Stopping,"Stopping"],[V.Recording,"Recording"]]);var j="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var Z,W,J=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},Y=J;function q(n,t,e,r){return n.call(r,t[e],e,t)}var Q=function(n,t,e){var r,o=0;for(r in null==Z&&function(){for(var n in W=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Z=!0,{toString:null})Z=!1}(),n)if(!1===q(t,n,r,e))break;if(Z)for(var i=n.constructor,a=!!i&&n===i.prototype;(r=W[o++])&&("constructor"===r&&(a||!Y(n,r))||n[r]===Object.prototype[r]||!1!==q(t,n,r,e)););},X=Q;var nn=function(n){var t=[];return X(n,(function(n,e){"function"==typeof n&&t.push(e)})),t.sort()};var tn=function(n,t,e){var r=n.length;t=null==t?0:t<0?Math.max(r+t,0):Math.min(t,r),e=null==e?r:e<0?Math.max(r+e,0):Math.min(e,r);for(var o=[];t<e;)o.push(n[t++]);return o},en=tn;var rn=function(n,t,e){var r=en(arguments,2);return function(){return n.apply(t,r.concat(en(arguments)))}};var on=function(n,t,e){if(null!=n)for(var r=-1,o=n.length;++r<o&&!1!==t.call(e,n[r],r,n););},an=nn,cn=rn,un=on,sn=tn;var ln=function(n,t){var e=arguments.length>1?sn(arguments,1):an(n);un(e,(function(t){n[t]=cn(n[t],n)}))},dn=J,fn=Q;var pn=function(n,t,e){fn(n,(function(r,o){if(dn(n,o))return t.call(e,n[o],o,n)}))};var hn=function(n){return n};var gn=function(n){return function(t){return t[n]}},vn=/^\[object (.*)\]$/,mn=Object.prototype.toString;var yn=function(n){return null===n?"Null":undefined===n?"Undefined":vn.exec(mn.call(n))[1]},bn=yn;var Sn=function(n,t){return bn(n)===t},wn=Sn,$n=Array.isArray||function(n){return wn(n,"Array")},Cn=pn,Mn=$n;function An(n,t){for(var e=-1,r=n.length;++e<r;)if(En(n[e],t))return!0;return!1}function En(n,t){return n&&"object"==typeof n?Mn(n)&&Mn(t)?function(n,t){for(var e=-1,r=t.length;++e<r;)if(!An(n,t[e]))return!1;return!0}(n,t):function(n,t){var e=!0;return Cn(t,(function(t,r){if(!En(n[r],t))return e=!1})),e}(n,t):n===t}var xn=En,Bn=hn,Nn=gn,In=xn;var Tn=function(n,t){if(null==n)return Bn;switch(typeof n){case"function":return void 0!==t?function(e,r,o){return n.call(t,e,r,o)}:n;case"object":return function(t){return In(t,n)};case"string":case"number":return Nn(n)}},kn=pn,Rn=Tn;var Gn=function(n,t,e){t=Rn(t,e);var r=!1;return kn(n,(function(e,o){if(t(e,o,n))return r=!0,!1})),r},Pn=Gn;var Ln=function(n,t){return Pn(n,(function(n){return n===t}))};var Dn=function(n){return!!n&&"object"==typeof n&&n.constructor===Object},Fn=pn,On=Dn;var zn=function n(t,e){for(var r,o=0,i=arguments.length;++o<i;)(r=arguments[o])&&Fn(r,(function(e,r){var o=t[r];null==o?t[r]=e:On(o)&&On(e)&&n(o,e)}));return t},_n=pn,Kn=Dn;function Hn(n,t){for(var e,r=0,o=arguments.length;++r<o;)(e=arguments[r])&&_n(e,Un,n);return n}function Un(n,t){var e=this[t];Kn(n)&&Kn(e)?Hn(e,n):this[t]=n}var Vn=Hn,jn=pn,Zn=Tn;var Wn=function(n,t,e){t=Zn(t,e);var r=!0;return jn(n,(function(e,o){if(!t(e,o,n))return r=!1,!1})),r},Jn=Sn;var Yn=function(n){return Jn(n,"Object")};var qn=J,Qn=Wn,Xn=Yn,nt=function(n,t){return n===t?0!==n||1/n==1/t:n!=n&&t!=t};function tt(n,t){return qn(this,t)}var et=function(n,t,e){return e=e||nt,Xn(n)&&Xn(t)?Qn(n,function(n){return function(t,e){return qn(this,e)&&n(t,this[e])}}(e),t)&&Qn(t,tt,n):e(n,t)},rt=on,ot=tn,it=pn;var at=function(n,t){return rt(ot(arguments,1),(function(t){it(t,(function(t,e){null==n[e]&&(n[e]=t)}))})),n},ct=pn,ut=Tn;var st=function(n,t,e){t=ut(t,e);var r={};return ct(n,(function(n,e,o){t(n,e,o)&&(r[e]=n)})),r},lt=Gn,dt=Tn;var ft=function(n,t,e){var r;return t=dt(t,e),lt(n,(function(n,e,o){if(t(n,e,o))return r=n,!0})),r},pt=pn,ht=Dn;function gt(n,t,e,r){return pt(n,(function(n,o){var i=e?e+"."+o:o;0!==r&&ht(n)?gt(n,t,i,r-1):t[i]=n})),t}var vt=function(n,t){return null==n?{}:gt(n,{},"",t=null==t?-1:t)};var mt=function(n,t){for(var e=t.split("."),r=e.pop();t=e.shift();)if(null==(n=n[t]))return;return n[r]},yt=mt;var bt=function(n,t){return undefined!==yt(n,t)},St=pn,wt=Object.keys||function(n){var t=[];return St(n,(function(n,e){t.push(e)})),t},$t=pn,Ct=Tn;var Mt=function(n,t,e){t=Ct(t,e);var r={};return $t(n,(function(n,e,o){r[e]=t(n,e,o)})),r},At=pn;var Et=function(n,t){var e=!0;return At(t,(function(t,r){if(n[r]!==t)return e=!1})),e},xt=Tn;var Bt=function(n,t,e){if(null!=n&&n.length){if(n.length&&!t)return Math.max.apply(Math,n);t=xt(t,e);for(var r,o,i,a=-1/0,c=-1,u=n.length;++c<u;)(i=t(o=n[c],c,n))>a&&(a=i,r=o);return r}return 1/0},Nt=pn;var It=function(n){var t=[];return Nt(n,(function(n,e){t.push(n)})),t},Tt=Bt,kt=It;var Rt=pn;function Gt(n,t){this[t]=n}var Pt=function(n,t){for(var e,r=0,o=arguments.length;++r<o;)null!=(e=arguments[r])&&Rt(e,Gt,n);return n},Lt=yn,Dt=Dn,Ft=Pt;var Ot=function(n){switch(Lt(n)){case"Object":return Dt(r=n)?Ft({},r):r;case"Array":return n.slice();case"RegExp":return e="",e+=(t=n).multiline?"m":"",e+=t.global?"g":"",e+=t.ignoreCase?"i":"",new RegExp(t.source,e);case"Date":return new Date(+n);default:return n}var t,e,r},zt=pn,_t=yn,Kt=Dn;function Ht(n,t){switch(_t(n)){case"Object":return function(n,t){if(Kt(n)){var e={};return zt(n,(function(n,e){this[e]=Ht(n,t)}),e),e}return t?t(n):n}(n,t);case"Array":return function(n,t){var e=[],r=-1,o=n.length;for(;++r<o;)e[r]=Ht(n[r],t);return e}(n,t);default:return Ot(n)}}var Ut=J,Vt=Ht,jt=Yn;var Zt=function n(){var t,e,r,o,i=1;for(o=Vt(arguments[0]);r=arguments[i++];)for(t in r)Ut(r,t)&&(e=r[t],jt(e)&&jt(o[t])?o[t]=n(o[t],e):o[t]=Vt(e));return o},Wt=Tn;var Jt=function(n,t,e){if(null!=n&&n.length){if(n.length&&!t)return Math.min.apply(Math,n);t=Wt(t,e);for(var r,o,i,a=1/0,c=-1,u=n.length;++c<u;)(i=t(o=n[c],c,n))<a&&(a=i,r=o);return r}return-1/0},Yt=Jt,qt=It;var Qt=on;var Xt=function(n,t){return t?(Qt(t.split("."),(function(t){n[t]||(n[t]={}),n=n[t]})),n):n};var ne=function(n,t,e){if(e=e||0,null==n)return-1;for(var r=n.length,o=e<0?r+e:e;o<r;){if(n[o]===t)return o;o++}return-1},te=ne;var ee=tn,re=function(n,t){return-1!==te(n,t)};var oe=function(n,t){var e="string"!=typeof arguments[1]?arguments[1]:ee(arguments,1),r={};for(var o in n)n.hasOwnProperty(o)&&!re(e,o)&&(r[o]=n[o]);return r},ie=tn;var ae=function(n,t){for(var e,r="string"!=typeof arguments[1]?arguments[1]:ie(arguments,1),o={},i=0;e=r[i++];)o[e]=n[e];return o},ce=Mt,ue=gn;var se=pn;var le=function(n){var t=0;return se(n,(function(){t++})),t},de=pn,fe=le;var pe=function(n,t,e,r){var o=arguments.length>2;if(!fe(n)&&!o)throw new Error("reduce of empty object with no initial value");return de(n,(function(n,i,a){o?e=t.call(r,e,n,i,a):(e=n,o=!0)})),e},he=st,ge=Tn;var ve=Sn;var me=function(n){return ve(n,"Function")};var ye=function(n,t){var e=n[t];if(void 0!==e)return me(e)?e.call(n):e},be=Xt;var Se=function(n,t,e){var r=/^(.+)\.(.+)$/.exec(t);r?be(n,r[1])[r[2]]=e:n[t]=e},we=bt;var $e=function(n,t){if(we(n,t)){for(var e=t.split("."),r=e.pop();t=e.shift();)n=n[t];return delete n[r]}return!0},Ce={bindAll:ln,contains:Ln,deepFillIn:zn,deepMatches:xn,deepMixIn:Vn,equals:et,every:Wn,fillIn:at,filter:st,find:ft,flatten:vt,forIn:Q,forOwn:pn,functions:nn,get:mt,has:bt,hasOwn:J,keys:wt,map:Mt,matches:Et,max:function(n,t){return Tt(kt(n),t)},merge:Zt,min:function(n,t){return Yt(qt(n),t)},mixIn:Pt,namespace:Xt,omit:oe,pick:ae,pluck:function(n,t){return ce(n,ue(t))},reduce:pe,reject:function(n,t,e){return t=ge(t,e),he(n,(function(n,e,r){return!t(n,e,r)}),e)},result:ye,set:Se,size:le,some:Gn,unset:$e,values:It};(function(){var n,t;t=Ce,n=function(){function n(){}return n.prototype.getCountry=function(t){return n.prototype.countries[t]},n.prototype.getCode=function(e){var r,o;return o=null,null!=e&&-1!==(r=t.values(n.prototype.countries).indexOf(e))&&(o=Object.keys(n.prototype.countries)[r]),o},n.prototype.getCountries=function(){return t.values(n.prototype.countries)},n.prototype.getCodes=function(){return Object.keys(n.prototype.countries)},n.prototype.getData=function(){return n.prototype.countries},n.prototype.countries={AF:"Afghanistan",AX:"Åland Islands",AL:"Albania",DZ:"Algeria",AS:"American Samoa",AD:"Andorra",AO:"Angola",AI:"Anguilla",AQ:"Antarctica",AG:"Antigua and Barbuda",AR:"Argentina",AM:"Armenia",AW:"Aruba",AU:"Australia",AT:"Austria",AZ:"Azerbaijan",BS:"Bahamas",BH:"Bahrain",BD:"Bangladesh",BB:"Barbados",BY:"Belarus",BE:"Belgium",BZ:"Belize",BJ:"Benin",BM:"Bermuda",BT:"Bhutan",BO:"Bolivia, Plurinational State of",BQ:"Bonaire, Sint Eustatius and Saba",BA:"Bosnia and Herzegovina",BW:"Botswana",BV:"Bouvet Island",BR:"Brazil",IO:"British Indian Ocean Territory",BN:"Brunei Darussalam",BG:"Bulgaria",BF:"Burkina Faso",BI:"Burundi",KH:"Cambodia",CM:"Cameroon",CA:"Canada",CV:"Cape Verde",KY:"Cayman Islands",CF:"Central African Republic",TD:"Chad",CL:"Chile",CN:"China",CX:"Christmas Island",CC:"Cocos (Keeling) Islands",CO:"Colombia",KM:"Comoros",CG:"Congo",CD:"Congo, the Democratic Republic of the",CK:"Cook Islands",CR:"Costa Rica",CI:"Côte d'Ivoire",HR:"Croatia",CU:"Cuba",CW:"Curaçao",CY:"Cyprus",CZ:"Czech Republic",DK:"Denmark",DJ:"Djibouti",DM:"Dominica",DO:"Dominican Republic",EC:"Ecuador",EG:"Egypt",SV:"El Salvador",GQ:"Equatorial Guinea",ER:"Eritrea",EE:"Estonia",ET:"Ethiopia",FK:"Falkland Islands (Malvinas)",FO:"Faroe Islands",FJ:"Fiji",FI:"Finland",FR:"France",GF:"French Guiana",PF:"French Polynesia",TF:"French Southern Territories",GA:"Gabon",GM:"Gambia",GE:"Georgia",DE:"Germany",GH:"Ghana",GI:"Gibraltar",GR:"Greece",GL:"Greenland",GD:"Grenada",GP:"Guadeloupe",GU:"Guam",GT:"Guatemala",GG:"Guernsey",GN:"Guinea",GW:"Guinea-Bissau",GY:"Guyana",HT:"Haiti",HM:"Heard Island and McDonald Mcdonald Islands",VA:"Holy See (Vatican City State)",HN:"Honduras",HK:"Hong Kong",HU:"Hungary",IS:"Iceland",IN:"India",ID:"Indonesia",IR:"Iran, Islamic Republic of",IQ:"Iraq",IE:"Ireland",IM:"Isle of Man",IL:"Israel",IT:"Italy",JM:"Jamaica",JP:"Japan",JE:"Jersey",JO:"Jordan",KZ:"Kazakhstan",KE:"Kenya",KI:"Kiribati",KP:"Korea, Democratic People's Republic of",KR:"Korea, Republic of",KW:"Kuwait",KG:"Kyrgyzstan",LA:"Lao People's Democratic Republic",LV:"Latvia",LB:"Lebanon",LS:"Lesotho",LR:"Liberia",LY:"Libya",LI:"Liechtenstein",LT:"Lithuania",LU:"Luxembourg",MO:"Macao",MK:"Macedonia, the Former Yugoslav Republic of",MG:"Madagascar",MW:"Malawi",MY:"Malaysia",MV:"Maldives",ML:"Mali",MT:"Malta",MH:"Marshall Islands",MQ:"Martinique",MR:"Mauritania",MU:"Mauritius",YT:"Mayotte",MX:"Mexico",FM:"Micronesia, Federated States of",MD:"Moldova, Republic of",MC:"Monaco",MN:"Mongolia",ME:"Montenegro",MS:"Montserrat",MA:"Morocco",MZ:"Mozambique",MM:"Myanmar",NA:"Namibia",NR:"Nauru",NP:"Nepal",NL:"Netherlands",NC:"New Caledonia",NZ:"New Zealand",NI:"Nicaragua",NE:"Niger",NG:"Nigeria",NU:"Niue",NF:"Norfolk Island",MP:"Northern Mariana Islands",NO:"Norway",OM:"Oman",PK:"Pakistan",PW:"Palau",PS:"Palestine, State of",PA:"Panama",PG:"Papua New Guinea",PY:"Paraguay",PE:"Peru",PH:"Philippines",PN:"Pitcairn",PL:"Poland",PT:"Portugal",PR:"Puerto Rico",QA:"Qatar",RE:"Réunion",RO:"Romania",RU:"Russian Federation",RW:"Rwanda",BL:"Saint Barthélemy",SH:"Saint Helena, Ascension and Tristan da Cunha",KN:"Saint Kitts and Nevis",LC:"Saint Lucia",MF:"Saint Martin (French part)",PM:"Saint Pierre and Miquelon",VC:"Saint Vincent and the Grenadines",WS:"Samoa",SM:"San Marino",ST:"Sao Tome and Principe",SA:"Saudi Arabia",SN:"Senegal",RS:"Serbia",SC:"Seychelles",SL:"Sierra Leone",SG:"Singapore",SX:"Sint Maarten (Dutch part)",SK:"Slovakia",SI:"Slovenia",SB:"Solomon Islands",SO:"Somalia",ZA:"South Africa",GS:"South Georgia and the South Sandwich Islands",SS:"South Sudan",ES:"Spain",LK:"Sri Lanka",SD:"Sudan",SR:"Suriname",SJ:"Svalbard and Jan Mayen",SZ:"Swaziland",SE:"Sweden",CH:"Switzerland",SY:"Syrian Arab Republic",TW:"Taiwan, Province of China",TJ:"Tajikistan",TZ:"Tanzania, United Republic of",TH:"Thailand",TL:"Timor-Leste",TG:"Togo",TK:"Tokelau",TO:"Tonga",TT:"Trinidad and Tobago",TN:"Tunisia",TR:"Turkey",TM:"Turkmenistan",TC:"Turks and Caicos Islands",TV:"Tuvalu",UG:"Uganda",UA:"Ukraine",AE:"United Arab Emirates",GB:"United Kingdom",US:"United States",UM:"United States Minor Outlying Islands",UY:"Uruguay",UZ:"Uzbekistan",VU:"Vanuatu",VE:"Venezuela, Bolivarian Republic of",VN:"Viet Nam",VG:"Virgin Islands, British",VI:"Virgin Islands, U.S.",WF:"Wallis and Futuna",EH:"Western Sahara",YE:"Yemen",ZM:"Zambia",ZW:"Zimbabwe"},n}(),null!=null||new n}).call(j);for(var Me=[],Ae=0;Ae<256;++Ae)Me.push((Ae+256).toString(16).substr(1));var Ee,xe,Be,Ne,Ie,Te,ke,Re={exports:{}}; | ||
/*! http://mths.be/base64 v0.1.0 by @mathias | MIT license */Ee=Re,xe=Re.exports,function(n){var t=xe,e=Ee&&Ee.exports==t&&Ee,r="object"==typeof j&&j;r.global!==r&&r.window!==r||(n=r);var o=function(n){this.message=n};(o.prototype=new Error).name="InvalidCharacterError";var i=function(n){throw new o(n)},a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=/[\t\n\f\r ]/g,u={encode:function(n){n=String(n),/[^\0-\xFF]/.test(n)&&i("The string to be encoded contains characters outside of the Latin1 range.");for(var t,e,r,o,c=n.length%3,u="",s=-1,l=n.length-c;++s<l;)t=n.charCodeAt(s)<<16,e=n.charCodeAt(++s)<<8,r=n.charCodeAt(++s),u+=a.charAt((o=t+e+r)>>18&63)+a.charAt(o>>12&63)+a.charAt(o>>6&63)+a.charAt(63&o);return 2==c?(t=n.charCodeAt(s)<<8,e=n.charCodeAt(++s),u+=a.charAt((o=t+e)>>10)+a.charAt(o>>4&63)+a.charAt(o<<2&63)+"="):1==c&&(o=n.charCodeAt(s),u+=a.charAt(o>>2)+a.charAt(o<<4&63)+"=="),u},decode:function(n){var t=(n=String(n).replace(c,"")).length;t%4==0&&(t=(n=n.replace(/==?$/,"")).length),(t%4==1||/[^+a-zA-Z0-9/]/.test(n))&&i("Invalid character: the string to be decoded is not correctly encoded.");for(var e,r,o=0,u="",s=-1;++s<t;)r=a.indexOf(n.charAt(s)),e=o%4?64*e+r:r,o++%4&&(u+=String.fromCharCode(255&e>>(-2*o&6)));return u},version:"0.1.0"};if(t&&!t.nodeType)if(e)e.exports=u;else for(var s in u)u.hasOwnProperty(s)&&(t[s]=u[s]);else n.base64=u}(j),function(n){n.Opened="WEBSOCKET_OPEN",n.SourceSampleRateSetSuccess="SOURSE_SAMPLE_RATE_SET_SUCCESS",n.Started="started",n.Stopped="stopped",n.SegmentEnd="segment_end",n.Transcript="transcript",n.Entity="entity",n.Intent="intent",n.TentativeTranscript="tentative_transcript",n.TentativeEntities="tentative_entities",n.TentativeIntent="tentative_intent"}(Be||(Be={})),function(n){n.Failed="Failed",n.NoBrowserSupport="NoBrowserSupport",n.NoAudioConsent="NoAudioConsent",n.Idle="Idle",n.Connecting="Connecting",n.Ready="Ready",n.Recording="Recording",n.Loading="Loading"}(Ne||(Ne={})),function(n){n.Poweron="poweron",n.Mic="mic",n.Error="error",n.Denied="denied"}(Ie||(Ie={})),function(n){n.Hold="hold",n.Click="click",n.Noninteractive="noninteractive"}(Te||(Te={})),function(n){n.None="none",n.Connecting="connecting",n.Busy="busy"}(ke||(ke={}));const Ge={[V.Disconnected]:{icon:Ie.Poweron,behaviour:Te.Click,effect:ke.None},[V.Disconnecting]:{icon:Ie.Poweron,behaviour:Te.Noninteractive,effect:ke.Connecting},[V.Connecting]:{icon:Ie.Poweron,behaviour:Te.Noninteractive,effect:ke.Connecting},[V.Connected]:{icon:Ie.Mic,behaviour:Te.Hold,effect:ke.None},[V.Starting]:{icon:Ie.Mic,behaviour:Te.Hold,effect:ke.Connecting},[V.Recording]:{icon:Ie.Mic,behaviour:Te.Hold,effect:ke.None},[V.Stopping]:{icon:Ie.Mic,behaviour:Te.Noninteractive,effect:ke.Busy},[V.Failed]:{icon:Ie.Error,behaviour:Te.Click,effect:ke.None},[V.NoBrowserSupport]:{icon:Ie.Error,behaviour:Te.Click,effect:ke.None},[V.NoAudioConsent]:{icon:Ie.Denied,behaviour:Te.Click,effect:ke.None}};function Pe(n){let t,e,r,o;return{c(){t=f("svg"),e=f("g"),r=f("path"),o=f("rect"),g(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"),g(o,"x","20"),g(o,"y","1"),g(o,"width","16"),g(o,"height","37"),g(o,"rx","8"),g(e,"fill","#000"),g(e,"fill-rule","evenodd"),g(t,"class","buttonIconEl"),g(t,"viewBox","0 0 56 56"),g(t,"xmlns","http://www.w3.org/2000/svg")},m(n,i){s(n,t,i),u(t,e),u(e,r),u(e,o)},d(n){n&&l(t)}}}function Le(n){let t,e,r,o;return{c(){t=f("svg"),e=f("g"),r=f("path"),o=f("path"),g(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"),g(r,"fill-rule","nonzero"),g(o,"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"),g(e,"fill","#000"),g(e,"fill-rule","evenodd"),g(t,"class","buttonIconEl"),g(t,"viewBox","0 0 56 56"),g(t,"xmlns","http://www.w3.org/2000/svg")},m(n,i){s(n,t,i),u(t,e),u(e,r),u(e,o)},d(n){n&&l(t)}}}function De(n){let t,e,r,o;return{c(){t=f("svg"),e=f("g"),r=f("path"),o=f("path"),g(r,"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"),g(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"),g(e,"fill","#000"),g(e,"fill-rule","nonzero"),g(t,"class","buttonIconEl"),g(t,"viewBox","0 0 56 56"),g(t,"xmlns","http://www.w3.org/2000/svg")},m(n,i){s(n,t,i),u(t,e),u(e,r),u(e,o)},d(n){n&&l(t)}}}function Fe(n){let t,e,r,o;return{c(){t=f("svg"),e=f("g"),r=f("path"),o=f("rect"),g(r,"d","M52 28c0 13.255-10.745 24-24 24S4 41.255 4 28c0-8.921 4.867-16.705 12.091-20.842l1.984 3.474C12.055 14.08 8 20.566 8 28c0 11.046 8.954 20 20 20s20-8.954 20-20c0-7.434-4.056-13.92-10.075-17.368L39.91 7.16C47.133 11.296 52 19.079 52 28z"),g(r,"fill-rule","nonzero"),g(o,"x","24"),g(o,"y","1"),g(o,"width","8"),g(o,"height","23"),g(o,"rx","4"),g(e,"fill","#000"),g(e,"fill-rule","evenodd"),g(t,"class","buttonIconEl"),g(t,"viewBox","0 0 56 56"),g(t,"xmlns","http://www.w3.org/2000/svg")},m(n,i){s(n,t,i),u(t,e),u(e,r),u(e,o)},d(n){n&&l(t)}}}function Oe(t){let e,r,o,i,a=t[0]===Ie.Mic&&Pe(),c=t[0]===Ie.Error&&Le(),f=t[0]===Ie.Denied&&De(),h=t[0]===Ie.Poweron&&Fe();return{c(){e=d("div"),a&&a.c(),r=p(),c&&c.c(),o=p(),f&&f.c(),i=p(),h&&h.c(),v(e,"position","absolute"),v(e,"width","60%"),v(e,"height","60%"),v(e,"top","50%"),v(e,"left","50%"),v(e,"transform","translate(-50%, -50%)"),v(e,"pointer-events","none"),v(e,"transition","0.25s"),v(e,"opacity","var(--icon-opacity)")},m(n,t){s(n,e,t),a&&a.m(e,null),u(e,r),c&&c.m(e,null),u(e,o),f&&f.m(e,null),u(e,i),h&&h.m(e,null)},p(n,[t]){n[0]===Ie.Mic?a||(a=Pe(),a.c(),a.m(e,r)):a&&(a.d(1),a=null),n[0]===Ie.Error?c||(c=Le(),c.c(),c.m(e,o)):c&&(c.d(1),c=null),n[0]===Ie.Denied?f||(f=De(),f.c(),f.m(e,i)):f&&(f.d(1),f=null),n[0]===Ie.Poweron?h||(h=Fe(),h.c(),h.m(e,null)):h&&(h.d(1),h=null)},i:n,o:n,d(n){n&&l(e),a&&a.d(),c&&c.d(),f&&f.d(),h&&h.d()}}}function ze(n,t,e){let{icon:r=Ie.Mic}=t;return n.$$set=n=>{"icon"in n&&e(0,r=n.icon)},[r]}class _e extends K{constructor(n){super(),z(this,n,ze,Oe,i,{icon:0})}}function Ke(t){let e,r,o,i,a,c,d,p;return{c(){e=f("svg"),r=f("defs"),o=f("linearGradient"),i=f("stop"),a=f("stop"),c=f("filter"),d=f("feGaussianBlur"),p=f("circle"),g(i,"stop-color","var(--gradient-stop1)"),g(i,"offset","0%"),g(a,"stop-color","var(--gradient-stop2)"),g(a,"offset","100%"),g(o,"x1","50%"),g(o,"y1","10%"),g(o,"x2","50%"),g(o,"y2","100%"),g(o,"id","a"),g(d,"stdDeviation","18"),g(d,"in","SourceGraphic"),g(c,"x","-35%"),g(c,"y","-35%"),g(c,"width","170%"),g(c,"height","170%"),g(c,"filterUnits","objectBoundingBox"),g(c,"id","b"),g(p,"filter","url(#b)"),g(p,"cx","124"),g(p,"cy","124"),g(p,"r","79"),g(p,"fill","url(#a)"),g(p,"fillrule","evenodd"),g(e,"viewBox","0 0 246 246"),g(e,"xmlns","http://www.w3.org/2000/svg"),v(e,"top","-75%"),v(e,"left","-75%"),v(e,"height","250%"),v(e,"width","250%"),v(e,"position","absolute"),v(e,"pointer-events","none"),v(e,"opacity","var(--fx-opacity)"),v(e,"transform","rotate(var(--fx-rotation))")},m(n,t){s(n,e,t),u(e,r),u(r,o),u(o,i),u(o,a),u(r,c),u(c,d),u(e,p)},p:n,i:n,o:n,d(n){n&&l(e)}}}class He extends K{constructor(n){super(),z(this,n,null,Ke,i,{})}}const{window:Ue}=P;function Ve(t){let e,o,i,a,c,f,m,y,b,S,w,$;return i=new He({}),c=new U({}),m=new _e({props:{icon:t[7].icon}}),{c(){e=d("main"),o=d("div"),L(i.$$.fragment),a=p(),L(c.$$.fragment),f=p(),L(m.$$.fragment),y=p(),b=d("slot"),this.c=n,g(o,"class","ButtonComponents"),v(o,"transform","scale("+t[4][1]+")"),v(e,"width",t[0]),v(e,"height",t[0]),v(e,"--gradient-stop1",t[1]),v(e,"--gradient-stop2",t[2]),v(e,"--fx-rotation",t[3][1]+"deg"),v(e,"--fx-opacity",t[6][1]),v(e,"--icon-opacity",t[5][1])},m(n,r){s(n,e,r),u(e,o),D(i,o,null),u(o,a),D(c,o,null),u(o,f),D(m,o,null),u(e,y),u(e,b),S=!0,w||($=[h(Ue,"mouseup",t[9]),h(Ue,"keydown",t[10]),h(Ue,"keyup",t[11]),h(e,"mousedown",t[8]),h(e,"touchstart",t[8]),h(e,"dragstart",t[8]),h(e,"mouseup",t[9]),h(e,"touchend",t[9],{passive:!0}),h(e,"dragend",t[9])],w=!0)},p(n,[t]){const r={};128&t&&(r.icon=n[7].icon),m.$set(r),(!S||16&t)&&v(o,"transform","scale("+n[4][1]+")"),(!S||1&t)&&v(e,"width",n[0]),(!S||1&t)&&v(e,"height",n[0]),(!S||2&t)&&v(e,"--gradient-stop1",n[1]),(!S||4&t)&&v(e,"--gradient-stop2",n[2]),(!S||8&t)&&v(e,"--fx-rotation",n[3][1]+"deg"),(!S||64&t)&&v(e,"--fx-opacity",n[6][1]),(!S||32&t)&&v(e,"--icon-opacity",n[5][1])},i(n){S||(R(i.$$.fragment,n),R(c.$$.fragment,n),R(m.$$.fragment,n),S=!0)},o(n){G(i.$$.fragment,n),G(c.$$.fragment,n),G(m.$$.fragment,n),S=!1},d(n){n&&l(e),F(i),F(c),F(m),w=!1,r($)}}}function je(n,t,e){let r,{icon:o=V.Disconnected}=t,{capturekey:i=" "}=t,{size:a="6rem"}=t,{gradientstop1:c="#15e8b5"}=t,{gradientstop2:u="#4fa1f9"}=t,{hide:s}=t;let l=!1,d=0,f=[0,0],p=[0,0],h=[1,1],g=[0,0],v=Ge[o],m=null,y=0,b=0;const w=S(),$=(n,t)=>{w.dispatchEvent(new CustomEvent(n,{detail:t,composed:!0}))};var C;C=()=>{e(4,p=[1,0]);let n=null;const t=()=>{y=b,b=(new Date).getTime();const o=b-(y||b);v.effect===ke.Connecting&&e(5,h[0]=.25*Math.cos(b/2500*Math.PI*2)+.25,h),v.effect===ke.Busy&&e(5,h[0]=.25*Math.cos(b/1e3*Math.PI*2)+.25,h),e(4,p=[p[0],E(p[1],r?p[0]:0,.2,o)]),e(5,h=[h[0],E(h[1],h[0],.08,o)]),e(6,g=[g[0],E(g[1],g[0],.08,o)]),e(3,f=[f[0]+2.5,E(f[1],f[0],.05,o)]),n=requestAnimationFrame(t)};return t(),()=>cancelAnimationFrame(n)},S().$$.on_mount.push(C);const M=n=>{n.preventDefault(),n.stopPropagation(),r&&!l&&(e(16,l=!0),d=Date.now(),x(),v.behaviour===Te.Click&&(e(3,f[0]+=720,f),null===m&&(m=window.setTimeout((()=>{e(6,g[0]=0,g),m=null}),500))),w.onholdstart&&w.onholdstart(),$("holdstart"))},A=()=>{if(l){e(16,l=!1);const n={timeMs:Date.now()-d};x(),null!==m&&window.clearTimeout(m),w.onholdend&&w.onholdend(n),$("holdend",n)}},E=(n,t,e,r)=>n*(1-(e=Math.pow(e,1e3/60/r)))+t*e,x=(n=5)=>{void 0!==navigator.vibrate&&navigator.vibrate(n)};return n.$$set=n=>{"icon"in n&&e(12,o=n.icon),"capturekey"in n&&e(13,i=n.capturekey),"size"in n&&e(0,a=n.size),"gradientstop1"in n&&e(1,c=n.gradientstop1),"gradientstop2"in n&&e(2,u=n.gradientstop2),"hide"in n&&e(14,s=n.hide)},n.$$.update=()=>{16384&n.$$.dirty&&(r=void 0===s||"false"===s),69632&n.$$.dirty&&((n,t)=>{switch(e(7,v=Ge[t]),e(4,p[0]=n?1.35:1,p),e(6,g[0]=n||t==V.Recording?1:0,g),v.icon){case Ie.Mic:case Ie.Denied:case Ie.Error:e(5,h[0]=1,h)}})(l,(n=>{switch(n){case Ne.Idle:return V.Disconnected;case Ne.Connecting:return V.Connecting;case Ne.Ready:return V.Connected;case Ne.Recording:return V.Recording;case Ne.Loading:return V.Stopping;case Ne.Failed:return V.Failed;case Ne.NoBrowserSupport:return V.NoBrowserSupport;case Ne.NoAudioConsent:return V.NoAudioConsent;default:return n}})(o))},[a,c,u,f,p,h,g,v,M,A,n=>{i&&(n.key===i&&(document.hasFocus()&&document.activeElement!==document.body&&document.activeElement!==document.documentElement&&document.activeElement||null||(n.repeat?(n.preventDefault(),n.stopPropagation()):M(n))))},n=>{n.key===i&&A()},o,i,s,()=>l,l]}class Ze extends _{constructor(n){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}.ButtonComponents{width:100%;height:100%}</style>",z(this,{target:this.shadowRoot,props:m(this.attributes),customElement:!0},je,Ve,a,{icon:12,capturekey:13,size:0,gradientstop1:1,gradientstop2:2,hide:14,isbuttonpressed:15},null),n&&(n.target&&s(n.target,this,n.anchor),n.props&&(this.$set(n.props),I()))}static get observedAttributes(){return["icon","capturekey","size","gradientstop1","gradientstop2","hide","isbuttonpressed"]}get icon(){return this.$$.ctx[12]}set icon(n){this.$$set({icon:n}),I()}get capturekey(){return this.$$.ctx[13]}set capturekey(n){this.$$set({capturekey:n}),I()}get size(){return this.$$.ctx[0]}set size(n){this.$$set({size:n}),I()}get gradientstop1(){return this.$$.ctx[1]}set gradientstop1(n){this.$$set({gradientstop1:n}),I()}get gradientstop2(){return this.$$.ctx[2]}set gradientstop2(n){this.$$set({gradientstop2:n}),I()}get hide(){return this.$$.ctx[14]}set hide(n){this.$$set({hide:n}),I()}get isbuttonpressed(){return this.$$.ctx[15]}}customElements.get("holdable-button")?console.warn("Skipping re-defining customElement holdable-button"):customElements.define("holdable-button",Ze)})); | ||
!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 $(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function m(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function v(t,e,n,o){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=[],M=[],E=[],C=[],_=Promise.resolve();let N=!1;function D(t){E.push(t)}let B=!1;const S=new Set;function F(){if(!B){B=!0;do{for(let t=0;t<z.length;t+=1){const e=z[t];y(e),L(e.$$)}for(y(null),z.length=0;M.length;)M.pop()();for(let t=0;t<E.length;t+=1){const e=E[t];S.has(e)||(S.add(e),e())}E.length=0}while(z.length);for(;C.length;)C.pop()();N=!1,B=!1,S.clear()}}function L(t){if(null!==t.fragment){t.update(),o(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(D)}}const A=new Set;function R(t,e){t&&t.i&&(A.delete(t),t.i(e))}function T(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 I="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function V(t){t&&t.c()}function P(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,_.then(F)),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),P(e,i.target,i.anchor,i.customElement),F()}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 q{$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 W(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 U(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"),m(r,"stop-color","var(--gradient-stop1)"),m(r,"offset","0%"),m(s,"stop-color","var(--gradient-stop2)"),m(s,"offset","100%"),m(i,"x1","50%"),m(i,"y1","0%"),m(i,"x2","50%"),m(i,"y2","100%"),m(i,"id","a"),m(c,"cx","46"),m(c,"cy","46"),m(c,"r",e[0]),m(c,"stroke","none"),m(c,"fill","var(--frame-background)"),m(l,"cx","46"),m(l,"cy","46"),m(l,"r",e[0]),m(l,"stroke","url(#a)"),m(l,"stroke-width","var(--frame-stroke-width)"),m(l,"fill","none"),m(n,"class","Frame svelte-1mwhwtl"),m(n,"viewBox","0 0 92 92"),m(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&&m(c,"r",t[0]),1&e&&m(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 q{constructor(t){super(),j(this,t,J,U,r,{frameRadius:0},W)}}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.Disconnected=3]="Disconnected",t[t.Disconnecting=4]="Disconnecting",t[t.Connecting=5]="Connecting",t[t.Connected=6]="Connected",t[t.Starting=7]="Starting",t[t.Stopping=8]="Stopping",t[t.Recording=9]="Recording"}(Q||(Q={})),function(t){t.SpeechlyFirstConnect="SpeechlyFirstConnect"}(X||(X={})),function(t){t.speechlypoweron="speechlypoweron",t.holdstart="holdstart",t.holdend="holdend",t.speechlystarting="speechlystarting",t.speechstate="speechstate",t.initialized="initialized",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.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,$,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 "),$=h("g"),v=h("path"),x=h("rect"),m(o,"attributeName","y1"),m(o,"values","-200%; 0%;"),m(o,"dur","2s"),m(o,"repeatCount","indefinite"),m(i,"attributeName","y2"),m(i,"values","200%; 400%;"),m(i,"dur","2s"),m(i,"repeatCount","indefinite"),m(r,"offset","0%"),m(r,"stop-color","var(--gradient-stop1)"),m(s,"offset","25%"),m(s,"stop-color","var(--gradient-stop2)"),m(c,"offset","50%"),m(c,"stop-color","var(--gradient-stop1)"),m(l,"offset","75%"),m(l,"stop-color","var(--gradient-stop2)"),m(f,"offset","100%"),m(f,"stop-color","var(--gradient-stop1)"),m(n,"id","gradient"),m(n,"x1","50%"),m(n,"y1","-200%"),m(n,"x2","50%"),m(n,"y2","200%"),m(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"),m(x,"x","20"),m(x,"y","1"),m(x,"width","16"),m(x,"height","37"),m(x,"rx","8"),m($,"fill","url(#gradient)"),m($,"fill-rule","evenodd"),m(e,"class","Icon svelte-s2u2hd"),m(e,"viewBox","0 0 56 56"),m(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,$),a($,v),a($,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"),m(o,"d","M42 26h4v4c0 9.265-7 16.895-16 17.89V55h-4v-7.11c-8.892-.982-15.833-8.444-15.997-17.56L10 30v-4h4v4c0 7.732 6.268 14 14 14 7.628 0 13.83-6.1 13.997-13.687L42 30v-4z"),m(i,"x","20"),m(i,"y","1"),m(i,"width","16"),m(i,"height","37"),m(i,"rx","8"),m(n,"fill","var(--icon-color)"),m(n,"fill-rule","evenodd"),m(e,"class","Icon svelte-s2u2hd"),m(e,"viewBox","0 0 56 56"),m(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"),m(o,"d","M42 26h4v4c0 9.265-7 16.895-16 17.89V55h-4v-7.11c-8.892-.982-15.833-8.444-15.997-17.56L10 30v-4h4v4c0 7.732 6.268 14 14 14 7.628 0 13.83-6.1 13.997-13.687L42 30v-4z"),m(o,"fill-rule","nonzero"),m(i,"d","M37 13.081V31a8 8 0 11-16 0v-1.919l16-16zM26 1a8 8 0 018 8v1.319L18 26.318V9a8 8 0 018-8zM37.969 7.932l3.74-7.35 3.018 2.625zM39.654 10.608l7.531-3.359.695 3.94z"),m(n,"fill","var(--icon-color)"),m(n,"fill-rule","evenodd"),m(e,"class","Icon svelte-s2u2hd"),m(e,"viewBox","0 0 56 56"),m(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"),m(o,"d","M36 14.828V30a8 8 0 01-15.961.79l15.96-15.962zM28 1a8 8 0 018 8v.172L20 25.173V9a8 8 0 018-8z"),m(i,"d","M42 26h4v4c0 9.265-7 16.895-16 17.89V55h-4v-7.11c-8.892-.982-15.833-8.444-15.997-17.56L10 30v-4h4v4c0 7.732 6.268 14 14 14 7.628 0 13.83-6.1 13.997-13.687L42 30v-4z"),m(n,"fill","var(--icon-color)"),m(n,"fill-rule","nonzero"),m(e,"class","Icon svelte-s2u2hd"),m(e,"viewBox","0 0 56 56"),m(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 q{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"),m(r,"stop-color","var(--fx-gradient-stop1)"),m(r,"offset","0%"),m(s,"stop-color","var(--fx-gradient-stop2)"),m(s,"offset","100%"),m(i,"x1","50%"),m(i,"y1","10%"),m(i,"x2","50%"),m(i,"y2","100%"),m(i,"id","a"),m(l,"stdDeviation","18"),m(l,"in","SourceGraphic"),m(c,"x","-35%"),m(c,"y","-35%"),m(c,"width","170%"),m(c,"height","170%"),m(c,"filterUnits","objectBoundingBox"),m(c,"id","b"),m(f,"filter","url(#b)"),m(f,"cx","124"),m(f,"cy","124"),m(f,"r","79"),m(f,"fill","url(#a)"),m(f,"fillrule","evenodd"),m(n,"class","Fx svelte-1fpkb0k"),m(n,"viewBox","0 0 246 246"),m(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 q{constructor(t){super(),j(this,t,null,ht,r,{},ft)}}const{window:gt}=I;function $t(t){let e;return{c(){e=f("link"),m(e,"href",t[9]),m(e,"rel","stylesheet")},m(t,n){d(t,e,n)},p(t,n){512&n[0]&&m(e,"href",t[9])},d(t){t&&u(e)}}}function mt(e){let n,i,r,s,c,l,h,p,w,b,y,k,z=void 0!==e[9]&&$t(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"),V(r.$$.fragment),s=g(),V(c.$$.fragment),l=g(),V(h.$$.fragment),p=g(),w=f("slot"),this.c=t,m(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),P(r,i,null),a(i,s),P(c,i,null),a(i,l),P(h,i,null),a(i,p),a(i,w),b=!0,y||(k=[$(gt,"mouseup",e[19]),$(gt,"keydown",e[20]),$(gt,"keyup",e[21]),$(i,"mousedown",e[18]),$(i,"touchstart",e[18]),$(i,"dragstart",e[18]),$(i,"mouseup",e[19]),$(i,"touchend",e[19],{passive:!0}),$(i,"dragend",e[19])],y=!0)},p(t,e){void 0!==t[9]?z?z.p(t,e):(z=$t(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){T(r.$$.fragment,t),T(c.$$.fragment,t),T(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="88px"}=e,{holdscale:u="1.35"}=e,{borderscale:f="0.06"}=e,{iconsize:h="60%"}=e,{fxsize:p="250%"}=e,{backgroundcolor:g="#ffffff"}=e,{iconcolor:$="#000000"}=e,{gradientstop1:m="#15e8b5"}=e,{gradientstop2:v="#4fa1f9"}=e,{fxgradientstop1:x}=e,{fxgradientstop2:w}=e,{customcssurl:b}=e;let y=!1,z=0,M=[0,0],E=[0,0],C=[1,1],_=[0,0],N=ot[c],D=null,B=0,S=0;const F=k(),L=(t,e)=>{F.dispatchEvent(new CustomEvent(t,{detail:e,composed:!0}))};var A;A=()=>{n(12,E=[1,0]);let t=null;const e=()=>{B=S,S=(new Date).getTime();const i=S-(B||S);N.effect===et.Connecting&&n(13,C[0]=.25*Math.cos(S/2500*Math.PI*2)+.25,C),N.effect===et.Busy&&n(13,C[0]=.25*Math.cos(S/1e3*Math.PI*2)+.25,C),n(12,E=[E[0],I(E[1],o?E[0]:0,.2,i)]),n(13,C=[C[0],I(C[1],C[0],.08,i)]),n(14,_=[_[0],I(_[1],_[0],.08,i)]),n(11,M=[M[0]+2.5,I(M[1],M[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(),V(),N.triggerFx===nt.Whirl&&n(11,M[0]+=720,M),N.behaviour===tt.Click&&null===D&&(D=window.setTimeout((()=>{n(14,_[0]=0,_),D=null}),500)),F.onholdstart&&F.onholdstart(),L(Y.holdstart))},T=()=>{if(y){n(10,y=!1);const t={timeMs:Date.now()-z};V(),null!==D&&window.clearTimeout(D),F.onholdend&&F.onholdend(t),L("holdend",t)}},I=(t,e,n,o)=>t*(1-(n=Math.pow(n,1e3/60/o)))+e*n,V=(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,$=t.iconcolor),"gradientstop1"in t&&n(5,m=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,E[0]=t?s:1,E),n(14,_[0]=t||e==Q.Recording?1:0,_),N.icon){case Z.MicActive:case Z.Mic:case Z.Denied:case Z.Error:n(13,C[0]=1,C)}})(y,c)},[d,h,p,g,$,m,v,x,w,b,y,M,E,C,_,N,r,i,R,T,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&&T()},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,mt,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),F()))}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}),F()}get capturekey(){return this.$$.ctx[23]}set capturekey(t){this.$$set({capturekey:t}),F()}get hide(){return this.$$.ctx[24]}set hide(t){this.$$set({hide:t}),F()}get size(){return this.$$.ctx[0]}set size(t){this.$$set({size:t}),F()}get holdscale(){return this.$$.ctx[25]}set holdscale(t){this.$$set({holdscale:t}),F()}get borderscale(){return this.$$.ctx[26]}set borderscale(t){this.$$set({borderscale:t}),F()}get iconsize(){return this.$$.ctx[1]}set iconsize(t){this.$$set({iconsize:t}),F()}get fxsize(){return this.$$.ctx[2]}set fxsize(t){this.$$set({fxsize:t}),F()}get backgroundcolor(){return this.$$.ctx[3]}set backgroundcolor(t){this.$$set({backgroundcolor:t}),F()}get iconcolor(){return this.$$.ctx[4]}set iconcolor(t){this.$$set({iconcolor:t}),F()}get gradientstop1(){return this.$$.ctx[5]}set gradientstop1(t){this.$$set({gradientstop1:t}),F()}get gradientstop2(){return this.$$.ctx[6]}set gradientstop2(t){this.$$set({gradientstop2:t}),F()}get fxgradientstop1(){return this.$$.ctx[7]}set fxgradientstop1(t){this.$$set({fxgradientstop1:t}),F()}get fxgradientstop2(){return this.$$.ctx[8]}set fxgradientstop2(t){this.$$set({fxgradientstop2:t}),F()}get customcssurl(){return this.$$.ctx[9]}set customcssurl(t){this.$$set({customcssurl:t}),F()}get isbuttonpressed(){return this.$$.ctx[27]}}customElements.get("holdable-button")?console.warn("Skipping re-defining customElement holdable-button"):customElements.define("holdable-button",xt)})); | ||
//# sourceMappingURL=holdable-button.js.map |
export {}; | ||
//# sourceMappingURL=intro-popup.d.ts.map |
@@ -1,3 +0,2 @@ | ||
!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){"use strict";function e(){}const n=e=>e;function t(e){return e()}function r(){return Object.create(null)}function o(e){e.forEach(t)}function i(e){return"function"==typeof e}function a(e,n){return e!=e?n==n:e!==n||e&&"object"==typeof e||"function"==typeof e}let s;function c(e,n){return s||(s=document.createElement("a")),s.href=n,e===s.href}function l(e,n){return e!=e?n==n:e!==n}function u(e){return 0===Object.keys(e).length}const d="undefined"!=typeof window;let f=d?()=>window.performance.now():()=>Date.now(),p=d?e=>requestAnimationFrame(e):e;const h=new Set;function m(e){h.forEach((n=>{n.c(e)||(h.delete(n),n.f())})),0!==h.size&&p(m)}function g(e,n){e.appendChild(n)}function v(e){if(!e)return document;const n=e.getRootNode?e.getRootNode():e.ownerDocument;return n&&n.host?n:e.ownerDocument}function b(e){const n=w("style");return function(e,n){g(e.head||e,n)}(v(e),n),n}function C(e,n,t){e.insertBefore(n,t||null)}function y(e){e.parentNode.removeChild(e)}function w(e){return document.createElement(e)}function x(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function V(e){return document.createTextNode(e)}function S(){return V(" ")}function M(e,n,t,r){return e.addEventListener(n,t,r),()=>e.removeEventListener(n,t,r)}function $(e,n,t){null==t?e.removeAttribute(n):e.getAttribute(n)!==t&&e.setAttribute(n,t)}function L(e,n,t,r){e.style.setProperty(n,t,r?"important":"")}function A(e,n,t){e.classList[t?"add":"remove"](n)}function E(e){const n={};for(const t of e)n[t.name]=t.value;return n}const k=new Set;let z,N=0;function T(e,n,t,r,o,i,a,s=0){const c=16.666/r;let l="{\n";for(let e=0;e<=1;e+=c){const r=n+(t-n)*i(e);l+=100*e+`%{${a(r,1-r)}}\n`}const u=l+`100% {${a(t,1-t)}}\n}`,d=`__svelte_${function(e){let n=5381,t=e.length;for(;t--;)n=(n<<5)-n^e.charCodeAt(t);return n>>>0}(u)}_${s}`,f=v(e);k.add(f);const p=f.__svelte_stylesheet||(f.__svelte_stylesheet=b(e).sheet),h=f.__svelte_rules||(f.__svelte_rules={});h[d]||(h[d]=!0,p.insertRule(`@keyframes ${d} ${u}`,p.cssRules.length));const m=e.style.animation||"";return e.style.animation=`${m?`${m}, `:""}${d} ${r}ms linear ${o}ms 1 both`,N+=1,d}function B(e,n){const t=(e.style.animation||"").split(", "),r=t.filter(n?e=>e.indexOf(n)<0:e=>-1===e.indexOf("__svelte")),o=t.length-r.length;o&&(e.style.animation=r.join(", "),N-=o,N||p((()=>{N||(k.forEach((e=>{const n=e.__svelte_stylesheet;let t=n.cssRules.length;for(;t--;)n.deleteRule(t);e.__svelte_rules={}})),k.clear())})))}function I(e){z=e}function P(){if(!z)throw new Error("Function called outside component initialization");return z}const R=[],_=[],G=[],F=[],O=Promise.resolve();let D=!1;function H(e){G.push(e)}let Z=!1;const j=new Set;function K(){if(!Z){Z=!0;do{for(let e=0;e<R.length;e+=1){const n=R[e];I(n),U(n.$$)}for(I(null),R.length=0;_.length;)_.pop()();for(let e=0;e<G.length;e+=1){const n=G[e];j.has(n)||(j.add(n),n())}G.length=0}while(R.length);for(;F.length;)F.pop()();D=!1,Z=!1,j.clear()}}function U(e){if(null!==e.fragment){e.update(),o(e.before_update);const n=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,n),e.after_update.forEach(H)}}let W;function J(e,n,t){e.dispatchEvent(function(e,n,t=!1){const r=document.createEvent("CustomEvent");return r.initCustomEvent(e,t,!1,n),r}(`${n?"intro":"outro"}${t}`))}const Y=new Set;let q;function Q(e,n){e&&e.i&&(Y.delete(e),e.i(n))}function X(e,n,t,r){if(e&&e.o){if(Y.has(e))return;Y.add(e),q.c.push((()=>{Y.delete(e),r&&(t&&e.d(1),r())})),e.o(n)}}const ee={duration:0};function ne(t,r,a,s){let c=r(t,a),l=s?0:1,u=null,d=null,g=null;function v(){g&&B(t,g)}function b(e,n){const t=e.b-l;return n*=Math.abs(t),{a:l,b:e.b,d:t,duration:n,start:e.start,end:e.start+n,group:e.group}}function C(r){const{delay:i=0,duration:a=300,easing:s=n,tick:C=e,css:y}=c||ee,w={start:f()+i,b:r};r||(w.group=q,q.r+=1),u||d?d=w:(y&&(v(),g=T(t,l,r,a,i,s,y)),r&&C(0,1),u=b(w,a),H((()=>J(t,r,"start"))),function(e){let n;0===h.size&&p(m),new Promise((t=>{h.add(n={c:e,f:t})}))}((e=>{if(d&&e>d.start&&(u=b(d,a),d=null,J(t,u.b,"start"),y&&(v(),g=T(t,l,u.b,u.duration,0,s,c.css))),u)if(e>=u.end)C(l=u.b,1-l),J(t,u.b,"end"),d||(u.b?v():--u.group.r||o(u.group.c)),u=null;else if(e>=u.start){const n=e-u.start;l=u.a+u.d*s(n/u.duration),C(l,1-l)}return!(!u&&!d)})))}return{run(e){i(c)?(W||(W=Promise.resolve(),W.then((()=>{W=null}))),W).then((()=>{c=c(),C(e)})):C(e)},end(){v(),u=d=null}}}const te="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function re(e){e&&e.c()}function oe(e,n,r,a){const{fragment:s,on_mount:c,on_destroy:l,after_update:u}=e.$$;s&&s.m(n,r),a||H((()=>{const n=c.map(t).filter(i);l?l.push(...n):o(n),e.$$.on_mount=[]})),u.forEach(H)}function ie(e,n){const t=e.$$;null!==t.fragment&&(o(t.on_destroy),t.fragment&&t.fragment.d(n),t.on_destroy=t.fragment=null,t.ctx=[])}function ae(e,n){-1===e.$$.dirty[0]&&(R.push(e),D||(D=!0,O.then(K)),e.$$.dirty.fill(0)),e.$$.dirty[n/31|0]|=1<<n%31}function se(n,t,i,a,s,c,l,u=[-1]){const d=z;I(n);const f=n.$$={fragment:null,ctx:null,props:c,update:e,not_equal:s,bound:r(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(d?d.$$.context:[])),callbacks:r(),dirty:u,skip_bound:!1,root:t.target||d.$$.root};l&&l(f.root);let p=!1;if(f.ctx=i?i(n,t.props||{},((e,t,...r)=>{const o=r.length?r[0]:t;return f.ctx&&s(f.ctx[e],f.ctx[e]=o)&&(!f.skip_bound&&f.bound[e]&&f.bound[e](o),p&&ae(n,e)),t})):[],f.update(),p=!0,o(f.before_update),f.fragment=!!a&&a(f.ctx),t.target){if(t.hydrate){const e=function(e){return Array.from(e.childNodes)}(t.target);f.fragment&&f.fragment.l(e),e.forEach(y)}else f.fragment&&f.fragment.c();t.intro&&Q(n.$$.fragment),oe(n,t.target,t.anchor,t.customElement),K()}I(d)}let ce;"function"==typeof HTMLElement&&(ce=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:e}=this.$$;this.$$.on_disconnect=e.map(t).filter(i);for(const e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(e,n,t){this[e]=t}disconnectedCallback(){o(this.$$.on_disconnect)}$destroy(){ie(this,1),this.$destroy=e}$on(e,n){const t=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return t.push(n),()=>{const e=t.indexOf(n);-1!==e&&t.splice(e,1)}}$set(e){this.$$set&&!u(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}});class le{$destroy(){ie(this,1),this.$destroy=e}$on(e,n){const t=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return t.push(n),()=>{const e=t.indexOf(n);-1!==e&&t.splice(e,1)}}$set(e){this.$$set&&!u(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function ue(e,{delay:t=0,duration:r=400,easing:o=n}={}){const i=+getComputedStyle(e).opacity;return{delay:t,duration:r,easing:o,css:e=>"opacity: "+e*i}}var de;!function(e){e[e.Failed=0]="Failed",e[e.NoBrowserSupport=1]="NoBrowserSupport",e[e.NoAudioConsent=2]="NoAudioConsent",e[e.Disconnected=3]="Disconnected",e[e.Disconnecting=4]="Disconnecting",e[e.Connecting=5]="Connecting",e[e.Connected=6]="Connected",e[e.Starting=7]="Starting",e[e.Stopping=8]="Stopping",e[e.Recording=9]="Recording"}(de||(de={})),new Map([[de.Failed,"Failed"],[de.NoBrowserSupport,"NoBrowserSupport"],[de.NoAudioConsent,"NoAudioConsent"],[de.Disconnecting,"Disconnecting"],[de.Disconnected,"Disconnected"],[de.Connecting,"Connecting"],[de.Connected,"Connected"],[de.Starting,"Starting"],[de.Stopping,"Stopping"],[de.Recording,"Recording"]]);var fe="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var pe,he,me=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},ge=me;function ve(e,n,t,r){return e.call(r,n[t],t,n)}var be=function(e,n,t){var r,o=0;for(r in null==pe&&function(){for(var e in he=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],pe=!0,{toString:null})pe=!1}(),e)if(!1===ve(n,e,r,t))break;if(pe)for(var i=e.constructor,a=!!i&&e===i.prototype;(r=he[o++])&&("constructor"===r&&(a||!ge(e,r))||e[r]===Object.prototype[r]||!1!==ve(n,e,r,t)););},Ce=be;var ye=function(e){var n=[];return Ce(e,(function(e,t){"function"==typeof e&&n.push(t)})),n.sort()};var we=function(e,n,t){var r=e.length;n=null==n?0:n<0?Math.max(r+n,0):Math.min(n,r),t=null==t?r:t<0?Math.max(r+t,0):Math.min(t,r);for(var o=[];n<t;)o.push(e[n++]);return o},xe=we;var Ve=function(e,n,t){var r=xe(arguments,2);return function(){return e.apply(n,r.concat(xe(arguments)))}};var Se=function(e,n,t){if(null!=e)for(var r=-1,o=e.length;++r<o&&!1!==n.call(t,e[r],r,e););},Me=ye,$e=Ve,Le=Se,Ae=we;var Ee=function(e,n){var t=arguments.length>1?Ae(arguments,1):Me(e);Le(t,(function(n){e[n]=$e(e[n],e)}))},ke=me,ze=be;var Ne=function(e,n,t){ze(e,(function(r,o){if(ke(e,o))return n.call(t,e[o],o,e)}))};var Te=function(e){return e};var Be=function(e){return function(n){return n[e]}},Ie=/^\[object (.*)\]$/,Pe=Object.prototype.toString;var Re=function(e){return null===e?"Null":undefined===e?"Undefined":Ie.exec(Pe.call(e))[1]},_e=Re;var Ge=function(e,n){return _e(e)===n},Fe=Ge,Oe=Array.isArray||function(e){return Fe(e,"Array")},De=Ne,He=Oe;function Ze(e,n){for(var t=-1,r=e.length;++t<r;)if(je(e[t],n))return!0;return!1}function je(e,n){return e&&"object"==typeof e?He(e)&&He(n)?function(e,n){for(var t=-1,r=n.length;++t<r;)if(!Ze(e,n[t]))return!1;return!0}(e,n):function(e,n){var t=!0;return De(n,(function(n,r){if(!je(e[r],n))return t=!1})),t}(e,n):e===n}var Ke=je,Ue=Te,We=Be,Je=Ke;var Ye=function(e,n){if(null==e)return Ue;switch(typeof e){case"function":return void 0!==n?function(t,r,o){return e.call(n,t,r,o)}:e;case"object":return function(n){return Je(n,e)};case"string":case"number":return We(e)}},qe=Ne,Qe=Ye;var Xe=function(e,n,t){n=Qe(n,t);var r=!1;return qe(e,(function(t,o){if(n(t,o,e))return r=!0,!1})),r},en=Xe;var nn=function(e,n){return en(e,(function(e){return e===n}))};var tn=function(e){return!!e&&"object"==typeof e&&e.constructor===Object},rn=Ne,on=tn;var an=function e(n,t){for(var r,o=0,i=arguments.length;++o<i;)(r=arguments[o])&&rn(r,(function(t,r){var o=n[r];null==o?n[r]=t:on(o)&&on(t)&&e(o,t)}));return n},sn=Ne,cn=tn;function ln(e,n){for(var t,r=0,o=arguments.length;++r<o;)(t=arguments[r])&&sn(t,un,e);return e}function un(e,n){var t=this[n];cn(e)&&cn(t)?ln(t,e):this[n]=e}var dn=ln,fn=Ne,pn=Ye;var hn=function(e,n,t){n=pn(n,t);var r=!0;return fn(e,(function(t,o){if(!n(t,o,e))return r=!1,!1})),r},mn=Ge;var gn=function(e){return mn(e,"Object")};var vn=me,bn=hn,Cn=gn,yn=function(e,n){return e===n?0!==e||1/e==1/n:e!=e&&n!=n};function wn(e,n){return vn(this,n)}var xn=function(e,n,t){return t=t||yn,Cn(e)&&Cn(n)?bn(e,function(e){return function(n,t){return vn(this,t)&&e(n,this[t])}}(t),n)&&bn(n,wn,e):t(e,n)},Vn=Se,Sn=we,Mn=Ne;var $n=function(e,n){return Vn(Sn(arguments,1),(function(n){Mn(n,(function(n,t){null==e[t]&&(e[t]=n)}))})),e},Ln=Ne,An=Ye;var En=function(e,n,t){n=An(n,t);var r={};return Ln(e,(function(e,t,o){n(e,t,o)&&(r[t]=e)})),r},kn=Xe,zn=Ye;var Nn=function(e,n,t){var r;return n=zn(n,t),kn(e,(function(e,t,o){if(n(e,t,o))return r=e,!0})),r},Tn=Ne,Bn=tn;function In(e,n,t,r){return Tn(e,(function(e,o){var i=t?t+"."+o:o;0!==r&&Bn(e)?In(e,n,i,r-1):n[i]=e})),n}var Pn=function(e,n){return null==e?{}:In(e,{},"",n=null==n?-1:n)};var Rn=function(e,n){for(var t=n.split("."),r=t.pop();n=t.shift();)if(null==(e=e[n]))return;return e[r]},_n=Rn;var Gn=function(e,n){return undefined!==_n(e,n)},Fn=Ne,On=Object.keys||function(e){var n=[];return Fn(e,(function(e,t){n.push(t)})),n},Dn=Ne,Hn=Ye;var Zn=function(e,n,t){n=Hn(n,t);var r={};return Dn(e,(function(e,t,o){r[t]=n(e,t,o)})),r},jn=Ne;var Kn=function(e,n){var t=!0;return jn(n,(function(n,r){if(e[r]!==n)return t=!1})),t},Un=Ye;var Wn=function(e,n,t){if(null!=e&&e.length){if(e.length&&!n)return Math.max.apply(Math,e);n=Un(n,t);for(var r,o,i,a=-1/0,s=-1,c=e.length;++s<c;)(i=n(o=e[s],s,e))>a&&(a=i,r=o);return r}return 1/0},Jn=Ne;var Yn=function(e){var n=[];return Jn(e,(function(e,t){n.push(e)})),n},qn=Wn,Qn=Yn;var Xn=Ne;function et(e,n){this[n]=e}var nt=function(e,n){for(var t,r=0,o=arguments.length;++r<o;)null!=(t=arguments[r])&&Xn(t,et,e);return e},tt=Re,rt=tn,ot=nt;var it=function(e){switch(tt(e)){case"Object":return rt(r=e)?ot({},r):r;case"Array":return e.slice();case"RegExp":return t="",t+=(n=e).multiline?"m":"",t+=n.global?"g":"",t+=n.ignoreCase?"i":"",new RegExp(n.source,t);case"Date":return new Date(+e);default:return e}var n,t,r},at=Ne,st=Re,ct=tn;function lt(e,n){switch(st(e)){case"Object":return function(e,n){if(ct(e)){var t={};return at(e,(function(e,t){this[t]=lt(e,n)}),t),t}return n?n(e):e}(e,n);case"Array":return function(e,n){var t=[],r=-1,o=e.length;for(;++r<o;)t[r]=lt(e[r],n);return t}(e,n);default:return it(e)}}var ut=me,dt=lt,ft=gn;var pt=function e(){var n,t,r,o,i=1;for(o=dt(arguments[0]);r=arguments[i++];)for(n in r)ut(r,n)&&(t=r[n],ft(t)&&ft(o[n])?o[n]=e(o[n],t):o[n]=dt(t));return o},ht=Ye;var mt=function(e,n,t){if(null!=e&&e.length){if(e.length&&!n)return Math.min.apply(Math,e);n=ht(n,t);for(var r,o,i,a=1/0,s=-1,c=e.length;++s<c;)(i=n(o=e[s],s,e))<a&&(a=i,r=o);return r}return-1/0},gt=mt,vt=Yn;var bt=Se;var Ct=function(e,n){return n?(bt(n.split("."),(function(n){e[n]||(e[n]={}),e=e[n]})),e):e};var yt=function(e,n,t){if(t=t||0,null==e)return-1;for(var r=e.length,o=t<0?r+t:t;o<r;){if(e[o]===n)return o;o++}return-1},wt=yt;var xt=we,Vt=function(e,n){return-1!==wt(e,n)};var St=function(e,n){var t="string"!=typeof arguments[1]?arguments[1]:xt(arguments,1),r={};for(var o in e)e.hasOwnProperty(o)&&!Vt(t,o)&&(r[o]=e[o]);return r},Mt=we;var $t=function(e,n){for(var t,r="string"!=typeof arguments[1]?arguments[1]:Mt(arguments,1),o={},i=0;t=r[i++];)o[t]=e[t];return o},Lt=Zn,At=Be;var Et=Ne;var kt=function(e){var n=0;return Et(e,(function(){n++})),n},zt=Ne,Nt=kt;var Tt=function(e,n,t,r){var o=arguments.length>2;if(!Nt(e)&&!o)throw new Error("reduce of empty object with no initial value");return zt(e,(function(e,i,a){o?t=n.call(r,t,e,i,a):(t=e,o=!0)})),t},Bt=En,It=Ye;var Pt=Ge;var Rt=function(e){return Pt(e,"Function")};var _t=function(e,n){var t=e[n];if(void 0!==t)return Rt(t)?t.call(e):t},Gt=Ct;var Ft=function(e,n,t){var r=/^(.+)\.(.+)$/.exec(n);r?Gt(e,r[1])[r[2]]=t:e[n]=t},Ot=Gn;var Dt=function(e,n){if(Ot(e,n)){for(var t=n.split("."),r=t.pop();n=t.shift();)e=e[n];return delete e[r]}return!0},Ht={bindAll:Ee,contains:nn,deepFillIn:an,deepMatches:Ke,deepMixIn:dn,equals:xn,every:hn,fillIn:$n,filter:En,find:Nn,flatten:Pn,forIn:be,forOwn:Ne,functions:ye,get:Rn,has:Gn,hasOwn:me,keys:On,map:Zn,matches:Kn,max:function(e,n){return qn(Qn(e),n)},merge:pt,min:function(e,n){return gt(vt(e),n)},mixIn:nt,namespace:Ct,omit:St,pick:$t,pluck:function(e,n){return Lt(e,At(n))},reduce:Tt,reject:function(e,n,t){return n=It(n,t),Bt(e,(function(e,t,r){return!n(e,t,r)}),t)},result:_t,set:Ft,size:kt,some:Xe,unset:Dt,values:Yn};(function(){var e,n;n=Ht,e=function(){function e(){}return e.prototype.getCountry=function(n){return e.prototype.countries[n]},e.prototype.getCode=function(t){var r,o;return o=null,null!=t&&-1!==(r=n.values(e.prototype.countries).indexOf(t))&&(o=Object.keys(e.prototype.countries)[r]),o},e.prototype.getCountries=function(){return n.values(e.prototype.countries)},e.prototype.getCodes=function(){return Object.keys(e.prototype.countries)},e.prototype.getData=function(){return e.prototype.countries},e.prototype.countries={AF:"Afghanistan",AX:"Åland Islands",AL:"Albania",DZ:"Algeria",AS:"American Samoa",AD:"Andorra",AO:"Angola",AI:"Anguilla",AQ:"Antarctica",AG:"Antigua and Barbuda",AR:"Argentina",AM:"Armenia",AW:"Aruba",AU:"Australia",AT:"Austria",AZ:"Azerbaijan",BS:"Bahamas",BH:"Bahrain",BD:"Bangladesh",BB:"Barbados",BY:"Belarus",BE:"Belgium",BZ:"Belize",BJ:"Benin",BM:"Bermuda",BT:"Bhutan",BO:"Bolivia, Plurinational State of",BQ:"Bonaire, Sint Eustatius and Saba",BA:"Bosnia and Herzegovina",BW:"Botswana",BV:"Bouvet Island",BR:"Brazil",IO:"British Indian Ocean Territory",BN:"Brunei Darussalam",BG:"Bulgaria",BF:"Burkina Faso",BI:"Burundi",KH:"Cambodia",CM:"Cameroon",CA:"Canada",CV:"Cape Verde",KY:"Cayman Islands",CF:"Central African Republic",TD:"Chad",CL:"Chile",CN:"China",CX:"Christmas Island",CC:"Cocos (Keeling) Islands",CO:"Colombia",KM:"Comoros",CG:"Congo",CD:"Congo, the Democratic Republic of the",CK:"Cook Islands",CR:"Costa Rica",CI:"Côte d'Ivoire",HR:"Croatia",CU:"Cuba",CW:"Curaçao",CY:"Cyprus",CZ:"Czech Republic",DK:"Denmark",DJ:"Djibouti",DM:"Dominica",DO:"Dominican Republic",EC:"Ecuador",EG:"Egypt",SV:"El Salvador",GQ:"Equatorial Guinea",ER:"Eritrea",EE:"Estonia",ET:"Ethiopia",FK:"Falkland Islands (Malvinas)",FO:"Faroe Islands",FJ:"Fiji",FI:"Finland",FR:"France",GF:"French Guiana",PF:"French Polynesia",TF:"French Southern Territories",GA:"Gabon",GM:"Gambia",GE:"Georgia",DE:"Germany",GH:"Ghana",GI:"Gibraltar",GR:"Greece",GL:"Greenland",GD:"Grenada",GP:"Guadeloupe",GU:"Guam",GT:"Guatemala",GG:"Guernsey",GN:"Guinea",GW:"Guinea-Bissau",GY:"Guyana",HT:"Haiti",HM:"Heard Island and McDonald Mcdonald Islands",VA:"Holy See (Vatican City State)",HN:"Honduras",HK:"Hong Kong",HU:"Hungary",IS:"Iceland",IN:"India",ID:"Indonesia",IR:"Iran, Islamic Republic of",IQ:"Iraq",IE:"Ireland",IM:"Isle of Man",IL:"Israel",IT:"Italy",JM:"Jamaica",JP:"Japan",JE:"Jersey",JO:"Jordan",KZ:"Kazakhstan",KE:"Kenya",KI:"Kiribati",KP:"Korea, Democratic People's Republic of",KR:"Korea, Republic of",KW:"Kuwait",KG:"Kyrgyzstan",LA:"Lao People's Democratic Republic",LV:"Latvia",LB:"Lebanon",LS:"Lesotho",LR:"Liberia",LY:"Libya",LI:"Liechtenstein",LT:"Lithuania",LU:"Luxembourg",MO:"Macao",MK:"Macedonia, the Former Yugoslav Republic of",MG:"Madagascar",MW:"Malawi",MY:"Malaysia",MV:"Maldives",ML:"Mali",MT:"Malta",MH:"Marshall Islands",MQ:"Martinique",MR:"Mauritania",MU:"Mauritius",YT:"Mayotte",MX:"Mexico",FM:"Micronesia, Federated States of",MD:"Moldova, Republic of",MC:"Monaco",MN:"Mongolia",ME:"Montenegro",MS:"Montserrat",MA:"Morocco",MZ:"Mozambique",MM:"Myanmar",NA:"Namibia",NR:"Nauru",NP:"Nepal",NL:"Netherlands",NC:"New Caledonia",NZ:"New Zealand",NI:"Nicaragua",NE:"Niger",NG:"Nigeria",NU:"Niue",NF:"Norfolk Island",MP:"Northern Mariana Islands",NO:"Norway",OM:"Oman",PK:"Pakistan",PW:"Palau",PS:"Palestine, State of",PA:"Panama",PG:"Papua New Guinea",PY:"Paraguay",PE:"Peru",PH:"Philippines",PN:"Pitcairn",PL:"Poland",PT:"Portugal",PR:"Puerto Rico",QA:"Qatar",RE:"Réunion",RO:"Romania",RU:"Russian Federation",RW:"Rwanda",BL:"Saint Barthélemy",SH:"Saint Helena, Ascension and Tristan da Cunha",KN:"Saint Kitts and Nevis",LC:"Saint Lucia",MF:"Saint Martin (French part)",PM:"Saint Pierre and Miquelon",VC:"Saint Vincent and the Grenadines",WS:"Samoa",SM:"San Marino",ST:"Sao Tome and Principe",SA:"Saudi Arabia",SN:"Senegal",RS:"Serbia",SC:"Seychelles",SL:"Sierra Leone",SG:"Singapore",SX:"Sint Maarten (Dutch part)",SK:"Slovakia",SI:"Slovenia",SB:"Solomon Islands",SO:"Somalia",ZA:"South Africa",GS:"South Georgia and the South Sandwich Islands",SS:"South Sudan",ES:"Spain",LK:"Sri Lanka",SD:"Sudan",SR:"Suriname",SJ:"Svalbard and Jan Mayen",SZ:"Swaziland",SE:"Sweden",CH:"Switzerland",SY:"Syrian Arab Republic",TW:"Taiwan, Province of China",TJ:"Tajikistan",TZ:"Tanzania, United Republic of",TH:"Thailand",TL:"Timor-Leste",TG:"Togo",TK:"Tokelau",TO:"Tonga",TT:"Trinidad and Tobago",TN:"Tunisia",TR:"Turkey",TM:"Turkmenistan",TC:"Turks and Caicos Islands",TV:"Tuvalu",UG:"Uganda",UA:"Ukraine",AE:"United Arab Emirates",GB:"United Kingdom",US:"United States",UM:"United States Minor Outlying Islands",UY:"Uruguay",UZ:"Uzbekistan",VU:"Vanuatu",VE:"Venezuela, Bolivarian Republic of",VN:"Viet Nam",VG:"Virgin Islands, British",VI:"Virgin Islands, U.S.",WF:"Wallis and Futuna",EH:"Western Sahara",YE:"Yemen",ZM:"Zambia",ZW:"Zimbabwe"},e}(),null!=null||new e}).call(fe);for(var Zt=[],jt=0;jt<256;++jt)Zt.push((jt+256).toString(16).substr(1));var Kt,Ut,Wt,Jt,Yt,qt,Qt,Xt={exports:{}}; | ||
/*! http://mths.be/base64 v0.1.0 by @mathias | MIT license */function er(e){let n,t,r,o;return{c(){n=x("svg"),t=x("g"),r=x("path"),o=x("rect"),$(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"),$(o,"x","20"),$(o,"y","1"),$(o,"width","16"),$(o,"height","37"),$(o,"rx","8"),$(t,"fill","#000"),$(t,"fill-rule","evenodd"),$(n,"class","buttonIconEl"),$(n,"viewBox","0 0 56 56"),$(n,"xmlns","http://www.w3.org/2000/svg")},m(e,i){C(e,n,i),g(n,t),g(t,r),g(t,o)},d(e){e&&y(n)}}}function nr(e){let n,t,r,o;return{c(){n=x("svg"),t=x("g"),r=x("path"),o=x("path"),$(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"),$(r,"fill-rule","nonzero"),$(o,"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,"fill","#000"),$(t,"fill-rule","evenodd"),$(n,"class","buttonIconEl"),$(n,"viewBox","0 0 56 56"),$(n,"xmlns","http://www.w3.org/2000/svg")},m(e,i){C(e,n,i),g(n,t),g(t,r),g(t,o)},d(e){e&&y(n)}}}function tr(e){let n,t,r,o;return{c(){n=x("svg"),t=x("g"),r=x("path"),o=x("path"),$(r,"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"),$(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,"fill","#000"),$(t,"fill-rule","nonzero"),$(n,"class","buttonIconEl"),$(n,"viewBox","0 0 56 56"),$(n,"xmlns","http://www.w3.org/2000/svg")},m(e,i){C(e,n,i),g(n,t),g(t,r),g(t,o)},d(e){e&&y(n)}}}function rr(e){let n,t,r,o;return{c(){n=x("svg"),t=x("g"),r=x("path"),o=x("rect"),$(r,"d","M52 28c0 13.255-10.745 24-24 24S4 41.255 4 28c0-8.921 4.867-16.705 12.091-20.842l1.984 3.474C12.055 14.08 8 20.566 8 28c0 11.046 8.954 20 20 20s20-8.954 20-20c0-7.434-4.056-13.92-10.075-17.368L39.91 7.16C47.133 11.296 52 19.079 52 28z"),$(r,"fill-rule","nonzero"),$(o,"x","24"),$(o,"y","1"),$(o,"width","8"),$(o,"height","23"),$(o,"rx","4"),$(t,"fill","#000"),$(t,"fill-rule","evenodd"),$(n,"class","buttonIconEl"),$(n,"viewBox","0 0 56 56"),$(n,"xmlns","http://www.w3.org/2000/svg")},m(e,i){C(e,n,i),g(n,t),g(t,r),g(t,o)},d(e){e&&y(n)}}}function or(n){let t,r,o,i,a=n[0]===Yt.Mic&&er(),s=n[0]===Yt.Error&&nr(),c=n[0]===Yt.Denied&&tr(),l=n[0]===Yt.Poweron&&rr();return{c(){t=w("div"),a&&a.c(),r=S(),s&&s.c(),o=S(),c&&c.c(),i=S(),l&&l.c(),L(t,"position","absolute"),L(t,"width","60%"),L(t,"height","60%"),L(t,"top","50%"),L(t,"left","50%"),L(t,"transform","translate(-50%, -50%)"),L(t,"pointer-events","none"),L(t,"transition","0.25s"),L(t,"opacity","var(--icon-opacity)")},m(e,n){C(e,t,n),a&&a.m(t,null),g(t,r),s&&s.m(t,null),g(t,o),c&&c.m(t,null),g(t,i),l&&l.m(t,null)},p(e,[n]){e[0]===Yt.Mic?a||(a=er(),a.c(),a.m(t,r)):a&&(a.d(1),a=null),e[0]===Yt.Error?s||(s=nr(),s.c(),s.m(t,o)):s&&(s.d(1),s=null),e[0]===Yt.Denied?c||(c=tr(),c.c(),c.m(t,i)):c&&(c.d(1),c=null),e[0]===Yt.Poweron?l||(l=rr(),l.c(),l.m(t,null)):l&&(l.d(1),l=null)},i:e,o:e,d(e){e&&y(t),a&&a.d(),s&&s.d(),c&&c.d(),l&&l.d()}}}function ir(e,n,t){let{icon:r=Yt.Mic}=n;return e.$$set=e=>{"icon"in e&&t(0,r=e.icon)},[r]}Kt=Xt,Ut=Xt.exports,function(e){var n=Ut,t=Kt&&Kt.exports==n&&Kt,r="object"==typeof fe&&fe;r.global!==r&&r.window!==r||(e=r);var o=function(e){this.message=e};(o.prototype=new Error).name="InvalidCharacterError";var i=function(e){throw new o(e)},a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=/[\t\n\f\r ]/g,c={encode:function(e){e=String(e),/[^\0-\xFF]/.test(e)&&i("The string to be encoded contains characters outside of the Latin1 range.");for(var n,t,r,o,s=e.length%3,c="",l=-1,u=e.length-s;++l<u;)n=e.charCodeAt(l)<<16,t=e.charCodeAt(++l)<<8,r=e.charCodeAt(++l),c+=a.charAt((o=n+t+r)>>18&63)+a.charAt(o>>12&63)+a.charAt(o>>6&63)+a.charAt(63&o);return 2==s?(n=e.charCodeAt(l)<<8,t=e.charCodeAt(++l),c+=a.charAt((o=n+t)>>10)+a.charAt(o>>4&63)+a.charAt(o<<2&63)+"="):1==s&&(o=e.charCodeAt(l),c+=a.charAt(o>>2)+a.charAt(o<<4&63)+"=="),c},decode:function(e){var n=(e=String(e).replace(s,"")).length;n%4==0&&(n=(e=e.replace(/==?$/,"")).length),(n%4==1||/[^+a-zA-Z0-9/]/.test(e))&&i("Invalid character: the string to be decoded is not correctly encoded.");for(var t,r,o=0,c="",l=-1;++l<n;)r=a.indexOf(e.charAt(l)),t=o%4?64*t+r:r,o++%4&&(c+=String.fromCharCode(255&t>>(-2*o&6)));return c},version:"0.1.0"};if(n&&!n.nodeType)if(t)t.exports=c;else for(var l in c)c.hasOwnProperty(l)&&(n[l]=c[l]);else e.base64=c}(fe),function(e){e.Opened="WEBSOCKET_OPEN",e.SourceSampleRateSetSuccess="SOURSE_SAMPLE_RATE_SET_SUCCESS",e.Started="started",e.Stopped="stopped",e.SegmentEnd="segment_end",e.Transcript="transcript",e.Entity="entity",e.Intent="intent",e.TentativeTranscript="tentative_transcript",e.TentativeEntities="tentative_entities",e.TentativeIntent="tentative_intent"}(Wt||(Wt={})),function(e){e.Failed="Failed",e.NoBrowserSupport="NoBrowserSupport",e.NoAudioConsent="NoAudioConsent",e.Idle="Idle",e.Connecting="Connecting",e.Ready="Ready",e.Recording="Recording",e.Loading="Loading"}(Jt||(Jt={})),function(e){e.Poweron="poweron",e.Mic="mic",e.Error="error",e.Denied="denied"}(Yt||(Yt={})),function(e){e.Hold="hold",e.Click="click",e.Noninteractive="noninteractive"}(qt||(qt={})),function(e){e.None="none",e.Connecting="connecting",e.Busy="busy"}(Qt||(Qt={})),de.Disconnected,Yt.Poweron,qt.Click,Qt.None,de.Disconnecting,Yt.Poweron,qt.Noninteractive,Qt.Connecting,de.Connecting,Yt.Poweron,qt.Noninteractive,Qt.Connecting,de.Connected,Yt.Mic,qt.Hold,Qt.None,de.Starting,Yt.Mic,qt.Hold,Qt.Connecting,de.Recording,Yt.Mic,qt.Hold,Qt.None,de.Stopping,Yt.Mic,qt.Noninteractive,Qt.Busy,de.Failed,Yt.Error,qt.Click,Qt.None,de.NoBrowserSupport,Yt.Error,qt.Click,Qt.None,de.NoAudioConsent,Yt.Denied,qt.Click,Qt.None;class ar extends le{constructor(e){super(),se(this,e,ir,or,a,{icon:0})}}function sr(n){let t,r,o,i,a,s,c,l,u,d,f;return{c(){t=x("svg"),r=x("path"),o=x("path"),i=x("path"),a=x("defs"),s=x("linearGradient"),c=x("stop"),l=x("stop"),u=x("linearGradient"),d=x("stop"),f=x("stop"),$(r,"fill-rule","evenodd"),$(r,"clip-rule","evenodd"),$(r,"d","M134.88 10.0009H138.714L142.333 20.2854L145.864 10.0009H149.632L143.684 24.7084C142.626 27.3015 140.938 29.1472 138.621 30.2455L136.873 27.7812C138.476 27.0848 139.641 25.9476 140.367 24.3696L134.88 10.0009ZM133.172 4.84959V24.2862H129.552V4.84959H133.172ZM112.699 24.2862V4.84959H116.319V11.5625C117.81 10.5273 119.434 10.0106 121.191 10.0122C124.494 10.0122 126.145 11.7837 126.143 15.3267V24.2862H122.528V15.2828C122.528 13.7093 121.741 12.9218 120.166 12.9201C118.899 12.9201 117.617 13.522 116.319 14.7257V24.2862H112.699ZM110.314 23.8777C109.131 24.1521 107.811 24.2882 106.355 24.2861C101.077 24.2861 98.4392 21.8141 98.4401 16.87C98.4401 12.2889 101.078 9.99922 106.355 10.0009C107.813 10.0009 109.133 10.137 110.314 10.4093V13.2638C109.105 12.9918 107.869 12.8563 106.63 12.8598C103.578 12.8598 102.053 14.1965 102.055 16.87C102.055 19.9098 103.58 21.4289 106.63 21.4272C107.87 21.4318 109.106 21.2947 110.314 21.0188V23.8777ZM87.2328 15.9101H93.2092C93.3393 13.8636 92.3843 12.8389 90.3441 12.836C88.4345 12.8364 87.3974 13.8607 87.2328 15.9089V15.9101ZM96.6096 18.5451H87.2328C87.2328 20.4665 88.8071 21.4272 91.9555 21.4272C93.4107 21.4272 94.8627 21.2905 96.2922 21.0188V23.8777C95.0299 24.1521 93.4025 24.2882 91.4102 24.2861C86.2119 24.2861 83.6142 21.8511 83.6171 16.981C83.6171 12.3259 85.9959 9.99922 90.7534 10.0009C95.511 10.0026 97.463 12.8506 96.6096 18.5451ZM72.4099 15.9101H78.3863C78.5169 13.8636 77.5621 12.8389 75.5219 12.836C73.6122 12.8364 72.5749 13.8607 72.4099 15.9089V15.9101ZM81.7872 18.5451H72.4099C72.4099 20.4665 73.9841 21.4272 77.1325 21.4272C78.588 21.4272 80.0402 21.2905 81.4699 21.0188V23.8777C80.2071 24.1521 78.5798 24.2882 76.5879 24.2861C71.3891 24.2861 68.7912 21.8511 68.7942 16.981C68.7942 12.3259 71.1732 9.99922 75.9311 10.0009C80.689 10.0026 82.6411 12.8506 81.7872 18.5451ZM53.2787 10.5856C55.1791 10.1962 57.2814 10.0013 59.5856 10.0009C64.6353 10.0009 67.1602 12.2657 67.1602 16.7953C67.1602 21.7942 64.8482 24.2928 60.2241 24.2912C59.0807 24.2931 57.9489 24.0623 56.8981 23.613V29.4657H53.2787V10.5856ZM56.8981 20.5609C57.8905 21.0528 58.9943 21.2943 60.2102 21.2943C62.4599 21.2943 63.5839 19.7859 63.5822 16.7691C63.5822 14.2027 62.2998 12.9201 59.7348 12.9214C58.5239 12.9214 57.5781 12.9841 56.9012 13.1096L56.8981 20.5609ZM36.0182 23.4744V20.212C37.9744 20.936 40.1855 21.298 42.6514 21.298C45.6424 21.298 47.1394 20.3017 47.1423 18.3092C47.1423 16.8562 46.2198 16.1322 44.3843 16.1322H41.0507C37.0585 16.1322 35.0615 14.3191 35.0598 10.6929C35.0598 6.70661 37.9031 4.71261 43.5896 4.71094C45.7725 4.71094 47.8423 5.02797 49.799 5.66203V8.92436C47.8112 8.19474 45.708 7.8269 43.5896 7.83838C40.3152 7.83838 38.678 8.78969 38.678 10.6923C38.678 12.1403 39.4702 12.8693 41.0538 12.8693H44.3843C48.633 12.8693 50.7572 14.6824 50.7567 18.3086C50.7567 22.3878 48.0549 24.4267 42.6514 24.4255C40.1855 24.4255 37.9744 24.1084 36.0182 23.4744Z"),$(r,"fill","#302666"),$(o,"fill-rule","evenodd"),$(o,"clip-rule","evenodd"),$(o,"d","M14.7612 0C22.9132 0 29.5224 6.5874 29.5224 14.7068C29.5224 23.1268 22.7085 30.3284 14.8166 31.8717V29.4131C17.8347 28.4538 23.9585 25.3169 26.214 18.8632C26.4118 18.321 26.5705 17.7654 26.6888 17.2006L26.6982 17.1599L26.7058 17.1229L26.7134 17.0858L26.7203 17.0501L26.7272 17.0149L26.7341 16.9798L26.7411 16.9453V16.9415L26.7474 16.9077V16.9039L26.753 16.87V16.8656L26.7593 16.8324V16.8274L26.765 16.7954V16.7891L26.7707 16.7577V16.7508L26.7763 16.7201V16.7132L26.782 16.6824V16.6749L26.787 16.6448V16.6366L26.7921 16.6065V16.5984L26.7965 16.5689V16.5595L26.8003 16.5312V16.5212L26.804 16.493V16.4829L26.8078 16.4553V16.444L26.8122 16.4177V16.4058L26.816 16.3794V16.3675L26.8191 16.3418V16.3286L26.8223 16.3035V16.2903L26.8254 16.2659V16.2514L26.8286 16.227V16.2125V16.1893V16.1736V16.1511V16.1347L26.8317 16.1128V16.0958V16.0745V16.0576V16.0362V16.0187V15.998V15.9798V15.9597V15.9409V15.9208V15.9014V15.8825V15.8625V15.8443V15.8236V15.806V15.7847V15.7671V15.7451V15.7288V15.7056V15.6899V15.6667V15.6517V15.6272V15.6128V15.5883V15.5739V15.5488V15.5356V15.5093V15.4967V15.4704V15.4578V15.4308V15.4189V15.3913V15.3706V15.3424V15.3317V15.3028V15.2928V15.2633V15.2539V15.2238V15.215V15.1843V15.1761V15.1447V15.1372V15.1046V15.0977V15.0651V15.0588V15.0255V14.7062V14.6667C26.9262 7.96134 21.4523 2.54336 14.7222 2.56469C7.99203 2.58603 2.55277 8.04039 2.57417 14.7432C2.59621 21.4385 8.04807 26.8515 14.7612 26.8515H14.7895L14.8154 29.4162H14.7612C6.61175 29.4137 0 22.8288 0 14.7068C0 6.58489 6.61175 0 14.7612 0Z"),$(o,"fill","url(#paint0_linear)"),$(i,"fill-rule","evenodd"),$(i,"clip-rule","evenodd"),$(i,"d","M12.3985 8.87104V16.3368C12.3985 16.8506 11.9804 17.2672 11.4647 17.2672C10.9489 17.2672 10.5308 16.8506 10.5308 16.3368V8.87104C10.5308 8.3572 10.9489 7.94065 11.4647 7.94065C11.9804 7.94065 12.3985 8.3572 12.3985 8.87104ZM18.9914 13.5305V20.9962C18.9914 21.5101 18.5733 21.9266 18.0576 21.9266C17.5418 21.9266 17.1237 21.5101 17.1237 20.9962V13.5305C17.1237 13.0167 17.5418 12.6001 18.0576 12.6001C18.5733 12.6001 18.9914 13.0167 18.9914 13.5305ZM22.2909 16.4082V18.1216C22.2997 18.4596 22.1237 18.7758 21.8313 18.9474C21.5388 19.119 21.1759 19.119 20.8835 18.9474C20.591 18.7758 20.415 18.4596 20.4239 18.1216V16.4082C20.415 16.0702 20.591 15.754 20.8835 15.5824C21.1759 15.4108 21.5388 15.4108 21.8313 15.5824C22.1237 15.754 22.2997 16.0702 22.2909 16.4082ZM15.6949 5.94809V12.8542C15.6949 13.368 15.2768 13.7846 14.7611 13.7846C14.2454 13.7846 13.8273 13.368 13.8273 12.8542V5.94809C13.8273 5.43425 14.2454 5.0177 14.7611 5.0177C15.2768 5.0177 15.6949 5.43425 15.6949 5.94809ZM15.6949 16.5588V23.4637C15.6949 23.9775 15.2768 24.3941 14.7611 24.3941C14.2454 24.3941 13.8273 23.9775 13.8273 23.4637V16.5588C13.8273 16.045 14.2454 15.6284 14.7611 15.6284C15.2768 15.6284 15.6949 16.045 15.6949 16.5588ZM9.10148 11.7487V13.4615C9.11029 13.7995 8.93431 14.1157 8.64186 14.2873C8.3494 14.4589 7.98652 14.4589 7.69406 14.2873C7.40161 14.1157 7.22563 13.7995 7.23445 13.4615V11.7487C7.22563 11.4107 7.40161 11.0945 7.69406 10.9229C7.98652 10.7513 8.3494 10.7513 8.64186 10.9229C8.93431 11.0945 9.11029 11.4107 9.10148 11.7487Z"),$(i,"fill","url(#paint1_linear)"),$(c,"stop-color","#53A3F9"),$(l,"offset","1"),$(l,"stop-color","#15E8B5"),$(s,"id","paint0_linear"),$(s,"x1","17.4837"),$(s,"y1","24.6178"),$(s,"x2","23.4572"),$(s,"y2","12.6602"),$(s,"gradientUnits","userSpaceOnUse"),$(d,"stop-color","#53A3F9"),$(f,"offset","1"),$(f,"stop-color","#15E8B5"),$(u,"id","paint1_linear"),$(u,"x1","16.1513"),$(u,"y1","19.984"),$(u,"x2","20.1445"),$(u,"y2","13.2781"),$(u,"gradientUnits","userSpaceOnUse"),$(t,"width","150"),$(t,"height","32"),$(t,"viewBox","0 0 150 32"),$(t,"fill","none"),$(t,"xmlns","http://www.w3.org/2000/svg")},m(e,n){C(e,t,n),g(t,r),g(t,o),g(t,i),g(t,a),g(a,s),g(s,c),g(s,l),g(a,u),g(u,d),g(u,f)},p:e,i:e,o:e,d(e){e&&y(t)}}}class cr extends le{constructor(e){super(),se(this,e,null,sr,a,{})}}const{window:lr}=te;function ur(e){let n,t,r,i,a,s,l,u,d,f,p,h,m,v,b,x,E,k,z,N,T,B,I,P,R,_,G,F,O,D,Z,j,K,U,W,J,Y,q,ee,te,ae,se,ce,le,ue,de,fe,pe,he,me,ge,ve,be,Ce,ye,we,xe,Ve,Se,Me,$e,Le,Ae,Ee,ke,ze,Ne,Te;return O=new ar({}),q=new cr({}),de=new ar({}),we=new ar({}),{c(){n=w("modalbg"),r=S(),i=w("modalcontent"),a=w("div"),s=w("div"),l=w("button"),u=S(),d=w("div"),f=w("main"),p=w("div"),h=w("video"),m=w("source"),b=V("\n Your browser does not support the video tag."),x=S(),E=w("div"),k=w("h2"),k.textContent="Find your favourites faster with voice search",z=S(),N=w("p"),T=V("Search Evolve Clothing Gallery's "),B=w("b"),B.textContent="categories",I=V(", "),P=w("b"),P.textContent="designers",R=V(" and "),_=w("b"),_.textContent="colors",G=V(" by pressing and holding the\n "),F=w("span"),re(O.$$.fragment),D=S(),Z=w("b"),Z.textContent="push‑to‑talk button",j=V(".\n "),K=w("a"),K.textContent="More info",U=S(),W=w("div"),J=w("div"),Y=w("div"),re(q.$$.fragment),ee=S(),te=w("h3"),te.textContent="Voice Search Quick Start",ae=S(),se=w("ul"),ce=w("li"),le=V("Press and hold the\n "),ue=w("span"),re(de.$$.fragment),fe=V("\n push‑to‑talk button."),pe=S(),he=w("li"),he.textContent="Allow your browser to use the mic on the 1st time.",me=S(),ge=w("li"),ge.innerHTML="Make your first search, e.g. <i>"Show me new arrivals"</i>",ve=S(),be=w("li"),Ce=V("Release the\n "),ye=w("span"),re(we.$$.fragment),xe=V("\n push‑to‑talk button to stop listening."),Ve=S(),Se=w("li"),Se.textContent="Speechly detects your voice command and your search results are shown.",Me=V("\n Learn more at "),$e=w("a"),$e.textContent="speechly.com",Le=S(),Ae=w("div"),Ee=w("button"),Ee.textContent="Got it!",$(l,"class","close"),c(m.src,v=e[0])||$(m,"src",v),$(m,"type","video/mp4"),$(h,"class","usageImage"),$(h,"width","100%"),$(h,"height","auto"),h.autoplay=!0,h.muted=!0,h.loop=!0,$(p,"class","imageContainer"),L(F,"width","1.75rem"),L(F,"height","1.75rem"),L(F,"vertical-align","middle"),L(F,"margin","-0.25rem -0.5rem 0 -0.5rem"),L(F,"position","relative"),L(F,"display","inline-block"),$(K,"class","more"),$(K,"href","#info"),$(E,"class","bodyTextContainer"),$(Y,"class","sidePanelLogo"),L(ue,"width","1.5rem"),L(ue,"height","1.5rem"),L(ue,"vertical-align","middle"),L(ue,"margin","-0.20rem -0.35rem 0 -0.35rem"),L(ue,"position","relative"),L(ue,"display","inline-block"),L(ye,"width","1.5rem"),L(ye,"height","1.5rem"),L(ye,"vertical-align","middle"),L(ye,"margin","-0.20rem -0.35rem 0 -0.35rem"),L(ye,"position","relative"),L(ye,"display","inline-block"),$(se,"class","mt-l mb-l"),$($e,"href","https://speechly.com/"),$(J,"class","sidePanelText"),$(W,"class","sidePanel"),A(W,"forceVisible",e[3]),$(d,"class","layout"),$(Ee,"class","wide"),$(Ae,"class","buttonLayout"),$(s,"class","primaryLayout"),$(a,"class","page"),$(i,"class",e[2])},m(t,o){C(t,n,o),C(t,r,o),C(t,i,o),g(i,a),g(a,s),g(s,l),g(s,u),g(s,d),g(d,f),g(f,p),g(p,h),g(h,m),g(h,b),g(f,x),g(f,E),g(E,k),g(E,z),g(E,N),g(N,T),g(N,B),g(N,I),g(N,P),g(N,R),g(N,_),g(N,G),g(N,F),oe(O,F,null),g(N,D),g(N,Z),g(N,j),g(N,K),g(d,U),g(d,W),g(W,J),g(J,Y),oe(q,Y,null),g(J,ee),g(J,te),g(J,ae),g(J,se),g(se,ce),g(ce,le),g(ce,ue),oe(de,ue,null),g(ce,fe),g(se,pe),g(se,he),g(se,me),g(se,ge),g(se,ve),g(se,be),g(be,Ce),g(be,ye),oe(we,ye,null),g(be,xe),g(se,Ve),g(se,Se),g(J,Me),g(J,$e),g(s,Le),g(s,Ae),g(Ae,Ee),ze=!0,Ne||(Te=[M(n,"click",e[6]),M(l,"click",e[6]),M(K,"click",e[11]),M(Ee,"click",e[6]),M(s,"click",e[7]),M(i,"click",e[6])],Ne=!0)},p(e,n){(!ze||1&n&&!c(m.src,v=e[0]))&&$(m,"src",v),8&n&&A(W,"forceVisible",e[3]),(!ze||4&n)&&$(i,"class",e[2])},i(r){ze||(H((()=>{t||(t=ne(n,e[5],{},!0)),t.run(1)})),Q(O.$$.fragment,r),Q(q.$$.fragment,r),Q(de.$$.fragment,r),Q(we.$$.fragment,r),H((()=>{ke||(ke=ne(i,e[5],{},!0)),ke.run(1)})),ze=!0)},o(r){t||(t=ne(n,e[5],{},!1)),t.run(0),X(O.$$.fragment,r),X(q.$$.fragment,r),X(de.$$.fragment,r),X(we.$$.fragment,r),ke||(ke=ne(i,e[5],{},!1)),ke.run(0),ze=!1},d(e){e&&y(n),e&&t&&t.end(),e&&y(r),e&&y(i),ie(O),ie(q),ie(de),ie(we),e&&ke&&ke.end(),Ne=!1,o(Te)}}}function dr(n){let t,r,i,a,s,c,l=n[4]&&ur(n);return{c(){t=w("link"),r=S(),i=w("modal"),l&&l.c(),this.c=e,$(t,"href","https://fonts.googleapis.com/css2?family=Saira+Condensed:wght@700&display=swap"),$(t,"rel","stylesheet"),L(i,"--remsize",n[1])},m(e,o){g(document.head,t),C(e,r,o),C(e,i,o),l&&l.m(i,null),a=!0,s||(c=M(lr,"keydown",n[8]),s=!0)},p(e,[n]){e[4]?l?(l.p(e,n),16&n&&Q(l,1)):(l=ur(e),l.c(),Q(l,1),l.m(i,null)):l&&(q={r:0,c:[],p:q},X(l,1,1,(()=>{l=null})),q.r||o(q.c),q=q.p),(!a||2&n)&&L(i,"--remsize",e[1])},i(e){a||(Q(l),a=!0)},o(e){X(l),a=!1},d(e){y(t),e&&y(r),e&&y(i),l&&l.d(),s=!1,c()}}}function fr(e,n,t){let r,{video:o=""}=n,{hide:i}=n,{remsize:a="1.0rem"}=n,{position:s="fixed"}=n;const c=(()=>{const e=P();return(n,t)=>{e.dispatchEvent(new CustomEvent(n,{detail:t,composed:!0}))}})(),l=(u=ue,function(e,n){if(!e.hasOwnProperty("ownerDocument")){Object.defineProperty(e,"ownerDocument",{get:function(){return e.parentElement}});let n=e;for(;n.parentElement;)n=n.parentElement;e.parentElement.head=n}return u(e,n)});var u;let d=!1,f=!1;var p;p=()=>{t(10,d=!0)},P().$$.on_mount.push(p);const h=()=>{t(4,r=!1),c("speechlyintroclosed"),window.postMessage({type:"speechlyintroclosed"},"*")};return e.$$set=e=>{"video"in e&&t(0,o=e.video),"hide"in e&&t(9,i=e.hide),"remsize"in e&&t(1,a=e.remsize),"position"in e&&t(2,s=e.position)},e.$$.update=()=>{1536&e.$$.dirty&&t(4,r=d&&(void 0===i||"true"!==i))},[o,a,s,f,r,l,h,e=>{e.stopPropagation()},e=>{d&&"Escape"===e.key&&(e.preventDefault(),h())},i,d,()=>{t(3,f=!f)}]}class pr extends ce{constructor(e){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:linear-gradient(180deg, #413783f0, #302865c0 80%)}modalcontent{z-index:2001;pointer-events:auto}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}.page{box-sizing:border-box;width:100%;min-height:100%;padding:2rem 1rem;display:flex;flex-direction:row;align-items:center;justify-content:center}h2,h3{font-family:'Saira Condensed', sans-serif;padding:0;margin:0;text-transform:uppercase;color:#302865;line-height:120%}h2{font-size:135%}p{line-height:150%}b{color:#302865}ul{min-width:8rem;padding:0 1rem 0 0;list-style-type:none}li{border-left:2px solid #38E7B6;margin:0.75rem 0;padding-left:6px;line-height:135%}.primaryLayout{position:relative;box-sizing:border-box;width:100%;background-color:#ffffff;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;border-radius:1rem;box-shadow:0 0.25rem 1.25rem #0008}.layout{box-sizing:border-box;width:100%;display:flex;flex-direction:column;align-self:stretch;align-items:flex-start;justify-content:flex-start}.buttonLayout{box-sizing:border-box;width:100%;display:flex;flex-direction:column;align-self:stretch;align-items:center;justify-content:center;border-radius:0 0 1rem 1rem;background:linear-gradient(180deg, #d9e3eb, #F7FAFC 15%)}main{position:relative;box-sizing:border-box;width:100%;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;flex-grow:1}button.wide{box-sizing:border-box;min-width:12rem;max-width:100%;padding:0.75rem;margin:1rem;background-color:#302865;border:none;border-radius:10rem;transition:0.3s;font-family:'Saira Condensed', sans-serif;font-size:120%;text-transform:uppercase;color:#fff;line-height:120%}button.wide:hover{background-color:#6251a5;transition:0.3s}a,a:visited{color:#302865}a:hover{color:#6251a5}.sidePanel{box-sizing:border-box;width:100%;background:#F7FAFC;color:#728195;font-size:85%;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;max-height:0rem;transition:0.5s;overflow:hidden}.sidePanelText{padding:0.75rem 0.75rem 1.5rem 0.75rem}.more{white-space:nowrap}.forceVisible{max-height:50rem;transition:0.5s}.mt-m{margin-top:0.75em}.mb-m{margin-bottom:0.75em}.mx-m{margin-left:0.75em;margin-right:0.75em}.mt-l{margin-top:1.5em}.mb-l{margin-bottom:1.5em}.imageContainer{box-sizing:border-box;width:100%;padding:1.0rem}.bodyTextContainer{padding:0 2.25rem}.sidePanelLogo{width:85%;padding:0.75rem 0 0.75rem 0}.usageImage{box-sizing:border-box;width:100%;border-radius:0.5rem;overflow:hidden}@media(max-width: 480px){.page{font-size:88%}.imageContainer{padding:0 0 1rem 0}.sidePanelText{padding:1.5rem 2.25rem}.sidePanelLogo{display:none}.usageImage{border-radius:1rem 1rem 0 0}}@media(min-width: 480px) and (max-width: 688px){.page{font-size:100%;padding:2rem 2rem}.primaryLayout{width:600px}.layout{flex-direction:row;justify-content:flex-start}.more{display:none}.sidePanel{max-height:50rem;width:11rem;flex-shrink:0;min-height:100%;align-self:stretch;flex-direction:column;border-radius:0 1rem 0 0}}@media(min-width: 688px){.page{padding:2rem 0;font-size:100%}.primaryLayout{width:600px}.layout{flex-direction:row;justify-content:flex-start}.more{display:none}.sidePanel{max-height:50rem;width:12.5rem;flex-shrink:0;min-height:100%;align-self:stretch;flex-direction:column;border-radius:0 1rem 0 0}}.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:#6251a5}.close:hover:before,.close:hover:after{height:2px;background:white}.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>",se(this,{target:this.shadowRoot,props:E(this.attributes),customElement:!0},fr,dr,l,{video:0,hide:9,remsize:1,position:2},null),e&&(e.target&&C(e.target,this,e.anchor),e.props&&(this.$set(e.props),K()))}static get observedAttributes(){return["video","hide","remsize","position"]}get video(){return this.$$.ctx[0]}set video(e){this.$$set({video:e}),K()}get hide(){return this.$$.ctx[9]}set hide(e){this.$$set({hide:e}),K()}get remsize(){return this.$$.ctx[1]}set remsize(e){this.$$set({remsize:e}),K()}get position(){return this.$$.ctx[2]}set position(e){this.$$set({position:e}),K()}}customElements.get("intro-popup")?console.warn("Skipping re-defining customElement intro-popup"):customElements.define("intro-popup",pr)})); | ||
!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,e){f(t.head||t,e)}function y(t,e,n){t.insertBefore(e,n||null)}function w(t){t.parentNode.removeChild(t)}function b(t){return document.createElement(t)}function v(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function $(t){return document.createTextNode(t)}function x(){return $(" ")}function k(){return $("")}function _(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function C(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function z(t,e,n,o){t.style.setProperty(e,n,o?"important":"")}function E(t,e,n){t.classList[n?"add":"remove"](e)}function S(t){const e={};for(const n of t)e[n.name]=n.value;return e}const M=new Set;let N,T=0;function A(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);M.add(p);const h=p.__svelte_stylesheet||(p.__svelte_stylesheet=function(t){const e=b("style");return g(m(t),e),e}(t).sheet),f=p.__svelte_rules||(p.__svelte_rules={});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`,T+=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")),i=n.length-o.length;i&&(t.style.animation=o.join(", "),T-=i,T||d((()=>{T||(M.forEach((t=>{const e=t.__svelte_stylesheet;let n=e.cssRules.length;for(;n--;)e.deleteRule(n);t.__svelte_rules={}})),M.clear())})))}function D(t){N=t}function R(){if(!N)throw new Error("Function called outside component initialization");return N}const B=[],O=[],P=[],F=[],H=Promise.resolve();let I=!1;function V(t){P.push(t)}let j=!1;const q=new Set;function U(){if(!j){j=!0;do{for(let t=0;t<B.length;t+=1){const e=B[t];D(e),G(e.$$)}for(D(null),B.length=0;O.length;)O.pop()();for(let t=0;t<P.length;t+=1){const e=P[t];q.has(e)||(q.add(e),e())}P.length=0}while(B.length);for(;F.length;)F.pop()();I=!1,j=!1,q.clear()}}function G(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(V)}}let W;function J(t,e,n){t.dispatchEvent(function(t,e,n=!1){const o=document.createEvent("CustomEvent");return o.initCustomEvent(t,n,!1,e),o}(`${e?"intro":"outro"}${n}`))}const K=new Set;let Q;function X(){Q={r:0,c:[],p:Q}}function Y(){Q.r||i(Q.c),Q=Q.p}function Z(t,e){t&&t.i&&(K.delete(t),t.i(e))}function tt(t,e,n,o){if(t&&t.o){if(K.has(t))return;K.add(t),Q.c.push((()=>{K.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}const et={duration:0};function nt(n,o,s,c){let l=o(n,s),a=c?0:1,f=null,m=null,g=null;function y(){g&&L(n,g)}function w(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 b(o){const{delay:r=0,duration:s=300,easing:c=e,tick:b=t,css:v}=l||et,$={start:u()+r,b:o};o||($.group=Q,Q.r+=1),f||m?m=$:(v&&(y(),g=A(n,a,o,s,r,c,v)),o&&b(0,1),f=w($,s),V((()=>J(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=w(m,s),m=null,J(n,f.b,"start"),v&&(y(),g=A(n,a,f.b,f.duration,0,c,l.css))),f)if(t>=f.end)b(a=f.b,1-a),J(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),b(a,1-a)}return!(!f&&!m)})))}return{run(t){r(l)?(W||(W=Promise.resolve(),W.then((()=>{W=null}))),W).then((()=>{l=l(),b(t)})):b(t)},end(){y(),f=m=null}}}const ot="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function it(t,e,o,s){const{fragment:c,on_mount:l,on_destroy:a,after_update:u}=t.$$;c&&c.m(e,o),s||V((()=>{const e=l.map(n).filter(r);a?a.push(...e):i(e),t.$$.on_mount=[]})),u.forEach(V)}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 st(t,e){-1===t.$$.dirty[0]&&(B.push(t),I||(I=!0,H.then(U)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function ct(e,n,r,s,c,l,a,u=[-1]){const d=N;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&&st(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&&Z(e.$$.fragment),it(e,n.target,n.anchor,n.customElement),U()}D(d)}let lt;"function"==typeof HTMLElement&&(lt=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(n).filter(r);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){i(this.$$.on_disconnect)}$destroy(){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)}});function at(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 ut,dt,pt,ht,ft,mt,gt;function yt(t){!function(t,e,n){const o=m(t);if(!o.getElementById(e)){const t=b("style");t.id=e,t.textContent=n,g(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=$(">\n "),d=v("g"),p=v("path"),h=v("rect"),C(o,"attributeName","y1"),C(o,"values","-200%; 0%;"),C(o,"dur","2s"),C(o,"repeatCount","indefinite"),C(i,"attributeName","y2"),C(i,"values","200%; 400%;"),C(i,"dur","2s"),C(i,"repeatCount","indefinite"),C(r,"offset","0%"),C(r,"stop-color","var(--gradient-stop1)"),C(s,"offset","25%"),C(s,"stop-color","var(--gradient-stop2)"),C(c,"offset","50%"),C(c,"stop-color","var(--gradient-stop1)"),C(l,"offset","75%"),C(l,"stop-color","var(--gradient-stop2)"),C(a,"offset","100%"),C(a,"stop-color","var(--gradient-stop1)"),C(n,"id","gradient"),C(n,"x1","50%"),C(n,"y1","-200%"),C(n,"x2","50%"),C(n,"y2","200%"),C(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"),C(h,"x","20"),C(h,"y","1"),C(h,"width","16"),C(h,"height","37"),C(h,"rx","8"),C(d,"fill","url(#gradient)"),C(d,"fill-rule","evenodd"),C(e,"class","Icon svelte-s2u2hd"),C(e,"viewBox","0 0 56 56"),C(e,"xmlns","http://www.w3.org/2000/svg")},m(t,m){y(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 bt(t){let e,n,o,i;return{c(){e=v("svg"),n=v("g"),o=v("path"),i=v("rect"),C(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"),C(i,"x","20"),C(i,"y","1"),C(i,"width","16"),C(i,"height","37"),C(i,"rx","8"),C(n,"fill","var(--icon-color)"),C(n,"fill-rule","evenodd"),C(e,"class","Icon svelte-s2u2hd"),C(e,"viewBox","0 0 56 56"),C(e,"xmlns","http://www.w3.org/2000/svg")},m(t,r){y(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"),C(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"),C(o,"fill-rule","nonzero"),C(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"),C(n,"fill","var(--icon-color)"),C(n,"fill-rule","evenodd"),C(e,"class","Icon svelte-s2u2hd"),C(e,"viewBox","0 0 56 56"),C(e,"xmlns","http://www.w3.org/2000/svg")},m(t,r){y(t,e,r),f(e,n),f(n,o),f(n,i)},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("path"),C(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"),C(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"),C(n,"fill","var(--icon-color)"),C(n,"fill-rule","nonzero"),C(e,"class","Icon svelte-s2u2hd"),C(e,"viewBox","0 0 56 56"),C(e,"xmlns","http://www.w3.org/2000/svg")},m(t,r){y(t,e,r),f(e,n),f(n,o),f(n,i)},d(t){t&&w(e)}}}function xt(e){let n,o,i,r,s=e[0]===ht.MicActive&&wt(),c=e[0]===ht.Mic&&bt(),l=e[0]===ht.Error&&vt(),a=e[0]===ht.Denied&&$t();return{c(){s&&s.c(),n=x(),c&&c.c(),o=x(),l&&l.c(),i=x(),a&&a.c(),r=k()},m(t,e){s&&s.m(t,e),y(t,n,e),c&&c.m(t,e),y(t,o,e),l&&l.m(t,e),y(t,i,e),a&&a.m(t,e),y(t,r,e)},p(t,[e]){t[0]===ht.MicActive?s||(s=wt(),s.c(),s.m(n.parentNode,n)):s&&(s.d(1),s=null),t[0]===ht.Mic?c||(c=bt(),c.c(),c.m(o.parentNode,o)):c&&(c.d(1),c=null),t[0]===ht.Error?l||(l=vt(),l.c(),l.m(i.parentNode,i)):l&&(l.d(1),l=null),t[0]===ht.Denied?a||(a=$t(),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 kt(t,e,n){let{icon:o=ht.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.Disconnected=3]="Disconnected",t[t.Disconnecting=4]="Disconnecting",t[t.Connecting=5]="Connecting",t[t.Connected=6]="Connected",t[t.Starting=7]="Starting",t[t.Stopping=8]="Stopping",t[t.Recording=9]="Recording"}(ut||(ut={})),function(t){t.SpeechlyFirstConnect="SpeechlyFirstConnect"}(dt||(dt={})),function(t){t.speechlypoweron="speechlypoweron",t.holdstart="holdstart",t.holdend="holdend",t.speechlystarting="speechlystarting",t.speechstate="speechstate",t.initialized="initialized",t.speechsegment="speechsegment",t.speechhandled="speechhandled",t.showhint="showhint",t.transcriptdrawerhint="hint",t.speechlyintroready="speechlyintroready",t.speechlyintroclosed="speechlyintroclosed"}(pt||(pt={})),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"}(ft||(ft={})),function(t){t.None="none",t.Connecting="connecting",t.Busy="busy"}(mt||(mt={})),function(t){t.None="none",t.Whirl="whirl"}(gt||(gt={})),ut.Disconnected,ut.Disconnecting,ut.Connecting,ut.Connected,ut.Starting,ut.Recording,ut.Stopping,ut.Failed,ut.NoBrowserSupport,ut.NoAudioConsent;class _t 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(),ct(this,t,kt,xt,s,{icon:0},yt)}}const{window:Ct}=ot;function zt(t){let e;return{c(){e=b("link"),C(e,"href","https://fonts.googleapis.com/css2?family=Saira+Condensed:wght@700&display=swap"),C(e,"rel","stylesheet")},m(t,n){y(t,e,n)},d(t){t&&w(e)}}}function Et(t){let e;return{c(){e=b("link"),C(e,"href",t[2]),C(e,"rel","stylesheet")},m(t,n){y(t,e,n)},p(t,n){4&n&&C(e,"href",t[2])},d(t){t&&w(e)}}}function St(t){let e,n,o,i,r,s,c,l,a,u,d,p;const h=[Lt,At,Tt,Nt,Mt],m=[];function g(t,e){return t[3]===Bt||t[3]===Ot?0:t[3]===Pt?1:t[3]===ut.NoAudioConsent?2:t[3]===ut.NoBrowserSupport?3:4}return s=g(t),c=m[s]=h[s](t),{c(){e=b("modalbg"),o=x(),i=b("modalcontent"),r=b("main"),c.c(),l=x(),a=b("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>.',C(i,"class",t[1]),E(i,"defaultTypography",t[7])},m(n,c){y(n,e,c),y(n,o,c),y(n,i,c),f(i,r),m[s].m(r,null),f(i,l),f(i,a),u=!0,d||(p=_(e,"click",t[9]),d=!0)},p(t,e){let n=s;s=g(t),s===n?m[s].p(t,e):(X(),tt(m[n],1,1,(()=>{m[n]=null})),Y(),c=m[s],c?c.p(t,e):(c=m[s]=h[s](t),c.c()),Z(c,1),c.m(r,null)),(!u||2&e)&&C(i,"class",t[1]),130&e&&E(i,"defaultTypography",t[7])},i(o){u||(V((()=>{n||(n=nt(e,t[8],{duration:200},!0)),n.run(1)})),Z(c),u=!0)},o(o){n||(n=nt(e,t[8],{duration:200},!1)),n.run(0),tt(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,u,d,p;return{c(){n=b("h2"),n.textContent="Failed to connect to Speechly",o=x(),i=b("p"),r=$("Please check that your application (App ID: "),s=$(e[4]),c=$(") has been successfully deployed."),l=x(),a=b("options"),u=b("button"),u.textContent="Ok, got it",C(u,"class","button button-primary")},m(t,h){y(t,n,h),y(t,o,h),y(t,i,h),f(i,r),f(i,s),f(i,c),y(t,l,h),y(t,a,h),f(a,u),d||(p=_(u,"click",e[9]),d=!0)},p(t,e){16&e&&function(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}(s,t[4])},i:t,o:t,d(t){t&&w(n),t&&w(o),t&&w(i),t&&w(l),t&&w(a),d=!1,p()}}}function Nt(e){let n,o,i,r,s,c,l,a;return{c(){n=b("h2"),n.textContent="Unsupported browser",o=x(),i=b("p"),i.textContent="To use voice input, please visit this site using a supported browser.",r=x(),s=b("options"),c=b("button"),c.textContent="Ok, got it",C(c,"class","button button-primary")},m(t,u){y(t,n,u),y(t,o,u),y(t,i,u),y(t,r,u),y(t,s,u),f(s,c),l||(a=_(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 Tt(e){let n,o,r,s,c,l,a,u,d,p;return{c(){n=b("h2"),n.textContent="Microphone blocked",o=x(),r=b("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=x(),c=b("options"),l=b("button"),l.textContent="Ok, got it",a=x(),u=b("button"),u.textContent="Reload page",C(l,"class","button button-secondary"),C(u,"class","button button-primary")},m(t,i){y(t,n,i),y(t,o,i),y(t,r,i),y(t,s,i),y(t,c,i),f(c,l),f(c,a),f(c,u),d||(p=[_(l,"click",e[9]),_(u,"click",e[17])],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 At(e){let n,o,r,s,c,l,a,u,d,p;return{c(){n=b("h2"),n.textContent="HTTPS required",o=x(),r=b("p"),r.textContent="To use the voice interface, please visit this site using the secure\n HTTPS protocol.",s=x(),c=b("options"),l=b("button"),l.textContent="Ok, got it",a=x(),u=b("button"),u.textContent="Try with HTTPS",C(l,"class","button button-secondary"),C(u,"class","button button-primary")},m(t,i){y(t,n,i),y(t,o,i),y(t,r,i),y(t,s,i),y(t,c,i),f(c,l),f(c,a),f(c,u),d||(p=[_(l,"click",e[9]),_(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 Lt(t){let e,n,o,i,r,s,c,l,a,u,d,p,h,m,g,v,k,E,S,M=window.location.hostname+"";d=new _t({});let N=t[5]&&Dt(t);return{c(){var t;e=b("h2"),e.innerHTML='<slot name="priming-title">Allow microphone</slot>',n=x(),o=b("p"),i=b("slot"),r=$("To use voice input, press "),s=b("strong"),s.textContent="Allow",c=$(" to give "),l=$(M),a=$(" access to your microphone.\n Audio is only captured when "),u=b("span"),(t=d.$$.fragment)&&t.c(),p=$(" button is pressed."),h=x(),m=b("options"),g=b("button"),g.textContent="Not now",v=x(),N&&N.c(),z(u,"display","inline-block"),z(u,"position","relative"),z(u,"color","white"),z(u,"width","20px"),z(u,"height","10px"),z(u,"--icon-color","white"),z(u,"--icon-size","20px"),C(i,"name","priming-body"),C(g,"class","button button-secondary")},m(w,b){y(w,e,b),y(w,n,b),y(w,o,b),f(o,i),f(i,r),f(i,s),f(i,c),f(i,l),f(i,a),f(i,u),it(d,u,null),f(i,p),y(w,h,b),y(w,m,b),f(m,g),f(m,v),N&&N.m(m,null),k=!0,E||(S=_(g,"click",t[9]),E=!0)},p(t,e){t[5]?N?N.p(t,e):(N=Dt(t),N.c(),N.m(m,null)):N&&(N.d(1),N=null)},i(t){k||(Z(d.$$.fragment,t),k=!0)},o(t){tt(d.$$.fragment,t),k=!1},d(t){t&&w(e),t&&w(n),t&&w(o),rt(d),t&&w(h),t&&w(m),N&&N.d(),E=!1,S()}}}function Dt(t){let e,n,o,i,r;return{c(){e=b("button"),n=$("Allow"),C(e,"class","button button-primary"),e.disabled=o=t[3]===Ot},m(o,s){y(o,e,s),f(e,n),i||(r=_(e,"click",t[10]),i=!0)},p(t,n){8&n&&o!==(o=t[3]===Ot)&&(e.disabled=o)},d(t){t&&w(e),i=!1,r()}}}function Rt(e){let n,o,r,s,c,l,a,u=e[7]&&zt(),d=void 0!==e[2]&&Et(e),p=e[6]&&St(e);return{c(){u&&u.c(),n=k(),o=x(),d&&d.c(),r=x(),s=b("modal"),p&&p.c(),this.c=t,z(s,"--remsize",e[0])},m(t,i){u&&u.m(document.head,null),f(document.head,n),y(t,o,i),d&&d.m(t,i),y(t,r,i),y(t,s,i),p&&p.m(s,null),c=!0,l||(a=[_(Ct,"keydown",e[11]),_(Ct,"message",e[12])],l=!0)},p(t,[e]){t[7]?u||(u=zt(),u.c(),u.m(n.parentNode,n)):u&&(u.d(1),u=null),void 0!==t[2]?d?d.p(t,e):(d=Et(t),d.c(),d.m(r.parentNode,r)):d&&(d.d(1),d=null),t[6]?p?(p.p(t,e),64&e&&Z(p,1)):(p=St(t),p.c(),Z(p,1),p.m(s,null)):p&&(X(),tt(p,1,1,(()=>{p=null})),Y()),(!c||1&e)&&z(s,"--remsize",t[0])},i(t){c||(Z(p),c=!0)},o(t){tt(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 Bt="PagePriming",Ot="PageStarting",Pt="HttpsRequired";function Ft(t,e,n){let o,i,{hide:r="auto"}=e,{remsize:s="1.0rem"}=e,{position:c="fixed"}=e,{customcssurl:l}=e,{customtypography:a}=e;const u=(()=>{const t=R();return(e,n)=>{t.dispatchEvent(new CustomEvent(e,{detail:n,composed:!0}))}})(),d=(p=at,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 p(t,e)});var p;let h,f=!1,m=Bt,g=null,y=!1;var w;w=()=>{n(16,f=!0),window.postMessage({type:pt.speechlyintroready},"*")},R().$$.on_mount.push(w);const b=(t={})=>{n(6,o=!1),u("speechlyintroclosed",t),window.postMessage(Object.assign({type:pt.speechlyintroclosed},t),"*")},v=t=>{var e,i;("auto"===r&&n(6,o=!0),g&&(window.clearTimeout(g),g=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(3,m=t):n(3,m=Pt)};return t.$$set=t=>{"hide"in t&&n(14,r=t.hide),"remsize"in t&&n(0,s=t.remsize),"position"in t&&n(1,c=t.position),"customcssurl"in t&&n(2,l=t.customcssurl),"customtypography"in t&&n(15,a=t.customtypography)},t.$$.update=()=>{81920&t.$$.dirty&&n(6,o=f&&"false"===r),32768&t.$$.dirty&&n(7,i=void 0===a||"false"===a)},[s,c,l,m,h,y,o,i,d,b,()=>{window.postMessage({type:pt.speechlystarting},"*"),window.SpeechlyClient.initialize()},t=>{f&&"Escape"===t.key&&(t.preventDefault(),b())},t=>{switch(t.data.type){case pt.speechlypoweron:"auto"===r&&n(6,o=!0),n(5,y=!0);break;case pt.speechlystarting:m===Bt?(n(3,m=Ot),g=window.setTimeout((()=>{g=null,"auto"===r&&n(6,o=!0)}),500)):n(6,o=!0);break;case pt.holdstart:switch(t.data.state){case ut.Failed:case ut.NoAudioConsent:case ut.NoBrowserSupport:v(t.data.state)}break;case pt.initialized:n(4,h=t.data.appId),t.data.success?g?(window.clearTimeout(g),g=null,b()):b({firstrun:!0}):v(t.data.state)}},()=>{const t=window.location.href.replace("http:","https:");window.location.replace(t)},r,a,f,()=>{window.location.reload()}]}class Ht 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>",ct(this,{target:this.shadowRoot,props:S(this.attributes),customElement:!0},Ft,Rt,c,{hide:14,remsize:0,position:1,customcssurl:2,customtypography:15},null),t&&(t.target&&y(t.target,this,t.anchor),t.props&&(this.$set(t.props),U()))}static get observedAttributes(){return["hide","remsize","position","customcssurl","customtypography"]}get hide(){return this.$$.ctx[14]}set hide(t){this.$$set({hide:t}),U()}get remsize(){return this.$$.ctx[0]}set remsize(t){this.$$set({remsize:t}),U()}get position(){return this.$$.ctx[1]}set position(t){this.$$set({position:t}),U()}get customcssurl(){return this.$$.ctx[2]}set customcssurl(t){this.$$set({customcssurl:t}),U()}get customtypography(){return this.$$.ctx[15]}set customtypography(t){this.$$set({customtypography:t}),U()}}customElements.get("intro-popup")?console.warn("Skipping re-defining customElement intro-popup"):customElements.define("intro-popup",Ht)})); | ||
//# sourceMappingURL=intro-popup.js.map |
export {}; | ||
//# sourceMappingURL=push-to-talk-button.d.ts.map |
@@ -1,27 +0,1 @@ | ||
/** | ||
* Returns a value based on a response curve defined by tabular data. | ||
* Some pre-defined graceful curves (gaussian, for example) are pre-defined as part of class | ||
* @author arzga | ||
* | ||
* INTERPOLATE USAGE: | ||
* | ||
* float outputValue = TableInterpolator.interpolateLinearf(TableInterpolator.gaussian, 30, 0, 100f); | ||
* | ||
* Example: | ||
* - Output curve is defined by values in a float array (in this gaussian curve example: values ranging from 0.0f via 1.0f back to 0.0f). | ||
* - We want the interpolateLinearf to interpolate and return the value at position 30 on the curve | ||
* - The input value range in this call is defined as 0 to 100. | ||
* - The output curve is "stretched" to fit the input range. The table defining the curve may have an arbitrary number of values, they just enhance the resolution of the curve. | ||
* - A linear interpolated value is returned based on two neighbouring tabular values. | ||
* - If pos < min, first table value is returned | ||
* - If pos > max, last table value is returned | ||
* | ||
* EXTRAPOLATE USAGE: | ||
* | ||
* float outputValue = TableInterpolator.extrapolateLinearf(TableInterpolator.gaussian, 30, 0, 100f); | ||
* | ||
* To extrapolate output values outside input range, use extrapolateLinearf. Within input range, it functions exactly as interpolateLinearf. | ||
* Output values outside input range are linearly extrapolated based on two first/last values of tabular data. | ||
* | ||
**/ | ||
export declare const fadeIn: number[]; | ||
@@ -38,23 +12,4 @@ export declare const fadeOut: number[]; | ||
export declare const exp4: number[]; | ||
/** | ||
* Look up a matching y for x from table of "y-values" evenly mapped to x-axis range min..max | ||
* Linearly interpolate in-between values. | ||
* Repeat table edge y values for x values outside min..max range | ||
* @param table Table of float values of at least 2 values | ||
* @param x | ||
* @param min X coordinate of first value in table. If x < min, return first value in table | ||
* @param max X coordinate of last value in table. If x > max, return first last in table | ||
* @return linearly interpolated value "y" corresponding to tabular data mapped to range min..max | ||
*/ | ||
export declare function interpolateLinearf(table: number[], x: number, min: number, max: number): number; | ||
/** | ||
* Look up a matching y for x from table of "y-values" evenly mapped to x-axis range min..max | ||
* Linearly interpolate in-between values. | ||
* Linearly extrapolate values for x values outside min..max, range based on 2 outermost values in table | ||
* @param table Table of float values of at least 2 values | ||
* @param x | ||
* @param min X coordinate of first value in table. If x < min, return linear value based on first and second entry in table | ||
* @param max X coordinate of last value in table. If x > max, return linear value based on last and second-last entry in table | ||
* @return linearly extrapolated value "y" corresponding to tabular data mapped to range min..max | ||
*/ | ||
export declare function extrapolateLinearf(table: number[], x: number, min: number, max: number): number; | ||
//# sourceMappingURL=TableInterpolator.d.ts.map |
export {}; | ||
//# sourceMappingURL=transcript-drawer.d.ts.map |
@@ -1,3 +0,2 @@ | ||
!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 r(t){return t()}function o(){return Object.create(null)}function i(t){t.forEach(r)}function a(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}function u(e,n,r){e.$$.on_destroy.push(function(e,...n){if(null==e)return t;const r=e.subscribe(...n);return r.unsubscribe?()=>r.unsubscribe():r}(n,r))}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 v(t,e){t.appendChild(e)}function $(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function y(t,e){v(t.head||t,e)}function b(t,e,n){t.insertBefore(e,n||null)}function w(t){t.parentNode.removeChild(t)}function x(t){return document.createElement(t)}function S(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function C(t){return document.createTextNode(t)}function M(){return C(" ")}function k(t,e,n,r){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)}function T(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function A(t,e,n){e in t?t[e]="boolean"==typeof t[e]&&""===n||n:T(t,e,n)}function E(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function I(t,e,n,r){t.style.setProperty(e,n,r?"important":"")}function P(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 B=new Set;let R,z=0;function _(t,e,n,r,o,i,a,s=0){const c=16.666/r;let l="{\n";for(let t=0;t<=1;t+=c){const r=e+(n-e)*i(t);l+=100*t+`%{${a(r,1-r)}}\n`}const u=l+`100% {${a(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)}_${s}`,f=$(t);B.add(f);const h=f.__svelte_stylesheet||(f.__svelte_stylesheet=function(t){const e=x("style");return y($(t),e),e}(t).sheet),g=f.__svelte_rules||(f.__svelte_rules={});g[d]||(g[d]=!0,h.insertRule(`@keyframes ${d} ${u}`,h.cssRules.length));const p=t.style.animation||"";return t.style.animation=`${p?`${p}, `:""}${d} ${r}ms linear ${o}ms 1 both`,z+=1,d}function F(t,e){const n=(t.style.animation||"").split(", "),r=n.filter(e?t=>t.indexOf(e)<0:t=>-1===t.indexOf("__svelte")),o=n.length-r.length;o&&(t.style.animation=r.join(", "),z-=o,z||h((()=>{z||(B.forEach((t=>{const e=t.__svelte_stylesheet;let n=e.cssRules.length;for(;n--;)e.deleteRule(n);t.__svelte_rules={}})),B.clear())})))}function D(t){R=t}function G(){if(!R)throw new Error("Function called outside component initialization");return R}const O=[],L=[],j=[],K=[],H=Promise.resolve();let U=!1;function V(t){j.push(t)}let W=!1;const Z=new Set;function J(){if(!W){W=!0;do{for(let t=0;t<O.length;t+=1){const e=O[t];D(e),Y(e.$$)}for(D(null),O.length=0;L.length;)L.pop()();for(let t=0;t<j.length;t+=1){const e=j[t];Z.has(e)||(Z.add(e),e())}j.length=0}while(O.length);for(;K.length;)K.pop()();U=!1,W=!1,Z.clear()}}function Y(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(V)}}let q;function Q(t,e,n){t.dispatchEvent(function(t,e,n=!1){const r=document.createEvent("CustomEvent");return r.initCustomEvent(t,n,!1,e),r}(`${e?"intro":"outro"}${n}`))}const X=new Set;function tt(t,e){t&&t.i&&(X.delete(t),t.i(e))}const et={duration:0};function nt(n,r,o){let i,s,c=r(n,o),l=!1,u=0;function d(){i&&F(n,i)}function h(){const{delay:r=0,duration:o=300,easing:a=e,tick:h=t,css:g}=c||et;g&&(i=_(n,0,1,o,r,a,g,u++)),h(0,1);const p=f()+r,v=p+o;s&&s.abort(),l=!0,V((()=>Q(n,!0,"start"))),s=m((t=>{if(l){if(t>=v)return h(1,0),Q(n,!0,"end"),d(),l=!1;if(t>=p){const e=a((t-p)/o);h(e,1-e)}}return l}))}let g=!1;return{start(){g||(g=!0,F(n),a(c)?(c=c(),(q||(q=Promise.resolve(),q.then((()=>{q=null}))),q).then(h)):h())},invalidate(){g=!1},end(){l&&(d(),l=!1)}}}const rt="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function ot(t,e,n,o){const{fragment:s,on_mount:c,on_destroy:l,after_update:u}=t.$$;s&&s.m(e,n),o||V((()=>{const e=c.map(r).filter(a);l?l.push(...e):i(e),t.$$.on_mount=[]})),u.forEach(V)}function it(t,e){const n=t.$$;null!==n.fragment&&(i(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function at(t,e){-1===t.$$.dirty[0]&&(O.push(t),U||(U=!0,H.then(J)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function st(e,n,r,a,s,c,l,u=[-1]){const d=R;D(e);const f=e.$$={fragment:null,ctx:null,props:c,update:t,not_equal:s,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(f.root);let h=!1;if(f.ctx=r?r(e,n.props||{},((t,n,...r)=>{const o=r.length?r[0]:n;return f.ctx&&s(f.ctx[t],f.ctx[t]=o)&&(!f.skip_bound&&f.bound[t]&&f.bound[t](o),h&&at(e,t)),n})):[],f.update(),h=!0,i(f.before_update),f.fragment=!!a&&a(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(w)}else f.fragment&&f.fragment.c();n.intro&&tt(e.$$.fragment),ot(e,n.target,n.anchor,n.customElement),J()}D(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(r).filter(a);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){i(this.$$.on_disconnect)}$destroy(){it(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){this.$$set&&!l(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});function lt(t){return t<.5?4*t*t*t:.5*Math.pow(2*t-2,3)+1}function ut(t){return t*t*t}function dt(t){const e=t-1;return e*e*e+1}const ft=[];function ht(t){return"[object Date]"===Object.prototype.toString.call(t)}function gt(t,e){if(t===e||t!=t)return()=>t;const n=typeof t;if(n!==typeof e||Array.isArray(t)!==Array.isArray(e))throw new Error("Cannot interpolate values of different type");if(Array.isArray(t)){const n=e.map(((e,n)=>gt(t[n],e)));return t=>n.map((e=>e(t)))}if("object"===n){if(!t||!e)throw new Error("Object cannot be null");if(ht(t)&&ht(e)){t=t.getTime();const n=(e=e.getTime())-t;return e=>new Date(t+e*n)}const n=Object.keys(e),r={};return n.forEach((n=>{r[n]=gt(t[n],e[n])})),t=>{const e={};return n.forEach((n=>{e[n]=r[n](t)})),e}}if("number"===n){const n=e-t;return e=>t+e*n}throw new Error(`Cannot interpolate ${n} values`)}function pt(r,o={}){const i=function(e,n=t){let r;const o=new Set;function i(t){if(s(e,t)&&(e=t,r)){const t=!ft.length;for(const t of o)t[1](),ft.push(t,e);if(t){for(let t=0;t<ft.length;t+=2)ft[t][0](ft[t+1]);ft.length=0}}}return{set:i,update:function(t){i(t(e))},subscribe:function(a,s=t){const c=[a,s];return o.add(c),1===o.size&&(r=n(i)||t),a(e),()=>{o.delete(c),0===o.size&&(r(),r=null)}}}}(r);let a,c=r;function l(t,s){if(null==r)return i.set(r=t),Promise.resolve();c=t;let l=a,u=!1,{delay:d=0,duration:h=400,easing:g=e,interpolate:p=gt}=n(n({},o),s);if(0===h)return l&&(l.abort(),l=null),i.set(r=c),Promise.resolve();const v=f()+d;let $;return a=m((e=>{if(e<v)return!0;u||($=p(r,t),"function"==typeof h&&(h=h(r,t)),u=!0),l&&(l.abort(),l=null);const n=e-v;return n>h?(i.set(r=t),!1):(i.set(r=$(g(n/h))),!0)})),a.promise}return{set:l,update:(t,e)=>l(t(c,r),e),subscribe:i.subscribe}}var mt;!function(t){t[t.Failed=0]="Failed",t[t.NoBrowserSupport=1]="NoBrowserSupport",t[t.NoAudioConsent=2]="NoAudioConsent",t[t.Disconnected=3]="Disconnected",t[t.Disconnecting=4]="Disconnecting",t[t.Connecting=5]="Connecting",t[t.Connected=6]="Connected",t[t.Starting=7]="Starting",t[t.Stopping=8]="Stopping",t[t.Recording=9]="Recording"}(mt||(mt={})),new Map([[mt.Failed,"Failed"],[mt.NoBrowserSupport,"NoBrowserSupport"],[mt.NoAudioConsent,"NoAudioConsent"],[mt.Disconnecting,"Disconnecting"],[mt.Disconnected,"Disconnected"],[mt.Connecting,"Connecting"],[mt.Connected,"Connected"],[mt.Starting,"Starting"],[mt.Stopping,"Stopping"],[mt.Recording,"Recording"]]);var vt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var $t,yt,bt=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},wt=bt;function xt(t,e,n,r){return t.call(r,e[n],n,e)}var St=function(t,e,n){var r,o=0;for(r in null==$t&&function(){for(var t in yt=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],$t=!0,{toString:null})$t=!1}(),t)if(!1===xt(e,t,r,n))break;if($t)for(var i=t.constructor,a=!!i&&t===i.prototype;(r=yt[o++])&&("constructor"===r&&(a||!wt(t,r))||t[r]===Object.prototype[r]||!1!==xt(e,t,r,n)););},Ct=St;var Mt=function(t){var e=[];return Ct(t,(function(t,n){"function"==typeof t&&e.push(n)})),e.sort()};var kt=function(t,e,n){var r=t.length;e=null==e?0:e<0?Math.max(r+e,0):Math.min(e,r),n=null==n?r:n<0?Math.max(r+n,0):Math.min(n,r);for(var o=[];e<n;)o.push(t[e++]);return o},Tt=kt;var At=function(t,e,n){var r=Tt(arguments,2);return function(){return t.apply(e,r.concat(Tt(arguments)))}};var Et=function(t,e,n){if(null!=t)for(var r=-1,o=t.length;++r<o&&!1!==e.call(n,t[r],r,t););},It=Mt,Pt=At,Nt=Et,Bt=kt;var Rt=function(t,e){var n=arguments.length>1?Bt(arguments,1):It(t);Nt(n,(function(e){t[e]=Pt(t[e],t)}))},zt=bt,_t=St;var Ft=function(t,e,n){_t(t,(function(r,o){if(zt(t,o))return e.call(n,t[o],o,t)}))};var Dt=function(t){return t};var Gt=function(t){return function(e){return e[t]}},Ot=/^\[object (.*)\]$/,Lt=Object.prototype.toString;var jt=function(t){return null===t?"Null":undefined===t?"Undefined":Ot.exec(Lt.call(t))[1]},Kt=jt;var Ht=function(t,e){return Kt(t)===e},Ut=Ht,Vt=Array.isArray||function(t){return Ut(t,"Array")},Wt=Ft,Zt=Vt;function Jt(t,e){for(var n=-1,r=t.length;++n<r;)if(Yt(t[n],e))return!0;return!1}function Yt(t,e){return t&&"object"==typeof t?Zt(t)&&Zt(e)?function(t,e){for(var n=-1,r=e.length;++n<r;)if(!Jt(t,e[n]))return!1;return!0}(t,e):function(t,e){var n=!0;return Wt(e,(function(e,r){if(!Yt(t[r],e))return n=!1})),n}(t,e):t===e}var qt=Yt,Qt=Dt,Xt=Gt,te=qt;var ee=function(t,e){if(null==t)return Qt;switch(typeof t){case"function":return void 0!==e?function(n,r,o){return t.call(e,n,r,o)}:t;case"object":return function(e){return te(e,t)};case"string":case"number":return Xt(t)}},ne=Ft,re=ee;var oe=function(t,e,n){e=re(e,n);var r=!1;return ne(t,(function(n,o){if(e(n,o,t))return r=!0,!1})),r},ie=oe;var ae=function(t,e){return ie(t,(function(t){return t===e}))};var se=function(t){return!!t&&"object"==typeof t&&t.constructor===Object},ce=Ft,le=se;var ue=function t(e,n){for(var r,o=0,i=arguments.length;++o<i;)(r=arguments[o])&&ce(r,(function(n,r){var o=e[r];null==o?e[r]=n:le(o)&&le(n)&&t(o,n)}));return e},de=Ft,fe=se;function he(t,e){for(var n,r=0,o=arguments.length;++r<o;)(n=arguments[r])&&de(n,ge,t);return t}function ge(t,e){var n=this[e];fe(t)&&fe(n)?he(n,t):this[e]=t}var pe=he,me=Ft,ve=ee;var $e=function(t,e,n){e=ve(e,n);var r=!0;return me(t,(function(n,o){if(!e(n,o,t))return r=!1,!1})),r},ye=Ht;var be=function(t){return ye(t,"Object")};var we=bt,xe=$e,Se=be,Ce=function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e};function Me(t,e){return we(this,e)}var ke=function(t,e,n){return n=n||Ce,Se(t)&&Se(e)?xe(t,function(t){return function(e,n){return we(this,n)&&t(e,this[n])}}(n),e)&&xe(e,Me,t):n(t,e)},Te=Et,Ae=kt,Ee=Ft;var Ie=function(t,e){return Te(Ae(arguments,1),(function(e){Ee(e,(function(e,n){null==t[n]&&(t[n]=e)}))})),t},Pe=Ft,Ne=ee;var Be=function(t,e,n){e=Ne(e,n);var r={};return Pe(t,(function(t,n,o){e(t,n,o)&&(r[n]=t)})),r},Re=oe,ze=ee;var _e=function(t,e,n){var r;return e=ze(e,n),Re(t,(function(t,n,o){if(e(t,n,o))return r=t,!0})),r},Fe=Ft,De=se;function Ge(t,e,n,r){return Fe(t,(function(t,o){var i=n?n+"."+o:o;0!==r&&De(t)?Ge(t,e,i,r-1):e[i]=t})),e}var Oe=function(t,e){return null==t?{}:Ge(t,{},"",e=null==e?-1:e)};var Le=function(t,e){for(var n=e.split("."),r=n.pop();e=n.shift();)if(null==(t=t[e]))return;return t[r]},je=Le;var Ke=function(t,e){return undefined!==je(t,e)},He=Ft,Ue=Object.keys||function(t){var e=[];return He(t,(function(t,n){e.push(n)})),e},Ve=Ft,We=ee;var Ze=function(t,e,n){e=We(e,n);var r={};return Ve(t,(function(t,n,o){r[n]=e(t,n,o)})),r},Je=Ft;var Ye=function(t,e){var n=!0;return Je(e,(function(e,r){if(t[r]!==e)return n=!1})),n},qe=ee;var Qe=function(t,e,n){if(null!=t&&t.length){if(t.length&&!e)return Math.max.apply(Math,t);e=qe(e,n);for(var r,o,i,a=-1/0,s=-1,c=t.length;++s<c;)(i=e(o=t[s],s,t))>a&&(a=i,r=o);return r}return 1/0},Xe=Ft;var tn=function(t){var e=[];return Xe(t,(function(t,n){e.push(t)})),e},en=Qe,nn=tn;var rn=Ft;function on(t,e){this[e]=t}var an=function(t,e){for(var n,r=0,o=arguments.length;++r<o;)null!=(n=arguments[r])&&rn(n,on,t);return t},sn=jt,cn=se,ln=an;var un=function(t){switch(sn(t)){case"Object":return cn(r=t)?ln({},r):r;case"Array":return t.slice();case"RegExp":return n="",n+=(e=t).multiline?"m":"",n+=e.global?"g":"",n+=e.ignoreCase?"i":"",new RegExp(e.source,n);case"Date":return new Date(+t);default:return t}var e,n,r},dn=Ft,fn=jt,hn=se;function gn(t,e){switch(fn(t)){case"Object":return function(t,e){if(hn(t)){var n={};return dn(t,(function(t,n){this[n]=gn(t,e)}),n),n}return e?e(t):t}(t,e);case"Array":return function(t,e){var n=[],r=-1,o=t.length;for(;++r<o;)n[r]=gn(t[r],e);return n}(t,e);default:return un(t)}}var pn=bt,mn=gn,vn=be;var $n=function t(){var e,n,r,o,i=1;for(o=mn(arguments[0]);r=arguments[i++];)for(e in r)pn(r,e)&&(n=r[e],vn(n)&&vn(o[e])?o[e]=t(o[e],n):o[e]=mn(n));return o},yn=ee;var bn=function(t,e,n){if(null!=t&&t.length){if(t.length&&!e)return Math.min.apply(Math,t);e=yn(e,n);for(var r,o,i,a=1/0,s=-1,c=t.length;++s<c;)(i=e(o=t[s],s,t))<a&&(a=i,r=o);return r}return-1/0},wn=bn,xn=tn;var Sn=Et;var Cn=function(t,e){return e?(Sn(e.split("."),(function(e){t[e]||(t[e]={}),t=t[e]})),t):t};var Mn=function(t,e,n){if(n=n||0,null==t)return-1;for(var r=t.length,o=n<0?r+n:n;o<r;){if(t[o]===e)return o;o++}return-1},kn=Mn;var Tn=kt,An=function(t,e){return-1!==kn(t,e)};var En=function(t,e){var n="string"!=typeof arguments[1]?arguments[1]:Tn(arguments,1),r={};for(var o in t)t.hasOwnProperty(o)&&!An(n,o)&&(r[o]=t[o]);return r},In=kt;var Pn=function(t,e){for(var n,r="string"!=typeof arguments[1]?arguments[1]:In(arguments,1),o={},i=0;n=r[i++];)o[n]=t[n];return o},Nn=Ze,Bn=Gt;var Rn=Ft;var zn=function(t){var e=0;return Rn(t,(function(){e++})),e},_n=Ft,Fn=zn;var Dn=function(t,e,n,r){var o=arguments.length>2;if(!Fn(t)&&!o)throw new Error("reduce of empty object with no initial value");return _n(t,(function(t,i,a){o?n=e.call(r,n,t,i,a):(n=t,o=!0)})),n},Gn=Be,On=ee;var Ln=Ht;var jn=function(t){return Ln(t,"Function")};var Kn=function(t,e){var n=t[e];if(void 0!==n)return jn(n)?n.call(t):n},Hn=Cn;var Un=function(t,e,n){var r=/^(.+)\.(.+)$/.exec(e);r?Hn(t,r[1])[r[2]]=n:t[e]=n},Vn=Ke;var Wn=function(t,e){if(Vn(t,e)){for(var n=e.split("."),r=n.pop();e=n.shift();)t=t[e];return delete t[r]}return!0},Zn={bindAll:Rt,contains:ae,deepFillIn:ue,deepMatches:qt,deepMixIn:pe,equals:ke,every:$e,fillIn:Ie,filter:Be,find:_e,flatten:Oe,forIn:St,forOwn:Ft,functions:Mt,get:Le,has:Ke,hasOwn:bt,keys:Ue,map:Ze,matches:Ye,max:function(t,e){return en(nn(t),e)},merge:$n,min:function(t,e){return wn(xn(t),e)},mixIn:an,namespace:Cn,omit:En,pick:Pn,pluck:function(t,e){return Nn(t,Bn(e))},reduce:Dn,reject:function(t,e,n){return e=On(e,n),Gn(t,(function(t,n,r){return!e(t,n,r)}),n)},result:Kn,set:Un,size:zn,some:oe,unset:Wn,values:tn};(function(){var t,e;e=Zn,t=function(){function t(){}return t.prototype.getCountry=function(e){return t.prototype.countries[e]},t.prototype.getCode=function(n){var r,o;return o=null,null!=n&&-1!==(r=e.values(t.prototype.countries).indexOf(n))&&(o=Object.keys(t.prototype.countries)[r]),o},t.prototype.getCountries=function(){return e.values(t.prototype.countries)},t.prototype.getCodes=function(){return Object.keys(t.prototype.countries)},t.prototype.getData=function(){return t.prototype.countries},t.prototype.countries={AF:"Afghanistan",AX:"Åland Islands",AL:"Albania",DZ:"Algeria",AS:"American Samoa",AD:"Andorra",AO:"Angola",AI:"Anguilla",AQ:"Antarctica",AG:"Antigua and Barbuda",AR:"Argentina",AM:"Armenia",AW:"Aruba",AU:"Australia",AT:"Austria",AZ:"Azerbaijan",BS:"Bahamas",BH:"Bahrain",BD:"Bangladesh",BB:"Barbados",BY:"Belarus",BE:"Belgium",BZ:"Belize",BJ:"Benin",BM:"Bermuda",BT:"Bhutan",BO:"Bolivia, Plurinational State of",BQ:"Bonaire, Sint Eustatius and Saba",BA:"Bosnia and Herzegovina",BW:"Botswana",BV:"Bouvet Island",BR:"Brazil",IO:"British Indian Ocean Territory",BN:"Brunei Darussalam",BG:"Bulgaria",BF:"Burkina Faso",BI:"Burundi",KH:"Cambodia",CM:"Cameroon",CA:"Canada",CV:"Cape Verde",KY:"Cayman Islands",CF:"Central African Republic",TD:"Chad",CL:"Chile",CN:"China",CX:"Christmas Island",CC:"Cocos (Keeling) Islands",CO:"Colombia",KM:"Comoros",CG:"Congo",CD:"Congo, the Democratic Republic of the",CK:"Cook Islands",CR:"Costa Rica",CI:"Côte d'Ivoire",HR:"Croatia",CU:"Cuba",CW:"Curaçao",CY:"Cyprus",CZ:"Czech Republic",DK:"Denmark",DJ:"Djibouti",DM:"Dominica",DO:"Dominican Republic",EC:"Ecuador",EG:"Egypt",SV:"El Salvador",GQ:"Equatorial Guinea",ER:"Eritrea",EE:"Estonia",ET:"Ethiopia",FK:"Falkland Islands (Malvinas)",FO:"Faroe Islands",FJ:"Fiji",FI:"Finland",FR:"France",GF:"French Guiana",PF:"French Polynesia",TF:"French Southern Territories",GA:"Gabon",GM:"Gambia",GE:"Georgia",DE:"Germany",GH:"Ghana",GI:"Gibraltar",GR:"Greece",GL:"Greenland",GD:"Grenada",GP:"Guadeloupe",GU:"Guam",GT:"Guatemala",GG:"Guernsey",GN:"Guinea",GW:"Guinea-Bissau",GY:"Guyana",HT:"Haiti",HM:"Heard Island and McDonald Mcdonald Islands",VA:"Holy See (Vatican City State)",HN:"Honduras",HK:"Hong Kong",HU:"Hungary",IS:"Iceland",IN:"India",ID:"Indonesia",IR:"Iran, Islamic Republic of",IQ:"Iraq",IE:"Ireland",IM:"Isle of Man",IL:"Israel",IT:"Italy",JM:"Jamaica",JP:"Japan",JE:"Jersey",JO:"Jordan",KZ:"Kazakhstan",KE:"Kenya",KI:"Kiribati",KP:"Korea, Democratic People's Republic of",KR:"Korea, Republic of",KW:"Kuwait",KG:"Kyrgyzstan",LA:"Lao People's Democratic Republic",LV:"Latvia",LB:"Lebanon",LS:"Lesotho",LR:"Liberia",LY:"Libya",LI:"Liechtenstein",LT:"Lithuania",LU:"Luxembourg",MO:"Macao",MK:"Macedonia, the Former Yugoslav Republic of",MG:"Madagascar",MW:"Malawi",MY:"Malaysia",MV:"Maldives",ML:"Mali",MT:"Malta",MH:"Marshall Islands",MQ:"Martinique",MR:"Mauritania",MU:"Mauritius",YT:"Mayotte",MX:"Mexico",FM:"Micronesia, Federated States of",MD:"Moldova, Republic of",MC:"Monaco",MN:"Mongolia",ME:"Montenegro",MS:"Montserrat",MA:"Morocco",MZ:"Mozambique",MM:"Myanmar",NA:"Namibia",NR:"Nauru",NP:"Nepal",NL:"Netherlands",NC:"New Caledonia",NZ:"New Zealand",NI:"Nicaragua",NE:"Niger",NG:"Nigeria",NU:"Niue",NF:"Norfolk Island",MP:"Northern Mariana Islands",NO:"Norway",OM:"Oman",PK:"Pakistan",PW:"Palau",PS:"Palestine, State of",PA:"Panama",PG:"Papua New Guinea",PY:"Paraguay",PE:"Peru",PH:"Philippines",PN:"Pitcairn",PL:"Poland",PT:"Portugal",PR:"Puerto Rico",QA:"Qatar",RE:"Réunion",RO:"Romania",RU:"Russian Federation",RW:"Rwanda",BL:"Saint Barthélemy",SH:"Saint Helena, Ascension and Tristan da Cunha",KN:"Saint Kitts and Nevis",LC:"Saint Lucia",MF:"Saint Martin (French part)",PM:"Saint Pierre and Miquelon",VC:"Saint Vincent and the Grenadines",WS:"Samoa",SM:"San Marino",ST:"Sao Tome and Principe",SA:"Saudi Arabia",SN:"Senegal",RS:"Serbia",SC:"Seychelles",SL:"Sierra Leone",SG:"Singapore",SX:"Sint Maarten (Dutch part)",SK:"Slovakia",SI:"Slovenia",SB:"Solomon Islands",SO:"Somalia",ZA:"South Africa",GS:"South Georgia and the South Sandwich Islands",SS:"South Sudan",ES:"Spain",LK:"Sri Lanka",SD:"Sudan",SR:"Suriname",SJ:"Svalbard and Jan Mayen",SZ:"Swaziland",SE:"Sweden",CH:"Switzerland",SY:"Syrian Arab Republic",TW:"Taiwan, Province of China",TJ:"Tajikistan",TZ:"Tanzania, United Republic of",TH:"Thailand",TL:"Timor-Leste",TG:"Togo",TK:"Tokelau",TO:"Tonga",TT:"Trinidad and Tobago",TN:"Tunisia",TR:"Turkey",TM:"Turkmenistan",TC:"Turks and Caicos Islands",TV:"Tuvalu",UG:"Uganda",UA:"Ukraine",AE:"United Arab Emirates",GB:"United Kingdom",US:"United States",UM:"United States Minor Outlying Islands",UY:"Uruguay",UZ:"Uzbekistan",VU:"Vanuatu",VE:"Venezuela, Bolivarian Republic of",VN:"Viet Nam",VG:"Virgin Islands, British",VI:"Virgin Islands, U.S.",WF:"Wallis and Futuna",EH:"Western Sahara",YE:"Yemen",ZM:"Zambia",ZW:"Zimbabwe"},t}(),null!=null||new t}).call(vt);for(var Jn=[],Yn=0;Yn<256;++Yn)Jn.push((Yn+256).toString(16).substr(1));var qn,Qn,Xn,tr,er,nr,rr,or={exports:{}}; | ||
/*! http://mths.be/base64 v0.1.0 by @mathias | MIT license */function ir(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 ar(t,{delay:e=0,speed:n,duration:r,easing:o=lt}={}){let i=t.getTotalLength();const a=getComputedStyle(t);return"butt"!==a.strokeLinecap&&(i+=parseInt(a.strokeWidth)),void 0===r?r=void 0===n?800:i/n:"function"==typeof r&&(r=r(i)),{delay:e,duration:r,easing:o,css:(t,e)=>`stroke-dasharray: ${t*i} ${e*i}`}}qn=or,Qn=or.exports,function(t){var e=Qn,n=qn&&qn.exports==e&&qn,r="object"==typeof vt&&vt;r.global!==r&&r.window!==r||(t=r);var o=function(t){this.message=t};(o.prototype=new Error).name="InvalidCharacterError";var i=function(t){throw new o(t)},a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=/[\t\n\f\r ]/g,c={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,r,o,s=t.length%3,c="",l=-1,u=t.length-s;++l<u;)e=t.charCodeAt(l)<<16,n=t.charCodeAt(++l)<<8,r=t.charCodeAt(++l),c+=a.charAt((o=e+n+r)>>18&63)+a.charAt(o>>12&63)+a.charAt(o>>6&63)+a.charAt(63&o);return 2==s?(e=t.charCodeAt(l)<<8,n=t.charCodeAt(++l),c+=a.charAt((o=e+n)>>10)+a.charAt(o>>4&63)+a.charAt(o<<2&63)+"="):1==s&&(o=t.charCodeAt(l),c+=a.charAt(o>>2)+a.charAt(o<<4&63)+"=="),c},decode:function(t){var e=(t=String(t).replace(s,"")).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,r,o=0,c="",l=-1;++l<e;)r=a.indexOf(t.charAt(l)),n=o%4?64*n+r:r,o++%4&&(c+=String.fromCharCode(255&n>>(-2*o&6)));return c},version:"0.1.0"};if(e&&!e.nodeType)if(n)n.exports=c;else for(var l in c)c.hasOwnProperty(l)&&(e[l]=c[l]);else t.base64=c}(vt),function(t){t.Opened="WEBSOCKET_OPEN",t.SourceSampleRateSetSuccess="SOURSE_SAMPLE_RATE_SET_SUCCESS",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"}(Xn||(Xn={})),function(t){t.Failed="Failed",t.NoBrowserSupport="NoBrowserSupport",t.NoAudioConsent="NoAudioConsent",t.Idle="Idle",t.Connecting="Connecting",t.Ready="Ready",t.Recording="Recording",t.Loading="Loading"}(tr||(tr={})),function(t){t.Poweron="poweron",t.Mic="mic",t.Error="error",t.Denied="denied"}(er||(er={})),function(t){t.Hold="hold",t.Click="click",t.Noninteractive="noninteractive"}(nr||(nr={})),function(t){t.None="none",t.Connecting="connecting",t.Busy="busy"}(rr||(rr={})),mt.Disconnected,er.Poweron,nr.Click,rr.None,mt.Disconnecting,er.Poweron,nr.Noninteractive,rr.Connecting,mt.Connecting,er.Poweron,nr.Noninteractive,rr.Connecting,mt.Connected,er.Mic,nr.Hold,rr.None,mt.Starting,er.Mic,nr.Hold,rr.Connecting,mt.Recording,er.Mic,nr.Hold,rr.None,mt.Stopping,er.Mic,nr.Noninteractive,rr.Busy,mt.Failed,er.Error,nr.Click,rr.None,mt.NoBrowserSupport,er.Error,nr.Click,rr.None,mt.NoAudioConsent,er.Denied,nr.Click,rr.None;const sr=[0,1];function cr(t,e,n,r){if(e<n)return t[0];if(e>r)return t[t.length-1];let o=(r-n)/(t.length-1);if(o<=0)return t[0];let i=(e-n)/o,a=Math.floor(i),s=Math.ceil(i),c=i-a;return(1-c)*t[a]+c*t[s]}function lr(t){!function(t,e,n){const r=$(t);if(!r.getElementById(e)){const t=x("style");t.id=e,t.textContent=n,y(r,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 ur(e){let n;return{c(){n=x("canvas"),I(n,"color",e[0]),I(n,"display","block"),I(n,"width","1.35rem"),I(n,"height","1.5rem"),I(n,"margin","0"),I(n,"padding","0 0.8rem 0 0rem"),I(n,"flex-grow","0"),I(n,"flex-shrink","0"),I(n,"flex-basis","1.35rem"),T(n,"class","svelte-1fz8oog")},m(t,r){b(t,n,r),e[3](n)},p(t,[e]){1&e&&I(n,"color",t[0])},i:t,o:t,d(t){t&&w(n),e[3](null)}}}function dr(t,e,n){let{color:r="#60e0ff"}=e;const o=(t,e)=>{a=Date.now()>s?t:Math.max(a,t),s=Date.now()+e};let i,a=0,s=0,c=[0,0];const l=(t,e,n,r,o,i)=>{r<2*i&&(i=r/2),o<2*i&&(i=o/2),t.beginPath(),t.moveTo(e+i,n),t.arcTo(e+r,n,e+r,n+o,i),t.arcTo(e+r,n+o,e,n+o,i),t.arcTo(e,n+o,e,n,i),t.arcTo(e,n,e+r,n,i),t.closePath()};var u;return u=()=>{let t;const e=2*(c.length-1)+1,r=3*e+1*(e-1),u=()=>{if(t=requestAnimationFrame(u),!i)return;const e=i.getContext("2d");if(!e)return;let o=(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(i).getPropertyValue("width").slice(0,-2)),f=Number.parseInt(getComputedStyle(i).getPropertyValue("height").slice(0,-2));n(1,i.width=d*o,i),n(1,i.height=f*o,i),Date.now()<s?c[0]=.15*a+.85*c[0]:c[0]=.0625+.75*c[0];let h=1;for(;h<c.length;)c[h]=.25*c[h-1]+.5*c[h]+.0625,h++;e.clearRect(0,0,i.width,i.height);const g=3/r*i.width*.5,p=4/r*i.width;for(e.fillStyle=i.style.color||"#000000",h=0;h<c.length;h++){const t=c[h]*i.height;t*i.height>2*g?l(e,.5*i.width-g+h*p,.5*(i.height-t),2*g,t,g):(e.beginPath(),e.arc(.5*i.width+h*p,.5*i.height,t*i.height*.5,0,2*Math.PI)),e.fill(),h>0&&(t*i.height>2*g?l(e,.5*i.width-g-h*p,.5*(i.height-t),2*g,t,g):(e.beginPath(),e.arc(.5*i.width-h*p,.5*i.height,t*i.height*.5,0,2*Math.PI)),e.fill())}};return u(),o(1,500),()=>{cancelAnimationFrame(t)}},G().$$.on_mount.push(u),t.$$set=t=>{"color"in t&&n(0,r=t.color)},[r,i,o,function(t){L[t?"unshift":"push"]((()=>{i=t,n(1,i)}))}]}class fr 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,dr,ur,s,{color:0,updateVU:2},lr)}get updateVU(){return this.$$.ctx[2]}}const{window:hr}=rt;function gr(t,e,n){const r=t.slice();return r[39]=e[n],r[41]=n,r}function pr(t){let e;return{c(){e=x("div"),T(e,"class","TransscriptItemBgDiv")},m(t,n){b(t,e,n)},d(t){t&&w(e)}}}function mr(e){let n,r;return{c(){n=x("div"),n.textContent="Listening...",T(n,"class","listening")},m(t,e){b(t,n,e)},i(t){r||V((()=>{r=nt(n,e[19],{duration:400}),r.start()}))},o:t,d(t){t&&w(n)}}}function vr(e){let n,r;return{c(){n=x("div"),T(n,"class","TransscriptItemBgDiv")},m(t,e){b(t,n,e)},p(t,n){e=t},i(t){r||V((()=>{r=nt(n,e[19],{duration:e[13]}),r.start()}))},o:t,d(t){t&&w(n)}}}function $r(t){let e,n;return{c(){e=x("span"),T(e,"style",n=t[41]<t[10].length-1?"width:0.25em;":t[12]?"width:1.2em;":"")},m(t,n){b(t,e,n)},p(t,r){5120&r[0]&&n!==(n=t[41]<t[10].length-1?"width:0.25em;":t[12]?"width:1.2em;":"")&&T(e,"style",n)},d(t){t&&w(e)}}}function yr(e){let n,r,o,i,a,s,c,l=e[39].word+"",u=e[14]&&vr(e),d=e[41]<e[10].length&&$r(e);return{c(){n=x("div"),u&&u.c(),r=M(),o=x("div"),i=C(l),a=M(),d&&d.c(),T(o,"class","TransscriptItemContent"),T(n,"class",c="TranscriptItem "+e[21](e[39])),P(n,"Entity",null!==e[39].entityType),P(n,"Final",e[39].isFinal)},m(t,e){b(t,n,e),u&&u.m(n,null),v(n,r),v(n,o),v(o,i),v(o,a),d&&d.m(o,null)},p(t,a){(e=t)[14]?u?16384&a[0]&&tt(u,1):(u=vr(e),u.c(),tt(u,1),u.m(n,r)):u&&(u.d(1),u=null),1024&a[0]&&l!==(l=e[39].word+"")&&E(i,l),e[41]<e[10].length?d?d.p(e,a):(d=$r(e),d.c(),d.m(o,null)):d&&(d.d(1),d=null),1024&a[0]&&c!==(c="TranscriptItem "+e[21](e[39]))&&T(n,"class",c),1024&a[0]&&P(n,"Entity",null!==e[39].entityType),1024&a[0]&&P(n,"Final",e[39].isFinal)},i(t){tt(u),s||V((()=>{s=nt(o,e[19],{duration:e[13]}),s.start()}))},o:t,d(t){t&&w(n),u&&u.d(),d&&d.d()}}}function br(e){let n,r,o,i,a,s,c,l;return{c(){n=x("div"),r=x("div"),o=M(),i=x("div"),a=S("svg"),s=S("path"),T(r,"class","TransscriptItemBgDiv"),I(r,"background-color",e[5]),T(s,"stroke","currentColor"),T(s,"stroke-width","3"),T(s,"d","M7.191 11.444l4.059 6.107 7.376-12.949"),T(s,"fill","none"),T(s,"fill-rule","evenodd"),I(a,"width","2rem"),I(a,"height","2rem"),I(a,"position","absolute"),I(a,"transform","translate(-0.6rem, -0.5rem)"),I(a,"stroke","#eee"),T(a,"viewBox","0 0 24 24"),T(a,"xmlns","http://www.w3.org/2000/svg"),I(i,"width","1.0rem"),I(i,"height","1rem"),I(i,"position","relative"),T(n,"class","TranscriptItem")},m(t,e){b(t,n,e),v(n,r),v(n,o),v(n,i),v(i,a),v(a,s)},p(t,e){32&e[0]&&I(r,"background-color",t[5])},i(t){c||V((()=>{c=nt(s,e[18],{duration:500}),c.start()})),l||V((()=>{l=nt(n,e[19],{duration:200,maxWidth:3}),l.start()}))},o:t,d(t){t&&w(n)}}}function wr(e){let n,r,o,i,a,s,c,l,u,d,f,h,g,p,m=e[14]&&pr(),$={color:e[5]};s=new fr({props:$}),e[31](s);let y=e[15]&&mr(e),S=e[10],C=[];for(let t=0;t<S.length;t+=1)C[t]=yr(gr(e,S,t));let A=e[12]&&br(e);return{c(){var h;n=x("main"),r=x("div"),o=x("div"),m&&m.c(),i=M(),a=x("div"),(h=s.$$.fragment)&&h.c(),c=M(),y&&y.c(),l=M();for(let t=0;t<C.length;t+=1)C[t].c();u=M(),A&&A.c(),d=M(),f=x("link"),this.c=t,T(a,"class","TransscriptItemContent"),T(o,"class","TranscriptItem"),T(r,"class","BigTranscript"),I(n,"--voffset",e[1]),I(n,"--hoffset",e[2]),I(n,"--fontsize",e[3]),I(n,"--color",e[4]),I(n,"--highlight-color",e[5]),I(n,"--text-bg-color",e[6]),I(n,"--gradient-stop1",e[7]),I(n,"--gradient-stop2",e[8]),I(n,"--marginbottom",e[9]),I(n,"--transition",e[16].transition),I(n,"opacity",e[16].transition),I(n,"max-height",10*cr(sr,e[16].transition,0,.6)+"rem"),I(n,"visibility",0!==e[16].transition?"visible":"hidden"),P(n,"placementTop","top"===e[0]),T(f,"href","https://fonts.googleapis.com/css2?family=Saira+Condensed:wght@700&display=swap"),T(f,"rel","stylesheet")},m(t,$){b(t,n,$),v(n,r),v(r,o),m&&m.m(o,null),v(o,i),v(o,a),ot(s,a,null),v(a,c),y&&y.m(a,null),v(r,l);for(let t=0;t<C.length;t+=1)C[t].m(r,null);v(r,u),A&&A.m(r,null),b(t,d,$),v(document.head,f),h=!0,g||(p=k(hr,"message",e[20]),g=!0)},p(t,e){t[14]?m||(m=pr(),m.c(),m.m(o,i)):m&&(m.d(1),m=null);const c={};if(32&e[0]&&(c.color=t[5]),s.$set(c),t[15]?y?32768&e[0]&&tt(y,1):(y=mr(t),y.c(),tt(y,1),y.m(a,null)):y&&(y.d(1),y=null),2118656&e[0]){let n;for(S=t[10],n=0;n<S.length;n+=1){const o=gr(t,S,n);C[n]?(C[n].p(o,e),tt(C[n],1)):(C[n]=yr(o),C[n].c(),tt(C[n],1),C[n].m(r,u))}for(;n<C.length;n+=1)C[n].d(1);C.length=S.length}t[12]?A?(A.p(t,e),4096&e[0]&&tt(A,1)):(A=br(t),A.c(),tt(A,1),A.m(r,null)):A&&(A.d(1),A=null),(!h||2&e[0])&&I(n,"--voffset",t[1]),(!h||4&e[0])&&I(n,"--hoffset",t[2]),(!h||8&e[0])&&I(n,"--fontsize",t[3]),(!h||16&e[0])&&I(n,"--color",t[4]),(!h||32&e[0])&&I(n,"--highlight-color",t[5]),(!h||64&e[0])&&I(n,"--text-bg-color",t[6]),(!h||128&e[0])&&I(n,"--gradient-stop1",t[7]),(!h||256&e[0])&&I(n,"--gradient-stop2",t[8]),(!h||512&e[0])&&I(n,"--marginbottom",t[9]),(!h||65536&e[0])&&I(n,"--transition",t[16].transition),(!h||65536&e[0])&&I(n,"opacity",t[16].transition),(!h||65536&e[0])&&I(n,"max-height",10*cr(sr,t[16].transition,0,.6)+"rem"),(!h||65536&e[0])&&I(n,"visibility",0!==t[16].transition?"visible":"hidden"),1&e[0]&&P(n,"placementTop","top"===t[0])},i(t){if(!h){tt(s.$$.fragment,t),tt(y);for(let t=0;t<S.length;t+=1)tt(C[t]);tt(A),h=!0}},o(t){!function(t,e,n,r){if(t&&t.o){if(X.has(t))return;X.add(t),(void 0).c.push((()=>{X.delete(t),r&&(n&&t.d(1),r())})),t.o(e)}}(s.$$.fragment,t),h=!1},d(t){t&&w(n),m&&m.d(),e[31](null),it(s),y&&y.d(),function(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}(C,t),A&&A.d(),t&&w(d),w(f),g=!1,p()}}}function xr(t,e,n){let r,o,i,a,s,c,l,{placement:d}=e,{voffset:f="3rem"}=e,{hoffset:h="2rem"}=e,{fontsize:g="1.5rem"}=e,{color:p="#ffffff"}=e,{highlightcolor:m="#15e8b5"}=e,{backgroundcolor:v="#202020"}=e,{gradientstop1:$="#ffffff88"}=e,{gradientstop2:y="#ffffffcc"}=e,{marginbottom:b="0rem"}=e,{formattext:w}=e,{demomode:x}=e,S=[],C=null,M=null,k=mt.Disconnected,T=!1,A=!1,E=!1,I=pt({transition:0},{duration:200});u(t,I,(t=>n(16,c=t)));const P=G(),N=ir(ar),B=ir(((t,{delay:e=0,duration:n=350,maxWidth:r=10})=>({delay:e,duration:n,css:t=>`\n max-width: ${cr(sr,t,0,1)*r}rem;\n `}))),R=t=>{n(12,E=E||t)},z=t=>{n(27,k=t),k===mt.Recording&&(n(12,E=!1),n(10,S=[]),M=null)},_=t=>{if(void 0===t)return;l&&(a||k===mt.Recording)&&l.updateVU(.5*Math.random()+.5,75*Math.random()+75),t.isFinal?F(S.length>0?a?3500:2e3:0):S.length>0&&(T||n(28,T=!0),F(2e3));const e=`${t.contextId}/${t.id}`;null!==M?M!==e&&(n(12,E=!1),M=e):M=e,n(10,S=[]),t.words.forEach((t=>{n(10,S[t.index]={word:t.value,serialNumber:t.index,entityType:null,isFinal:t.isFinal,hide:!1},S)})),i?t.entities.forEach((t=>{n(10,S[t.startPosition].word=t.value,S),n(10,S[t.startPosition].entityType=t.type,S),n(10,S[t.startPosition].isFinal=t.isFinal,S),n(10,S[t.startPosition].hide=!1,S);for(let e=t.startPosition+1;e<t.endPosition;e++)S[e]&&n(10,S[e].hide=!0,S)})):t.entities.forEach((t=>{for(let e=t.startPosition;e<t.endPosition;e++)S[e]&&(n(10,S[e].entityType=t.type,S),n(10,S[e].isFinal=t.isFinal,S))})),n(10,S=S.filter((t=>!t.hide)))},F=(t=0)=>{D(),C=window.setTimeout((()=>{C=null,T&&n(28,T=!1)}),t)},D=()=>{null!==C&&(window.clearTimeout(C),C=null)};return t.$$set=t=>{"placement"in t&&n(0,d=t.placement),"voffset"in t&&n(1,f=t.voffset),"hoffset"in t&&n(2,h=t.hoffset),"fontsize"in t&&n(3,g=t.fontsize),"color"in t&&n(4,p=t.color),"highlightcolor"in t&&n(5,m=t.highlightcolor),"backgroundcolor"in t&&n(6,v=t.backgroundcolor),"gradientstop1"in t&&n(7,$=t.gradientstop1),"gradientstop2"in t&&n(8,y=t.gradientstop2),"marginbottom"in t&&n(9,b=t.marginbottom),"formattext"in t&&n(22,w=t.formattext),"demomode"in t&&n(23,x=t.demomode)},t.$$.update=()=>{if(1024&t.$$.dirty[0]&&n(15,r=0===S.length),64&t.$$.dirty[0]&&n(14,o="none"!==v),4194304&t.$$.dirty[0]&&(i=void 0===w||"false"!==w),8388608&t.$$.dirty[0]&&n(30,a=void 0!==x&&"false"!==x),1073741824&t.$$.dirty[0]&&n(13,s=a?800:350),939524096&t.$$.dirty[0]){const t=k===mt.Recording||T;t!==A&&(e="visibilitychanged",c=t,P.dispatchEvent(new CustomEvent(e,{detail:c,composed:!0}))),n(29,A=t),I.set({transition:A?1:0})}var e,c;1073741824&t.$$.dirty[0]&&(a||F(0))},[d,f,h,g,p,m,v,$,y,b,S,l,E,s,o,r,c,I,N,B,t=>{switch(t.data.type){case"speechsegment":_(t.data.segment);break;case"speechhandled":R(t.data.success);break;case"speechstate":z(t.data.state)}},t=>t.entityType||"",w,x,R,z,_,k,T,A,a,function(t){L[t?"unshift":"push"]((()=>{l=t,n(11,l)}))}]}class Sr extends ct{constructor(t){super(),this.shadowRoot.innerHTML="<style>.BigTranscript{position:relative;user-select:none;font-family:'Saira Condensed', sans-serif;text-transform:uppercase;color:var(--color);font-size:var(--fontsize);line-height:135%;display:flex;flex-direction:row;justify-content:start;flex-wrap:wrap;margin-bottom:calc(var(--marginbottom) * var(--transition))}.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:N(this.attributes),customElement:!0},xr,wr,c,{placement:0,voffset:1,hoffset:2,fontsize:3,color:4,highlightcolor:5,backgroundcolor:6,gradientstop1:7,gradientstop2:8,marginbottom:9,formattext:22,demomode:23,speechhandled:24,speechstate:25,speechsegment:26},null,[-1,-1]),t&&(t.target&&b(t.target,this,t.anchor),t.props&&(this.$set(t.props),J()))}static get observedAttributes(){return["placement","voffset","hoffset","fontsize","color","highlightcolor","backgroundcolor","gradientstop1","gradientstop2","marginbottom","formattext","demomode","speechhandled","speechstate","speechsegment"]}get placement(){return this.$$.ctx[0]}set placement(t){this.$$set({placement:t}),J()}get voffset(){return this.$$.ctx[1]}set voffset(t){this.$$set({voffset:t}),J()}get hoffset(){return this.$$.ctx[2]}set hoffset(t){this.$$set({hoffset:t}),J()}get fontsize(){return this.$$.ctx[3]}set fontsize(t){this.$$set({fontsize:t}),J()}get color(){return this.$$.ctx[4]}set color(t){this.$$set({color:t}),J()}get highlightcolor(){return this.$$.ctx[5]}set highlightcolor(t){this.$$set({highlightcolor:t}),J()}get backgroundcolor(){return this.$$.ctx[6]}set backgroundcolor(t){this.$$set({backgroundcolor:t}),J()}get gradientstop1(){return this.$$.ctx[7]}set gradientstop1(t){this.$$set({gradientstop1:t}),J()}get gradientstop2(){return this.$$.ctx[8]}set gradientstop2(t){this.$$set({gradientstop2:t}),J()}get marginbottom(){return this.$$.ctx[9]}set marginbottom(t){this.$$set({marginbottom:t}),J()}get formattext(){return this.$$.ctx[22]}set formattext(t){this.$$set({formattext:t}),J()}get demomode(){return this.$$.ctx[23]}set demomode(t){this.$$set({demomode:t}),J()}get speechhandled(){return this.$$.ctx[24]}get speechstate(){return this.$$.ctx[25]}get speechsegment(){return this.$$.ctx[26]}}function Cr(e){let n,r,o,a,s,c,l,u,d;return{c(){n=x("main"),r=x("div"),o=x("div"),a=x("big-transcript"),s=M(),c=x("div"),l=C(e[11]),this.c=t,A(a,"formattext",e[9]),A(a,"fontsize",e[1]),A(a,"color",e[3]),A(a,"backgroundcolor","none"),A(a,"highlightcolor",e[5]),A(a,"gradientstop1",e[7]),A(a,"gradientstop2",e[8]),A(a,"demomode",e[10]),T(c,"class","hint"),I(c,"opacity",e[15].opacity),T(o,"class","pad"),T(r,"class","drawer"),I(r,"background-color",e[6]),I(r,"opacity",e[13].opacity),I(r,"transform","translate(0px, "+e[14].y+"rem)"),T(n,"class","placementTop"),I(n,"--height",e[0]),I(n,"--smalltextcolor",e[4]),I(n,"--hintfontsize",e[2])},m(t,i){b(t,n,i),v(n,r),v(r,o),v(o,a),e[26](a),v(o,s),v(o,c),v(c,l),u||(d=[k(window,"message",e[20]),k(a,"visibilitychanged",e[19])],u=!0)},p(t,[e]){512&e&&A(a,"formattext",t[9]),2&e&&A(a,"fontsize",t[1]),8&e&&A(a,"color",t[3]),32&e&&A(a,"highlightcolor",t[5]),128&e&&A(a,"gradientstop1",t[7]),256&e&&A(a,"gradientstop2",t[8]),1024&e&&A(a,"demomode",t[10]),2048&e&&E(l,t[11]),32768&e&&I(c,"opacity",t[15].opacity),64&e&&I(r,"background-color",t[6]),8192&e&&I(r,"opacity",t[13].opacity),16384&e&&I(r,"transform","translate(0px, "+t[14].y+"rem)"),1&e&&I(n,"--height",t[0]),16&e&&I(n,"--smalltextcolor",t[4]),4&e&&I(n,"--hintfontsize",t[2])},i:t,o:t,d(t){t&&w(n),e[26](null),u=!1,i(d)}}}function Mr(t,n,r){let o,i,a,s,{height:c="8rem"}=n,{hint:l=""}=n,{fontsize:d="1.5rem"}=n,{hintfontsize:f="0.9rem"}=n,{color:h="#ffffff"}=n,{smalltextcolor:g="#ffffff70"}=n,{highlightcolor:p="#15e8b5"}=n,{backgroundcolor:m="#202020"}=n,{gradientstop1:v="#ffffff88"}=n,{gradientstop2:$="#ffffffcc"}=n,{formattext:y}=n,{demomode:b}=n,w=[],x=0,S="";const C=(t,e=!0)=>{A.set({opacity:0}),s&&e&&s.speechsegment(t),t.isFinal&&(x++,x<w.length?r(11,S=w[x]):r(11,S=w[Math.floor(Math.random()*w.length)]))},M=t=>{x=0,r(21,l=t),w=[];try{w=JSON.parse(l),("string"==typeof w||w instanceof String)&&(w=[w])}catch(t){w[0]=l||""}r(11,S=w[x])};let k=pt({y:-1},{duration:200});u(t,k,(t=>r(14,i=t)));let T=pt({opacity:0},{duration:200,easing:e});u(t,T,(t=>r(13,o=t)));let A=pt({opacity:0},{duration:200,delay:200,easing:e});u(t,A,(t=>r(15,a=t)));return t.$$set=t=>{"height"in t&&r(0,c=t.height),"hint"in t&&r(21,l=t.hint),"fontsize"in t&&r(1,d=t.fontsize),"hintfontsize"in t&&r(2,f=t.hintfontsize),"color"in t&&r(3,h=t.color),"smalltextcolor"in t&&r(4,g=t.smalltextcolor),"highlightcolor"in t&&r(5,p=t.highlightcolor),"backgroundcolor"in t&&r(6,m=t.backgroundcolor),"gradientstop1"in t&&r(7,v=t.gradientstop1),"gradientstop2"in t&&r(8,$=t.gradientstop2),"formattext"in t&&r(9,y=t.formattext),"demomode"in t&&r(10,b=t.demomode)},t.$$.update=()=>{2097152&t.$$.dirty&&M(l)},[c,d,f,h,g,p,m,v,$,y,b,S,s,o,i,a,k,T,A,t=>{!1===t.detail?(k.set({y:-1},{easing:ut}),T.set({opacity:0}),A.set({opacity:0})):(k.set({y:0},{easing:dt}),T.set({opacity:1}),A.set({opacity:1}))},t=>{switch(t.data.type){case"speechsegment":C(t.data.segment,!1);break;case"hint":M(t.data.hint)}},l,t=>{s&&s.speechhandled(t)},t=>{s&&s.speechstate(t)},C,M,function(t){L[t?"unshift":"push"]((()=>{s=t,r(12,s)}))}]}customElements.get("big-transcript")?console.warn("Skipping re-defining customElement big-transcript"):customElements.define("big-transcript",Sr);class kr extends ct{constructor(t){super(),this.shadowRoot.innerHTML="<style>.placementTop{position:fixed;top:0;left:0;right:0;bottom:0;z-index:60;pointer-events:none}.drawer{width:100%;min-height:var(--height);display:flex;flex-direction:column;justify-content:flex-end;box-shadow:0 0 0.35rem #0004}.pad{position:relative;padding:2rem 2rem 0.65rem 1.5rem}.hint{font-family:'Saira Condensed', sans-serif;text-transform:uppercase;color:var(--smalltextcolor);font-size:var(--hintfontsize);line-height:135%;margin-top:0.15rem}</style>",st(this,{target:this.shadowRoot,props:N(this.attributes),customElement:!0},Mr,Cr,c,{height:0,hint:21,fontsize:1,hintfontsize:2,color:3,smalltextcolor:4,highlightcolor:5,backgroundcolor:6,gradientstop1:7,gradientstop2:8,formattext:9,demomode:10,speechhandled:22,speechstate:23,speechsegment:24,sethint:25},null),t&&(t.target&&b(t.target,this,t.anchor),t.props&&(this.$set(t.props),J()))}static get observedAttributes(){return["height","hint","fontsize","hintfontsize","color","smalltextcolor","highlightcolor","backgroundcolor","gradientstop1","gradientstop2","formattext","demomode","speechhandled","speechstate","speechsegment","sethint"]}get height(){return this.$$.ctx[0]}set height(t){this.$$set({height:t}),J()}get hint(){return this.$$.ctx[21]}set hint(t){this.$$set({hint:t}),J()}get fontsize(){return this.$$.ctx[1]}set fontsize(t){this.$$set({fontsize:t}),J()}get hintfontsize(){return this.$$.ctx[2]}set hintfontsize(t){this.$$set({hintfontsize:t}),J()}get color(){return this.$$.ctx[3]}set color(t){this.$$set({color:t}),J()}get smalltextcolor(){return this.$$.ctx[4]}set smalltextcolor(t){this.$$set({smalltextcolor:t}),J()}get highlightcolor(){return this.$$.ctx[5]}set highlightcolor(t){this.$$set({highlightcolor:t}),J()}get backgroundcolor(){return this.$$.ctx[6]}set backgroundcolor(t){this.$$set({backgroundcolor:t}),J()}get gradientstop1(){return this.$$.ctx[7]}set gradientstop1(t){this.$$set({gradientstop1:t}),J()}get gradientstop2(){return this.$$.ctx[8]}set gradientstop2(t){this.$$set({gradientstop2:t}),J()}get formattext(){return this.$$.ctx[9]}set formattext(t){this.$$set({formattext:t}),J()}get demomode(){return this.$$.ctx[10]}set demomode(t){this.$$set({demomode:t}),J()}get speechhandled(){return this.$$.ctx[22]}get speechstate(){return this.$$.ctx[23]}get speechsegment(){return this.$$.ctx[24]}get sethint(){return this.$$.ctx[25]}}customElements.get("transcript-drawer")?console.warn("Skipping re-defining customElement transcript-drawer"):customElements.define("transcript-drawer",kr)})); | ||
!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,e){$(t.head||t,e)}function x(t,e,n){t.insertBefore(e,n||null)}function w(t){t.parentNode.removeChild(t)}function v(t){return document.createElement(t)}function k(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function z(t){return document.createTextNode(t)}function _(){return z(" ")}function T(){return z("")}function E(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function C(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:C(t,e,n)}function P(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function R(t,e,n,o){t.style.setProperty(e,n,o?"important":"")}function D(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 Set;let A,I=0;function M(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);F.add(u);const f=u.__svelte_stylesheet||(u.__svelte_stylesheet=function(t){const e=v("style");return b(y(t),e),e}(t).sheet),g=u.__svelte_rules||(u.__svelte_rules={});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`,I+=1,d}function B(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(", "),I-=i,I||f((()=>{I||(F.forEach((t=>{const e=t.__svelte_stylesheet;let n=e.cssRules.length;for(;n--;)e.deleteRule(n);t.__svelte_rules={}})),F.clear())})))}function j(t){A=t}function O(){if(!A)throw new Error("Function called outside component initialization");return A}const L=[],H=[],V=[],W=[],q=Promise.resolve();let U=!1;function J(t){V.push(t)}let G=!1;const K=new Set;function Q(){if(!G){G=!0;do{for(let t=0;t<L.length;t+=1){const e=L[t];j(e),X(e.$$)}for(j(null),L.length=0;H.length;)H.pop()();for(let t=0;t<V.length;t+=1){const e=V[t];K.has(e)||(K.add(e),e())}V.length=0}while(L.length);for(;W.length;)W.pop()();U=!1,G=!1,K.clear()}}function X(t){if(null!==t.fragment){t.update(),r(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(J)}}let Y;function Z(t,e,n){t.dispatchEvent(function(t,e,n=!1){const o=document.createEvent("CustomEvent");return o.initCustomEvent(t,n,!1,e),o}(`${e?"intro":"outro"}${n}`))}const tt=new Set;function et(t,e){t&&t.i&&(tt.delete(t),t.i(e))}const nt={duration:0};function ot(n,o,i){let r,c,a=o(n,i),l=!1,h=0;function d(){r&&B(n,r)}function f(){const{delay:o=0,duration:i=300,easing:s=e,tick:f=t,css:g}=a||nt;g&&(r=M(n,0,1,i,o,s,g,h++)),f(0,1);const p=u()+o,$=p+i;c&&c.abort(),l=!0,J((()=>Z(n,!0,"start"))),c=m((t=>{if(l){if(t>=$)return f(1,0),Z(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,B(n),s(a)?(a=a(),(Y||(Y=Promise.resolve(),Y.then((()=>{Y=null}))),Y).then(f)):f())},invalidate(){g=!1},end(){l&&(d(),l=!1)}}}const it="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function rt(t,e,n,i){const{fragment:c,on_mount:a,on_destroy:l,after_update:h}=t.$$;c&&c.m(e,n),i||J((()=>{const e=a.map(o).filter(s);l?l.push(...e):r(e),t.$$.on_mount=[]})),h.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]&&(L.push(t),U||(U=!0,q.then(Q)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function at(e,n,o,s,c,a,l,h=[-1]){const d=A;j(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&&ct(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(w)}else u.fragment&&u.fragment.c();n.intro&&et(e.$$.fragment),rt(e,n.target,n.anchor,n.customElement),Q()}j(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(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(){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)}});var ht,dt,ut,ft,gt,pt,mt;function $t(t){return t<.5?4*t*t*t:.5*Math.pow(2*t-2,3)+1}function yt(t){return t*t*t}function bt(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.Disconnected=3]="Disconnected",t[t.Disconnecting=4]="Disconnecting",t[t.Connecting=5]="Connecting",t[t.Connected=6]="Connected",t[t.Starting=7]="Starting",t[t.Stopping=8]="Stopping",t[t.Recording=9]="Recording"}(ht||(ht={})),function(t){t.SpeechlyFirstConnect="SpeechlyFirstConnect"}(dt||(dt={})),function(t){t.speechlypoweron="speechlypoweron",t.holdstart="holdstart",t.holdend="holdend",t.speechlystarting="speechlystarting",t.speechstate="speechstate",t.initialized="initialized",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"}(ft||(ft={})),function(t){t.Hold="hold",t.Click="click",t.Noninteractive="noninteractive"}(gt||(gt={})),function(t){t.None="none",t.Connecting="connecting",t.Busy="busy"}(pt||(pt={})),function(t){t.None="none",t.Whirl="whirl"}(mt||(mt={})),ht.Disconnected,ht.Disconnecting,ht.Connecting,ht.Connected,ht.Starting,ht.Recording,ht.Stopping,ht.Failed,ht.NoBrowserSupport,ht.NoAudioConsent;const xt=[];function wt(t){return"[object Date]"===Object.prototype.toString.call(t)}function vt(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)=>vt(t[n],e)));return t=>n.map((e=>e(t)))}if("object"===n){if(!t||!e)throw new Error("Object cannot be null");if(wt(t)&&wt(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]=vt(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 kt(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=!xt.length;for(const t of i)t[1](),xt.push(t,e);if(t){for(let t=0;t<xt.length;t+=2)xt[t][0](xt[t+1]);xt.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=vt}=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 zt(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 _t(t,{delay:e=0,speed:n,duration:o,easing:i=$t}={}){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 Tt=[0,1];function Et(t,e,n,o){if(e<n)return t[0];if(e>o)return t[t.length-1];let i=(o-n)/(t.length-1);if(i<=0)return t[0];let r=(e-n)/i,s=Math.floor(r),c=Math.ceil(r),a=r-s;return(1-a)*t[s]+a*t[c]}function Ct(t){!function(t,e,n){const o=y(t);if(!o.getElementById(e)){const t=v("style");t.id=e,t.textContent=n,b(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=v("canvas"),R(n,"color",e[0]),R(n,"display","block"),R(n,"width","1.35rem"),R(n,"height","1.5rem"),R(n,"margin","0"),R(n,"padding","0 0.8rem 0 0rem"),R(n,"flex-grow","0"),R(n,"flex-shrink","0"),R(n,"flex-basis","1.35rem"),C(n,"class","svelte-1fz8oog")},m(t,o){x(t,n,o),e[3](n)},p(t,[e]){1&e&&R(n,"color",t[0])},i:t,o:t,d(t){t&&w(n),e[3](null)}}}function Pt(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)}},O().$$.on_mount.push(h),t.$$set=t=>{"color"in t&&n(0,o=t.color)},[o,r,i,function(t){H[t?"unshift":"push"]((()=>{r=t,n(1,r)}))}]}class Rt extends class{$destroy(){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(),at(this,t,Pt,St,c,{color:0,updateVU:2},Ct)}get updateVU(){return this.$$.ctx[2]}}const{window:Dt}=it;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=v("div"),C(e,"class","TransscriptItemBgDiv")},m(t,n){x(t,e,n)},d(t){t&&w(e)}}}function At(e){let n,o;return{c(){n=v("div"),n.textContent="Listening...",C(n,"class","listening")},m(t,e){x(t,n,e)},i(t){o||J((()=>{o=ot(n,e[21],{duration:400}),o.start()}))},o:t,d(t){t&&w(n)}}}function It(e){let n,o;return{c(){n=v("div"),C(n,"class","TransscriptItemBgDiv")},m(t,e){x(t,n,e)},p(t,n){e=t},i(t){o||J((()=>{o=ot(n,e[21],{duration:e[14]}),o.start()}))},o:t,d(t){t&&w(n)}}}function Mt(t){let e,n;return{c(){e=v("span"),C(e,"style",n=t[44]<t[11].length-1?"width:0.25em;":t[13]?"width:1.2em;":"")},m(t,n){x(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;":"")&&C(e,"style",n)},d(t){t&&w(e)}}}function Bt(e){let n,o,i,r,s,c,a,l=e[42].word+"",h=e[16]&&It(e),d=e[44]<e[11].length&&Mt(e);return{c(){n=v("div"),h&&h.c(),o=_(),i=v("div"),r=z(l),s=_(),d&&d.c(),C(i,"class","TransscriptItemContent"),C(n,"class",a="TranscriptItem "+e[23](e[42])),D(n,"Entity",null!==e[42].entityType),D(n,"Final",e[42].isFinal)},m(t,e){x(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]&&et(h,1):(h=It(e),h.c(),et(h,1),h.m(n,o)):h&&(h.d(1),h=null),2048&s[0]&&l!==(l=e[42].word+"")&&P(r,l),e[44]<e[11].length?d?d.p(e,s):(d=Mt(e),d.c(),d.m(i,null)):d&&(d.d(1),d=null),2048&s[0]&&a!==(a="TranscriptItem "+e[23](e[42]))&&C(n,"class",a),2048&s[0]&&D(n,"Entity",null!==e[42].entityType),2048&s[0]&&D(n,"Final",e[42].isFinal)},i(t){et(h),c||J((()=>{c=ot(i,e[21],{duration:e[14]}),c.start()}))},o:t,d(t){t&&w(n),h&&h.d(),d&&d.d()}}}function jt(e){let n,o,i,r,s,c,a,l;return{c(){n=v("div"),o=v("div"),i=_(),r=v("div"),s=k("svg"),c=k("path"),C(o,"class","TransscriptItemBgDiv"),R(o,"background-color",e[5]),C(c,"stroke","currentColor"),C(c,"stroke-width","3"),C(c,"d","M7.191 11.444l4.059 6.107 7.376-12.949"),C(c,"fill","none"),C(c,"fill-rule","evenodd"),R(s,"width","2rem"),R(s,"height","2rem"),R(s,"position","absolute"),R(s,"transform","translate(-0.6rem, -0.5rem)"),R(s,"stroke","#eee"),C(s,"viewBox","0 0 24 24"),C(s,"xmlns","http://www.w3.org/2000/svg"),R(r,"width","1.0rem"),R(r,"height","1rem"),R(r,"position","relative"),C(n,"class","TranscriptItem")},m(t,e){x(t,n,e),$(n,o),$(n,i),$(n,r),$(r,s),$(s,c)},p(t,e){32&e[0]&&R(o,"background-color",t[5])},i(t){a||J((()=>{a=ot(c,e[20],{duration:500}),a.start()})),l||J((()=>{l=ot(n,e[21],{duration:200,maxWidth:3}),l.start()}))},o:t,d(t){t&&w(n)}}}function Ot(t){let e;return{c(){e=v("link"),C(e,"href","https://fonts.googleapis.com/css2?family=Saira+Condensed:wght@700&display=swap"),C(e,"rel","stylesheet")},m(t,n){x(t,e,n)},d(t){t&&w(e)}}}function Lt(t){let e;return{c(){e=v("link"),C(e,"href",t[10]),C(e,"rel","stylesheet")},m(t,n){x(t,e,n)},p(t,n){1024&n[0]&&C(e,"href",t[10])},d(t){t&&w(e)}}}function Ht(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 Rt({props:b}),e[34](s);let k=e[17]&&At(e),z=e[11],S=[];for(let t=0;t<z.length;t+=1)S[t]=Bt(Nt(e,z,t));let P=e[13]&&jt(e),N=e[15]&&Ot(),F=void 0!==e[10]&&Lt(e);return{c(){var g;n=v("main"),o=v("div"),y&&y.c(),i=_(),r=v("div"),(g=s.$$.fragment)&&g.c(),c=_(),k&&k.c(),a=_();for(let t=0;t<S.length;t+=1)S[t].c();l=_(),P&&P.c(),h=_(),N&&N.c(),d=T(),u=_(),F&&F.c(),f=T(),this.c=t,C(r,"class","TransscriptItemContent"),C(o,"class","TranscriptItem"),C(n,"class","BigTranscript"),R(n,"--voffset",e[1]),R(n,"--hoffset",e[2]),R(n,"--fontsize",e[3]),R(n,"--color",e[4]),R(n,"--highlight-color",e[5]),R(n,"--text-bg-color",e[6]),R(n,"--gradient-stop1",e[7]),R(n,"--gradient-stop2",e[8]),R(n,"--marginbottom",e[9]),R(n,"--transition",e[18].transition),R(n,"opacity",e[18].transition),R(n,"max-height",10*Et(Tt,e[18].transition,0,.6)+"rem"),R(n,"visibility",0!==e[18].transition?"visible":"hidden"),D(n,"placementTop","top"===e[0]),D(n,"defaultTypography",e[15])},m(t,b){x(t,n,b),$(n,o),y&&y.m(o,null),$(o,i),$(o,r),rt(s,r,null),$(r,c),k&&k.m(r,null),$(n,a);for(let t=0;t<S.length;t+=1)S[t].m(n,null);$(n,l),P&&P.m(n,null),x(t,h,b),N&&N.m(document.head,null),$(document.head,d),x(t,u,b),F&&F.m(t,b),x(t,f,b),g=!0,p||(m=E(Dt,"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]?k?131072&e[0]&&et(k,1):(k=At(t),k.c(),et(k,1),k.m(r,null)):k&&(k.d(1),k=null),8464384&e[0]){let o;for(z=t[11],o=0;o<z.length;o+=1){const i=Nt(t,z,o);S[o]?(S[o].p(i,e),et(S[o],1)):(S[o]=Bt(i),S[o].c(),et(S[o],1),S[o].m(n,l))}for(;o<S.length;o+=1)S[o].d(1);S.length=z.length}t[13]?P?(P.p(t,e),8192&e[0]&&et(P,1)):(P=jt(t),P.c(),et(P,1),P.m(n,null)):P&&(P.d(1),P=null),(!g||2&e[0])&&R(n,"--voffset",t[1]),(!g||4&e[0])&&R(n,"--hoffset",t[2]),(!g||8&e[0])&&R(n,"--fontsize",t[3]),(!g||16&e[0])&&R(n,"--color",t[4]),(!g||32&e[0])&&R(n,"--highlight-color",t[5]),(!g||64&e[0])&&R(n,"--text-bg-color",t[6]),(!g||128&e[0])&&R(n,"--gradient-stop1",t[7]),(!g||256&e[0])&&R(n,"--gradient-stop2",t[8]),(!g||512&e[0])&&R(n,"--marginbottom",t[9]),(!g||262144&e[0])&&R(n,"--transition",t[18].transition),(!g||262144&e[0])&&R(n,"opacity",t[18].transition),(!g||262144&e[0])&&R(n,"max-height",10*Et(Tt,t[18].transition,0,.6)+"rem"),(!g||262144&e[0])&&R(n,"visibility",0!==t[18].transition?"visible":"hidden"),1&e[0]&&D(n,"placementTop","top"===t[0]),32768&e[0]&&D(n,"defaultTypography",t[15]),t[15]?N||(N=Ot(),N.c(),N.m(d.parentNode,d)):N&&(N.d(1),N=null),void 0!==t[10]?F?F.p(t,e):(F=Lt(t),F.c(),F.m(f.parentNode,f)):F&&(F.d(1),F=null)},i(t){if(!g){et(s.$$.fragment,t),et(k);for(let t=0;t<z.length;t+=1)et(S[t]);et(P),g=!0}},o(t){!function(t,e,n,o){if(t&&t.o){if(tt.has(t))return;tt.add(t),(void 0).c.push((()=>{tt.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}(s.$$.fragment,t),g=!1},d(t){t&&w(n),y&&y.d(),e[34](null),st(s),k&&k.d(),function(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}(S,t),P&&P.d(),t&&w(h),N&&N.d(t),w(d),t&&w(u),F&&F.d(t),t&&w(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:_}=e,T=[],E=null,C=null,S=ht.Disconnected,P=!1,R=!1,D=!1,N=kt({transition:0},{duration:200});h(t,N,(t=>n(18,l=t)));const F=O(),A=zt(_t),I=zt(((t,{delay:e=0,duration:n=350,maxWidth:o=10})=>({delay:e,duration:n,css:t=>`\n max-width: ${Et(Tt,t,0,1)*o}rem;\n `}))),M=t=>{n(13,D=D||t)},B=t=>{n(30,S=t),S===ht.Recording&&(n(13,D=!1),n(11,T=[]),C=null)},j=t=>{if(void 0===t)return;d&&(s||S===ht.Recording)&&d.updateVU(.5*Math.random()+.5,75*Math.random()+75),t.isFinal?L(T.length>0?s?3500:2e3:0):T.length>0&&(P||n(31,P=!0),L(2e3));const e=`${t.contextId}/${t.id}`;null!==C?C!==e&&(n(13,D=!1),C=e):C=e,n(11,T=[]),t.words.forEach((t=>{n(11,T[t.index]={word:t.value,serialNumber:t.index,entityType:null,isFinal:t.isFinal,hide:!1},T)})),r?t.entities.forEach((t=>{n(11,T[t.startPosition].word=t.value,T),n(11,T[t.startPosition].entityType=t.type,T),n(11,T[t.startPosition].isFinal=t.isFinal,T),n(11,T[t.startPosition].hide=!1,T);for(let e=t.startPosition+1;e<t.endPosition;e++)T[e]&&n(11,T[e].hide=!0,T)})):t.entities.forEach((t=>{for(let e=t.startPosition;e<t.endPosition;e++)T[e]&&(n(11,T[e].entityType=t.type,T),n(11,T[e].isFinal=t.isFinal,T))})),n(11,T=T.filter((t=>!t.hide)))},L=(t=0)=>{V(),E=window.setTimeout((()=>{E=null,P&&n(31,P=!1)}),t)},V=()=>{null!==E&&(window.clearTimeout(E),E=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.customtypography)},t.$$.update=()=>{if(2048&t.$$.dirty[0]&&n(17,o=0===T.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===_||"false"===_),4&t.$$.dirty[1]&&n(14,a=s?800:350),1073741824&t.$$.dirty[0]|3&t.$$.dirty[1]){const t=S===ht.Recording||P;t!==R&&(e="visibilitychanged",l=t,F.dispatchEvent(new CustomEvent(e,{detail:l,composed:!0}))),n(32,R=t),N.set({transition:R?1:0})}var e,l;4&t.$$.dirty[1]&&(s||L(0))},[u,f,g,p,m,$,y,b,x,w,z,T,d,D,a,c,i,o,l,N,A,I,t=>{switch(t.data.type){case ut.speechsegment:j(t.data.segment);break;case ut.speechhandled:M(t.data.success);break;case ut.speechstate:B(t.data.state)}},t=>t.entityType||"",v,k,_,M,B,j,S,P,R,s,function(t){H[t?"unshift":"push"]((()=>{d=t,n(12,d)}))}]}class Wt extends lt{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>",at(this,{target:this.shadowRoot,props:N(this.attributes),customElement:!0},Vt,Ht,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&&x(t.target,this,t.anchor),t.props&&(this.$set(t.props),Q()))}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}),Q()}get voffset(){return this.$$.ctx[1]}set voffset(t){this.$$set({voffset:t}),Q()}get hoffset(){return this.$$.ctx[2]}set hoffset(t){this.$$set({hoffset:t}),Q()}get fontsize(){return this.$$.ctx[3]}set fontsize(t){this.$$set({fontsize:t}),Q()}get color(){return this.$$.ctx[4]}set color(t){this.$$set({color:t}),Q()}get highlightcolor(){return this.$$.ctx[5]}set highlightcolor(t){this.$$set({highlightcolor:t}),Q()}get backgroundcolor(){return this.$$.ctx[6]}set backgroundcolor(t){this.$$set({backgroundcolor:t}),Q()}get gradientstop1(){return this.$$.ctx[7]}set gradientstop1(t){this.$$set({gradientstop1:t}),Q()}get gradientstop2(){return this.$$.ctx[8]}set gradientstop2(t){this.$$set({gradientstop2:t}),Q()}get marginbottom(){return this.$$.ctx[9]}set marginbottom(t){this.$$set({marginbottom:t}),Q()}get formattext(){return this.$$.ctx[24]}set formattext(t){this.$$set({formattext:t}),Q()}get demomode(){return this.$$.ctx[25]}set demomode(t){this.$$set({demomode:t}),Q()}get customcssurl(){return this.$$.ctx[10]}set customcssurl(t){this.$$set({customcssurl:t}),Q()}get customtypography(){return this.$$.ctx[26]}set customtypography(t){this.$$set({customtypography:t}),Q()}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=v("link"),C(e,"href",t[11]),C(e,"rel","stylesheet")},m(t,n){x(t,e,n)},p(t,n){2048&n[0]&&C(e,"href",t[11])},d(t){t&&w(e)}}}function Ut(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=_(),o=v("main"),i=v("div"),s=v("div"),c=v("big-transcript"),a=_(),l=v("div"),h=z(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]),C(l,"class","hint"),R(l,"opacity",e[18].opacity),D(l,"defaultTypography",e[15]),C(s,"class","pad"),C(i,"class","drawer"),R(i,"background-color",e[6]),R(i,"opacity",e[16].opacity),R(i,"transform","translate(0px, "+e[17].y+"rem)"),C(o,"class","placementTop"),R(o,"--height",e[0]),R(o,"--smalltextcolor",e[4]),R(o,"--hintfontsize",e[2])},m(t,r){f&&f.m(t,r),x(t,n,r),x(t,o,r),$(o,i),$(i,s),$(s,c),e[29](c),$(s,a),$(s,l),$(l,h),d||(u=[E(window,"message",e[23]),E(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]&&P(h,t[13]),262144&e[0]&&R(l,"opacity",t[18].opacity),32768&e[0]&&D(l,"defaultTypography",t[15]),64&e[0]&&R(i,"background-color",t[6]),65536&e[0]&&R(i,"opacity",t[16].opacity),131072&e[0]&&R(i,"transform","translate(0px, "+t[17].y+"rem)"),1&e[0]&&R(o,"--height",t[0]),16&e[0]&&R(o,"--smalltextcolor",t[4]),4&e[0]&&R(o,"--hintfontsize",t[2])},i:t,o:t,d(t){f&&f.d(t),t&&w(n),t&&w(o),e[29](null),d=!1,r(u)}}}function Jt(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=[],_=0,T="";const E=(t,e=!0)=>{R.set({opacity:0}),a&&e&&a.speechsegment(t),t.isFinal&&(_++,_<z.length?o(13,T=z[_]):o(13,T=z[Math.floor(Math.random()*z.length)]))},C=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,T=z[_])};let S=kt({y:-1},{duration:200});h(t,S,(t=>o(17,s=t)));let P=kt({opacity:0},{duration:200,easing:e});h(t,P,(t=>o(16,r=t)));let R=kt({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]&&C(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,T,a,i,r,s,c,S,P,R,t=>{!1===t.detail?(S.set({y:-1},{easing:yt}),P.set({opacity:0}),R.set({opacity:0})):(S.set({y:0},{easing:bt}),P.set({opacity:1}),R.set({opacity:1}))},t=>{switch(t.data.type){case ut.speechsegment:E(t.data.segment,!1);break;case ut.transcriptdrawerhint:C(t.data.hint)}},d,t=>{a&&a.speechhandled(t)},t=>{a&&a.speechstate(t)},E,C,function(t){H[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 Gt extends lt{constructor(t){super(),this.shadowRoot.innerHTML="<style>.placementTop{position:fixed;top:0;left:0;right:0;bottom:0;z-index:60;pointer-events:none}.drawer{width:100%;min-height:var(--height);display:flex;flex-direction:column;justify-content:flex-end;box-shadow:0 0 0.35rem #0004}.pad{position:relative;padding:2rem 2rem 0.65rem 1.5rem}.hint{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>",at(this,{target:this.shadowRoot,props:N(this.attributes),customElement:!0},Jt,Ut,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&&x(t.target,this,t.anchor),t.props&&(this.$set(t.props),Q()))}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}),Q()}get hint(){return this.$$.ctx[24]}set hint(t){this.$$set({hint:t}),Q()}get fontsize(){return this.$$.ctx[1]}set fontsize(t){this.$$set({fontsize:t}),Q()}get hintfontsize(){return this.$$.ctx[2]}set hintfontsize(t){this.$$set({hintfontsize:t}),Q()}get color(){return this.$$.ctx[3]}set color(t){this.$$set({color:t}),Q()}get smalltextcolor(){return this.$$.ctx[4]}set smalltextcolor(t){this.$$set({smalltextcolor:t}),Q()}get highlightcolor(){return this.$$.ctx[5]}set highlightcolor(t){this.$$set({highlightcolor:t}),Q()}get backgroundcolor(){return this.$$.ctx[6]}set backgroundcolor(t){this.$$set({backgroundcolor:t}),Q()}get gradientstop1(){return this.$$.ctx[7]}set gradientstop1(t){this.$$set({gradientstop1:t}),Q()}get gradientstop2(){return this.$$.ctx[8]}set gradientstop2(t){this.$$set({gradientstop2:t}),Q()}get formattext(){return this.$$.ctx[9]}set formattext(t){this.$$set({formattext:t}),Q()}get demomode(){return this.$$.ctx[10]}set demomode(t){this.$$set({demomode:t}),Q()}get customcssurl(){return this.$$.ctx[11]}set customcssurl(t){this.$$set({customcssurl:t}),Q()}get customtypography(){return this.$$.ctx[12]}set customtypography(t){this.$$set({customtypography:t}),Q()}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",Gt)})); | ||
//# sourceMappingURL=transcript-drawer.js.map |
@@ -1,3 +0,3 @@ | ||
import { ClientState } from "@speechly/browser-client"; | ||
export { ClientState } from "@speechly/browser-client"; | ||
import type { Behaviour, Effect, Icon, TriggerFx } from "./constants"; | ||
export type { Segment, Intent, Word, Entity } from "../node_modules/@speechly/browser-client/src/speechly/types"; | ||
export declare type ITaggedWord = { | ||
@@ -14,2 +14,3 @@ word: string; | ||
effect: Effect; | ||
triggerFx?: TriggerFx; | ||
}; | ||
@@ -19,58 +20,2 @@ export declare type IHoldEvent = { | ||
}; | ||
export declare enum SpeechState { | ||
/** | ||
* The context is in a state of unrecoverable error. | ||
* It is only possible to fix this by destroying and creating it from scratch. | ||
*/ | ||
Failed = "Failed", | ||
/** | ||
* Current browser is not supported by Speechly - it's not possible to use speech functionality. | ||
*/ | ||
NoBrowserSupport = "NoBrowserSupport", | ||
/** | ||
* The user did not provide permissions to use the microphone - it is not possible to use speech functionality. | ||
*/ | ||
NoAudioConsent = "NoAudioConsent", | ||
/** | ||
* The context has been created but not initialised. The audio and API connection are not enabled. | ||
*/ | ||
Idle = "Idle", | ||
/** | ||
* The context is connecting to the API. | ||
*/ | ||
Connecting = "Connecting", | ||
/** | ||
* The context is ready to use. | ||
*/ | ||
Ready = "Ready", | ||
/** | ||
* The context is current recording audio and sending it to the API for recognition. | ||
* The results are also being fetched. | ||
*/ | ||
Recording = "Recording", | ||
/** | ||
* The context is waiting for the API to finish sending trailing responses. | ||
* No audio is being sent anymore. | ||
*/ | ||
Loading = "Loading" | ||
} | ||
export declare enum Icon { | ||
Poweron = "poweron", | ||
Mic = "mic", | ||
Error = "error", | ||
Denied = "denied" | ||
} | ||
export declare enum Behaviour { | ||
Hold = "hold", | ||
Click = "click", | ||
Noninteractive = "noninteractive" | ||
} | ||
export declare enum Effect { | ||
None = "none", | ||
Connecting = "connecting", | ||
Busy = "busy" | ||
} | ||
export declare const stateToClientState: (speechState: string) => ClientState; | ||
export declare const clientStateToAppearance: { | ||
[state: string]: IAppearance; | ||
}; | ||
//# sourceMappingURL=types.d.ts.map |
{ | ||
"name": "@speechly/browser-ui", | ||
"version": "5.1.0-beta.6", | ||
"version": "5.1.0", | ||
"scripts": { | ||
"build": "rimraf core && rollup -c --silent", | ||
"build:watch": "rollup -c --silent", | ||
"build": "rimraf core && rollup -c --silent && mv core/types/src/* core && rimraf core/types", | ||
"build:watch": "rollup -c --silent && mv core/types/src/* core", | ||
"dev": "rollup -c -w", | ||
"start": "sirv core --no-clear", | ||
"validate": "svelte-check" | ||
"start": "sirv core --no-clear --host", | ||
"validate": "svelte-check", | ||
"staging": "set -o allexport;. ./.env.local;set +o allexport && test -n \"$REACT_APP__DEPLOY_STAGING_URI\" && pnpm run build && rsync -avz --delete core/ $REACT_APP__DEPLOY_STAGING_URI" | ||
}, | ||
@@ -11,0 +13,0 @@ "devDependencies": { |
@@ -23,3 +23,3 @@ <div align="center" markdown="1"> | ||
Ready made Speechly [UI components](https://docs.speechly.com/client-libraries/ui-components/) to build a reactive voice interface to a web site or app. | ||
Ready made Speechly [UI components](https://docs.speechly.com/client-libraries/ui-components/) to build a reactive voice interface to a web site or app. See these CodePens for a preview: | ||
@@ -31,10 +31,18 @@ - [Speech-to-text CodePen](https://codepen.io/speechly/pen/VwzoMrW) | ||
## Introduction To Components | ||
- [Push-To-Talk Button](https://docs.speechly.com/ui-components/push-to-talk-button/) provides a button to control listening on/off. It comes integrated with [browser-client](https://github.com/speechly/speechly/tree/main/libraries/browser-client). | ||
- [Big Transcript](https://docs.speechly.com/ui-components/big-transcript/) is an overlay-style component that displays real-time speech-to-text transcript and feedback to the user. Recognized entities are highlighted. | ||
- [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. | ||
## Documentation | ||
- [Basic usage documentation](https://docs.speechly.com/client-libraries/usage/) | ||
- [UI component gallery and API](https://docs.speechly.com/client-libraries/ui-components/) | ||
- [UI component gallery and API](https://docs.speechly.com/ui-components/) | ||
- [Basic Speechly usage](https://docs.speechly.com/client-libraries/usage/) | ||
## Browser Usage | ||
Include the Web Components from a CDN that mirrors [`@speechly/browser-ui`](https://www.npmjs.com/package/@speechly/browser-ui) npm package. The script tags register `push-to-talk-button`, `big-transcript` and `error-panel` with the browser's customElement registry so you can use them like regular tags. | ||
Include the Web Components from a CDN that mirrors [`@speechly/browser-ui`](https://www.npmjs.com/package/@speechly/browser-ui) npm package. The script tags register `push-to-talk-button`, `big-transcript` and `intro-popup` with the browser's customElement registry so you can use them like regular tags. | ||
@@ -45,17 +53,22 @@ ``` | ||
<script type="text/javascript" src="https://unpkg.com/@speechly/browser-ui/core/big-transcript.js"></script> | ||
<script type="text/javascript" src="https://unpkg.com/@speechly/browser-ui/core/error-panel.js"></script> | ||
<script type="text/javascript" src="https://unpkg.com/@speechly/browser-ui/core/intro-popup.js"></script> | ||
</head> | ||
<body> | ||
<big-transcript placement="top"></big-transcript> | ||
<push-to-talk-button placement="bottom" appid="YOUR_APP_ID_FROM_SPEECHLY_DASHBOARD"></push-to-talk-button> | ||
<error-panel placement="bottom"></error-panel> | ||
<big-transcript | ||
placement="top"> | ||
</big-transcript> | ||
<push-to-talk-button | ||
placement="bottom" | ||
appid="YOUR_APP_ID_FROM_SPEECHLY_DASHBOARD"> | ||
</push-to-talk-button> | ||
<intro-popup> | ||
<span slot="priming-body">You'll be able to control this web app faster with voice.</span> | ||
</intro-popup> | ||
</body> | ||
``` | ||
> Push-to-talk button component comes with built-in [browser-client](https://github.com/speechly/speechly/tree/main/libraries/browser-client) so you don't need to include it separately. | ||
## Node Usage | ||
> This example illustrates using browser-ui Web Components with a JS framework. For actual React development, you'll probably want to use [react-client](../react-client) and [react-ui](../react-ui) libraries for a better developer experience. | ||
> This example illustrates using browser-ui Web Components with a JS framework. For React development, [react-client](../react-client) and [react-ui](../react-ui) libraries offer a better developer experience. | ||
@@ -70,3 +83,3 @@ ``` | ||
import "@speechly/browser-ui/core/big-transcript"; | ||
import "@speechly/browser-ui/core/error-panel"; | ||
import "@speechly/browser-ui/core/intro-popup"; | ||
@@ -77,3 +90,3 @@ ... | ||
<push-to-talk-button placement="bottom" appid="YOUR_APP_ID_FROM_SPEECHLY_DASHBOARD"></push-to-talk-button> | ||
<error-panel placement="bottom"></error-panel> | ||
<intro-popup></intro-popup> | ||
``` | ||
@@ -106,7 +119,10 @@ | ||
rush update | ||
# Build dependencies | ||
rush build --to-except browser-ui | ||
# Run the library in watch mode. Open http://localhost:5000 to see the testbench page. | ||
# Compile the library, serve the testbench pages and watch changes | ||
rushx dev | ||
``` | ||
Open http://localhost:5000 or http://localhost:5000/extras to see the components on testbench pages. | ||
### Building for production | ||
@@ -113,0 +129,0 @@ |
@@ -1,2 +0,3 @@ | ||
import type { Segment } from "@speechly/browser-client"; | ||
import type { Segment } from "./types"; | ||
import { MessageType } from "./constants"; | ||
@@ -125,3 +126,3 @@ var timeout = undefined; | ||
onSegmentCallback = (segment) => { | ||
window.postMessage({ type: "speechsegment", segment: segment }, "*"); | ||
window.postMessage({ type: MessageType.speechsegment, segment: segment }, "*"); | ||
} | ||
@@ -128,0 +129,0 @@ } |
101
src/types.ts
@@ -1,6 +0,4 @@ | ||
import { ClientState } from "@speechly/browser-client"; | ||
import type { Behaviour, Effect, Icon, TriggerFx } from "./constants" | ||
// Re-exporting 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 } from "@speechly/browser-client"; | ||
export type { Segment, Intent, Word, Entity } from "../node_modules/@speechly/browser-client/src/speechly/types"; | ||
@@ -19,2 +17,3 @@ export type ITaggedWord = { | ||
effect: Effect, | ||
triggerFx?: TriggerFx, | ||
} | ||
@@ -25,95 +24,1 @@ | ||
} | ||
export enum SpeechState { | ||
/** | ||
* The context is in a state of unrecoverable error. | ||
* It is only possible to fix this by destroying and creating it from scratch. | ||
*/ | ||
Failed = "Failed", | ||
/** | ||
* Current browser is not supported by Speechly - it's not possible to use speech functionality. | ||
*/ | ||
NoBrowserSupport = "NoBrowserSupport", | ||
/** | ||
* The user did not provide permissions to use the microphone - it is not possible to use speech functionality. | ||
*/ | ||
NoAudioConsent = "NoAudioConsent", | ||
/** | ||
* The context has been created but not initialised. The audio and API connection are not enabled. | ||
*/ | ||
Idle = "Idle", | ||
/** | ||
* The context is connecting to the API. | ||
*/ | ||
Connecting = "Connecting", | ||
/** | ||
* The context is ready to use. | ||
*/ | ||
Ready = "Ready", | ||
/** | ||
* The context is current recording audio and sending it to the API for recognition. | ||
* The results are also being fetched. | ||
*/ | ||
Recording = "Recording", | ||
/** | ||
* The context is waiting for the API to finish sending trailing responses. | ||
* No audio is being sent anymore. | ||
*/ | ||
Loading = "Loading" | ||
} | ||
export enum Icon { | ||
Poweron = "poweron", | ||
Mic = "mic", | ||
Error = "error", | ||
Denied = "denied", | ||
} | ||
export enum Behaviour { | ||
Hold = "hold", | ||
Click = "click", | ||
Noninteractive = "noninteractive", | ||
} | ||
export enum Effect { | ||
None = "none", | ||
Connecting = "connecting", | ||
Busy = "busy", | ||
} | ||
export const stateToClientState = (speechState: string): ClientState => { | ||
switch (speechState as string) { | ||
case SpeechState.Idle: return ClientState.Disconnected; break; | ||
case SpeechState.Connecting: return ClientState.Connecting; break; | ||
case SpeechState.Ready: return ClientState.Connected; break; | ||
case SpeechState.Recording: return ClientState.Recording; break; | ||
case SpeechState.Loading: return ClientState.Stopping; break; | ||
case SpeechState.Failed: return ClientState.Failed; break; | ||
case SpeechState.NoBrowserSupport: return ClientState.NoBrowserSupport; break; | ||
case SpeechState.NoAudioConsent: return ClientState.NoAudioConsent; break; | ||
default: return speechState as undefined as ClientState; break; | ||
} | ||
} | ||
export const clientStateToAppearance: {[state: string]: IAppearance} = { | ||
[ClientState.Disconnected]: { icon: Icon.Poweron, behaviour: Behaviour.Click, effect: Effect.None}, | ||
[ClientState.Disconnecting]: { icon: Icon.Poweron, behaviour: Behaviour.Noninteractive, effect: Effect.Connecting}, | ||
[ClientState.Connecting]: { icon: Icon.Poweron, behaviour: Behaviour.Noninteractive, effect: Effect.Connecting}, | ||
[ClientState.Connected]: { icon: Icon.Mic, behaviour: Behaviour.Hold, effect: Effect.None}, | ||
[ClientState.Starting]: { icon: Icon.Mic, behaviour: Behaviour.Hold, effect: Effect.Connecting}, | ||
[ClientState.Recording]: { icon: Icon.Mic, 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}, | ||
/* | ||
[SpeechState.Idle]: { icon: Icon.Poweron, behaviour: Behaviour.Click, effect: Effect.None}, | ||
[SpeechState.Connecting]: { icon: Icon.Poweron, behaviour: Behaviour.Noninteractive, effect: Effect.Connecting}, | ||
[SpeechState.Ready]: { icon: Icon.Mic, behaviour: Behaviour.Hold, effect: Effect.None}, | ||
[SpeechState.Recording]: { icon: Icon.Mic, behaviour: Behaviour.Hold, effect: Effect.None}, | ||
[SpeechState.Loading]: { icon: Icon.Mic, behaviour: Behaviour.Noninteractive, effect: Effect.Busy}, | ||
[SpeechState.Failed]: { icon: Icon.Error, behaviour: Behaviour.Click, effect: Effect.None}, | ||
[SpeechState.NoBrowserSupport]: { icon: Icon.Error, behaviour: Behaviour.Click, effect: Effect.None}, | ||
[SpeechState.NoAudioConsent]: { icon: Icon.Denied, behaviour: Behaviour.Click, effect: Effect.None}, | ||
*/ | ||
} |
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 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
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
87
1
140
1475340
1772
2