(window.webpackJsonp=window.webpackJsonp||[]).push([[9],{316:function(e,t,o){"undefined"!=typeofself&&self,e.exports=function(e){vart={};functiono(i){if(t[i])returnt[i].exports;varn=t[i]={i:i,l:!1,exports:{}};returne[i].call(n.exports,n,n.exports,o),n.l=!0,n.exports}returno.m=e,o.c=t,o.d=function(e,t,i){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},o.r=function(e){"undefined"!=typeofSymbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)returne;if(4&t&&"object"==typeofe&&e&&e.__esModule)returne;vari=Object.create(null);if(o.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeofe)for(varnine)o.d(i,n,function(t){returne[t]}.bind(null,n));returni},o.n=function(e){vart=e&&e.__esModule?function(){returne.default}:function(){returne};returno.d(t,"a",t),t},o.o=function(e,t){returnObject.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=0)}([function(e,t,o){"use strict";(function(t){varo=t.AudioContext||t.webkitAudioContext,i=function(e){if(!i.isRecordingSupported())thrownewError("Recording is not supported in this browser");e||(e={}),this.state="inactive",this.config=Object.assign({bufferLength:4096,encoderApplication:2049,encoderFrameSize:20,encoderPath:"encoderWorker.min.js",encoderSampleRate:48e3,maxFramesPerPage:40,mediaTrackConstraints:!0,monitorGain:0,numberOfChannels:1,recordingGain:1,resampleQuality:3,streamPages:!1,reuseWorker:!1,wavBitDepth:16},e),this.encodedSamplePosition=0};i.isRecordingSupported=function(){returno&&t.navigator&&t.navigator.mediaDevices&&t.navigator.mediaDevices.getUserMedia&&t.WebAssembly},i.prototype.clearStream=function(){this.stream&&(this.stream.getTracks?this.stream.getTracks().forEach((function(e){e.stop()})):this.stream.stop(),deletethis.stream),this.audioContext&&this.closeAudioContext&&(this.audioContext.close(),deletethis.audioContext)},i.prototype.encodeBuffers=function(e){if("recording"===this.state){for(vart=[],o=0;o<e.numberOfChannels;o++)t[o]=e.getChannelData(o);this.encoder.postMessage({command:"encode",buffers:t})}},i.prototype.initAudioContext=function(e){returne&&e.context?(this.audioContext=e.context,this.closeAudioContext=!1):(this.audioContext=newo,this.closeAudioContext=!0),this.audioContext},i.prototype.initAudioGraph=function(){this.encodeBuffers=function(){deletethis.encodeBuffers},this.scriptProcessorNode=this.audioContext.createScriptProcessor(this.config.bufferLength,this.config.numberOfChannels,this.config.numberOfChannels),this.scriptProcessorNode.connect(this.audioContext.destination),this.scriptProcessorNode.onaudioprocess=e=>{this.encodeBuffers(e.inputBuffer)},this.monitorGainNode=this.audioContext.createGain(),this.setMonitorGain(this.config.monitorGain),this.monitorGainNode.connect(this.audioContext.destination),this.recordingGainNode=this.audioContext.createGain(),this.setRecordingGain(this.config.recordingGain),this.recordingGainNode.connect(this.scriptProcessorNode)},i.prototype.initSourceNode=function(e){returne&&e.context?t.Promise.resolve(e):t.navigator.mediaDevices.getUserMedia({audio:this.config.mediaTrackConstraints}).then(e=>(this.stream=e,this.audioContext.createMediaStreamSource(e)))},i.prototype.loadWorker=function(){this.encoder||(this.encoder=newt.Worker(this.config.encoderPath))},i.prototype.initWorker=function(){vare=(this.config.streamPages?this.streamPage:this.storePage).bind(this);returnthis.recordedPages=[],this.totalLength=0,this.loadWorker(),newPromise((t,o)=>{vari=o=>{switch(o.data.message){case"ready":t();break;case"page":this.encodedSamplePosition=o.data.samplePosition,e(o.data.page);break;case"done":this.encoder.removeEventListener("message",i),this.finish()}};this.encoder.addEventListener("message",i),this.encoder.postMessage(Object.assign({command:"init",originalSampleRate:this.audioContext.sampleRate,wavSampleRate:this.audioContext.sampleRate},this.config))})},i.prototype.pause=function(e){if("recording"===this.state){if(this.sta