1"use strict";(self.webpackChunkStammer_ai=self.webpackChunkStammer_ai||[]).push([[2618],{32618:function(t,n,l){l.r(n);var e=l(30036),a=function(){return a=Object.assign||function(t){for(var n,l=1,e=arguments.length;l<e;l++)for(var a in n=arguments[l])Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a]);return t},a.apply(this,arguments)},i=function(t,n,l,e){return new(l||(l=Promise))((function(a,i){function c(t){try{r(e.next(t))}catch(t){i(t)}}function o(t){try{r(e.throw(t))}catch(t){i(t)}}function r(t){var n;t.done?a(t.value):(n=t.value,n instanceof l?n:new l((function(t){t(n)}))).then(c,o)}r((e=e.apply(t,n||[])).next())}))},c=function(t,n){var l,e,a,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return c.next=o(0),c.throw=o(1),c.return=o(2),"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function o(o){return function(r){return function(o){if(l)throw new TypeError("Generator is already executing.");for(;c&&(c=0,o[0]&&(i=0)),i;)try{if(l=1,e&&(a=2&o[0]?e.return:o[0]?e.throw||((a=e.return)&&a.call(e),0):e.next)&&!(a=a.call(e,o[1])).done)return a;switch(e=0,a&&(o=[2&o[0],a.value]),o[0]){case 0:case 1:a=o;break;case 4:return i.label++,{value:o[1],done:!1};case 5:i.label++,e=o[1],o=[0];continue;case 7:o=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==o[0]&&2!==o[0])){i=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]<a[3])){i.label=o[1];break}if(6===o[0]&&i.label<a[1]){i.label=a[1],a=o;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(o);break}a[2]&&i.ops.pop(),i.trys.pop();continue}o=n.call(t,i)}catch(t){o=[6,t],e=0}finally{l=a=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,r])}}},o=function(){function t(t,n){var l,a,i,c;void 0===n&&(n={}),this.accessToken=t,this.callData=null!==(l=n.callData)&&void 0!==l?l:null,this.callbacks=null!==(a=n.callbacks)&&void 0!==a?a:{},this.client=new e.MH,this.startOptions={sampleRate:null!==(i=n.sampleRate)&&void 0!==i?i:24e3,captureDeviceId:null!==(c=n.captureDeviceId)&&void 0!==c?c:"default",playbackDeviceId:n.playbackDeviceId,emitRawAudioSamples:n.emitRawAudioSamples}}return t.getInstance=function(n,l){var a,i,c,o;return void 0!==n?(null===t.instance?t.instance=new t(n,null!=l?l:{}):(t.instance.accessToken=n,t.instance.callData=null!==(a=null==l?void 0:l.callData)&&void 0!==a?a:null,t.instance.callbacks=null!==(i=null==l?void 0:l.callbacks)&&void 0!==i?i:{},t.instance.client=new e.MH,t.instance.startOptions={sampleRate:null!==(c=null==l?void 0:l.sampleRate)&&void 0!==c?c:24e3,captureDeviceId:null!==(o=null==l?void 0:l.captureDeviceId)&&void 0!==o?o:"default",playbackDeviceId:null==l?void 0:l.playbackDeviceId,emitRawAudioSamples:null==l?void 0:l.emitRawAudioSamples}),t.instance):t.instance},t.prototype.registerListeners=function(){var t=this;this.client.on("call_started",(function(){var n,l;null===(l=(n=t.callbacks).onCallStarted)||void 0===l||l.call(n)})),this.client.on("call_ended",(function(){var n,l;null===(l=(n=t.callbacks).onCallEnded)||void 0===l||l.call(n)})),this.client.on("agent_start_talking",(function(){var n,l;null===(l=(n=t.callbacks).onAgentStartTalking)||void 0===l||l.call(n)})),this.client.on("agent_stop_talking",(function(){var n,l;null===(l=(n=t.callbacks).onAgentStopTalking)||void 0===l||l.call(n)})),this.client.on("update",(function(n){var l,e;null===(e=(l=t.callbacks).onUpdate)||void 0===e||e.call(l,n)})),this.client.on("metadata",(function(n){var l,e;null===(e=(l=t.callbacks).onMetadata)||void 0===e||e.call(l,n)})),this.client.on("error",(function(n){var l,e;null===(e=(l=t.callbacks).onError)||void 0===e||e.call(l,n),t.client.stopCall()}))},t.prototype.makeCall=function(){return i(this,void 0,Promise,(function(){var t,n,l,e,i,o;return c(this,(function(c){switch(c.label){case 0:return c.trys.push([0,2,,3]),this.registerListeners(),[4,this.client.startCall(a({accessToken:this.accessToken,transport:null===(n=this.callData)||void 0===n?void 0:n.transport,callId:null===(l=this.callData)||void 0===l?void 0:l.callId,iceServers:null===(e=this.callData)||void 0===e?void 0:e.iceServers},this.startOptions))];case 1:return c.sent(),[3,3];case 2:return t=c.sent(),console.error(t),null===(o=(i=this.callbacks).onError)||void 0===o||o.call(i,t),[3,3];case 3:return[2]}}
1))}))},t.prototype.stopCall=function(){this.client.stopCall()},t.prototype.getCallData=function(){return this.callData},t.instance=null,t}();n.default=o}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.