-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path8561e33.js
2 lines (2 loc) · 174 KB
/
8561e33.js
1
2
/*! For license information please see LICENSES */
(window.webpackJsonp=window.webpackJsonp||[]).push([[26],{298:function(e,t){function n(e){return new Int16Array(e)}function r(e){return new Int32Array(e)}function _(e){return new Float32Array(e)}var o={fill:function(a,e,t,n){if(2==arguments.length)for(var i=0;i<a.length;i++)a[i]=arguments[1];else for(i=e;i<t;i++)a[i]=n}},l={arraycopy:function(e,t,n,r,_){for(var o=t+_;t<o;)n[r++]=e[t++]},out:{}};l.out.println=function(e){console.log(e)},l.out.printf=function(){console.log.apply(console,arguments)};var f={};function c(e){this.ordinal=e}f.SQRT2=1.4142135623730951,f.FAST_LOG10=function(e){return Math.log10(e)},f.FAST_LOG10_X=function(e,t){return Math.log10(e)*t},c.short_block_allowed=new c(0),c.short_block_coupled=new c(1),c.short_block_dispensed=new c(2),c.short_block_forced=new c(3);var h={};function m(e){this.ordinal=e}h.MAX_VALUE=34028235e31,m.vbr_off=new m(0),m.vbr_mt=new m(1),m.vbr_rh=new m(2),m.vbr_abr=new m(3),m.vbr_mtrh=new m(4),m.vbr_default=m.vbr_mtrh;e.exports={System:l,VbrMode:m,Float:h,ShortBlock:c,Util:f,Arrays:o,new_array_n:function e(t){if(1==t.length)return new Array(t[0]);var n=t[0];t=t.slice(1);for(var r=[],i=0;i<n;i++)r.push(e(t));return r},new_byte:function(e){return new Int8Array(e)},new_double:function(e){return new Float64Array(e)},new_float:_,new_float_n:function e(t){if(1==t.length)return _(t[0]);var n=t[0];t=t.slice(1);for(var r=[],i=0;i<n;i++)r.push(e(t));return r},new_int:r,new_int_n:function e(t){if(1==t.length)return r(t[0]);var n=t[0];t=t.slice(1);for(var _=[],i=0;i<n;i++)_.push(e(t));return _},new_short:n,new_short_n:function e(t){if(1==t.length)return n(t[0]);var r=t[0];t=t.slice(1);for(var _=[],i=0;i<r;i++)_.push(e(t));return _},assert:function(e){}}},299:function(e,t,n){var r=n(298),_=r.System,o=r.VbrMode,l=(r.Float,r.ShortBlock,r.Util,r.Arrays,r.new_array_n),f=(r.new_byte,r.new_double,r.new_float),c=r.new_float_n,h=r.new_int,m=(r.new_int_n,r.assert);function d(){var e=n(394),t=n(395),r=n(308),v=d.FFTOFFSET,S=d.MPG_MD_MS_LR,w=null;this.psy=null;var A=null,M=null,R=null;this.setModules=function(e,t,n,r){w=e,this.psy=t,A=t,M=r,R=n};var y=new e;this.lame_encode_mp3_frame=function(e,n,B,E,T,x){var k,P=l([2,2]);P[0][0]=new t,P[0][1]=new t,P[1][0]=new t,P[1][1]=new t;var I,V=l([2,2]);V[0][0]=new t,V[0][1]=new t,V[1][0]=new t,V[1][1]=new t;var O,H,L,N=[null,null],D=e.internal_flags,X=c([2,4]),F=[.5,.5],C=[[0,0],[0,0]],Y=[[0,0],[0,0]];if(N[0]=n,N[1]=B,0==D.lame_encode_frame_init&&function(e,t){var n,r,_=e.internal_flags;if(0==_.lame_encode_frame_init){var i,o,l=f(2014),c=f(2014);for(_.lame_encode_frame_init=1,i=0,o=0;i<286+576*(1+_.mode_gr);++i)i<576*_.mode_gr?(l[i]=0,2==_.channels_out&&(c[i]=0)):(l[i]=t[0][o],2==_.channels_out&&(c[i]=t[1][o]),++o);for(r=0;r<_.mode_gr;r++)for(n=0;n<_.channels_out;n++)_.l3_side.tt[r][n].block_type=d.SHORT_TYPE;y.mdct_sub48(_,l,c),m(576>=d.FFTOFFSET),m(_.mf_size>=d.BLKSIZE+e.framesize-d.FFTOFFSET),m(_.mf_size>=512+e.framesize-32)}}(e,N),D.padding=0,(D.slot_lag-=D.frac_SpF)<0&&(D.slot_lag+=e.out_samplerate,D.padding=1),0!=D.psymodel){var j=[null,null],U=0,z=h(2);for(L=0;L<D.mode_gr;L++){for(H=0;H<D.channels_out;H++)j[H]=N[H],U=576+576*L-d.FFTOFFSET;if(0!=(e.VBR==o.vbr_mtrh||e.VBR==o.vbr_mt?A.L3psycho_anal_vbr(e,j,U,L,P,V,C[L],Y[L],X[L],z):A.L3psycho_anal_ns(e,j,U,L,P,V,C[L],Y[L],X[L],z)))return-4;for(e.mode==r.JOINT_STEREO&&(F[L]=X[L][2]+X[L][3],F[L]>0&&(F[L]=X[L][3]/F[L])),H=0;H<D.channels_out;H++){var G=D.l3_side.tt[L][H];G.block_type=z[H],G.mixed_block_flag=0}}}else for(L=0;L<D.mode_gr;L++)for(H=0;H<D.channels_out;H++)D.l3_side.tt[L][H].block_type=d.NORM_TYPE,D.l3_side.tt[L][H].mixed_block_flag=0,Y[L][H]=C[L][H]=700;if(function(e){var t,n;if(0!=e.ATH.useAdjust)if(n=e.loudness_sq[0][0],t=e.loudness_sq[1][0],2==e.channels_out?(n+=e.loudness_sq[0][1],t+=e.loudness_sq[1][1]):(n+=n,t+=t),2==e.mode_gr&&(n=Math.max(n,t)),n*=.5,(n*=e.ATH.aaSensitivityP)>.03125)e.ATH.adjust>=1?e.ATH.adjust=1:e.ATH.adjust<e.ATH.adjustLimit&&(e.ATH.adjust=e.ATH.adjustLimit),e.ATH.adjustLimit=1;else{var r=31.98*n+625e-6;e.ATH.adjust>=r?(e.ATH.adjust*=.075*r+.925,e.ATH.adjust<r&&(e.ATH.adjust=r)):e.ATH.adjustLimit>=r?e.ATH.adjust=r:e.ATH.adjust<e.ATH.adjustLimit&&(e.ATH.adjust=e.ATH.adjustLimit),e.ATH.adjustLimit=r}else e.ATH.adjust=1}(D),y.mdct_sub48(D,N[0],N[1]),D.mode_ext=d.MPG_MD_LR_LR,e.force_ms)D.mode_ext=d.MPG_MD_MS_LR;else if(e.mode==r.JOINT_STEREO){var K=0,Z=0;for(L=0;L<D.mode_gr;L++)for(H=0;H<D.channels_out;H++)K+=Y[L][H],Z+=C[L][H];if(K<=1*Z){var W=D.l3_side.tt[0],Q=D.l3_side.tt[D.mode_gr-1];W[0].block_type==W[1].block_type&&Q[0].block_type==Q[1].block_type&&(D.mode_ext=d.MPG_MD_MS_LR)}}if(D.mode_ext==S?(I=V,O=Y):(I=P,O=C),e.analysis&&null!=D.pinfo)for(L=0;L<D.mode_gr;L++)for(H=0;H<D.channels_out;H++)D.pinfo.ms_ratio[L]=D.ms_ratio[L],D.pinfo.ms_ener_ratio[L]=F[L],D.pinfo.blocktype[L][H]=D.l3_side.tt[L][H].block_type,D.pinfo.pe[L][H]=O[L][H],_.arraycopy(D.l3_side.tt[L][H].xr,0,D.pinfo.xr[L][H],0,576),D.mode_ext==S&&(D.pinfo.ers[L][H]=D.pinfo.ers[L][H+2],_.arraycopy(D.pinfo.energy[L][H+2],0,D.pinfo.energy[L][H],0,D.pinfo.energy[L][H].length));if(e.VBR==o.vbr_off||e.VBR==o.vbr_abr){var i,J;for(i=0;i<18;i++)D.nsPsy.pefirbuf[i]=D.nsPsy.pefirbuf[i+1];for(J=0,L=0;L<D.mode_gr;L++)for(H=0;H<D.channels_out;H++)J+=O[L][H];for(D.nsPsy.pefirbuf[18]=J,J=D.nsPsy.pefirbuf[9],i=0;i<9;i++)J+=(D.nsPsy.pefirbuf[i]+D.nsPsy.pefirbuf[18-i])*d.fircoef[i];for(J=3350*D.mode_gr*D.channels_out/J,L=0;L<D.mode_gr;L++)for(H=0;H<D.channels_out;H++)O[L][H]*=J}if(D.iteration_loop.iteration_loop(e,O,F,I),w.format_bitstream(e),k=w.copy_buffer(D,E,T,x,1),e.bWriteVbrTag&&M.addVbrFrame(e),e.analysis&&null!=D.pinfo){for(H=0;H<D.channels_out;H++){var $;for($=0;$<v;$++)D.pinfo.pcmdata[H][$]=D.pinfo.pcmdata[H][$+e.framesize];for($=v;$<1600;$++)D.pinfo.pcmdata[H][$]=N[H][$-v]}R.set_frame_pinfo(e,I)}return function(e){var t,n;for(m(0<=e.bitrate_index&&e.bitrate_index<16),m(0<=e.mode_ext&&e.mode_ext<4),e.bitrate_stereoMode_Hist[e.bitrate_index][4]++,e.bitrate_stereoMode_Hist[15][4]++,2==e.channels_out&&(e.bitrate_stereoMode_Hist[e.bitrate_index][e.mode_ext]++,e.bitrate_stereoMode_Hist[15][e.mode_ext]++),t=0;t<e.mode_gr;++t)for(n=0;n<e.channels_out;++n){var r=0|e.l3_side.tt[t][n].block_type;0!=e.l3_side.tt[t][n].mixed_block_flag&&(r=4),e.bitrate_blockType_Hist[e.bitrate_index][r]++,e.bitrate_blockType_Hist[e.bitrate_index][5]++,e.bitrate_blockType_Hist[15][r]++,e.bitrate_blockType_Hist[15][5]++}}(D),k}}d.ENCDELAY=576,d.POSTDELAY=1152,d.MDCTDELAY=48,d.FFTOFFSET=224+d.MDCTDELAY,d.DECDELAY=528,d.SBLIMIT=32,d.CBANDS=64,d.SBPSY_l=21,d.SBPSY_s=12,d.SBMAX_l=22,d.SBMAX_s=13,d.PSFB21=6,d.PSFB12=6,d.BLKSIZE=1024,d.HBLKSIZE=d.BLKSIZE/2+1,d.BLKSIZE_s=256,d.HBLKSIZE_s=d.BLKSIZE_s/2+1,d.NORM_TYPE=0,d.START_TYPE=1,d.SHORT_TYPE=2,d.STOP_TYPE=3,d.MPG_MD_LR_LR=0,d.MPG_MD_LR_I=1,d.MPG_MD_MS_LR=2,d.MPG_MD_MS_I=3,d.fircoef=[-.1039435,-.1892065,5*-.0432472,-.155915,3898045e-23,.0467745*5,.50455,.756825,.187098*5],e.exports=d},308:function(e,t){function n(e){var t=e;this.ordinal=function(){return t}}n.STEREO=new n(0),n.JOINT_STEREO=new n(1),n.DUAL_CHANNEL=new n(2),n.MONO=new n(3),n.NOT_SET=new n(4),e.exports=n},312:function(e,t,n){var r=n(298),_=(r.System,r.VbrMode,r.Float,r.ShortBlock,r.Util,r.Arrays,r.new_array_n,r.new_byte),o=r.new_double,l=r.new_float,f=r.new_float_n,c=r.new_int,h=r.new_int_n,m=(r.assert,n(397)),d=n(336),v=n(398),S=n(399),w=n(335),A=n(299),M=n(313);function R(){function e(){this.write_timing=0,this.ptr=0,this.buf=_(40)}this.Class_ID=0,this.lame_encode_frame_init=0,this.iteration_init_init=0,this.fill_buffer_resample_init=0,this.mfbuf=f([2,R.MFSIZE]),this.mode_gr=0,this.channels_in=0,this.channels_out=0,this.resample_ratio=0,this.mf_samples_to_encode=0,this.mf_size=0,this.VBR_min_bitrate=0,this.VBR_max_bitrate=0,this.bitrate_index=0,this.samplerate_index=0,this.mode_ext=0,this.lowpass1=0,this.lowpass2=0,this.highpass1=0,this.highpass2=0,this.noise_shaping=0,this.noise_shaping_amp=0,this.substep_shaping=0,this.psymodel=0,this.noise_shaping_stop=0,this.subblock_gain=0,this.use_best_huffman=0,this.full_outer_loop=0,this.l3_side=new m,this.ms_ratio=l(2),this.padding=0,this.frac_SpF=0,this.slot_lag=0,this.tag_spec=null,this.nMusicCRC=0,this.OldValue=c(2),this.CurrentStep=c(2),this.masking_lower=0,this.bv_scf=c(576),this.pseudohalf=c(M.SFBMAX),this.sfb21_extra=!1,this.inbuf_old=new Array(2),this.blackfilt=new Array(2*R.BPC+1),this.itime=o(2),this.sideinfo_len=0,this.sb_sample=f([2,2,18,A.SBLIMIT]),this.amp_filter=l(32),this.header=new Array(R.MAX_HEADER_BUF),this.h_ptr=0,this.w_ptr=0,this.ancillary_flag=0,this.ResvSize=0,this.ResvMax=0,this.scalefac_band=new d,this.minval_l=l(A.CBANDS),this.minval_s=l(A.CBANDS),this.nb_1=f([4,A.CBANDS]),this.nb_2=f([4,A.CBANDS]),this.nb_s1=f([4,A.CBANDS]),this.nb_s2=f([4,A.CBANDS]),this.s3_ss=null,this.s3_ll=null,this.decay=0,this.thm=new Array(4),this.en=new Array(4),this.tot_ener=l(4),this.loudness_sq=f([2,2]),this.loudness_sq_save=l(2),this.mld_l=l(A.SBMAX_l),this.mld_s=l(A.SBMAX_s),this.bm_l=c(A.SBMAX_l),this.bo_l=c(A.SBMAX_l),this.bm_s=c(A.SBMAX_s),this.bo_s=c(A.SBMAX_s),this.npart_l=0,this.npart_s=0,this.s3ind=h([A.CBANDS,2]),this.s3ind_s=h([A.CBANDS,2]),this.numlines_s=c(A.CBANDS),this.numlines_l=c(A.CBANDS),this.rnumlines_l=l(A.CBANDS),this.mld_cb_l=l(A.CBANDS),this.mld_cb_s=l(A.CBANDS),this.numlines_s_num1=0,this.numlines_l_num1=0,this.pe=l(4),this.ms_ratio_s_old=0,this.ms_ratio_l_old=0,this.ms_ener_ratio_old=0,this.blocktype_old=c(2),this.nsPsy=new v,this.VBR_seek_table=new S,this.ATH=null,this.PSY=null,this.nogap_total=0,this.nogap_current=0,this.decode_on_the_fly=!0,this.findReplayGain=!0,this.findPeakSample=!0,this.PeakSample=0,this.RadioGain=0,this.AudiophileGain=0,this.rgdata=null,this.noclipGainChange=0,this.noclipScale=0,this.bitrate_stereoMode_Hist=h([16,5]),this.bitrate_blockType_Hist=h([16,6]),this.pinfo=null,this.hip=null,this.in_buffer_nsamples=0,this.in_buffer_0=null,this.in_buffer_1=null,this.iteration_loop=null;for(var i=0;i<this.en.length;i++)this.en[i]=new w;for(i=0;i<this.thm.length;i++)this.thm[i]=new w;for(i=0;i<this.header.length;i++)this.header[i]=new e}R.MFSIZE=3456+A.ENCDELAY-A.MDCTDELAY,R.MAX_HEADER_BUF=256,R.MAX_BITS_PER_CHANNEL=4095,R.MAX_BITS_PER_GRANULE=7680,R.BPC=320,e.exports=R},313:function(e,t,n){var r=n(299),_={};_.SFBMAX=3*r.SBMAX_s,e.exports=_},317:function(e,t,n){e.exports=n(318)},318:function(e,t,n){e.exports=function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t,n){"use strict";function i(e,t,n){for(var i=0;i<n.length;i++)e.setUint8(t+i,n.charCodeAt(i))}Object.defineProperty(t,"__esModule",{value:!0}),t.compress=function(e,t,n){for(var i=t/n,r=Math.max(i,1),_=e.left,a=e.right,s=Math.floor((_.length+a.length)/i),u=new Float32Array(s),o=0,l=0;o<s;){var f=Math.floor(l);u[o]=_[f],o++,a.length&&(u[o]=a[f],o++),l+=r}return u},t.encodePCM=function(e,t,n){void 0===n&&(n=!0);var i=0,r=e.length*(t/8),_=new ArrayBuffer(r),a=new DataView(_);if(8===t)for(var s=0;s<e.length;s++,i++){var u=(o=Math.max(-1,Math.min(1,e[s])))<0?128*o:127*o;u=+u+128,a.setInt8(i,u)}else for(s=0;s<e.length;s++,i+=2){var o=Math.max(-1,Math.min(1,e[s]));a.setInt16(i,o<0?32768*o:32767*o,n)}return a},t.encodeWAV=function(e,t,n,r,_,a){void 0===a&&(a=!0);var s=n>t?t:n,u=_,o=new ArrayBuffer(44+e.byteLength),l=new DataView(o),f=r,p=0;i(l,p,"RIFF"),p+=4,l.setUint32(p,36+e.byteLength,a),i(l,p+=4,"WAVE"),i(l,p+=4,"fmt "),p+=4,l.setUint32(p,16,a),p+=4,l.setUint16(p,1,a),p+=2,l.setUint16(p,f,a),p+=2,l.setUint32(p,s,a),p+=4,l.setUint32(p,f*s*(u/8),a),p+=4,l.setUint16(p,f*(u/8),a),p+=2,l.setUint16(p,u,a),i(l,p+=2,"data"),p+=4,l.setUint32(p,e.byteLength,a),p+=4;for(var c=0;c<e.byteLength;)l.setUint8(p,e.getUint8(c)),p++,c++;return l}},function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var _=n(2),a=n(0),s=n(3),u=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.isrecording=!1,n.ispause=!1,n.isplaying=!1,n}return r(t,e),t.prototype.setOption=function(e){void 0===e&&(e={}),this.setNewOption(e)},t.prototype.start=function(){return this.isrecording?Promise.reject():(this.isrecording=!0,this.startRecord())},t.prototype.pause=function(){this.isrecording&&!this.ispause&&(this.ispause=!0,this.pauseRecord())},t.prototype.resume=function(){this.isrecording&&this.ispause&&(this.ispause=!1,this.resumeRecord())},t.prototype.stop=function(){this.isrecording&&(this.isrecording=!1,this.ispause=!1,this.stopRecord())},t.prototype.play=function(){this.stop(),this.isplaying=!0,this.onplay&&this.onplay(),s.default.addPlayEnd(this.onplayend);var e=this.getWAV();e.byteLength>44&&s.default.play(e.buffer)},t.prototype.getPlayTime=function(){return s.default.getPlayTime()},t.prototype.pausePlay=function(){!this.isrecording&&this.isplaying&&(this.isplaying=!1,this.onpauseplay&&this.onpauseplay(),s.default.pausePlay())},t.prototype.resumePlay=function(){this.isrecording||this.isplaying||(this.isplaying=!0,this.onresumeplay&&this.onresumeplay(),s.default.resumePlay())},t.prototype.stopPlay=function(){this.isrecording||(this.isplaying=!1,this.onstopplay&&this.onstopplay(),s.default.stopPlay())},t.prototype.destroy=function(){return s.default.destroyPlay(),this.destroyRecord()},t.prototype.getRecordAnalyseData=function(){return this.getAnalyseData()},t.prototype.getPlayAnalyseData=function(){return s.default.getAnalyseData()},t.prototype.getPCM=function(){this.stop();var e=this.getData();return e=a.compress(e,this.inputSampleRate,this.outputSampleRate),a.encodePCM(e,this.oututSampleBits,this.littleEdian)},t.prototype.getPCMBlob=function(){return new Blob([this.getPCM()])},t.prototype.downloadPCM=function(e){void 0===e&&(e="recorder");var t=this.getPCMBlob();_.downloadPCM(t,e)},t.prototype.getWAV=function(){var e=this.getPCM();return a.encodeWAV(e,this.inputSampleRate,this.outputSampleRate,this.config.numChannels,this.oututSampleBits,this.littleEdian)},t.prototype.getWAVBlob=function(){return new Blob([this.getWAV()],{type:"audio/wav"})},t.prototype.downloadWAV=function(e){void 0===e&&(e="recorder");var t=this.getWAVBlob();_.downloadWAV(t,e)},t.prototype.download=function(e,t,n){_.download(e,t,n)},t.prototype.getChannelData=function(){var e=this.getPCM(),t=e.byteLength,n=this.littleEdian,i={left:null,right:null};if(2===this.config.numChannels){var r=new DataView(new ArrayBuffer(t/2)),_=new DataView(new ArrayBuffer(t/2));if(16===this.config.sampleBits)for(var a=0;a<t/2;a+=2)r.setInt16(a,e.getInt16(2*a,n),n),_.setInt16(a,e.getInt16(2*a+2,n),n);else for(a=0;a<t/2;a+=2)r.setInt8(a,e.getInt8(2*a)),_.setInt8(a,e.getInt8(2*a+1));i.left=r,i.right=_}else i.left=e;return i},t}(n(5).default);t.default=u},function(e,t,n){"use strict";function i(e,t,n){var i=document.createElement("a");i.href=window.URL.createObjectURL(e),i.download=t+"."+n,i.click()}Object.defineProperty(t,"__esModule",{value:!0}),t.downloadWAV=function(e,t){void 0===t&&(t="recorder"),i(e,t,"wav")},t.downloadPCM=function(e,t){void 0===t&&(t="recorder"),i(e,t,"pcm")},t.download=function(e,t,n){return i(e,t,n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(4),r=null,_=0,a=0,s=null,u=null,o=null,l=!1,f=0,p=function(){};function c(){return l=!1,s.decodeAudioData(o.slice(0),(function(e){(r=s.createBufferSource()).onended=function(){l||(f=s.currentTime-a+_,p())},r.buffer=e,r.connect(u),u.connect(s.destination),r.start(0,_),a=s.currentTime}),(function(e){i.throwError(e)}))}function h(){r&&(r.stop(),r=null)}var m=function(){function e(){}return e.play=function(e){return s||(s=new(window.AudioContext||window.webkitAudioContext),(u=s.createAnalyser()).fftSize=2048),this.stopPlay(),o=e,f=0,c()},e.pausePlay=function(){h(),_+=s.currentTime-a,l=!0},e.resumePlay=function(){return c()},e.stopPlay=function(){_=0,o=null,h()},e.destroyPlay=function(){this.stopPlay()},e.getAnalyseData=function(){var e=new Uint8Array(u.frequencyBinCount);return u.getByteTimeDomainData(e),e},e.addPlayEnd=function(e){void 0===e&&(e=function(){}),p=e},e.getPlayTime=function(){var e=l?_:s.currentTime-a+_;return f||e},e}();t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throwError=function(e){throw new Error(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),r=function(){function e(t){void 0===t&&(t={}),this.size=0,this.lBuffer=[],this.rBuffer=[],this.tempPCM=[],this.inputSampleBits=16,this.fileSize=0,this.duration=0,this.needRecord=!0;var n,i=new(window.AudioContext||window.webkitAudioContext);this.inputSampleRate=i.sampleRate,this.setNewOption(t),this.littleEdian=(n=new ArrayBuffer(2),new DataView(n).setInt16(0,256,!0),256===new Int16Array(n)[0]),e.initUserMedia()}return e.prototype.setNewOption=function(e){void 0===e&&(e={}),this.config={sampleBits:~[8,16].indexOf(e.sampleBits)?e.sampleBits:16,sampleRate:~[8e3,11025,16e3,22050,24e3,44100,48e3].indexOf(e.sampleRate)?e.sampleRate:this.inputSampleRate,numChannels:~[1,2].indexOf(e.numChannels)?e.numChannels:1},this.outputSampleRate=this.config.sampleRate,this.oututSampleBits=this.config.sampleBits},e.prototype.startRecord=function(){var e=this;return this.context&&this.destroyRecord(),this.initRecorder(),navigator.mediaDevices.getUserMedia({audio:!0}).then((function(t){e.audioInput=e.context.createMediaStreamSource(t),e.stream=t})).then((function(){e.audioInput.connect(e.analyser),e.analyser.connect(e.recorder),e.recorder.connect(e.context.destination)}))},e.prototype.pauseRecord=function(){this.needRecord=!1},e.prototype.resumeRecord=function(){this.needRecord=!0},e.prototype.stopRecord=function(){this.audioInput&&this.audioInput.disconnect(),this.source&&this.source.stop(),this.recorder.disconnect(),this.analyser.disconnect(),this.needRecord=!0},e.prototype.destroyRecord=function(){return this.clearRecordStatus(),this.stopStream(),this.closeAudioContext()},e.prototype.getAnalyseData=function(){var e=new Uint8Array(this.analyser.frequencyBinCount);return this.analyser.getByteTimeDomainData(e),e},e.prototype.getData=function(){return this.flat()},e.prototype.clearRecordStatus=function(){this.lBuffer.length=0,this.rBuffer.length=0,this.size=0,this.fileSize=0,this.PCM=null,this.audioInput=null,this.duration=0},e.prototype.flat=function(){var e=null,t=new Float32Array(0);1===this.config.numChannels?e=new Float32Array(this.size):(e=new Float32Array(this.size/2),t=new Float32Array(this.size/2));for(var n=0,i=0;i<this.lBuffer.length;i++)e.set(this.lBuffer[i],n),n+=this.lBuffer[i].length;for(n=0,i=0;i<this.rBuffer.length;i++)t.set(this.rBuffer[i],n),n+=this.rBuffer[i].length;return{left:e,right:t}},e.prototype.initRecorder=function(){var e=this;this.clearRecordStatus(),this.context=new(window.AudioContext||window.webkitAudioContext),this.analyser=this.context.createAnalyser(),this.analyser.fftSize=2048;var t=this.context.createScriptProcessor||this.context.createJavaScriptNode;this.recorder=t.apply(this.context,[4096,this.config.numChannels,this.config.numChannels]),this.recorder.onaudioprocess=function(t){if(e.needRecord){var n,i=t.inputBuffer.getChannelData(0),r=null;e.lBuffer.push(new Float32Array(i)),e.size+=i.length,2===e.config.numChannels&&(r=t.inputBuffer.getChannelData(1),e.rBuffer.push(new Float32Array(r)),e.size+=r.length),e.fileSize=Math.floor(e.size/Math.max(e.inputSampleRate/e.outputSampleRate,1))*(e.oututSampleBits/8),n=100*Math.max.apply(Math,i),e.duration+=4096/e.inputSampleRate,e.onprocess&&e.onprocess(e.duration),e.onprogress&&e.onprogress({duration:e.duration,fileSize:e.fileSize,vol:n})}}},e.prototype.stopStream=function(){this.stream&&this.stream.getTracks&&(this.stream.getTracks().forEach((function(e){return e.stop()})),this.stream=null)},e.prototype.closeAudioContext=function(){return this.context&&this.context.close&&"closed"!==this.context.state?this.context.close():new Promise((function(e){e()}))},e.initUserMedia=function(){void 0===navigator.mediaDevices&&(navigator.mediaDevices={}),void 0===navigator.mediaDevices.getUserMedia&&(navigator.mediaDevices.getUserMedia=function(e){var t=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia;return t?new Promise((function(n,i){t.call(navigator,e,n,i)})):Promise.reject(new Error("浏览器不支持 getUserMedia !"))})},e.prototype.transformIntoPCM=function(e,t){var n=new Float32Array(e),r=new Float32Array(t),_=i.compress({left:n,right:r},this.inputSampleRate,this.outputSampleRate);return i.encodePCM(_,this.oututSampleBits,this.littleEdian)},e.getPermission=function(){return this.initUserMedia(),navigator.mediaDevices.getUserMedia({audio:!0}).then((function(e){e&&e.getTracks().forEach((function(e){return e.stop()}))}))},e}();t.default=r}]).default},322:function(e,t,n){var r=n(298),_=r.System,o=r.VbrMode,l=(r.Float,r.ShortBlock),f=(r.Util,r.Arrays,r.new_array_n,r.new_byte,r.new_double,r.new_float),c=(r.new_float_n,r.new_int,r.new_int_n),h=r.new_short_n,m=r.assert,d=n(392),v=n(396),S=n(312),w=n(400),A=n(401),M=n(402),R=n(324),y=n(325),B=n(299);e.exports=function e(){var t,r,p,E,T,x=n(308),k=this;e.V9=410,e.V8=420,e.V7=430,e.V6=440,e.V5=450,e.V4=460,e.V3=470,e.V2=480,e.V1=490,e.V0=500,e.R3MIX=1e3,e.STANDARD=1001,e.EXTREME=1002,e.INSANE=1003,e.STANDARD_FAST=1004,e.EXTREME_FAST=1005,e.MEDIUM=1006,e.MEDIUM_FAST=1007,e.LAME_MAXMP3BUFFER=147456;var P,I,V,O=new d;function H(){this.mask_adjust=0,this.mask_adjust_short=0,this.bo_l_weight=f(B.SBMAX_l),this.bo_s_weight=f(B.SBMAX_s)}function L(){this.lowerlimit=0}function N(e,t){this.lowpass=t}this.enc=new B,this.setModules=function(e,n,_,o,l,f,c,h,m){t=e,r=n,p=_,E=o,T=l,P=f,c,I=h,V=m,this.enc.setModules(r,O,E,P)};var D=4294479419;function X(e){return e>1?0:e<=0?1:Math.cos(Math.PI/2*e)}function F(e,t){switch(e){case 44100:return t.version=1,0;case 48e3:return t.version=1,1;case 32e3:return t.version=1,2;case 22050:case 11025:return t.version=0,0;case 24e3:case 12e3:return t.version=0,1;case 16e3:case 8e3:return t.version=0,2;default:return t.version=0,-1}}function C(e,t,n){n<16e3&&(t=2);for(var r=y.bitrate_table[t][1],i=2;i<=14;i++)y.bitrate_table[t][i]>0&&Math.abs(y.bitrate_table[t][i]-e)<Math.abs(r-e)&&(r=y.bitrate_table[t][i]);return r}function Y(e,t,n){n<16e3&&(t=2);for(var i=0;i<=14;i++)if(y.bitrate_table[t][i]>0&&y.bitrate_table[t][i]==e)return i;return-1}function j(e,t){var n=[new N(8,2e3),new N(16,3700),new N(24,3900),new N(32,5500),new N(40,7e3),new N(48,7500),new N(56,1e4),new N(64,11e3),new N(80,13500),new N(96,15100),new N(112,15600),new N(128,17e3),new N(160,17500),new N(192,18600),new N(224,19400),new N(256,19700),new N(320,20500)],r=k.nearestBitrateFullIndex(t);e.lowerlimit=n[r].lowpass}function U(e){var t=B.BLKSIZE+e.framesize-B.FFTOFFSET;return t=Math.max(t,512+e.framesize-32),m(S.MFSIZE>=t),t}function z(e,t,n,r,_,o){var l=k.enc.lame_encode_mp3_frame(e,t,n,r,_,o);return e.frameNum++,l}function G(){this.n_in=0,this.n_out=0}function K(){this.num_used=0}function Z(i,e){return 0!=e?Z(e,i%e):i}function W(e,t,n){var r=Math.PI*t;(e/=n)<0&&(e=0),e>1&&(e=1);var _=e-.5,o=.42-.5*Math.cos(2*e*Math.PI)+.08*Math.cos(4*e*Math.PI);return Math.abs(_)<1e-9?r/Math.PI:o*Math.sin(n*r*_)/(Math.PI*n*_)}function Q(e,t,n,r,_,o,l,c,h){var i,d,v=e.internal_flags,w=0,A=e.out_samplerate/Z(e.out_samplerate,e.in_samplerate);A>S.BPC&&(A=S.BPC);var M=Math.abs(v.resample_ratio-Math.floor(.5+v.resample_ratio))<1e-4?1:0,R=1/v.resample_ratio;R>1&&(R=1);var y=31;0==y%2&&--y;var B=(y+=M)+1;if(0==v.fill_buffer_resample_init){for(v.inbuf_old[0]=f(B),v.inbuf_old[1]=f(B),i=0;i<=2*A;++i)v.blackfilt[i]=f(B);for(v.itime[0]=0,v.itime[1]=0,w=0;w<=2*A;w++){var E=0,T=(w-A)/(2*A);for(i=0;i<=y;i++)E+=v.blackfilt[w][i]=W(i-T,R,y);for(i=0;i<=y;i++)v.blackfilt[w][i]/=E}v.fill_buffer_resample_init=1}var x=v.inbuf_old[h];for(d=0;d<r;d++){var k,P;if(k=d*v.resample_ratio,y+(w=0|Math.floor(k-v.itime[h]))-y/2>=l)break;T=k-v.itime[h]-(w+y%2*.5);m(Math.abs(T)<=.501),P=0|Math.floor(2*T*A+A+.5);var I=0;for(i=0;i<=y;++i){var V=0|i+w-y/2;m(V<l),m(V+B>=0),I+=(V<0?x[B+V]:_[o+V])*v.blackfilt[P][i]}t[n+d]=I}if(c.num_used=Math.min(l,y+w-y/2),v.itime[h]+=c.num_used-d*v.resample_ratio,c.num_used>=B)for(i=0;i<B;i++)x[i]=_[o+c.num_used+i-B];else{var O=B-c.num_used;for(i=0;i<O;++i)x[i]=x[i+c.num_used];for(w=0;i<B;++i,++w)x[i]=_[o+w];m(w==c.num_used)}return d}function J(e,t,n,r,_,o){var l=e.internal_flags;if(l.resample_ratio<.9999||l.resample_ratio>1.0001)for(var f=0;f<l.channels_out;f++){var c=new K;o.n_out=Q(e,t[f],l.mf_size,e.framesize,n[f],r,_,c,f),o.n_in=c.num_used}else{o.n_out=Math.min(e.framesize,_),o.n_in=o.n_out;for(var i=0;i<o.n_out;++i)t[0][l.mf_size+i]=n[0][r+i],2==l.channels_out&&(t[1][l.mf_size+i]=n[1][r+i])}}this.lame_init=function(){var e=new v,t=function(e){var t;return e.class_id=D,t=e.internal_flags=new S,e.mode=x.NOT_SET,e.original=1,e.in_samplerate=44100,e.num_channels=2,e.num_samples=-1,e.bWriteVbrTag=!0,e.quality=-1,e.short_blocks=null,t.subblock_gain=-1,e.lowpassfreq=0,e.highpassfreq=0,e.lowpasswidth=-1,e.highpasswidth=-1,e.VBR=o.vbr_off,e.VBR_q=4,e.ATHcurve=-1,e.VBR_mean_bitrate_kbps=128,e.VBR_min_bitrate_kbps=0,e.VBR_max_bitrate_kbps=0,e.VBR_hard_min=0,t.VBR_min_bitrate=1,t.VBR_max_bitrate=13,e.quant_comp=-1,e.quant_comp_short=-1,e.msfix=-1,t.resample_ratio=1,t.OldValue[0]=180,t.OldValue[1]=180,t.CurrentStep[0]=4,t.CurrentStep[1]=4,t.masking_lower=1,t.nsPsy.attackthre=-1,t.nsPsy.attackthre_s=-1,e.scale=-1,e.athaa_type=-1,e.ATHtype=-1,e.athaa_loudapprox=-1,e.athaa_sensitivity=0,e.useTemporal=null,e.interChRatio=-1,t.mf_samples_to_encode=B.ENCDELAY+B.POSTDELAY,e.encoder_padding=0,t.mf_size=B.ENCDELAY-B.MDCTDELAY,e.findReplayGain=!1,e.decode_on_the_fly=!1,t.decode_on_the_fly=!1,t.findReplayGain=!1,t.findPeakSample=!1,t.RadioGain=0,t.AudiophileGain=0,t.noclipGainChange=0,t.noclipScale=-1,e.preset=0,e.write_id3tag_automatic=!0,0}(e);return 0!=t?null:(e.lame_allocated_gfp=1,e)},this.nearestBitrateFullIndex=function(e){var t=[8,16,24,32,40,48,56,64,80,96,112,128,160,192,224,256,320],n=0,r=0,_=0,o=0;o=t[16],_=16,r=t[16],n=16;for(var b=0;b<16;b++)if(Math.max(e,t[b+1])!=e){o=t[b+1],_=b+1,r=t[b],n=b;break}return o-e>e-r?n:_},this.lame_init_params=function(e){var n,f,h,v=e.internal_flags;if(v.Class_ID=0,null==v.ATH&&(v.ATH=new w),null==v.PSY&&(v.PSY=new H),null==v.rgdata&&(v.rgdata=new A),v.channels_in=e.num_channels,1==v.channels_in&&(e.mode=x.MONO),v.channels_out=e.mode==x.MONO?1:2,v.mode_ext=B.MPG_MD_MS_LR,e.mode==x.MONO&&(e.force_ms=!1),e.VBR==o.vbr_off&&128!=e.VBR_mean_bitrate_kbps&&0==e.brate&&(e.brate=e.VBR_mean_bitrate_kbps),e.VBR==o.vbr_off||e.VBR==o.vbr_mtrh||e.VBR==o.vbr_mt||(e.free_format=!1),e.VBR==o.vbr_off&&0==e.brate&&R.EQ(e.compression_ratio,0)&&(e.compression_ratio=11.025),e.VBR==o.vbr_off&&e.compression_ratio>0&&(0==e.out_samplerate&&(e.out_samplerate=map2MP3Frequency(int(.97*e.in_samplerate))),e.brate=0|16*e.out_samplerate*v.channels_out/(1e3*e.compression_ratio),v.samplerate_index=F(e.out_samplerate,e),e.free_format||(e.brate=C(e.brate,e.version,e.out_samplerate))),0!=e.out_samplerate&&(e.out_samplerate<16e3?(e.VBR_mean_bitrate_kbps=Math.max(e.VBR_mean_bitrate_kbps,8),e.VBR_mean_bitrate_kbps=Math.min(e.VBR_mean_bitrate_kbps,64)):e.out_samplerate<32e3?(e.VBR_mean_bitrate_kbps=Math.max(e.VBR_mean_bitrate_kbps,8),e.VBR_mean_bitrate_kbps=Math.min(e.VBR_mean_bitrate_kbps,160)):(e.VBR_mean_bitrate_kbps=Math.max(e.VBR_mean_bitrate_kbps,32),e.VBR_mean_bitrate_kbps=Math.min(e.VBR_mean_bitrate_kbps,320))),0==e.lowpassfreq){var S=16e3;switch(e.VBR){case o.vbr_off:j(k=new L,e.brate),S=k.lowerlimit;break;case o.vbr_abr:var k;j(k=new L,e.VBR_mean_bitrate_kbps),S=k.lowerlimit;break;case o.vbr_rh:var N=[19500,19e3,18600,18e3,17500,16e3,15600,14900,12500,1e4,3950];if(0<=e.VBR_q&&e.VBR_q<=9){var a=N[e.VBR_q],b=N[e.VBR_q+1],U=e.VBR_q_frac;S=linear_int(a,b,U)}else S=19500;break;default:N=[19500,19e3,18500,18e3,17500,16500,15500,14500,12500,9500,3950];if(0<=e.VBR_q&&e.VBR_q<=9){a=N[e.VBR_q],b=N[e.VBR_q+1],U=e.VBR_q_frac;S=linear_int(a,b,U)}else S=19500}e.mode!=x.MONO||e.VBR!=o.vbr_off&&e.VBR!=o.vbr_abr||(S*=1.5),e.lowpassfreq=0|S}if(0==e.out_samplerate&&(2*e.lowpassfreq>e.in_samplerate&&(e.lowpassfreq=e.in_samplerate/2),e.out_samplerate=(n=0|e.lowpassfreq,f=e.in_samplerate,h=44100,f>=48e3?h=48e3:f>=44100?h=44100:f>=32e3?h=32e3:f>=24e3?h=24e3:f>=22050?h=22050:f>=16e3?h=16e3:f>=12e3?h=12e3:f>=11025?h=11025:f>=8e3&&(h=8e3),-1==n?h:(n<=15960&&(h=44100),n<=15250&&(h=32e3),n<=11220&&(h=24e3),n<=9970&&(h=22050),n<=7230&&(h=16e3),n<=5420&&(h=12e3),n<=4510&&(h=11025),n<=3970&&(h=8e3),f<h?f>44100?48e3:f>32e3?44100:f>24e3?32e3:f>22050?24e3:f>16e3?22050:f>12e3?16e3:f>11025?12e3:f>8e3?11025:8e3:h))),e.lowpassfreq=Math.min(20500,e.lowpassfreq),e.lowpassfreq=Math.min(e.out_samplerate/2,e.lowpassfreq),e.VBR==o.vbr_off&&(e.compression_ratio=16*e.out_samplerate*v.channels_out/(1e3*e.brate)),e.VBR==o.vbr_abr&&(e.compression_ratio=16*e.out_samplerate*v.channels_out/(1e3*e.VBR_mean_bitrate_kbps)),e.bWriteVbrTag||(e.findReplayGain=!1,e.decode_on_the_fly=!1,v.findPeakSample=!1),v.findReplayGain=e.findReplayGain,v.decode_on_the_fly=e.decode_on_the_fly,v.decode_on_the_fly&&(v.findPeakSample=!0),v.findReplayGain&&t.InitGainAnalysis(v.rgdata,e.out_samplerate)==GainAnalysis.INIT_GAIN_ANALYSIS_ERROR)return e.internal_flags=null,-6;switch(v.decode_on_the_fly&&!e.decode_only&&(null!=v.hip&&V.hip_decode_exit(v.hip),v.hip=V.hip_decode_init()),v.mode_gr=e.out_samplerate<=24e3?1:2,e.framesize=576*v.mode_gr,e.encoder_delay=B.ENCDELAY,v.resample_ratio=e.in_samplerate/e.out_samplerate,e.VBR){case o.vbr_mt:case o.vbr_rh:case o.vbr_mtrh:e.compression_ratio=[5.7,6.5,7.3,8.2,10,11.9,13,14,15,16.5][e.VBR_q];break;case o.vbr_abr:e.compression_ratio=16*e.out_samplerate*v.channels_out/(1e3*e.VBR_mean_bitrate_kbps);break;default:e.compression_ratio=16*e.out_samplerate*v.channels_out/(1e3*e.brate)}if(e.mode==x.NOT_SET&&(e.mode=x.JOINT_STEREO),e.highpassfreq>0?(v.highpass1=2*e.highpassfreq,e.highpasswidth>=0?v.highpass2=2*(e.highpassfreq+e.highpasswidth):v.highpass2=2*e.highpassfreq,v.highpass1/=e.out_samplerate,v.highpass2/=e.out_samplerate):(v.highpass1=0,v.highpass2=0),e.lowpassfreq>0?(v.lowpass2=2*e.lowpassfreq,e.lowpasswidth>=0?(v.lowpass1=2*(e.lowpassfreq-e.lowpasswidth),v.lowpass1<0&&(v.lowpass1=0)):v.lowpass1=2*e.lowpassfreq,v.lowpass1/=e.out_samplerate,v.lowpass2/=e.out_samplerate):(v.lowpass1=0,v.lowpass2=0),function(e){var t=e.internal_flags,n=32,r=-1;if(t.lowpass1>0){for(var o=999,l=0;l<=31;l++)(m=l/31)>=t.lowpass2&&(n=Math.min(n,l)),t.lowpass1<m&&m<t.lowpass2&&(o=Math.min(o,l));t.lowpass1=999==o?(n-.75)/31:(o-.75)/31,t.lowpass2=n/31}if(t.highpass2>0&&t.highpass2<.75/31*.9&&(t.highpass1=0,t.highpass2=0,_.err.println("Warning: highpass filter disabled. highpass frequency too small\n")),t.highpass2>0){var f=-1;for(l=0;l<=31;l++)(m=l/31)<=t.highpass1&&(r=Math.max(r,l)),t.highpass1<m&&m<t.highpass2&&(f=Math.max(f,l));t.highpass1=r/31,t.highpass2=-1==f?(r+.75)/31:(f+.75)/31}for(l=0;l<32;l++){var c,h,m=l/31;c=t.highpass2>t.highpass1?X((t.highpass2-m)/(t.highpass2-t.highpass1+1e-20)):1,h=t.lowpass2>t.lowpass1?X((m-t.lowpass1)/(t.lowpass2-t.lowpass1+1e-20)):1,t.amp_filter[l]=c*h}}(e),v.samplerate_index=F(e.out_samplerate,e),v.samplerate_index<0)return e.internal_flags=null,-1;if(e.VBR==o.vbr_off){if(e.free_format)v.bitrate_index=0;else if(e.brate=C(e.brate,e.version,e.out_samplerate),v.bitrate_index=Y(e.brate,e.version,e.out_samplerate),v.bitrate_index<=0)return e.internal_flags=null,-1}else v.bitrate_index=1;e.analysis&&(e.bWriteVbrTag=!1),null!=v.pinfo&&(e.bWriteVbrTag=!1),r.init_bit_stream_w(v);for(var z,G=v.samplerate_index+3*e.version+6*(e.out_samplerate<16e3?1:0),i=0;i<B.SBMAX_l+1;i++)v.scalefac_band.l[i]=E.sfBandIndex[G].l[i];for(i=0;i<B.PSFB21+1;i++){var K=(v.scalefac_band.l[22]-v.scalefac_band.l[21])/B.PSFB21,Z=v.scalefac_band.l[21]+i*K;v.scalefac_band.psfb21[i]=Z}v.scalefac_band.psfb21[B.PSFB21]=576;for(i=0;i<B.SBMAX_s+1;i++)v.scalefac_band.s[i]=E.sfBandIndex[G].s[i];for(i=0;i<B.PSFB12+1;i++){K=(v.scalefac_band.s[13]-v.scalefac_band.s[12])/B.PSFB12,Z=v.scalefac_band.s[12]+i*K;v.scalefac_band.psfb12[i]=Z}for(v.scalefac_band.psfb12[B.PSFB12]=192,1==e.version?v.sideinfo_len=1==v.channels_out?21:36:v.sideinfo_len=1==v.channels_out?13:21,e.error_protection&&(v.sideinfo_len+=2),function(e){var t=e.internal_flags;e.frameNum=0,e.write_id3tag_automatic&&I.id3tag_write_v2(e),t.bitrate_stereoMode_Hist=c([16,5]),t.bitrate_blockType_Hist=c([16,6]),t.PeakSample=0,e.bWriteVbrTag&&P.InitVbrTag(e)}(e),v.Class_ID=D,z=0;z<19;z++)v.nsPsy.pefirbuf[z]=700*v.mode_gr*v.channels_out;switch(-1==e.ATHtype&&(e.ATHtype=4),m(e.VBR_q<=9),m(e.VBR_q>=0),e.VBR){case o.vbr_mt:e.VBR=o.vbr_mtrh;case o.vbr_mtrh:null==e.useTemporal&&(e.useTemporal=!1),p.apply_preset(e,500-10*e.VBR_q,0),e.quality<0&&(e.quality=LAME_DEFAULT_QUALITY),e.quality<5&&(e.quality=0),e.quality>5&&(e.quality=5),v.PSY.mask_adjust=e.maskingadjust,v.PSY.mask_adjust_short=e.maskingadjust_short,e.experimentalY?v.sfb21_extra=!1:v.sfb21_extra=e.out_samplerate>44e3,v.iteration_loop=new VBRNewIterationLoop(T);break;case o.vbr_rh:p.apply_preset(e,500-10*e.VBR_q,0),v.PSY.mask_adjust=e.maskingadjust,v.PSY.mask_adjust_short=e.maskingadjust_short,e.experimentalY?v.sfb21_extra=!1:v.sfb21_extra=e.out_samplerate>44e3,e.quality>6&&(e.quality=6),e.quality<0&&(e.quality=LAME_DEFAULT_QUALITY),v.iteration_loop=new VBROldIterationLoop(T);break;default:var W;v.sfb21_extra=!1,e.quality<0&&(e.quality=LAME_DEFAULT_QUALITY),(W=e.VBR)==o.vbr_off&&(e.VBR_mean_bitrate_kbps=e.brate),p.apply_preset(e,e.VBR_mean_bitrate_kbps,0),e.VBR=W,v.PSY.mask_adjust=e.maskingadjust,v.PSY.mask_adjust_short=e.maskingadjust_short,W==o.vbr_off?v.iteration_loop=new M(T):v.iteration_loop=new ABRIterationLoop(T)}if(m(e.scale>=0),e.VBR!=o.vbr_off){if(v.VBR_min_bitrate=1,v.VBR_max_bitrate=14,e.out_samplerate<16e3&&(v.VBR_max_bitrate=8),0!=e.VBR_min_bitrate_kbps&&(e.VBR_min_bitrate_kbps=C(e.VBR_min_bitrate_kbps,e.version,e.out_samplerate),v.VBR_min_bitrate=Y(e.VBR_min_bitrate_kbps,e.version,e.out_samplerate),v.VBR_min_bitrate<0))return-1;if(0!=e.VBR_max_bitrate_kbps&&(e.VBR_max_bitrate_kbps=C(e.VBR_max_bitrate_kbps,e.version,e.out_samplerate),v.VBR_max_bitrate=Y(e.VBR_max_bitrate_kbps,e.version,e.out_samplerate),v.VBR_max_bitrate<0))return-1;e.VBR_min_bitrate_kbps=y.bitrate_table[e.version][v.VBR_min_bitrate],e.VBR_max_bitrate_kbps=y.bitrate_table[e.version][v.VBR_max_bitrate],e.VBR_mean_bitrate_kbps=Math.min(y.bitrate_table[e.version][v.VBR_max_bitrate],e.VBR_mean_bitrate_kbps),e.VBR_mean_bitrate_kbps=Math.max(y.bitrate_table[e.version][v.VBR_min_bitrate],e.VBR_mean_bitrate_kbps)}return e.tune&&(v.PSY.mask_adjust+=e.tune_value_a,v.PSY.mask_adjust_short+=e.tune_value_a),function(e){var t=e.internal_flags;switch(e.quality){default:case 9:t.psymodel=0,t.noise_shaping=0,t.noise_shaping_amp=0,t.noise_shaping_stop=0,t.use_best_huffman=0,t.full_outer_loop=0;break;case 8:e.quality=7;case 7:t.psymodel=1,t.noise_shaping=0,t.noise_shaping_amp=0,t.noise_shaping_stop=0,t.use_best_huffman=0,t.full_outer_loop=0;break;case 6:case 5:t.psymodel=1,0==t.noise_shaping&&(t.noise_shaping=1),t.noise_shaping_amp=0,t.noise_shaping_stop=0,-1==t.subblock_gain&&(t.subblock_gain=1),t.use_best_huffman=0,t.full_outer_loop=0;break;case 4:t.psymodel=1,0==t.noise_shaping&&(t.noise_shaping=1),t.noise_shaping_amp=0,t.noise_shaping_stop=0,-1==t.subblock_gain&&(t.subblock_gain=1),t.use_best_huffman=1,t.full_outer_loop=0;break;case 3:t.psymodel=1,0==t.noise_shaping&&(t.noise_shaping=1),t.noise_shaping_amp=1,t.noise_shaping_stop=1,-1==t.subblock_gain&&(t.subblock_gain=1),t.use_best_huffman=1,t.full_outer_loop=0;break;case 2:t.psymodel=1,0==t.noise_shaping&&(t.noise_shaping=1),0==t.substep_shaping&&(t.substep_shaping=2),t.noise_shaping_amp=1,t.noise_shaping_stop=1,-1==t.subblock_gain&&(t.subblock_gain=1),t.use_best_huffman=1,t.full_outer_loop=0;break;case 1:case 0:t.psymodel=1,0==t.noise_shaping&&(t.noise_shaping=1),0==t.substep_shaping&&(t.substep_shaping=2),t.noise_shaping_amp=2,t.noise_shaping_stop=1,-1==t.subblock_gain&&(t.subblock_gain=1),t.use_best_huffman=1,t.full_outer_loop=0}}(e),m(e.scale>=0),e.athaa_type<0?v.ATH.useAdjust=3:v.ATH.useAdjust=e.athaa_type,v.ATH.aaSensitivityP=Math.pow(10,e.athaa_sensitivity/-10),null==e.short_blocks&&(e.short_blocks=l.short_block_allowed),e.short_blocks!=l.short_block_allowed||e.mode!=x.JOINT_STEREO&&e.mode!=x.STEREO||(e.short_blocks=l.short_block_coupled),e.quant_comp<0&&(e.quant_comp=1),e.quant_comp_short<0&&(e.quant_comp_short=0),e.msfix<0&&(e.msfix=0),e.exp_nspsytune=1|e.exp_nspsytune,e.internal_flags.nsPsy.attackthre<0&&(e.internal_flags.nsPsy.attackthre=d.NSATTACKTHRE),e.internal_flags.nsPsy.attackthre_s<0&&(e.internal_flags.nsPsy.attackthre_s=d.NSATTACKTHRE_S),m(e.scale>=0),e.scale<0&&(e.scale=1),e.ATHtype<0&&(e.ATHtype=4),e.ATHcurve<0&&(e.ATHcurve=4),e.athaa_loudapprox<0&&(e.athaa_loudapprox=2),e.interChRatio<0&&(e.interChRatio=0),null==e.useTemporal&&(e.useTemporal=!0),v.slot_lag=v.frac_SpF=0,e.VBR==o.vbr_off&&(v.slot_lag=v.frac_SpF=72e3*(e.version+1)*e.brate%e.out_samplerate|0),E.iteration_init(e),O.psymodel_init(e),m(e.scale>=0),0},this.lame_encode_flush=function(e,t,n,_){var o,l,f,c,m=e.internal_flags,d=h([2,1152]),v=0,S=m.mf_samples_to_encode-B.POSTDELAY,w=U(e);if(m.mf_samples_to_encode<1)return 0;for(o=0,e.in_samplerate!=e.out_samplerate&&(S+=16*e.out_samplerate/e.in_samplerate),(f=e.framesize-S%e.framesize)<576&&(f+=e.framesize),e.encoder_padding=f,c=(S+f)/e.framesize;c>0&&v>=0;){var A=w-m.mf_size,M=e.frameNum;A*=e.in_samplerate,(A/=e.out_samplerate)>1152&&(A=1152),A<1&&(A=1),l=_-o,0==_&&(l=0),n+=v=this.lame_encode_buffer(e,d[0],d[1],A,t,n,l),o+=v,c-=M!=e.frameNum?1:0}if(m.mf_samples_to_encode=0,v<0)return v;if(l=_-o,0==_&&(l=0),r.flush_bitstream(e),(v=r.copy_buffer(m,t,n,l,1))<0)return v;if(n+=v,l=_-(o+=v),0==_&&(l=0),e.write_id3tag_automatic){if(I.id3tag_write_v1(e),(v=r.copy_buffer(m,t,n,l,0))<0)return v;o+=v}return o},this.lame_encode_buffer=function(e,n,_,o,l,c,h){var d=e.internal_flags,v=[null,null];if(d.Class_ID!=D)return-3;if(0==o)return 0;!function(e,t){(null==e.in_buffer_0||e.in_buffer_nsamples<t)&&(e.in_buffer_0=f(t),e.in_buffer_1=f(t),e.in_buffer_nsamples=t)}(d,o),v[0]=d.in_buffer_0,v[1]=d.in_buffer_1;for(var i=0;i<o;i++)v[0][i]=n[i],d.channels_in>1&&(v[1][i]=_[i]);return function(e,n,_,o,l,f,c){var h,i,d,v,w,A=e.internal_flags,M=0,y=[null,null],E=[null,null];if(A.Class_ID!=D)return-3;if(0==o)return 0;if((w=r.copy_buffer(A,l,f,c,0))<0)return w;if(f+=w,M+=w,E[0]=n,E[1]=_,R.NEQ(e.scale,0)&&R.NEQ(e.scale,1))for(i=0;i<o;++i)E[0][i]*=e.scale,2==A.channels_out&&(E[1][i]*=e.scale);if(R.NEQ(e.scale_left,0)&&R.NEQ(e.scale_left,1))for(i=0;i<o;++i)E[0][i]*=e.scale_left;if(R.NEQ(e.scale_right,0)&&R.NEQ(e.scale_right,1))for(i=0;i<o;++i)E[1][i]*=e.scale_right;if(2==e.num_channels&&1==A.channels_out)for(i=0;i<o;++i)E[0][i]=.5*(E[0][i]+E[1][i]),E[1][i]=0;v=U(e),y[0]=A.mfbuf[0],y[1]=A.mfbuf[1];var T=0;for(;o>0;){var x=[null,null],k=0,P=0;x[0]=E[0],x[1]=E[1];var I=new G;if(J(e,y,x,T,o,I),k=I.n_in,P=I.n_out,A.findReplayGain&&!A.decode_on_the_fly&&t.AnalyzeSamples(A.rgdata,y[0],A.mf_size,y[1],A.mf_size,P,A.channels_out)==GainAnalysis.GAIN_ANALYSIS_ERROR)return-6;if(o-=k,T+=k,A.channels_out,A.mf_size+=P,m(A.mf_size<=S.MFSIZE),A.mf_samples_to_encode<1&&(A.mf_samples_to_encode=B.ENCDELAY+B.POSTDELAY),A.mf_samples_to_encode+=P,A.mf_size>=v){var V=c-M;if(0==c&&(V=0),(h=z(e,y[0],y[1],l,f,V))<0)return h;for(f+=h,M+=h,A.mf_size-=e.framesize,A.mf_samples_to_encode-=e.framesize,d=0;d<A.channels_out;d++)for(i=0;i<A.mf_size;i++)y[d][i]=y[d][i+e.framesize]}}return m(0==o),M}(e,v[0],v[1],o,l,c,h)}}},323:function(e,t,n){var r=n(298),_=(r.System,r.VbrMode,r.Float,r.ShortBlock,r.Util,r.Arrays,r.new_array_n,r.new_byte,r.new_double,r.new_float),o=(r.new_float_n,r.new_int),l=(r.new_int_n,r.assert,n(313));e.exports=function(){this.xr=_(576),this.l3_enc=o(576),this.scalefac=o(l.SFBMAX),this.xrpow_max=0,this.part2_3_length=0,this.big_values=0,this.count1=0,this.global_gain=0,this.scalefac_compress=0,this.block_type=0,this.mixed_block_flag=0,this.table_select=o(3),this.subblock_gain=o(4),this.region0_count=0,this.region1_count=0,this.preflag=0,this.scalefac_scale=0,this.count1table_select=0,this.part2_length=0,this.sfb_lmax=0,this.sfb_smin=0,this.psy_lmax=0,this.sfbmax=0,this.psymax=0,this.sfbdivide=0,this.width=o(l.SFBMAX),this.window=o(l.SFBMAX),this.count1bits=0,this.sfb_partition_table=null,this.slen=o(4),this.max_nonzero_coeff=0;var e=this;function t(e){return new Int32Array(e)}this.assign=function(n){var r;e.xr=(r=n.xr,new Float32Array(r)),e.l3_enc=t(n.l3_enc),e.scalefac=t(n.scalefac),e.xrpow_max=n.xrpow_max,e.part2_3_length=n.part2_3_length,e.big_values=n.big_values,e.count1=n.count1,e.global_gain=n.global_gain,e.scalefac_compress=n.scalefac_compress,e.block_type=n.block_type,e.mixed_block_flag=n.mixed_block_flag,e.table_select=t(n.table_select),e.subblock_gain=t(n.subblock_gain),e.region0_count=n.region0_count,e.region1_count=n.region1_count,e.preflag=n.preflag,e.scalefac_scale=n.scalefac_scale,e.count1table_select=n.count1table_select,e.part2_length=n.part2_length,e.sfb_lmax=n.sfb_lmax,e.sfb_smin=n.sfb_smin,e.psy_lmax=n.psy_lmax,e.sfbmax=n.sfbmax,e.psymax=n.psymax,e.sfbdivide=n.sfbdivide,e.width=t(n.width),e.window=t(n.window),e.count1bits=n.count1bits,e.sfb_partition_table=n.sfb_partition_table.slice(0),e.slen=t(n.slen),e.max_nonzero_coeff=n.max_nonzero_coeff}}},324:function(e,t,n){var r=n(298),_=r.System,o=(r.VbrMode,r.Float,r.ShortBlock,r.Util,r.Arrays),l=(r.new_array_n,r.new_byte),f=(r.new_double,r.new_float,r.new_float_n),c=r.new_int,h=(r.new_int_n,r.assert),m=n(339),d=n(325),v=n(299),S=n(312);function w(){var e=n(322),t=this,r=32,w=null,A=null,M=null,R=null;this.setModules=function(e,t,n,r){w=e,A=t,M=n,R=r};var y=null,B=0,E=0,T=0;function x(e){_.arraycopy(e.header[e.w_ptr].buf,0,y,E,e.sideinfo_len),E+=e.sideinfo_len,B+=8*e.sideinfo_len,e.w_ptr=e.w_ptr+1&S.MAX_HEADER_BUF-1}function k(t,n,_){for(h(_<30);_>0;){var o;0==T&&(T=8,E++,h(E<e.LAME_MAXMP3BUFFER),h(t.header[t.w_ptr].write_timing>=B),t.header[t.w_ptr].write_timing==B&&x(t),y[E]=0),o=Math.min(_,T),T-=o,h((_-=o)<r),h(T<r),y[E]|=n>>_<<T,B+=o}}function P(t,n,_){for(h(_<30);_>0;){var o;0==T&&(T=8,E++,h(E<e.LAME_MAXMP3BUFFER),y[E]=0),o=Math.min(_,T),T-=o,h((_-=o)<r),h(T<r),y[E]|=n>>_<<T,B+=o}}function I(e,t){var i,n=e.internal_flags;if(h(t>=0),t>=8&&(k(n,76,8),t-=8),t>=8&&(k(n,65,8),t-=8),t>=8&&(k(n,77,8),t-=8),t>=8&&(k(n,69,8),t-=8),t>=32){var r=M.getLameShortVersion();if(t>=32)for(i=0;i<r.length&&t>=8;++i)t-=8,k(n,r.charAt(i),8)}for(;t>=1;t-=1)k(n,n.ancillary_flag,1),n.ancillary_flag^=e.disable_reservoir?0:1;h(0==t)}function V(e,t,n){for(var _=e.header[e.h_ptr].ptr;n>0;){var o=Math.min(n,8-(7&_));h((n-=o)<r),e.header[e.h_ptr].buf[_>>3]|=t>>n<<8-(7&_)-o,_+=o}e.header[e.h_ptr].ptr=_}function O(e,t){e<<=8;for(var i=0;i<8;i++)0!=(65536&((t<<=1)^(e<<=1)))&&(t^=32773);return t}function H(e,t){var i,n=d.ht[t.count1table_select+32],r=0,_=t.big_values,o=t.big_values;for(h(t.count1table_select<2),i=(t.count1-t.big_values)/4;i>0;--i){var l,f=0,p=0;0!=(l=t.l3_enc[_+0])&&(p+=8,t.xr[o+0]<0&&f++,h(l<=1)),0!=(l=t.l3_enc[_+1])&&(p+=4,f*=2,t.xr[o+1]<0&&f++,h(l<=1)),0!=(l=t.l3_enc[_+2])&&(p+=2,f*=2,t.xr[o+2]<0&&f++,h(l<=1)),0!=(l=t.l3_enc[_+3])&&(p++,f*=2,t.xr[o+3]<0&&f++,h(l<=1)),_+=4,o+=4,k(e,f+n.table[p],n.hlen[p]),r+=n.hlen[p]}return r}function L(e,t,n,_,o){var l=d.ht[t],f=0;if(h(t<32),0==t)return f;for(var i=n;i<_;i+=2){var c=0,m=0,v=l.xlen,S=l.xlen,w=0,A=o.l3_enc[i],M=o.l3_enc[i+1];if(0!=A&&(o.xr[i]<0&&w++,c--),t>15){if(A>14){var R=A-15;h(R<=l.linmax),w|=R<<1,m=v,A=15}if(M>14){var y=M-15;h(y<=l.linmax),w<<=v,w|=y,m+=v,M=15}S=16}0!=M&&(w<<=1,o.xr[i+1]<0&&w++,c--),h((A|M)<16),A=A*S+M,m-=c,c+=l.hlen[A],h(c<=r),h(m<=r),k(e,l.table[A],c),k(e,w,m),f+=c+m}return f}function N(e,t){var n=3*e.scalefac_band.s[3];n>t.big_values&&(n=t.big_values);var r=L(e,t.table_select[0],0,n,t);return r+=L(e,t.table_select[1],n,t.big_values,t)}function D(e,t){var n,r,_,o;n=t.big_values,h(0<=n&&n<=576);var i=t.region0_count+1;return h(0<=i),h(i<e.scalefac_band.l.length),_=e.scalefac_band.l[i],i+=t.region1_count+1,h(0<=i),h(i<e.scalefac_band.l.length),_>n&&(_=n),(o=e.scalefac_band.l[i])>n&&(o=n),r=L(e,t.table_select[0],0,_,t),r+=L(e,t.table_select[1],_,o,t),r+=L(e,t.table_select[2],o,n,t)}function X(){this.total=0}function F(e,n){var r,o,l,f,c,h=e.internal_flags;return c=h.w_ptr,-1==(f=h.h_ptr-1)&&(f=S.MAX_HEADER_BUF-1),r=h.header[f].write_timing-B,n.total=r,r>=0&&(o=1+f-c,f<c&&(o=1+f-c+S.MAX_HEADER_BUF),r-=8*o*h.sideinfo_len),r+=l=t.getframebits(e),n.total+=l,n.total%8!=0?n.total=1+n.total/8:n.total=n.total/8,n.total+=E+1,r<0&&_.err.println("strange error flushing buffer ... \n"),r}this.getframebits=function(e){var t,n=e.internal_flags;return t=0!=n.bitrate_index?d.bitrate_table[e.version][n.bitrate_index]:e.brate,h(8<=t&&t<=640),8*(0|72e3*(e.version+1)*t/e.out_samplerate+n.padding)},this.CRC_writeheader=function(e,header){var t=65535;t=O(255&header[2],t),t=O(255&header[3],t);for(var i=6;i<e.sideinfo_len;i++)t=O(255&header[i],t);header[4]=byte(t>>8),header[5]=byte(255&t)},this.flush_bitstream=function(e){var t,n,r=e.internal_flags,_=r.h_ptr-1;if(-1==_&&(_=S.MAX_HEADER_BUF-1),t=r.l3_side,!((n=F(e,new X))<0)){if(I(e,n),h(r.header[_].write_timing+this.getframebits(e)==B),r.ResvSize=0,t.main_data_begin=0,r.findReplayGain){var o=w.GetTitleGain(r.rgdata);h(NEQ(o,GainAnalysis.GAIN_NOT_ENOUGH_SAMPLES)),r.RadioGain=0|Math.floor(10*o+.5)}r.findPeakSample&&(r.noclipGainChange=0|Math.ceil(20*Math.log10(r.PeakSample/32767)*10),r.noclipGainChange>0&&(EQ(e.scale,1)||EQ(e.scale,0))?r.noclipScale=Math.floor(32767/r.PeakSample*100)/100:r.noclipScale=-1)}},this.add_dummy_byte=function(e,t,n){for(var i,r=e.internal_flags;n-- >0;)for(P(0,t,8),i=0;i<S.MAX_HEADER_BUF;++i)r.header[i].write_timing+=8},this.format_bitstream=function(e){var t,n=e.internal_flags;t=n.l3_side;var r=this.getframebits(e);I(e,t.resvDrain_pre),function(e,t){var n,r,l,f=e.internal_flags;if(n=f.l3_side,f.header[f.h_ptr].ptr=0,o.fill(f.header[f.h_ptr].buf,0,f.sideinfo_len,0),e.out_samplerate<16e3?V(f,4094,12):V(f,4095,12),V(f,e.version,1),V(f,1,2),V(f,e.error_protection?0:1,1),V(f,f.bitrate_index,4),V(f,f.samplerate_index,2),V(f,f.padding,1),V(f,e.extension,1),V(f,e.mode.ordinal(),2),V(f,f.mode_ext,2),V(f,e.copyright,1),V(f,e.original,1),V(f,e.emphasis,2),e.error_protection&&V(f,0,16),1==e.version){for(h(n.main_data_begin>=0),V(f,n.main_data_begin,9),2==f.channels_out?V(f,n.private_bits,3):V(f,n.private_bits,5),l=0;l<f.channels_out;l++){var c;for(c=0;c<4;c++)V(f,n.scfsi[l][c],1)}for(r=0;r<2;r++)for(l=0;l<f.channels_out;l++)V(f,(m=n.tt[r][l]).part2_3_length+m.part2_length,12),V(f,m.big_values/2,9),V(f,m.global_gain,8),V(f,m.scalefac_compress,4),m.block_type!=v.NORM_TYPE?(V(f,1,1),V(f,m.block_type,2),V(f,m.mixed_block_flag,1),14==m.table_select[0]&&(m.table_select[0]=16),V(f,m.table_select[0],5),14==m.table_select[1]&&(m.table_select[1]=16),V(f,m.table_select[1],5),V(f,m.subblock_gain[0],3),V(f,m.subblock_gain[1],3),V(f,m.subblock_gain[2],3)):(V(f,0,1),14==m.table_select[0]&&(m.table_select[0]=16),V(f,m.table_select[0],5),14==m.table_select[1]&&(m.table_select[1]=16),V(f,m.table_select[1],5),14==m.table_select[2]&&(m.table_select[2]=16),V(f,m.table_select[2],5),h(0<=m.region0_count&&m.region0_count<16),h(0<=m.region1_count&&m.region1_count<8),V(f,m.region0_count,4),V(f,m.region1_count,3)),V(f,m.preflag,1),V(f,m.scalefac_scale,1),V(f,m.count1table_select,1)}else for(h(n.main_data_begin>=0),V(f,n.main_data_begin,8),V(f,n.private_bits,f.channels_out),r=0,l=0;l<f.channels_out;l++){var m;V(f,(m=n.tt[r][l]).part2_3_length+m.part2_length,12),V(f,m.big_values/2,9),V(f,m.global_gain,8),V(f,m.scalefac_compress,9),m.block_type!=v.NORM_TYPE?(V(f,1,1),V(f,m.block_type,2),V(f,m.mixed_block_flag,1),14==m.table_select[0]&&(m.table_select[0]=16),V(f,m.table_select[0],5),14==m.table_select[1]&&(m.table_select[1]=16),V(f,m.table_select[1],5),V(f,m.subblock_gain[0],3),V(f,m.subblock_gain[1],3),V(f,m.subblock_gain[2],3)):(V(f,0,1),14==m.table_select[0]&&(m.table_select[0]=16),V(f,m.table_select[0],5),14==m.table_select[1]&&(m.table_select[1]=16),V(f,m.table_select[1],5),14==m.table_select[2]&&(m.table_select[2]=16),V(f,m.table_select[2],5),h(0<=m.region0_count&&m.region0_count<16),h(0<=m.region1_count&&m.region1_count<8),V(f,m.region0_count,4),V(f,m.region1_count,3)),V(f,m.scalefac_scale,1),V(f,m.count1table_select,1)}e.error_protection&&CRC_writeheader(f,f.header[f.h_ptr].buf);var d=f.h_ptr;h(f.header[d].ptr==8*f.sideinfo_len),f.h_ptr=d+1&S.MAX_HEADER_BUF-1,f.header[f.h_ptr].write_timing=f.header[d].write_timing+t,f.h_ptr==f.w_ptr&&_.err.println("Error: MAX_HEADER_BUF too small in bitstream.c \n")}(e,r);var l=8*n.sideinfo_len;if(l+=function(e){var t,n,r,_,o=0,l=e.internal_flags,f=l.l3_side;if(1==e.version)for(t=0;t<2;t++)for(n=0;n<l.channels_out;n++){var c=f.tt[t][n],d=m.slen1_tab[c.scalefac_compress],S=m.slen2_tab[c.scalefac_compress];for(_=0,r=0;r<c.sfbdivide;r++)-1!=c.scalefac[r]&&(k(l,c.scalefac[r],d),_+=d);for(;r<c.sfbmax;r++)-1!=c.scalefac[r]&&(k(l,c.scalefac[r],S),_+=S);h(_==c.part2_length),c.block_type==v.SHORT_TYPE?_+=N(l,c):_+=D(l,c),_+=H(l,c),h(_==c.part2_3_length+c.part2_length),o+=_}else for(t=0,n=0;n<l.channels_out;n++){c=f.tt[t][n];var i,w,A=0;if(h(null!=c.sfb_partition_table),_=0,r=0,w=0,c.block_type==v.SHORT_TYPE){for(;w<4;w++){var M=c.sfb_partition_table[w]/3,R=c.slen[w];for(i=0;i<M;i++,r++)k(l,Math.max(c.scalefac[3*r+0],0),R),k(l,Math.max(c.scalefac[3*r+1],0),R),k(l,Math.max(c.scalefac[3*r+2],0),R),A+=3*R}_+=N(l,c)}else{for(;w<4;w++)for(M=c.sfb_partition_table[w],R=c.slen[w],i=0;i<M;i++,r++)k(l,Math.max(c.scalefac[r],0),R),A+=R;_+=D(l,c)}_+=H(l,c),h(_==c.part2_3_length),h(A==c.part2_length),o+=A+_}return o}(e),I(e,t.resvDrain_post),l+=t.resvDrain_post,t.main_data_begin+=(r-l)/8,F(e,new X)!=n.ResvSize&&_.err.println("Internal buffer inconsistency. flushbits <> ResvSize"),8*t.main_data_begin!=n.ResvSize&&(_.err.printf("bit reservoir error: \nl3_side.main_data_begin: %d \nResvoir size: %d \nresv drain (post) %d \nresv drain (pre) %d \nheader and sideinfo: %d \ndata bits: %d \ntotal bits: %d (remainder: %d) \nbitsperframe: %d \n",8*t.main_data_begin,n.ResvSize,t.resvDrain_post,t.resvDrain_pre,8*n.sideinfo_len,l-t.resvDrain_post-8*n.sideinfo_len,l,l%8,r),_.err.println("This is a fatal error. It has several possible causes:"),_.err.println("90%% LAME compiled with buggy version of gcc using advanced optimizations"),_.err.println(" 9%% Your system is overclocked"),_.err.println(" 1%% bug in LAME encoding library"),n.ResvSize=8*t.main_data_begin),h(B%8==0),B>1e9){var i;for(i=0;i<S.MAX_HEADER_BUF;++i)n.header[i].write_timing-=B;B=0}return 0},this.copy_buffer=function(e,t,n,r,o){var l=E+1;if(l<=0)return 0;if(0!=r&&l>r)return-1;if(_.arraycopy(y,0,t,n,l),E=-1,T=0,0!=o){var m=c(1);if(m[0]=e.nMusicCRC,R.updateMusicCRC(m,t,n,l),e.nMusicCRC=m[0],l>0&&(e.VBR_seek_table.nBytesWritten+=l),e.decode_on_the_fly)for(var i,d=f([2,1152]),v=l,S=-1;0!=S;)if(S=A.hip_decode1_unclipped(e.hip,t,n,v,d[0],d[1]),v=0,-1==S&&(S=0),S>0){if(h(S<=1152),e.findPeakSample){for(i=0;i<S;i++)d[0][i]>e.PeakSample?e.PeakSample=d[0][i]:-d[0][i]>e.PeakSample&&(e.PeakSample=-d[0][i]);if(e.channels_out>1)for(i=0;i<S;i++)d[1][i]>e.PeakSample?e.PeakSample=d[1][i]:-d[1][i]>e.PeakSample&&(e.PeakSample=-d[1][i])}if(e.findReplayGain&&w.AnalyzeSamples(e.rgdata,d[0],0,d[1],0,S,e.channels_out)==GainAnalysis.GAIN_ANALYSIS_ERROR)return-6}}return l},this.init_bit_stream_w=function(t){y=l(e.LAME_MAXMP3BUFFER),t.h_ptr=t.w_ptr=0,t.header[t.h_ptr].write_timing=0,E=-1,T=0,B=0}}w.EQ=function(a,b){return Math.abs(a)>Math.abs(b)?Math.abs(a-b)<=1e-6*Math.abs(a):Math.abs(a-b)<=1e-6*Math.abs(b)},w.NEQ=function(a,b){return!w.EQ(a,b)},e.exports=w},325:function(e,t){function n(e,t,n,r){this.xlen=e,this.linmax=t,this.table=n,this.hlen=r}var r={t1HB:[1,1,1,0],t2HB:[1,2,1,3,1,1,3,2,0],t3HB:[3,2,1,1,1,1,3,2,0],t5HB:[1,2,6,5,3,1,4,4,7,5,7,1,6,1,1,0],t6HB:[7,3,5,1,6,2,3,2,5,4,4,1,3,3,2,0],t7HB:[1,2,10,19,16,10,3,3,7,10,5,3,11,4,13,17,8,4,12,11,18,15,11,2,7,6,9,14,3,1,6,4,5,3,2,0],t8HB:[3,4,6,18,12,5,5,1,2,16,9,3,7,3,5,14,7,3,19,17,15,13,10,4,13,5,8,11,5,1,12,4,4,1,1,0],t9HB:[7,5,9,14,15,7,6,4,5,5,6,7,7,6,8,8,8,5,15,6,9,10,5,1,11,7,9,6,4,1,14,4,6,2,6,0],t10HB:[1,2,10,23,35,30,12,17,3,3,8,12,18,21,12,7,11,9,15,21,32,40,19,6,14,13,22,34,46,23,18,7,20,19,33,47,27,22,9,3,31,22,41,26,21,20,5,3,14,13,10,11,16,6,5,1,9,8,7,8,4,4,2,0],t11HB:[3,4,10,24,34,33,21,15,5,3,4,10,32,17,11,10,11,7,13,18,30,31,20,5,25,11,19,59,27,18,12,5,35,33,31,58,30,16,7,5,28,26,32,19,17,15,8,14,14,12,9,13,14,9,4,1,11,4,6,6,6,3,2,0],t12HB:[9,6,16,33,41,39,38,26,7,5,6,9,23,16,26,11,17,7,11,14,21,30,10,7,17,10,15,12,18,28,14,5,32,13,22,19,18,16,9,5,40,17,31,29,17,13,4,2,27,12,11,15,10,7,4,1,27,12,8,12,6,3,1,0],t13HB:[1,5,14,21,34,51,46,71,42,52,68,52,67,44,43,19,3,4,12,19,31,26,44,33,31,24,32,24,31,35,22,14,15,13,23,36,59,49,77,65,29,40,30,40,27,33,42,16,22,20,37,61,56,79,73,64,43,76,56,37,26,31,25,14,35,16,60,57,97,75,114,91,54,73,55,41,48,53,23,24,58,27,50,96,76,70,93,84,77,58,79,29,74,49,41,17,47,45,78,74,115,94,90,79,69,83,71,50,59,38,36,15,72,34,56,95,92,85,91,90,86,73,77,65,51,44,43,42,43,20,30,44,55,78,72,87,78,61,46,54,37,30,20,16,53,25,41,37,44,59,54,81,66,76,57,54,37,18,39,11,35,33,31,57,42,82,72,80,47,58,55,21,22,26,38,22,53,25,23,38,70,60,51,36,55,26,34,23,27,14,9,7,34,32,28,39,49,75,30,52,48,40,52,28,18,17,9,5,45,21,34,64,56,50,49,45,31,19,12,15,10,7,6,3,48,23,20,39,36,35,53,21,16,23,13,10,6,1,4,2,16,15,17,27,25,20,29,11,17,12,16,8,1,1,0,1],t15HB:[7,12,18,53,47,76,124,108,89,123,108,119,107,81,122,63,13,5,16,27,46,36,61,51,42,70,52,83,65,41,59,36,19,17,15,24,41,34,59,48,40,64,50,78,62,80,56,33,29,28,25,43,39,63,55,93,76,59,93,72,54,75,50,29,52,22,42,40,67,57,95,79,72,57,89,69,49,66,46,27,77,37,35,66,58,52,91,74,62,48,79,63,90,62,40,38,125,32,60,56,50,92,78,65,55,87,71,51,73,51,70,30,109,53,49,94,88,75,66,122,91,73,56,42,64,44,21,25,90,43,41,77,73,63,56,92,77,66,47,67,48,53,36,20,71,34,67,60,58,49,88,76,67,106,71,54,38,39,23,15,109,53,51,47,90,82,58,57,48,72,57,41,23,27,62,9,86,42,40,37,70,64,52,43,70,55,42,25,29,18,11,11,118,68,30,55,50,46,74,65,49,39,24,16,22,13,14,7,91,44,39,38,34,63,52,45,31,52,28,19,14,8,9,3,123,60,58,53,47,43,32,22,37,24,17,12,15,10,2,1,71,37,34,30,28,20,17,26,21,16,10,6,8,6,2,0],t16HB:[1,5,14,44,74,63,110,93,172,149,138,242,225,195,376,17,3,4,12,20,35,62,53,47,83,75,68,119,201,107,207,9,15,13,23,38,67,58,103,90,161,72,127,117,110,209,206,16,45,21,39,69,64,114,99,87,158,140,252,212,199,387,365,26,75,36,68,65,115,101,179,164,155,264,246,226,395,382,362,9,66,30,59,56,102,185,173,265,142,253,232,400,388,378,445,16,111,54,52,100,184,178,160,133,257,244,228,217,385,366,715,10,98,48,91,88,165,157,148,261,248,407,397,372,380,889,884,8,85,84,81,159,156,143,260,249,427,401,392,383,727,713,708,7,154,76,73,141,131,256,245,426,406,394,384,735,359,710,352,11,139,129,67,125,247,233,229,219,393,743,737,720,885,882,439,4,243,120,118,115,227,223,396,746,742,736,721,712,706,223,436,6,202,224,222,218,216,389,386,381,364,888,443,707,440,437,1728,4,747,211,210,208,370,379,734,723,714,1735,883,877,876,3459,865,2,377,369,102,187,726,722,358,711,709,866,1734,871,3458,870,434,0,12,10,7,11,10,17,11,9,13,12,10,7,5,3,1,3],t24HB:[15,13,46,80,146,262,248,434,426,669,653,649,621,517,1032,88,14,12,21,38,71,130,122,216,209,198,327,345,319,297,279,42,47,22,41,74,68,128,120,221,207,194,182,340,315,295,541,18,81,39,75,70,134,125,116,220,204,190,178,325,311,293,271,16,147,72,69,135,127,118,112,210,200,188,352,323,306,285,540,14,263,66,129,126,119,114,214,202,192,180,341,317,301,281,262,12,249,123,121,117,113,215,206,195,185,347,330,308,291,272,520,10,435,115,111,109,211,203,196,187,353,332,313,298,283,531,381,17,427,212,208,205,201,193,186,177,169,320,303,286,268,514,377,16,335,199,197,191,189,181,174,333,321,305,289,275,521,379,371,11,668,184,183,179,175,344,331,314,304,290,277,530,383,373,366,10,652,346,171,168,164,318,309,299,287,276,263,513,375,368,362,6,648,322,316,312,307,302,292,284,269,261,512,376,370,364,359,4,620,300,296,294,288,282,273,266,515,380,374,369,365,361,357,2,1033,280,278,274,267,264,259,382,378,372,367,363,360,358,356,0,43,20,19,17,15,13,11,9,7,6,4,7,5,3,1,3],t32HB:[1,10,8,20,12,20,16,32,14,12,24,0,28,16,24,16],t33HB:[15,28,26,48,22,40,36,64,14,24,20,32,12,16,8,0],t1l:[1,4,3,5],t2l:[1,4,7,4,5,7,6,7,8],t3l:[2,3,7,4,4,7,6,7,8],t5l:[1,4,7,8,4,5,8,9,7,8,9,10,8,8,9,10],t6l:[3,4,6,8,4,4,6,7,5,6,7,8,7,7,8,9],t7l:[1,4,7,9,9,10,4,6,8,9,9,10,7,7,9,10,10,11,8,9,10,11,11,11,8,9,10,11,11,12,9,10,11,12,12,12],t8l:[2,4,7,9,9,10,4,4,6,10,10,10,7,6,8,10,10,11,9,10,10,11,11,12,9,9,10,11,12,12,10,10,11,11,13,13],t9l:[3,4,6,7,9,10,4,5,6,7,8,10,5,6,7,8,9,10,7,7,8,9,9,10,8,8,9,9,10,11,9,9,10,10,11,11],t10l:[1,4,7,9,10,10,10,11,4,6,8,9,10,11,10,10,7,8,9,10,11,12,11,11,8,9,10,11,12,12,11,12,9,10,11,12,12,12,12,12,10,11,12,12,13,13,12,13,9,10,11,12,12,12,13,13,10,10,11,12,12,13,13,13],t11l:[2,4,6,8,9,10,9,10,4,5,6,8,10,10,9,10,6,7,8,9,10,11,10,10,8,8,9,11,10,12,10,11,9,10,10,11,11,12,11,12,9,10,11,12,12,13,12,13,9,9,9,10,11,12,12,12,9,9,10,11,12,12,12,12],t12l:[4,4,6,8,9,10,10,10,4,5,6,7,9,9,10,10,6,6,7,8,9,10,9,10,7,7,8,8,9,10,10,10,8,8,9,9,10,10,10,11,9,9,10,10,10,11,10,11,9,9,9,10,10,11,11,12,10,10,10,11,11,11,11,12],t13l:[1,5,7,8,9,10,10,11,10,11,12,12,13,13,14,14,4,6,8,9,10,10,11,11,11,11,12,12,13,14,14,14,7,8,9,10,11,11,12,12,11,12,12,13,13,14,15,15,8,9,10,11,11,12,12,12,12,13,13,13,13,14,15,15,9,9,11,11,12,12,13,13,12,13,13,14,14,15,15,16,10,10,11,12,12,12,13,13,13,13,14,13,15,15,16,16,10,11,12,12,13,13,13,13,13,14,14,14,15,15,16,16,11,11,12,13,13,13,14,14,14,14,15,15,15,16,18,18,10,10,11,12,12,13,13,14,14,14,14,15,15,16,17,17,11,11,12,12,13,13,13,15,14,15,15,16,16,16,18,17,11,12,12,13,13,14,14,15,14,15,16,15,16,17,18,19,12,12,12,13,14,14,14,14,15,15,15,16,17,17,17,18,12,13,13,14,14,15,14,15,16,16,17,17,17,18,18,18,13,13,14,15,15,15,16,16,16,16,16,17,18,17,18,18,14,14,14,15,15,15,17,16,16,19,17,17,17,19,18,18,13,14,15,16,16,16,17,16,17,17,18,18,21,20,21,18],t15l:[3,5,6,8,8,9,10,10,10,11,11,12,12,12,13,14,5,5,7,8,9,9,10,10,10,11,11,12,12,12,13,13,6,7,7,8,9,9,10,10,10,11,11,12,12,13,13,13,7,8,8,9,9,10,10,11,11,11,12,12,12,13,13,13,8,8,9,9,10,10,11,11,11,11,12,12,12,13,13,13,9,9,9,10,10,10,11,11,11,11,12,12,13,13,13,14,10,9,10,10,10,11,11,11,11,12,12,12,13,13,14,14,10,10,10,11,11,11,11,12,12,12,12,12,13,13,13,14,10,10,10,11,11,11,11,12,12,12,12,13,13,14,14,14,10,10,11,11,11,11,12,12,12,13,13,13,13,14,14,14,11,11,11,11,12,12,12,12,12,13,13,13,13,14,15,14,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,15,12,12,11,12,12,12,13,13,13,13,13,13,14,14,15,15,12,12,12,12,12,13,13,13,13,14,14,14,14,14,15,15,13,13,13,13,13,13,13,13,14,14,14,14,15,15,14,15,13,13,13,13,13,13,13,14,14,14,14,14,15,15,15,15],t16_5l:[1,5,7,9,10,10,11,11,12,12,12,13,13,13,14,11,4,6,8,9,10,11,11,11,12,12,12,13,14,13,14,11,7,8,9,10,11,11,12,12,13,12,13,13,13,14,14,12,9,9,10,11,11,12,12,12,13,13,14,14,14,15,15,13,10,10,11,11,12,12,13,13,13,14,14,14,15,15,15,12,10,10,11,11,12,13,13,14,13,14,14,15,15,15,16,13,11,11,11,12,13,13,13,13,14,14,14,14,15,15,16,13,11,11,12,12,13,13,13,14,14,15,15,15,15,17,17,13,11,12,12,13,13,13,14,14,15,15,15,15,16,16,16,13,12,12,12,13,13,14,14,15,15,15,15,16,15,16,15,14,12,13,12,13,14,14,14,14,15,16,16,16,17,17,16,13,13,13,13,13,14,14,15,16,16,16,16,16,16,15,16,14,13,14,14,14,14,15,15,15,15,17,16,16,16,16,18,14,15,14,14,14,15,15,16,16,16,18,17,17,17,19,17,14,14,15,13,14,16,16,15,16,16,17,18,17,19,17,16,14,11,11,11,12,12,13,13,13,14,14,14,14,14,14,14,12],t16l:[1,5,7,9,10,10,11,11,12,12,12,13,13,13,14,10,4,6,8,9,10,11,11,11,12,12,12,13,14,13,14,10,7,8,9,10,11,11,12,12,13,12,13,13,13,14,14,11,9,9,10,11,11,12,12,12,13,13,14,14,14,15,15,12,10,10,11,11,12,12,13,13,13,14,14,14,15,15,15,11,10,10,11,11,12,13,13,14,13,14,14,15,15,15,16,12,11,11,11,12,13,13,13,13,14,14,14,14,15,15,16,12,11,11,12,12,13,13,13,14,14,15,15,15,15,17,17,12,11,12,12,13,13,13,14,14,15,15,15,15,16,16,16,12,12,12,12,13,13,14,14,15,15,15,15,16,15,16,15,13,12,13,12,13,14,14,14,14,15,16,16,16,17,17,16,12,13,13,13,13,14,14,15,16,16,16,16,16,16,15,16,13,13,14,14,14,14,15,15,15,15,17,16,16,16,16,18,13,15,14,14,14,15,15,16,16,16,18,17,17,17,19,17,13,14,15,13,14,16,16,15,16,16,17,18,17,19,17,16,13,10,10,10,11,11,12,12,12,13,13,13,13,13,13,13,10],t24l:[4,5,7,8,9,10,10,11,11,12,12,12,12,12,13,10,5,6,7,8,9,10,10,11,11,11,12,12,12,12,12,10,7,7,8,9,9,10,10,11,11,11,11,12,12,12,13,9,8,8,9,9,10,10,10,11,11,11,11,12,12,12,12,9,9,9,9,10,10,10,10,11,11,11,12,12,12,12,13,9,10,9,10,10,10,10,11,11,11,11,12,12,12,12,12,9,10,10,10,10,10,11,11,11,11,12,12,12,12,12,13,9,11,10,10,10,11,11,11,11,12,12,12,12,12,13,13,10,11,11,11,11,11,11,11,11,11,12,12,12,12,13,13,10,11,11,11,11,11,11,11,12,12,12,12,12,13,13,13,10,12,11,11,11,11,12,12,12,12,12,12,13,13,13,13,10,12,12,11,11,11,12,12,12,12,12,12,13,13,13,13,10,12,12,12,12,12,12,12,12,12,12,13,13,13,13,13,10,12,12,12,12,12,12,12,12,13,13,13,13,13,13,13,10,13,12,12,12,12,12,12,13,13,13,13,13,13,13,13,10,9,9,9,9,9,9,9,9,9,9,9,10,10,10,10,6],t32l:[1,5,5,7,5,8,7,9,5,7,7,9,7,9,9,10],t33l:[4,5,5,6,5,6,6,7,5,6,6,7,6,7,7,8]};r.ht=[new n(0,0,null,null),new n(2,0,r.t1HB,r.t1l),new n(3,0,r.t2HB,r.t2l),new n(3,0,r.t3HB,r.t3l),new n(0,0,null,null),new n(4,0,r.t5HB,r.t5l),new n(4,0,r.t6HB,r.t6l),new n(6,0,r.t7HB,r.t7l),new n(6,0,r.t8HB,r.t8l),new n(6,0,r.t9HB,r.t9l),new n(8,0,r.t10HB,r.t10l),new n(8,0,r.t11HB,r.t11l),new n(8,0,r.t12HB,r.t12l),new n(16,0,r.t13HB,r.t13l),new n(0,0,null,r.t16_5l),new n(16,0,r.t15HB,r.t15l),new n(1,1,r.t16HB,r.t16l),new n(2,3,r.t16HB,r.t16l),new n(3,7,r.t16HB,r.t16l),new n(4,15,r.t16HB,r.t16l),new n(6,63,r.t16HB,r.t16l),new n(8,255,r.t16HB,r.t16l),new n(10,1023,r.t16HB,r.t16l),new n(13,8191,r.t16HB,r.t16l),new n(4,15,r.t24HB,r.t24l),new n(5,31,r.t24HB,r.t24l),new n(6,63,r.t24HB,r.t24l),new n(7,127,r.t24HB,r.t24l),new n(8,255,r.t24HB,r.t24l),new n(9,511,r.t24HB,r.t24l),new n(11,2047,r.t24HB,r.t24l),new n(13,8191,r.t24HB,r.t24l),new n(0,0,r.t32HB,r.t32l),new n(0,0,r.t33HB,r.t33l)],r.largetbl=[65540,327685,458759,589832,655369,655370,720906,720907,786443,786444,786444,851980,851980,851980,917517,655370,262149,393222,524295,589832,655369,720906,720906,720907,786443,786443,786444,851980,917516,851980,917516,655370,458759,524295,589832,655369,720905,720906,786442,786443,851979,786443,851979,851980,851980,917516,917517,720905,589832,589832,655369,720905,720906,786442,786442,786443,851979,851979,917515,917516,917516,983052,983052,786441,655369,655369,720905,720906,786442,786442,851978,851979,851979,917515,917516,917516,983052,983052,983053,720905,655370,655369,720906,720906,786442,851978,851979,917515,851979,917515,917516,983052,983052,983052,1048588,786441,720906,720906,720906,786442,851978,851979,851979,851979,917515,917516,917516,917516,983052,983052,1048589,786441,720907,720906,786442,786442,851979,851979,851979,917515,917516,983052,983052,983052,983052,1114125,1114125,786442,720907,786443,786443,851979,851979,851979,917515,917515,983051,983052,983052,983052,1048588,1048589,1048589,786442,786443,786443,786443,851979,851979,917515,917515,983052,983052,983052,983052,1048588,983053,1048589,983053,851978,786444,851979,786443,851979,917515,917516,917516,917516,983052,1048588,1048588,1048589,1114125,1114125,1048589,786442,851980,851980,851979,851979,917515,917516,983052,1048588,1048588,1048588,1048588,1048589,1048589,983053,1048589,851978,851980,917516,917516,917516,917516,983052,983052,983052,983052,1114124,1048589,1048589,1048589,1048589,1179661,851978,983052,917516,917516,917516,983052,983052,1048588,1048588,1048589,1179661,1114125,1114125,1114125,1245197,1114125,851978,917517,983052,851980,917516,1048588,1048588,983052,1048589,1048589,1114125,1179661,1114125,1245197,1114125,1048589,851978,655369,655369,655369,720905,720905,786441,786441,786441,851977,851977,851977,851978,851978,851978,851978,655366],r.table23=[65538,262147,458759,262148,327684,458759,393222,458759,524296],r.table56=[65539,262148,458758,524296,262148,327684,524294,589831,458757,524294,589831,655368,524295,524295,589832,655369],r.bitrate_table=[[0,8,16,24,32,40,48,56,64,80,96,112,128,144,160,-1],[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1],[0,8,16,24,32,40,48,56,64,-1,-1,-1,-1,-1,-1,-1]],r.samplerate_table=[[22050,24e3,16e3,-1],[44100,48e3,32e3,-1],[11025,12e3,8e3,-1]],r.scfsi_band=[0,6,11,16,21],e.exports=r},335:function(e,t,n){var r=n(299),_=n(298),o=_.System,l=(_.VbrMode,_.Float,_.ShortBlock,_.Util,_.Arrays,_.new_array_n,_.new_byte,_.new_double,_.new_float),f=_.new_float_n;_.new_int,_.new_int_n,_.assert;e.exports=function(){this.l=l(r.SBMAX_l),this.s=f([r.SBMAX_s,3]);var e=this;this.assign=function(t){o.arraycopy(t.l,0,e.l,0,r.SBMAX_l);for(var i=0;i<r.SBMAX_s;i++)for(var n=0;n<3;n++)e.s[i][n]=t.s[i][n]}}},336:function(e,t,n){var r=n(298),_=r.System,o=(r.VbrMode,r.Float,r.ShortBlock,r.Util,r.Arrays,r.new_array_n,r.new_byte,r.new_double,r.new_float,r.new_float_n,r.new_int),l=(r.new_int_n,r.assert,n(299));e.exports=function(e,t,n,r){this.l=o(1+l.SBMAX_l),this.s=o(1+l.SBMAX_s),this.psfb21=o(1+l.PSFB21),this.psfb12=o(1+l.PSFB12);var f=this.l,s=this.s;4==arguments.length&&(this.arrL=arguments[0],this.arrS=arguments[1],this.arr21=arguments[2],this.arr12=arguments[3],_.arraycopy(this.arrL,0,f,0,Math.min(this.arrL.length,this.l.length)),_.arraycopy(this.arrS,0,s,0,Math.min(this.arrS.length,this.s.length)),_.arraycopy(this.arr21,0,this.psfb21,0,Math.min(this.arr21.length,this.psfb21.length)),_.arraycopy(this.arr12,0,this.psfb12,0,Math.min(this.arr12.length,this.psfb12.length)))}},337:function(e,t,n){var r=n(298),_=r.System,o=(r.VbrMode,r.Float,r.ShortBlock,r.Util,r.Arrays);r.new_array_n,r.new_byte,r.new_double,r.new_float,r.new_float_n,r.new_int,r.new_int_n,r.assert;function l(){l.YULE_ORDER,l.MAX_SAMP_FREQ;var e=l.RMS_WINDOW_TIME_NUMERATOR,t=l.RMS_WINDOW_TIME_DENOMINATOR,n=(l.MAX_SAMPLES_PER_WINDOW,[[.038575994352,-3.84664617118067,-.02160367184185,7.81501653005538,-.00123395316851,-11.34170355132042,-9291677959e-14,13.05504219327545,-.01655260341619,-12.28759895145294,.02161526843274,9.4829380631979,-.02074045215285,-5.87257861775999,.00594298065125,2.75465861874613,.00306428023191,-.86984376593551,.00012025322027,.13919314567432,.00288463683916],[.0541865640643,-3.47845948550071,-.02911007808948,6.36317777566148,-.00848709379851,-8.54751527471874,-.00851165645469,9.4769360780128,-.00834990904936,-8.81498681370155,.02245293253339,6.85401540936998,-.02596338512915,-4.39470996079559,.01624864962975,2.19611684890774,-.00240879051584,-.75104302451432,.00674613682247,.13149317958808,-.00187763777362],[.15457299681924,-2.37898834973084,-.09331049056315,2.84868151156327,-.06247880153653,-2.64577170229825,.02163541888798,2.23697657451713,-.05588393329856,-1.67148153367602,.04781476674921,1.00595954808547,.00222312597743,-.45953458054983,.03174092540049,.16378164858596,-.01390589421898,-.05032077717131,.00651420667831,.0234789740702,-.00881362733839],[.30296907319327,-1.61273165137247,-.22613988682123,1.0797749225997,-.08587323730772,-.2565625775407,.03282930172664,-.1627671912044,-.00915702933434,-.22638893773906,-.02364141202522,.39120800788284,-.00584456039913,-.22138138954925,.06276101321749,.04500235387352,-828086748e-14,.02005851806501,.00205861885564,.00302439095741,-.02950134983287],[.33642304856132,-1.49858979367799,-.2557224142557,.87350271418188,-.11828570177555,.12205022308084,.11921148675203,-.80774944671438,-.07834489609479,.47854794562326,-.0046997791438,-.12453458140019,-.0058950022444,-.04067510197014,.05724228140351,.08333755284107,.00832043980773,-.04237348025746,-.0163538138454,.02977207319925,-.0176017656815],[.4491525660845,-.62820619233671,-.14351757464547,.29661783706366,-.22784394429749,-.372563729424,-.01419140100551,.00213767857124,.04078262797139,-.42029820170918,-.12398163381748,.22199650564824,.04097565135648,.00613424350682,.10478503600251,.06747620744683,-.01863887810927,.05784820375801,-.03193428438915,.03222754072173,.00541907748707],[.56619470757641,-1.04800335126349,-.75464456939302,.29156311971249,.1624213774223,-.26806001042947,.16744243493672,.00819999645858,-.18901604199609,.45054734505008,.3093178284183,-.33032403314006,-.27562961986224,.0673936833311,.00647310677246,-.04784254229033,.08647503780351,.01639907836189,-.0378898455484,.01807364323573,-.00588215443421],[.58100494960553,-.51035327095184,-.53174909058578,-.31863563325245,-.14289799034253,-.20256413484477,.17520704835522,.1472815413433,.02377945217615,.38952639978999,.15558449135573,-.23313271880868,-.25344790059353,-.05246019024463,.01628462406333,-.02505961724053,.06920467763959,.02442357316099,-.03721611395801,.01818801111503,-.00749618797172],[.53648789255105,-.2504987195602,-.42163034350696,-.43193942311114,-.00275953611929,-.03424681017675,.04267842219415,-.04678328784242,-.10214864179676,.26408300200955,.14590772289388,.15113130533216,-.02459864859345,-.17556493366449,-.11202315195388,-.18823009262115,-.04060034127,.05477720428674,.0478866554818,.0470440968812,-.02217936801134]]),r=[[.98621192462708,-1.97223372919527,-1.97242384925416,.97261396931306,.98621192462708],[.98500175787242,-1.96977855582618,-1.97000351574484,.9702284756635,.98500175787242],[.97938932735214,-1.95835380975398,-1.95877865470428,.95920349965459,.97938932735214],[.97531843204928,-1.95002759149878,-1.95063686409857,.95124613669835,.97531843204928],[.97316523498161,-1.94561023566527,-1.94633046996323,.94705070426118,.97316523498161],[.96454515552826,-1.92783286977036,-1.92909031105652,.93034775234268,.96454515552826],[.96009142950541,-1.91858953033784,-1.92018285901082,.92177618768381,.96009142950541],[.95856916599601,-1.9154210807478,-1.91713833199203,.91885558323625,.95856916599601],[.94597685600279,-1.88903307939452,-1.89195371200558,.89487434461664,.94597685600279]];function f(input,e,output,t,n,r){for(;0!=n--;)output[t]=1e-10+input[e+0]*r[0]-output[t-1]*r[1]+input[e-1]*r[2]-output[t-2]*r[3]+input[e-2]*r[4]-output[t-3]*r[5]+input[e-3]*r[6]-output[t-4]*r[7]+input[e-4]*r[8]-output[t-5]*r[9]+input[e-5]*r[10]-output[t-6]*r[11]+input[e-6]*r[12]-output[t-7]*r[13]+input[e-7]*r[14]-output[t-8]*r[15]+input[e-8]*r[16]-output[t-9]*r[17]+input[e-9]*r[18]-output[t-10]*r[19]+input[e-10]*r[20],++t,++e}function c(input,e,output,t,n,r){for(;0!=n--;)output[t]=input[e+0]*r[0]-output[t-1]*r[1]+input[e-1]*r[2]-output[t-2]*r[3]+input[e-2]*r[4],++t,++e}function h(e){return e*e}this.InitGainAnalysis=function(n,r){return function(n,r){for(var i=0;i<MAX_ORDER;i++)n.linprebuf[i]=n.lstepbuf[i]=n.loutbuf[i]=n.rinprebuf[i]=n.rstepbuf[i]=n.routbuf[i]=0;switch(0|r){case 48e3:n.reqindex=0;break;case 44100:n.reqindex=1;break;case 32e3:n.reqindex=2;break;case 24e3:n.reqindex=3;break;case 22050:n.reqindex=4;break;case 16e3:n.reqindex=5;break;case 12e3:n.reqindex=6;break;case 11025:n.reqindex=7;break;case 8e3:n.reqindex=8;break;default:return INIT_GAIN_ANALYSIS_ERROR}return n.sampleWindow=0|(r*e+t-1)/t,n.lsum=0,n.rsum=0,n.totsamp=0,o.ill(n.A,0),INIT_GAIN_ANALYSIS_OK}(n,r)!=INIT_GAIN_ANALYSIS_OK?INIT_GAIN_ANALYSIS_ERROR:(n.linpre=MAX_ORDER,n.rinpre=MAX_ORDER,n.lstep=MAX_ORDER,n.rstep=MAX_ORDER,n.lout=MAX_ORDER,n.rout=MAX_ORDER,o.fill(n.B,0),INIT_GAIN_ANALYSIS_OK)},this.AnalyzeSamples=function(e,t,o,m,d,v,S){var w,A,M,R,y,B,E;if(0==v)return GAIN_ANALYSIS_OK;switch(E=0,y=v,S){case 1:m=t,d=o;break;case 2:break;default:return GAIN_ANALYSIS_ERROR}for(v<MAX_ORDER?(_.arraycopy(t,o,e.linprebuf,MAX_ORDER,v),_.arraycopy(m,d,e.rinprebuf,MAX_ORDER,v)):(_.arraycopy(t,o,e.linprebuf,MAX_ORDER,MAX_ORDER),_.arraycopy(m,d,e.rinprebuf,MAX_ORDER,MAX_ORDER));y>0;){B=y>e.sampleWindow-e.totsamp?e.sampleWindow-e.totsamp:y,E<MAX_ORDER?(w=e.linpre+E,A=e.linprebuf,M=e.rinpre+E,R=e.rinprebuf,B>MAX_ORDER-E&&(B=MAX_ORDER-E)):(w=o+E,A=t,M=d+E,R=m),f(A,w,e.lstepbuf,e.lstep+e.totsamp,B,n[e.reqindex]),f(R,M,e.rstepbuf,e.rstep+e.totsamp,B,n[e.reqindex]),c(e.lstepbuf,e.lstep+e.totsamp,e.loutbuf,e.lout+e.totsamp,B,r[e.reqindex]),c(e.rstepbuf,e.rstep+e.totsamp,e.routbuf,e.rout+e.totsamp,B,r[e.reqindex]),w=e.lout+e.totsamp,A=e.loutbuf,M=e.rout+e.totsamp,R=e.routbuf;for(var i=B%8;0!=i--;)e.lsum+=h(A[w++]),e.rsum+=h(R[M++]);for(i=B/8;0!=i--;)e.lsum+=h(A[w+0])+h(A[w+1])+h(A[w+2])+h(A[w+3])+h(A[w+4])+h(A[w+5])+h(A[w+6])+h(A[w+7]),w+=8,e.rsum+=h(R[M+0])+h(R[M+1])+h(R[M+2])+h(R[M+3])+h(R[M+4])+h(R[M+5])+h(R[M+6])+h(R[M+7]),M+=8;if(y-=B,E+=B,e.totsamp+=B,e.totsamp==e.sampleWindow){var T=10*l.STEPS_per_dB*Math.log10((e.lsum+e.rsum)/e.totsamp*.5+1e-37),x=T<=0?0:0|T;x>=e.A.length&&(x=e.A.length-1),e.A[x]++,e.lsum=e.rsum=0,_.arraycopy(e.loutbuf,e.totsamp,e.loutbuf,0,MAX_ORDER),_.arraycopy(e.routbuf,e.totsamp,e.routbuf,0,MAX_ORDER),_.arraycopy(e.lstepbuf,e.totsamp,e.lstepbuf,0,MAX_ORDER),_.arraycopy(e.rstepbuf,e.totsamp,e.rstepbuf,0,MAX_ORDER),e.totsamp=0}if(e.totsamp>e.sampleWindow)return GAIN_ANALYSIS_ERROR}return v<MAX_ORDER?(_.arraycopy(e.linprebuf,v,e.linprebuf,0,MAX_ORDER-v),_.arraycopy(e.rinprebuf,v,e.rinprebuf,0,MAX_ORDER-v),_.arraycopy(t,o,e.linprebuf,MAX_ORDER-v,v),_.arraycopy(m,d,e.rinprebuf,MAX_ORDER-v,v)):(_.arraycopy(t,o+v-MAX_ORDER,e.linprebuf,0,MAX_ORDER),_.arraycopy(m,d+v-MAX_ORDER,e.rinprebuf,0,MAX_ORDER)),GAIN_ANALYSIS_OK},this.GetTitleGain=function(e){for(var t=function(e,t){var i,n=0;for(i=0;i<t;i++)n+=e[i];if(0==n)return GAIN_NOT_ENOUGH_SAMPLES;var r=0|Math.ceil(n*(1-.95));for(i=t;i-- >0&&!((r-=e[i])<=0););return 64.82-i/l.STEPS_per_dB}(e.A,e.A.length),i=0;i<e.A.length;i++)e.B[i]+=e.A[i],e.A[i]=0;for(i=0;i<MAX_ORDER;i++)e.linprebuf[i]=e.lstepbuf[i]=e.loutbuf[i]=e.rinprebuf[i]=e.rstepbuf[i]=e.routbuf[i]=0;return e.totsamp=0,e.lsum=e.rsum=0,t}}l.STEPS_per_dB=100,l.MAX_dB=120,l.GAIN_NOT_ENOUGH_SAMPLES=-24601,l.GAIN_ANALYSIS_ERROR=0,l.GAIN_ANALYSIS_OK=1,l.INIT_GAIN_ANALYSIS_ERROR=0,l.INIT_GAIN_ANALYSIS_OK=1,l.YULE_ORDER=10,l.MAX_ORDER=l.YULE_ORDER,l.MAX_SAMP_FREQ=48e3,l.RMS_WINDOW_TIME_NUMERATOR=1,l.RMS_WINDOW_TIME_DENOMINATOR=20,l.MAX_SAMPLES_PER_WINDOW=l.MAX_SAMP_FREQ*l.RMS_WINDOW_TIME_NUMERATOR/l.RMS_WINDOW_TIME_DENOMINATOR+1,e.exports=l},338:function(e,t){e.exports=function(e){this.bits=e}},339:function(e,t,n){var r=n(298),_=r.System,o=(r.VbrMode,r.Float,r.ShortBlock,r.Util,r.Arrays),l=(r.new_array_n,r.new_byte,r.new_double,r.new_float,r.new_float_n,r.new_int),f=(r.new_int_n,r.assert),c=n(299),h=n(325),m=n(323),d=n(340);e.exports=function e(){var t=null;function n(b){this.bits=0|b}this.qupvt=null,this.setModules=function(e){this.qupvt=e,t=e};var r=[[0,0],[0,0],[0,0],[0,0],[0,0],[0,1],[1,1],[1,1],[1,2],[2,2],[2,3],[2,3],[3,4],[3,4],[3,4],[4,5],[4,5],[4,6],[5,6],[5,6],[5,7],[6,7],[6,7]];function v(e,t,n,r,_,o){var l=.5946/t;for(f(e>0),e>>=1;0!=e--;)_[o++]=l>n[r++]?0:1,_[o++]=l>n[r++]?0:1}function S(e,n,r,_,o,l){f(e>0);var c=(e>>=1)%2;for(e>>=1;0!=e--;){var h,m,d,v,S,w,A,M;h=r[_++]*n,m=r[_++]*n,S=0|h,d=r[_++]*n,w=0|m,v=r[_++]*n,A=0|d,h+=t.adj43[S],M=0|v,m+=t.adj43[w],o[l++]=0|h,d+=t.adj43[A],o[l++]=0|m,v+=t.adj43[M],o[l++]=0|d,o[l++]=0|v}0!=c&&(S=0|(h=r[_++]*n),w=0|(m=r[_++]*n),h+=t.adj43[S],m+=t.adj43[w],o[l++]=0|h,o[l++]=0|m)}var w=[1,2,5,7,7,10,10,13,13,13,13,13,13,13,13];function A(e,t,n,s){var r=function(e,t,n){var r=0,_=0;do{var o=e[t++],l=e[t++];r<o&&(r=o),_<l&&(_=l)}while(t<n);return r<_&&(r=_),r}(e,t,n);switch(r){case 0:return r;case 1:return function(e,t,n,s){var r=0,_=h.ht[1].hlen;do{var o=2*e[t+0]+e[t+1];t+=2,r+=_[o]}while(t<n);return s.bits+=r,1}(e,t,n,s);case 2:case 3:return function(e,t,n,r,s){var _,o,l=0,f=h.ht[r].xlen;o=2==r?h.table23:h.table56;do{var c=e[t+0]*f+e[t+1];t+=2,l+=o[c]}while(t<n);return _=65535&l,(l>>=16)>_&&(l=_,r++),s.bits+=l,r}(e,t,n,w[r-1],s);case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:return function(e,t,n,r,s){var _=0,o=0,l=0,f=h.ht[r].xlen,c=h.ht[r].hlen,m=h.ht[r+1].hlen,d=h.ht[r+2].hlen;do{var v=e[t+0]*f+e[t+1];t+=2,_+=c[v],o+=m[v],l+=d[v]}while(t<n);var S=r;return _>o&&(_=o,S++),_>l&&(_=l,S=r+2),s.bits+=_,S}(e,t,n,w[r-1],s);default:if(r>d.IXMAX_VAL)return s.bits=d.LARGE_BITS,-1;var _,o;for(r-=15,_=24;_<32&&!(h.ht[_].linmax>=r);_++);for(o=_-8;o<24&&!(h.ht[o].linmax>=r);o++);return function(e,t,n,r,_,s){var o,l=65536*h.ht[r].xlen+h.ht[_].xlen,f=0;do{var c=e[t++],m=e[t++];0!=c&&(c>14&&(c=15,f+=l),c*=16),0!=m&&(m>14&&(m=15,f+=l),c+=m),f+=h.largetbl[c]}while(t<n);return o=65535&f,(f>>=16)>o&&(f=o,r=_),s.bits+=f,r}(e,t,n,o,_,s)}}function M(e,t,r,_,o,l,f,h){for(var m=t.big_values,d=2;d<c.SBMAX_l+1;d++){var v=e.scalefac_band.l[d];if(v>=m)break;var S=o[d-2]+t.count1bits;if(r.part2_3_length<=S)break;var w=new n(S),M=A(_,v,m,w);S=w.bits,r.part2_3_length<=S||(r.assign(t),r.part2_3_length=S,r.region0_count=l[d-2],r.region1_count=d-2-l[d-2],r.table_select[0]=f[d-2],r.table_select[1]=h[d-2],r.table_select[2]=M)}}this.noquant_count_bits=function(e,t,r){var _=t.l3_enc,i=Math.min(576,t.max_nonzero_coeff+2>>1<<1);for(null!=r&&(r.sfb_count1=0);i>1&&0==(_[i-1]|_[i-2]);i-=2);t.count1=i;for(var o=0,l=0;i>3;i-=4){var p;if((2147483647&(_[i-1]|_[i-2]|_[i-3]|_[i-4]))>1)break;p=2*(2*(2*_[i-4]+_[i-3])+_[i-2])+_[i-1],o+=h.t32l[p],l+=h.t33l[p]}var m=o;if(t.count1table_select=0,o>l&&(m=l,t.count1table_select=1),t.count1bits=m,t.big_values=i,0==i)return m;if(t.block_type==c.SHORT_TYPE)(o=3*e.scalefac_band.s[3])>t.big_values&&(o=t.big_values),l=t.big_values;else if(t.block_type==c.NORM_TYPE){if(f(i<=576),o=t.region0_count=e.bv_scf[i-2],l=t.region1_count=e.bv_scf[i-1],f(o+l+2<c.SBPSY_l),l=e.scalefac_band.l[o+l+2],o=e.scalefac_band.l[o+1],l<i){var d=new n(m);t.table_select[2]=A(_,l,i,d),m=d.bits}}else t.region0_count=7,t.region1_count=c.SBMAX_l-1-7-1,(o=e.scalefac_band.l[8])>(l=i)&&(o=l);if(o=Math.min(o,i),l=Math.min(l,i),f(o>=0),f(l>=0),0<o){d=new n(m);t.table_select[0]=A(_,0,o,d),m=d.bits}if(o<l){d=new n(m);t.table_select[1]=A(_,o,l,d),m=d.bits}if(2==e.use_best_huffman&&(t.part2_3_length=m,best_huffman_divide(e,t),m=t.part2_3_length),null!=r&&t.block_type==c.NORM_TYPE){for(var v=0;e.scalefac_band.l[v]<t.big_values;)v++;r.sfb_count1=v}return m},this.count_bits=function(e,n,r,_){var l=r.l3_enc,h=d.IXMAX_VAL/t.IPOW20(r.global_gain);if(r.xrpow_max>h)return d.LARGE_BITS;if(function(e,n,r,_,l){var h,m,d,w=0,A=0,M=0,R=0,y=n,B=0,E=y,T=0,x=e,k=0;for(d=null!=l&&_.global_gain==l.global_gain,m=_.block_type==c.SHORT_TYPE?38:21,h=0;h<=m;h++){var P=-1;if((d||_.block_type==c.NORM_TYPE)&&(P=_.global_gain-(_.scalefac[h]+(0!=_.preflag?t.pretab[h]:0)<<_.scalefac_scale+1)-8*_.subblock_gain[_.window[h]]),f(_.width[h]>=0),d&&l.step[h]==P)0!=A&&(S(A,r,x,k,E,T),A=0),0!=M&&(v(M,r,x,k,E,T),M=0);else{var I,V=_.width[h];if(w+_.width[h]>_.max_nonzero_coeff&&(I=_.max_nonzero_coeff-w+1,o.fill(n,_.max_nonzero_coeff,576,0),(V=I)<0&&(V=0),h=m+1),0==A&&0==M&&(E=y,T=B,x=e,k=R),null!=l&&l.sfb_count1>0&&h>=l.sfb_count1&&l.step[h]>0&&P>=l.step[h]?(0!=A&&(S(A,r,x,k,E,T),A=0,E=y,T=B,x=e,k=R),M+=V):(0!=M&&(v(M,r,x,k,E,T),M=0,E=y,T=B,x=e,k=R),A+=V),V<=0){0!=M&&(v(M,r,x,k,E,T),M=0),0!=A&&(S(A,r,x,k,E,T),A=0);break}}h<=m&&(B+=_.width[h],R+=_.width[h],w+=_.width[h])}0!=A&&(S(A,r,x,k,E,T),A=0),0!=M&&(v(M,r,x,k,E,T),M=0)}(n,l,t.IPOW20(r.global_gain),r,_),0!=(2&e.substep_shaping))for(var m=0,w=r.global_gain+r.scalefac_scale,A=.634521682242439/t.IPOW20(w),M=0;M<r.sfbmax;M++){var R,y=r.width[M];if(f(y>=0),0==e.pseudohalf[M])m+=y;else for(R=m,m+=y;R<m;++R)l[R]=n[R]>=A?l[R]:0}return this.noquant_count_bits(e,r,_)},this.best_huffman_divide=function(e,t){var r=new m,_=t.l3_enc,o=l(23),v=l(23),S=l(23),w=l(23);if(t.block_type!=c.SHORT_TYPE||1!=e.mode_gr){r.assign(t),t.block_type==c.NORM_TYPE&&(!function(e,t,r,_,o,l,f){for(var c=t.big_values,h=0;h<=22;h++)_[h]=d.LARGE_BITS;for(h=0;h<16;h++){var m=e.scalefac_band.l[h+1];if(m>=c)break;var v=0,S=new n(v),w=A(r,0,m,S);v=S.bits;for(var M=0;M<8;M++){var R=e.scalefac_band.l[h+M+2];if(R>=c)break;var y=v,B=A(r,m,R,S=new n(y));y=S.bits,_[h+M]>y&&(_[h+M]=y,o[h+M]=h,l[h+M]=w,f[h+M]=B)}}}(e,t,_,o,v,S,w),M(e,r,t,_,o,v,S,w));var i=r.big_values;if(!(0==i||(_[i-2]|_[i-1])>1||(i=t.count1+2)>576)){r.assign(t),r.count1=i;var R=0,y=0;for(f(i<=576);i>r.big_values;i-=4){var p=2*(2*(2*_[i-4]+_[i-3])+_[i-2])+_[i-1];R+=h.t32l[p],y+=h.t33l[p]}if(r.big_values=i,r.count1table_select=0,R>y&&(R=y,r.count1table_select=1),r.count1bits=R,r.block_type==c.NORM_TYPE)M(e,r,t,_,o,v,S,w);else{if(r.part2_3_length=R,(R=e.scalefac_band.l[8])>i&&(R=i),R>0){var B=new n(r.part2_3_length);r.table_select[0]=A(_,0,R,B),r.part2_3_length=B.bits}if(i>R){B=new n(r.part2_3_length);r.table_select[1]=A(_,R,i,B),r.part2_3_length=B.bits}t.part2_3_length>r.part2_3_length&&t.assign(r)}}}};var R=[1,1,1,1,8,2,2,2,4,4,4,8,8,8,16,16],y=[1,2,4,8,1,2,4,8,2,4,8,2,4,8,4,8],B=[0,0,0,0,3,1,1,1,2,2,2,3,3,3,4,4],E=[0,1,2,3,0,1,2,3,1,2,3,1,2,3,2,3];e.slen1_tab=B,e.slen2_tab=E,this.best_scalefac_store=function(e,n,r,_){var o,i,l,m,d=_.tt[n][r],v=0;for(l=0,o=0;o<d.sfbmax;o++){var S=d.width[o];for(f(S>=0),l+=S,m=-S;m<0&&0==d.l3_enc[m+l];m++);0==m&&(d.scalefac[o]=v=-2)}if(0==d.scalefac_scale&&0==d.preflag){var s=0;for(o=0;o<d.sfbmax;o++)d.scalefac[o]>0&&(s|=d.scalefac[o]);if(0==(1&s)&&0!=s){for(o=0;o<d.sfbmax;o++)d.scalefac[o]>0&&(d.scalefac[o]>>=1);d.scalefac_scale=v=1}}if(0==d.preflag&&d.block_type!=c.SHORT_TYPE&&2==e.mode_gr){for(o=11;o<c.SBPSY_l&&!(d.scalefac[o]<t.pretab[o]&&-2!=d.scalefac[o]);o++);if(o==c.SBPSY_l){for(o=11;o<c.SBPSY_l;o++)d.scalefac[o]>0&&(d.scalefac[o]-=t.pretab[o]);d.preflag=v=1}}for(i=0;i<4;i++)_.scfsi[r][i]=0;for(2==e.mode_gr&&1==n&&_.tt[0][r].block_type!=c.SHORT_TYPE&&_.tt[1][r].block_type!=c.SHORT_TYPE&&(!function(e,t){for(var n,r=t.tt[1][e],_=t.tt[0][e],i=0;i<h.scfsi_band.length-1;i++){for(n=h.scfsi_band[i];n<h.scfsi_band[i+1]&&!(_.scalefac[n]!=r.scalefac[n]&&r.scalefac[n]>=0);n++);if(n==h.scfsi_band[i+1]){for(n=h.scfsi_band[i];n<h.scfsi_band[i+1];n++)r.scalefac[n]=-1;t.scfsi[e][i]=1}}var o=0,l=0;for(n=0;n<11;n++)-1!=r.scalefac[n]&&(l++,o<r.scalefac[n]&&(o=r.scalefac[n]));for(var f=0,m=0;n<c.SBPSY_l;n++)-1!=r.scalefac[n]&&(m++,f<r.scalefac[n]&&(f=r.scalefac[n]));for(i=0;i<16;i++)if(o<R[i]&&f<y[i]){var d=B[i]*l+E[i]*m;r.part2_length>d&&(r.part2_length=d,r.scalefac_compress=i)}}(r,_),v=0),o=0;o<d.sfbmax;o++)-2==d.scalefac[o]&&(d.scalefac[o]=0);0!=v&&(2==e.mode_gr?this.scale_bitcount(d):this.scale_bitcount_lsf(e,d))};var T=[0,18,36,54,54,36,54,72,54,72,90,72,90,108,108,126],x=[0,18,36,54,51,35,53,71,52,70,88,69,87,105,104,122],k=[0,10,20,30,33,21,31,41,32,42,52,43,53,63,64,74];this.scale_bitcount=function(e){var n,r,_,o=0,l=0,h=e.scalefac;if(f(function(e,t){for(var i=0;i<t;++i)if(e[i]<0)return!1;return!0}(h,e.sfbmax)),e.block_type==c.SHORT_TYPE)_=T,0!=e.mixed_block_flag&&(_=x);else if(_=k,0==e.preflag){for(r=11;r<c.SBPSY_l&&!(h[r]<t.pretab[r]);r++);if(r==c.SBPSY_l)for(e.preflag=1,r=11;r<c.SBPSY_l;r++)h[r]-=t.pretab[r]}for(r=0;r<e.sfbdivide;r++)o<h[r]&&(o=h[r]);for(;r<e.sfbmax;r++)l<h[r]&&(l=h[r]);for(e.part2_length=d.LARGE_BITS,n=0;n<16;n++)o<R[n]&&l<y[n]&&e.part2_length>_[n]&&(e.part2_length=_[n],e.scalefac_compress=n);return e.part2_length==d.LARGE_BITS};var P=[[15,15,7,7],[15,15,7,0],[7,3,0,0],[15,31,31,0],[7,7,7,0],[3,3,0,0]];this.scale_bitcount_lsf=function(e,n){var r,o,h,m,d,v,i,S,w=l(4),A=n.scalefac;for(r=0!=n.preflag?2:0,i=0;i<4;i++)w[i]=0;if(n.block_type==c.SHORT_TYPE){o=1;var M=t.nr_of_sfb_block[r][o];for(S=0,h=0;h<4;h++)for(m=M[h]/3,i=0;i<m;i++,S++)for(d=0;d<3;d++)A[3*S+d]>w[h]&&(w[h]=A[3*S+d])}else{o=0;M=t.nr_of_sfb_block[r][o];for(S=0,h=0;h<4;h++)for(m=M[h],i=0;i<m;i++,S++)A[S]>w[h]&&(w[h]=A[S])}for(v=!1,h=0;h<4;h++)w[h]>P[r][h]&&(v=!0);if(!v){var R,y,B,E;for(n.sfb_partition_table=t.nr_of_sfb_block[r][o],h=0;h<4;h++)n.slen[h]=I[w[h]];switch(R=n.slen[0],y=n.slen[1],B=n.slen[2],E=n.slen[3],r){case 0:n.scalefac_compress=(5*R+y<<4)+(B<<2)+E;break;case 1:n.scalefac_compress=400+(5*R+y<<2)+B;break;case 2:n.scalefac_compress=500+3*R+y;break;default:_.err.printf("intensity stereo not implemented yet\n")}}if(!v)for(f(null!=n.sfb_partition_table),n.part2_length=0,h=0;h<4;h++)n.part2_length+=n.slen[h]*n.sfb_partition_table[h];return v};var I=[0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4];this.huffman_init=function(e){for(var i=2;i<=576;i+=2){for(var t,n=0;e.scalefac_band.l[++n]<i;);for(t=r[n][0];e.scalefac_band.l[t+1]>i;)t--;for(t<0&&(t=r[n][0]),e.bv_scf[i-2]=t,t=r[n][1];e.scalefac_band.l[t+e.bv_scf[i-2]+2]>i;)t--;t<0&&(t=r[n][1]),e.bv_scf[i-1]=t}}}},340:function(e,t,n){var r=n(336),_=n(298),o=(_.System,_.VbrMode),l=_.Float,f=(_.ShortBlock,_.Util),c=(_.Arrays,_.new_array_n,_.new_byte,_.new_double,_.new_float),h=(_.new_float_n,_.new_int),m=(_.new_int_n,_.assert),d=n(299),v=n(338),S=n(312);function w(){var e=n(324),t=null,_=null,A=null;this.setModules=function(e,n,r){t=e,_=n,A=r},this.IPOW20=function(e){return m(0<=e&&e<w.Q_MAX),x[e]};var M=2220446049250313e-31,R=w.IXMAX_VAL+2,y=w.Q_MAX,B=w.Q_MAX2;w.LARGE_BITS;this.nr_of_sfb_block=[[[6,5,5,5],[9,9,9,9],[6,9,9,9]],[[6,5,7,3],[9,9,12,6],[6,9,12,6]],[[11,10,0,0],[18,18,0,0],[15,18,0,0]],[[7,7,7,0],[12,12,12,0],[6,15,12,0]],[[6,6,6,3],[12,9,9,6],[6,12,9,6]],[[8,8,5,0],[15,12,9,0],[6,18,9,0]]];var E=[0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,2,3,3,3,2,0];this.pretab=E,this.sfBandIndex=[new r([0,6,12,18,24,30,36,44,54,66,80,96,116,140,168,200,238,284,336,396,464,522,576],[0,4,8,12,18,24,32,42,56,74,100,132,174,192],[0,0,0,0,0,0,0],[0,0,0,0,0,0,0]),new r([0,6,12,18,24,30,36,44,54,66,80,96,114,136,162,194,232,278,332,394,464,540,576],[0,4,8,12,18,26,36,48,62,80,104,136,180,192],[0,0,0,0,0,0,0],[0,0,0,0,0,0,0]),new r([0,6,12,18,24,30,36,44,54,66,80,96,116,140,168,200,238,284,336,396,464,522,576],[0,4,8,12,18,26,36,48,62,80,104,134,174,192],[0,0,0,0,0,0,0],[0,0,0,0,0,0,0]),new r([0,4,8,12,16,20,24,30,36,44,52,62,74,90,110,134,162,196,238,288,342,418,576],[0,4,8,12,16,22,30,40,52,66,84,106,136,192],[0,0,0,0,0,0,0],[0,0,0,0,0,0,0]),new r([0,4,8,12,16,20,24,30,36,42,50,60,72,88,106,128,156,190,230,276,330,384,576],[0,4,8,12,16,22,28,38,50,64,80,100,126,192],[0,0,0,0,0,0,0],[0,0,0,0,0,0,0]),new r([0,4,8,12,16,20,24,30,36,44,54,66,82,102,126,156,194,240,296,364,448,550,576],[0,4,8,12,16,22,30,42,58,78,104,138,180,192],[0,0,0,0,0,0,0],[0,0,0,0,0,0,0]),new r([0,6,12,18,24,30,36,44,54,66,80,96,116,140,168,200,238,284,336,396,464,522,576],[0,4,8,12,18,26,36,48,62,80,104,134,174,192],[0,0,0,0,0,0,0],[0,0,0,0,0,0,0]),new r([0,6,12,18,24,30,36,44,54,66,80,96,116,140,168,200,238,284,336,396,464,522,576],[0,4,8,12,18,26,36,48,62,80,104,134,174,192],[0,0,0,0,0,0,0],[0,0,0,0,0,0,0]),new r([0,12,24,36,48,60,72,88,108,132,160,192,232,280,336,400,476,566,568,570,572,574,576],[0,8,16,24,36,52,72,96,124,160,162,164,166,192],[0,0,0,0,0,0,0],[0,0,0,0,0,0,0])];var T=c(y+B+1),x=c(y),k=c(R),P=c(R);function I(e,t){var n=A.ATHformula(t,e);return n-=100,n=Math.pow(10,n/10+e.ATHlower)}function V(e){this.s=e}this.adj43=P,this.iteration_init=function(e){var i,n=e.internal_flags,r=n.l3_side;if(0==n.iteration_init_init){for(n.iteration_init_init=1,r.main_data_begin=0,function(e){for(var t=e.internal_flags.ATH.l,n=e.internal_flags.ATH.psfb21,r=e.internal_flags.ATH.s,_=e.internal_flags.ATH.psfb12,o=e.internal_flags,f=e.out_samplerate,c=0;c<d.SBMAX_l;c++){var h=o.scalefac_band.l[c],m=o.scalefac_band.l[c+1];t[c]=l.MAX_VALUE;for(var i=h;i<m;i++){var v=I(e,i*f/1152);t[c]=Math.min(t[c],v)}}for(c=0;c<d.PSFB21;c++)for(h=o.scalefac_band.psfb21[c],m=o.scalefac_band.psfb21[c+1],n[c]=l.MAX_VALUE,i=h;i<m;i++)v=I(e,i*f/1152),n[c]=Math.min(n[c],v);for(c=0;c<d.SBMAX_s;c++){for(h=o.scalefac_band.s[c],m=o.scalefac_band.s[c+1],r[c]=l.MAX_VALUE,i=h;i<m;i++)v=I(e,i*f/384),r[c]=Math.min(r[c],v);r[c]*=o.scalefac_band.s[c+1]-o.scalefac_band.s[c]}for(c=0;c<d.PSFB12;c++){for(h=o.scalefac_band.psfb12[c],m=o.scalefac_band.psfb12[c+1],_[c]=l.MAX_VALUE,i=h;i<m;i++)v=I(e,i*f/384),_[c]=Math.min(_[c],v);_[c]*=o.scalefac_band.s[13]-o.scalefac_band.s[12]}if(e.noATH){for(c=0;c<d.SBMAX_l;c++)t[c]=1e-20;for(c=0;c<d.PSFB21;c++)n[c]=1e-20;for(c=0;c<d.SBMAX_s;c++)r[c]=1e-20;for(c=0;c<d.PSFB12;c++)_[c]=1e-20}o.ATH.floor=10*Math.log10(I(e,-1))}(e),k[0]=0,i=1;i<R;i++)k[i]=Math.pow(i,4/3);for(i=0;i<R-1;i++)P[i]=i+1-Math.pow(.5*(k[i]+k[i+1]),.75);for(P[i]=.5,i=0;i<y;i++)x[i]=Math.pow(2,-.1875*(i-210));for(i=0;i<=y+B;i++)T[i]=Math.pow(2,.25*(i-210-B));var _,o,f,c;for(t.huffman_init(n),(i=e.exp_nspsytune>>2&63)>=32&&(i-=64),_=Math.pow(10,i/4/10),(i=e.exp_nspsytune>>8&63)>=32&&(i-=64),o=Math.pow(10,i/4/10),(i=e.exp_nspsytune>>14&63)>=32&&(i-=64),f=Math.pow(10,i/4/10),(i=e.exp_nspsytune>>20&63)>=32&&(i-=64),c=f*Math.pow(10,i/4/10),i=0;i<d.SBMAX_l;i++){h=i<=6?_:i<=13?o:i<=20?f:c,n.nsPsy.longfact[i]=h}for(i=0;i<d.SBMAX_s;i++){var h;h=i<=5?_:i<=10?o:i<=11?f:c,n.nsPsy.shortfact[i]=h}}},this.on_pe=function(e,t,n,r,o,l){var f,c,d=e.internal_flags,w=0,A=h(2),M=new v(w),R=_.ResvMaxBits(e,r,M,l),y=(w=M.bits)+R;for(y>S.MAX_BITS_PER_GRANULE&&(y=S.MAX_BITS_PER_GRANULE),f=0,c=0;c<d.channels_out;++c)n[c]=Math.min(S.MAX_BITS_PER_CHANNEL,w/d.channels_out),A[c]=0|n[c]*t[o][c]/700-n[c],A[c]>3*r/4&&(A[c]=3*r/4),A[c]<0&&(A[c]=0),A[c]+n[c]>S.MAX_BITS_PER_CHANNEL&&(A[c]=Math.max(0,S.MAX_BITS_PER_CHANNEL-n[c])),f+=A[c];if(f>R)for(c=0;c<d.channels_out;++c)A[c]=R*A[c]/f;for(c=0;c<d.channels_out;++c)n[c]+=A[c],R-=A[c];for(f=0,c=0;c<d.channels_out;++c)f+=n[c];if(f>S.MAX_BITS_PER_GRANULE){var B=0;for(c=0;c<d.channels_out;++c)n[c]*=S.MAX_BITS_PER_GRANULE,n[c]/=f,B+=n[c];m(B<=S.MAX_BITS_PER_GRANULE)}return y},this.reduce_side=function(e,t,n,r){m(r<=S.MAX_BITS_PER_GRANULE),m(e[0]+e[1]<=S.MAX_BITS_PER_GRANULE);var _=.33*(.5-t)/.5;_<0&&(_=0),_>.5&&(_=.5);var o=0|.5*_*(e[0]+e[1]);o>S.MAX_BITS_PER_CHANNEL-e[0]&&(o=S.MAX_BITS_PER_CHANNEL-e[0]),o<0&&(o=0),e[1]>=125&&(e[1]-o>125?(e[0]<n&&(e[0]+=o),e[1]-=o):(e[0]+=e[1]-125,e[1]=125)),(o=e[0]+e[1])>r&&(e[0]=r*e[0]/o,e[1]=r*e[1]/o),m(e[0]<=S.MAX_BITS_PER_CHANNEL),m(e[1]<=S.MAX_BITS_PER_CHANNEL),m(e[0]+e[1]<=S.MAX_BITS_PER_GRANULE)},this.athAdjust=function(a,e,t){var n=90.30873362,u=f.FAST_LOG10_X(e,10),r=a*a,_=0;return u-=t,r>1e-20&&(_=1+f.FAST_LOG10_X(r,10/n)),_<0&&(_=0),u*=_,u+=t+n-94.82444863,Math.pow(10,.1*u)},this.calc_xmin=function(t,n,r,_){var l,f=0,c=t.internal_flags,h=0,m=0,v=c.ATH,S=r.xr,w=t.VBR==o.vbr_mtrh?1:0,A=c.masking_lower;for(t.VBR!=o.vbr_mtrh&&t.VBR!=o.vbr_mt||(A=1),l=0;l<r.psy_lmax;l++){k=(x=t.VBR==o.vbr_rh||t.VBR==o.vbr_mtrh?athAdjust(v.adjust,v.l[l],v.floor):v.adjust*v.l[l])/(E=r.width[l]),P=M,H=E>>1,O=0;do{O+=L=S[h]*S[h],P+=L<k?L:k,O+=N=S[++h]*S[h],P+=N<k?N:k,h++}while(--H>0);if(O>x&&m++,l==d.SBPSY_l)P<(V=x*c.nsPsy.longfact[l])&&(P=V);if(0!=w&&(x=P),!t.ATHonly)if((I=n.en.l[l])>0)V=O*n.thm.l[l]*A/I,0!=w&&(V*=c.nsPsy.longfact[l]),x<V&&(x=V);_[f++]=0!=w?x:x*c.nsPsy.longfact[l]}var R=575;if(r.block_type!=d.SHORT_TYPE)for(var y=576;0!=y--&&e.EQ(S[y],0);)R=y;r.max_nonzero_coeff=R;for(var B=r.sfb_smin;l<r.psymax;B++,l+=3){var E,b,T;for(T=t.VBR==o.vbr_rh||t.VBR==o.vbr_mtrh?athAdjust(v.adjust,v.s[B],v.floor):v.adjust*v.s[B],E=r.width[l],b=0;b<3;b++){var x,k,P,I,V,O=0,H=E>>1;k=T/E,P=M;do{var L,N;O+=L=S[h]*S[h],P+=L<k?L:k,O+=N=S[++h]*S[h],P+=N<k?N:k,h++}while(--H>0);if(O>T&&m++,B==d.SBPSY_s)P<(V=T*c.nsPsy.shortfact[B])&&(P=V);if(x=0!=w?P:T,!t.ATHonly&&!t.ATHshort)if((I=n.en.s[B][b])>0)V=O*n.thm.s[B][b]*A/I,0!=w&&(V*=c.nsPsy.shortfact[B]),x<V&&(x=V);_[f++]=0!=w?x:x*c.nsPsy.shortfact[B]}t.useTemporal&&(_[f-3]>_[f-3+1]&&(_[f-3+1]+=(_[f-3]-_[f-3+1])*c.decay),_[f-3+1]>_[f-3+2]&&(_[f-3+2]+=(_[f-3+1]-_[f-3+2])*c.decay))}return m},this.calc_noise_core=function(e,t,n,r){var _=0,o=t.s,l=e.l3_enc;if(o>e.count1)for(;0!=n--;){h=e.xr[o],o++,_+=h*h,h=e.xr[o],o++,_+=h*h}else if(o>e.big_values){var f=c(2);for(f[0]=0,f[1]=r;0!=n--;){h=Math.abs(e.xr[o])-f[l[o]],o++,_+=h*h,h=Math.abs(e.xr[o])-f[l[o]],o++,_+=h*h}}else for(;0!=n--;){var h;h=Math.abs(e.xr[o])-k[l[o]]*r,o++,_+=h*h,h=Math.abs(e.xr[o])-k[l[o]]*r,o++,_+=h*h}return t.s=o,_},this.calc_noise=function(e,t,n,r,_){var o,l,c,h=0,d=0,v=0,S=0,A=0,M=-20,R=0,y=e.scalefac,B=0;for(r.over_SSD=0,o=0;o<e.psymax;o++){var x,s=e.global_gain-(y[B++]+(0!=e.preflag?E[o]:0)<<e.scalefac_scale+1)-8*e.subblock_gain[e.window[o]],k=0;if(null!=_&&_.step[o]==s)k=_.noise[o],R+=e.width[o],n[h++]=k/t[d++],k=_.noise_log[o];else{var P,I=(m(0<=(c=s)+w.Q_MAX2&&c<w.Q_MAX),T[c+w.Q_MAX2]);if(l=e.width[o]>>1,R+e.width[o]>e.max_nonzero_coeff)l=(P=e.max_nonzero_coeff-R+1)>0?P>>1:0;var O=new V(R);k=this.calc_noise_core(e,O,l,I),R=O.s,null!=_&&(_.step[o]=s,_.noise[o]=k),k=n[h++]=k/t[d++],k=f.FAST_LOG10(Math.max(k,1e-20)),null!=_&&(_.noise_log[o]=k)}if(null!=_&&(_.global_gain=e.global_gain),A+=k,k>0)x=Math.max(0|10*k+.5,1),r.over_SSD+=x*x,v++,S+=k;M=Math.max(M,k)}return r.over_count=v,r.tot_noise=A,r.over_noise=S,r.max_noise=M,v},this.set_pinfo=function(e,t,n,r,_){var o,l,f,h,v,S=e.internal_flags,w=0==t.scalefac_scale?.5:1,A=t.scalefac,M=c(L3Side.SFBMAX),R=c(L3Side.SFBMAX),y=new CalcNoiseResult;calc_xmin(e,n,t,M),calc_noise(t,M,R,y,null);var B=0;for(l=t.sfb_lmax,t.block_type!=d.SHORT_TYPE&&0==t.mixed_block_flag&&(l=22),o=0;o<l;o++){var T=S.scalefac_band.l[o],x=(k=S.scalefac_band.l[o+1])-T;for(h=0;B<k;B++)h+=t.xr[B]*t.xr[B];h/=x,v=1e15,S.pinfo.en[r][_][o]=v*h,S.pinfo.xfsf[r][_][o]=v*M[o]*R[o]/x,n.en.l[o]>0&&!e.ATHonly?h/=n.en.l[o]:h=0,S.pinfo.thr[r][_][o]=v*Math.max(h*n.thm.l[o],S.ATH.l[o]),S.pinfo.LAMEsfb[r][_][o]=0,0!=t.preflag&&o>=11&&(S.pinfo.LAMEsfb[r][_][o]=-w*E[o]),o<d.SBPSY_l&&(m(A[o]>=0),S.pinfo.LAMEsfb[r][_][o]-=w*A[o])}if(t.block_type==d.SHORT_TYPE)for(l=o,o=t.sfb_smin;o<d.SBMAX_s;o++){T=S.scalefac_band.s[o],x=(k=S.scalefac_band.s[o+1])-T;for(var k,i=0;i<3;i++){for(h=0,f=T;f<k;f++)h+=t.xr[B]*t.xr[B],B++;h=Math.max(h/x,1e-20),v=1e15,S.pinfo.en_s[r][_][3*o+i]=v*h,S.pinfo.xfsf_s[r][_][3*o+i]=v*M[l]*R[l]/x,n.en.s[o][i]>0?h/=n.en.s[o][i]:h=0,(e.ATHonly||e.ATHshort)&&(h=0),S.pinfo.thr_s[r][_][3*o+i]=v*Math.max(h*n.thm.s[o][i],S.ATH.s[o]),S.pinfo.LAMEsfb_s[r][_][3*o+i]=-2*t.subblock_gain[i],o<d.SBPSY_s&&(S.pinfo.LAMEsfb_s[r][_][3*o+i]-=w*A[l]),l++}}S.pinfo.LAMEqss[r][_]=t.global_gain,S.pinfo.LAMEmainbits[r][_]=t.part2_3_length+t.part2_length,S.pinfo.LAMEsfbits[r][_]=t.part2_length,S.pinfo.over[r][_]=y.over_count,S.pinfo.max_noise[r][_]=10*y.max_noise,S.pinfo.over_noise[r][_]=10*y.over_noise,S.pinfo.tot_noise[r][_]=10*y.tot_noise,S.pinfo.over_SSD[r][_]=y.over_SSD}}w.Q_MAX=257,w.Q_MAX2=116,w.LARGE_BITS=1e5,w.IXMAX_VAL=8206,e.exports=w},391:function(e,t,n){var r=n(298),_=(r.System,r.VbrMode,r.Float,r.ShortBlock,r.Util,r.Arrays,r.new_array_n,r.new_byte),o=(r.new_double,r.new_float,r.new_float_n,r.new_int,r.new_int_n,r.assert),l=n(322),f=n(403),c=n(337),h=n(340),m=n(404),d=n(339),v=n(408),S=n(308),w=n(324),A=(n(299),n(409)),M=n(410);function R(){this.setModules=function(e,t){e,t}}function y(){this.setModules=function(e,t,n){e,t,n}}function B(){}function E(){this.setModules=function(e,t){e,t}}function T(){this.dataOffset=0,this.dataLen=0,this.channels=0,this.sampleRate=0}function x(e){return e.charCodeAt(0)<<24|e.charCodeAt(1)<<16|e.charCodeAt(2)<<8|e.charCodeAt(3)}T.RIFF=x("RIFF"),T.WAVE=x("WAVE"),T.fmt_=x("fmt "),T.data=x("data"),T.readHeader=function(e){var t=new T,header=e.getUint32(0,!1);if(T.RIFF==header){e.getUint32(4,!0);if(T.WAVE==e.getUint32(8,!1)&&T.fmt_==e.getUint32(12,!1)){var n=e.getUint32(16,!0),r=20;switch(n){case 16:case 18:t.channels=e.getUint16(r+2,!0),t.sampleRate=e.getUint32(r+4,!0);break;default:throw"extended fmt chunk not implemented"}r+=n;for(var data=T.data,_=0;data!=header&&(header=e.getUint32(r,!1),_=e.getUint32(r+4,!0),data!=header);)r+=_+8;return t.dataLen=_,t.dataOffset=r+8,t}}},e.exports.Mp3Encoder=function(e,t,n){3!=arguments.length&&(console.error("WARN: Mp3Encoder(channels, samplerate, kbps) not specified"),e=1,t=44100,n=128);var r=new l,T=new R,x=new c,k=new w,p=new f,P=new h,I=new m,V=new M,O=new A,H=new E,L=new v,N=new d,D=new y,X=new B;r.setModules(x,k,p,P,I,V,O,H,X),k.setModules(x,X,O,V),H.setModules(k,O),p.setModules(r),I.setModules(k,L,P,N),P.setModules(N,L,r.enc.psy),L.setModules(k),N.setModules(P),V.setModules(r,k,O),T.setModules(D,X),D.setModules(O,H,p);var F=r.lame_init();F.num_channels=e,F.in_samplerate=t,F.brate=n,F.mode=S.STEREO,F.quality=3,F.bWriteVbrTag=!1,F.disable_reservoir=!0,F.write_id3tag_automatic=!1;var C=r.lame_init_params(F);o(0==C);var Y=1152,j=0|1.25*Y+7200,U=_(j);this.encodeBuffer=function(t,n){1==e&&(n=t),o(t.length==n.length),t.length>Y&&(Y=t.length,U=_(j=0|1.25*Y+7200));var l=r.lame_encode_buffer(F,t,n,t.length,U,0,j);return new Int8Array(U.subarray(0,l))},this.flush=function(){var e=r.lame_encode_flush(F,U,0,j);return new Int8Array(U.subarray(0,e))}},e.exports.WavHeader=T},392:function(e,t,n){var r=n(298),_=(r.System,r.VbrMode),o=r.Float,l=r.ShortBlock,f=r.Util,c=r.Arrays,h=(r.new_array_n,r.new_byte,r.new_double,r.new_float),m=r.new_float_n,d=r.new_int,v=(r.new_int_n,r.assert),S=n(393),w=n(299);e.exports=function(){var e=n(308),t=new S,r=2.302585092994046,A=1/217621504/(w.BLKSIZE/2),M=.3,R=21,y=.2302585093;function B(e,t){for(var n=0,i=0;i<w.BLKSIZE/2;++i)n+=e[i]*t.ATH.eql_w[i];return n*=A}function E(e,n,r,_,o,l,c,h,m,d,v){var S=e.internal_flags;if(m<2)t.fft_long(S,_[o],m,d,v),t.fft_short(S,l[c],m,d,v);else if(2==m){for(var A=w.BLKSIZE-1;A>=0;--A){var M=_[o+0][A],R=_[o+1][A];_[o+0][A]=(M+R)*f.SQRT2*.5,_[o+1][A]=(M-R)*f.SQRT2*.5}for(var b=2;b>=0;--b)for(A=w.BLKSIZE_s-1;A>=0;--A){M=l[c+0][b][A],R=l[c+1][b][A];l[c+0][b][A]=(M+R)*f.SQRT2*.5,l[c+1][b][A]=(M-R)*f.SQRT2*.5}}n[0]=_[o+0][0],n[0]*=n[0];for(A=w.BLKSIZE/2-1;A>=0;--A){var y=_[o+0][w.BLKSIZE/2-A],E=_[o+0][w.BLKSIZE/2+A];n[w.BLKSIZE/2-A]=.5*(y*y+E*E)}for(b=2;b>=0;--b){r[b][0]=l[c+0][b][0],r[b][0]*=r[b][0];for(A=w.BLKSIZE_s/2-1;A>=0;--A){y=l[c+0][b][w.BLKSIZE_s/2-A],E=l[c+0][b][w.BLKSIZE_s/2+A];r[b][w.BLKSIZE_s/2-A]=.5*(y*y+E*E)}}var T=0;for(A=11;A<w.HBLKSIZE;A++)T+=n[A];if(S.tot_ener[m]=T,e.analysis){for(A=0;A<w.HBLKSIZE;A++)S.pinfo.energy[h][m][A]=S.pinfo.energy_save[m][A],S.pinfo.energy_save[m][A]=n[A];S.pinfo.pe[h][m]=S.pe[m]}2==e.athaa_loudapprox&&m<2&&(S.loudness_sq[h][m]=S.loudness_sq_save[m],S.loudness_sq_save[m]=B(n,S))}var T,x,k,P=[1,.79433,.63096,.63096,.63096,.63096,.63096,.25119,.11749],I=[3.3246*3.3246,3.23837*3.23837,9.9500500969,9.0247369744,8.1854926609,7.0440875649,2.46209*2.46209,2.284*2.284,4.4892710641,1.96552*1.96552,1.82335*1.82335,1.69146*1.69146,2.4621061921,2.1508568964,1.37074*1.37074,1.31036*1.31036,1.5691069696,1.4555939904,1.16203*1.16203,1.2715945225,1.09428*1.09428,1.0659*1.0659,1.0779838276,1.0382591025,1],V=[1.7782755904,1.35879*1.35879,1.38454*1.38454,1.39497*1.39497,1.40548*1.40548,1.3537*1.3537,1.6999465924,1.22321*1.22321,1.3169398564,1],O=[5.5396212496,2.29259*2.29259,4.9868695969,2.12675*2.12675,2.02545*2.02545,1.87894*1.87894,1.74303*1.74303,1.61695*1.61695,2.2499700001,1.39148*1.39148,1.29083*1.29083,1.19746*1.19746,1.2339655056,1.0779838276];function H(e,t,n,b,r,_){var o;if(t>e){if(!(t<e*x))return e+t;o=t/e}else{if(e>=t*x)return e+t;o=e/t}if(v(e>=0),v(t>=0),e+=t,b+3<=6){if(o>=T)return e;var i=0|f.FAST_LOG10_X(o,16);return e*V[i]}var l,c;i=0|f.FAST_LOG10_X(o,16);return t=0!=_?r.ATH.cb_s[n]*r.ATH.adjust:r.ATH.cb_l[n]*r.ATH.adjust,v(t>=0),e<k*t?e>t?(l=1,i<=13&&(l=O[i]),c=f.FAST_LOG10_X(e/t,10/15),e*((I[i]-l)*c+l)):i>13?e:e*O[i]:e*I[i]}var L=[1.7782755904,1.35879*1.35879,1.38454*1.38454,1.39497*1.39497,1.40548*1.40548,1.3537*1.3537,1.6999465924,1.22321*1.22321,1.3169398564,1];function N(e,t,b){var n;if(e<0&&(e=0),t<0&&(t=0),e<=0)return t;if(t<=0)return e;if(n=t>e?t/e:e/t,-2<=b&&b<=2){if(n>=T)return e+t;var i=0|f.FAST_LOG10_X(n,16);return(e+t)*L[i]}return n<x?e+t:(e<t&&(e=t),e)}function D(e,t,n,r,_){var o,b,l=0,f=0;for(o=b=0;o<w.SBMAX_s;++b,++o){for(var c=e.bo_s[o],h=e.npart_s,m=c<h?c:h;b<m;)v(t[b]>=0),v(n[b]>=0),l+=t[b],f+=n[b],b++;if(e.en[r].s[o][_]=l,e.thm[r].s[o][_]=f,b>=h){++o;break}v(t[b]>=0),v(n[b]>=0);var d=e.PSY.bo_s_weight[o],S=1-d;l=d*t[b],f=d*n[b],e.en[r].s[o][_]+=l,e.thm[r].s[o][_]+=f,l=S*t[b],f=S*n[b]}for(;o<w.SBMAX_s;++o)e.en[r].s[o][_]=0,e.thm[r].s[o][_]=0}function X(e,t,n,r){var _,b,o=0,l=0;for(_=b=0;_<w.SBMAX_l;++b,++_){for(var f=e.bo_l[_],c=e.npart_l,h=f<c?f:c;b<h;)v(t[b]>=0),v(n[b]>=0),o+=t[b],l+=n[b],b++;if(e.en[r].l[_]=o,e.thm[r].l[_]=l,b>=c){++_;break}v(t[b]>=0),v(n[b]>=0);var m=e.PSY.bo_l_weight[_],d=1-m;o=m*t[b],l=m*n[b],e.en[r].l[_]+=o,e.thm[r].l[_]+=l,o=d*t[b],l=d*n[b]}for(;_<w.SBMAX_l;++_)e.en[r].l[_]=0,e.thm[r].l[_]=0}function F(e,t,n,r,_,o){var l,b,f=e.internal_flags;for(b=l=0;b<f.npart_s;++b){for(var c=0,h=0,m=f.numlines_s[b],i=0;i<m;++i,++l){var d=t[o][l];c+=d,h<d&&(h=d)}n[b]=c}for(v(b==f.npart_s),v(129==l),l=b=0;b<f.npart_s;b++){var S=f.s3ind_s[b][0],A=f.s3_ss[l++]*n[S];for(++S;S<=f.s3ind_s[b][1];)A+=f.s3_ss[l]*n[S],++l,++S;var M=2*f.nb_s1[_][b];if(r[b]=Math.min(A,M),f.blocktype_old[1&_]==w.SHORT_TYPE){M=16*f.nb_s2[_][b];var R=r[b];r[b]=Math.min(M,R)}f.nb_s2[_][b]=f.nb_s1[_][b],f.nb_s1[_][b]=A,v(r[b]>=0)}for(;b<=w.CBANDS;++b)n[b]=0,r[b]=0}function C(e,t,n){return n>=1?e:n<=0?t:t>0?Math.pow(e/t,n)*t:0}var Y=[11.8,13.6,17.2,32,46.5,51.3,57.5,67.1,71.5,84.6,97.6,130];function j(e,t){for(var n=309.07,_=0;_<w.SBMAX_s-1;_++)for(var o=0;o<3;o++){var l=e.thm.s[_][o];if(v(_<Y.length),l>0){var c=l*t,h=e.en.s[_][o];h>c&&(h>1e10*c?n+=Y[_]*(10*r):(v(c>0),n+=Y[_]*f.FAST_LOG10(h/c)))}}return n}var U=[6.8,5.8,5.8,6.4,6.5,9.9,12.1,14.4,15,18.9,21.6,26.9,34.2,40.2,46.8,56.5,60.7,73.9,85.7,93.4,126.1];function z(e,t){for(var n=281.0575,_=0;_<w.SBMAX_l-1;_++){var o=e.thm.l[_];if(v(_<U.length),o>0){var l=o*t,c=e.en.l[_];c>l&&(c>1e10*l?n+=U[_]*(10*r):(v(l>0),n+=U[_]*f.FAST_LOG10(c/l)))}}return n}function G(e,t,n,r,_){var b,o;for(b=o=0;b<e.npart_l;++b){var i,l=0,f=0;for(i=0;i<e.numlines_l[b];++i,++o){var c=t[o];v(c>=0),l+=c,f<c&&(f=c)}n[b]=l,r[b]=f,_[b]=l*e.rnumlines_l[b],v(e.rnumlines_l[b]>=0),v(l>=0),v(n[b]>=0),v(r[b]>=0),v(_[b]>=0)}}function K(e,t,n,r){var _=P.length-1,b=0,a=n[b]+n[b+1];(v(a>=0),a>0)?((o=t[b])<t[b+1]&&(o=t[b+1]),v(e.numlines_l[b]+e.numlines_l[b+1]-1>0),(l=0|(a=20*(2*o-a)/(a*(e.numlines_l[b]+e.numlines_l[b+1]-1))))>_&&(l=_),r[b]=l):r[b]=0;for(b=1;b<e.npart_l-1;b++){var o,l;if(a=n[b-1]+n[b]+n[b+1],v(a>=0),a>0)(o=t[b-1])<t[b]&&(o=t[b]),o<t[b+1]&&(o=t[b+1]),v(e.numlines_l[b-1]+e.numlines_l[b]+e.numlines_l[b+1]-1>0),(l=0|(a=20*(3*o-a)/(a*(e.numlines_l[b-1]+e.numlines_l[b]+e.numlines_l[b+1]-1))))>_&&(l=_),r[b]=l;else r[b]=0}(v(b>0),v(b==e.npart_l-1),a=n[b-1]+n[b],v(a>=0),a>0)?((o=t[b-1])<t[b]&&(o=t[b]),v(e.numlines_l[b-1]+e.numlines_l[b]-1>0),(l=0|(a=20*(2*o-a)/(a*(e.numlines_l[b-1]+e.numlines_l[b]-1))))>_&&(l=_),r[b]=l):r[b]=0;v(b==e.npart_l-1)}var Z=[-1730326e-23,-.01703172,-1349528e-23,.0418072,-673278e-22,-.0876324,-30835e-21,.1863476,-1104424e-22,-.627638];function W(e,n,r,_,o,l,c,h){var m=e.internal_flags;if(_<2)t.fft_long(m,c[h],_,n,r);else if(2==_)for(var d=w.BLKSIZE-1;d>=0;--d){var v=c[h+0][d],S=c[h+1][d];c[h+0][d]=(v+S)*f.SQRT2*.5,c[h+1][d]=(v-S)*f.SQRT2*.5}l[0]=c[h+0][0],l[0]*=l[0];for(d=w.BLKSIZE/2-1;d>=0;--d){var A=c[h+0][w.BLKSIZE/2-d],M=c[h+0][w.BLKSIZE/2+d];l[w.BLKSIZE/2-d]=.5*(A*A+M*M)}var R=0;for(d=11;d<w.HBLKSIZE;d++)R+=l[d];if(m.tot_ener[_]=R,e.analysis){for(d=0;d<w.HBLKSIZE;d++)m.pinfo.energy[o][_][d]=m.pinfo.energy_save[_][d],m.pinfo.energy_save[_][d]=l[d];m.pinfo.pe[o][_]=m.pe[_]}}function Q(e,n,r,_,o,l,c,h){var m=e.internal_flags;if(0==o&&_<2&&t.fft_short(m,c[h],_,n,r),2==_)for(var d=w.BLKSIZE_s-1;d>=0;--d){var v=c[h+0][o][d],S=c[h+1][o][d];c[h+0][o][d]=(v+S)*f.SQRT2*.5,c[h+1][o][d]=(v-S)*f.SQRT2*.5}l[o][0]=c[h+0][o][0],l[o][0]*=l[o][0];for(d=w.BLKSIZE_s/2-1;d>=0;--d){var A=c[h+0][o][w.BLKSIZE_s/2-d],M=c[h+0][o][w.BLKSIZE_s/2+d];l[o][w.BLKSIZE_s/2-d]=.5*(A*A+M*M)}}function J(e,t,n,r){var _=e.internal_flags;2==e.athaa_loudapprox&&n<2&&(_.loudness_sq[t][n]=_.loudness_sq_save[n],_.loudness_sq_save[n]=B(r,_))}this.L3psycho_anal_ns=function(t,n,r,o,f,S,A,y,B,T){var x,k,b,i,I,V,O,L,N,Y,U=t.internal_flags,W=m([2,w.BLKSIZE]),Q=m([2,3,w.BLKSIZE_s]),J=h(w.CBANDS+1),$=h(w.CBANDS+1),ee=h(w.CBANDS+2),te=d(2),ae=d(2),ne=m([2,576]),se=d(w.CBANDS+2),re=d(w.CBANDS+2);for(c.fill(re,0),x=U.channels_out,t.mode==e.JOINT_STEREO&&(x=4),N=t.VBR==_.vbr_off?0==U.ResvMax?0:U.ResvSize/U.ResvMax*.5:t.VBR==_.vbr_rh||t.VBR==_.vbr_mtrh||t.VBR==_.vbr_mt?.6:1,k=0;k<U.channels_out;k++){var ie=n[k],_e=r+576-350-R+192;for(v(10==Z.length),i=0;i<576;i++){var oe,le;for(oe=ie[_e+i+10],le=0,I=0;I<9;I+=2)oe+=Z[I]*(ie[_e+i+I]+ie[_e+i+R-I]),le+=Z[I+1]*(ie[_e+i+I+1]+ie[_e+i+R-I-1]);ne[k][i]=oe+le}f[o][k].en.assign(U.en[k]),f[o][k].thm.assign(U.thm[k]),x>2&&(S[o][k].en.assign(U.en[k+2]),S[o][k].thm.assign(U.thm[k+2]))}for(k=0;k<x;k++){var fe,ce=h(12),ue=[0,0,0,0],he=h(12),pe=1,be=h(w.CBANDS),me=h(w.CBANDS),de=[0,0,0,0],ve=h(w.HBLKSIZE),ge=m([3,w.HBLKSIZE_s]);for(v(U.npart_s<=w.CBANDS),v(U.npart_l<=w.CBANDS),i=0;i<3;i++)ce[i]=U.nsPsy.last_en_subshort[k][i+6],v(U.nsPsy.last_en_subshort[k][i+4]>0),he[i]=ce[i]/U.nsPsy.last_en_subshort[k][i+4],ue[0]+=ce[i];if(2==k)for(i=0;i<576;i++){var Se,we;Se=ne[0][i],we=ne[1][i],ne[0][i]=Se+we,ne[1][i]=Se-we}var Ae=ne[1&k],Me=0;for(i=0;i<9;i++){for(var Re=Me+64,p=1;Me<Re;Me++)p<Math.abs(Ae[Me])&&(p=Math.abs(Ae[Me]));U.nsPsy.last_en_subshort[k][i]=ce[i+3]=p,ue[1+i/3]+=p,p>ce[i+3-2]?(v(ce[i+3-2]>0),p/=ce[i+3-2]):ce[i+3-2]>10*p?(v(p>0),p=ce[i+3-2]/(10*p)):p=0,he[i+3]=p}if(t.analysis){var ye=he[0];for(i=1;i<12;i++)ye<he[i]&&(ye=he[i]);U.pinfo.ers[o][k]=U.pinfo.ers_save[k],U.pinfo.ers_save[k]=ye}for(fe=3==k?U.nsPsy.attackthre_s:U.nsPsy.attackthre,i=0;i<12;i++)0==de[i/3]&&he[i]>fe&&(de[i/3]=i%3+1);for(i=1;i<4;i++){var Be;ue[i-1]>ue[i]?(v(ue[i]>0),Be=ue[i-1]/ue[i]):(v(ue[i-1]>0),Be=ue[i]/ue[i-1]),Be<1.7&&(de[i]=0,1==i&&(de[0]=0))}for(0!=de[0]&&0!=U.nsPsy.lastAttacks[k]&&(de[0]=0),3!=U.nsPsy.lastAttacks[k]&&de[0]+de[1]+de[2]+de[3]==0||(pe=0,0!=de[1]&&0!=de[0]&&(de[1]=0),0!=de[2]&&0!=de[1]&&(de[2]=0),0!=de[3]&&0!=de[2]&&(de[3]=0)),k<2?ae[k]=pe:0==pe&&(ae[0]=ae[1]=0),B[k]=U.tot_ener[k],E(t,ve,ge,W,1&k,Q,1&k,o,k,n,r),G(U,ve,J,be,me),K(U,be,me,se),L=0;L<3;L++){var Ee,Te;for(F(t,ge,$,ee,k,L),D(U,$,ee,k,L),O=0;O<w.SBMAX_s;O++){if(Te=U.thm[k].s[O][L],Te*=.8,de[L]>=2||1==de[L+1]){var xe=0!=L?L-1:2;p=C(U.thm[k].s[O][xe],Te,.6*N);Te=Math.min(Te,p)}if(1==de[L]){xe=0!=L?L-1:2,p=C(U.thm[k].s[O][xe],Te,M*N);Te=Math.min(Te,p)}else if(0!=L&&3==de[L-1]||0==L&&3==U.nsPsy.lastAttacks[k]){xe=2!=L?L+1:0,p=C(U.thm[k].s[O][xe],Te,M*N);Te=Math.min(Te,p)}Ee=ce[3*L+3]+ce[3*L+4]+ce[3*L+5],6*ce[3*L+5]<Ee&&(Te*=.5,6*ce[3*L+4]<Ee&&(Te*=.5)),U.thm[k].s[O][L]=Te}}for(U.nsPsy.lastAttacks[k]=de[2],V=0,b=0;b<U.npart_l;b++){for(var ke=U.s3ind[b][0],Pe=J[ke]*P[se[ke]],Ie=U.s3_ll[V++]*Pe;++ke<=U.s3ind[b][1];)Pe=J[ke]*P[se[ke]],Ie=H(Ie,U.s3_ll[V++]*Pe,ke,ke-b,U,0);Ie*=.158489319246111,U.blocktype_old[1&k]==w.SHORT_TYPE?ee[b]=Ie:ee[b]=C(Math.min(Ie,Math.min(2*U.nb_1[k][b],16*U.nb_2[k][b])),Ie,N),U.nb_2[k][b]=U.nb_1[k][b],U.nb_1[k][b]=Ie}for(;b<=w.CBANDS;++b)J[b]=0,ee[b]=0;X(U,J,ee,k)}(t.mode!=e.STEREO&&t.mode!=e.JOINT_STEREO||t.interChRatio>0&&function(e,t){var n=e.internal_flags;if(n.channels_out>1){for(var r=0;r<w.SBMAX_l;r++){var _=n.thm[0].l[r],o=n.thm[1].l[r];n.thm[0].l[r]+=o*t,n.thm[1].l[r]+=_*t}for(r=0;r<w.SBMAX_s;r++)for(var l=0;l<3;l++)_=n.thm[0].s[r][l],o=n.thm[1].s[r][l],n.thm[0].s[r][l]+=o*t,n.thm[1].s[r][l]+=_*t}}(t,t.interChRatio),t.mode==e.JOINT_STEREO)&&(!function(e){for(var t=0;t<w.SBMAX_l;t++)if(!(e.thm[0].l[t]>1.58*e.thm[1].l[t]||e.thm[1].l[t]>1.58*e.thm[0].l[t])){var n=e.mld_l[t]*e.en[3].l[t],r=Math.max(e.thm[2].l[t],Math.min(e.thm[3].l[t],n));n=e.mld_l[t]*e.en[2].l[t];var _=Math.max(e.thm[3].l[t],Math.min(e.thm[2].l[t],n));e.thm[2].l[t]=r,e.thm[3].l[t]=_}for(t=0;t<w.SBMAX_s;t++)for(var o=0;o<3;o++)e.thm[0].s[t][o]>1.58*e.thm[1].s[t][o]||e.thm[1].s[t][o]>1.58*e.thm[0].s[t][o]||(n=e.mld_s[t]*e.en[3].s[t][o],r=Math.max(e.thm[2].s[t][o],Math.min(e.thm[3].s[t][o],n)),n=e.mld_s[t]*e.en[2].s[t][o],_=Math.max(e.thm[3].s[t][o],Math.min(e.thm[2].s[t][o],n)),e.thm[2].s[t][o]=r,e.thm[3].s[t][o]=_)}(U),Y=t.msfix,Math.abs(Y)>0&&function(e,t,n){var r=t,_=Math.pow(10,n);t*=2,r*=2;for(var o=0;o<w.SBMAX_l;o++)m=e.ATH.cb_l[e.bm_l[o]]*_,(f=Math.min(Math.max(e.thm[0].l[o],m),Math.max(e.thm[1].l[o],m)))*t<(c=Math.max(e.thm[2].l[o],m))+(h=Math.max(e.thm[3].l[o],m))&&v((c*=d=f*r/(c+h))+(h*=d)>0),e.thm[2].l[o]=Math.min(c,e.thm[2].l[o]),e.thm[3].l[o]=Math.min(h,e.thm[3].l[o]);for(_*=w.BLKSIZE_s/w.BLKSIZE,o=0;o<w.SBMAX_s;o++)for(var l=0;l<3;l++){var f,c,h,m,d;m=e.ATH.cb_s[e.bm_s[o]]*_,(f=Math.min(Math.max(e.thm[0].s[o][l],m),Math.max(e.thm[1].s[o][l],m)))*t<(c=Math.max(e.thm[2].s[o][l],m))+(h=Math.max(e.thm[3].s[o][l],m))&&v((c*=d=f*t/(c+h))+(h*=d)>0),e.thm[2].s[o][l]=Math.min(e.thm[2].s[o][l],c),e.thm[3].s[o][l]=Math.min(e.thm[3].s[o][l],h)}}(U,Y,t.ATHlower*U.ATH.adjust));for(function(e,t,n,r){var _=e.internal_flags;e.short_blocks!=l.short_block_coupled||0!=t[0]&&0!=t[1]||(t[0]=t[1]=0);for(var o=0;o<_.channels_out;o++)r[o]=w.NORM_TYPE,e.short_blocks==l.short_block_dispensed&&(t[o]=1),e.short_blocks==l.short_block_forced&&(t[o]=0),0!=t[o]?(v(_.blocktype_old[o]!=w.START_TYPE),_.blocktype_old[o]==w.SHORT_TYPE&&(r[o]=w.STOP_TYPE)):(r[o]=w.SHORT_TYPE,_.blocktype_old[o]==w.NORM_TYPE&&(_.blocktype_old[o]=w.START_TYPE),_.blocktype_old[o]==w.STOP_TYPE&&(_.blocktype_old[o]=w.SHORT_TYPE)),n[o]=_.blocktype_old[o],_.blocktype_old[o]=r[o]}(t,ae,T,te),k=0;k<x;k++){var Ve,Oe,He,Le=0;k>1?(Ve=y,Le=-2,Oe=w.NORM_TYPE,T[0]!=w.SHORT_TYPE&&T[1]!=w.SHORT_TYPE||(Oe=w.SHORT_TYPE),He=S[o][k-2]):(Ve=A,Le=0,Oe=T[k],He=f[o][k]),Oe==w.SHORT_TYPE?Ve[Le+k]=j(He,U.masking_lower):Ve[Le+k]=z(He,U.masking_lower),t.analysis&&(U.pinfo.pe[o][k]=Ve[Le+k])}return 0};var $=[-1730326e-23,-.01703172,-1349528e-23,.0418072,-673278e-22,-.0876324,-30835e-21,.1863476,-1104424e-22,-.627638];function ee(e,t,n){if(0==n)for(var b=0;b<e.npart_s;b++)e.nb_s2[t][b]=e.nb_s1[t][b],e.nb_s1[t][b]=0}function te(e,t){for(var b=0;b<e.npart_l;b++)e.nb_2[t][b]=e.nb_1[t][b],e.nb_1[t][b]=0}function ae(e,t,n,r,_,o){var i,l,b,f=e.internal_flags,c=new float[w.CBANDS],m=h(w.CBANDS),d=new int[w.CBANDS];for(b=l=0;b<f.npart_s;++b){var S=0,A=0,M=f.numlines_s[b];for(i=0;i<M;++i,++l){var R=t[o][l];S+=R,A<R&&(A=R)}n[b]=S,v(S>=0),c[b]=A,v(M>0),m[b]=S/M,v(m[b]>=0)}for(v(b==f.npart_s),v(129==l);b<w.CBANDS;++b)c[b]=0,m[b]=0;for(function(e,t,n,r){var _=P.length-1,b=0,a=n[b]+n[b+1];for(v(a>=0),a>0?((o=t[b])<t[b+1]&&(o=t[b+1]),v(e.numlines_s[b]+e.numlines_s[b+1]-1>0),(l=0|(a=20*(2*o-a)/(a*(e.numlines_s[b]+e.numlines_s[b+1]-1))))>_&&(l=_),r[b]=l):r[b]=0,b=1;b<e.npart_s-1;b++){var o,l;a=n[b-1]+n[b]+n[b+1],v(b+1<e.npart_s),v(a>=0),a>0?((o=t[b-1])<t[b]&&(o=t[b]),o<t[b+1]&&(o=t[b+1]),v(e.numlines_s[b-1]+e.numlines_s[b]+e.numlines_s[b+1]-1>0),(l=0|(a=20*(3*o-a)/(a*(e.numlines_s[b-1]+e.numlines_s[b]+e.numlines_s[b+1]-1))))>_&&(l=_),r[b]=l):r[b]=0}v(b>0),v(b==e.npart_s-1),a=n[b-1]+n[b],v(a>=0),a>0?((o=t[b-1])<t[b]&&(o=t[b]),v(e.numlines_s[b-1]+e.numlines_s[b]-1>0),(l=0|(a=20*(2*o-a)/(a*(e.numlines_s[b-1]+e.numlines_s[b]-1))))>_&&(l=_),r[b]=l):r[b]=0,v(b==e.npart_s-1)}(f,c,m,d),l=b=0;b<f.npart_s;b++){var dd,y,B,E,T,x=f.s3ind_s[b][0],k=f.s3ind_s[b][1];for(dd=d[x],y=1,E=f.s3_ss[l]*n[x]*P[d[x]],++l,++x;x<=k;)dd+=d[x],y+=1,E=N(E,B=f.s3_ss[l]*n[x]*P[d[x]],x-b),++l,++x;E*=T=.5*P[dd=(1+2*dd)/(2*y)],r[b]=E,f.nb_s2[_][b]=f.nb_s1[_][b],f.nb_s1[_][b]=E,B=c[b],B*=f.minval_s[b],B*=T,r[b]>B&&(r[b]=B),f.masking_lower>1&&(r[b]*=f.masking_lower),r[b]>n[b]&&(r[b]=n[b]),f.masking_lower<1&&(r[b]*=f.masking_lower),v(r[b]>=0)}for(;b<w.CBANDS;++b)n[b]=0,r[b]=0}function ne(e,t,n,r,_){var b,o=h(w.CBANDS),l=h(w.CBANDS),f=d(w.CBANDS+2);G(e,t,n,o,l),K(e,o,l,f);var c=0;for(b=0;b<e.npart_l;b++){var m,S,A,R=e.s3ind[b][0],y=e.s3ind[b][1],dd=0,B=0;for(dd=f[R],B+=1,S=e.s3_ll[c]*n[R]*P[f[R]],++c,++R;R<=y;)dd+=f[R],B+=1,S=N(S,m=e.s3_ll[c]*n[R]*P[f[R]],R-b),++c,++R;if(S*=A=.5*P[dd=(1+2*dd)/(2*B)],e.blocktype_old[1&_]==w.SHORT_TYPE){var E=2*e.nb_1[_][b];r[b]=E>0?Math.min(S,E):Math.min(S,n[b]*M)}else{var T=16*e.nb_2[_][b],x=2*e.nb_1[_][b];T<=0&&(T=S),x<=0&&(x=S),E=e.blocktype_old[1&_]==w.NORM_TYPE?Math.min(x,T):x,r[b]=Math.min(S,E)}e.nb_2[_][b]=e.nb_1[_][b],e.nb_1[_][b]=S,m=o[b],m*=e.minval_l[b],m*=A,r[b]>m&&(r[b]=m),e.masking_lower>1&&(r[b]*=e.masking_lower),r[b]>n[b]&&(r[b]=n[b]),e.masking_lower<1&&(r[b]*=e.masking_lower),v(r[b]>=0)}for(;b<w.CBANDS;++b)n[b]=0,r[b]=0}function se(e,t,n,r,_,o,l){for(var f,c,h=2*o,m=o>0?Math.pow(10,_):1,b=0;b<l;++b){var d=e[2][b],S=e[3][b],w=t[0][b],A=t[1][b],M=t[2][b],R=t[3][b];if(w<=1.58*A&&A<=1.58*w){var y=n[b]*S,B=n[b]*d;c=Math.max(M,Math.min(R,y)),f=Math.max(R,Math.min(M,B))}else c=M,f=R;if(o>0){var E,T,x=r[b]*m;if(E=Math.min(Math.max(w,x),Math.max(A,x)),(T=(M=Math.max(c,x))+(R=Math.max(f,x)))>0&&E*h<T){var k=E*h/T;M*=k,R*=k,v(T>0)}c=Math.min(M,c),f=Math.min(R,f)}c>d&&(c=d),f>S&&(f=S),t[2][b]=c,t[3][b]=f}}function re(e,t){var n;return(n=e>=0?27*-e:e*t)<=-72?0:Math.exp(n*y)}function ie(e){var t,n,r=0;for(r=0;re(r,e)>1e-20;r-=1);for(_=r,o=0;Math.abs(o-_)>1e-12;)re(r=(o+_)/2,e)>0?o=r:_=r;t=_;var _,o;r=0;for(r=0;re(r,e)>1e-20;r+=1);for(_=0,o=r;Math.abs(o-_)>1e-12;)re(r=(o+_)/2,e)>0?_=r:o=r;n=o;var i,l=0,f=1e3;for(i=0;i<=f;++i){l+=re(r=t+i*(n-t)/f,e)}return(f+1)/(l*(n-t))}function _e(e){return e<0&&(e=0),e*=.001,13*Math.atan(.76*e)+3.5*Math.atan(e*e/56.25)}function oe(e,t,n,r,_,o,l,f,c,m,S,A){var i,M=h(w.CBANDS+1),R=f/(A>15?1152:384),y=d(w.HBLKSIZE);f/=c;var B=0,E=0;for(i=0;i<w.CBANDS;i++){var T;for(N=_e(f*B),M[i]=f*B,T=B;_e(f*T)-N<.34&&T<=c/2;T++);for(e[i]=T-B,E=i+1;B<T;)v(B<w.HBLKSIZE),y[B++]=i;if(B>c/2){B=c/2,++i;break}}v(i<w.CBANDS),M[i]=f*B;for(var x=0;x<A;x++){var k,P,I,V,O;I=m[x],V=m[x+1],(k=0|Math.floor(.5+S*(I-.5)))<0&&(k=0),(P=0|Math.floor(.5+S*(V-.5)))>c/2&&(P=c/2),n[x]=(y[k]+y[P])/2,t[x]=y[P];var H=R*V;l[x]=(H-M[t[x]])/(M[t[x]+1]-M[t[x]]),l[x]<0?l[x]=0:l[x]>1&&(l[x]=1),O=_e(f*m[x]*S),O=Math.min(O,15.5)/15.5,o[x]=Math.pow(10,1.25*(1-Math.cos(Math.PI*O))-2.5)}B=0;for(var L=0;L<E;L++){var N,D,X=e[L];N=_e(f*B),D=_e(f*(B+X-1)),r[L]=.5*(N+D),N=_e(f*(B-.5)),D=_e(f*(B+X-.5)),_[L]=D-N,B+=X}return E}function le(e,t,n,r,_,o){var l,f,c,d,v,S,A=m([w.CBANDS,w.CBANDS]),M=0;if(o)for(var i=0;i<t;i++)for(l=0;l<t;l++){var R=(f=n[i]-n[l],c=void 0,d=void 0,v=void 0,S=void 0,c=f,d=(c*=c>=0?3:1.5)>=.5&&c<=2.5?8*((S=c-.5)*S-2*S):0,((v=15.811389+7.5*(c+=.474)-17.5*Math.sqrt(1+c*c))<=-60?0:(c=Math.exp((d+v)*y),c/=.6609193))*r[l]);A[i][l]=R*_[i]}else for(l=0;l<t;l++){var B=15+Math.min(21/n[l],12),E=ie(B);for(i=0;i<t;i++){R=E*re(n[i]-n[l],B)*r[l];A[i][l]=R*_[i]}}for(i=0;i<t;i++){for(l=0;l<t&&!(A[i][l]>0);l++);for(e[i][0]=l,l=t-1;l>0&&!(A[i][l]>0);l--);e[i][1]=l,M+=e[i][1]-e[i][0]+1}var p=h(M),T=0;for(i=0;i<t;i++)for(l=e[i][0];l<=e[i][1];l++)p[T++]=A[i][l];return p}function fe(e){var t=_e(e);return t=Math.min(t,15.5)/15.5,Math.pow(10,1.25*(1-Math.cos(Math.PI*t))-2.5)}function ce(e,t){return e<-.3&&(e=3410),e/=1e3,e=Math.max(.1,e),3.64*Math.pow(e,-.8)-6.8*Math.exp(-.6*Math.pow(e-3.4,2))+6*Math.exp(-.15*Math.pow(e-8.7,2))+.001*(.6+.04*t)*Math.pow(e,4)}this.L3psycho_anal_vbr=function(t,n,r,_,o,f,c,S,A,M){var y=t.internal_flags,B=h(w.HBLKSIZE),E=m([3,w.HBLKSIZE_s]),T=m([2,w.BLKSIZE]),x=m([2,3,w.BLKSIZE_s]),k=m([4,w.CBANDS]),P=m([4,w.CBANDS]),I=m([4,3]),V=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],O=d(2),H=t.mode==e.JOINT_STEREO?4:y.channels_out;!function(t,n,r,_,o,l,f,c,d,S){for(var w=m([2,576]),A=t.internal_flags,M=A.channels_out,y=t.mode==e.JOINT_STEREO?4:M,B=0;B<M;B++){firbuf=n[B];var E=r+576-350-R+192;v(10==$.length);for(var i=0;i<576;i++){var T,x;T=firbuf[E+i+10],x=0;for(var k=0;k<9;k+=2)T+=$[k]*(firbuf[E+i+k]+firbuf[E+i+R-k]),x+=$[k+1]*(firbuf[E+i+k+1]+firbuf[E+i+R-k-1]);w[B][i]=T+x}o[_][B].en.assign(A.en[B]),o[_][B].thm.assign(A.thm[B]),y>2&&(l[_][B].en.assign(A.en[B+2]),l[_][B].thm.assign(A.thm[B+2]))}for(B=0;B<y;B++){var P=h(12),I=h(12),V=[0,0,0,0],O=w[1&B],H=0,L=3==B?A.nsPsy.attackthre_s:A.nsPsy.attackthre,N=1;if(2==B)for(i=0,k=576;k>0;++i,--k){var D=w[0][i],X=w[1][i];w[0][i]=D+X,w[1][i]=D-X}for(i=0;i<3;i++)I[i]=A.nsPsy.last_en_subshort[B][i+6],v(A.nsPsy.last_en_subshort[B][i+4]>0),P[i]=I[i]/A.nsPsy.last_en_subshort[B][i+4],V[0]+=I[i];for(i=0;i<9;i++){for(var F=H+64,p=1;H<F;H++)p<Math.abs(O[H])&&(p=Math.abs(O[H]));A.nsPsy.last_en_subshort[B][i]=I[i+3]=p,V[1+i/3]+=p,p>I[i+3-2]?(v(I[i+3-2]>0),p/=I[i+3-2]):I[i+3-2]>10*p?(v(p>0),p=I[i+3-2]/(10*p)):p=0,P[i+3]=p}for(i=0;i<3;++i){var C=I[3*i+3]+I[3*i+4]+I[3*i+5],Y=1;6*I[3*i+5]<C&&(Y*=.5,6*I[3*i+4]<C&&(Y*=.5)),c[B][i]=Y}if(t.analysis){var j=P[0];for(i=1;i<12;i++)j<P[i]&&(j=P[i]);A.pinfo.ers[_][B]=A.pinfo.ers_save[B],A.pinfo.ers_save[B]=j}for(i=0;i<12;i++)0==d[B][i/3]&&P[i]>L&&(d[B][i/3]=i%3+1);for(i=1;i<4;i++){var u=V[i-1],U=V[i];Math.max(u,U)<4e4&&u<1.7*U&&U<1.7*u&&(1==i&&d[B][0]<=d[B][i]&&(d[B][0]=0),d[B][i]=0)}d[B][0]<=A.nsPsy.lastAttacks[B]&&(d[B][0]=0),3!=A.nsPsy.lastAttacks[B]&&d[B][0]+d[B][1]+d[B][2]+d[B][3]==0||(N=0,0!=d[B][1]&&0!=d[B][0]&&(d[B][1]=0),0!=d[B][2]&&0!=d[B][1]&&(d[B][2]=0),0!=d[B][3]&&0!=d[B][2]&&(d[B][3]=0)),B<2?S[B]=N:0==N&&(S[0]=S[1]=0),f[B]=A.tot_ener[B]}}(t,n,r,_,o,f,A,I,V,O),function(e,t){var n=e.internal_flags;e.short_blocks!=l.short_block_coupled||0!=t[0]&&0!=t[1]||(t[0]=t[1]=0);for(var r=0;r<n.channels_out;r++)e.short_blocks==l.short_block_dispensed&&(t[r]=1),e.short_blocks==l.short_block_forced&&(t[r]=0)}(t,O);for(var L=0;L<H;L++){W(t,n,r,L,_,B,T,F=1&L),J(t,_,L,B),0!=O[F]?ne(y,B,k[L],P[L],L):te(y,L)}O[0]+O[1]==2&&t.mode==e.JOINT_STEREO&&se(k,P,y.mld_cb_l,y.ATH.cb_l,t.ATHlower*y.ATH.adjust,t.msfix,y.npart_l);for(L=0;L<H;L++){0!=O[F=1&L]&&X(y,k[L],P[L],L)}for(var N=0;N<3;N++){for(L=0;L<H;++L){0!=O[F=1&L]?ee(y,L,N):(Q(t,n,r,L,N,E,x,F),ae(t,E,k[L],P[L],L,N))}O[0]+O[1]==0&&t.mode==e.JOINT_STEREO&&se(k,P,y.mld_cb_s,y.ATH.cb_s,t.ATHlower*y.ATH.adjust,t.msfix,y.npart_s);for(L=0;L<H;++L){0==O[F=1&L]&&D(y,k[L],P[L],L,N)}}for(L=0;L<H;L++){var F;if(0==O[F=1&L])for(var Y=0;Y<w.SBMAX_s;Y++){var U=h(3);for(N=0;N<3;N++){var G=y.thm[L].s[Y][N];if(G*=.8,V[L][N]>=2||1==V[L][N+1]){var K=0!=N?N-1:2,p=C(y.thm[L].s[Y][K],G,.36);G=Math.min(G,p)}else if(1==V[L][N]){K=0!=N?N-1:2,p=C(y.thm[L].s[Y][K],G,.18);G=Math.min(G,p)}else if(0!=N&&3==V[L][N-1]||0==N&&3==y.nsPsy.lastAttacks[L]){K=2!=N?N+1:0,p=C(y.thm[L].s[Y][K],G,.18);G=Math.min(G,p)}G*=I[L][N],U[N]=G}for(N=0;N<3;N++)y.thm[L].s[Y][N]=U[N]}}for(L=0;L<H;L++)y.nsPsy.lastAttacks[L]=V[L][2];!function(e,t,n){for(var r=e.internal_flags,_=0;_<r.channels_out;_++){var o=w.NORM_TYPE;0!=t[_]?(v(r.blocktype_old[_]!=w.START_TYPE),r.blocktype_old[_]==w.SHORT_TYPE&&(o=w.STOP_TYPE)):(o=w.SHORT_TYPE,r.blocktype_old[_]==w.NORM_TYPE&&(r.blocktype_old[_]=w.START_TYPE),r.blocktype_old[_]==w.STOP_TYPE&&(r.blocktype_old[_]=w.SHORT_TYPE)),n[_]=r.blocktype_old[_],r.blocktype_old[_]=o}}(t,O,M);for(L=0;L<H;L++){var Z,re,ie,_e;L>1?(Z=S,re=-2,ie=w.NORM_TYPE,M[0]!=w.SHORT_TYPE&&M[1]!=w.SHORT_TYPE||(ie=w.SHORT_TYPE),_e=f[_][L-2]):(Z=c,re=0,ie=M[L],_e=o[_][L]),ie==w.SHORT_TYPE?Z[re+L]=j(_e,y.masking_lower):Z[re+L]=z(_e,y.masking_lower),t.analysis&&(y.pinfo.pe[_][L]=Z[re+L])}return 0},this.psymodel_init=function(e){var i,n=e.internal_flags,l=!0,f=13,c=24,m=0,d=0,S=-8.25,A=-4.5,M=h(w.CBANDS),R=h(w.CBANDS),y=h(w.CBANDS),B=e.out_samplerate;switch(e.experimentalZ){default:case 0:l=!0;break;case 1:l=e.VBR!=_.vbr_mtrh&&e.VBR!=_.vbr_mt;break;case 2:l=!1;break;case 3:f=8,m=-1.75,d=-.0125,S=-8.25,A=-2.25}for(n.ms_ener_ratio_old=.25,n.blocktype_old[0]=n.blocktype_old[1]=w.NORM_TYPE,i=0;i<4;++i){for(var E=0;E<w.CBANDS;++E)n.nb_1[i][E]=1e20,n.nb_2[i][E]=1e20,n.nb_s1[i][E]=n.nb_s2[i][E]=1;for(var P=0;P<w.SBMAX_l;P++)n.en[i].l[P]=1e20,n.thm[i].l[P]=1e20;for(E=0;E<3;++E){for(P=0;P<w.SBMAX_s;P++)n.en[i].s[P][E]=1e20,n.thm[i].s[P][E]=1e20;n.nsPsy.lastAttacks[i]=0}for(E=0;E<9;E++)n.nsPsy.last_en_subshort[i][E]=10}for(n.loudness_sq_save[0]=n.loudness_sq_save[1]=0,n.npart_l=oe(n.numlines_l,n.bo_l,n.bm_l,M,R,n.mld_l,n.PSY.bo_l_weight,B,w.BLKSIZE,n.scalefac_band.l,w.BLKSIZE/1152,w.SBMAX_l),v(n.npart_l<w.CBANDS),i=0;i<n.npart_l;i++){var I=m;M[i]>=f&&(I=d*(M[i]-f)/(c-f)+m*(c-M[i])/(c-f)),y[i]=Math.pow(10,I/10),n.numlines_l[i]>0?n.rnumlines_l[i]=1/n.numlines_l[i]:n.rnumlines_l[i]=0}n.s3_ll=le(n.s3ind,n.npart_l,M,R,y,l);var V;E=0;for(i=0;i<n.npart_l;i++){L=o.MAX_VALUE;for(var O=0;O<n.numlines_l[i];O++,E++){var H=B*E/(1e3*w.BLKSIZE);N=this.ATHformula(1e3*H,e)-20,N=Math.pow(10,.1*N),L>(N*=n.numlines_l[i])&&(L=N)}n.ATH.cb_l[i]=L,(L=20*M[i]/10-20)>6&&(L=100),L<-15&&(L=-15),L-=8,n.minval_l[i]=Math.pow(10,L/10)*n.numlines_l[i]}for(n.npart_s=oe(n.numlines_s,n.bo_s,n.bm_s,M,R,n.mld_s,n.PSY.bo_s_weight,B,w.BLKSIZE_s,n.scalefac_band.s,w.BLKSIZE_s/384,w.SBMAX_s),v(n.npart_s<w.CBANDS),E=0,i=0;i<n.npart_s;i++){var L;I=S;M[i]>=f&&(I=A*(M[i]-f)/(c-f)+S*(c-M[i])/(c-f)),y[i]=Math.pow(10,I/10),L=o.MAX_VALUE;for(O=0;O<n.numlines_s[i];O++,E++){var N;H=B*E/(1e3*w.BLKSIZE_s);N=this.ATHformula(1e3*H,e)-20,N=Math.pow(10,.1*N),L>(N*=n.numlines_s[i])&&(L=N)}n.ATH.cb_s[i]=L,L=7*M[i]/12-7,M[i]>12&&(L*=1+3.1*Math.log(1+L)),M[i]<12&&(L*=1+2.3*Math.log(1-L)),L<-15&&(L=-15),L-=8,n.minval_s[i]=Math.pow(10,L/10)*n.numlines_s[i]}n.s3_ss=le(n.s3ind_s,n.npart_s,M,R,y,l),T=Math.pow(10,9/16),x=Math.pow(10,1.5),k=Math.pow(10,1.5),t.init_fft(n),n.decay=Math.exp(-1*r/(.01*B/192)),V=3.5,0!=(2&e.exp_nspsytune)&&(V=1),Math.abs(e.msfix)>0&&(V=e.msfix),e.msfix=V;for(var b=0;b<n.npart_l;b++)n.s3ind[b][1]>n.npart_l-1&&(n.s3ind[b][1]=n.npart_l-1);var D=576*n.mode_gr/B;if(n.ATH.decay=Math.pow(10,-1.2*D),n.ATH.adjust=.01,n.ATH.adjustLimit=1,v(n.bo_l[w.SBMAX_l-1]<=n.npart_l),v(n.bo_s[w.SBMAX_s-1]<=n.npart_s),-1!=e.ATHtype){var X=e.out_samplerate/w.BLKSIZE,F=0;for(H=0,i=0;i<w.BLKSIZE/2;++i)H+=X,n.ATH.eql_w[i]=1/Math.pow(10,this.ATHformula(H,e)/10),F+=n.ATH.eql_w[i];for(F=1/F,i=w.BLKSIZE/2;--i>=0;)n.ATH.eql_w[i]*=F}for(b=E=0;b<n.npart_s;++b)for(i=0;i<n.numlines_s[b];++i)++E;v(129==E);for(b=E=0;b<n.npart_l;++b)for(i=0;i<n.numlines_l[b];++i)++E;for(v(513==E),E=0,i=0;i<n.npart_l;i++){H=B*(E+n.numlines_l[i]/2)/(1*w.BLKSIZE);n.mld_cb_l[i]=fe(H),E+=n.numlines_l[i]}for(;i<w.CBANDS;++i)n.mld_cb_l[i]=1;for(E=0,i=0;i<n.npart_s;i++){H=B*(E+n.numlines_s[i]/2)/(1*w.BLKSIZE_s);n.mld_cb_s[i]=fe(H),E+=n.numlines_s[i]}for(;i<w.CBANDS;++i)n.mld_cb_s[i]=1;return 0},this.ATHformula=function(e,t){var n;switch(t.ATHtype){case 0:n=ce(e,9);break;case 1:n=ce(e,-1);break;case 2:default:n=ce(e,0);break;case 3:n=ce(e,1)+6;break;case 4:n=ce(e,t.ATHcurve)}return n}}},393:function(e,t,n){var r=n(298),_=(r.System,r.VbrMode,r.Float,r.ShortBlock,r.Util),o=(r.Arrays,r.new_array_n,r.new_byte,r.new_double,r.new_float),l=(r.new_float_n,r.new_int,r.new_int_n,r.assert,n(299));e.exports=function(){var e=o(l.BLKSIZE),t=o(l.BLKSIZE_s/2),n=[.9238795325112867,.3826834323650898,.9951847266721969,.0980171403295606,.9996988186962042,.02454122852291229,.9999811752826011,.006135884649154475];function r(e,t,r){var o,l,f,c=0,h=t+(r<<=1);o=4;do{var m,d,i,v,S,w,A;A=o>>1,w=(S=o<<1)+(v=o),o=S<<1,f=(l=t)+A;do{E=e[l+0]-e[l+v],B=e[l+0]+e[l+v],P=e[l+S]-e[l+w],x=e[l+S]+e[l+w],e[l+S]=B-x,e[l+0]=B+x,e[l+w]=E-P,e[l+v]=E+P,E=e[f+0]-e[f+v],B=e[f+0]+e[f+v],P=_.SQRT2*e[f+w],x=_.SQRT2*e[f+S],e[f+S]=B-x,e[f+0]=B+x,e[f+w]=E-P,e[f+v]=E+P,f+=o,l+=o}while(l<h);for(d=n[c+0],m=n[c+1],i=1;i<A;i++){var M,R;M=1-2*m*m,R=2*m*d,l=t+i,f=t+v-i;do{var a,b,y,B,E,T,x,k,P,I;b=R*e[l+v]-M*e[f+v],a=M*e[l+v]+R*e[f+v],E=e[l+0]-a,B=e[l+0]+a,T=e[f+0]-b,y=e[f+0]+b,b=R*e[l+w]-M*e[f+w],a=M*e[l+w]+R*e[f+w],P=e[l+S]-a,x=e[l+S]+a,I=e[f+S]-b,k=e[f+S]+b,b=m*x-d*I,a=d*x+m*I,e[l+S]=B-a,e[l+0]=B+a,e[f+w]=T-b,e[f+v]=T+b,b=d*k-m*P,a=m*k+d*P,e[f+S]=y-a,e[f+0]=y+a,e[l+w]=E-b,e[l+v]=E+b,f+=o,l+=o}while(l<h);d=(M=d)*n[c+0]-m*n[c+1],m=M*n[c+1]+m*n[c+0]}c+=2}while(o<r)}var f=[0,128,64,192,32,160,96,224,16,144,80,208,48,176,112,240,8,136,72,200,40,168,104,232,24,152,88,216,56,184,120,248,4,132,68,196,36,164,100,228,20,148,84,212,52,180,116,244,12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254];this.fft_short=function(e,n,_,o,c){for(var b=0;b<3;b++){var h=l.BLKSIZE_s/2,m=65535&192*(b+1),d=l.BLKSIZE_s/8-1;do{var v,S,w,A,M,i=255&f[d<<2];S=(v=t[i]*o[_][c+i+m])-(M=t[127-i]*o[_][c+i+m+128]),v+=M,A=(w=t[i+64]*o[_][c+i+m+64])-(M=t[63-i]*o[_][c+i+m+192]),w+=M,h-=4,n[b][h+0]=v+w,n[b][h+2]=v-w,n[b][h+1]=S+A,n[b][h+3]=S-A,S=(v=t[i+1]*o[_][c+i+m+1])-(M=t[126-i]*o[_][c+i+m+129]),v+=M,A=(w=t[i+65]*o[_][c+i+m+65])-(M=t[62-i]*o[_][c+i+m+193]),w+=M,n[b][h+l.BLKSIZE_s/2+0]=v+w,n[b][h+l.BLKSIZE_s/2+2]=v-w,n[b][h+l.BLKSIZE_s/2+1]=S+A,n[b][h+l.BLKSIZE_s/2+3]=S-A}while(--d>=0);r(n[b],h,l.BLKSIZE_s/2)}},this.fft_long=function(t,n,_,o,c){var h=l.BLKSIZE/8-1,m=l.BLKSIZE/2;do{var d,v,S,w,A,i=255&f[h];v=(d=e[i]*o[_][c+i])-(A=e[i+512]*o[_][c+i+512]),d+=A,w=(S=e[i+256]*o[_][c+i+256])-(A=e[i+768]*o[_][c+i+768]),S+=A,n[(m-=4)+0]=d+S,n[m+2]=d-S,n[m+1]=v+w,n[m+3]=v-w,v=(d=e[i+1]*o[_][c+i+1])-(A=e[i+513]*o[_][c+i+513]),d+=A,w=(S=e[i+257]*o[_][c+i+257])-(A=e[i+769]*o[_][c+i+769]),S+=A,n[m+l.BLKSIZE/2+0]=d+S,n[m+l.BLKSIZE/2+2]=d-S,n[m+l.BLKSIZE/2+1]=v+w,n[m+l.BLKSIZE/2+3]=v-w}while(--h>=0);r(n,m,l.BLKSIZE/2)},this.init_fft=function(n){for(var i=0;i<l.BLKSIZE;i++)e[i]=.42-.5*Math.cos(2*Math.PI*(i+.5)/l.BLKSIZE)+.08*Math.cos(4*Math.PI*(i+.5)/l.BLKSIZE);for(i=0;i<l.BLKSIZE_s/2;i++)t[i]=.5*(1-Math.cos(2*Math.PI*(i+.5)/l.BLKSIZE_s))}}},394:function(e,t,n){var r=n(298),_=r.System,o=(r.VbrMode,r.Float,r.ShortBlock,r.Util),l=r.Arrays,f=(r.new_array_n,r.new_byte,r.new_double,r.new_float),c=(r.new_float_n,r.new_int,r.new_int_n,r.assert,n(299));e.exports=function(){var e=[-.1482523854003001,32.308141959636465,296.40344946382766,883.1344870032432,11113.947376231741,1057.2713659324597,305.7402417275812,30.825928907280012,3.8533188138216365,59.42900443849514,709.5899960123345,5281.91112291017,-5829.66483675846,-817.6293103748613,-76.91656988279972,-4.594269939176596,.9063471690191471,.1960342806591213,-.15466694054279598,34.324387823855965,301.8067566458425,817.599602898885,11573.795901679885,1181.2520595540152,321.59731579894424,31.232021761053772,3.7107095756221318,53.650946155329365,684.167428119626,5224.56624370173,-6366.391851890084,-908.9766368219582,-89.83068876699639,-5.411397422890401,.8206787908286602,.3901806440322567,-.16070888947830023,36.147034243915876,304.11815768187864,732.7429163887613,11989.60988270091,1300.012278487897,335.28490093152146,31.48816102859945,3.373875931311736,47.232241542899175,652.7371796173471,5132.414255594984,-6909.087078780055,-1001.9990371107289,-103.62185754286375,-6.104916304710272,.7416505462720353,.5805693545089249,-.16636367662261495,37.751650073343995,303.01103387567713,627.9747488785183,12358.763425278165,1412.2779918482834,346.7496836825721,31.598286663170416,3.1598635433980946,40.57878626349686,616.1671130880391,5007.833007176154,-7454.040671756168,-1095.7960341867115,-118.24411666465777,-6.818469345853504,.6681786379192989,.7653668647301797,-.1716176790982088,39.11551877123304,298.3413246578966,503.5259106886539,12679.589408408976,1516.5821921214542,355.9850766329023,31.395241710249053,2.9164211881972335,33.79716964664243,574.8943997801362,4853.234992253242,-7997.57021486075,-1189.7624067269965,-133.6444792601766,-7.7202770609839915,.5993769336819237,.9427934736519954,-.17645823955292173,40.21879108166477,289.9982036694474,359.3226160751053,12950.259102786438,1612.1013903507662,362.85067106591504,31.045922092242872,2.822222032597987,26.988862316190684,529.8996541764288,4671.371946949588,-8535.899136645805,-1282.5898586244496,-149.58553632943463,-8.643494270763135,.5345111359507916,1.111140466039205,-.36174739330527045,41.04429910497807,277.5463268268618,195.6386023135583,13169.43812144731,1697.6433561479398,367.40983966190305,30.557037410382826,2.531473372857427,20.070154905927314,481.50208566532336,4464.970341588308,-9065.36882077239,-1373.62841526722,-166.1660487028118,-9.58289321133207,.4729647758913199,1.268786568327291,-.36970682634889585,41.393213350082036,261.2935935556502,12.935476055240873,13336.131683328815,1772.508612059496,369.76534388639965,29.751323653701338,2.4023193045459172,13.304795348228817,430.5615775526625,4237.0568611071185,-9581.931701634761,-1461.6913552409758,-183.12733958476446,-10.718010163869403,.41421356237309503,1.414213562373095,-.37677560326535325,41.619486213528496,241.05423794991074,-187.94665032361226,13450.063605744153,1836.153896465782,369.4908799925761,29.001847876923147,2.0714759319987186,6.779591200894186,377.7767837205709,3990.386575512536,-10081.709459700915,-1545.947424837898,-200.3762958015653,-11.864482073055006,.3578057213145241,1.546020906725474,-.3829366947518991,41.1516456456653,216.47684307105183,-406.1569483347166,13511.136535077321,1887.8076599260432,367.3025214564151,28.136213436723654,1.913880671464418,.3829366947518991,323.85365704338597,3728.1472257487526,-10561.233882199509,-1625.2025997821418,-217.62525175416,-13.015432208941645,.3033466836073424,1.66293922460509,-.5822628872992417,40.35639251440489,188.20071124269245,-640.2706748618148,13519.21490106562,1927.6022433578062,362.8197642637487,26.968821921868447,1.7463817695935329,-5.62650678237171,269.3016715297017,3453.386536448852,-11016.145278780888,-1698.6569643425091,-234.7658734267683,-14.16351421663124,.2504869601913055,1.76384252869671,-.5887180101749253,39.23429103868072,155.76096234403798,-889.2492977967378,13475.470561874661,1955.0535223723712,356.4450994756727,25.894952980042156,1.5695032905781554,-11.181939564328772,214.80884394039484,3169.1640829158237,-11443.321309975563,-1765.1588461316153,-251.68908574481912,-15.49755935939164,.198912367379658,1.847759065022573,-.7912582233652842,37.39369355329111,119.699486012458,-1151.0956593239027,13380.446257078214,1970.3952110853447,348.01959814116185,24.731487364283044,1.3850130831637748,-16.421408865300393,161.05030052864092,2878.3322807850063,-11838.991423510031,-1823.985884688674,-268.2854986386903,-16.81724543849939,.1483359875383474,1.913880671464418,-.7960642926861912,35.2322109610459,80.01928065061526,-1424.0212633405113,13235.794061869668,1973.804052543835,337.9908651258184,23.289159354463873,1.3934255946442087,-21.099669467133474,108.48348407242611,2583.700758091299,-12199.726194855148,-1874.2780658979746,-284.2467154529415,-18.11369784385905,.09849140335716425,1.961570560806461,-.998795456205172,32.56307803611191,36.958364584370486,-1706.075448829146,13043.287458812016,1965.3831106103316,326.43182772364605,22.175018750622293,1.198638339011324,-25.371248002043963,57.53505923036915,2288.41886619975,-12522.674544337233,-1914.8400385312243,-299.26241273417224,-19.37805630698734,.04912684976946725,1.990369453344394,.035780907*o.SQRT2*.5/2384e-9,.017876148*o.SQRT2*.5/2384e-9,.003134727*o.SQRT2*.5/2384e-9,.002457142*o.SQRT2*.5/2384e-9,971317e-9*o.SQRT2*.5/2384e-9,218868e-9*o.SQRT2*.5/2384e-9,101566e-9*o.SQRT2*.5/2384e-9,13828e-9*o.SQRT2*.5/2384e-9,12804.797818791945,1945.5515939597317,313.4244966442953,20.801593959731544,1995.1556208053692,9.000838926174497,-29.20218120805369],t=[[2382191739347913e-28,6423305872147834e-28,9400849094049688e-28,1122435026096556e-27,1183840321267481e-27,1122435026096556e-27,940084909404969e-27,6423305872147839e-28,2382191739347918e-28,5456116108943412e-27,4878985199565852e-27,4240448995017367e-27,3559909094758252e-27,2858043359288075e-27,2156177623817898e-27,1475637723558783e-27,8371015190102974e-28,2599706096327376e-28,-5456116108943412e-27,-4878985199565852e-27,-4240448995017367e-27,-3559909094758252e-27,-2858043359288076e-27,-2156177623817898e-27,-1475637723558783e-27,-8371015190102975e-28,-2599706096327376e-28,-2382191739347923e-28,-6423305872147843e-28,-9400849094049696e-28,-1122435026096556e-27,-1183840321267481e-27,-1122435026096556e-27,-9400849094049694e-28,-642330587214784e-27,-2382191739347918e-28],[2382191739347913e-28,6423305872147834e-28,9400849094049688e-28,1122435026096556e-27,1183840321267481e-27,1122435026096556e-27,9400849094049688e-28,6423305872147841e-28,2382191739347918e-28,5456116108943413e-27,4878985199565852e-27,4240448995017367e-27,3559909094758253e-27,2858043359288075e-27,2156177623817898e-27,1475637723558782e-27,8371015190102975e-28,2599706096327376e-28,-5461314069809755e-27,-4921085770524055e-27,-4343405037091838e-27,-3732668368707687e-27,-3093523840190885e-27,-2430835727329465e-27,-1734679010007751e-27,-974825365660928e-27,-2797435120168326e-28,0,0,0,0,0,0,-2283748241799531e-28,-4037858874020686e-28,-2146547464825323e-28],[.1316524975873958,.414213562373095,.7673269879789602,1.091308501069271,1.303225372841206,1.56968557711749,1.920982126971166,2.414213562373094,3.171594802363212,4.510708503662055,7.595754112725146,22.90376554843115,.984807753012208,.6427876096865394,.3420201433256688,.9396926207859084,-.1736481776669303,-.7660444431189779,.8660254037844387,.5,-.5144957554275265,-.4717319685649723,-.3133774542039019,-.1819131996109812,-.09457419252642064,-.04096558288530405,-.01419856857247115,-.003699974673760037,.8574929257125442,.8817419973177052,.9496286491027329,.9833145924917901,.9955178160675857,.9991605581781475,.999899195244447,.9999931550702802],[0,0,0,0,0,0,2283748241799531e-28,4037858874020686e-28,2146547464825323e-28,5461314069809755e-27,4921085770524055e-27,4343405037091838e-27,3732668368707687e-27,3093523840190885e-27,2430835727329466e-27,1734679010007751e-27,974825365660928e-27,2797435120168326e-28,-5456116108943413e-27,-4878985199565852e-27,-4240448995017367e-27,-3559909094758253e-27,-2858043359288075e-27,-2156177623817898e-27,-1475637723558782e-27,-8371015190102975e-28,-2599706096327376e-28,-2382191739347913e-28,-6423305872147834e-28,-9400849094049688e-28,-1122435026096556e-27,-1183840321267481e-27,-1122435026096556e-27,-9400849094049688e-28,-6423305872147841e-28,-2382191739347918e-28]],n=t[c.SHORT_TYPE],r=t[c.SHORT_TYPE],h=t[c.SHORT_TYPE],m=t[c.SHORT_TYPE],d=[0,1,16,17,8,9,24,25,4,5,20,21,12,13,28,29,2,3,18,19,10,11,26,27,6,7,22,23,14,15,30,31];function v(t,n,a){for(var u,r,_,l=10,f=n+238-14-286,i=-15;i<0;i++){var c,s,h;c=e[l+-10],s=t[f+-224]*c,h=t[n+224]*c,c=e[l+-9],s+=t[f+-160]*c,h+=t[n+160]*c,c=e[l+-8],s+=t[f+-96]*c,h+=t[n+96]*c,c=e[l+-7],s+=t[f+-32]*c,h+=t[n+32]*c,c=e[l+-6],s+=t[f+32]*c,h+=t[n+-32]*c,c=e[l+-5],s+=t[f+96]*c,h+=t[n+-96]*c,c=e[l+-4],s+=t[f+160]*c,h+=t[n+-160]*c,c=e[l+-3],s+=t[f+224]*c,h+=t[n+-224]*c,c=e[l+-2],s+=t[n+-256]*c,h-=t[f+256]*c,c=e[l+-1],s+=t[n+-192]*c,h-=t[f+192]*c,c=e[l+0],s+=t[n+-128]*c,h-=t[f+128]*c,c=e[l+1],s+=t[n+-64]*c,h-=t[f+64]*c,c=e[l+2],s+=t[n+0]*c,h-=t[f+0]*c,c=e[l+3],s+=t[n+64]*c,h-=t[f+-64]*c,c=e[l+4],s+=t[n+128]*c,h-=t[f+-128]*c,c=e[l+5],s+=t[n+192]*c,c=(h-=t[f+-192]*c)-(s*=e[l+6]),a[30+2*i]=h+s,a[31+2*i]=e[l+7]*c,l+=18,n--,f++}h=t[n+-16]*e[l+-10],s=t[n+-32]*e[l+-2],h+=(t[n+-48]-t[n+16])*e[l+-9],s+=t[n+-96]*e[l+-1],h+=(t[n+-80]+t[n+48])*e[l+-8],s+=t[n+-160]*e[l+0],h+=(t[n+-112]-t[n+80])*e[l+-7],s+=t[n+-224]*e[l+1],h+=(t[n+-144]+t[n+112])*e[l+-6],s-=t[n+32]*e[l+2],h+=(t[n+-176]-t[n+144])*e[l+-5],s-=t[n+96]*e[l+3],h+=(t[n+-208]+t[n+176])*e[l+-4],s-=t[n+160]*e[l+4],h+=(t[n+-240]-t[n+208])*e[l+-3],u=(s-=t[n+224])-h,r=s+h,h=a[14],s=a[15]-h,a[31]=r+h,a[30]=u+s,a[15]=u-s,a[14]=r-h,_=a[28]-a[0],a[0]+=a[28],a[28]=_*e[l+-36+7],_=a[29]-a[1],a[1]+=a[29],a[29]=_*e[l+-36+7],_=a[26]-a[2],a[2]+=a[26],a[26]=_*e[l+-72+7],_=a[27]-a[3],a[3]+=a[27],a[27]=_*e[l+-72+7],_=a[24]-a[4],a[4]+=a[24],a[24]=_*e[l+-108+7],_=a[25]-a[5],a[5]+=a[25],a[25]=_*e[l+-108+7],_=a[22]-a[6],a[6]+=a[22],a[22]=_*o.SQRT2,_=a[23]-a[7],a[7]+=a[23],a[23]=_*o.SQRT2-a[7],a[7]-=a[6],a[22]-=a[7],a[23]-=a[22],_=a[6],a[6]=a[31]-_,a[31]=a[31]+_,_=a[7],a[7]=a[30]-_,a[30]=a[30]+_,_=a[22],a[22]=a[15]-_,a[15]=a[15]+_,_=a[23],a[23]=a[14]-_,a[14]=a[14]+_,_=a[20]-a[8],a[8]+=a[20],a[20]=_*e[l+-180+7],_=a[21]-a[9],a[9]+=a[21],a[21]=_*e[l+-180+7],_=a[18]-a[10],a[10]+=a[18],a[18]=_*e[l+-216+7],_=a[19]-a[11],a[11]+=a[19],a[19]=_*e[l+-216+7],_=a[16]-a[12],a[12]+=a[16],a[16]=_*e[l+-252+7],_=a[17]-a[13],a[13]+=a[17],a[17]=_*e[l+-252+7],_=-a[20]+a[24],a[20]+=a[24],a[24]=_*e[l+-216+7],_=-a[21]+a[25],a[21]+=a[25],a[25]=_*e[l+-216+7],_=a[4]-a[8],a[4]+=a[8],a[8]=_*e[l+-216+7],_=a[5]-a[9],a[5]+=a[9],a[9]=_*e[l+-216+7],_=a[0]-a[12],a[0]+=a[12],a[12]=_*e[l+-72+7],_=a[1]-a[13],a[1]+=a[13],a[13]=_*e[l+-72+7],_=a[16]-a[28],a[16]+=a[28],a[28]=_*e[l+-72+7],_=-a[17]+a[29],a[17]+=a[29],a[29]=_*e[l+-72+7],_=o.SQRT2*(a[2]-a[10]),a[2]+=a[10],a[10]=_,_=o.SQRT2*(a[3]-a[11]),a[3]+=a[11],a[11]=_,_=o.SQRT2*(-a[18]+a[26]),a[18]+=a[26],a[26]=_-a[18],_=o.SQRT2*(-a[19]+a[27]),a[19]+=a[27],a[27]=_-a[19],_=a[2],a[19]-=a[3],a[3]-=_,a[2]=a[31]-_,a[31]+=_,_=a[3],a[11]-=a[19],a[18]-=_,a[3]=a[30]-_,a[30]+=_,_=a[18],a[27]-=a[11],a[19]-=_,a[18]=a[15]-_,a[15]+=_,_=a[19],a[10]-=_,a[19]=a[14]-_,a[14]+=_,_=a[10],a[11]-=_,a[10]=a[23]-_,a[23]+=_,_=a[11],a[26]-=_,a[11]=a[22]-_,a[22]+=_,_=a[26],a[27]-=_,a[26]=a[7]-_,a[7]+=_,_=a[27],a[27]=a[6]-_,a[6]+=_,_=o.SQRT2*(a[0]-a[4]),a[0]+=a[4],a[4]=_,_=o.SQRT2*(a[1]-a[5]),a[1]+=a[5],a[5]=_,_=o.SQRT2*(a[16]-a[20]),a[16]+=a[20],a[20]=_,_=o.SQRT2*(a[17]-a[21]),a[17]+=a[21],a[21]=_,_=-o.SQRT2*(a[8]-a[12]),a[8]+=a[12],a[12]=_-a[8],_=-o.SQRT2*(a[9]-a[13]),a[9]+=a[13],a[13]=_-a[9],_=-o.SQRT2*(a[25]-a[29]),a[25]+=a[29],a[29]=_-a[25],_=-o.SQRT2*(a[24]+a[28]),a[24]-=a[28],a[28]=_-a[24],_=a[24]-a[16],a[24]=_,_=a[20]-_,a[20]=_,_=a[28]-_,a[28]=_,_=a[25]-a[17],a[25]=_,_=a[21]-_,a[21]=_,_=a[29]-_,a[29]=_,_=a[17]-a[1],a[17]=_,_=a[9]-_,a[9]=_,_=a[25]-_,a[25]=_,_=a[5]-_,a[5]=_,_=a[21]-_,a[21]=_,_=a[13]-_,a[13]=_,_=a[29]-_,a[29]=_,_=a[1]-a[0],a[1]=_,_=a[16]-_,a[16]=_,_=a[17]-_,a[17]=_,_=a[8]-_,a[8]=_,_=a[9]-_,a[9]=_,_=a[24]-_,a[24]=_,_=a[25]-_,a[25]=_,_=a[4]-_,a[4]=_,_=a[5]-_,a[5]=_,_=a[20]-_,a[20]=_,_=a[21]-_,a[21]=_,_=a[12]-_,a[12]=_,_=a[13]-_,a[13]=_,_=a[28]-_,a[28]=_,_=a[29]-_,a[29]=_,_=a[0],a[0]+=a[31],a[31]-=_,_=a[1],a[1]+=a[30],a[30]-=_,_=a[16],a[16]+=a[15],a[15]-=_,_=a[17],a[17]+=a[14],a[14]-=_,_=a[8],a[8]+=a[23],a[23]-=_,_=a[9],a[9]+=a[22],a[22]-=_,_=a[24],a[24]+=a[7],a[7]-=_,_=a[25],a[25]+=a[6],a[6]-=_,_=a[4],a[4]+=a[27],a[27]-=_,_=a[5],a[5]+=a[26],a[26]-=_,_=a[20],a[20]+=a[11],a[11]-=_,_=a[21],a[21]+=a[10],a[10]-=_,_=a[12],a[12]+=a[19],a[19]-=_,_=a[13],a[13]+=a[18],a[18]-=_,_=a[28],a[28]+=a[3],a[3]-=_,_=a[29],a[29]+=a[2],a[2]-=_}function S(e,n){for(var r=0;r<3;r++){var _,o,l,f,h,m;o=(f=e[n+6]*t[c.SHORT_TYPE][0]-e[n+15])+(_=e[n+0]*t[c.SHORT_TYPE][2]-e[n+9]),l=f-_,h=(f=e[n+15]*t[c.SHORT_TYPE][0]+e[n+6])+(_=e[n+9]*t[c.SHORT_TYPE][2]+e[n+0]),m=-f+_,_=2069978111953089e-26*(e[n+3]*t[c.SHORT_TYPE][1]-e[n+12]),f=2069978111953089e-26*(e[n+12]*t[c.SHORT_TYPE][1]+e[n+3]),e[n+0]=190752519173728e-25*o+_,e[n+15]=190752519173728e-25*-h+f,l=.8660254037844387*l*1907525191737281e-26,h=.5*h*1907525191737281e-26+f,e[n+3]=l-h,e[n+6]=l+h,o=.5*o*1907525191737281e-26-_,m=.8660254037844387*m*1907525191737281e-26,e[n+9]=o+m,e[n+12]=o-m,n++}}this.mdct_sub48=function(e,o,w){for(var A,M,R,y,B,E,T,x,k,P,I,V,O,H,L,N,D,X,F,C,Y,j=o,U=286,z=0;z<e.channels_out;z++){for(var G=0;G<e.mode_gr;G++){for(var K,Z=e.l3_side.tt[G][z],W=Z.xr,Q=0,samp=e.sb_sample[z][1-G],J=0,$=0;$<9;$++)for(v(j,U,samp[J]),v(j,U+32,samp[J+1]),J+=2,U+=64,K=1;K<32;K+=2)samp[J-1][K]*=-1;for(K=0;K<32;K++,Q+=18){var ee=Z.block_type,te=e.sb_sample[z][G],ae=e.sb_sample[z][1-G];if(0!=Z.mixed_block_flag&&K<2&&(ee=0),e.amp_filter[K]<1e-12)l.fill(W,Q+0,Q+18,0);else{if(e.amp_filter[K]<1)for($=0;$<18;$++)ae[$][d[K]]*=e.amp_filter[K];if(ee==c.SHORT_TYPE){for($=-3;$<0;$++){var ne=t[c.SHORT_TYPE][$+3];W[Q+3*$+9]=te[9+$][d[K]]*ne-te[8-$][d[K]],W[Q+3*$+18]=te[14-$][d[K]]*ne+te[15+$][d[K]],W[Q+3*$+10]=te[15+$][d[K]]*ne-te[14-$][d[K]],W[Q+3*$+19]=ae[2-$][d[K]]*ne+ae[3+$][d[K]],W[Q+3*$+11]=ae[3+$][d[K]]*ne-ae[2-$][d[K]],W[Q+3*$+20]=ae[8-$][d[K]]*ne+ae[9+$][d[K]]}S(W,Q)}else{var se=f(18);for($=-9;$<0;$++){var a,b;a=t[ee][$+27]*ae[$+9][d[K]]+t[ee][$+36]*ae[8-$][d[K]],b=t[ee][$+9]*te[$+9][d[K]]-t[ee][$+18]*te[8-$][d[K]],se[$+9]=a-b*n[3+$+9],se[$+18]=a*n[3+$+9]+b}A=W,M=Q,y=void 0,B=void 0,E=void 0,T=void 0,x=void 0,k=void 0,P=void 0,I=void 0,V=void 0,O=void 0,H=void 0,L=void 0,N=void 0,D=void 0,X=void 0,F=void 0,C=void 0,Y=void 0,E=(R=se)[17]-R[9],x=R[15]-R[11],k=R[14]-R[12],P=R[0]+R[8],I=R[1]+R[7],V=R[2]+R[6],O=R[3]+R[5],A[M+17]=P+V-O-(I-R[4]),B=(P+V-O)*r[19]+(I-R[4]),y=(E-x-k)*r[18],A[M+5]=y+B,A[M+6]=y-B,T=(R[16]-R[10])*r[18],I=I*r[19]+R[4],y=E*r[12]+T+x*r[13]+k*r[14],B=-P*r[16]+I-V*r[17]+O*r[15],A[M+1]=y+B,A[M+2]=y-B,y=E*r[13]-T-x*r[14]+k*r[12],B=-P*r[17]+I-V*r[15]+O*r[16],A[M+9]=y+B,A[M+10]=y-B,y=E*r[14]-T+x*r[12]-k*r[13],B=P*r[15]-I+V*r[16]-O*r[17],A[M+13]=y+B,A[M+14]=y-B,H=R[8]-R[0],N=R[6]-R[2],D=R[5]-R[3],X=R[17]+R[9],F=R[16]+R[10],C=R[15]+R[11],Y=R[14]+R[12],A[M+0]=X+C+Y+(F+R[13]),y=(X+C+Y)*r[19]-(F+R[13]),B=(H-N+D)*r[18],A[M+11]=y+B,A[M+12]=y-B,L=(R[7]-R[1])*r[18],F=R[13]-F*r[19],y=X*r[15]-F+C*r[16]+Y*r[17],B=H*r[14]+L+N*r[12]+D*r[13],A[M+3]=y+B,A[M+4]=y-B,y=-X*r[17]+F-C*r[15]-Y*r[16],B=H*r[13]+L-N*r[14]-D*r[12],A[M+7]=y+B,A[M+8]=y-B,y=-X*r[16]+F-C*r[17]-Y*r[15],B=H*r[12]-L+N*r[13]-D*r[14],A[M+15]=y+B,A[M+16]=y-B}}if(ee!=c.SHORT_TYPE&&0!=K)for($=7;$>=0;--$){var re,ie;re=W[Q+$]*h[20+$]+W[Q+-1-$]*m[28+$],ie=W[Q+$]*m[28+$]-W[Q+-1-$]*h[20+$],W[Q+-1-$]=re,W[Q+$]=ie}}}if(j=w,U=286,1==e.mode_gr)for(var i=0;i<18;i++)_.arraycopy(e.sb_sample[z][1][i],0,e.sb_sample[z][0][i],0,32)}}}},395:function(e,t,n){var r=n(335);e.exports=function(){this.thm=new r,this.en=new r}},396:function(e,t,n){var r=n(308);e.exports=function(){this.class_id=0,this.num_samples=0,this.num_channels=0,this.in_samplerate=0,this.out_samplerate=0,this.scale=0,this.scale_left=0,this.scale_right=0,this.analysis=!1,this.bWriteVbrTag=!1,this.decode_only=!1,this.quality=0,this.mode=r.STEREO,this.force_ms=!1,this.free_format=!1,this.findReplayGain=!1,this.decode_on_the_fly=!1,this.write_id3tag_automatic=!1,this.brate=0,this.compression_ratio=0,this.copyright=0,this.original=0,this.extension=0,this.emphasis=0,this.error_protection=0,this.strict_ISO=!1,this.disable_reservoir=!1,this.quant_comp=0,this.quant_comp_short=0,this.experimentalY=!1,this.experimentalZ=0,this.exp_nspsytune=0,this.preset=0,this.VBR=null,this.VBR_q_frac=0,this.VBR_q=0,this.VBR_mean_bitrate_kbps=0,this.VBR_min_bitrate_kbps=0,this.VBR_max_bitrate_kbps=0,this.VBR_hard_min=0,this.lowpassfreq=0,this.highpassfreq=0,this.lowpasswidth=0,this.highpasswidth=0,this.maskingadjust=0,this.maskingadjust_short=0,this.ATHonly=!1,this.ATHshort=!1,this.noATH=!1,this.ATHtype=0,this.ATHcurve=0,this.ATHlower=0,this.athaa_type=0,this.athaa_loudapprox=0,this.athaa_sensitivity=0,this.short_blocks=null,this.useTemporal=!1,this.interChRatio=0,this.msfix=0,this.tune=!1,this.tune_value_a=0,this.version=0,this.encoder_delay=0,this.encoder_padding=0,this.framesize=0,this.frameNum=0,this.lame_allocated_gfp=0,this.internal_flags=null}},397:function(e,t,n){var r=n(298),_=(r.System,r.VbrMode,r.Float,r.ShortBlock,r.Util,r.Arrays,r.new_array_n,r.new_byte,r.new_double,r.new_float,r.new_float_n,r.new_int),o=(r.new_int_n,r.assert,n(323));e.exports=function(){this.tt=[[null,null],[null,null]],this.main_data_begin=0,this.private_bits=0,this.resvDrain_pre=0,this.resvDrain_post=0,this.scfsi=[_(4),_(4)];for(var e=0;e<2;e++)for(var t=0;t<2;t++)this.tt[e][t]=new o}},398:function(e,t,n){var r=n(298),_=(r.System,r.VbrMode,r.Float,r.ShortBlock,r.Util,r.Arrays,r.new_array_n,r.new_byte,r.new_double,r.new_float),o=r.new_float_n,l=r.new_int,f=(r.new_int_n,r.assert,n(299));e.exports=function(){this.last_en_subshort=o([4,9]),this.lastAttacks=l(4),this.pefirbuf=_(19),this.longfact=_(f.SBMAX_l),this.shortfact=_(f.SBMAX_s),this.attackthre=0,this.attackthre_s=0}},399:function(e,t){e.exports=function(){this.sum=0,this.seen=0,this.want=0,this.pos=0,this.size=0,this.bag=null,this.nVbrNumFrames=0,this.nBytesWritten=0,this.TotalFrameSize=0}},400:function(e,t,n){var r=n(298),_=(r.System,r.VbrMode,r.Float,r.ShortBlock,r.Util,r.Arrays,r.new_array_n,r.new_byte,r.new_double,r.new_float),o=(r.new_float_n,r.new_int,r.new_int_n,r.assert,n(299));e.exports=function(){this.useAdjust=0,this.aaSensitivityP=0,this.adjust=0,this.adjustLimit=0,this.decay=0,this.floor=0,this.l=_(o.SBMAX_l),this.s=_(o.SBMAX_s),this.psfb21=_(o.PSFB21),this.psfb12=_(o.PSFB12),this.cb_l=_(o.CBANDS),this.cb_s=_(o.CBANDS),this.eql_w=_(o.BLKSIZE/2)}},401:function(e,t,n){var r=n(298),_=(r.System,r.VbrMode,r.Float,r.ShortBlock,r.Util,r.Arrays,r.new_array_n,r.new_byte,r.new_double,r.new_float),o=(r.new_float_n,r.new_int),l=(r.new_int_n,r.assert,n(337));e.exports=function(){this.linprebuf=_(2*l.MAX_ORDER),this.linpre=0,this.lstepbuf=_(l.MAX_SAMPLES_PER_WINDOW+l.MAX_ORDER),this.lstep=0,this.loutbuf=_(l.MAX_SAMPLES_PER_WINDOW+l.MAX_ORDER),this.lout=0,this.rinprebuf=_(2*l.MAX_ORDER),this.rinpre=0,this.rstepbuf=_(l.MAX_SAMPLES_PER_WINDOW+l.MAX_ORDER),this.rstep=0,this.routbuf=_(l.MAX_SAMPLES_PER_WINDOW+l.MAX_ORDER),this.rout=0,this.sampleWindow=0,this.totsamp=0,this.lsum=0,this.rsum=0,this.freqindex=0,this.first=0,this.A=o(0|l.STEPS_per_dB*l.MAX_dB),this.B=o(0|l.STEPS_per_dB*l.MAX_dB)}},402:function(e,t,n){var r=n(298),_=(r.System,r.VbrMode,r.Float,r.ShortBlock,r.Util,r.Arrays,r.new_array_n,r.new_byte,r.new_double,r.new_float),o=(r.new_float_n,r.new_int),l=(r.new_int_n,r.assert),f=n(338),c=n(299),h=n(313),m=n(312);e.exports=function(e){var t=e;this.quantize=t,this.iteration_loop=function(e,t,n,r){var d,v=e.internal_flags,S=_(h.SFBMAX),w=_(576),A=o(2),M=0,R=v.l3_side,y=new f(M);this.quantize.rv.ResvFrameBegin(e,y),M=y.bits;for(var B=0;B<v.mode_gr;B++){d=this.quantize.qupvt.on_pe(e,t,A,M,B,B),v.mode_ext==c.MPG_MD_MS_LR&&(this.quantize.ms_convert(v.l3_side,B),this.quantize.qupvt.reduce_side(A,n[B],M,d));for(var E=0;E<v.channels_out;E++){var T,x,k=R.tt[B][E];k.block_type!=c.SHORT_TYPE?(T=0,x=v.PSY.mask_adjust-T):(T=0,x=v.PSY.mask_adjust_short-T),v.masking_lower=Math.pow(10,.1*x),this.quantize.init_outer_loop(v,k),this.quantize.init_xrpow(v,k,w)&&(this.quantize.qupvt.calc_xmin(e,r[B][E],k,S),this.quantize.outer_loop(e,k,S,w,E,A[E])),this.quantize.iteration_finish_one(v,B,E),l(k.part2_3_length<=m.MAX_BITS_PER_CHANNEL),l(k.part2_3_length<=A[E])}}this.quantize.rv.ResvFrameEnd(v,M)}}},403:function(e,t,n){var r=n(298),_=(r.System,r.VbrMode);r.Float,r.ShortBlock,r.Util,r.Arrays,r.new_array_n,r.new_byte,r.new_double,r.new_float,r.new_float_n,r.new_int,r.new_int_n,r.assert;e.exports=function(){var e,t=n(322);function r(e,t,n,r,_,o,l,f,c,h,m,d,v,S,w){this.vbr_q=e,this.quant_comp=t,this.quant_comp_s=n,this.expY=r,this.st_lrm=_,this.st_s=o,this.masking_adj=l,this.masking_adj_short=f,this.ath_lower=c,this.ath_curve=h,this.ath_sensitivity=m,this.interch=d,this.safejoint=v,this.sfb21mod=S,this.msfix=w}function o(e,t,n,r,_,o,l,f,c,mask,h,m,d,v){this.quant_comp=t,this.quant_comp_s=n,this.safejoint=r,this.nsmsfix=_,this.st_lrm=o,this.st_s=l,this.nsbass=f,this.scale=c,this.masking_adj=mask,this.ath_lower=h,this.ath_curve=m,this.interch=d,this.sfscale=v}this.setModules=function(t){e=t};var l=[new r(0,9,9,0,5.2,125,-4.2,-6.3,4.8,1,0,0,2,21,.97),new r(1,9,9,0,5.3,125,-3.6,-5.6,4.5,1.5,0,0,2,21,1.35),new r(2,9,9,0,5.6,125,-2.2,-3.5,2.8,2,0,0,2,21,1.49),new r(3,9,9,1,5.8,130,-1.8,-2.8,2.6,3,-4,0,2,20,1.64),new r(4,9,9,1,6,135,-.7,-1.1,1.1,3.5,-8,0,2,0,1.79),new r(5,9,9,1,6.4,140,.5,.4,-7.5,4,-12,2e-4,0,0,1.95),new r(6,9,9,1,6.6,145,.67,.65,-14.7,6.5,-19,4e-4,0,0,2.3),new r(7,9,9,1,6.6,145,.8,.75,-19.7,8,-22,6e-4,0,0,2.7),new r(8,9,9,1,6.6,145,1.2,1.15,-27.5,10,-23,7e-4,0,0,0),new r(9,9,9,1,6.6,145,1.6,1.6,-36,11,-25,8e-4,0,0,0),new r(10,9,9,1,6.6,145,2,2,-36,12,-25,8e-4,0,0,0)],f=[new r(0,9,9,0,4.2,25,-7,-4,7.5,1,0,0,2,26,.97),new r(1,9,9,0,4.2,25,-5.6,-3.6,4.5,1.5,0,0,2,21,1.35),new r(2,9,9,0,4.2,25,-4.4,-1.8,2,2,0,0,2,18,1.49),new r(3,9,9,1,4.2,25,-3.4,-1.25,1.1,3,-4,0,2,15,1.64),new r(4,9,9,1,4.2,25,-2.2,.1,0,3.5,-8,0,2,0,1.79),new r(5,9,9,1,4.2,25,-1,1.65,-7.7,4,-12,2e-4,0,0,1.95),new r(6,9,9,1,4.2,25,-0,2.47,-7.7,6.5,-19,4e-4,0,0,2),new r(7,9,9,1,4.2,25,.5,2,-14.5,8,-22,6e-4,0,0,2),new r(8,9,9,1,4.2,25,1,2.4,-22,10,-23,7e-4,0,0,2),new r(9,9,9,1,4.2,25,1.5,2.95,-30,11,-25,8e-4,0,0,2),new r(10,9,9,1,4.2,25,2,2.95,-36,12,-30,8e-4,0,0,2)];function c(e,a,t){var n=e.VBR==_.vbr_rh?l:f,r=e.VBR_q_frac,p=n[a],q=n[a+1],o=p;p.st_lrm=p.st_lrm+r*(q.st_lrm-p.st_lrm),p.st_s=p.st_s+r*(q.st_s-p.st_s),p.masking_adj=p.masking_adj+r*(q.masking_adj-p.masking_adj),p.masking_adj_short=p.masking_adj_short+r*(q.masking_adj_short-p.masking_adj_short),p.ath_lower=p.ath_lower+r*(q.ath_lower-p.ath_lower),p.ath_curve=p.ath_curve+r*(q.ath_curve-p.ath_curve),p.ath_sensitivity=p.ath_sensitivity+r*(q.ath_sensitivity-p.ath_sensitivity),p.interch=p.interch+r*(q.interch-p.interch),p.msfix=p.msfix+r*(q.msfix-p.msfix),function(e,t){var n=0;0>t&&(n=-1,t=0);9<t&&(n=-1,t=9);e.VBR_q=t,e.VBR_q_frac=0}(e,o.vbr_q),0!=t?e.quant_comp=o.quant_comp:Math.abs(e.quant_comp- -1)>0||(e.quant_comp=o.quant_comp),0!=t?e.quant_comp_short=o.quant_comp_s:Math.abs(e.quant_comp_short- -1)>0||(e.quant_comp_short=o.quant_comp_s),0!=o.expY&&(e.experimentalY=0!=o.expY),0!=t?e.internal_flags.nsPsy.attackthre=o.st_lrm:Math.abs(e.internal_flags.nsPsy.attackthre- -1)>0||(e.internal_flags.nsPsy.attackthre=o.st_lrm),0!=t?e.internal_flags.nsPsy.attackthre_s=o.st_s:Math.abs(e.internal_flags.nsPsy.attackthre_s- -1)>0||(e.internal_flags.nsPsy.attackthre_s=o.st_s),0!=t?e.maskingadjust=o.masking_adj:Math.abs(e.maskingadjust-0)>0||(e.maskingadjust=o.masking_adj),0!=t?e.maskingadjust_short=o.masking_adj_short:Math.abs(e.maskingadjust_short-0)>0||(e.maskingadjust_short=o.masking_adj_short),0!=t?e.ATHlower=-o.ath_lower/10:Math.abs(10*-e.ATHlower-0)>0||(e.ATHlower=-o.ath_lower/10),0!=t?e.ATHcurve=o.ath_curve:Math.abs(e.ATHcurve- -1)>0||(e.ATHcurve=o.ath_curve),0!=t?e.athaa_sensitivity=o.ath_sensitivity:Math.abs(e.athaa_sensitivity- -1)>0||(e.athaa_sensitivity=o.ath_sensitivity),o.interch>0&&(0!=t?e.interChRatio=o.interch:Math.abs(e.interChRatio- -1)>0||(e.interChRatio=o.interch)),o.safejoint>0&&(e.exp_nspsytune=e.exp_nspsytune|o.safejoint),o.sfb21mod>0&&(e.exp_nspsytune=e.exp_nspsytune|o.sfb21mod<<20),0!=t?e.msfix=o.msfix:Math.abs(e.msfix- -1)>0||(e.msfix=o.msfix),0==t&&(e.VBR_q=a,e.VBR_q_frac=r)}var h=[new o(8,9,9,0,0,6.6,145,0,.95,0,-30,11,.0012,1),new o(16,9,9,0,0,6.6,145,0,.95,0,-25,11,.001,1),new o(24,9,9,0,0,6.6,145,0,.95,0,-20,11,.001,1),new o(32,9,9,0,0,6.6,145,0,.95,0,-15,11,.001,1),new o(40,9,9,0,0,6.6,145,0,.95,0,-10,11,9e-4,1),new o(48,9,9,0,0,6.6,145,0,.95,0,-10,11,9e-4,1),new o(56,9,9,0,0,6.6,145,0,.95,0,-6,11,8e-4,1),new o(64,9,9,0,0,6.6,145,0,.95,0,-2,11,8e-4,1),new o(80,9,9,0,0,6.6,145,0,.95,0,0,8,7e-4,1),new o(96,9,9,0,2.5,6.6,145,0,.95,0,1,5.5,6e-4,1),new o(112,9,9,0,2.25,6.6,145,0,.95,0,2,4.5,5e-4,1),new o(128,9,9,0,1.95,6.4,140,0,.95,0,3,4,2e-4,1),new o(160,9,9,1,1.79,6,135,0,.95,-2,5,3.5,0,1),new o(192,9,9,1,1.49,5.6,125,0,.97,-4,7,3,0,0),new o(224,9,9,1,1.25,5.2,125,0,.98,-6,9,2,0,0),new o(256,9,9,1,.97,5.2,125,0,1,-8,10,1,0,0),new o(320,9,9,1,.9,5.2,125,0,1,-10,12,0,0,0)];function m(t,n,r){var o=n,l=e.nearestBitrateFullIndex(n);if(t.VBR=_.vbr_abr,t.VBR_mean_bitrate_kbps=o,t.VBR_mean_bitrate_kbps=Math.min(t.VBR_mean_bitrate_kbps,320),t.VBR_mean_bitrate_kbps=Math.max(t.VBR_mean_bitrate_kbps,8),t.brate=t.VBR_mean_bitrate_kbps,t.VBR_mean_bitrate_kbps>320&&(t.disable_reservoir=!0),h[l].safejoint>0&&(t.exp_nspsytune=2|t.exp_nspsytune),h[l].sfscale>0&&(t.internal_flags.noise_shaping=2),Math.abs(h[l].nsbass)>0){var f=int(4*h[l].nsbass);f<0&&(f+=64),t.exp_nspsytune=t.exp_nspsytune|f<<2}return 0!=r?t.quant_comp=h[l].quant_comp:Math.abs(t.quant_comp- -1)>0||(t.quant_comp=h[l].quant_comp),0!=r?t.quant_comp_short=h[l].quant_comp_s:Math.abs(t.quant_comp_short- -1)>0||(t.quant_comp_short=h[l].quant_comp_s),0!=r?t.msfix=h[l].nsmsfix:Math.abs(t.msfix- -1)>0||(t.msfix=h[l].nsmsfix),0!=r?t.internal_flags.nsPsy.attackthre=h[l].st_lrm:Math.abs(t.internal_flags.nsPsy.attackthre- -1)>0||(t.internal_flags.nsPsy.attackthre=h[l].st_lrm),0!=r?t.internal_flags.nsPsy.attackthre_s=h[l].st_s:Math.abs(t.internal_flags.nsPsy.attackthre_s- -1)>0||(t.internal_flags.nsPsy.attackthre_s=h[l].st_s),0!=r?t.scale=h[l].scale:Math.abs(t.scale- -1)>0||(t.scale=h[l].scale),0!=r?t.maskingadjust=h[l].masking_adj:Math.abs(t.maskingadjust-0)>0||(t.maskingadjust=h[l].masking_adj),h[l].masking_adj>0?0!=r?t.maskingadjust_short=.9*h[l].masking_adj:Math.abs(t.maskingadjust_short-0)>0||(t.maskingadjust_short=.9*h[l].masking_adj):0!=r?t.maskingadjust_short=1.1*h[l].masking_adj:Math.abs(t.maskingadjust_short-0)>0||(t.maskingadjust_short=1.1*h[l].masking_adj),0!=r?t.ATHlower=-h[l].ath_lower/10:Math.abs(10*-t.ATHlower-0)>0||(t.ATHlower=-h[l].ath_lower/10),0!=r?t.ATHcurve=h[l].ath_curve:Math.abs(t.ATHcurve- -1)>0||(t.ATHcurve=h[l].ath_curve),0!=r?t.interChRatio=h[l].interch:Math.abs(t.interChRatio- -1)>0||(t.interChRatio=h[l].interch),n}this.apply_preset=function(e,n,r){switch(n){case t.R3MIX:n=t.V3,e.VBR=_.vbr_mtrh;break;case t.MEDIUM:n=t.V4,e.VBR=_.vbr_rh;break;case t.MEDIUM_FAST:n=t.V4,e.VBR=_.vbr_mtrh;break;case t.STANDARD:n=t.V2,e.VBR=_.vbr_rh;break;case t.STANDARD_FAST:n=t.V2,e.VBR=_.vbr_mtrh;break;case t.EXTREME:n=t.V0,e.VBR=_.vbr_rh;break;case t.EXTREME_FAST:n=t.V0,e.VBR=_.vbr_mtrh;break;case t.INSANE:return n=320,e.preset=n,m(e,n,r),e.VBR=_.vbr_off,n}switch(e.preset=n,n){case t.V9:return c(e,9,r),n;case t.V8:return c(e,8,r),n;case t.V7:return c(e,7,r),n;case t.V6:return c(e,6,r),n;case t.V5:return c(e,5,r),n;case t.V4:return c(e,4,r),n;case t.V3:return c(e,3,r),n;case t.V2:return c(e,2,r),n;case t.V1:return c(e,1,r),n;case t.V0:return c(e,0,r),n}return 8<=n&&n<=320?m(e,n,r):(e.preset=0,n)}}},404:function(e,t,n){var r=n(298),_=r.System,o=r.VbrMode,l=(r.Float,r.ShortBlock,r.Util),f=r.Arrays,c=(r.new_array_n,r.new_byte,r.new_double,r.new_float),h=(r.new_float_n,r.new_int,r.new_int_n,r.assert),m=n(405),d=n(406),v=n(407),S=n(299),w=n(323),A=n(313);e.exports=function(){var e,t,n;this.rv=null,this.qupvt=null;var r,M=new m;function R(e){this.ordinal=e}function y(e){for(var t=0;t<e.sfbmax;t++)if(e.scalefac[t]+e.subblock_gain[e.window[t]]==0)return!1;return!0}function B(e,t,n,r,_){var o;switch(e){default:case 9:t.over_count>0?(o=n.over_SSD<=t.over_SSD,n.over_SSD==t.over_SSD&&(o=n.bits<t.bits)):o=n.max_noise<0&&10*n.max_noise+n.bits<=10*t.max_noise+t.bits;break;case 0:o=n.over_count<t.over_count||n.over_count==t.over_count&&n.over_noise<t.over_noise||n.over_count==t.over_count&&BitStream.EQ(n.over_noise,t.over_noise)&&n.tot_noise<t.tot_noise;break;case 8:n.max_noise=function(e,t){for(var n,r=1e-37,_=0;_<t.psymax;_++)r+=(n=e[_],l.FAST_LOG10(.368+.632*n*n*n));return Math.max(1e-20,r)}(_,r);case 1:o=n.max_noise<t.max_noise;break;case 2:o=n.tot_noise<t.tot_noise;break;case 3:o=n.tot_noise<t.tot_noise&&n.max_noise<t.max_noise;break;case 4:o=n.max_noise<=0&&t.max_noise>.2||n.max_noise<=0&&t.max_noise<0&&t.max_noise>n.max_noise-.2&&n.tot_noise<t.tot_noise||n.max_noise<=0&&t.max_noise>0&&t.max_noise>n.max_noise-.2&&n.tot_noise<t.tot_noise+t.over_noise||n.max_noise>0&&t.max_noise>-.05&&t.max_noise>n.max_noise-.1&&n.tot_noise+n.over_noise<t.tot_noise+t.over_noise||n.max_noise>0&&t.max_noise>-.1&&t.max_noise>n.max_noise-.15&&n.tot_noise+n.over_noise+n.over_noise<t.tot_noise+t.over_noise+t.over_noise;break;case 5:o=n.over_noise<t.over_noise||BitStream.EQ(n.over_noise,t.over_noise)&&n.tot_noise<t.tot_noise;break;case 6:o=n.over_noise<t.over_noise||BitStream.EQ(n.over_noise,t.over_noise)&&(n.max_noise<t.max_noise||BitStream.EQ(n.max_noise,t.max_noise)&&n.tot_noise<=t.tot_noise);break;case 7:o=n.over_count<t.over_count||n.over_noise<t.over_noise}return 0==t.over_count&&(o=o&&n.bits<t.bits),o}function E(e,t,_,o,l){var c=e.internal_flags;!function(e,t,n,r,_){var o,l=e.internal_flags;o=0==t.scalefac_scale?1.2968395546510096:1.6817928305074292;for(var f=0,c=0;c<t.sfbmax;c++)f<n[c]&&(f=n[c]);var h=l.noise_shaping_amp;switch(3==h&&(h=_?2:1),h){case 2:break;case 1:f>1?f=Math.pow(f,.5):f*=.95;break;default:f>1?f=1:f*=.95}var m=0;for(c=0;c<t.sfbmax;c++){var d,v=t.width[c];if(m+=v,!(n[c]<f)){if(0!=(2&l.substep_shaping)&&(l.pseudohalf[c]=0==l.pseudohalf[c]?1:0,0==l.pseudohalf[c]&&2==l.noise_shaping_amp))return;for(t.scalefac[c]++,d=-v;d<0;d++)r[m+d]*=o,r[m+d]>t.xrpow_max&&(t.xrpow_max=r[m+d]);if(2==l.noise_shaping_amp)return}}}(e,t,_,o,l);var m=y(t);return!m&&(!(m=2==c.mode_gr?r.scale_bitcount(t):r.scale_bitcount_lsf(c,t))||(c.noise_shaping>1&&(f.fill(c.pseudohalf,0),0==t.scalefac_scale?(!function(e,t){for(var r=0,_=0;_<e.sfbmax;_++){var o=e.width[_],s=e.scalefac[_];if(0!=e.preflag&&(s+=n.pretab[_]),r+=o,0!=(1&s)){s++;for(var l=-o;l<0;l++)t[r+l]*=1.2968395546510096,t[r+l]>e.xrpow_max&&(e.xrpow_max=t[r+l])}e.scalefac[_]=s>>1}e.preflag=0,e.scalefac_scale=1}(t,o),m=!1):t.block_type==S.SHORT_TYPE&&c.subblock_gain>0&&(m=function(e,t,r){var _,o=t.scalefac;for(_=0;_<t.sfb_lmax;_++)if(o[_]>=16)return!0;for(var l=0;l<3;l++){var f=0,c=0;for(_=t.sfb_lmax+l;_<t.sfbdivide;_+=3)f<o[_]&&(f=o[_]);for(;_<t.sfbmax;_+=3)c<o[_]&&(c=o[_]);if(!(f<16&&c<8)){if(t.subblock_gain[l]>=7)return!0;t.subblock_gain[l]++;var m=e.scalefac_band.l[t.sfb_lmax];for(_=t.sfb_lmax+l;_<t.sfbmax;_+=3){var d=t.width[_],s=o[_];if(h(s>=0),(s-=4>>t.scalefac_scale)>=0)o[_]=s,m+=3*d;else{o[_]=0;var v=210+(s<<t.scalefac_scale+1);w=n.IPOW20(v),m+=d*(l+1);for(var S=-d;S<0;S++)r[m+S]*=w,r[m+S]>t.xrpow_max&&(t.xrpow_max=r[m+S]);m+=d*(3-l-1)}}var w=n.IPOW20(202);for(m+=t.width[_]*(l+1),S=-t.width[_];S<0;S++)r[m+S]*=w,r[m+S]>t.xrpow_max&&(t.xrpow_max=r[m+S])}}return!1}(c,t,o)||y(t))),m||(m=2==c.mode_gr?r.scale_bitcount(t):r.scale_bitcount_lsf(c,t)),!m))}this.setModules=function(_,o,l,f){e=_,t=o,this.rv=o,n=l,this.qupvt=l,r=f,M.setModules(n,r)},this.ms_convert=function(e,t){for(var i=0;i<576;++i){var n=e.tt[t][0].xr[i],r=e.tt[t][1].xr[i];e.tt[t][0].xr[i]=(n+r)*(.5*l.SQRT2),e.tt[t][1].xr[i]=(n-r)*(.5*l.SQRT2)}},this.init_xrpow=function(e,t,n){var r=0,_=0|t.max_nonzero_coeff;if(h(null!=n),t.xrpow_max=0,h(0<=_&&_<=575),f.fill(n,_,576,0),r=function(e,t,n,r){r=0;for(var i=0;i<=n;++i){var _=Math.abs(e.xr[i]);r+=_,t[i]=Math.sqrt(_*Math.sqrt(_)),t[i]>e.xrpow_max&&(e.xrpow_max=t[i])}return r}(t,n,_,r),r>1e-20){var o=0;0!=(2&e.substep_shaping)&&(o=1);for(var i=0;i<t.psymax;i++)e.pseudohalf[i]=o;return!0}return f.fill(t.l3_enc,0,576,0),!1},this.init_outer_loop=function(e,t){t.part2_3_length=0,t.big_values=0,t.count1=0,t.global_gain=210,t.scalefac_compress=0,t.table_select[0]=0,t.table_select[1]=0,t.table_select[2]=0,t.subblock_gain[0]=0,t.subblock_gain[1]=0,t.subblock_gain[2]=0,t.subblock_gain[3]=0,t.region0_count=0,t.region1_count=0,t.preflag=0,t.scalefac_scale=0,t.count1table_select=0,t.part2_length=0,t.sfb_lmax=S.SBPSY_l,t.sfb_smin=S.SBPSY_s,t.psy_lmax=e.sfb21_extra?S.SBMAX_l:S.SBPSY_l,t.psymax=t.psy_lmax,t.sfbmax=t.sfb_lmax,t.sfbdivide=11;for(var r=0;r<S.SBMAX_l;r++)t.width[r]=e.scalefac_band.l[r+1]-e.scalefac_band.l[r],t.window[r]=3;if(t.block_type==S.SHORT_TYPE){var o=c(576);t.sfb_smin=0,t.sfb_lmax=0,0!=t.mixed_block_flag&&(t.sfb_smin=3,t.sfb_lmax=2*e.mode_gr+4),t.psymax=t.sfb_lmax+3*((e.sfb21_extra?S.SBMAX_s:S.SBPSY_s)-t.sfb_smin),t.sfbmax=t.sfb_lmax+3*(S.SBPSY_s-t.sfb_smin),t.sfbdivide=t.sfbmax-18,t.psy_lmax=t.sfb_lmax;var l=e.scalefac_band.l[t.sfb_lmax];_.arraycopy(t.xr,0,o,0,576);for(r=t.sfb_smin;r<S.SBMAX_s;r++)for(var h=e.scalefac_band.s[r],m=e.scalefac_band.s[r+1],d=0;d<3;d++)for(var v=h;v<m;v++)t.xr[l++]=o[3*v+d];var w=t.sfb_lmax;for(r=t.sfb_smin;r<S.SBMAX_s;r++)t.width[w]=t.width[w+1]=t.width[w+2]=e.scalefac_band.s[r+1]-e.scalefac_band.s[r],t.window[w]=0,t.window[w+1]=1,t.window[w+2]=2,w+=3}t.count1bits=0,t.sfb_partition_table=n.nr_of_sfb_block[0][0],t.slen[0]=0,t.slen[1]=0,t.slen[2]=0,t.slen[3]=0,t.max_nonzero_coeff=575,f.fill(t.scalefac,0),function(e,t){var r=e.ATH,_=t.xr;if(t.block_type!=S.SHORT_TYPE)for(var o=!1,l=S.PSFB21-1;l>=0&&!o;l--){var f=e.scalefac_band.psfb21[l],c=e.scalefac_band.psfb21[l+1],h=n.athAdjust(r.adjust,r.psfb21[l],r.floor);e.nsPsy.longfact[21]>1e-12&&(h*=e.nsPsy.longfact[21]);for(var m=c-1;m>=f;m--){if(!(Math.abs(_[m])<h)){o=!0;break}_[m]=0}}else for(var d=0;d<3;d++)for(o=!1,l=S.PSFB12-1;l>=0&&!o;l--){c=(f=3*e.scalefac_band.s[12]+(e.scalefac_band.s[13]-e.scalefac_band.s[12])*d+(e.scalefac_band.psfb12[l]-e.scalefac_band.psfb12[0]))+(e.scalefac_band.psfb12[l+1]-e.scalefac_band.psfb12[l]);var v=n.athAdjust(r.adjust,r.psfb12[l],r.floor);for(e.nsPsy.shortfact[12]>1e-12&&(v*=e.nsPsy.shortfact[12]),m=c-1;m>=f;m--){if(!(Math.abs(_[m])<v)){o=!0;break}_[m]=0}}}(e,t)},R.BINSEARCH_NONE=new R(0),R.BINSEARCH_UP=new R(1),R.BINSEARCH_DOWN=new R(2),this.trancate_smallspectrums=function(e,t,_,o){var l=c(A.SFBMAX);if((0!=(4&e.substep_shaping)||t.block_type!=S.SHORT_TYPE)&&0==(128&e.substep_shaping)){n.calc_noise(t,_,l,new d,null);for(var h=0;h<576;h++){var m=0;0!=t.l3_enc[h]&&(m=Math.abs(t.xr[h])),o[h]=m}h=0;var v=8;t.block_type==S.SHORT_TYPE&&(v=6);do{var w,M,R,y,B=t.width[v];if(h+=B,!(l[v]>=1||(f.sort(o,h-B,B),BitStream.EQ(o[h-1],0)))){w=(1-l[v])*_[v],M=0,y=0;do{var E;for(R=1;y+R<B&&!BitStream.NEQ(o[y+h-B],o[y+h+R-B]);R++);if(w<(E=o[y+h-B]*o[y+h-B]*R)){0!=y&&(M=o[y+h-B-1]);break}w-=E,y+=R}while(y<B);if(!BitStream.EQ(M,0))do{Math.abs(t.xr[h-B])<=M&&(t.l3_enc[h-B]=0)}while(--B>0)}}while(++v<t.psymax);t.part2_3_length=r.noquant_count_bits(e,t,null)}},this.outer_loop=function(e,t,l,f,m,M){var y=e.internal_flags,T=new w,x=c(576),k=c(A.SFBMAX),P=new d,I=new v,V=9999999,O=!1,H=!1,L=0;if(function(e,t,n,_,o){var l,f=e.CurrentStep[_],c=!1,m=e.OldValue[_],d=R.BINSEARCH_NONE;for(t.global_gain=m,n-=t.part2_length,h(0!=f);;){var v;if(l=r.count_bits(e,o,t,null),1==f||l==n)break;l>n?(d==R.BINSEARCH_DOWN&&(c=!0),c&&(f/=2),d=R.BINSEARCH_UP,v=f):(d==R.BINSEARCH_UP&&(c=!0),c&&(f/=2),d=R.BINSEARCH_DOWN,v=-f),t.global_gain+=v,t.global_gain<0&&(t.global_gain=0,c=!0),t.global_gain>255&&(t.global_gain=255,c=!0)}for(h(t.global_gain>=0),h(t.global_gain<256);l>n&&t.global_gain<255;)t.global_gain++,l=r.count_bits(e,o,t,null);e.CurrentStep[_]=m-t.global_gain>=4?4:2,e.OldValue[_]=t.global_gain,t.part2_3_length=l}(y,t,M,m,f),0==y.noise_shaping)return 100;n.calc_noise(t,l,k,P,I),P.bits=t.part2_3_length,T.assign(t);var N=0;for(_.arraycopy(f,0,x,0,576);!O;){do{var D,X=new d,F=255;if(D=0!=(2&y.substep_shaping)?20:3,y.sfb21_extra){if(k[T.sfbmax]>1)break;if(T.block_type==S.SHORT_TYPE&&(k[T.sfbmax+1]>1||k[T.sfbmax+2]>1))break}if(!E(e,T,k,f,H))break;0!=T.scalefac_scale&&(F=254);var C=M-T.part2_length;if(C<=0)break;for(;(T.part2_3_length=r.count_bits(y,f,T,I))>C&&T.global_gain<=F;)T.global_gain++;if(T.global_gain>F)break;if(0==P.over_count){for(;(T.part2_3_length=r.count_bits(y,f,T,I))>V&&T.global_gain<=F;)T.global_gain++;if(T.global_gain>F)break}if(n.calc_noise(T,l,k,X,I),X.bits=T.part2_3_length,0!=(B(t.block_type!=S.SHORT_TYPE?e.quant_comp:e.quant_comp_short,P,X,T,k)?1:0))V=t.part2_3_length,P=X,t.assign(T),N=0,_.arraycopy(f,0,x,0,576);else if(0==y.full_outer_loop){if(++N>D&&0==P.over_count)break;if(3==y.noise_shaping_amp&&H&&N>30)break;if(3==y.noise_shaping_amp&&H&&T.global_gain-L>15)break}}while(T.global_gain+T.scalefac_scale<255);3==y.noise_shaping_amp?H?O=!0:(T.assign(t),_.arraycopy(x,0,f,0,576),N=0,L=T.global_gain,H=!0):O=!0}return h(t.global_gain+t.scalefac_scale<=255),e.VBR==o.vbr_rh||e.VBR==o.vbr_mtrh?_.arraycopy(x,0,f,0,576):0!=(1&y.substep_shaping)&&trancate_smallspectrums(y,t,l,f),P.over_count},this.iteration_finish_one=function(e,n,_){var o=e.l3_side,l=o.tt[n][_];r.best_scalefac_store(e,n,_,o),1==e.use_best_huffman&&r.best_huffman_divide(e,l),t.ResvAdjust(e,l)},this.VBR_encode_granule=function(e,t,n,r,o,l,m){var d,v=e.internal_flags,S=new w,A=c(576),M=m,R=m+1,y=(m+l)/2,B=0,E=v.sfb21_extra;h(M<=LameInternalFlags.MAX_BITS_PER_CHANNEL),f.fill(S.l3_enc,0);do{h(y>=l),h(y<=m),h(l<=m),v.sfb21_extra=!(y>M-42)&&E,outer_loop(e,t,n,r,o,y)<=0?(B=1,R=t.part2_3_length,S.assign(t),_.arraycopy(r,0,A,0,576),d=(m=R-32)-l,y=(m+l)/2):(d=m-(l=y+32),y=(m+l)/2,0!=B&&(B=2,t.assign(S),_.arraycopy(A,0,r,0,576)))}while(d>12);v.sfb21_extra=E,2==B&&_.arraycopy(S.l3_enc,0,t.l3_enc,0,576),h(t.part2_3_length<=M)},this.get_framebits=function(n,r){var _=n.internal_flags;_.bitrate_index=_.VBR_min_bitrate;var o=e.getframebits(n);_.bitrate_index=1,o=e.getframebits(n);for(var i=1;i<=_.VBR_max_bitrate;i++){_.bitrate_index=i;var l=new MeanBits(o);r[i]=t.ResvFrameBegin(n,l),o=l.bits}},this.VBR_old_prepare=function(e,r,_,o,l,f,c,h,m){var d,v=e.internal_flags,w=0,A=1,M=0;v.bitrate_index=v.VBR_max_bitrate;var R=t.ResvFrameBegin(e,new MeanBits(0))/v.mode_gr;get_framebits(e,f);for(var y=0;y<v.mode_gr;y++){var B=n.on_pe(e,r,h[y],R,y,0);v.mode_ext==S.MPG_MD_MS_LR&&(ms_convert(v.l3_side,y),n.reduce_side(h[y],_[y],R,B));for(var E=0;E<v.channels_out;++E){var T=v.l3_side.tt[y][E];T.block_type!=S.SHORT_TYPE?(w=1.28/(1+Math.exp(3.5-r[y][E]/300))-.05,d=v.PSY.mask_adjust-w):(w=2.56/(1+Math.exp(3.5-r[y][E]/300))-.14,d=v.PSY.mask_adjust_short-w),v.masking_lower=Math.pow(10,.1*d),init_outer_loop(v,T),m[y][E]=n.calc_xmin(e,o[y][E],T,l[y][E]),0!=m[y][E]&&(A=0),c[y][E]=126,M+=h[y][E]}}for(y=0;y<v.mode_gr;y++)for(E=0;E<v.channels_out;E++)M>f[v.VBR_max_bitrate]&&(h[y][E]*=f[v.VBR_max_bitrate],h[y][E]/=M),c[y][E]>h[y][E]&&(c[y][E]=h[y][E]);return A},this.bitpressure_strategy=function(e,t,n,r){for(var _=0;_<e.mode_gr;_++)for(var o=0;o<e.channels_out;o++){for(var l=e.l3_side.tt[_][o],f=t[_][o],c=0,h=0;h<l.psy_lmax;h++)f[c++]*=1+.029*h*h/S.SBMAX_l/S.SBMAX_l;if(l.block_type==S.SHORT_TYPE)for(h=l.sfb_smin;h<S.SBMAX_s;h++)f[c++]*=1+.029*h*h/S.SBMAX_s/S.SBMAX_s,f[c++]*=1+.029*h*h/S.SBMAX_s/S.SBMAX_s,f[c++]*=1+.029*h*h/S.SBMAX_s/S.SBMAX_s;r[_][o]=0|Math.max(n[_][o],.9*r[_][o])}},this.VBR_new_prepare=function(e,r,_,o,l,f){var c,h=e.internal_flags,m=1,d=0,v=0;if(e.free_format){h.bitrate_index=0;w=new MeanBits(d);c=t.ResvFrameBegin(e,w),d=w.bits,l[0]=c}else{h.bitrate_index=h.VBR_max_bitrate;var w=new MeanBits(d);t.ResvFrameBegin(e,w),d=w.bits,get_framebits(e,l),c=l[h.VBR_max_bitrate]}for(var A=0;A<h.mode_gr;A++){n.on_pe(e,r,f[A],d,A,0),h.mode_ext==S.MPG_MD_MS_LR&&ms_convert(h.l3_side,A);for(var M=0;M<h.channels_out;++M){var R=h.l3_side.tt[A][M];h.masking_lower=Math.pow(10,.1*h.PSY.mask_adjust),init_outer_loop(h,R),0!=n.calc_xmin(e,_[A][M],R,o[A][M])&&(m=0),v+=f[A][M]}}for(A=0;A<h.mode_gr;A++)for(M=0;M<h.channels_out;M++)v>c&&(f[A][M]*=c,f[A][M]/=v);return m},this.calc_target_bits=function(r,_,o,l,f,c){var h,m,d,v,w=r.internal_flags,A=w.l3_side,M=0;w.bitrate_index=w.VBR_max_bitrate;var R=new MeanBits(M);for(c[0]=t.ResvFrameBegin(r,R),M=R.bits,w.bitrate_index=1,M=e.getframebits(r)-8*w.sideinfo_len,f[0]=M/(w.mode_gr*w.channels_out),M=r.VBR_mean_bitrate_kbps*r.framesize*1e3,0!=(1&w.substep_shaping)&&(M*=1.09),M/=r.out_samplerate,M-=8*w.sideinfo_len,M/=w.mode_gr*w.channels_out,(h=.93+.07*(11-r.compression_ratio)/5.5)<.9&&(h=.9),h>1&&(h=1),m=0;m<w.mode_gr;m++){var y=0;for(d=0;d<w.channels_out;d++){if(l[m][d]=int(h*M),_[m][d]>700){var B=int((_[m][d]-700)/1.4),E=A.tt[m][d];l[m][d]=int(h*M),E.block_type==S.SHORT_TYPE&&B<M/2&&(B=M/2),B>3*M/2?B=3*M/2:B<0&&(B=0),l[m][d]+=B}l[m][d]>LameInternalFlags.MAX_BITS_PER_CHANNEL&&(l[m][d]=LameInternalFlags.MAX_BITS_PER_CHANNEL),y+=l[m][d]}if(y>LameInternalFlags.MAX_BITS_PER_GRANULE)for(d=0;d<w.channels_out;++d)l[m][d]*=LameInternalFlags.MAX_BITS_PER_GRANULE,l[m][d]/=y}if(w.mode_ext==S.MPG_MD_MS_LR)for(m=0;m<w.mode_gr;m++)n.reduce_side(l[m],o[m],M*w.channels_out,LameInternalFlags.MAX_BITS_PER_GRANULE);for(v=0,m=0;m<w.mode_gr;m++)for(d=0;d<w.channels_out;d++)l[m][d]>LameInternalFlags.MAX_BITS_PER_CHANNEL&&(l[m][d]=LameInternalFlags.MAX_BITS_PER_CHANNEL),v+=l[m][d];if(v>c[0])for(m=0;m<w.mode_gr;m++)for(d=0;d<w.channels_out;d++)l[m][d]*=c[0],l[m][d]/=v}}},405:function(e,t){e.exports=function(){this.setModules=function(e,t){e,t}}},406:function(e,t){e.exports=function(){this.over_noise=0,this.tot_noise=0,this.max_noise=0,this.over_count=0,this.over_SSD=0,this.bits=0}},407:function(e,t,n){var r=n(298),_=r.new_float,o=r.new_int;r.assert;e.exports=function(){this.global_gain=0,this.sfb_count1=0,this.step=o(39),this.noise=_(39),this.noise_log=_(39)}},408:function(e,t,n){var r=n(298).assert;e.exports=function(){var e;this.setModules=function(t){e=t},this.ResvFrameBegin=function(t,n){var _,o=t.internal_flags,l=o.l3_side,f=e.getframebits(t);n.bits=(f-8*o.sideinfo_len)/o.mode_gr;var c=2048*o.mode_gr-8;t.brate>320?_=8*int(1e3*t.brate/(t.out_samplerate/1152)/8+.5):(_=11520,t.strict_ISO&&(_=8*int(32e4/(t.out_samplerate/1152)/8+.5))),o.ResvMax=_-f,o.ResvMax>c&&(o.ResvMax=c),(o.ResvMax<0||t.disable_reservoir)&&(o.ResvMax=0);var h=n.bits*o.mode_gr+Math.min(o.ResvSize,o.ResvMax);return h>_&&(h=_),r(0==o.ResvMax%8),r(o.ResvMax>=0),l.resvDrain_pre=0,null!=o.pinfo&&(o.pinfo.mean_bits=n.bits/2,o.pinfo.resvsize=o.ResvSize),h},this.ResvMaxBits=function(e,t,n,r){var _,o=e.internal_flags,l=o.ResvSize,f=o.ResvMax;0!=r&&(l+=t),0!=(1&o.substep_shaping)&&(f*=.9),n.bits=t,10*l>9*f?(_=l-9*f/10,n.bits+=_,o.substep_shaping|=128):(_=0,o.substep_shaping&=127,e.disable_reservoir||0!=(1&o.substep_shaping)||(n.bits-=.1*t));var c=l<6*o.ResvMax/10?l:6*o.ResvMax/10;return(c-=_)<0&&(c=0),c},this.ResvAdjust=function(e,t){e.ResvSize-=t.part2_3_length+t.part2_length},this.ResvFrameEnd=function(e,t){var n,_=e.l3_side;e.ResvSize+=t*e.mode_gr;var o=0;_.resvDrain_post=0,_.resvDrain_pre=0,0!=(n=e.ResvSize%8)&&(o+=n),(n=e.ResvSize-o-e.ResvMax)>0&&(r(0==n%8),r(n>=0),o+=n);var l=Math.min(8*_.main_data_begin,o)/8;_.resvDrain_pre+=8*l,o-=8*l,e.ResvSize-=8*l,_.main_data_begin-=l,_.resvDrain_post+=o,e.ResvSize-=o}}},409:function(e,t){e.exports=function(){this.getLameVersion=function(){return"3.98.4"},this.getLameShortVersion=function(){return"3.98.4"},this.getLameVeryShortVersion=function(){return"LAME3.98r"},this.getPsyVersion=function(){return"0.93"},this.getLameUrl=function(){return"http://www.mp3dev.org/"},this.getLameOsBitness=function(){return"32bits"}}},410:function(e,t,n){var r=n(298),_=r.System,o=r.VbrMode,l=(r.Float,r.ShortBlock),f=(r.Util,r.Arrays),c=(r.new_array_n,r.new_byte),h=(r.new_double,r.new_float,r.new_float_n,r.new_int,r.new_int_n,r.assert);function m(){var e,t,n;this.setModules=function(r,_,o){e=r,t=_,n=o};var r=m.NUMTOCENTRIES,d=m.MAXFRAMESIZE,v=r+4+4+4+4+4+9+1+1+8+1+1+3+1+1+2+4+2+2,S="Xing",w="Info",A=[0,49345,49537,320,49921,960,640,49729,50689,1728,1920,51009,1280,50625,50305,1088,52225,3264,3456,52545,3840,53185,52865,3648,2560,51905,52097,2880,51457,2496,2176,51265,55297,6336,6528,55617,6912,56257,55937,6720,7680,57025,57217,8e3,56577,7616,7296,56385,5120,54465,54657,5440,55041,6080,5760,54849,53761,4800,4992,54081,4352,53697,53377,4160,61441,12480,12672,61761,13056,62401,62081,12864,13824,63169,63361,14144,62721,13760,13440,62529,15360,64705,64897,15680,65281,16320,16e3,65089,64001,15040,15232,64321,14592,63937,63617,14400,10240,59585,59777,10560,60161,11200,10880,59969,60929,11968,12160,61249,11520,60865,60545,11328,58369,9408,9600,58689,9984,59329,59009,9792,8704,58049,58241,9024,57601,8640,8320,57409,40961,24768,24960,41281,25344,41921,41601,25152,26112,42689,42881,26432,42241,26048,25728,42049,27648,44225,44417,27968,44801,28608,28288,44609,43521,27328,27520,43841,26880,43457,43137,26688,30720,47297,47489,31040,47873,31680,31360,47681,48641,32448,32640,48961,32e3,48577,48257,31808,46081,29888,30080,46401,30464,47041,46721,30272,29184,45761,45953,29504,45313,29120,28800,45121,20480,37057,37249,20800,37633,21440,21120,37441,38401,22208,22400,38721,21760,38337,38017,21568,39937,23744,23936,40257,24320,40897,40577,24128,23040,39617,39809,23360,39169,22976,22656,38977,34817,18624,18816,35137,19200,35777,35457,19008,19968,36545,36737,20288,36097,19904,19584,35905,17408,33985,34177,17728,34561,18368,18048,34369,33281,17088,17280,33601,16640,33217,32897,16448];function M(e,t){var n=255&e[t+0];return n<<=8,n|=255&e[t+1],n<<=8,n|=255&e[t+2],n<<=8,n|=255&e[t+3]}function R(e,t,n){e[t+0]=255&n>>24,e[t+1]=255&n>>16,e[t+2]=255&n>>8,e[t+3]=255&n}function y(e,t,n){e[t+0]=255&n>>8,e[t+1]=255&n}function B(e,t,n){return 255&(e<<t|n&~(-1<<t))}function E(t,n){var r=t.internal_flags;n[0]=B(n[0],8,255),n[1]=B(n[1],3,7),n[1]=B(n[1],1,t.out_samplerate<16e3?0:1),n[1]=B(n[1],1,t.version),n[1]=B(n[1],2,1),n[1]=B(n[1],1,t.error_protection?0:1),n[2]=B(n[2],4,r.bitrate_index),n[2]=B(n[2],2,r.samplerate_index),n[2]=B(n[2],1,0),n[2]=B(n[2],1,t.extension),n[3]=B(n[3],2,t.mode.ordinal()),n[3]=B(n[3],2,r.mode_ext),n[3]=B(n[3],1,t.copyright),n[3]=B(n[3],1,t.original),n[3]=B(n[3],2,t.emphasis),n[0]=255;var _,l,f=241&n[1];_=1==t.version?128:t.out_samplerate<16e3?32:64,t.VBR==o.vbr_off&&(_=t.brate),l=t.free_format?0:255&16*e.BitrateIndex(_,t.version,t.out_samplerate),1==t.version?(n[1]=255&(10|f),f=13&n[2],n[2]=255&(l|f)):(n[1]=255&(2|f),f=13&n[2],n[2]=255&(l|f))}function T(e,t){return t=t>>8^A[255&(t^e)]}this.addVbrFrame=function(e){var t=e.internal_flags,n=Tables.bitrate_table[e.version][t.bitrate_index];h(null!=t.VBR_seek_table.bag),function(e,t){if(e.nVbrNumFrames++,e.sum+=t,e.seen++,!(e.seen<e.want)&&(e.pos<e.size&&(e.bag[e.pos]=e.sum,e.pos++,e.seen=0),e.pos==e.size)){for(var i=1;i<e.size;i+=2)e.bag[i/2]=e.bag[i];e.want*=2,e.pos/=2}}(t.VBR_seek_table,n)},this.getVbrTag=function(e){var t=new VBRTagData,n=0;t.flags=0;var _=e[n+1]>>3&1,o=e[n+2]>>2&3,l=e[n+3]>>6&3,f=e[n+2]>>4&15;if(f=Tables.bitrate_table[_][f],e[n+1]>>4==14?t.samprate=Tables.samplerate_table[2][o]:t.samprate=Tables.samplerate_table[_][o],!function(e,t){return new String(e,t,S.length(),null).equals(S)||new String(e,t,w.length(),null).equals(w)}(e,n+=0!=_?3!=l?36:21:3!=l?21:13))return null;n+=4,t.hId=_;var c=t.flags=M(e,n);if(n+=4,0!=(1&c)&&(t.frames=M(e,n),n+=4),0!=(2&c)&&(t.bytes=M(e,n),n+=4),0!=(4&c)){if(null!=t.toc)for(var i=0;i<r;i++)t.toc[i]=e[n+i];n+=r}t.vbrScale=-1,0!=(8&c)&&(t.vbrScale=M(e,n),n+=4),t.headersize=72e3*(_+1)*f/t.samprate;var h=e[(n+=21)+0]<<4;h+=e[n+1]>>4;var m=(15&e[n+1])<<8;return(h<0||h>3e3)&&(h=-1),((m+=255&e[n+2])<0||m>3e3)&&(m=-1),t.encDelay=h,t.encPadding=m,t},this.InitVbrTag=function(e){var n,r=e.internal_flags;n=1==e.version?128:e.out_samplerate<16e3?32:64,e.VBR==o.vbr_off&&(n=e.brate);var _=72e3*(e.version+1)*n/e.out_samplerate,l=r.sideinfo_len+v;if(r.VBR_seek_table.TotalFrameSize=_,_<l||_>d)e.bWriteVbrTag=!1;else{r.VBR_seek_table.nVbrNumFrames=0,r.VBR_seek_table.nBytesWritten=0,r.VBR_seek_table.sum=0,r.VBR_seek_table.seen=0,r.VBR_seek_table.want=1,r.VBR_seek_table.pos=0,null==r.VBR_seek_table.bag&&(r.VBR_seek_table.bag=new int[400],r.VBR_seek_table.size=400);var f=c(d);E(e,f);for(var h=r.VBR_seek_table.TotalFrameSize,i=0;i<h;++i)t.add_dummy_byte(e,255&f[i],1)}},this.updateMusicCRC=function(e,t,n,r){for(var i=0;i<r;++i)e[0]=T(t[n+i],e[0])},this.getLameTagFrame=function(e,h){var m=e.internal_flags;if(!e.bWriteVbrTag)return 0;if(m.Class_ID!=Lame.LAME_ID)return 0;if(m.VBR_seek_table.pos<=0)return 0;if(h.length<m.VBR_seek_table.TotalFrameSize)return m.VBR_seek_table.TotalFrameSize;f.fill(h,0,m.VBR_seek_table.TotalFrameSize,0),E(e,h);var d=c(r);if(e.free_format)for(var i=1;i<r;++i)d[i]=255&255*i/100;else!function(e,t){if(!(e.pos<=0))for(var i=1;i<r;++i){var n=i/r,_=0|Math.floor(n*e.pos);_>e.pos-1&&(_=e.pos-1);var o=0|256*e.bag[_]/e.sum;o>255&&(o=255),t[i]=255&o}}(m.VBR_seek_table,d);var v=m.sideinfo_len;e.error_protection&&(v-=2),e.VBR==o.vbr_off?(h[v++]=255&w.charAt(0),h[v++]=255&w.charAt(1),h[v++]=255&w.charAt(2),h[v++]=255&w.charAt(3)):(h[v++]=255&S.charAt(0),h[v++]=255&S.charAt(1),h[v++]=255&S.charAt(2),h[v++]=255&S.charAt(3)),R(h,v,15),R(h,v+=4,m.VBR_seek_table.nVbrNumFrames),v+=4;var A=m.VBR_seek_table.nBytesWritten+m.VBR_seek_table.TotalFrameSize;R(h,v,0|A),v+=4,_.arraycopy(d,0,h,v,d.length),v+=d.length,e.error_protection&&t.CRC_writeheader(m,h);var M=0;for(i=0;i<v;i++)M=T(h[i],M);return v+=function(e,t,r,_,o){var f,c,h,m,d,v=e.internal_flags,S=0,w=e.encoder_delay,A=e.encoder_padding,M=100-10*e.VBR_q-e.quality,B=n.getLameVeryShortVersion(),E=[1,5,3,2,4,0,3],x=0|(e.lowpassfreq/100+.5>255?255:e.lowpassfreq/100+.5),k=0,P=0,I=e.internal_flags.noise_shaping,V=0,O=0,H=0,L=0!=(1&e.exp_nspsytune),N=0!=(2&e.exp_nspsytune),D=!1,X=!1,F=e.internal_flags.nogap_total,C=e.internal_flags.nogap_current,Y=e.ATHtype;switch(e.VBR){case vbr_abr:d=e.VBR_mean_bitrate_kbps;break;case vbr_off:d=e.brate;break;default:d=e.VBR_min_bitrate_kbps}switch(f=0+(e.VBR.ordinal()<E.length?E[e.VBR.ordinal()]:0),v.findReplayGain&&(v.RadioGain>510&&(v.RadioGain=510),v.RadioGain<-510&&(v.RadioGain=-510),P=8192,P|=3072,v.RadioGain>=0?P|=v.RadioGain:(P|=512,P|=-v.RadioGain)),v.findPeakSample&&(k=Math.abs(0|v.PeakSample/32767*Math.pow(2,23)+.5)),-1!=F&&(C>0&&(X=!0),C<F-1&&(D=!0)),m=Y+((L?1:0)<<4)+((N?1:0)<<5)+((D?1:0)<<6)+((X?1:0)<<7),M<0&&(M=0),e.mode){case MONO:V=0;break;case STEREO:V=1;break;case DUAL_CHANNEL:V=2;break;case JOINT_STEREO:V=e.force_ms?4:3;break;case NOT_SET:default:V=7}H=e.in_samplerate<=32e3?0:48e3==e.in_samplerate?2:e.in_samplerate>48e3?3:1,(e.short_blocks==l.short_block_forced||e.short_blocks==l.short_block_dispensed||-1==e.lowpassfreq&&-1==e.highpassfreq||e.scale_left<e.scale_right||e.scale_left>e.scale_right||e.disable_reservoir&&e.brate<320||e.noATH||e.ATHonly||0==Y||e.in_samplerate<=32e3)&&(O=1),c=I+(V<<2)+(O<<5)+(H<<6),h=v.nMusicCRC,R(r,_+S,M),S+=4;for(var j=0;j<9;j++)r[_+S+j]=255&B.charAt(j);r[_+(S+=9)]=255&f,r[_+ ++S]=255&x,R(r,_+ ++S,k),y(r,_+(S+=4),P),y(r,_+(S+=2),0),r[_+(S+=2)]=255&m,r[_+ ++S]=d>=255?255:255&d,r[_+ ++S]=255&w>>4,r[_+S+1]=255&(w<<4)+(A>>8),r[_+S+2]=255&A,r[_+(S+=3)]=255&c,S++,r[_+S++]=0,y(r,_+S,e.preset),R(r,_+(S+=2),t),y(r,_+(S+=4),h),S+=2;for(var i=0;i<S;i++)o=T(r[_+i],o);return y(r,_+S,o),S+2}(e,A,h,v,M),m.VBR_seek_table.TotalFrameSize},this.putVbrTag=function(e,t){if(e.internal_flags.VBR_seek_table.pos<=0)return-1;if(t.seek(t.length()),0==t.length())return-1;var n=function(e){e.seek(0);var t=c(10);return e.readFully(t),new String(t,"ISO-8859-1").startsWith("ID3")?0:((127&t[6])<<21|(127&t[7])<<14|(127&t[8])<<7|127&t[9])+t.length}(t);t.seek(n);var r=c(d),_=getLameTagFrame(e,r);return _>r.length?-1:(_<1||t.write(r,0,_),0)}}m.NUMTOCENTRIES=100,m.MAXFRAMESIZE=2880,e.exports=m}}]);