@speechly/browser-ui
Advanced tools
Comparing version 4.0.1 to 4.0.2
@@ -1,2 +0,2 @@ | ||
## 4.0.1 | ||
## 4.0.2 | ||
@@ -3,0 +3,0 @@ - Fixed error-panel default placement and CSS |
@@ -1,2 +0,2 @@ | ||
!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}let c=!1;const s=new Set;function l(e,t){c&&s.delete(t),t.parentNode!==e&&e.appendChild(t)}function a(e,t,n){c&&s.delete(t),(t.parentNode!==e||n&&t.nextSibling!==n)&&e.insertBefore(t,n||null)}function d(e){c?s.add(e):e.parentNode&&e.parentNode.removeChild(e)}function u(e){return document.createElement(e)}function p(e){return document.createTextNode(e)}function f(){return p(" ")}function h(e,t,n,o){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o)}function m(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function g(e,t,n){e.classList[n?"add":"remove"](t)}function C(e){const t={};for(const n of e)t[n.name]=n.value;return t}let w;function b(e){w=e}const $=[],N=[],S=[],x=[],y=Promise.resolve();let v=!1;function k(e){S.push(e)}let _=!1;const E=new Set;function R(){if(!_){_=!0;do{for(let e=0;e<$.length;e+=1){const t=$[e];b(t),T(t.$$)}for(b(null),$.length=0;N.length;)N.pop()();for(let e=0;e<S.length;e+=1){const t=S[e];E.has(t)||(E.add(t),t())}S.length=0}while($.length);for(;x.length;)x.pop()();v=!1,_=!1,E.clear()}}function T(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 M=new Set;const A="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function B(e,t){-1===e.$$.dirty[0]&&($.push(e),v||(v=!0,y.then(R)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function H(i,l,a,u,p,f,h=[-1]){const m=w;b(i);const g=i.$$={fragment:null,ctx:null,props:f,update:e,not_equal:p,bound:n(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(m?m.$$.context:l.context||[]),callbacks:n(),dirty:h,skip_bound:!1};let C=!1;if(g.ctx=a?a(i,l.props||{},((e,t,...n)=>{const o=n.length?n[0]:t;return g.ctx&&p(g.ctx[e],g.ctx[e]=o)&&(!g.skip_bound&&g.bound[e]&&g.bound[e](o),C&&B(i,e)),t})):[],g.update(),C=!0,o(g.before_update),g.fragment=!!u&&u(g.ctx),l.target){if(l.hydrate){c=!0;const e=function(e){return Array.from(e.childNodes)}(l.target);g.fragment&&g.fragment.l(e),e.forEach(d)}else g.fragment&&g.fragment.c();l.intro&&(($=i.$$.fragment)&&$.i&&(M.delete($),$.i(N))),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,l.target,l.anchor,l.customElement),function(){c=!1;for(const e of s)e.parentNode.removeChild(e);s.clear()}(),R()}var $,N;b(m)}let L;"function"==typeof HTMLElement&&(L=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)}});var D,P,q,F,z,j=(function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),(n=t.ClientState||(t.ClientState={}))[n.Failed=0]="Failed",n[n.NoBrowserSupport=1]="NoBrowserSupport",n[n.NoAudioConsent=2]="NoAudioConsent",n[n.Disconnected=3]="Disconnected",n[n.Disconnecting=4]="Disconnecting",n[n.Connecting=5]="Connecting",n[n.Connected=6]="Connected",n[n.Starting=7]="Starting",n[n.Stopping=8]="Stopping",n[n.Recording=9]="Recording"}(D={exports:{}},D.exports),D.exports);!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"}(P||(P={})),function(e){e.Poweron="poweron",e.Mic="mic",e.Error="error",e.Denied="denied"}(q||(q={})),function(e){e.Hold="hold",e.Click="click",e.Noninteractive="noninteractive"}(F||(F={})),function(e){e.None="none",e.Connecting="connecting",e.Busy="busy"}(z||(z={})),j.ClientState.Disconnected,q.Poweron,F.Click,z.None,j.ClientState.Disconnecting,q.Poweron,F.Noninteractive,z.Connecting,j.ClientState.Connecting,q.Poweron,F.Noninteractive,z.Connecting,j.ClientState.Connected,q.Mic,F.Hold,z.None,j.ClientState.Starting,q.Mic,F.Hold,z.Connecting,j.ClientState.Recording,q.Mic,F.Hold,z.None,j.ClientState.Stopping,q.Mic,F.Noninteractive,z.Busy,j.ClientState.Failed,q.Error,F.Click,z.None,j.ClientState.NoBrowserSupport,q.Error,F.Click,z.None,j.ClientState.NoAudioConsent,q.Denied,F.Click,z.None,P.Idle,q.Poweron,F.Click,z.None,P.Connecting,q.Poweron,F.Noninteractive,z.Connecting,P.Ready,q.Mic,F.Hold,z.None,P.Recording,q.Mic,F.Hold,z.None,P.Loading,q.Mic,F.Noninteractive,z.Busy,P.Failed,q.Error,F.Click,z.None,P.NoBrowserSupport,q.Error,F.Click,z.None,P.NoAudioConsent,q.Denied,F.Click,z.None;const{window:O}=A;function I(e){let t,n,o,r,i,c,s,p=e[1]===j.ClientState.NoAudioConsent&&U(),m=e[1]===j.ClientState.NoBrowserSupport&&G(),g=e[1]===Q&&J();return{c(){t=u("errorDiv"),n=u("errorLeft"),n.textContent="×",o=f(),p&&p.c(),r=f(),m&&m.c(),i=f(),g&&g.c()},m(d,u){a(d,t,u),l(t,n),l(t,o),p&&p.m(t,null),l(t,r),m&&m.m(t,null),l(t,i),g&&g.m(t,null),c||(s=h(n,"click",e[3]),c=!0)},p(e,n){e[1]===j.ClientState.NoAudioConsent?p?p.p(e,n):(p=U(),p.c(),p.m(t,r)):p&&(p.d(1),p=null),e[1]===j.ClientState.NoBrowserSupport?m||(m=G(),m.c(),m.m(t,i)):m&&(m.d(1),m=null),e[1]===Q?g?g.p(e,n):(g=J(),g.c(),g.m(t,null)):g&&(g.d(1),g=null)},d(e){e&&d(t),p&&p.d(),m&&m.d(),g&&g.d(),c=!1,s()}}}function U(t){let n,o,r,i,c,s,h,g,C,w;return{c(){n=u("errorRight"),o=u("h1"),o.textContent="No Mic Permission",r=f(),i=u("p"),i.textContent="To use the voice interface, please allow your web browser access the\n microphone and reload.",c=f(),s=u("p"),h=u("a"),h.textContent="Troubleshooting",g=p("\n \n "),C=u("a"),w=p("Reload"),m(h,"href","https://docs.speechly.com/faq/#error-no-audio-consent"),m(C,"href",window.location.href)},m(e,t){a(e,n,t),l(n,o),l(n,r),l(n,i),l(n,c),l(n,s),l(s,h),l(s,g),l(s,C),l(C,w)},p:e,d(e){e&&d(n)}}}function G(e){let t;return{c(){t=u("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/faq/#error-no-browser-support">Troubleshooting</a></p>'},m(e,n){a(e,t,n)},d(e){e&&d(t)}}}function J(t){let n,o,r,i,c,s,h,g,C,w;return{c(){n=u("errorRight"),o=u("h1"),o.textContent="HTTPS Required",r=f(),i=u("p"),i.textContent="To use the voice interface, please visit this site using the secure\n https:// protocol.",c=f(),s=u("p"),h=u("a"),h.textContent="Troubleshooting",g=p("\n \n "),C=u("a"),w=p("Try with HTTPS"),m(h,"href","https://docs.speechly.com/faq/#error-https-required"),m(C,"href",window.location.href.replace(/^http(?!s)/,"https"))},m(e,t){a(e,n,t),l(n,o),l(n,r),l(n,i),l(n,c),l(n,s),l(s,h),l(s,g),l(s,C),l(C,w)},p:e,d(e){e&&d(n)}}}function K(t){let n,o,r,i,c,s=t[1]&&I(t);return{c(){n=u("link"),o=f(),r=u("main"),s&&s.c(),this.c=e,m(n,"href","https://fonts.googleapis.com/css2?family=Saira+Condensed:wght@700&display=swap"),m(n,"rel","stylesheet"),g(r,"bottom","bottom"===t[0])},m(e,d){l(document.head,n),a(e,o,d),a(e,r,d),s&&s.m(r,null),i||(c=h(O,"message",t[2]),i=!0)},p(e,[t]){e[1]?s?s.p(e,t):(s=I(e),s.c(),s.m(r,null)):s&&(s.d(1),s=null),1&t&&g(r,"bottom","bottom"===e[0])},i:e,o:e,d(e){d(n),e&&d(o),e&&d(r),s&&s.d(),i=!1,c()}}}const Q="HttpsRequired";function V(e,t,n){let{placement:o="bottom"}=t;let r=null;const i=e=>{var t,o;switch(e){case j.ClientState.NoAudioConsent:case j.ClientState.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(1,r=Q);break}n(1,r=e)}};return e.$$set=e=>{"placement"in e&&n(0,o=e.placement)},[o,r,e=>{switch(e.data.type){case"holdstart":i(e.data.state)}},()=>{n(1,r=null)}]}class W extends L{constructor(e){super(),this.shadowRoot.innerHTML="<style>main.bottom{position:fixed;bottom:0;min-height:10em;width:100%;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>",H(this,{target:this.shadowRoot,props:C(this.attributes),customElement:!0},V,K,i,{placement:0}),e&&(e.target&&a(e.target,this,e.anchor),e.props&&(this.$set(e.props),R()))}static get observedAttributes(){return["placement"]}get placement(){return this.$$.ctx[0]}set placement(e){this.$set({placement:e}),R()}}customElements.get("error-panel")?console.warn("Skipping re-defining customElement error-panel"):customElements.define("error-panel",W)}(); | ||
!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}let c=!1;const s=new Set;function l(e,t){c&&s.delete(t),t.parentNode!==e&&e.appendChild(t)}function a(e,t,n){c&&s.delete(t),(t.parentNode!==e||n&&t.nextSibling!==n)&&e.insertBefore(t,n||null)}function d(e){c?s.add(e):e.parentNode&&e.parentNode.removeChild(e)}function u(e){return document.createElement(e)}function p(e){return document.createTextNode(e)}function f(){return p(" ")}function h(e,t,n,o){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o)}function m(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function g(e,t,n){e.classList[n?"add":"remove"](t)}function C(e){const t={};for(const n of e)t[n.name]=n.value;return t}let w;function b(e){w=e}const $=[],N=[],S=[],x=[],y=Promise.resolve();let v=!1;function k(e){S.push(e)}let _=!1;const E=new Set;function R(){if(!_){_=!0;do{for(let e=0;e<$.length;e+=1){const t=$[e];b(t),T(t.$$)}for(b(null),$.length=0;N.length;)N.pop()();for(let e=0;e<S.length;e+=1){const t=S[e];E.has(t)||(E.add(t),t())}S.length=0}while($.length);for(;x.length;)x.pop()();v=!1,_=!1,E.clear()}}function T(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 M=new Set;const A="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function B(e,t){-1===e.$$.dirty[0]&&($.push(e),v||(v=!0,y.then(R)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function H(i,l,a,u,p,f,h=[-1]){const m=w;b(i);const g=i.$$={fragment:null,ctx:null,props:f,update:e,not_equal:p,bound:n(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(m?m.$$.context:l.context||[]),callbacks:n(),dirty:h,skip_bound:!1};let C=!1;if(g.ctx=a?a(i,l.props||{},((e,t,...n)=>{const o=n.length?n[0]:t;return g.ctx&&p(g.ctx[e],g.ctx[e]=o)&&(!g.skip_bound&&g.bound[e]&&g.bound[e](o),C&&B(i,e)),t})):[],g.update(),C=!0,o(g.before_update),g.fragment=!!u&&u(g.ctx),l.target){if(l.hydrate){c=!0;const e=function(e){return Array.from(e.childNodes)}(l.target);g.fragment&&g.fragment.l(e),e.forEach(d)}else g.fragment&&g.fragment.c();l.intro&&(($=i.$$.fragment)&&$.i&&(M.delete($),$.i(N))),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,l.target,l.anchor,l.customElement),function(){c=!1;for(const e of s)e.parentNode.removeChild(e);s.clear()}(),R()}var $,N;b(m)}let L;"function"==typeof HTMLElement&&(L=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)}});var D,P,q,F,z,j=(function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),(n=t.ClientState||(t.ClientState={}))[n.Failed=0]="Failed",n[n.NoBrowserSupport=1]="NoBrowserSupport",n[n.NoAudioConsent=2]="NoAudioConsent",n[n.Disconnected=3]="Disconnected",n[n.Disconnecting=4]="Disconnecting",n[n.Connecting=5]="Connecting",n[n.Connected=6]="Connected",n[n.Starting=7]="Starting",n[n.Stopping=8]="Stopping",n[n.Recording=9]="Recording"}(D={exports:{}},D.exports),D.exports);!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"}(P||(P={})),function(e){e.Poweron="poweron",e.Mic="mic",e.Error="error",e.Denied="denied"}(q||(q={})),function(e){e.Hold="hold",e.Click="click",e.Noninteractive="noninteractive"}(F||(F={})),function(e){e.None="none",e.Connecting="connecting",e.Busy="busy"}(z||(z={})),j.ClientState.Disconnected,q.Poweron,F.Click,z.None,j.ClientState.Disconnecting,q.Poweron,F.Noninteractive,z.Connecting,j.ClientState.Connecting,q.Poweron,F.Noninteractive,z.Connecting,j.ClientState.Connected,q.Mic,F.Hold,z.None,j.ClientState.Starting,q.Mic,F.Hold,z.Connecting,j.ClientState.Recording,q.Mic,F.Hold,z.None,j.ClientState.Stopping,q.Mic,F.Noninteractive,z.Busy,j.ClientState.Failed,q.Error,F.Click,z.None,j.ClientState.NoBrowserSupport,q.Error,F.Click,z.None,j.ClientState.NoAudioConsent,q.Denied,F.Click,z.None,P.Idle,q.Poweron,F.Click,z.None,P.Connecting,q.Poweron,F.Noninteractive,z.Connecting,P.Ready,q.Mic,F.Hold,z.None,P.Recording,q.Mic,F.Hold,z.None,P.Loading,q.Mic,F.Noninteractive,z.Busy,P.Failed,q.Error,F.Click,z.None,P.NoBrowserSupport,q.Error,F.Click,z.None,P.NoAudioConsent,q.Denied,F.Click,z.None;const{window:O}=A;function I(e){let t,n,o,r,i,c,s,p=e[1]===j.ClientState.NoAudioConsent&&U(),m=e[1]===j.ClientState.NoBrowserSupport&&G(),g=e[1]===Q&&J();return{c(){t=u("errorDiv"),n=u("errorLeft"),n.textContent="×",o=f(),p&&p.c(),r=f(),m&&m.c(),i=f(),g&&g.c()},m(d,u){a(d,t,u),l(t,n),l(t,o),p&&p.m(t,null),l(t,r),m&&m.m(t,null),l(t,i),g&&g.m(t,null),c||(s=h(n,"click",e[3]),c=!0)},p(e,n){e[1]===j.ClientState.NoAudioConsent?p?p.p(e,n):(p=U(),p.c(),p.m(t,r)):p&&(p.d(1),p=null),e[1]===j.ClientState.NoBrowserSupport?m||(m=G(),m.c(),m.m(t,i)):m&&(m.d(1),m=null),e[1]===Q?g?g.p(e,n):(g=J(),g.c(),g.m(t,null)):g&&(g.d(1),g=null)},d(e){e&&d(t),p&&p.d(),m&&m.d(),g&&g.d(),c=!1,s()}}}function U(t){let n,o,r,i,c,s,h,g,C,w;return{c(){n=u("errorRight"),o=u("h1"),o.textContent="No Mic Permission",r=f(),i=u("p"),i.textContent="To use the voice interface, please allow your web browser access the\n microphone and reload.",c=f(),s=u("p"),h=u("a"),h.textContent="Troubleshooting",g=p("\n \n "),C=u("a"),w=p("Reload"),m(h,"href","https://docs.speechly.com/faq/#error-no-audio-consent"),m(C,"href",window.location.href)},m(e,t){a(e,n,t),l(n,o),l(n,r),l(n,i),l(n,c),l(n,s),l(s,h),l(s,g),l(s,C),l(C,w)},p:e,d(e){e&&d(n)}}}function G(e){let t;return{c(){t=u("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){a(e,t,n)},d(e){e&&d(t)}}}function J(t){let n,o,r,i,c,s,h,g,C,w;return{c(){n=u("errorRight"),o=u("h1"),o.textContent="HTTPS Required",r=f(),i=u("p"),i.textContent="To use the voice interface, please visit this site using the secure\n https:// protocol.",c=f(),s=u("p"),h=u("a"),h.textContent="Troubleshooting",g=p("\n \n "),C=u("a"),w=p("Try with HTTPS"),m(h,"href","https://docs.speechly.com/faq/#error-https-required"),m(C,"href",window.location.href.replace(/^http(?!s)/,"https"))},m(e,t){a(e,n,t),l(n,o),l(n,r),l(n,i),l(n,c),l(n,s),l(s,h),l(s,g),l(s,C),l(C,w)},p:e,d(e){e&&d(n)}}}function K(t){let n,o,r,i,c,s=t[1]&&I(t);return{c(){n=u("link"),o=f(),r=u("main"),s&&s.c(),this.c=e,m(n,"href","https://fonts.googleapis.com/css2?family=Saira+Condensed:wght@700&display=swap"),m(n,"rel","stylesheet"),g(r,"bottom","bottom"===t[0])},m(e,d){l(document.head,n),a(e,o,d),a(e,r,d),s&&s.m(r,null),i||(c=h(O,"message",t[2]),i=!0)},p(e,[t]){e[1]?s?s.p(e,t):(s=I(e),s.c(),s.m(r,null)):s&&(s.d(1),s=null),1&t&&g(r,"bottom","bottom"===e[0])},i:e,o:e,d(e){d(n),e&&d(o),e&&d(r),s&&s.d(),i=!1,c()}}}const Q="HttpsRequired";function V(e,t,n){let{placement:o=null}=t;let r=null;const i=e=>{var t,o;switch(e){case j.ClientState.NoAudioConsent:case j.ClientState.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(1,r=Q);break}n(1,r=e)}};return e.$$set=e=>{"placement"in e&&n(0,o=e.placement)},[o,r,e=>{switch(e.data.type){case"holdstart":i(e.data.state)}},()=>{n(1,r=null)}]}class W extends L{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>",H(this,{target:this.shadowRoot,props:C(this.attributes),customElement:!0},V,K,i,{placement:0}),e&&(e.target&&a(e.target,this,e.anchor),e.props&&(this.$set(e.props),R()))}static get observedAttributes(){return["placement"]}get placement(){return this.$$.ctx[0]}set placement(e){this.$set({placement:e}),R()}}customElements.get("error-panel")?console.warn("Skipping re-defining customElement error-panel"):customElements.define("error-panel",W)}(); | ||
//# sourceMappingURL=error-panel.js.map |
{ | ||
"name": "@speechly/browser-ui", | ||
"version": "4.0.1", | ||
"version": "4.0.2", | ||
"files": [ | ||
@@ -5,0 +5,0 @@ "**/*" |
Sorry, the diff of this file is not supported yet
1191034