text: (()=>{var e={680:(e,t,a)=>{"use strict";var s=a(545);function n(e,t){if(!(this instanceof n))return new n(e,t);if(t||(e=(t=e)&&t.context),t||(t={}),void 0===e&&(e=s()),null==t.numberOfChannels&&(t.numberOfChannels=1),null==t.sampleRate&&(t.sampleRate=e&&e.sampleRate||this.sampleRate),null==t.length&&(null!=t.duration?t.length=t.duration*t.sampleRate:t.length=1),e&&e.createBuffer)return e.createBuffer(t.numberOfChannels,Math.ceil(t.length),t.sampleRate);this.length=Math.ceil(t.length),this.numberOfChannels=t.numberOfChannels,this.sampleRate=t.sampleRate,this.duration=this.length/this.sampleRate,this._data=new Float32Array(this.length*this.numberOfChannels),this._channelData=[];for(var a=0;a<this.numberOfChannels;a++)this._channelData.push(this._data.subarray(a*this.length,(a+1)*this.length))}e.exports=n,n.prototype.numberOfChannels=1,n.prototype.sampleRate=44100,n.prototype.getChannelData=function(e){if(e>=this.numberOfChannels||e<0||null==e)throw Error("Cannot getChannelData: channel number ("+e+") exceeds number of channels ("+this.numberOfChannels+")");return this._channelData[e]},n.prototype.copyFromChannel=function(e,t,a){null==a&&(a=0);for(var s=this._channelData[t],n=a,r=0;n<this.length&&r<e.length;n++,r++)e[r]=s[n]},n.prototype.copyToChannel=function(e,t,a){var s=this._channelData[t];a||(a=0);for(var n=a,r=0;n<this.length&&r<e.length;n++,r++)s[n]=e[r]}},545:e=>{"use strict";var t={};e.exports=function(e){if("undefined"==typeof window)return null;var a=window.OfflineAudioContext||window.webkitOfflineAudioContext,s=window.AudioContext||window.webkitAudioContext;if(!s)return null;"number"==typeof e&&(e={sampleRate:e});var n=e&&e.sampleRate;if(e&&e.offline)return a?new a(e.channels||2,e.length,n||44100):null;var r=t[n];if(r)return r;try{r=new s(e)}catch(e){r=new s}return t[r.sampleRate]=t[n]=r,r}},85:(e,t,a)=>{"use strict";var s=a(38),n=(s.System,s.VbrMode,s.Float,s.ShortBlock,s.Util,s.Arrays,s.new_array_n,s.new_byte),r=(s.new_double,s.new_float,s.new_float_n,s.new_int,s.new_int_n,s.assert);self.Lame=a(566),self.Presets=a(457),self.GainAnalysis=a(287),self.QuantizePVT=a(429),self.Quantize=a(833),self.Takehiro=a(638),self.Reservoir=a(60),self.MPEGMode=a(231),self.BitStream=a(724),a(687);var _=a(367),i=a(4);function o(){this.setModules=function(e,t){}}function l(){this.setModules=function(e,t,a){}}function f(){}function h(){this.setModules=function(e,t){}}function c(){this.dataOffset=0,this.dataLen=0,this.channels=0,this.sampleRate=0}function u(e){return e.charCodeAt(0)<<24|e.charCodeAt(1)<<16|e.charCodeAt(2)<<8|e.charCodeAt(3)}c.RIFF=u("RIFF"),c.WAVE=u("WAVE"),c.fmt_=u("fmt "),c.data=u("data"),c.readHeader=function(e){var t=new c,a=e.getUint32(0,!1);if(c.RIFF==a&&(e.getUint32(4,!0),c.WAVE==e.getUint32(8,!1)&&c.fmt_==e.getUint32(12,!1))){var s=e.getUint32(16,!0),n=20;switch(s){case 16:case 18:t.channels=e.getUint16(n+2,!0),t.sampleRate=e.getUint32(n+4,!0);break;default:throw"extended fmt chunk not implemented"}n+=s;for(var r=c.data,_=0;r!=a&&(a=e.getUint32(n,!1),_=e.getUint32(n+4,!0),r!=a);)n+=_+8;return t.dataLen=_,t.dataOffset=n+8,t}},e.exports.Mp3Encoder=function(e,t,a){3!=arguments.length&&(console.error("WARN: Mp3Encoder(channels, samplerate, kbps) not specified"),e=1,t=44100,a=128);var s=new Lame,c=new o,u=new GainAnalysis,b=new BitStream,m=new Presets,p=new QuantizePVT,d=new Quantize,v=new i,g=new _,S=new h,w=new Reservoir,M=new Takehiro,R=new l,A=new f;s.setModules(u,b,m,p,d,v,g,S,A),b.setModules(u,A,g,v),S.setModules(b,g),m.setModules(s),d.setModules(b,w,p,M),p.setModules(M,w,s.enc.psy),w.setModules(b),M.setModules(p),v.setModules(s,b,g),c.setModules(R,A),R.setModules(g,S,m);var B=s.lame_init();B.num_channels=e,B.in_samplerate=t,B.brate=a,B.mode=MPEGMode.STEREO,B.quality=3,B.bWriteVbrTag=!1,B.disable_reservoir=!0,B.write_id3tag_automatic=!1;var y=s.lame_init_params(B);r(0==y);var E=1152,T=0|1.25*E+7200,k=n(T);this.encodeBuffer=function(t,a){1==e&&(a=t),r(t.length==a.length),t.length>E&&(E=t.length,k=n(T=0|1.25*E+7200));var _=s.lame_encode_buffer(B,t,a,t.length,k,0,T);return new Int8Array(k.subarray(0,_))},this.flush=function(){var e=s.lame_encode_flush(B,k,0,T);return new Int8Array(k.subarray(0,e))}},e.exports.WavHeader=c},514:(e,t,a)=>{var s=a(38),n=(s.System,s.VbrMode,s.Float,s.ShortBlock,s.Util,s.Arrays,s.new_array_n,s.new_byte,s.new_double,s.new_float),r=(s.new_float_n,s.new_int,s.new_int_n,s.assert,a(687));e.exports=function(){this.useAdjust=0,this.aaSensitivityP=0,this.adjust=0,this.adjustLimit=0,this.decay=0,this.floor=0,this.l=n(r.SBMAX_l),this.s=n(r.SBMAX_s),this.psfb21=n(r.PSFB21),this.psfb12=n(r.PSFB12),this.cb_l=n(r.CBANDS),this.cb_s=n(r.CBANDS),this.eql_w=n(r.BLKSIZE/2)}},724:(e,t,a)=>{var s=a(38),n=s.System,r=(s.VbrMode,s.Float,s.ShortBlock,s.Util,s.Arrays),_=(s.new_array_n,s.new_byte),i=(s.new_double,s.new_float,s.new_float_n),o=s.new_int,l=(s.new_int_n,s.assert),f=a(638),h=a(721),c=a(687),u=a(998);function b(){var e=this,t=32,a=null,s=null,b=null,m=null;this.setModules=function(e,t,n,r){a=e,s=t,b=n,m=r};var p=null,d=0,v=0,g=0;function S(e){n.arraycopy(e.header[e.w_ptr].buf,0,p,v,e.sideinfo_len),v+=e.sideinfo_len,d+=8*e.sideinfo_len,e.w_ptr=e.w_ptr+1&u.MAX_HEADER_BUF-1}function w(e,a,s){for(l(s<30);s>0;){var n;0==g&&(g=8,v++,l(v<Lame.LAME_MAXMP3BUFFER),l(e.header[e.w_ptr].write_timing>=d),e.header[e.w_ptr].write_timing==d&&S(e),p[v]=0),n=Math.min(s,g),g-=n,l((s-=n)<t),l(g<t),p[v]|=a>>s<<g,d+=n}}function M(e,a,s){for(l(s<30);s>0;){var n;0==g&&(g=8,v++,l(v<Lame.LAME_MAXMP3BUFFER),p[v]=0),n=Math.min(s,g),g-=n,l((s-=n)<t),l(g<t),p[v]|=a>>s<<g,d+=n}}function R(e,t){var a,s=e.internal_flags;if(l(t>=0),t>=8&&(w(s,76,8),t-=8),t>=8&&(w(s,65,8),t-=8),t>=8&&(w(s,77,8),t-=8),t>=8&&(w(s,69,8),t-=8),t>=32){var n=b.getLameShortVersion();if(t>=32)for(a=0;a<n.length&&t>=8;++a)t-=8,w(s,n.charAt(a),8)}for(;t>=1;t-=1)w(s,s.ancillary_flag,1),s.ancillary_flag^=e.disable_reservoir?0:1;l(0==t)}function A(e,a,s){for(var n=e.header[e.h_ptr].ptr;s>0;){var r=Math.min(s,8-(7&n));l((s-=r)<t),e.header[e.h_ptr].buf[n>>3]|=a>>s<<8-(7&n)-r,n+=r}e.header[e.h_ptr].ptr=n}function B(e,t){e<<=8;for(var a=0;a<8;a++)0!=(65536&((t<<=1)^(e<<=1)))&&(t^=32773);return t}function y(e,t){var a,s=h.ht[t.count1table_select+32],n=0,r=t.big_values,_=t.big_values;for(l(t.count1table_select<2),a=(t.count1-t.big_values)/4;a>0;--a){var i,o=0,f=0;0!=(i=t.l3_enc[r+0])&&(f+=8,t.xr[_+0]<0&&o++,l(i<=1)),0!=(i=t.l3_enc[r+1])&&(f+=4,o*=2,t.xr[_+1]<0&&o++,l(i<=1)),0!=(i=t.l3_enc[r+2])&&(f+=2,o*=2,t.xr[_+2]<0&&o++,l(i<=1)),0!=(i=t.l3_enc[r+3])&&(f++,o*=2,t.xr[_+3]<0&&o++,l(i<=1)),r+=4,_+=4,w(e,o+s.table[f],s.hlen[f]),n+=s.hlen[f]}return n}function E(e,a,s,n,r){var _=h.ht[a],i=0;if(l(a<32),0==a)return i;for(var o=s;o<n;o+=2){var f=0,c=0,u=_.xlen,b=_.xlen,m=0,p=r.l3_enc[o],d=r.l3_enc[o+1];if(0!=p&&(r.xr[o]<0&&m++,f--),a>15){if(p>14){var v=p-15;l(v<=_.linmax),m|=v<<1,c=u,p=15}if(d>14){var g=d-15;l(g<=_.linmax),m<<=u,m|=g,c+=u,d=15}b=16}0!=d&&(m<<=1,r.xr[o+1]<0&&m++,f--),l((p|d)<16),p=p*b+d,c-=f,f+=_.hlen[p],l(f<=t),l(c<=t),w(e,_.table[p],f),w(e,m,c),i+=f+c}return i}function T(e,t){var a=3*e.scalefac_band.s[3];return a>t.big_values&&(a=t.big_values),E(e,t.table_select[0],0,a,t)+E(e,t.table_select[1],a,t.big_values,t)}function k(e,t){var a,s,n,r;a=t.big_values,l(0<=a&&a<=576);var _=t.region0_count+1;return l(0<=_),l(_<e.scalefac_band.l.length),n=e.scalefac_band.l[_],_+=t.region1_count+1,l(0<=_),l(_<e.scalefac_band.l.length),n>a&&(n=a),(r=e.scalefac_band.l[_])>a&&(r=a),s=E(e,t.table_select[0],0,n,t),(s+=E(e,t.table_select[1],n,r,t))+E(e,t.table_select[2],r,a,t)}function x(){this.total=0}function P(t,a){var s,r,_,i,o,l=t.internal_flags;return o=l.w_ptr,-1==(i=l.h_ptr-1)&&(i=u.MAX_HEADER_BUF-1),s=l.header[i].write_timing-d,a.total=s,s>=0&&(r=1+i-o,i<o&&(r=1+i-o+u.MAX_HEADER_BUF),s-=8*r*l.sideinfo_len),s+=_=e.getframebits(t),a.total+=_,a.total%8!=0?a.total=1+a.total/8:a.total=a.total/8,a.total+=v+1,s<0&&n.err.println("strange error flushing buffer ... \n"),s}this.getframebits=function(e){var t,a=e.internal_flags;return t=0!=a.bitrate_index?h.bitrate_table[e.version][a.bitrate_index]:e.brate,l(8<=t&&t<=640),8*(0|72e3*(e.version+1)*t/e.out_samplerate+a.padding)},this.CRC_writeheader=function(e,t){var a=65535;a=B(255&t[2],a),a=B(255&t[3],a);for(var s=6;s<e.sideinfo_len;s++)a=B(255&t[s],a);t[4]=byte(a>>8),t[5]=byte(255&a)},this.flush_bitstream=function(e){var t,s,n=e.internal_flags,r=n.h_ptr-1;if(-1==r&&(r=u.MAX_HEADER_BUF-1),t=n.l3_side,!((s=P(e,new x))<0)){if(R(e,s),l(n.header[r].write_timing+this.getframebits(e)==d),n.ResvSize=0,t.main_data_begin=0,n.findReplayGain){var _=a.GetTitleGain(n.rgdata);l(NEQ(_,GainAnalysis.GAIN_NOT_ENOUGH_SAMPLES)),n.RadioGain=0|Math.floor(10*_+.5)}n.findPeakSample&&(n.noclipGainChange=0|Math.ceil(20*Math.log10(n.PeakSample/32767)*10),n.noclipGainChange>0&&(EQ(e.scale,1)||EQ(e.scale,0))?n.noclipScale=Math.floor(32767/n.PeakSample*100)/100:n.noclipScale=-1)}},this.add_dummy_byte=function(e,t,a){for(var s,n=e.internal_flags;a-- >0;)for(M(0,t,8),s=0;s<u.MAX_HEADER_BUF;++s)n.header[s].write_timing+=8},this.format_bitstream=function(e){var t,a=e.internal_flags;t=a.l3_side;var s=this.getframebits(e);R(e,t.resvDrain_pre),function(e,t){var a,s,_,i=e.internal_flags;if(a=i.l3_side,i.header[i.h_ptr].ptr=0,r.fill(i.header[i.h_ptr].buf,0,i.sideinfo_len,0),e.out_samplerate<16e3?A(i,4094,12):A(i,4095,12),A(i,e.version,1),A(i,1,2),A(i,e.error_protection?0:1,1),A(i,i.bitrate_index,4),A(i,i.samplerate_index,2),A(i,i.padding,1),A(i,e.extension,1),A(i,e.mode.ordinal(),2),A(i,i.mode_ext,2),A(i,e.copyright,1),A(i,e.original,1),A(i,e.emphasis,2),e.error_protection&&A(i,0,16),1==e.version){for(l(a.main_data_begin>=0),A(i,a.main_data_begin,9),2==i.channels_out?A(i,a.private_bits,3):A(i,a.private_bits,5),_=0;_<i.channels_out;_++){var o;for(o=0;o<4;o++)A(i,a.scfsi[_][o],1)}for(s=0;s<2;s++)for(_=0;_<i.channels_out;_++)A(i,(f=a.tt[s][_]).part2_3_length+f.part2_length,12),A(i,f.big_values/2,9),A(i,f.global_gain,8),A(i,f.scalefac_compress,4),f.block_type!=c.NORM_TYPE?(A(i,1,1),A(i,f.block_type,2),A(i,f.mixed_block_flag,1),14==f.table_select[0]&&(f.table_select[0]=16),A(i,f.table_select[0],5),14==f.table_select[1]&&(f.table_select[1]=16),A(i,f.table_select[1],5),A(i,f.subblock_gain[0],3),A(i,f.subblock_gain[1],3),A(i,f.subblock_gain[2],3)):(A(i,0,1),14==f.table_select[0]&&(f.table_select[0]=16),A(i,f.table_select[0],5),14==f.table_select[1]&&(f.table_select[1]=16),A(i,f.table_select[1],5),14==f.table_select[2]&&(f.table_select[2]=16),A(i,f.table_select[2],5),l(0<=f.region0_count&&f.region0_count<16),l(0<=f.region1_count&&f.region1_count<8),A(i,f.region0_count,4),A(i,f.region1_count,3)),A(i,f.preflag,1),A(i,f.scalefac_scale,1),A(i,f.count1table_select,1)}else for(l(a.main_data_begin>=0),A(i,a.main_data_begin,8),A(i,a.private_bits,i.channels_out),s=0,_=0;_<i.channels_out;_++){var f;A(i,(f=a.tt[s][_]).part2_3_length+f.part2_length,12),A(i,f.big_values/2,9),A(i,f.global_gain,8),A(i,f.scalefac_compress,9),f.block_type!=c.NORM_TYPE?(A(i,1,1),A(i,f.block_type,2),A(i,f.mixed_block_flag,1),14==f.table_select[0]&&(f.table_select[0]=16),A(i,f.table_select[0],5),14==f.table_select[1]&&(f.table_select[1]=16),A(i,f.table_select[1],5),A(i,f.subblock_gain[0],3),A(i,f.subblock_gain[1],3),A(i,f.subblock_gain[2],3)):(A(i,0,1),14==f.table_select[0]&&(f.table_select[0]=16),A(i,f.table_select[0],5),14==f.table_select[1]&&(f.table_select[1]=16),A(i,f.table_select[1],5),14==f.table_select[2]&&(f.table_select[2]=16),A(i,f.table_select[2],5),l(0<=f.region0_count&&f.region0_count<16),l(0<=f.region1_count&&f.region1_count<8),A(i,f.region0_count,4),A(i,f.region1_count,3)),A(i,f.scalefac_scale,1),A(i,f.count1table_select,1)}e.error_protection&&CRC_writeheader(i,i.header[i.h_ptr].buf);var h=i.h_ptr;l(i.header[h].ptr==8*i.sideinfo_len),i.h_ptr=h+1&u.MAX_HEADER_BUF-1,i.header[i.h_ptr].write_timing=i.header[h].write_timing+t,i.h_ptr==i.w_ptr&&n.err.println("Error: MAX_HEADER_BUF too small in bitstream.c \n")}(e,s);var _=8*a.sideinfo_len;if(_+=function(e){var t,a,s,n,r=0,_=e.internal_flags,i=_.l3_side;if(1==e.version)for(t=0;t<2;t++)for(a=0;a<_.channels_out;a++){var o=i.tt[t][a],h=f.slen1_tab[o.scalefac_compress],u=f.slen2_tab[o.scalefac_compress];for(n=0,s=0;s<o.sfbdivide;s++)-1!=o.scalefac[s]&&(w(_,o.scalefac[s],h),n+=h);for(;s<o.sfbmax;s++)-1!=o.scalefac[s]&&(w(_,o.scalefac[s],u),n+=u);l(n==o.part2_length),o.block_type==c.SHORT_TYPE?n+=T(_,o):n+=k(_,o),n+=y(_,o),l(n==o.part2_3_length+o.part2_length),r+=n}else for(t=0,a=0;a<_.channels_out;a++){o=i.tt[t][a];var b,m,p=0;if(l(null!=o.sfb_partition_table),n=0,s=0,m=0,o.block_type==c.SHORT_TYPE){for(;m<4;m++){var d=o.sfb_partition_table[m]/3,v=o.slen[m];for(b=0;b<d;b++,s++)w(_,Math.max(o.scalefac[3*s+0],0),v),w(_,Math.max(o.scalefac[3*s+1],0),v),w(_,Math.max(o.scalefac[3*s+2],0),v),p+=3*v}n+=T(_,o)}else{for(;m<4;m++)for(d=o.sfb_partition_table[m],v=o.slen[m],b=0;b<d;b++,s++)w(_,Math.max(o.scalefac[s],0),v),p+=v;n+=k(_,o)}n+=y(_,o),l(n==o.part2_3_length),l(p==o.part2_length),r+=p+n}return r}(e),R(e,t.resvDrain_post),_+=t.resvDrain_post,t.main_data_begin+=(s-_)/8,P(e,new x)!=a.ResvSize&&n.err.println("Internal buffer inconsistency. flushbits <> ResvSize"),8*t.main_data_begin!=a.ResvSize&&(n.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,a.ResvSize,t.resvDrain_post,t.resvDrain_pre,8*a.sideinfo_len,_-t.resvDrain_post-8*a.sideinfo_len,_,_%8,s),n.err.println("This is a fatal error.  It has several possible causes:"),n.err.println("90%%  LAME compiled with buggy version of gcc using advanced optimizations"),n.err.println(" 9%%  Your system is overclocked"),n.err.println(" 1%%  bug in LAME encoding library"),a.ResvSize=8*t.main_data_begin),l(d%8==0),d>1e9){var i;for(i=0;i<u.MAX_HEADER_BUF;++i)a.header[i].write_timing-=d;d=0}return 0},this.copy_buffer=function(e,t,r,_,f){var h=v+1;if(h<=0)return 0;if(0!=_&&h>_)return-1;if(n.arraycopy(p,0,t,r,h),v=-1,g=0,0!=f){var c=o(1);if(c[0]=e.nMusicCRC,m.updateMusicCRC(c,t,r,h),e.nMusicCRC=c[0],h>0&&(e.VBR_seek_table.nBytesWritten+=h),e.decode_on_the_fly)for(var u,b=i([2,1152]),d=h,S=-1;0!=S;)if(S=s.hip_decode1_unclipped(e.hip,t,r,d,b[0],b[1]),d=0,-1==S&&(S=0),S>0){if(l(S<=1152),e.findPeakSample){for(u=0;u<S;u++)b[0][u]>e.PeakSample?e.PeakSample=b[0][u]:-b[0][u]>e.PeakSample&&(e.PeakSample=-b[0][u]);if(e.channels_out>1)for(u=0;u<S;u++)b[1][u]>e.PeakSample?e.PeakSample=b[1][u]:-b[1][u]>e.PeakSample&&(e.PeakSample=-b[1][u])}if(e.findReplayGain&&a.AnalyzeSamples(e.rgdata,b[0],0,b[1],0,S,e.channels_out)==GainAnalysis.GAIN_ANALYSIS_ERROR)return-6}}return h},this.init_bit_stream_w=function(e){p=_(Lame.LAME_MAXMP3BUFFER),e.h_ptr=e.w_ptr=0,e.header[e.h_ptr].write_timing=0,v=-1,g=0,d=0}}b.EQ=function(e,t){return Math.abs(e)>Math.abs(t)?Math.abs(e-t)<=1e-6*Math.abs(e):Math.abs(e-t)<=1e-6*Math.abs(t)},b.NEQ=function(e,t){return!b.EQ(e,t)},e.exports=b},120:(e,t,a)=>{var s=a(38),n=(s.System,s.VbrMode,s.Float,s.ShortBlock,s.Util,s.Arrays,s.new_array_n,s.new_byte,s.new_double,s.new_float),r=(s.new_float_n,s.new_int),_=(s.new_int_n,s.assert),i=a(134),o=a(687),l=a(354),f=a(998);e.exports=function(e){var t=e;this.quantize=t,this.iteration_loop=function(e,t,a,s){var h,c=e.internal_flags,u=n(l.SFBMAX),b=n(576),m=r(2),p=0,d=c.l3_side,v=new i(p);this.quantize.rv.ResvFrameBegin(e,v),p=v.bits;for(var g=0;g<c.mode_gr;g++){h=this.quantize.qupvt.on_pe(e,t,m,p,g,g),c.mode_ext==o.MPG_MD_MS_LR&&(this.quantize.ms_convert(c.l3_side,g),this.quantize.qupvt.reduce_side(m,a[g],p,h));for(var S=0;S<c.channels_out;S++){var w,M,R=d.tt[g][S];R.block_type!=o.SHORT_TYPE?(w=0,M=c.PSY.mask_adjust-w):(w=0,M=c.PSY.mask_adjust_short-w),c.masking_lower=Math.pow(10,.1*M),this.quantize.init_outer_loop(c,R),this.quantize.init_xrpow(c,R,b)&&(this.quantize.qupvt.calc_xmin(e,s[g][S],R,u),this.quantize.outer_loop(e,R,u,b,S,m[S])),this.quantize.iteration_finish_one(c,g,S),_(R.part2_3_length<=f.MAX_BITS_PER_CHANNEL),_(R.part2_3_length<=m[S])}}this.quantize.rv.ResvFrameEnd(c,p)}}},449:(e,t,a)=>{var s=a(38),n=s.new_float,r=s.new_int;s.assert,e.exports=function(){this.global_gain=0,this.sfb_count1=0,this.step=r(39),this.noise=n(39),this.noise_log=n(39)}},711:e=>{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}},687:(e,t,a)=>{var s=a(38),n=s.System,r=s.VbrMode,_=(s.Float,s.ShortBlock,s.Util,s.Arrays,s.new_array_n),i=(s.new_byte,s.new_double,s.new_float),o=s.new_float_n,l=s.new_int,f=(s.new_int_n,s.assert);function h(){var e=a(143),t=a(584),s=h.FFTOFFSET,c=h.MPG_MD_MS_LR,u=null;this.psy=null;var b=null,m=null,p=null;this.setModules=function(e,t,a,s){u=e,this.psy=t,b=t,m=s,p=a};var d=new e;this.lame_encode_mp3_frame=function(e,a,v,g,S,w){var M,R=_([2,2]);R[0][0]=new t,R[0][1]=new t,R[1][0]=new t,R[1][1]=new t;var A,B=_([2,2]);B[0][0]=new t,B[0][1]=new t,B[1][0]=new t,B[1][1]=new t;var y,E,T,k=[null,null],x=e.internal_flags,P=o([2,4]),I=[.5,.5],L=[[0,0],[0,0]],O=[[0,0],[0,0]];if(k[0]=a,k[1]=v,0==x.lame_encode_frame_init&&function(e,t){var a,s,n=e.internal_flags;if(0==n.lame_encode_frame_init){var r,_,o=i(2014),l=i(2014);for(n.lame_encode_frame_init=1,r=0,_=0;r<286+576*(1+n.mode_gr);++r)r<576*n.mode_gr?(o[r]=0,2==n.channels_out&&(l[r]=0)):(o[r]=t[0][_],2==n.channels_out&&(l[r]=t[1][_]),++_);for(s=0;s<n.mode_gr;s++)for(a=0;a<n.channels_out;a++)n.l3_side.tt[s][a].block_type=h.SHORT_TYPE;d.mdct_sub48(n,o,l),f(576>=h.FFTOFFSET),f(n.mf_size>=h.BLKSIZE+e.framesize-h.FFTOFFSET),f(n.mf_size>=512+e.framesize-32)}}(e,k),x.padding=0,(x.slot_lag-=x.frac_SpF)<0&&(x.slot_lag+=e.out_samplerate,x.padding=1),0!=x.psymodel){var V=[null,null],H=0,N=l(2);for(T=0;T<x.mode_gr;T++){for(E=0;E<x.channels_out;E++)V[E]=k[E],H=576+576*T-h.FFTOFFSET;if(0!=(e.VBR==r.vbr_mtrh||e.VBR==r.vbr_mt?b.L3psycho_anal_vbr(e,V,H,T,R,B,L[T],O[T],P[T],N):b.L3psycho_anal_ns(e,V,H,T,R,B,L[T],O[T],P[T],N)))return-4;for(e.mode==MPEGMode.JOINT_STEREO&&(I[T]=P[T][2]+P[T][3],I[T]>0&&(I[T]=P[T][3]/I[T])),E=0;E<x.channels_out;E++){var D=x.l3_side.tt[T][E];D.block_type=N[E],D.mixed_block_flag=0}}}else for(T=0;T<x.mode_gr;T++)for(E=0;E<x.channels_out;E++)x.l3_side.tt[T][E].block_type=h.NORM_TYPE,x.l3_side.tt[T][E].mixed_block_flag=0,O[T][E]=L[T][E]=700;if(function(e){var t,a;if(0!=e.ATH.useAdjust)if(a=e.loudness_sq[0][0],t=e.loudness_sq[1][0],2==e.channels_out?(a+=e.loudness_sq[0][1],t+=e.loudness_sq[1][1]):(a+=a,t+=t),2==e.mode_gr&&(a=Math.max(a,t)),a*=.5,(a*=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 s=31.98*a+625e-6;e.ATH.adjust>=s?(e.ATH.adjust*=.075*s+.925,e.ATH.adjust<s&&(e.ATH.adjust=s)):e.ATH.adjustLimit>=s?e.ATH.adjust=s:e.ATH.adjust<e.ATH.adjustLimit&&(e.ATH.adjust=e.ATH.adjustLimit),e.ATH.adjustLimit=s}else e.ATH.adjust=1}(x),d.mdct_sub48(x,k[0],k[1]),x.mode_ext=h.MPG_MD_LR_LR,e.force_ms)x.mode_ext=h.MPG_MD_MS_LR;else if(e.mode==MPEGMode.JOINT_STEREO){var X=0,C=0;for(T=0;T<x.mode_gr;T++)for(E=0;E<x.channels_out;E++)X+=O[T][E],C+=L[T][E];if(X<=1*C){var F=x.l3_side.tt[0],Y=x.l3_side.tt[x.mode_gr-1];F[0].block_type==F[1].block_type&&Y[0].block_type==Y[1].block_type&&(x.mode_ext=h.MPG_MD_MS_LR)}}if(x.mode_ext==c?(A=B,y=O):(A=R,y=L),e.analysis&&null!=x.pinfo)for(T=0;T<x.mode_gr;T++)for(E=0;E<x.channels_out;E++)x.pinfo.ms_ratio[T]=x.ms_ratio[T],x.pinfo.ms_ener_ratio[T]=I[T],x.pinfo.blocktype[T][E]=x.l3_side.tt[T][E].block_type,x.pinfo.pe[T][E]=y[T][E],n.arraycopy(x.l3_side.tt[T][E].xr,0,x.pinfo.xr[T][E],0,576),x.mode_ext==c&&(x.pinfo.ers[T][E]=x.pinfo.ers[T][E+2],n.arraycopy(x.pinfo.energy[T][E+2],0,x.pinfo.energy[T][E],0,x.pinfo.energy[T][E].length));if(e.VBR==r.vbr_off||e.VBR==r.vbr_abr){var q,G;for(q=0;q<18;q++)x.nsPsy.pefirbuf[q]=x.nsPsy.pefirbuf[q+1];for(G=0,T=0;T<x.mode_gr;T++)for(E=0;E<x.channels_out;E++)G+=y[T][E];for(x.nsPsy.pefirbuf[18]=G,G=x.nsPsy.pefirbuf[9],q=0;q<9;q++)G+=(x.nsPsy.pefirbuf[q]+x.nsPsy.pefirbuf[18-q])*h.fircoef[q];for(G=3350*x.mode_gr*x.channels_out/G,T=0;T<x.mode_gr;T++)for(E=0;E<x.channels_out;E++)y[T][E]*=G}if(x.iteration_loop.iteration_loop(e,y,I,A),u.format_bitstream(e),M=u.copy_buffer(x,g,S,w,1),e.bWriteVbrTag&&m.addVbrFrame(e),e.analysis&&null!=x.pinfo){for(E=0;E<x.channels_out;E++){var j;for(j=0;j<s;j++)x.pinfo.pcmdata[E][j]=x.pinfo.pcmdata[E][j+e.framesize];for(j=s;j<1600;j++)x.pinfo.pcmdata[E][j]=k[E][j-s]}p.set_frame_pinfo(e,A)}return function(e){var t,a;for(f(0<=e.bitrate_index&&e.bitrate_index<16),f(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(a=0;a<e.channels_out;++a){var s=0|e.l3_side.tt[t][a].block_type;0!=e.l3_side.tt[t][a].mixed_block_flag&&(s=4),e.bitrate_blockType_Hist[e.bitrate_index][s]++,e.bitrate_blockType_Hist[e.bitrate_index][5]++,e.bitrate_blockType_Hist[15][s]++,e.bitrate_blockType_Hist[15][5]++}}(x),M}}h.ENCDELAY=576,h.POSTDELAY=1152,h.MDCTDELAY=48,h.FFTOFFSET=224+h.MDCTDELAY,h.DECDELAY=528,h.SBLIMIT=32,h.CBANDS=64,h.SBPSY_l=21,h.SBPSY_s=12,h.SBMAX_l=22,h.SBMAX_s=13,h.PSFB21=6,h.PSFB12=6,h.BLKSIZE=1024,h.HBLKSIZE=h.BLKSIZE/2+1,h.BLKSIZE_s=256,h.HBLKSIZE_s=h.BLKSIZE_s/2+1,h.NORM_TYPE=0,h.START_TYPE=1,h.SHORT_TYPE=2,h.STOP_TYPE=3,h.MPG_MD_LR_LR=0,h.MPG_MD_LR_I=1,h.MPG_MD_MS_LR=2,h.MPG_MD_MS_I=3,h.fircoef=[-.1039435,-.1892065,5*-.0432472,-.155915,3898045e-23,.0467745*5,.50455,.756825,.187098*5],e.exports=h},347:(e,t,a)=>{var s=a(38),n=(s.System,s.VbrMode,s.Float,s.ShortBlock,s.Util),r=(s.Arrays,s.new_array_n,s.new_byte,s.new_double,s.new_float),_=(s.new_float_n,s.new_int,s.new_int_n,s.assert,a(687));e.exports=function(){var e=r(_.BLKSIZE),t=r(_.BLKSIZE_s/2),a=[.9238795325112867,.3826834323650898,.9951847266721969,.0980171403295606,.9996988186962042,.02454122852291229,.9999811752826011,.006135884649154475];function s(e,t,s){var r,_,i,o=0,l=t+(s<<=1);r=4;do{var f,h,c,u,b,m,p;p=r>>1,m=(b=r<<1)+(u=r),r=b<<1,i=(_=t)+p;do{R=e[_+0]-e[_+u],M=e[_+0]+e[_+u],E=e[_+b]-e[_+m],B=e[_+b]+e[_+m],e[_+b]=M-B,e[_+0]=M+B,e[_+m]=R-E,e[_+u]=R+E,R=e[i+0]-e[i+u],M=e[i+0]+e[i+u],E=n.SQRT2*e[i+m],B=n.SQRT2*e[i+b],e[i+b]=M-B,e[i+0]=M+B,e[i+m]=R-E,e[i+u]=R+E,i+=r,_+=r}while(_<l);for(h=a[o+0],f=a[o+1],c=1;c<p;c++){var d,v;d=1-2*f*f,v=2*f*h,_=t+c,i=t+u-c;do{var g,S,w,M,R,A,B,y,E,T;S=v*e[_+u]-d*e[i+u],g=d*e[_+u]+v*e[i+u],R=e[_+0]-g,M=e[_+0]+g,A=e[i+0]-S,w=e[i+0]+S,S=v*e[_+m]-d*e[i+m],g=d*e[_+m]+v*e[i+m],E=e[_+b]-g,B=e[_+b]+g,T=e[i+b]-S,y=e[i+b]+S,S=f*B-h*T,g=h*B+f*T,e[_+b]=M-g,e[_+0]=M+g,e[i+m]=A-S,e[i+u]=A+S,S=h*y-f*E,g=f*y+h*E,e[i+b]=w-g,e[i+0]=w+g,e[_+m]=R-S,e[_+u]=R+S,i+=r,_+=r}while(_<l);h=(d=h)*a[o+0]-f*a[o+1],f=d*a[o+1]+f*a[o+0]}o+=2}while(r<s)}var i=[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,a,n,r,o){for(var l=0;l<3;l++){var f=_.BLKSIZE_s/2,h=65535&192*(l+1),c=_.BLKSIZE_s/8-1;do{var u,b,m,p,d,v=255&i[c<<2];b=(u=t[v]*r[n][o+v+h])-(d=t[127-v]*r[n][o+v+h+128]),u+=d,p=(m=t[v+64]*r[n][o+v+h+64])-(d=t[63-v]*r[n][o+v+h+192]),m+=d,f-=4,a[l][f+0]=u+m,a[l][f+2]=u-m,a[l][f+1]=b+p,a[l][f+3]=b-p,b=(u=t[v+1]*r[n][o+v+h+1])-(d=t[126-v]*r[n][o+v+h+129]),u+=d,p=(m=t[v+65]*r[n][o+v+h+65])-(d=t[62-v]*r[n][o+v+h+193]),m+=d,a[l][f+_.BLKSIZE_s/2+0]=u+m,a[l][f+_.BLKSIZE_s/2+2]=u-m,a[l][f+_.BLKSIZE_s/2+1]=b+p,a[l][f+_.BLKSIZE_s/2+3]=b-p}while(--c>=0);s(a[l],f,_.BLKSIZE_s/2)}},this.fft_long=function(t,a,n,r,o){var l=_.BLKSIZE/8-1,f=_.BLKSIZE/2;do{var h,c,u,b,m,p=255&i[l];c=(h=e[p]*r[n][o+p])-(m=e[p+512]*r[n][o+p+512]),h+=m,b=(u=e[p+256]*r[n][o+p+256])-(m=e[p+768]*r[n][o+p+768]),u+=m,a[0+(f-=4)]=h+u,a[f+2]=h-u,a[f+1]=c+b,a[f+3]=c-b,c=(h=e[p+1]*r[n][o+p+1])-(m=e[p+513]*r[n][o+p+513]),h+=m,b=(u=e[p+257]*r[n][o+p+257])-(m=e[p+769]*r[n][o+p+769]),u+=m,a[f+_.BLKSIZE/2+0]=h+u,a[f+_.BLKSIZE/2+2]=h-u,a[f+_.BLKSIZE/2+1]=c+b,a[f+_.BLKSIZE/2+3]=c-b}while(--l>=0);s(a,f,_.BLKSIZE/2)},this.init_fft=function(a){for(var s=0;s<_.BLKSIZE;s++)e[s]=.42-.5*Math.cos(2*Math.PI*(s+.5)/_.BLKSIZE)+.08*Math.cos(4*Math.PI*(s+.5)/_.BLKSIZE);for(s=0;s<_.BLKSIZE_s/2;s++)t[s]=.5*(1-Math.cos(2*Math.PI*(s+.5)/_.BLKSIZE_s))}}},287:(e,t,a)=>{var s=a(38),n=s.System,r=(s.VbrMode,s.Float,s.ShortBlock,s.Util,s.Arrays);function _(){_.YULE_ORDER,_.MAX_SAMP_FREQ;var e=_.RMS_WINDOW_TIME_NUMERATOR,t=_.RMS_WINDOW_TIME_DENOMINATOR,a=(_.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]]),s=[[.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 i(e,t,a,s,n,r){for(;0!=n--;)a[s]=1e-10+e[t+0]*r[0]-a[s-1]*r[1]+e[t-1]*r[2]-a[s-2]*r[3]+e[t-2]*r[4]-a[s-3]*r[5]+e[t-3]*r[6]-a[s-4]*r[7]+e[t-4]*r[8]-a[s-5]*r[9]+e[t-5]*r[10]-a[s-6]*r[11]+e[t-6]*r[12]-a[s-7]*r[13]+e[t-7]*r[14]-a[s-8]*r[15]+e[t-8]*r[16]-a[s-9]*r[17]+e[t-9]*r[18]-a[s-10]*r[19]+e[t-10]*r[20],++s,++t}function o(e,t,a,s,n,r){for(;0!=n--;)a[s]=e[t+0]*r[0]-a[s-1]*r[1]+e[t-1]*r[2]-a[s-2]*r[3]+e[t-2]*r[4],++s,++t}function l(e){return e*e}this.InitGainAnalysis=function(a,s){return function(a,s){for(var n=0;n<MAX_ORDER;n++)a.linprebuf[n]=a.lstepbuf[n]=a.loutbuf[n]=a.rinprebuf[n]=a.rstepbuf[n]=a.routbuf[n]=0;switch(0|s){case 48e3:a.reqindex=0;break;case 44100:a.reqindex=1;break;case 32e3:a.reqindex=2;break;case 24e3:a.reqindex=3;break;case 22050:a.reqindex=4;break;case 16e3:a.reqindex=5;break;case 12e3:a.reqindex=6;break;case 11025:a.reqindex=7;break;case 8e3:a.reqindex=8;break;default:return INIT_GAIN_ANALYSIS_ERROR}return a.sampleWindow=0|(s*e+t-1)/t,a.lsum=0,a.rsum=0,a.totsamp=0,r.ill(a.A,0),INIT_GAIN_ANALYSIS_OK}(a,s)!=INIT_GAIN_ANALYSIS_OK?INIT_GAIN_ANALYSIS_ERROR:(a.linpre=MAX_ORDER,a.rinpre=MAX_ORDER,a.lstep=MAX_ORDER,a.rstep=MAX_ORDER,a.lout=MAX_ORDER,a.rout=MAX_ORDER,r.fill(a.B,0),INIT_GAIN_ANALYSIS_OK)},this.AnalyzeSamples=function(e,t,r,f,h,c,u){var b,m,p,d,v,g,S;if(0==c)return GAIN_ANALYSIS_OK;switch(S=0,v=c,u){case 1:f=t,h=r;break;case 2:break;default:return GAIN_ANALYSIS_ERROR}for(c<MAX_ORDER?(n.arraycopy(t,r,e.linprebuf,MAX_ORDER,c),n.arraycopy(f,h,e.rinprebuf,MAX_ORDER,c)):(n.arraycopy(t,r,e.linprebuf,MAX_ORDER,MAX_ORDER),n.arraycopy(f,h,e.rinprebuf,MAX_ORDER,MAX_ORDER));v>0;){g=v>e.sampleWindow-e.totsamp?e.sampleWindow-e.totsamp:v,S<MAX_ORDER?(b=e.linpre+S,m=e.linprebuf,p=e.rinpre+S,d=e.rinprebuf,g>MAX_ORDER-S&&(g=MAX_ORDER-S)):(b=r+S,m=t,p=h+S,d=f),i(m,b,e.lstepbuf,e.lstep+e.totsamp,g,a[e.reqindex]),i(d,p,e.rstepbuf,e.rstep+e.totsamp,g,a[e.reqindex]),o(e.lstepbuf,e.lstep+e.totsamp,e.loutbuf,e.lout+e.totsamp,g,s[e.reqindex]),o(e.rstepbuf,e.rstep+e.totsamp,e.routbuf,e.rout+e.totsamp,g,s[e.reqindex]),b=e.lout+e.totsamp,m=e.loutbuf,p=e.rout+e.totsamp,d=e.routbuf;for(var w=g%8;0!=w--;)e.lsum+=l(m[b++]),e.rsum+=l(d[p++]);for(w=g/8;0!=w--;)e.lsum+=l(m[b+0])+l(m[b+1])+l(m[b+2])+l(m[b+3])+l(m[b+4])+l(m[b+5])+l(m[b+6])+l(m[b+7]),b+=8,e.rsum+=l(d[p+0])+l(d[p+1])+l(d[p+2])+l(d[p+3])+l(d[p+4])+l(d[p+5])+l(d[p+6])+l(d[p+7]),p+=8;if(v-=g,S+=g,e.totsamp+=g,e.totsamp==e.sampleWindow){var M=10*_.STEPS_per_dB*Math.log10((e.lsum+e.rsum)/e.totsamp*.5+1e-37),R=M<=0?0:0|M;R>=e.A.length&&(R=e.A.length-1),e.A[R]++,e.lsum=e.rsum=0,n.arraycopy(e.loutbuf,e.totsamp,e.loutbuf,0,MAX_ORDER),n.arraycopy(e.routbuf,e.totsamp,e.routbuf,0,MAX_ORDER),n.arraycopy(e.lstepbuf,e.totsamp,e.lstepbuf,0,MAX_ORDER),n.arraycopy(e.rstepbuf,e.totsamp,e.rstepbuf,0,MAX_ORDER),e.totsamp=0}if(e.totsamp>e.sampleWindow)return GAIN_ANALYSIS_ERROR}return c<MAX_ORDER?(n.arraycopy(e.linprebuf,c,e.linprebuf,0,MAX_ORDER-c),n.arraycopy(e.rinprebuf,c,e.rinprebuf,0,MAX_ORDER-c),n.arraycopy(t,r,e.linprebuf,MAX_ORDER-c,c),n.arraycopy(f,h,e.rinprebuf,MAX_ORDER-c,c)):(n.arraycopy(t,r+c-MAX_ORDER,e.linprebuf,0,MAX_ORDER),n.arraycopy(f,h+c-MAX_ORDER,e.rinprebuf,0,MAX_ORDER)),GAIN_ANALYSIS_OK},this.GetTitleGain=function(e){for(var t=function(e,t){var a,s=0;for(a=0;a<t;a++)s+=e[a];if(0==s)return GAIN_NOT_ENOUGH_SAMPLES;var n=0|Math.ceil(s*(1-.95));for(a=t;a-- >0&&!((n-=e[a])<=0););return 64.82-a/_.STEPS_per_dB}(e.A,e.A.length),a=0;a<e.A.length;a++)e.B[a]+=e.A[a],e.A[a]=0;for(a=0;a<MAX_ORDER;a++)e.linprebuf[a]=e.lstepbuf[a]=e.loutbuf[a]=e.rinprebuf[a]=e.rstepbuf[a]=e.routbuf[a]=0;return e.totsamp=0,e.lsum=e.rsum=0,t}}s.new_array_n,s.new_byte,s.new_double,s.new_float,s.new_float_n,s.new_int,s.new_int_n,s.assert,_.STEPS_per_dB=100,_.MAX_dB=120,_.GAIN_NOT_ENOUGH_SAMPLES=-24601,_.GAIN_ANALYSIS_ERROR=0,_.GAIN_ANALYSIS_OK=1,_.INIT_GAIN_ANALYSIS_ERROR=0,_.INIT_GAIN_ANALYSIS_OK=1,_.YULE_ORDER=10,_.MAX_ORDER=_.YULE_ORDER,_.MAX_SAMP_FREQ=48e3,_.RMS_WINDOW_TIME_NUMERATOR=1,_.RMS_WINDOW_TIME_DENOMINATOR=20,_.MAX_SAMPLES_PER_WINDOW=_.MAX_SAMP_FREQ*_.RMS_WINDOW_TIME_NUMERATOR/_.RMS_WINDOW_TIME_DENOMINATOR+1,e.exports=_},438:(e,t,a)=>{var s=a(38),n=(s.System,s.VbrMode,s.Float,s.ShortBlock,s.Util,s.Arrays,s.new_array_n,s.new_byte,s.new_double,s.new_float),r=(s.new_float_n,s.new_int),_=(s.new_int_n,s.assert,a(354));e.exports=function(){this.xr=n(576),this.l3_enc=r(576),this.scalefac=r(_.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=r(3),this.subblock_gain=r(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=r(_.SFBMAX),this.window=r(_.SFBMAX),this.count1bits=0,this.sfb_partition_table=null,this.slen=r(4),this.max_nonzero_coeff=0;var e=this;function t(e){return new Int32Array(e)}this.assign=function(a){var s;e.xr=(s=a.xr,new Float32Array(s)),e.l3_enc=t(a.l3_enc),e.scalefac=t(a.scalefac),e.xrpow_max=a.xrpow_max,e.part2_3_length=a.part2_3_length,e.big_values=a.big_values,e.count1=a.count1,e.global_gain=a.global_gain,e.scalefac_compress=a.scalefac_compress,e.block_type=a.block_type,e.mixed_block_flag=a.mixed_block_flag,e.table_select=t(a.table_select),e.subblock_gain=t(a.subblock_gain),e.region0_count=a.region0_count,e.region1_count=a.region1_count,e.preflag=a.preflag,e.scalefac_scale=a.scalefac_scale,e.count1table_select=a.count1table_select,e.part2_length=a.part2_length,e.sfb_lmax=a.sfb_lmax,e.sfb_smin=a.sfb_smin,e.psy_lmax=a.psy_lmax,e.sfbmax=a.sfbmax,e.psymax=a.psymax,e.sfbdivide=a.sfbdivide,e.width=t(a.width),e.window=t(a.window),e.count1bits=a.count1bits,e.sfb_partition_table=a.sfb_partition_table.slice(0),e.slen=t(a.slen),e.max_nonzero_coeff=a.max_nonzero_coeff}}},524:(e,t,a)=>{var s=a(38),n=(s.System,s.VbrMode,s.Float,s.ShortBlock,s.Util,s.Arrays,s.new_array_n,s.new_byte,s.new_double,s.new_float,s.new_float_n,s.new_int),r=(s.new_int_n,s.assert,a(438));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=[n(4),n(4)];for(var e=0;e<2;e++)for(var t=0;t<2;t++)this.tt[e][t]=new r}},584:(e,t,a)=>{var s=a(200);e.exports=function(){this.thm=new s,this.en=new s}},200:(e,t,a)=>{var s=a(687),n=a(38),r=n.System,_=(n.VbrMode,n.Float,n.ShortBlock,n.Util,n.Arrays,n.new_array_n,n.new_byte,n.new_double,n.new_float),i=n.new_float_n;n.new_int,n.new_int_n,n.assert,e.exports=function(){this.l=_(s.SBMAX_l),this.s=i([s.SBMAX_s,3]);var e=this;this.assign=function(t){r.arraycopy(t.l,0,e.l,0,s.SBMAX_l);for(var a=0;a<s.SBMAX_s;a++)for(var n=0;n<3;n++)e.s[a][n]=t.s[a][n]}}},354:(e,t,a)=>{var s=a(687),n={};n.SFBMAX=3*s.SBMAX_s,e.exports=n},566:(e,t,a)=>{var s=a(38),n=s.System,r=s.VbrMode,_=(s.Float,s.ShortBlock),i=(s.Util,s.Arrays,s.new_array_n,s.new_byte,s.new_double,s.new_float),o=(s.new_float_n,s.new_int,s.new_int_n),l=s.new_short_n,f=s.assert,h=a(319),c=a(893),u=a(998),b=a(514),m=a(62),p=a(120),d=a(724),v=a(721),g=a(687);e.exports=function e(){var t,a,s,S,w,M=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 R,A,B,y=new h;function E(){this.mask_adjust=0,this.mask_adjust_short=0,this.bo_l_weight=i(g.SBMAX_l),this.bo_s_weight=i(g.SBMAX_s)}function T(){this.lowerlimit=0}function k(e,t){this.lowpass=t}this.enc=new g,this.setModules=function(e,n,r,_,i,o,l,f,h){t=e,a=n,s=r,S=_,w=i,R=o,A=f,B=h,this.enc.setModules(a,y,S,R)};var x=4294479419;function P(e){return e>1?0:e<=0?1:Math.cos(Math.PI/2*e)}function I(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 L(e,t,a){a<16e3&&(t=2);for(var s=v.bitrate_table[t][1],n=2;n<=14;n++)v.bitrate_table[t][n]>0&&Math.abs(v.bitrate_table[t][n]-e)<Math.abs(s-e)&&(s=v.bitrate_table[t][n]);return s}function O(e,t,a){a<16e3&&(t=2);for(var s=0;s<=14;s++)if(v.bitrate_table[t][s]>0&&v.bitrate_table[t][s]==e)return s;return-1}function V(e,t){var a=[new k(8,2e3),new k(16,3700),new k(24,3900),new k(32,5500),new k(40,7e3),new k(48,7500),new k(56,1e4),new k(64,11e3),new k(80,13500),new k(96,15100),new k(112,15600),new k(128,17e3),new k(160,17500),new k(192,18600),new k(224,19400),new k(256,19700),new k(320,20500)],s=M.nearestBitrateFullIndex(t);e.lowerlimit=a[s].lowpass}function H(e){var t=g.BLKSIZE+e.framesize-g.FFTOFFSET;return t=Math.max(t,512+e.framesize-32),f(u.MFSIZE>=t),t}function N(e,t,a,s,n,r){var _=M.enc.lame_encode_mp3_frame(e,t,a,s,n,r);return e.frameNum++,_}function D(){this.n_in=0,this.n_out=0}function X(){this.num_used=0}function C(e,t){return 0!=t?C(t,e%t):e}function F(e,t,a){var s=Math.PI*t;(e/=a)<0&&(e=0),e>1&&(e=1);var n=e-.5,r=.42-.5*Math.cos(2*e*Math.PI)+.08*Math.cos(4*e*Math.PI);return Math.abs(n)<1e-9?s/Math.PI:r*Math.sin(a*s*n)/(Math.PI*a*n)}function Y(e,t,a,s,n,r,_,o,l){var h,c,b=e.internal_flags,m=0,p=e.out_samplerate/C(e.out_samplerate,e.in_samplerate);p>u.BPC&&(p=u.BPC);var d=Math.abs(b.resample_ratio-Math.floor(.5+b.resample_ratio))<1e-4?1:0,v=1/b.resample_ratio;v>1&&(v=1);var g=31;0==g%2&&--g;var S=(g+=d)+1;if(0==b.fill_buffer_resample_init){for(b.inbuf_old[0]=i(S),b.inbuf_old[1]=i(S),h=0;h<=2*p;++h)b.blackfilt[h]=i(S);for(b.itime[0]=0,b.itime[1]=0,m=0;m<=2*p;m++){var w=0,M=(m-p)/(2*p);for(h=0;h<=g;h++)w+=b.blackfilt[m][h]=F(h-M,v,g);for(h=0;h<=g;h++)b.blackfilt[m][h]/=w}b.fill_buffer_resample_init=1}var R=b.inbuf_old[l];for(c=0;c<s;c++){var A,B;if(A=c*b.resample_ratio,g+(m=0|Math.floor(A-b.itime[l]))-g/2>=_)break;M=A-b.itime[l]-(m+g%2*.5),f(Math.abs(M)<=.501),B=0|Math.floor(2*M*p+p+.5);var y=0;for(h=0;h<=g;++h){var E=0|h+m-g/2;f(E<_),f(E+S>=0),y+=(E<0?R[S+E]:n[r+E])*b.blackfilt[B][h]}t[a+c]=y}if(o.num_used=Math.min(_,g+m-g/2),b.itime[l]+=o.num_used-c*b.resample_ratio,o.num_used>=S)for(h=0;h<S;h++)R[h]=n[r+o.num_used+h-S];else{var T=S-o.num_used;for(h=0;h<T;++h)R[h]=R[h+o.num_used];for(m=0;h<S;++h,++m)R[h]=n[r+m];f(m==o.num_used)}return c}function q(e,t,a,s,n,r){var _=e.internal_flags;if(_.resample_ratio<.9999||_.resample_ratio>1.0001)for(var i=0;i<_.channels_out;i++){var o=new X;r.n_out=Y(e,t[i],_.mf_size,e.framesize,a[i],s,n,o,i),r.n_in=o.num_used}else{r.n_out=Math.min(e.framesize,n),r.n_in=r.n_out;for(var l=0;l<r.n_out;++l)t[0][_.mf_size+l]=a[0][s+l],2==_.channels_out&&(t[1][_.mf_size+l]=a[1][s+l])}}this.lame_init=function(){var e=new c,t=function(e){var t;return e.class_id=x,t=e.internal_flags=new u,e.mode=MPEGMode.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=r.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=g.ENCDELAY+g.POSTDELAY,e.encoder_padding=0,t.mf_size=g.ENCDELAY-g.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],a=0,s=0,n=0,r=0;r=t[16],n=16,s=t[16],a=16;for(var _=0;_<16;_++)if(Math.max(e,t[_+1])!=e){r=t[_+1],n=_+1,s=t[_],a=_;break}return r-e>e-s?a:n},this.lame_init_params=function(e){var i,l,c,u=e.internal_flags;if(u.Class_ID=0,null==u.ATH&&(u.ATH=new b),null==u.PSY&&(u.PSY=new E),null==u.rgdata&&(u.rgdata=new m),u.channels_in=e.num_channels,1==u.channels_in&&(e.mode=MPEGMode.MONO),u.channels_out=e.mode==MPEGMode.MONO?1:2,u.mode_ext=g.MPG_MD_MS_LR,e.mode==MPEGMode.MONO&&(e.force_ms=!1),e.VBR==r.vbr_off&&128!=e.VBR_mean_bitrate_kbps&&0==e.brate&&(e.brate=e.VBR_mean_bitrate_kbps),e.VBR==r.vbr_off||e.VBR==r.vbr_mtrh||e.VBR==r.vbr_mt||(e.free_format=!1),e.VBR==r.vbr_off&&0==e.brate&&d.EQ(e.compression_ratio,0)&&(e.compression_ratio=11.025),e.VBR==r.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*u.channels_out/(1e3*e.compression_ratio),u.samplerate_index=I(e.out_samplerate,e),e.free_format||(e.brate=L(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 M=16e3;switch(e.VBR){case r.vbr_off:V(k=new T,e.brate),M=k.lowerlimit;break;case r.vbr_abr:var k;V(k=new T,e.VBR_mean_bitrate_kbps),M=k.lowerlimit;break;case r.vbr_rh:var H=[19500,19e3,18600,18e3,17500,16e3,15600,14900,12500,1e4,3950];if(0<=e.VBR_q&&e.VBR_q<=9){var N=H[e.VBR_q],D=H[e.VBR_q+1],X=e.VBR_q_frac;M=linear_int(N,D,X)}else M=19500;break;default:H=[19500,19e3,18500,18e3,17500,16500,15500,14500,12500,9500,3950],0<=e.VBR_q&&e.VBR_q<=9?(N=H[e.VBR_q],D=H[e.VBR_q+1],X=e.VBR_q_frac,M=linear_int(N,D,X)):M=19500}e.mode!=MPEGMode.MONO||e.VBR!=r.vbr_off&&e.VBR!=r.vbr_abr||(M*=1.5),e.lowpassfreq=0|M}if(0==e.out_samplerate&&(2*e.lowpassfreq>e.in_samplerate&&(e.lowpassfreq=e.in_samplerate/2),e.out_samplerate=(i=0|e.lowpassfreq,c=44100,(l=e.in_samplerate)>=48e3?c=48e3:l>=44100?c=44100:l>=32e3?c=32e3:l>=24e3?c=24e3:l>=22050?c=22050:l>=16e3?c=16e3:l>=12e3?c=12e3:l>=11025?c=11025:l>=8e3&&(c=8e3),-1==i?c:(i<=15960&&(c=44100),i<=15250&&(c=32e3),i<=11220&&(c=24e3),i<=9970&&(c=22050),i<=7230&&(c=16e3),i<=5420&&(c=12e3),i<=4510&&(c=11025),i<=3970&&(c=8e3),l<c?l>44100?48e3:l>32e3?44100:l>24e3?32e3:l>22050?24e3:l>16e3?22050:l>12e3?16e3:l>11025?12e3:l>8e3?11025:8e3:c))),e.lowpassfreq=Math.min(20500,e.lowpassfreq),e.lowpassfreq=Math.min(e.out_samplerate/2,e.lowpassfreq),e.VBR==r.vbr_off&&(e.compression_ratio=16*e.out_samplerate*u.channels_out/(1e3*e.brate)),e.VBR==r.vbr_abr&&(e.compression_ratio=16*e.out_samplerate*u.channels_out/(1e3*e.VBR_mean_bitrate_kbps)),e.bWriteVbrTag||(e.findReplayGain=!1,e.decode_on_the_fly=!1,u.findPeakSample=!1),u.findReplayGain=e.findReplayGain,u.decode_on_the_fly=e.decode_on_the_fly,u.decode_on_the_fly&&(u.findPeakSample=!0),u.findReplayGain&&t.InitGainAnalysis(u.rgdata,e.out_samplerate)==GainAnalysis.INIT_GAIN_ANALYSIS_ERROR)return e.internal_flags=null,-6;switch(u.decode_on_the_fly&&!e.decode_only&&(null!=u.hip&&B.hip_decode_exit(u.hip),u.hip=B.hip_decode_init()),u.mode_gr=e.out_samplerate<=24e3?1:2,e.framesize=576*u.mode_gr,e.encoder_delay=g.ENCDELAY,u.resample_ratio=e.in_samplerate/e.out_samplerate,e.VBR){case r.vbr_mt:case r.vbr_rh:case r.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 r.vbr_abr:e.compression_ratio=16*e.out_samplerate*u.channels_out/(1e3*e.VBR_mean_bitrate_kbps);break;default:e.compression_ratio=16*e.out_samplerate*u.channels_out/(1e3*e.brate)}if(e.mode==MPEGMode.NOT_SET&&(e.mode=MPEGMode.JOINT_STEREO),e.highpassfreq>0?(u.highpass1=2*e.highpassfreq,e.highpasswidth>=0?u.highpass2=2*(e.highpassfreq+e.highpasswidth):u.highpass2=2*e.highpassfreq,u.highpass1/=e.out_samplerate,u.highpass2/=e.out_samplerate):(u.highpass1=0,u.highpass2=0),e.lowpassfreq>0?(u.lowpass2=2*e.lowpassfreq,e.lowpasswidth>=0?(u.lowpass1=2*(e.lowpassfreq-e.lowpasswidth),u.lowpass1<0&&(u.lowpass1=0)):u.lowpass1=2*e.lowpassfreq,u.lowpass1/=e.out_samplerate,u.lowpass2/=e.out_samplerate):(u.lowpass1=0,u.lowpass2=0),function(e){var t=e.internal_flags,a=32,s=-1;if(t.lowpass1>0){for(var r=999,_=0;_<=31;_++)(f=_/31)>=t.lowpass2&&(a=Math.min(a,_)),t.lowpass1<f&&f<t.lowpass2&&(r=Math.min(r,_));t.lowpass1=999==r?(a-.75)/31:(r-.75)/31,t.lowpass2=a/31}if(t.highpass2>0&&t.highpass2<.75/31*.9&&(t.highpass1=0,t.highpass2=0,n.err.println("Warning: highpass filter disabled.  highpass frequency too small\n")),t.highpass2>0){var i=-1;for(_=0;_<=31;_++)(f=_/31)<=t.highpass1&&(s=Math.max(s,_)),t.highpass1<f&&f<t.highpass2&&(i=Math.max(i,_));t.highpass1=s/31,t.highpass2=-1==i?(s+.75)/31:(i+.75)/31}for(_=0;_<32;_++){var o,l,f=_/31;o=t.highpass2>t.highpass1?P((t.highpass2-f)/(t.highpass2-t.highpass1+1e-20)):1,l=t.lowpass2>t.lowpass1?P((f-t.lowpass1)/(t.lowpass2-t.lowpass1+1e-20)):1,t.amp_filter[_]=o*l}}(e),u.samplerate_index=I(e.out_samplerate,e),u.samplerate_index<0)return e.internal_flags=null,-1;if(e.VBR==r.vbr_off){if(e.free_format)u.bitrate_index=0;else if(e.brate=L(e.brate,e.version,e.out_samplerate),u.bitrate_index=O(e.brate,e.version,e.out_samplerate),u.bitrate_index<=0)return e.internal_flags=null,-1}else u.bitrate_index=1;e.analysis&&(e.bWriteVbrTag=!1),null!=u.pinfo&&(e.bWriteVbrTag=!1),a.init_bit_stream_w(u);for(var C,F=u.samplerate_index+3*e.version+6*(e.out_samplerate<16e3?1:0),Y=0;Y<g.SBMAX_l+1;Y++)u.scalefac_band.l[Y]=S.sfBandIndex[F].l[Y];for(Y=0;Y<g.PSFB21+1;Y++){var q=(u.scalefac_band.l[22]-u.scalefac_band.l[21])/g.PSFB21,G=u.scalefac_band.l[21]+Y*q;u.scalefac_band.psfb21[Y]=G}for(u.scalefac_band.psfb21[g.PSFB21]=576,Y=0;Y<g.SBMAX_s+1;Y++)u.scalefac_band.s[Y]=S.sfBandIndex[F].s[Y];for(Y=0;Y<g.PSFB12+1;Y++)q=(u.scalefac_band.s[13]-u.scalefac_band.s[12])/g.PSFB12,G=u.scalefac_band.s[12]+Y*q,u.scalefac_band.psfb12[Y]=G;for(u.scalefac_band.psfb12[g.PSFB12]=192,1==e.version?u.sideinfo_len=1==u.channels_out?21:36:u.sideinfo_len=1==u.channels_out?13:21,e.error_protection&&(u.sideinfo_len+=2),function(e){var t=e.internal_flags;e.frameNum=0,e.write_id3tag_automatic&&A.id3tag_write_v2(e),t.bitrate_stereoMode_Hist=o([16,5]),t.bitrate_blockType_Hist=o([16,6]),t.PeakSample=0,e.bWriteVbrTag&&R.InitVbrTag(e)}(e),u.Class_ID=x,C=0;C<19;C++)u.nsPsy.pefirbuf[C]=700*u.mode_gr*u.channels_out;switch(-1==e.ATHtype&&(e.ATHtype=4),f(e.VBR_q<=9),f(e.VBR_q>=0),e.VBR){case r.vbr_mt:e.VBR=r.vbr_mtrh;case r.vbr_mtrh:null==e.useTemporal&&(e.useTemporal=!1),s.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),u.PSY.mask_adjust=e.maskingadjust,u.PSY.mask_adjust_short=e.maskingadjust_short,e.experimentalY?u.sfb21_extra=!1:u.sfb21_extra=e.out_samplerate>44e3,u.iteration_loop=new VBRNewIterationLoop(w);break;case r.vbr_rh:s.apply_preset(e,500-10*e.VBR_q,0),u.PSY.mask_adjust=e.maskingadjust,u.PSY.mask_adjust_short=e.maskingadjust_short,e.experimentalY?u.sfb21_extra=!1:u.sfb21_extra=e.out_samplerate>44e3,e.quality>6&&(e.quality=6),e.quality<0&&(e.quality=LAME_DEFAULT_QUALITY),u.iteration_loop=new VBROldIterationLoop(w);break;default:var j;u.sfb21_extra=!1,e.quality<0&&(e.quality=LAME_DEFAULT_QUALITY),(j=e.VBR)==r.vbr_off&&(e.VBR_mean_bitrate_kbps=e.brate),s.apply_preset(e,e.VBR_mean_bitrate_kbps,0),e.VBR=j,u.PSY.mask_adjust=e.maskingadjust,u.PSY.mask_adjust_short=e.maskingadjust_short,j==r.vbr_off?u.iteration_loop=new p(w):u.iteration_loop=new ABRIterationLoop(w)}if(f(e.scale>=0),e.VBR!=r.vbr_off){if(u.VBR_min_bitrate=1,u.VBR_max_bitrate=14,e.out_samplerate<16e3&&(u.VBR_max_bitrate=8),0!=e.VBR_min_bitrate_kbps&&(e.VBR_min_bitrate_kbps=L(e.VBR_min_bitrate_kbps,e.version,e.out_samplerate),u.VBR_min_bitrate=O(e.VBR_min_bitrate_kbps,e.version,e.out_samplerate),u.VBR_min_bitrate<0))return-1;if(0!=e.VBR_max_bitrate_kbps&&(e.VBR_max_bitrate_kbps=L(e.VBR_max_bitrate_kbps,e.version,e.out_samplerate),u.VBR_max_bitrate=O(e.VBR_max_bitrate_kbps,e.version,e.out_samplerate),u.VBR_max_bitrate<0))return-1;e.VBR_min_bitrate_kbps=v.bitrate_table[e.version][u.VBR_min_bitrate],e.VBR_max_bitrate_kbps=v.bitrate_table[e.version][u.VBR_max_bitrate],e.VBR_mean_bitrate_kbps=Math.min(v.bitrate_table[e.version][u.VBR_max_bitrate],e.VBR_mean_bitrate_kbps),e.VBR_mean_bitrate_kbps=Math.max(v.bitrate_table[e.version][u.VBR_min_bitrate],e.VBR_mean_bitrate_kbps)}return e.tune&&(u.PSY.mask_adjust+=e.tune_value_a,u.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),f(e.scale>=0),e.athaa_type<0?u.ATH.useAdjust=3:u.ATH.useAdjust=e.athaa_type,u.ATH.aaSensitivityP=Math.pow(10,e.athaa_sensitivity/-10),null==e.short_blocks&&(e.short_blocks=_.short_block_allowed),e.short_blocks!=_.short_block_allowed||e.mode!=MPEGMode.JOINT_STEREO&&e.mode!=MPEGMode.STEREO||(e.short_blocks=_.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=h.NSATTACKTHRE),e.internal_flags.nsPsy.attackthre_s<0&&(e.internal_flags.nsPsy.attackthre_s=h.NSATTACKTHRE_S),f(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),u.slot_lag=u.frac_SpF=0,e.VBR==r.vbr_off&&(u.slot_lag=u.frac_SpF=72e3*(e.version+1)*e.brate%e.out_samplerate|0),S.iteration_init(e),y.psymodel_init(e),f(e.scale>=0),0},this.lame_encode_flush=function(e,t,s,n){var r,_,i,o,f=e.internal_flags,h=l([2,1152]),c=0,u=f.mf_samples_to_encode-g.POSTDELAY,b=H(e);if(f.mf_samples_to_encode<1)return 0;for(r=0,e.in_samplerate!=e.out_samplerate&&(u+=16*e.out_samplerate/e.in_samplerate),(i=e.framesize-u%e.framesize)<576&&(i+=e.framesize),e.encoder_padding=i,o=(u+i)/e.framesize;o>0&&c>=0;){var m=b-f.mf_size,p=e.frameNum;m*=e.in_samplerate,(m/=e.out_samplerate)>1152&&(m=1152),m<1&&(m=1),_=n-r,0==n&&(_=0),s+=c=this.lame_encode_buffer(e,h[0],h[1],m,t,s,_),r+=c,o-=p!=e.frameNum?1:0}if(f.mf_samples_to_encode=0,c<0)return c;if(_=n-r,0==n&&(_=0),a.flush_bitstream(e),(c=a.copy_buffer(f,t,s,_,1))<0)return c;if(s+=c,_=n-(r+=c),0==n&&(_=0),e.write_id3tag_automatic){if(A.id3tag_write_v1(e),(c=a.copy_buffer(f,t,s,_,0))<0)return c;r+=c}return r},this.lame_encode_buffer=function(e,s,n,r,_,o,l){var h=e.internal_flags,c=[null,null];if(h.Class_ID!=x)return-3;if(0==r)return 0;!function(e,t){(null==e.in_buffer_0||e.in_buffer_nsamples<t)&&(e.in_buffer_0=i(t),e.in_buffer_1=i(t),e.in_buffer_nsamples=t)}(h,r),c[0]=h.in_buffer_0,c[1]=h.in_buffer_1;for(var b=0;b<r;b++)c[0][b]=s[b],h.channels_in>1&&(c[1][b]=n[b]);return function(e,s,n,r,_,i,o){var l,h,c,b,m,p=e.internal_flags,v=0,S=[null,null],w=[null,null];if(p.Class_ID!=x)return-3;if(0==r)return 0;if((m=a.copy_buffer(p,_,i,o,0))<0)return m;if(i+=m,v+=m,w[0]=s,w[1]=n,d.NEQ(e.scale,0)&&d.NEQ(e.scale,1))for(h=0;h<r;++h)w[0][h]*=e.scale,2==p.channels_out&&(w[1][h]*=e.scale);if(d.NEQ(e.scale_left,0)&&d.NEQ(e.scale_left,1))for(h=0;h<r;++h)w[0][h]*=e.scale_left;if(d.NEQ(e.scale_right,0)&&d.NEQ(e.scale_right,1))for(h=0;h<r;++h)w[1][h]*=e.scale_right;if(2==e.num_channels&&1==p.channels_out)for(h=0;h<r;++h)w[0][h]=.5*(w[0][h]+w[1][h]),w[1][h]=0;b=H(e),S[0]=p.mfbuf[0],S[1]=p.mfbuf[1];for(var M=0;r>0;){var R,A,B=[null,null];B[0]=w[0],B[1]=w[1];var y=new D;if(q(e,S,B,M,r,y),R=y.n_in,A=y.n_out,p.findReplayGain&&!p.decode_on_the_fly&&t.AnalyzeSamples(p.rgdata,S[0],p.mf_size,S[1],p.mf_size,A,p.channels_out)==GainAnalysis.GAIN_ANALYSIS_ERROR)return-6;if(r-=R,M+=R,p.channels_out,p.mf_size+=A,f(p.mf_size<=u.MFSIZE),p.mf_samples_to_encode<1&&(p.mf_samples_to_encode=g.ENCDELAY+g.POSTDELAY),p.mf_samples_to_encode+=A,p.mf_size>=b){var E=o-v;if(0==o&&(E=0),(l=N(e,S[0],S[1],_,i,E))<0)return l;for(i+=l,v+=l,p.mf_size-=e.framesize,p.mf_samples_to_encode-=e.framesize,c=0;c<p.channels_out;c++)for(h=0;h<p.mf_size;h++)S[c][h]=S[c][h+e.framesize]}}return f(0==r),v}(e,c[0],c[1],r,_,o,l)}}},893:(e,t,a)=>{var s=a(231);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=s.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}},998:(e,t,a)=>{var s=a(38),n=(s.System,s.VbrMode,s.Float,s.ShortBlock,s.Util,s.Arrays,s.new_array_n,s.new_byte),r=s.new_double,_=s.new_float,i=s.new_float_n,o=s.new_int,l=s.new_int_n,f=(s.assert,a(524)),h=a(302),c=a(885),u=a(362),b=a(200),m=a(687),p=a(354);function d(){function e(){this.write_timing=0,this.ptr=0,this.buf=n(40)}this.Class_ID=0,this.lame_encode_frame_init=0,this.iteration_init_init=0,this.fill_buffer_resample_init=0,this.mfbuf=i([2,d.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 f,this.ms_ratio=_(2),this.padding=0,this.frac_SpF=0,this.slot_lag=0,this.tag_spec=null,this.nMusicCRC=0,this.OldValue=o(2),this.CurrentStep=o(2),this.masking_lower=0,this.bv_scf=o(576),this.pseudohalf=o(p.SFBMAX),this.sfb21_extra=!1,this.inbuf_old=new Array(2),this.blackfilt=new Array(2*d.BPC+1),this.itime=r(2),this.sideinfo_len=0,this.sb_sample=i([2,2,18,m.SBLIMIT]),this.amp_filter=_(32),this.header=new Array(d.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 h,this.minval_l=_(m.CBANDS),this.minval_s=_(m.CBANDS),this.nb_1=i([4,m.CBANDS]),this.nb_2=i([4,m.CBANDS]),this.nb_s1=i([4,m.CBANDS]),this.nb_s2=i([4,m.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=_(4),this.loudness_sq=i([2,2]),this.loudness_sq_save=_(2),this.mld_l=_(m.SBMAX_l),this.mld_s=_(m.SBMAX_s),this.bm_l=o(m.SBMAX_l),this.bo_l=o(m.SBMAX_l),this.bm_s=o(m.SBMAX_s),this.bo_s=o(m.SBMAX_s),this.npart_l=0,this.npart_s=0,this.s3ind=l([m.CBANDS,2]),this.s3ind_s=l([m.CBANDS,2]),this.numlines_s=o(m.CBANDS),this.numlines_l=o(m.CBANDS),this.rnumlines_l=_(m.CBANDS),this.mld_cb_l=_(m.CBANDS),this.mld_cb_s=_(m.CBANDS),this.numlines_s_num1=0,this.numlines_l_num1=0,this.pe=_(4),this.ms_ratio_s_old=0,this.ms_ratio_l_old=0,this.ms_ener_ratio_old=0,this.blocktype_old=o(2),this.nsPsy=new c,this.VBR_seek_table=new u,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=l([16,5]),this.bitrate_blockType_Hist=l([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 t=0;t<this.en.length;t++)this.en[t]=new b;for(t=0;t<this.thm.length;t++)this.thm[t]=new b;for(t=0;t<this.header.length;t++)this.header[t]=new e}d.MFSIZE=3456+m.ENCDELAY-m.MDCTDELAY,d.MAX_HEADER_BUF=256,d.MAX_BITS_PER_CHANNEL=4095,d.MAX_BITS_PER_GRANULE=7680,d.BPC=320,e.exports=d},231:e=>{function t(e){var t=e;this.ordinal=function(){return t}}t.STEREO=new t(0),t.JOINT_STEREO=new t(1),t.DUAL_CHANNEL=new t(2),t.MONO=new t(3),t.NOT_SET=new t(4),e.exports=t},134:e=>{e.exports=function(e){this.bits=e}},143:(e,t,a)=>{var s=a(38),n=s.System,r=(s.VbrMode,s.Float,s.ShortBlock,s.Util),_=s.Arrays,i=(s.new_array_n,s.new_byte,s.new_double,s.new_float),o=(s.new_float_n,s.new_int,s.new_int_n,s.assert,a(687));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*r.SQRT2*.5/2384e-9,.017876148*r.SQRT2*.5/2384e-9,.003134727*r.SQRT2*.5/2384e-9,.002457142*r.SQRT2*.5/2384e-9,971317e-9*r.SQRT2*.5/2384e-9,218868e-9*r.SQRT2*.5/2384e-9,101566e-9*r.SQRT2*.5/2384e-9,13828e-9*r.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]],a=t[o.SHORT_TYPE],s=t[o.SHORT_TYPE],l=t[o.SHORT_TYPE],f=t[o.SHORT_TYPE],h=[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 c(t,a,s){for(var n,_,i,o=10,l=a+238-14-286,f=-15;f<0;f++){var h,c,u;h=e[o+-10],c=t[l+-224]*h,u=t[a+224]*h,h=e[o+-9],c+=t[l+-160]*h,u+=t[a+160]*h,h=e[o+-8],c+=t[l+-96]*h,u+=t[a+96]*h,h=e[o+-7],c+=t[l+-32]*h,u+=t[a+32]*h,h=e[o+-6],c+=t[l+32]*h,u+=t[a+-32]*h,h=e[o+-5],c+=t[l+96]*h,u+=t[a+-96]*h,h=e[o+-4],c+=t[l+160]*h,u+=t[a+-160]*h,h=e[o+-3],c+=t[l+224]*h,u+=t[a+-224]*h,h=e[o+-2],c+=t[a+-256]*h,u-=t[l+256]*h,h=e[o+-1],c+=t[a+-192]*h,u-=t[l+192]*h,h=e[o+0],c+=t[a+-128]*h,u-=t[l+128]*h,h=e[o+1],c+=t[a+-64]*h,u-=t[l+64]*h,h=e[o+2],c+=t[a+0]*h,u-=t[l+0]*h,h=e[o+3],c+=t[a+64]*h,u-=t[l+-64]*h,h=e[o+4],c+=t[a+128]*h,u-=t[l+-128]*h,h=e[o+5],c+=t[a+192]*h,h=(u-=t[l+-192]*h)-(c*=e[o+6]),s[30+2*f]=u+c,s[31+2*f]=e[o+7]*h,o+=18,a--,l++}u=t[a+-16]*e[o+-10],c=t[a+-32]*e[o+-2],u+=(t[a+-48]-t[a+16])*e[o+-9],c+=t[a+-96]*e[o+-1],u+=(t[a+-80]+t[a+48])*e[o+-8],c+=t[a+-160]*e[o+0],u+=(t[a+-112]-t[a+80])*e[o+-7],c+=t[a+-224]*e[o+1],u+=(t[a+-144]+t[a+112])*e[o+-6],c-=t[a+32]*e[o+2],u+=(t[a+-176]-t[a+144])*e[o+-5],c-=t[a+96]*e[o+3],u+=(t[a+-208]+t[a+176])*e[o+-4],c-=t[a+160]*e[o+4],u+=(t[a+-240]-t[a+208])*e[o+-3],n=(c-=t[a+224])-u,_=c+u,u=s[14],c=s[15]-u,s[31]=_+u,s[30]=n+c,s[15]=n-c,s[14]=_-u,i=s[28]-s[0],s[0]+=s[28],s[28]=i*e[o+-36+7],i=s[29]-s[1],s[1]+=s[29],s[29]=i*e[o+-36+7],i=s[26]-s[2],s[2]+=s[26],s[26]=i*e[o+-72+7],i=s[27]-s[3],s[3]+=s[27],s[27]=i*e[o+-72+7],i=s[24]-s[4],s[4]+=s[24],s[24]=i*e[o+-108+7],i=s[25]-s[5],s[5]+=s[25],s[25]=i*e[o+-108+7],i=s[22]-s[6],s[6]+=s[22],s[22]=i*r.SQRT2,i=s[23]-s[7],s[7]+=s[23],s[23]=i*r.SQRT2-s[7],s[7]-=s[6],s[22]-=s[7],s[23]-=s[22],i=s[6],s[6]=s[31]-i,s[31]=s[31]+i,i=s[7],s[7]=s[30]-i,s[30]=s[30]+i,i=s[22],s[22]=s[15]-i,s[15]=s[15]+i,i=s[23],s[23]=s[14]-i,s[14]=s[14]+i,i=s[20]-s[8],s[8]+=s[20],s[20]=i*e[o+-180+7],i=s[21]-s[9],s[9]+=s[21],s[21]=i*e[o+-180+7],i=s[18]-s[10],s[10]+=s[18],s[18]=i*e[o+-216+7],i=s[19]-s[11],s[11]+=s[19],s[19]=i*e[o+-216+7],i=s[16]-s[12],s[12]+=s[16],s[16]=i*e[o+-252+7],i=s[17]-s[13],s[13]+=s[17],s[17]=i*e[o+-252+7],i=-s[20]+s[24],s[20]+=s[24],s[24]=i*e[o+-216+7],i=-s[21]+s[25],s[21]+=s[25],s[25]=i*e[o+-216+7],i=s[4]-s[8],s[4]+=s[8],s[8]=i*e[o+-216+7],i=s[5]-s[9],s[5]+=s[9],s[9]=i*e[o+-216+7],i=s[0]-s[12],s[0]+=s[12],s[12]=i*e[o+-72+7],i=s[1]-s[13],s[1]+=s[13],s[13]=i*e[o+-72+7],i=s[16]-s[28],s[16]+=s[28],s[28]=i*e[o+-72+7],i=-s[17]+s[29],s[17]+=s[29],s[29]=i*e[o+-72+7],i=r.SQRT2*(s[2]-s[10]),s[2]+=s[10],s[10]=i,i=r.SQRT2*(s[3]-s[11]),s[3]+=s[11],s[11]=i,i=r.SQRT2*(-s[18]+s[26]),s[18]+=s[26],s[26]=i-s[18],i=r.SQRT2*(-s[19]+s[27]),s[19]+=s[27],s[27]=i-s[19],i=s[2],s[19]-=s[3],s[3]-=i,s[2]=s[31]-i,s[31]+=i,i=s[3],s[11]-=s[19],s[18]-=i,s[3]=s[30]-i,s[30]+=i,i=s[18],s[27]-=s[11],s[19]-=i,s[18]=s[15]-i,s[15]+=i,i=s[19],s[10]-=i,s[19]=s[14]-i,s[14]+=i,i=s[10],s[11]-=i,s[10]=s[23]-i,s[23]+=i,i=s[11],s[26]-=i,s[11]=s[22]-i,s[22]+=i,i=s[26],s[27]-=i,s[26]=s[7]-i,s[7]+=i,i=s[27],s[27]=s[6]-i,s[6]+=i,i=r.SQRT2*(s[0]-s[4]),s[0]+=s[4],s[4]=i,i=r.SQRT2*(s[1]-s[5]),s[1]+=s[5],s[5]=i,i=r.SQRT2*(s[16]-s[20]),s[16]+=s[20],s[20]=i,i=r.SQRT2*(s[17]-s[21]),s[17]+=s[21],s[21]=i,i=-r.SQRT2*(s[8]-s[12]),s[8]+=s[12],s[12]=i-s[8],i=-r.SQRT2*(s[9]-s[13]),s[9]+=s[13],s[13]=i-s[9],i=-r.SQRT2*(s[25]-s[29]),s[25]+=s[29],s[29]=i-s[25],i=-r.SQRT2*(s[24]+s[28]),s[24]-=s[28],s[28]=i-s[24],i=s[24]-s[16],s[24]=i,i=s[20]-i,s[20]=i,i=s[28]-i,s[28]=i,i=s[25]-s[17],s[25]=i,i=s[21]-i,s[21]=i,i=s[29]-i,s[29]=i,i=s[17]-s[1],s[17]=i,i=s[9]-i,s[9]=i,i=s[25]-i,s[25]=i,i=s[5]-i,s[5]=i,i=s[21]-i,s[21]=i,i=s[13]-i,s[13]=i,i=s[29]-i,s[29]=i,i=s[1]-s[0],s[1]=i,i=s[16]-i,s[16]=i,i=s[17]-i,s[17]=i,i=s[8]-i,s[8]=i,i=s[9]-i,s[9]=i,i=s[24]-i,s[24]=i,i=s[25]-i,s[25]=i,i=s[4]-i,s[4]=i,i=s[5]-i,s[5]=i,i=s[20]-i,s[20]=i,i=s[21]-i,s[21]=i,i=s[12]-i,s[12]=i,i=s[13]-i,s[13]=i,i=s[28]-i,s[28]=i,i=s[29]-i,s[29]=i,i=s[0],s[0]+=s[31],s[31]-=i,i=s[1],s[1]+=s[30],s[30]-=i,i=s[16],s[16]+=s[15],s[15]-=i,i=s[17],s[17]+=s[14],s[14]-=i,i=s[8],s[8]+=s[23],s[23]-=i,i=s[9],s[9]+=s[22],s[22]-=i,i=s[24],s[24]+=s[7],s[7]-=i,i=s[25],s[25]+=s[6],s[6]-=i,i=s[4],s[4]+=s[27],s[27]-=i,i=s[5],s[5]+=s[26],s[26]-=i,i=s[20],s[20]+=s[11],s[11]-=i,i=s[21],s[21]+=s[10],s[10]-=i,i=s[12],s[12]+=s[19],s[19]-=i,i=s[13],s[13]+=s[18],s[18]-=i,i=s[28],s[28]+=s[3],s[3]-=i,i=s[29],s[29]+=s[2],s[2]-=i}function u(e,a){for(var s=0;s<3;s++){var n,r,_,i,l,f;r=(i=e[a+6]*t[o.SHORT_TYPE][0]-e[a+15])+(n=e[a+0]*t[o.SHORT_TYPE][2]-e[a+9]),_=i-n,l=(i=e[a+15]*t[o.SHORT_TYPE][0]+e[a+6])+(n=e[a+9]*t[o.SHORT_TYPE][2]+e[a+0]),f=-i+n,n=2069978111953089e-26*(e[a+3]*t[o.SHORT_TYPE][1]-e[a+12]),i=2069978111953089e-26*(e[a+12]*t[o.SHORT_TYPE][1]+e[a+3]),e[a+0]=190752519173728e-25*r+n,e[a+15]=190752519173728e-25*-l+i,_=.8660254037844387*_*1907525191737281e-26,l=.5*l*1907525191737281e-26+i,e[a+3]=_-l,e[a+6]=_+l,r=.5*r*1907525191737281e-26-n,f=.8660254037844387*f*1907525191737281e-26,e[a+9]=r+f,e[a+12]=r-f,a++}}this.mdct_sub48=function(e,r,b){for(var m,p,d,v,g,S,w,M,R,A,B,y,E,T,k,x,P,I,L,O,V,H=r,N=286,D=0;D<e.channels_out;D++){for(var X=0;X<e.mode_gr;X++){for(var C,F=e.l3_side.tt[X][D],Y=F.xr,q=0,G=e.sb_sample[D][1-X],j=0,U=0;U<9;U++)for(c(H,N,G[j]),c(H,N+32,G[j+1]),j+=2,N+=64,C=1;C<32;C+=2)G[j-1][C]*=-1;for(C=0;C<32;C++,q+=18){var z=F.block_type,Z=e.sb_sample[D][X],K=e.sb_sample[D][1-X];if(0!=F.mixed_block_flag&&C<2&&(z=0),e.amp_filter[C]<1e-12)_.fill(Y,q+0,q+18,0);else{if(e.amp_filter[C]<1)for(U=0;U<18;U++)K[U][h[C]]*=e.amp_filter[C];if(z==o.SHORT_TYPE){for(U=-3;U<0;U++){var Q=t[o.SHORT_TYPE][U+3];Y[q+3*U+9]=Z[9+U][h[C]]*Q-Z[8-U][h[C]],Y[q+3*U+18]=Z[14-U][h[C]]*Q+Z[15+U][h[C]],Y[q+3*U+10]=Z[15+U][h[C]]*Q-Z[14-U][h[C]],Y[q+3*U+19]=K[2-U][h[C]]*Q+K[3+U][h[C]],Y[q+3*U+11]=K[3+U][h[C]]*Q-K[2-U][h[C]],Y[q+3*U+20]=K[8-U][h[C]]*Q+K[9+U][h[C]]}u(Y,q)}else{var W=i(18);for(U=-9;U<0;U++){var J,$;J=t[z][U+27]*K[U+9][h[C]]+t[z][U+36]*K[8-U][h[C]],$=t[z][U+9]*Z[U+9][h[C]]-t[z][U+18]*Z[8-U][h[C]],W[U+9]=J-$*a[3+U+9],W[U+18]=J*a[3+U+9]+$}m=Y,p=q,v=void 0,g=void 0,void 0,void 0,void 0,void 0,void 0,B=void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,L=void 0,void 0,void 0,S=(d=W)[17]-d[9],M=d[15]-d[11],R=d[14]-d[12],A=d[0]+d[8],B=d[1]+d[7],y=d[2]+d[6],E=d[3]+d[5],m[p+17]=A+y-E-(B-d[4]),g=(A+y-E)*s[19]+(B-d[4]),v=(S-M-R)*s[18],m[p+5]=v+g,m[p+6]=v-g,w=(d[16]-d[10])*s[18],B=B*s[19]+d[4],v=S*s[12]+w+M*s[13]+R*s[14],g=-A*s[16]+B-y*s[17]+E*s[15],m[p+1]=v+g,m[p+2]=v-g,v=S*s[13]-w-M*s[14]+R*s[12],g=-A*s[17]+B-y*s[15]+E*s[16],m[p+9]=v+g,m[p+10]=v-g,v=S*s[14]-w+M*s[12]-R*s[13],g=A*s[15]-B+y*s[16]-E*s[17],m[p+13]=v+g,m[p+14]=v-g,T=d[8]-d[0],x=d[6]-d[2],P=d[5]-d[3],I=d[17]+d[9],L=d[16]+d[10],O=d[15]+d[11],V=d[14]+d[12],m[p+0]=I+O+V+(L+d[13]),v=(I+O+V)*s[19]-(L+d[13]),g=(T-x+P)*s[18],m[p+11]=v+g,m[p+12]=v-g,k=(d[7]-d[1])*s[18],L=d[13]-L*s[19],v=I*s[15]-L+O*s[16]+V*s[17],g=T*s[14]+k+x*s[12]+P*s[13],m[p+3]=v+g,m[p+4]=v-g,v=-I*s[17]+L-O*s[15]-V*s[16],g=T*s[13]+k-x*s[14]-P*s[12],m[p+7]=v+g,m[p+8]=v-g,v=-I*s[16]+L-O*s[17]-V*s[15],g=T*s[12]-k+x*s[13]-P*s[14],m[p+15]=v+g,m[p+16]=v-g}}if(z!=o.SHORT_TYPE&&0!=C)for(U=7;U>=0;--U){var ee,te;ee=Y[q+U]*l[20+U]+Y[q+-1-U]*f[28+U],te=Y[q+U]*f[28+U]-Y[q+-1-U]*l[20+U],Y[q+-1-U]=ee,Y[q+U]=te}}}if(H=b,N=286,1==e.mode_gr)for(var ae=0;ae<18;ae++)n.arraycopy(e.sb_sample[D][1][ae],0,e.sb_sample[D][0][ae],0,32)}}}},885:(e,t,a)=>{var s=a(38),n=(s.System,s.VbrMode,s.Float,s.ShortBlock,s.Util,s.Arrays,s.new_array_n,s.new_byte,s.new_double,s.new_float),r=s.new_float_n,_=s.new_int,i=(s.new_int_n,s.assert,a(687));e.exports=function(){this.last_en_subshort=r([4,9]),this.lastAttacks=_(4),this.pefirbuf=n(19),this.longfact=n(i.SBMAX_l),this.shortfact=n(i.SBMAX_s),this.attackthre=0,this.attackthre_s=0}},457:(e,t,a)=>{var s=a(38),n=(s.System,s.VbrMode);s.Float,s.ShortBlock,s.Util,s.Arrays,s.new_array_n,s.new_byte,s.new_double,s.new_float,s.new_float_n,s.new_int,s.new_int_n,s.assert,e.exports=function(){function e(e,t,a,s,n,r,_,i,o,l,f,h,c,u,b){this.vbr_q=e,this.quant_comp=t,this.quant_comp_s=a,this.expY=s,this.st_lrm=n,this.st_s=r,this.masking_adj=_,this.masking_adj_short=i,this.ath_lower=o,this.ath_curve=l,this.ath_sensitivity=f,this.interch=h,this.safejoint=c,this.sfb21mod=u,this.msfix=b}function t(e,t,a,s,n,r,_,i,o,l,f,h,c,u){this.quant_comp=t,this.quant_comp_s=a,this.safejoint=s,this.nsmsfix=n,this.st_lrm=r,this.st_s=_,this.nsbass=i,this.scale=o,this.masking_adj=l,this.ath_lower=f,this.ath_curve=h,this.interch=c,this.sfscale=u}var a;this.setModules=function(e){a=e};var s=[new e(0,9,9,0,5.2,125,-4.2,-6.3,4.8,1,0,0,2,21,.97),new e(1,9,9,0,5.3,125,-3.6,-5.6,4.5,1.5,0,0,2,21,1.35),new e(2,9,9,0,5.6,125,-2.2,-3.5,2.8,2,0,0,2,21,1.49),new e(3,9,9,1,5.8,130,-1.8,-2.8,2.6,3,-4,0,2,20,1.64),new e(4,9,9,1,6,135,-.7,-1.1,1.1,3.5,-8,0,2,0,1.79),new e(5,9,9,1,6.4,140,.5,.4,-7.5,4,-12,2e-4,0,0,1.95),new e(6,9,9,1,6.6,145,.67,.65,-14.7,6.5,-19,4e-4,0,0,2.3),new e(7,9,9,1,6.6,145,.8,.75,-19.7,8,-22,6e-4,0,0,2.7),new e(8,9,9,1,6.6,145,1.2,1.15,-27.5,10,-23,7e-4,0,0,0),new e(9,9,9,1,6.6,145,1.6,1.6,-36,11,-25,8e-4,0,0,0),new e(10,9,9,1,6.6,145,2,2,-36,12,-25,8e-4,0,0,0)],r=[new e(0,9,9,0,4.2,25,-7,-4,7.5,1,0,0,2,26,.97),new e(1,9,9,0,4.2,25,-5.6,-3.6,4.5,1.5,0,0,2,21,1.35),new e(2,9,9,0,4.2,25,-4.4,-1.8,2,2,0,0,2,18,1.49),new e(3,9,9,1,4.2,25,-3.4,-1.25,1.1,3,-4,0,2,15,1.64),new e(4,9,9,1,4.2,25,-2.2,.1,0,3.5,-8,0,2,0,1.79),new e(5,9,9,1,4.2,25,-1,1.65,-7.7,4,-12,2e-4,0,0,1.95),new e(6,9,9,1,4.2,25,-0,2.47,-7.7,6.5,-19,4e-4,0,0,2),new e(7,9,9,1,4.2,25,.5,2,-14.5,8,-22,6e-4,0,0,2),new e(8,9,9,1,4.2,25,1,2.4,-22,10,-23,7e-4,0,0,2),new e(9,9,9,1,4.2,25,1.5,2.95,-30,11,-25,8e-4,0,0,2),new e(10,9,9,1,4.2,25,2,2.95,-36,12,-30,8e-4,0,0,2)];function _(e,t,a){var _=e.VBR==n.vbr_rh?s:r,i=e.VBR_q_frac,o=_[t],l=_[t+1],f=o;o.st_lrm=o.st_lrm+i*(l.st_lrm-o.st_lrm),o.st_s=o.st_s+i*(l.st_s-o.st_s),o.masking_adj=o.masking_adj+i*(l.masking_adj-o.masking_adj),o.masking_adj_short=o.masking_adj_short+i*(l.masking_adj_short-o.masking_adj_short),o.ath_lower=o.ath_lower+i*(l.ath_lower-o.ath_lower),o.ath_curve=o.ath_curve+i*(l.ath_curve-o.ath_curve),o.ath_sensitivity=o.ath_sensitivity+i*(l.ath_sensitivity-o.ath_sensitivity),o.interch=o.interch+i*(l.interch-o.interch),o.msfix=o.msfix+i*(l.msfix-o.msfix),function(e,t){0>t&&(-1,t=0),9<t&&(-1,t=9),e.VBR_q=t,e.VBR_q_frac=0}(e,f.vbr_q),0!=a?e.quant_comp=f.quant_comp:Math.abs(e.quant_comp- -1)>0||(e.quant_comp=f.quant_comp),0!=a?e.quant_comp_short=f.quant_comp_s:Math.abs(e.quant_comp_short- -1)>0||(e.quant_comp_short=f.quant_comp_s),0!=f.expY&&(e.experimentalY=0!=f.expY),0!=a?e.internal_flags.nsPsy.attackthre=f.st_lrm:Math.abs(e.internal_flags.nsPsy.attackthre- -1)>0||(e.internal_flags.nsPsy.attackthre=f.st_lrm),0!=a?e.internal_flags.nsPsy.attackthre_s=f.st_s:Math.abs(e.internal_flags.nsPsy.attackthre_s- -1)>0||(e.internal_flags.nsPsy.attackthre_s=f.st_s),0!=a?e.maskingadjust=f.masking_adj:Math.abs(e.maskingadjust-0)>0||(e.maskingadjust=f.masking_adj),0!=a?e.maskingadjust_short=f.masking_adj_short:Math.abs(e.maskingadjust_short-0)>0||(e.maskingadjust_short=f.masking_adj_short),0!=a?e.ATHlower=-f.ath_lower/10:Math.abs(10*-e.ATHlower-0)>0||(e.ATHlower=-f.ath_lower/10),0!=a?e.ATHcurve=f.ath_curve:Math.abs(e.ATHcurve- -1)>0||(e.ATHcurve=f.ath_curve),0!=a?e.athaa_sensitivity=f.ath_sensitivity:Math.abs(e.athaa_sensitivity- -1)>0||(e.athaa_sensitivity=f.ath_sensitivity),f.interch>0&&(0!=a?e.interChRatio=f.interch:Math.abs(e.interChRatio- -1)>0||(e.interChRatio=f.interch)),f.safejoint>0&&(e.exp_nspsytune=e.exp_nspsytune|f.safejoint),f.sfb21mod>0&&(e.exp_nspsytune=e.exp_nspsytune|f.sfb21mod<<20),0!=a?e.msfix=f.msfix:Math.abs(e.msfix- -1)>0||(e.msfix=f.msfix),0==a&&(e.VBR_q=t,e.VBR_q_frac=i)}var i=[new t(8,9,9,0,0,6.6,145,0,.95,0,-30,11,.0012,1),new t(16,9,9,0,0,6.6,145,0,.95,0,-25,11,.001,1),new t(24,9,9,0,0,6.6,145,0,.95,0,-20,11,.001,1),new t(32,9,9,0,0,6.6,145,0,.95,0,-15,11,.001,1),new t(40,9,9,0,0,6.6,145,0,.95,0,-10,11,9e-4,1),new t(48,9,9,0,0,6.6,145,0,.95,0,-10,11,9e-4,1),new t(56,9,9,0,0,6.6,145,0,.95,0,-6,11,8e-4,1),new t(64,9,9,0,0,6.6,145,0,.95,0,-2,11,8e-4,1),new t(80,9,9,0,0,6.6,145,0,.95,0,0,8,7e-4,1),new t(96,9,9,0,2.5,6.6,145,0,.95,0,1,5.5,6e-4,1),new t(112,9,9,0,2.25,6.6,145,0,.95,0,2,4.5,5e-4,1),new t(128,9,9,0,1.95,6.4,140,0,.95,0,3,4,2e-4,1),new t(160,9,9,1,1.79,6,135,0,.95,-2,5,3.5,0,1),new t(192,9,9,1,1.49,5.6,125,0,.97,-4,7,3,0,0),new t(224,9,9,1,1.25,5.2,125,0,.98,-6,9,2,0,0),new t(256,9,9,1,.97,5.2,125,0,1,-8,10,1,0,0),new t(320,9,9,1,.9,5.2,125,0,1,-10,12,0,0,0)];function o(e,t,s){var r=t,_=a.nearestBitrateFullIndex(t);if(e.VBR=n.vbr_abr,e.VBR_mean_bitrate_kbps=r,e.VBR_mean_bitrate_kbps=Math.min(e.VBR_mean_bitrate_kbps,320),e.VBR_mean_bitrate_kbps=Math.max(e.VBR_mean_bitrate_kbps,8),e.brate=e.VBR_mean_bitrate_kbps,e.VBR_mean_bitrate_kbps>320&&(e.disable_reservoir=!0),i[_].safejoint>0&&(e.exp_nspsytune=2|e.exp_nspsytune),i[_].sfscale>0&&(e.internal_flags.noise_shaping=2),Math.abs(i[_].nsbass)>0){var o=int(4*i[_].nsbass);o<0&&(o+=64),e.exp_nspsytune=e.exp_nspsytune|o<<2}return 0!=s?e.quant_comp=i[_].quant_comp:Math.abs(e.quant_comp- -1)>0||(e.quant_comp=i[_].quant_comp),0!=s?e.quant_comp_short=i[_].quant_comp_s:Math.abs(e.quant_comp_short- -1)>0||(e.quant_comp_short=i[_].quant_comp_s),0!=s?e.msfix=i[_].nsmsfix:Math.abs(e.msfix- -1)>0||(e.msfix=i[_].nsmsfix),0!=s?e.internal_flags.nsPsy.attackthre=i[_].st_lrm:Math.abs(e.internal_flags.nsPsy.attackthre- -1)>0||(e.internal_flags.nsPsy.attackthre=i[_].st_lrm),0!=s?e.internal_flags.nsPsy.attackthre_s=i[_].st_s:Math.abs(e.internal_flags.nsPsy.attackthre_s- -1)>0||(e.internal_flags.nsPsy.attackthre_s=i[_].st_s),0!=s?e.scale=i[_].scale:Math.abs(e.scale- -1)>0||(e.scale=i[_].scale),0!=s?e.maskingadjust=i[_].masking_adj:Math.abs(e.maskingadjust-0)>0||(e.maskingadjust=i[_].masking_adj),i[_].masking_adj>0?0!=s?e.maskingadjust_short=.9*i[_].masking_adj:Math.abs(e.maskingadjust_short-0)>0||(e.maskingadjust_short=.9*i[_].masking_adj):0!=s?e.maskingadjust_short=1.1*i[_].masking_adj:Math.abs(e.maskingadjust_short-0)>0||(e.maskingadjust_short=1.1*i[_].masking_adj),0!=s?e.ATHlower=-i[_].ath_lower/10:Math.abs(10*-e.ATHlower-0)>0||(e.ATHlower=-i[_].ath_lower/10),0!=s?e.ATHcurve=i[_].ath_curve:Math.abs(e.ATHcurve- -1)>0||(e.ATHcurve=i[_].ath_curve),0!=s?e.interChRatio=i[_].interch:Math.abs(e.interChRatio- -1)>0||(e.interChRatio=i[_].interch),t}this.apply_preset=function(e,t,a){switch(t){case Lame.R3MIX:t=Lame.V3,e.VBR=n.vbr_mtrh;break;case Lame.MEDIUM:t=Lame.V4,e.VBR=n.vbr_rh;break;case Lame.MEDIUM_FAST:t=Lame.V4,e.VBR=n.vbr_mtrh;break;case Lame.STANDARD:t=Lame.V2,e.VBR=n.vbr_rh;break;case Lame.STANDARD_FAST:t=Lame.V2,e.VBR=n.vbr_mtrh;break;case Lame.EXTREME:t=Lame.V0,e.VBR=n.vbr_rh;break;case Lame.EXTREME_FAST:t=Lame.V0,e.VBR=n.vbr_mtrh;break;case Lame.INSANE:return t=320,e.preset=t,o(e,t,a),e.VBR=n.vbr_off,t}switch(e.preset=t,t){case Lame.V9:return _(e,9,a),t;case Lame.V8:return _(e,8,a),t;case Lame.V7:return _(e,7,a),t;case Lame.V6:return _(e,6,a),t;case Lame.V5:return _(e,5,a),t;case Lame.V4:return _(e,4,a),t;case Lame.V3:return _(e,3,a),t;case Lame.V2:return _(e,2,a),t;case Lame.V1:return _(e,1,a),t;case Lame.V0:return _(e,0,a),t}return 8<=t&&t<=320?o(e,t,a):(e.preset=0,t)}}},319:(e,t,a)=>{var s=a(38),n=(s.System,s.VbrMode),r=s.Float,_=s.ShortBlock,i=s.Util,o=s.Arrays,l=(s.new_array_n,s.new_byte,s.new_double,s.new_float),f=s.new_float_n,h=s.new_int,c=(s.new_int_n,s.assert),u=a(347),b=a(687);e.exports=function(){var e=new u,t=2.302585092994046,a=1/217621504/(b.BLKSIZE/2),s=21,m=.2302585093;function p(e,t){for(var s=0,n=0;n<b.BLKSIZE/2;++n)s+=e[n]*t.ATH.eql_w[n];return s*a}function d(t,a,s,n,r,_,o,l,f,h,c){var u=t.internal_flags;if(f<2)e.fft_long(u,n[r],f,h,c),e.fft_short(u,_[o],f,h,c);else if(2==f){for(var m=b.BLKSIZE-1;m>=0;--m){var d=n[r+0][m],v=n[r+1][m];n[r+0][m]=(d+v)*i.SQRT2*.5,n[r+1][m]=(d-v)*i.SQRT2*.5}for(var g=2;g>=0;--g)for(m=b.BLKSIZE_s-1;m>=0;--m)d=_[o+0][g][m],v=_[o+1][g][m],_[o+0][g][m]=(d+v)*i.SQRT2*.5,_[o+1][g][m]=(d-v)*i.SQRT2*.5}for(a[0]=n[r+0][0],a[0]*=a[0],m=b.BLKSIZE/2-1;m>=0;--m){var S=n[r+0][b.BLKSIZE/2-m],w=n[r+0][b.BLKSIZE/2+m];a[b.BLKSIZE/2-m]=.5*(S*S+w*w)}for(g=2;g>=0;--g)for(s[g][0]=_[o+0][g][0],s[g][0]*=s[g][0],m=b.BLKSIZE_s/2-1;m>=0;--m)S=_[o+0][g][b.BLKSIZE_s/2-m],w=_[o+0][g][b.BLKSIZE_s/2+m],s[g][b.BLKSIZE_s/2-m]=.5*(S*S+w*w);var M=0;for(m=11;m<b.HBLKSIZE;m++)M+=a[m];if(u.tot_ener[f]=M,t.analysis){for(m=0;m<b.HBLKSIZE;m++)u.pinfo.energy[l][f][m]=u.pinfo.energy_save[f][m],u.pinfo.energy_save[f][m]=a[m];u.pinfo.pe[l][f]=u.pe[f]}2==t.athaa_loudapprox&&f<2&&(u.loudness_sq[l][f]=u.loudness_sq_save[f],u.loudness_sq_save[f]=p(a,u))}var v,g,S,w=[1,.79433,.63096,.63096,.63096,.63096,.63096,.25119,.11749],M=[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],R=[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],A=[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 B(e,t,a,s,n,r){var _,o,l;if(t>e){if(!(t<e*g))return e+t;_=t/e}else{if(e>=t*g)return e+t;_=e/t}if(c(e>=0),c(t>=0),e+=t,s+3<=6){if(_>=v)return e;var f=0|i.FAST_LOG10_X(_,16);return e*R[f]}return f=0|i.FAST_LOG10_X(_,16),t=0!=r?n.ATH.cb_s[a]*n.ATH.adjust:n.ATH.cb_l[a]*n.ATH.adjust,c(t>=0),e<S*t?e>t?(o=1,f<=13&&(o=A[f]),l=i.FAST_LOG10_X(e/t,10/15),e*((M[f]-o)*l+o)):f>13?e:e*A[f]:e*M[f]}var y=[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 E(e,t,a){var s;if(e<0&&(e=0),t<0&&(t=0),e<=0)return t;if(t<=0)return e;if(s=t>e?t/e:e/t,-2<=a&&a<=2){if(s>=v)return e+t;var n=0|i.FAST_LOG10_X(s,16);return(e+t)*y[n]}return s<g?e+t:(e<t&&(e=t),e)}function T(e,t,a,s,n){var r,_,i=0,o=0;for(r=_=0;r<b.SBMAX_s;++_,++r){for(var l=e.bo_s[r],f=e.npart_s,h=l<f?l:f;_<h;)c(t[_]>=0),c(a[_]>=0),i+=t[_],o+=a[_],_++;if(e.en[s].s[r][n]=i,e.thm[s].s[r][n]=o,_>=f){++r;break}c(t[_]>=0),c(a[_]>=0);var u=e.PSY.bo_s_weight[r],m=1-u;i=u*t[_],o=u*a[_],e.en[s].s[r][n]+=i,e.thm[s].s[r][n]+=o,i=m*t[_],o=m*a[_]}for(;r<b.SBMAX_s;++r)e.en[s].s[r][n]=0,e.thm[s].s[r][n]=0}function k(e,t,a,s){var n,r,_=0,i=0;for(n=r=0;n<b.SBMAX_l;++r,++n){for(var o=e.bo_l[n],l=e.npart_l,f=o<l?o:l;r<f;)c(t[r]>=0),c(a[r]>=0),_+=t[r],i+=a[r],r++;if(e.en[s].l[n]=_,e.thm[s].l[n]=i,r>=l){++n;break}c(t[r]>=0),c(a[r]>=0);var h=e.PSY.bo_l_weight[n],u=1-h;_=h*t[r],i=h*a[r],e.en[s].l[n]+=_,e.thm[s].l[n]+=i,_=u*t[r],i=u*a[r]}for(;n<b.SBMAX_l;++n)e.en[s].l[n]=0,e.thm[s].l[n]=0}function x(e,t,a,s,n,r){var _,i,o=e.internal_flags;for(i=_=0;i<o.npart_s;++i){for(var l=0,f=0,h=o.numlines_s[i],u=0;u<h;++u,++_){var m=t[r][_];l+=m,f<m&&(f=m)}a[i]=l}for(c(i==o.npart_s),c(129==_),_=i=0;i<o.npart_s;i++){var p=o.s3ind_s[i][0],d=o.s3_ss[_++]*a[p];for(++p;p<=o.s3ind_s[i][1];)d+=o.s3_ss[_]*a[p],++_,++p;var v=2*o.nb_s1[n][i];if(s[i]=Math.min(d,v),o.blocktype_old[1&n]==b.SHORT_TYPE){v=16*o.nb_s2[n][i];var g=s[i];s[i]=Math.min(v,g)}o.nb_s2[n][i]=o.nb_s1[n][i],o.nb_s1[n][i]=d,c(s[i]>=0)}for(;i<=b.CBANDS;++i)a[i]=0,s[i]=0}function P(e,t,a){return a>=1?e:a<=0?t:t>0?Math.pow(e/t,a)*t:0}var I=[11.8,13.6,17.2,32,46.5,51.3,57.5,67.1,71.5,84.6,97.6,130];function L(e,a){for(var s=309.07,n=0;n<b.SBMAX_s-1;n++)for(var r=0;r<3;r++){var _=e.thm.s[n][r];if(c(n<I.length),_>0){var o=_*a,l=e.en.s[n][r];l>o&&(l>1e10*o?s+=I[n]*(10*t):(c(o>0),s+=I[n]*i.FAST_LOG10(l/o)))}}return s}var O=[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 V(e,a){for(var s=281.0575,n=0;n<b.SBMAX_l-1;n++){var r=e.thm.l[n];if(c(n<O.length),r>0){var _=r*a,o=e.en.l[n];o>_&&(o>1e10*_?s+=O[n]*(10*t):(c(_>0),s+=O[n]*i.FAST_LOG10(o/_)))}}return s}function H(e,t,a,s,n){var r,_;for(r=_=0;r<e.npart_l;++r){var i,o=0,l=0;for(i=0;i<e.numlines_l[r];++i,++_){var f=t[_];c(f>=0),o+=f,l<f&&(l=f)}a[r]=o,s[r]=l,n[r]=o*e.rnumlines_l[r],c(e.rnumlines_l[r]>=0),c(o>=0),c(a[r]>=0),c(s[r]>=0),c(n[r]>=0)}}function N(e,t,a,s){var n=w.length-1,r=0,_=a[r]+a[r+1];for(c(_>=0),_>0?((i=t[r])<t[r+1]&&(i=t[r+1]),c(e.numlines_l[r]+e.numlines_l[r+1]-1>0),(o=0|(_=20*(2*i-_)/(_*(e.numlines_l[r]+e.numlines_l[r+1]-1))))>n&&(o=n),s[r]=o):s[r]=0,r=1;r<e.npart_l-1;r++){var i,o;_=a[r-1]+a[r]+a[r+1],c(_>=0),_>0?((i=t[r-1])<t[r]&&(i=t[r]),i<t[r+1]&&(i=t[r+1]),c(e.numlines_l[r-1]+e.numlines_l[r]+e.numlines_l[r+1]-1>0),(o=0|(_=20*(3*i-_)/(_*(e.numlines_l[r-1]+e.numlines_l[r]+e.numlines_l[r+1]-1))))>n&&(o=n),s[r]=o):s[r]=0}c(r>0),c(r==e.npart_l-1),_=a[r-1]+a[r],c(_>=0),_>0?((i=t[r-1])<t[r]&&(i=t[r]),c(e.numlines_l[r-1]+e.numlines_l[r]-1>0),(o=0|(_=20*(2*i-_)/(_*(e.numlines_l[r-1]+e.numlines_l[r]-1))))>n&&(o=n),s[r]=o):s[r]=0,c(r==e.npart_l-1)}var D=[-1730326e-23,-.01703172,-1349528e-23,.0418072,-673278e-22,-.0876324,-30835e-21,.1863476,-1104424e-22,-.627638];function X(t,a,s,n,r,_,o,l){var f=t.internal_flags;if(n<2)e.fft_long(f,o[l],n,a,s);else if(2==n)for(var h=b.BLKSIZE-1;h>=0;--h){var c=o[l+0][h],u=o[l+1][h];o[l+0][h]=(c+u)*i.SQRT2*.5,o[l+1][h]=(c-u)*i.SQRT2*.5}for(_[0]=o[l+0][0],_[0]*=_[0],h=b.BLKSIZE/2-1;h>=0;--h){var m=o[l+0][b.BLKSIZE/2-h],p=o[l+0][b.BLKSIZE/2+h];_[b.BLKSIZE/2-h]=.5*(m*m+p*p)}var d=0;for(h=11;h<b.HBLKSIZE;h++)d+=_[h];if(f.tot_ener[n]=d,t.analysis){for(h=0;h<b.HBLKSIZE;h++)f.pinfo.energy[r][n][h]=f.pinfo.energy_save[n][h],f.pinfo.energy_save[n][h]=_[h];f.pinfo.pe[r][n]=f.pe[n]}}function C(t,a,s,n,r,_,o,l){var f=t.internal_flags;if(0==r&&n<2&&e.fft_short(f,o[l],n,a,s),2==n)for(var h=b.BLKSIZE_s-1;h>=0;--h){var c=o[l+0][r][h],u=o[l+1][r][h];o[l+0][r][h]=(c+u)*i.SQRT2*.5,o[l+1][r][h]=(c-u)*i.SQRT2*.5}for(_[r][0]=o[l+0][r][0],_[r][0]*=_[r][0],h=b.BLKSIZE_s/2-1;h>=0;--h){var m=o[l+0][r][b.BLKSIZE_s/2-h],p=o[l+0][r][b.BLKSIZE_s/2+h];_[r][b.BLKSIZE_s/2-h]=.5*(m*m+p*p)}}function F(e,t,a,s){var n=e.internal_flags;2==e.athaa_loudapprox&&a<2&&(n.loudness_sq[t][a]=n.loudness_sq_save[a],n.loudness_sq_save[a]=p(s,n))}this.L3psycho_anal_ns=function(e,t,a,r,i,u,m,p,v,g){var S,M,R,A,y,E,I,O,X,C,F=e.internal_flags,Y=f([2,b.BLKSIZE]),q=f([2,3,b.BLKSIZE_s]),G=l(b.CBANDS+1),j=l(b.CBANDS+1),U=l(b.CBANDS+2),z=h(2),Z=h(2),K=f([2,576]),Q=h(b.CBANDS+2),W=h(b.CBANDS+2);for(o.fill(W,0),S=F.channels_out,e.mode==MPEGMode.JOINT_STEREO&&(S=4),X=e.VBR==n.vbr_off?0==F.ResvMax?0:F.ResvSize/F.ResvMax*.5:e.VBR==n.vbr_rh||e.VBR==n.vbr_mtrh||e.VBR==n.vbr_mt?.6:1,M=0;M<F.channels_out;M++){var J=t[M],$=a+576-350-s+192;for(c(10==D.length),A=0;A<576;A++){var ee,te;for(ee=J[$+A+10],te=0,y=0;y<9;y+=2)ee+=D[y]*(J[$+A+y]+J[$+A+s-y]),te+=D[y+1]*(J[$+A+y+1]+J[$+A+s-y-1]);K[M][A]=ee+te}i[r][M].en.assign(F.en[M]),i[r][M].thm.assign(F.thm[M]),S>2&&(u[r][M].en.assign(F.en[M+2]),u[r][M].thm.assign(F.thm[M+2]))}for(M=0;M<S;M++){var ae,se=l(12),ne=[0,0,0,0],re=l(12),_e=1,ie=l(b.CBANDS),oe=l(b.CBANDS),le=[0,0,0,0],fe=l(b.HBLKSIZE),he=f([3,b.HBLKSIZE_s]);for(c(F.npart_s<=b.CBANDS),c(F.npart_l<=b.CBANDS),A=0;A<3;A++)se[A]=F.nsPsy.last_en_subshort[M][A+6],c(F.nsPsy.last_en_subshort[M][A+4]>0),re[A]=se[A]/F.nsPsy.last_en_subshort[M][A+4],ne[0]+=se[A];if(2==M)for(A=0;A<576;A++){var ce,ue;ce=K[0][A],ue=K[1][A],K[0][A]=ce+ue,K[1][A]=ce-ue}var be=K[1&M],me=0;for(A=0;A<9;A++){for(var pe=me+64,de=1;me<pe;me++)de<Math.abs(be[me])&&(de=Math.abs(be[me]));F.nsPsy.last_en_subshort[M][A]=se[A+3]=de,ne[1+A/3]+=de,de>se[A+3-2]?(c(se[A+3-2]>0),de/=se[A+3-2]):se[A+3-2]>10*de?(c(de>0),de=se[A+3-2]/(10*de)):de=0,re[A+3]=de}if(e.analysis){var ve=re[0];for(A=1;A<12;A++)ve<re[A]&&(ve=re[A]);F.pinfo.ers[r][M]=F.pinfo.ers_save[M],F.pinfo.ers_save[M]=ve}for(ae=3==M?F.nsPsy.attackthre_s:F.nsPsy.attackthre,A=0;A<12;A++)0==le[A/3]&&re[A]>ae&&(le[A/3]=A%3+1);for(A=1;A<4;A++){var ge;ne[A-1]>ne[A]?(c(ne[A]>0),ge=ne[A-1]/ne[A]):(c(ne[A-1]>0),ge=ne[A]/ne[A-1]),ge<1.7&&(le[A]=0,1==A&&(le[0]=0))}for(0!=le[0]&&0!=F.nsPsy.lastAttacks[M]&&(le[0]=0),3!=F.nsPsy.lastAttacks[M]&&le[0]+le[1]+le[2]+le[3]==0||(_e=0,0!=le[1]&&0!=le[0]&&(le[1]=0),0!=le[2]&&0!=le[1]&&(le[2]=0),0!=le[3]&&0!=le[2]&&(le[3]=0)),M<2?Z[M]=_e:0==_e&&(Z[0]=Z[1]=0),v[M]=F.tot_ener[M],d(e,fe,he,Y,1&M,q,1&M,r,M,t,a),H(F,fe,G,ie,oe),N(F,ie,oe,Q),O=0;O<3;O++){var Se,we;for(x(e,he,j,U,M,O),T(F,j,U,M,O),I=0;I<b.SBMAX_s;I++){if(we=F.thm[M].s[I][O],we*=.8,le[O]>=2||1==le[O+1]){var Me=0!=O?O-1:2;de=P(F.thm[M].s[I][Me],we,.6*X),we=Math.min(we,de)}1==le[O]?(Me=0!=O?O-1:2,de=P(F.thm[M].s[I][Me],we,.3*X),we=Math.min(we,de)):(0!=O&&3==le[O-1]||0==O&&3==F.nsPsy.lastAttacks[M])&&(Me=2!=O?O+1:0,de=P(F.thm[M].s[I][Me],we,.3*X),we=Math.min(we,de)),Se=se[3*O+3]+se[3*O+4]+se[3*O+5],6*se[3*O+5]<Se&&(we*=.5,6*se[3*O+4]<Se&&(we*=.5)),F.thm[M].s[I][O]=we}}for(F.nsPsy.lastAttacks[M]=le[2],E=0,R=0;R<F.npart_l;R++){for(var Re=F.s3ind[R][0],Ae=G[Re]*w[Q[Re]],Be=F.s3_ll[E++]*Ae;++Re<=F.s3ind[R][1];)Ae=G[Re]*w[Q[Re]],Be=B(Be,F.s3_ll[E++]*Ae,Re,Re-R,F,0);Be*=.158489319246111,F.blocktype_old[1&M]==b.SHORT_TYPE?U[R]=Be:U[R]=P(Math.min(Be,Math.min(2*F.nb_1[M][R],16*F.nb_2[M][R])),Be,X),F.nb_2[M][R]=F.nb_1[M][R],F.nb_1[M][R]=Be}for(;R<=b.CBANDS;++R)G[R]=0,U[R]=0;k(F,G,U,M)}for(e.mode!=MPEGMode.STEREO&&e.mode!=MPEGMode.JOINT_STEREO||e.interChRatio>0&&function(e,t){var a=e.internal_flags;if(a.channels_out>1){for(var s=0;s<b.SBMAX_l;s++){var n=a.thm[0].l[s],r=a.thm[1].l[s];a.thm[0].l[s]+=r*t,a.thm[1].l[s]+=n*t}for(s=0;s<b.SBMAX_s;s++)for(var _=0;_<3;_++)n=a.thm[0].s[s][_],r=a.thm[1].s[s][_],a.thm[0].s[s][_]+=r*t,a.thm[1].s[s][_]+=n*t}}(e,e.interChRatio),e.mode==MPEGMode.JOINT_STEREO&&(function(e){for(var t=0;t<b.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 a=e.mld_l[t]*e.en[3].l[t],s=Math.max(e.thm[2].l[t],Math.min(e.thm[3].l[t],a));a=e.mld_l[t]*e.en[2].l[t];var n=Math.max(e.thm[3].l[t],Math.min(e.thm[2].l[t],a));e.thm[2].l[t]=s,e.thm[3].l[t]=n}for(t=0;t<b.SBMAX_s;t++)for(var r=0;r<3;r++)e.thm[0].s[t][r]>1.58*e.thm[1].s[t][r]||e.thm[1].s[t][r]>1.58*e.thm[0].s[t][r]||(a=e.mld_s[t]*e.en[3].s[t][r],s=Math.max(e.thm[2].s[t][r],Math.min(e.thm[3].s[t][r],a)),a=e.mld_s[t]*e.en[2].s[t][r],n=Math.max(e.thm[3].s[t][r],Math.min(e.thm[2].s[t][r],a)),e.thm[2].s[t][r]=s,e.thm[3].s[t][r]=n)}(F),C=e.msfix,Math.abs(C)>0&&function(e,t,a){var s=t,n=Math.pow(10,a);t*=2,s*=2;for(var r=0;r<b.SBMAX_l;r++)f=e.ATH.cb_l[e.bm_l[r]]*n,(i=Math.min(Math.max(e.thm[0].l[r],f),Math.max(e.thm[1].l[r],f)))*t<(o=Math.max(e.thm[2].l[r],f))+(l=Math.max(e.thm[3].l[r],f))&&c((o*=h=i*s/(o+l))+(l*=h)>0),e.thm[2].l[r]=Math.min(o,e.thm[2].l[r]),e.thm[3].l[r]=Math.min(l,e.thm[3].l[r]);for(n*=b.BLKSIZE_s/b.BLKSIZE,r=0;r<b.SBMAX_s;r++)for(var _=0;_<3;_++){var i,o,l,f,h;f=e.ATH.cb_s[e.bm_s[r]]*n,(i=Math.min(Math.max(e.thm[0].s[r][_],f),Math.max(e.thm[1].s[r][_],f)))*t<(o=Math.max(e.thm[2].s[r][_],f))+(l=Math.max(e.thm[3].s[r][_],f))&&c((o*=h=i*t/(o+l))+(l*=h)>0),e.thm[2].s[r][_]=Math.min(e.thm[2].s[r][_],o),e.thm[3].s[r][_]=Math.min(e.thm[3].s[r][_],l)}}(F,C,e.ATHlower*F.ATH.adjust)),function(e,t,a,s){var n=e.internal_flags;e.short_blocks!=_.short_block_coupled||0!=t[0]&&0!=t[1]||(t[0]=t[1]=0);for(var r=0;r<n.channels_out;r++)s[r]=b.NORM_TYPE,e.short_blocks==_.short_block_dispensed&&(t[r]=1),e.short_blocks==_.short_block_forced&&(t[r]=0),0!=t[r]?(c(n.blocktype_old[r]!=b.START_TYPE),n.blocktype_old[r]==b.SHORT_TYPE&&(s[r]=b.STOP_TYPE)):(s[r]=b.SHORT_TYPE,n.blocktype_old[r]==b.NORM_TYPE&&(n.blocktype_old[r]=b.START_TYPE),n.blocktype_old[r]==b.STOP_TYPE&&(n.blocktype_old[r]=b.SHORT_TYPE)),a[r]=n.blocktype_old[r],n.blocktype_old[r]=s[r]}(e,Z,g,z),M=0;M<S;M++){var ye,Ee,Te,ke=0;M>1?(ye=p,ke=-2,Ee=b.NORM_TYPE,g[0]!=b.SHORT_TYPE&&g[1]!=b.SHORT_TYPE||(Ee=b.SHORT_TYPE),Te=u[r][M-2]):(ye=m,ke=0,Ee=g[M],Te=i[r][M]),Ee==b.SHORT_TYPE?ye[ke+M]=L(Te,F.masking_lower):ye[ke+M]=V(Te,F.masking_lower),e.analysis&&(F.pinfo.pe[r][M]=ye[ke+M])}return 0};var Y=[-1730326e-23,-.01703172,-1349528e-23,.0418072,-673278e-22,-.0876324,-30835e-21,.1863476,-1104424e-22,-.627638];function q(e,t,a){if(0==a)for(var s=0;s<e.npart_s;s++)e.nb_s2[t][s]=e.nb_s1[t][s],e.nb_s1[t][s]=0}function G(e,t){for(var a=0;a<e.npart_l;a++)e.nb_2[t][a]=e.nb_1[t][a],e.nb_1[t][a]=0}function j(e,t,a,s,n,r){var _,i,o,f=e.internal_flags,h=new float[b.CBANDS],u=l(b.CBANDS),m=new int[b.CBANDS];for(o=i=0;o<f.npart_s;++o){var p=0,d=0,v=f.numlines_s[o];for(_=0;_<v;++_,++i){var g=t[r][i];p+=g,d<g&&(d=g)}a[o]=p,c(p>=0),h[o]=d,c(v>0),u[o]=p/v,c(u[o]>=0)}for(c(o==f.npart_s),c(129==i);o<b.CBANDS;++o)h[o]=0,u[o]=0;for(function(e,t,a,s){var n=w.length-1,r=0,_=a[r]+a[r+1];for(c(_>=0),_>0?((i=t[r])<t[r+1]&&(i=t[r+1]),c(e.numlines_s[r]+e.numlines_s[r+1]-1>0),(o=0|(_=20*(2*i-_)/(_*(e.numlines_s[r]+e.numlines_s[r+1]-1))))>n&&(o=n),s[r]=o):s[r]=0,r=1;r<e.npart_s-1;r++){var i,o;_=a[r-1]+a[r]+a[r+1],c(r+1<e.npart_s),c(_>=0),_>0?((i=t[r-1])<t[r]&&(i=t[r]),i<t[r+1]&&(i=t[r+1]),c(e.numlines_s[r-1]+e.numlines_s[r]+e.numlines_s[r+1]-1>0),(o=0|(_=20*(3*i-_)/(_*(e.numlines_s[r-1]+e.numlines_s[r]+e.numlines_s[r+1]-1))))>n&&(o=n),s[r]=o):s[r]=0}c(r>0),c(r==e.npart_s-1),_=a[r-1]+a[r],c(_>=0),_>0?((i=t[r-1])<t[r]&&(i=t[r]),c(e.numlines_s[r-1]+e.numlines_s[r]-1>0),(o=0|(_=20*(2*i-_)/(_*(e.numlines_s[r-1]+e.numlines_s[r]-1))))>n&&(o=n),s[r]=o):s[r]=0,c(r==e.npart_s-1)}(f,h,u,m),i=o=0;o<f.npart_s;o++){var S,M,R,A,B,y=f.s3ind_s[o][0],T=f.s3ind_s[o][1];for(S=m[y],M=1,A=f.s3_ss[i]*a[y]*w[m[y]],++i,++y;y<=T;)S+=m[y],M+=1,A=E(A,R=f.s3_ss[i]*a[y]*w[m[y]],y-o),++i,++y;A*=B=.5*w[S=(1+2*S)/(2*M)],s[o]=A,f.nb_s2[n][o]=f.nb_s1[n][o],f.nb_s1[n][o]=A,R=h[o],R*=f.minval_s[o],R*=B,s[o]>R&&(s[o]=R),f.masking_lower>1&&(s[o]*=f.masking_lower),s[o]>a[o]&&(s[o]=a[o]),f.masking_lower<1&&(s[o]*=f.masking_lower),c(s[o]>=0)}for(;o<b.CBANDS;++o)a[o]=0,s[o]=0}function U(e,t,a,s,n){var r,_=l(b.CBANDS),i=l(b.CBANDS),o=h(b.CBANDS+2);H(e,t,a,_,i),N(e,_,i,o);var f=0;for(r=0;r<e.npart_l;r++){var u,m,p,d=e.s3ind[r][0],v=e.s3ind[r][1],g=0,S=0;for(g=o[d],S+=1,m=e.s3_ll[f]*a[d]*w[o[d]],++f,++d;d<=v;)g+=o[d],S+=1,m=E(m,u=e.s3_ll[f]*a[d]*w[o[d]],d-r),++f,++d;if(m*=p=.5*w[g=(1+2*g)/(2*S)],e.blocktype_old[1&n]==b.SHORT_TYPE){var M=2*e.nb_1[n][r];s[r]=M>0?Math.min(m,M):Math.min(m,.3*a[r])}else{var R=16*e.nb_2[n][r],A=2*e.nb_1[n][r];R<=0&&(R=m),A<=0&&(A=m),M=e.blocktype_old[1&n]==b.NORM_TYPE?Math.min(A,R):A,s[r]=Math.min(m,M)}e.nb_2[n][r]=e.nb_1[n][r],e.nb_1[n][r]=m,u=_[r],u*=e.minval_l[r],u*=p,s[r]>u&&(s[r]=u),e.masking_lower>1&&(s[r]*=e.masking_lower),s[r]>a[r]&&(s[r]=a[r]),e.masking_lower<1&&(s[r]*=e.masking_lower),c(s[r]>=0)}for(;r<b.CBANDS;++r)a[r]=0,s[r]=0}function z(e,t,a,s,n,r,_){for(var i,o,l=2*r,f=r>0?Math.pow(10,n):1,h=0;h<_;++h){var u=e[2][h],b=e[3][h],m=t[0][h],p=t[1][h],d=t[2][h],v=t[3][h];if(m<=1.58*p&&p<=1.58*m){var g=a[h]*b,S=a[h]*u;o=Math.max(d,Math.min(v,g)),i=Math.max(v,Math.min(d,S))}else o=d,i=v;if(r>0){var w,M,R=s[h]*f;if(w=Math.min(Math.max(m,R),Math.max(p,R)),(M=(d=Math.max(o,R))+(v=Math.max(i,R)))>0&&w*l<M){var A=w*l/M;d*=A,v*=A,c(M>0)}o=Math.min(d,o),i=Math.min(v,i)}o>u&&(o=u),i>b&&(i=b),t[2][h]=o,t[3][h]=i}}function Z(e,t){var a;return(a=e>=0?27*-e:e*t)<=-72?0:Math.exp(a*m)}function K(e){var t,a,s,n,r=0;for(r=0;Z(r,e)>1e-20;r-=1);for(s=r,n=0;Math.abs(n-s)>1e-12;)Z(r=(n+s)/2,e)>0?n=r:s=r;for(t=s,r=0,r=0;Z(r,e)>1e-20;r+=1);for(s=0,n=r;Math.abs(n-s)>1e-12;)Z(r=(n+s)/2,e)>0?s=r:n=r;a=n;var _,i=0,o=1e3;for(_=0;_<=o;++_)i+=Z(r=t+_*(a-t)/o,e);return(o+1)/(i*(a-t))}function Q(e){return e<0&&(e=0),e*=.001,13*Math.atan(.76*e)+3.5*Math.atan(e*e/56.25)}function W(e,t,a,s,n,r,_,i,o,f,u,m){var p,d=l(b.CBANDS+1),v=i/(m>15?1152:384),g=h(b.HBLKSIZE);i/=o;var S=0,w=0;for(p=0;p<b.CBANDS;p++){var M;for(P=Q(i*S),d[p]=i*S,M=S;Q(i*M)-P<.34&&M<=o/2;M++);for(e[p]=M-S,w=p+1;S<M;)c(S<b.HBLKSIZE),g[S++]=p;if(S>o/2){S=o/2,++p;break}}c(p<b.CBANDS),d[p]=i*S;for(var R=0;R<m;R++){var A,B,y,E,T;y=f[R],E=f[R+1],(A=0|Math.floor(.5+u*(y-.5)))<0&&(A=0),(B=0|Math.floor(.5+u*(E-.5)))>o/2&&(B=o/2),a[R]=(g[A]+g[B])/2,t[R]=g[B];var k=v*E;_[R]=(k-d[t[R]])/(d[t[R]+1]-d[t[R]]),_[R]<0?_[R]=0:_[R]>1&&(_[R]=1),T=Q(i*f[R]*u),T=Math.min(T,15.5)/15.5,r[R]=Math.pow(10,1.25*(1-Math.cos(Math.PI*T))-2.5)}S=0;for(var x=0;x<w;x++){var P,I,L=e[x];P=Q(i*S),I=Q(i*(S+L-1)),s[x]=.5*(P+I),P=Q(i*(S-.5)),I=Q(i*(S+L-.5)),n[x]=I-P,S+=L}return w}function J(e,t,a,s,n,r){var _,i,o,h,c,u=f([b.CBANDS,b.CBANDS]),p=0;if(r)for(var d=0;d<t;d++)for(_=0;_<t;_++){var v=(i=void 0,void 0,void 0,c=void 0,i=a[d]-a[_],o=(i*=i>=0?3:1.5)>=.5&&i<=2.5?8*((c=i-.5)*c-2*c):0,((h=15.811389+7.5*(i+=.474)-17.5*Math.sqrt(1+i*i))<=-60?0:(i=Math.exp((o+h)*m),i/=.6609193))*s[_]);u[d][_]=v*n[d]}else for(_=0;_<t;_++){var g=15+Math.min(21/a[_],12),S=K(g);for(d=0;d<t;d++)v=S*Z(a[d]-a[_],g)*s[_],u[d][_]=v*n[d]}for(d=0;d<t;d++){for(_=0;_<t&&!(u[d][_]>0);_++);for(e[d][0]=_,_=t-1;_>0&&!(u[d][_]>0);_--);e[d][1]=_,p+=e[d][1]-e[d][0]+1}var w=l(p),M=0;for(d=0;d<t;d++)for(_=e[d][0];_<=e[d][1];_++)w[M++]=u[d][_];return w}function $(e){var t=Q(e);return t=Math.min(t,15.5)/15.5,Math.pow(10,1.25*(1-Math.cos(Math.PI*t))-2.5)}function ee(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(e,t,a,n,r,i,o,u,m,p){var d=e.internal_flags,v=l(b.HBLKSIZE),g=f([3,b.HBLKSIZE_s]),S=f([2,b.BLKSIZE]),w=f([2,3,b.BLKSIZE_s]),M=f([4,b.CBANDS]),R=f([4,b.CBANDS]),A=f([4,3]),B=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],y=h(2),E=e.mode==MPEGMode.JOINT_STEREO?4:d.channels_out;!function(e,t,a,n,r,_,i,o,h,u){for(var b=f([2,576]),m=e.internal_flags,p=m.channels_out,d=e.mode==MPEGMode.JOINT_STEREO?4:p,v=0;v<p;v++){firbuf=t[v];var g=a+576-350-s+192;c(10==Y.length);for(var S=0;S<576;S++){var w,M;w=firbuf[g+S+10],M=0;for(var R=0;R<9;R+=2)w+=Y[R]*(firbuf[g+S+R]+firbuf[g+S+s-R]),M+=Y[R+1]*(firbuf[g+S+R+1]+firbuf[g+S+s-R-1]);b[v][S]=w+M}r[n][v].en.assign(m.en[v]),r[n][v].thm.assign(m.thm[v]),d>2&&(_[n][v].en.assign(m.en[v+2]),_[n][v].thm.assign(m.thm[v+2]))}for(v=0;v<d;v++){var A=l(12),B=l(12),y=[0,0,0,0],E=b[1&v],T=0,k=3==v?m.nsPsy.attackthre_s:m.nsPsy.attackthre,x=1;if(2==v)for(S=0,R=576;R>0;++S,--R){var P=b[0][S],I=b[1][S];b[0][S]=P+I,b[1][S]=P-I}for(S=0;S<3;S++)B[S]=m.nsPsy.last_en_subshort[v][S+6],c(m.nsPsy.last_en_subshort[v][S+4]>0),A[S]=B[S]/m.nsPsy.last_en_subshort[v][S+4],y[0]+=B[S];for(S=0;S<9;S++){for(var L=T+64,O=1;T<L;T++)O<Math.abs(E[T])&&(O=Math.abs(E[T]));m.nsPsy.last_en_subshort[v][S]=B[S+3]=O,y[1+S/3]+=O,O>B[S+3-2]?(c(B[S+3-2]>0),O/=B[S+3-2]):B[S+3-2]>10*O?(c(O>0),O=B[S+3-2]/(10*O)):O=0,A[S+3]=O}for(S=0;S<3;++S){var V=B[3*S+3]+B[3*S+4]+B[3*S+5],H=1;6*B[3*S+5]<V&&(H*=.5,6*B[3*S+4]<V&&(H*=.5)),o[v][S]=H}if(e.analysis){var N=A[0];for(S=1;S<12;S++)N<A[S]&&(N=A[S]);m.pinfo.ers[n][v]=m.pinfo.ers_save[v],m.pinfo.ers_save[v]=N}for(S=0;S<12;S++)0==h[v][S/3]&&A[S]>k&&(h[v][S/3]=S%3+1);for(S=1;S<4;S++){var D=y[S-1],X=y[S];Math.max(D,X)<4e4&&D<1.7*X&&X<1.7*D&&(1==S&&h[v][0]<=h[v][S]&&(h[v][0]=0),h[v][S]=0)}h[v][0]<=m.nsPsy.lastAttacks[v]&&(h[v][0]=0),3!=m.nsPsy.lastAttacks[v]&&h[v][0]+h[v][1]+h[v][2]+h[v][3]==0||(x=0,0!=h[v][1]&&0!=h[v][0]&&(h[v][1]=0),0!=h[v][2]&&0!=h[v][1]&&(h[v][2]=0),0!=h[v][3]&&0!=h[v][2]&&(h[v][3]=0)),v<2?u[v]=x:0==x&&(u[0]=u[1]=0),i[v]=m.tot_ener[v]}}(e,t,a,n,r,i,m,A,B,y),function(e,t){var a=e.internal_flags;e.short_blocks!=_.short_block_coupled||0!=t[0]&&0!=t[1]||(t[0]=t[1]=0);for(var s=0;s<a.channels_out;s++)e.short_blocks==_.short_block_dispensed&&(t[s]=1),e.short_blocks==_.short_block_forced&&(t[s]=0)}(e,y);for(var x=0;x<E;x++)X(e,t,a,x,n,v,S,O=1&x),F(e,n,x,v),0!=y[O]?U(d,v,M[x],R[x],x):G(d,x);for(y[0]+y[1]==2&&e.mode==MPEGMode.JOINT_STEREO&&z(M,R,d.mld_cb_l,d.ATH.cb_l,e.ATHlower*d.ATH.adjust,e.msfix,d.npart_l),x=0;x<E;x++)0!=y[O=1&x]&&k(d,M[x],R[x],x);for(var I=0;I<3;I++){for(x=0;x<E;++x)0!=y[O=1&x]?q(d,x,I):(C(e,t,a,x,I,g,w,O),j(e,g,M[x],R[x],x,I));for(y[0]+y[1]==0&&e.mode==MPEGMode.JOINT_STEREO&&z(M,R,d.mld_cb_s,d.ATH.cb_s,e.ATHlower*d.ATH.adjust,e.msfix,d.npart_s),x=0;x<E;++x)0==y[O=1&x]&&T(d,M[x],R[x],x,I)}for(x=0;x<E;x++){var O;if(0==y[O=1&x])for(var H=0;H<b.SBMAX_s;H++){var N=l(3);for(I=0;I<3;I++){var D=d.thm[x].s[H][I];if(D*=.8,B[x][I]>=2||1==B[x][I+1]){var Z=0!=I?I-1:2,K=P(d.thm[x].s[H][Z],D,.36);D=Math.min(D,K)}else 1==B[x][I]?(Z=0!=I?I-1:2,K=P(d.thm[x].s[H][Z],D,.18),D=Math.min(D,K)):(0!=I&&3==B[x][I-1]||0==I&&3==d.nsPsy.lastAttacks[x])&&(Z=2!=I?I+1:0,K=P(d.thm[x].s[H][Z],D,.18),D=Math.min(D,K));D*=A[x][I],N[I]=D}for(I=0;I<3;I++)d.thm[x].s[H][I]=N[I]}}for(x=0;x<E;x++)d.nsPsy.lastAttacks[x]=B[x][2];for(function(e,t,a){for(var s=e.internal_flags,n=0;n<s.channels_out;n++){var r=b.NORM_TYPE;0!=t[n]?(c(s.blocktype_old[n]!=b.START_TYPE),s.blocktype_old[n]==b.SHORT_TYPE&&(r=b.STOP_TYPE)):(r=b.SHORT_TYPE,s.blocktype_old[n]==b.NORM_TYPE&&(s.blocktype_old[n]=b.START_TYPE),s.blocktype_old[n]==b.STOP_TYPE&&(s.blocktype_old[n]=b.SHORT_TYPE)),a[n]=s.blocktype_old[n],s.blocktype_old[n]=r}}(e,y,p),x=0;x<E;x++){var Q,W,J,$;x>1?(Q=u,W=-2,J=b.NORM_TYPE,p[0]!=b.SHORT_TYPE&&p[1]!=b.SHORT_TYPE||(J=b.SHORT_TYPE),$=i[n][x-2]):(Q=o,W=0,J=p[x],$=r[n][x]),J==b.SHORT_TYPE?Q[W+x]=L($,d.masking_lower):Q[W+x]=V($,d.masking_lower),e.analysis&&(d.pinfo.pe[n][x]=Q[W+x])}return 0},this.psymodel_init=function(a){var s,_,i=a.internal_flags,o=!0,f=13,h=24,u=0,m=0,p=-8.25,d=-4.5,w=l(b.CBANDS),M=l(b.CBANDS),R=l(b.CBANDS),A=a.out_samplerate;switch(a.experimentalZ){default:case 0:o=!0;break;case 1:o=a.VBR!=n.vbr_mtrh&&a.VBR!=n.vbr_mt;break;case 2:o=!1;break;case 3:f=8,u=-1.75,m=-.0125,p=-8.25,d=-2.25}for(i.ms_ener_ratio_old=.25,i.blocktype_old[0]=i.blocktype_old[1]=b.NORM_TYPE,s=0;s<4;++s){for(var B=0;B<b.CBANDS;++B)i.nb_1[s][B]=1e20,i.nb_2[s][B]=1e20,i.nb_s1[s][B]=i.nb_s2[s][B]=1;for(var y=0;y<b.SBMAX_l;y++)i.en[s].l[y]=1e20,i.thm[s].l[y]=1e20;for(B=0;B<3;++B){for(y=0;y<b.SBMAX_s;y++)i.en[s].s[y][B]=1e20,i.thm[s].s[y][B]=1e20;i.nsPsy.lastAttacks[s]=0}for(B=0;B<9;B++)i.nsPsy.last_en_subshort[s][B]=10}for(i.loudness_sq_save[0]=i.loudness_sq_save[1]=0,i.npart_l=W(i.numlines_l,i.bo_l,i.bm_l,w,M,i.mld_l,i.PSY.bo_l_weight,A,b.BLKSIZE,i.scalefac_band.l,b.BLKSIZE/1152,b.SBMAX_l),c(i.npart_l<b.CBANDS),s=0;s<i.npart_l;s++){var E=u;w[s]>=f&&(E=m*(w[s]-f)/(h-f)+u*(h-w[s])/(h-f)),R[s]=Math.pow(10,E/10),i.numlines_l[s]>0?i.rnumlines_l[s]=1/i.numlines_l[s]:i.rnumlines_l[s]=0}for(i.s3_ll=J(i.s3ind,i.npart_l,w,M,R,o),B=0,s=0;s<i.npart_l;s++){x=r.MAX_VALUE;for(var T=0;T<i.numlines_l[s];T++,B++){var k=A*B/(1e3*b.BLKSIZE);P=this.ATHformula(1e3*k,a)-20,P=Math.pow(10,.1*P),x>(P*=i.numlines_l[s])&&(x=P)}i.ATH.cb_l[s]=x,(x=20*w[s]/10-20)>6&&(x=100),x<-15&&(x=-15),x-=8,i.minval_l[s]=Math.pow(10,x/10)*i.numlines_l[s]}for(i.npart_s=W(i.numlines_s,i.bo_s,i.bm_s,w,M,i.mld_s,i.PSY.bo_s_weight,A,b.BLKSIZE_s,i.scalefac_band.s,b.BLKSIZE_s/384,b.SBMAX_s),c(i.npart_s<b.CBANDS),B=0,s=0;s<i.npart_s;s++){var x;for(E=p,w[s]>=f&&(E=d*(w[s]-f)/(h-f)+p*(h-w[s])/(h-f)),R[s]=Math.pow(10,E/10),x=r.MAX_VALUE,T=0;T<i.numlines_s[s];T++,B++){var P;k=A*B/(1e3*b.BLKSIZE_s),P=this.ATHformula(1e3*k,a)-20,P=Math.pow(10,.1*P),x>(P*=i.numlines_s[s])&&(x=P)}i.ATH.cb_s[s]=x,x=7*w[s]/12-7,w[s]>12&&(x*=1+3.1*Math.log(1+x)),w[s]<12&&(x*=1+2.3*Math.log(1-x)),x<-15&&(x=-15),x-=8,i.minval_s[s]=Math.pow(10,x/10)*i.numlines_s[s]}i.s3_ss=J(i.s3ind_s,i.npart_s,w,M,R,o),v=Math.pow(10,9/16),g=Math.pow(10,1.5),S=Math.pow(10,1.5),e.init_fft(i),i.decay=Math.exp(-1*t/(.01*A/192)),_=3.5,0!=(2&a.exp_nspsytune)&&(_=1),Math.abs(a.msfix)>0&&(_=a.msfix),a.msfix=_;for(var I=0;I<i.npart_l;I++)i.s3ind[I][1]>i.npart_l-1&&(i.s3ind[I][1]=i.npart_l-1);var L=576*i.mode_gr/A;if(i.ATH.decay=Math.pow(10,-1.2*L),i.ATH.adjust=.01,i.ATH.adjustLimit=1,c(i.bo_l[b.SBMAX_l-1]<=i.npart_l),c(i.bo_s[b.SBMAX_s-1]<=i.npart_s),-1!=a.ATHtype){var O=a.out_samplerate/b.BLKSIZE,V=0;for(k=0,s=0;s<b.BLKSIZE/2;++s)k+=O,i.ATH.eql_w[s]=1/Math.pow(10,this.ATHformula(k,a)/10),V+=i.ATH.eql_w[s];for(V=1/V,s=b.BLKSIZE/2;--s>=0;)i.ATH.eql_w[s]*=V}for(I=B=0;I<i.npart_s;++I)for(s=0;s<i.numlines_s[I];++s)++B;for(c(129==B),I=B=0;I<i.npart_l;++I)for(s=0;s<i.numlines_l[I];++s)++B;for(c(513==B),B=0,s=0;s<i.npart_l;s++)k=A*(B+i.numlines_l[s]/2)/(1*b.BLKSIZE),i.mld_cb_l[s]=$(k),B+=i.numlines_l[s];for(;s<b.CBANDS;++s)i.mld_cb_l[s]=1;for(B=0,s=0;s<i.npart_s;s++)k=A*(B+i.numlines_s[s]/2)/(1*b.BLKSIZE_s),i.mld_cb_s[s]=$(k),B+=i.numlines_s[s];for(;s<b.CBANDS;++s)i.mld_cb_s[s]=1;return 0},this.ATHformula=function(e,t){var a;switch(t.ATHtype){case 0:a=ee(e,9);break;case 1:a=ee(e,-1);break;case 2:default:a=ee(e,0);break;case 3:a=ee(e,1)+6;break;case 4:a=ee(e,t.ATHcurve)}return a}}},833:(e,t,a)=>{var s=a(38),n=s.System,r=s.VbrMode,_=(s.Float,s.ShortBlock,s.Util),i=s.Arrays,o=(s.new_array_n,s.new_byte,s.new_double,s.new_float),l=(s.new_float_n,s.new_int,s.new_int_n,s.assert),f=a(95),h=a(711),c=a(449),u=a(687),b=a(438),m=a(354);e.exports=function(){var e,t,a;this.rv=null,this.qupvt=null;var s,p=new f;function d(e){this.ordinal=e}function v(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 g(e,t,a,s,n){var r;switch(e){default:case 9:t.over_count>0?(r=a.over_SSD<=t.over_SSD,a.over_SSD==t.over_SSD&&(r=a.bits<t.bits)):r=a.max_noise<0&&10*a.max_noise+a.bits<=10*t.max_noise+t.bits;break;case 0:r=a.over_count<t.over_count||a.over_count==t.over_count&&a.over_noise<t.over_noise||a.over_count==t.over_count&&BitStream.EQ(a.over_noise,t.over_noise)&&a.tot_noise<t.tot_noise;break;case 8:a.max_noise=function(e,t){for(var a,s=1e-37,n=0;n<t.psymax;n++)s+=(a=e[n],_.FAST_LOG10(.368+.632*a*a*a));return Math.max(1e-20,s)}(n,s);case 1:r=a.max_noise<t.max_noise;break;case 2:r=a.tot_noise<t.tot_noise;break;case 3:r=a.tot_noise<t.tot_noise&&a.max_noise<t.max_noise;break;case 4:r=a.max_noise<=0&&t.max_noise>.2||a.max_noise<=0&&t.max_noise<0&&t.max_noise>a.max_noise-.2&&a.tot_noise<t.tot_noise||a.max_noise<=0&&t.max_noise>0&&t.max_noise>a.max_noise-.2&&a.tot_noise<t.tot_noise+t.over_noise||a.max_noise>0&&t.max_noise>-.05&&t.max_noise>a.max_noise-.1&&a.tot_noise+a.over_noise<t.tot_noise+t.over_noise||a.max_noise>0&&t.max_noise>-.1&&t.max_noise>a.max_noise-.15&&a.tot_noise+a.over_noise+a.over_noise<t.tot_noise+t.over_noise+t.over_noise;break;case 5:r=a.over_noise<t.over_noise||BitStream.EQ(a.over_noise,t.over_noise)&&a.tot_noise<t.tot_noise;break;case 6:r=a.over_noise<t.over_noise||BitStream.EQ(a.over_noise,t.over_noise)&&(a.max_noise<t.max_noise||BitStream.EQ(a.max_noise,t.max_noise)&&a.tot_noise<=t.tot_noise);break;case 7:r=a.over_count<t.over_count||a.over_noise<t.over_noise}return 0==t.over_count&&(r=r&&a.bits<t.bits),r}function S(e,t,n,r,_){var o=e.internal_flags;!function(e,t,a,s,n){var r,_=e.internal_flags;r=0==t.scalefac_scale?1.2968395546510096:1.6817928305074292;for(var i=0,o=0;o<t.sfbmax;o++)i<a[o]&&(i=a[o]);var l=_.noise_shaping_amp;switch(3==l&&(l=n?2:1),l){case 2:break;case 1:i>1?i=Math.pow(i,.5):i*=.95;break;default:i>1?i=1:i*=.95}var f=0;for(o=0;o<t.sfbmax;o++){var h,c=t.width[o];if(f+=c,!(a[o]<i)){if(0!=(2&_.substep_shaping)&&(_.pseudohalf[o]=0==_.pseudohalf[o]?1:0,0==_.pseudohalf[o]&&2==_.noise_shaping_amp))return;for(t.scalefac[o]++,h=-c;h<0;h++)s[f+h]*=r,s[f+h]>t.xrpow_max&&(t.xrpow_max=s[f+h]);if(2==_.noise_shaping_amp)return}}}(e,t,n,r,_);var f=v(t);return!(f||(f=2==o.mode_gr?s.scale_bitcount(t):s.scale_bitcount_lsf(o,t))&&(o.noise_shaping>1&&(i.fill(o.pseudohalf,0),0==t.scalefac_scale?(function(e,t){for(var s=0,n=0;n<e.sfbmax;n++){var r=e.width[n],_=e.scalefac[n];if(0!=e.preflag&&(_+=a.pretab[n]),s+=r,0!=(1&_)){_++;for(var i=-r;i<0;i++)t[s+i]*=1.2968395546510096,t[s+i]>e.xrpow_max&&(e.xrpow_max=t[s+i])}e.scalefac[n]=_>>1}e.preflag=0,e.scalefac_scale=1}(t,r),f=!1):t.block_type==u.SHORT_TYPE&&o.subblock_gain>0&&(f=function(e,t,s){var n,r=t.scalefac;for(n=0;n<t.sfb_lmax;n++)if(r[n]>=16)return!0;for(var _=0;_<3;_++){var i=0,o=0;for(n=t.sfb_lmax+_;n<t.sfbdivide;n+=3)i<r[n]&&(i=r[n]);for(;n<t.sfbmax;n+=3)o<r[n]&&(o=r[n]);if(!(i<16&&o<8)){if(t.subblock_gain[_]>=7)return!0;t.subblock_gain[_]++;var f=e.scalefac_band.l[t.sfb_lmax];for(n=t.sfb_lmax+_;n<t.sfbmax;n+=3){var h=t.width[n],c=r[n];if(l(c>=0),(c-=4>>t.scalefac_scale)>=0)r[n]=c,f+=3*h;else{r[n]=0;var u=210+(c<<t.scalefac_scale+1);m=a.IPOW20(u),f+=h*(_+1);for(var b=-h;b<0;b++)s[f+b]*=m,s[f+b]>t.xrpow_max&&(t.xrpow_max=s[f+b]);f+=h*(3-_-1)}}var m=a.IPOW20(202);for(f+=t.width[n]*(_+1),b=-t.width[n];b<0;b++)s[f+b]*=m,s[f+b]>t.xrpow_max&&(t.xrpow_max=s[f+b])}}return!1}(o,t,r)||v(t))),f||(f=2==o.mode_gr?s.scale_bitcount(t):s.scale_bitcount_lsf(o,t)),f))}this.setModules=function(n,r,_,i){e=n,t=r,this.rv=r,a=_,this.qupvt=_,s=i,p.setModules(a,s)},this.ms_convert=function(e,t){for(var a=0;a<576;++a){var s=e.tt[t][0].xr[a],n=e.tt[t][1].xr[a];e.tt[t][0].xr[a]=(s+n)*(.5*_.SQRT2),e.tt[t][1].xr[a]=(s-n)*(.5*_.SQRT2)}},this.init_xrpow=function(e,t,a){var s=0,n=0|t.max_nonzero_coeff;if(l(null!=a),t.xrpow_max=0,l(0<=n&&n<=575),i.fill(a,n,576,0),s=function(e,t,a,s){s=0;for(var n=0;n<=a;++n){var r=Math.abs(e.xr[n]);s+=r,t[n]=Math.sqrt(r*Math.sqrt(r)),t[n]>e.xrpow_max&&(e.xrpow_max=t[n])}return s}(t,a,n,s),s>1e-20){var r=0;0!=(2&e.substep_shaping)&&(r=1);for(var _=0;_<t.psymax;_++)e.pseudohalf[_]=r;return!0}return i.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=u.SBPSY_l,t.sfb_smin=u.SBPSY_s,t.psy_lmax=e.sfb21_extra?u.SBMAX_l:u.SBPSY_l,t.psymax=t.psy_lmax,t.sfbmax=t.sfb_lmax,t.sfbdivide=11;for(var s=0;s<u.SBMAX_l;s++)t.width[s]=e.scalefac_band.l[s+1]-e.scalefac_band.l[s],t.window[s]=3;if(t.block_type==u.SHORT_TYPE){var r=o(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?u.SBMAX_s:u.SBPSY_s)-t.sfb_smin),t.sfbmax=t.sfb_lmax+3*(u.SBPSY_s-t.sfb_smin),t.sfbdivide=t.sfbmax-18,t.psy_lmax=t.sfb_lmax;var _=e.scalefac_band.l[t.sfb_lmax];for(n.arraycopy(t.xr,0,r,0,576),s=t.sfb_smin;s<u.SBMAX_s;s++)for(var l=e.scalefac_band.s[s],f=e.scalefac_band.s[s+1],h=0;h<3;h++)for(var c=l;c<f;c++)t.xr[_++]=r[3*c+h];var b=t.sfb_lmax;for(s=t.sfb_smin;s<u.SBMAX_s;s++)t.width[b]=t.width[b+1]=t.width[b+2]=e.scalefac_band.s[s+1]-e.scalefac_band.s[s],t.window[b]=0,t.window[b+1]=1,t.window[b+2]=2,b+=3}t.count1bits=0,t.sfb_partition_table=a.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,i.fill(t.scalefac,0),function(e,t){var s=e.ATH,n=t.xr;if(t.block_type!=u.SHORT_TYPE)for(var r=!1,_=u.PSFB21-1;_>=0&&!r;_--){var i=e.scalefac_band.psfb21[_],o=e.scalefac_band.psfb21[_+1],l=a.athAdjust(s.adjust,s.psfb21[_],s.floor);e.nsPsy.longfact[21]>1e-12&&(l*=e.nsPsy.longfact[21]);for(var f=o-1;f>=i;f--){if(!(Math.abs(n[f])<l)){r=!0;break}n[f]=0}}else for(var h=0;h<3;h++)for(r=!1,_=u.PSFB12-1;_>=0&&!r;_--){o=(i=3*e.scalefac_band.s[12]+(e.scalefac_band.s[13]-e.scalefac_band.s[12])*h+(e.scalefac_band.psfb12[_]-e.scalefac_band.psfb12[0]))+(e.scalefac_band.psfb12[_+1]-e.scalefac_band.psfb12[_]);var c=a.athAdjust(s.adjust,s.psfb12[_],s.floor);for(e.nsPsy.shortfact[12]>1e-12&&(c*=e.nsPsy.shortfact[12]),f=o-1;f>=i;f--){if(!(Math.abs(n[f])<c)){r=!0;break}n[f]=0}}}(e,t)},d.BINSEARCH_NONE=new d(0),d.BINSEARCH_UP=new d(1),d.BINSEARCH_DOWN=new d(2),this.trancate_smallspectrums=function(e,t,n,r){var _=o(m.SFBMAX);if((0!=(4&e.substep_shaping)||t.block_type!=u.SHORT_TYPE)&&0==(128&e.substep_shaping)){a.calc_noise(t,n,_,new h,null);for(var l=0;l<576;l++){var f=0;0!=t.l3_enc[l]&&(f=Math.abs(t.xr[l])),r[l]=f}l=0;var c=8;t.block_type==u.SHORT_TYPE&&(c=6);do{var b,p,d,v,g=t.width[c];if(l+=g,!(_[c]>=1||(i.sort(r,l-g,g),BitStream.EQ(r[l-1],0)))){b=(1-_[c])*n[c],p=0,v=0;do{var S;for(d=1;v+d<g&&!BitStream.NEQ(r[v+l-g],r[v+l+d-g]);d++);if(b<(S=r[v+l-g]*r[v+l-g]*d)){0!=v&&(p=r[v+l-g-1]);break}b-=S,v+=d}while(v<g);if(!BitStream.EQ(p,0))do{Math.abs(t.xr[l-g])<=p&&(t.l3_enc[l-g]=0)}while(--g>0)}}while(++c<t.psymax);t.part2_3_length=s.noquant_count_bits(e,t,null)}},this.outer_loop=function(e,t,_,i,f,p){var v=e.internal_flags,w=new b,M=o(576),R=o(m.SFBMAX),A=new h,B=new c,y=9999999,E=!1,T=!1,k=0;if(function(e,t,a,n,r){var _,i=e.CurrentStep[n],o=!1,f=e.OldValue[n],h=d.BINSEARCH_NONE;for(t.global_gain=f,a-=t.part2_length,l(0!=i);;){var c;if(_=s.count_bits(e,r,t,null),1==i||_==a)break;_>a?(h==d.BINSEARCH_DOWN&&(o=!0),o&&(i/=2),h=d.BINSEARCH_UP,c=i):(h==d.BINSEARCH_UP&&(o=!0),o&&(i/=2),h=d.BINSEARCH_DOWN,c=-i),t.global_gain+=c,t.global_gain<0&&(t.global_gain=0,o=!0),t.global_gain>255&&(t.global_gain=255,o=!0)}for(l(t.global_gain>=0),l(t.global_gain<256);_>a&&t.global_gain<255;)t.global_gain++,_=s.count_bits(e,r,t,null);e.CurrentStep[n]=f-t.global_gain>=4?4:2,e.OldValue[n]=t.global_gain,t.part2_3_length=_}(v,t,p,f,i),0==v.noise_shaping)return 100;a.calc_noise(t,_,R,A,B),A.bits=t.part2_3_length,w.assign(t);var x=0;for(n.arraycopy(i,0,M,0,576);!E;){do{var P,I=new h,L=255;if(P=0!=(2&v.substep_shaping)?20:3,v.sfb21_extra){if(R[w.sfbmax]>1)break;if(w.block_type==u.SHORT_TYPE&&(R[w.sfbmax+1]>1||R[w.sfbmax+2]>1))break}if(!S(e,w,R,i,T))break;0!=w.scalefac_scale&&(L=254);var O=p-w.part2_length;if(O<=0)break;for(;(w.part2_3_length=s.count_bits(v,i,w,B))>O&&w.global_gain<=L;)w.global_gain++;if(w.global_gain>L)break;if(0==A.over_count){for(;(w.part2_3_length=s.count_bits(v,i,w,B))>y&&w.global_gain<=L;)w.global_gain++;if(w.global_gain>L)break}if(a.calc_noise(w,_,R,I,B),I.bits=w.part2_3_length,0!=(g(t.block_type!=u.SHORT_TYPE?e.quant_comp:e.quant_comp_short,A,I,w,R)?1:0))y=t.part2_3_length,A=I,t.assign(w),x=0,n.arraycopy(i,0,M,0,576);else if(0==v.full_outer_loop){if(++x>P&&0==A.over_count)break;if(3==v.noise_shaping_amp&&T&&x>30)break;if(3==v.noise_shaping_amp&&T&&w.global_gain-k>15)break}}while(w.global_gain+w.scalefac_scale<255);3==v.noise_shaping_amp?T?E=!0:(w.assign(t),n.arraycopy(M,0,i,0,576),x=0,k=w.global_gain,T=!0):E=!0}return l(t.global_gain+t.scalefac_scale<=255),e.VBR==r.vbr_rh||e.VBR==r.vbr_mtrh?n.arraycopy(M,0,i,0,576):0!=(1&v.substep_shaping)&&trancate_smallspectrums(v,t,_,i),A.over_count},this.iteration_finish_one=function(e,a,n){var r=e.l3_side,_=r.tt[a][n];s.best_scalefac_store(e,a,n,r),1==e.use_best_huffman&&s.best_huffman_divide(e,_),t.ResvAdjust(e,_)},this.VBR_encode_granule=function(e,t,a,s,r,_,f){var h,c=e.internal_flags,u=new b,m=o(576),p=f,d=f+1,v=(f+_)/2,g=0,S=c.sfb21_extra;l(p<=LameInternalFlags.MAX_BITS_PER_CHANNEL),i.fill(u.l3_enc,0);do{l(v>=_),l(v<=f),l(_<=f),c.sfb21_extra=!(v>p-42)&&S,outer_loop(e,t,a,s,r,v)<=0?(g=1,d=t.part2_3_length,u.assign(t),n.arraycopy(s,0,m,0,576),h=(f=d-32)-_,v=(f+_)/2):(h=f-(_=v+32),v=(f+_)/2,0!=g&&(g=2,t.assign(u),n.arraycopy(m,0,s,0,576)))}while(h>12);c.sfb21_extra=S,2==g&&n.arraycopy(u.l3_enc,0,t.l3_enc,0,576),l(t.part2_3_length<=p)},this.get_framebits=function(a,s){var n=a.internal_flags;n.bitrate_index=n.VBR_min_bitrate;var r=e.getframebits(a);n.bitrate_index=1,r=e.getframebits(a);for(var _=1;_<=n.VBR_max_bitrate;_++){n.bitrate_index=_;var i=new MeanBits(r);s[_]=t.ResvFrameBegin(a,i),r=i.bits}},this.VBR_old_prepare=function(e,s,n,r,_,i,o,l,f){var h,c=e.internal_flags,b=0,m=1,p=0;c.bitrate_index=c.VBR_max_bitrate;var d=t.ResvFrameBegin(e,new MeanBits(0))/c.mode_gr;get_framebits(e,i);for(var v=0;v<c.mode_gr;v++){var g=a.on_pe(e,s,l[v],d,v,0);c.mode_ext==u.MPG_MD_MS_LR&&(ms_convert(c.l3_side,v),a.reduce_side(l[v],n[v],d,g));for(var S=0;S<c.channels_out;++S){var w=c.l3_side.tt[v][S];w.block_type!=u.SHORT_TYPE?(b=1.28/(1+Math.exp(3.5-s[v][S]/300))-.05,h=c.PSY.mask_adjust-b):(b=2.56/(1+Math.exp(3.5-s[v][S]/300))-.14,h=c.PSY.mask_adjust_short-b),c.masking_lower=Math.pow(10,.1*h),init_outer_loop(c,w),f[v][S]=a.calc_xmin(e,r[v][S],w,_[v][S]),0!=f[v][S]&&(m=0),o[v][S]=126,p+=l[v][S]}}for(v=0;v<c.mode_gr;v++)for(S=0;S<c.channels_out;S++)p>i[c.VBR_max_bitrate]&&(l[v][S]*=i[c.VBR_max_bitrate],l[v][S]/=p),o[v][S]>l[v][S]&&(o[v][S]=l[v][S]);return m},this.bitpressure_strategy=function(e,t,a,s){for(var n=0;n<e.mode_gr;n++)for(var r=0;r<e.channels_out;r++){for(var _=e.l3_side.tt[n][r],i=t[n][r],o=0,l=0;l<_.psy_lmax;l++)i[o++]*=1+.029*l*l/u.SBMAX_l/u.SBMAX_l;if(_.block_type==u.SHORT_TYPE)for(l=_.sfb_smin;l<u.SBMAX_s;l++)i[o++]*=1+.029*l*l/u.SBMAX_s/u.SBMAX_s,i[o++]*=1+.029*l*l/u.SBMAX_s/u.SBMAX_s,i[o++]*=1+.029*l*l/u.SBMAX_s/u.SBMAX_s;s[n][r]=0|Math.max(a[n][r],.9*s[n][r])}},this.VBR_new_prepare=function(e,s,n,r,_,i){var o,l=e.internal_flags,f=1,h=0,c=0;if(e.free_format)l.bitrate_index=0,b=new MeanBits(h),o=t.ResvFrameBegin(e,b),h=b.bits,_[0]=o;else{l.bitrate_index=l.VBR_max_bitrate;var b=new MeanBits(h);t.ResvFrameBegin(e,b),h=b.bits,get_framebits(e,_),o=_[l.VBR_max_bitrate]}for(var m=0;m<l.mode_gr;m++){a.on_pe(e,s,i[m],h,m,0),l.mode_ext==u.MPG_MD_MS_LR&&ms_convert(l.l3_side,m);for(var p=0;p<l.channels_out;++p){var d=l.l3_side.tt[m][p];l.masking_lower=Math.pow(10,.1*l.PSY.mask_adjust),init_outer_loop(l,d),0!=a.calc_xmin(e,n[m][p],d,r[m][p])&&(f=0),c+=i[m][p]}}for(m=0;m<l.mode_gr;m++)for(p=0;p<l.channels_out;p++)c>o&&(i[m][p]*=o,i[m][p]/=c);return f},this.calc_target_bits=function(s,n,r,_,i,o){var l,f,h,c,b=s.internal_flags,m=b.l3_side,p=0;b.bitrate_index=b.VBR_max_bitrate;var d=new MeanBits(p);for(o[0]=t.ResvFrameBegin(s,d),p=d.bits,b.bitrate_index=1,p=e.getframebits(s)-8*b.sideinfo_len,i[0]=p/(b.mode_gr*b.channels_out),p=s.VBR_mean_bitrate_kbps*s.framesize*1e3,0!=(1&b.substep_shaping)&&(p*=1.09),p/=s.out_samplerate,p-=8*b.sideinfo_len,p/=b.mode_gr*b.channels_out,(l=.93+.07*(11-s.compression_ratio)/5.5)<.9&&(l=.9),l>1&&(l=1),f=0;f<b.mode_gr;f++){var v=0;for(h=0;h<b.channels_out;h++){if(_[f][h]=int(l*p),n[f][h]>700){var g=int((n[f][h]-700)/1.4),S=m.tt[f][h];_[f][h]=int(l*p),S.block_type==u.SHORT_TYPE&&g<p/2&&(g=p/2),g>3*p/2?g=3*p/2:g<0&&(g=0),_[f][h]+=g}_[f][h]>LameInternalFlags.MAX_BITS_PER_CHANNEL&&(_[f][h]=LameInternalFlags.MAX_BITS_PER_CHANNEL),v+=_[f][h]}if(v>LameInternalFlags.MAX_BITS_PER_GRANULE)for(h=0;h<b.channels_out;++h)_[f][h]*=LameInternalFlags.MAX_BITS_PER_GRANULE,_[f][h]/=v}if(b.mode_ext==u.MPG_MD_MS_LR)for(f=0;f<b.mode_gr;f++)a.reduce_side(_[f],r[f],p*b.channels_out,LameInternalFlags.MAX_BITS_PER_GRANULE);for(c=0,f=0;f<b.mode_gr;f++)for(h=0;h<b.channels_out;h++)_[f][h]>LameInternalFlags.MAX_BITS_PER_CHANNEL&&(_[f][h]=LameInternalFlags.MAX_BITS_PER_CHANNEL),c+=_[f][h];if(c>o[0])for(f=0;f<b.mode_gr;f++)for(h=0;h<b.channels_out;h++)_[f][h]*=o[0],_[f][h]/=c}}},429:(e,t,a)=>{var s=a(302),n=a(38),r=(n.System,n.VbrMode),_=n.Float,i=(n.ShortBlock,n.Util),o=(n.Arrays,n.new_array_n,n.new_byte,n.new_double,n.new_float),l=(n.new_float_n,n.new_int),f=(n.new_int_n,n.assert),h=a(687),c=a(134),u=a(998);function b(){var e=null,t=null,a=null;this.setModules=function(s,n,r){e=s,t=n,a=r},this.IPOW20=function(e){return f(0<=e&&e<b.Q_MAX),S[e]};var n=2220446049250313e-31,m=b.IXMAX_VAL+2,p=b.Q_MAX,d=b.Q_MAX2;b.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 v=[0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,2,3,3,3,2,0];this.pretab=v,this.sfBandIndex=[new s([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 s([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 s([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 s([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 s([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 s([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 s([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 s([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 s([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 g=o(p+d+1),S=o(p),w=o(m),M=o(m);function R(e,t){var s=a.ATHformula(t,e);return s-=100,Math.pow(10,s/10+e.ATHlower)}function A(e){this.s=e}this.adj43=M,this.iteration_init=function(t){var a,s=t.internal_flags,n=s.l3_side;if(0==s.iteration_init_init){for(s.iteration_init_init=1,n.main_data_begin=0,function(e){for(var t=e.internal_flags.ATH.l,a=e.internal_flags.ATH.psfb21,s=e.internal_flags.ATH.s,n=e.internal_flags.ATH.psfb12,r=e.internal_flags,i=e.out_samplerate,o=0;o<h.SBMAX_l;o++){var l=r.scalefac_band.l[o],f=r.scalefac_band.l[o+1];t[o]=_.MAX_VALUE;for(var c=l;c<f;c++){var u=R(e,c*i/1152);t[o]=Math.min(t[o],u)}}for(o=0;o<h.PSFB21;o++)for(l=r.scalefac_band.psfb21[o],f=r.scalefac_band.psfb21[o+1],a[o]=_.MAX_VALUE,c=l;c<f;c++)u=R(e,c*i/1152),a[o]=Math.min(a[o],u);for(o=0;o<h.SBMAX_s;o++){for(l=r.scalefac_band.s[o],f=r.scalefac_band.s[o+1],s[o]=_.MAX_VALUE,c=l;c<f;c++)u=R(e,c*i/384),s[o]=Math.min(s[o],u);s[o]*=r.scalefac_band.s[o+1]-r.scalefac_band.s[o]}for(o=0;o<h.PSFB12;o++){for(l=r.scalefac_band.psfb12[o],f=r.scalefac_band.psfb12[o+1],n[o]=_.MAX_VALUE,c=l;c<f;c++)u=R(e,c*i/384),n[o]=Math.min(n[o],u);n[o]*=r.scalefac_band.s[13]-r.scalefac_band.s[12]}if(e.noATH){for(o=0;o<h.SBMAX_l;o++)t[o]=1e-20;for(o=0;o<h.PSFB21;o++)a[o]=1e-20;for(o=0;o<h.SBMAX_s;o++)s[o]=1e-20;for(o=0;o<h.PSFB12;o++)n[o]=1e-20}r.ATH.floor=10*Math.log10(R(e,-1))}(t),w[0]=0,a=1;a<m;a++)w[a]=Math.pow(a,4/3);for(a=0;a<m-1;a++)M[a]=a+1-Math.pow(.5*(w[a]+w[a+1]),.75);for(M[a]=.5,a=0;a<p;a++)S[a]=Math.pow(2,-.1875*(a-210));for(a=0;a<=p+d;a++)g[a]=Math.pow(2,.25*(a-210-d));var r,i,o,l;for(e.huffman_init(s),(a=t.exp_nspsytune>>2&63)>=32&&(a-=64),r=Math.pow(10,a/4/10),(a=t.exp_nspsytune>>8&63)>=32&&(a-=64),i=Math.pow(10,a/4/10),(a=t.exp_nspsytune>>14&63)>=32&&(a-=64),o=Math.pow(10,a/4/10),(a=t.exp_nspsytune>>20&63)>=32&&(a-=64),l=o*Math.pow(10,a/4/10),a=0;a<h.SBMAX_l;a++)f=a<=6?r:a<=13?i:a<=20?o:l,s.nsPsy.longfact[a]=f;for(a=0;a<h.SBMAX_s;a++){var f;f=a<=5?r:a<=10?i:a<=11?o:l,s.nsPsy.shortfact[a]=f}}},this.on_pe=function(e,a,s,n,r,_){var i,o,h=e.internal_flags,b=0,m=l(2),p=new c(b),d=t.ResvMaxBits(e,n,p,_),v=(b=p.bits)+d;for(v>u.MAX_BITS_PER_GRANULE&&(v=u.MAX_BITS_PER_GRANULE),i=0,o=0;o<h.channels_out;++o)s[o]=Math.min(u.MAX_BITS_PER_CHANNEL,b/h.channels_out),m[o]=0|s[o]*a[r][o]/700-s[o],m[o]>3*n/4&&(m[o]=3*n/4),m[o]<0&&(m[o]=0),m[o]+s[o]>u.MAX_BITS_PER_CHANNEL&&(m[o]=Math.max(0,u.MAX_BITS_PER_CHANNEL-s[o])),i+=m[o];if(i>d)for(o=0;o<h.channels_out;++o)m[o]=d*m[o]/i;for(o=0;o<h.channels_out;++o)s[o]+=m[o],d-=m[o];for(i=0,o=0;o<h.channels_out;++o)i+=s[o];if(i>u.MAX_BITS_PER_GRANULE){var g=0;for(o=0;o<h.channels_out;++o)s[o]*=u.MAX_BITS_PER_GRANULE,s[o]/=i,g+=s[o];f(g<=u.MAX_BITS_PER_GRANULE)}return v},this.reduce_side=function(e,t,a,s){f(s<=u.MAX_BITS_PER_GRANULE),f(e[0]+e[1]<=u.MAX_BITS_PER_GRANULE);var n=.33*(.5-t)/.5;n<0&&(n=0),n>.5&&(n=.5);var r=0|.5*n*(e[0]+e[1]);r>u.MAX_BITS_PER_CHANNEL-e[0]&&(r=u.MAX_BITS_PER_CHANNEL-e[0]),r<0&&(r=0),e[1]>=125&&(e[1]-r>125?(e[0]<a&&(e[0]+=r),e[1]-=r):(e[0]+=e[1]-125,e[1]=125)),(r=e[0]+e[1])>s&&(e[0]=s*e[0]/r,e[1]=s*e[1]/r),f(e[0]<=u.MAX_BITS_PER_CHANNEL),f(e[1]<=u.MAX_BITS_PER_CHANNEL),f(e[0]+e[1]<=u.MAX_BITS_PER_GRANULE)},this.athAdjust=function(e,t,a){var s=90.30873362,n=i.FAST_LOG10_X(t,10),r=e*e,_=0;return n-=a,r>1e-20&&(_=1+i.FAST_LOG10_X(r,10/s)),_<0&&(_=0),n*=_,n+=a+s-94.82444863,Math.pow(10,.1*n)},this.calc_xmin=function(e,t,a,s){var _,i=0,o=e.internal_flags,l=0,f=0,c=o.ATH,u=a.xr,b=e.VBR==r.vbr_mtrh?1:0,m=o.masking_lower;for(e.VBR!=r.vbr_mtrh&&e.VBR!=r.vbr_mt||(m=1),_=0;_<a.psy_lmax;_++){R=(M=e.VBR==r.vbr_rh||e.VBR==r.vbr_mtrh?athAdjust(c.adjust,c.l[_],c.floor):c.adjust*c.l[_])/(g=a.width[_]),A=n,T=g>>1,E=0;do{E+=k=u[l]*u[l],A+=k<R?k:R,E+=x=u[++l]*u[l],A+=x<R?x:R,l++}while(--T>0);E>M&&f++,_==h.SBPSY_l&&A<(y=M*o.nsPsy.longfact[_])&&(A=y),0!=b&&(M=A),e.ATHonly||(B=t.en.l[_])>0&&(y=E*t.thm.l[_]*m/B,0!=b&&(y*=o.nsPsy.longfact[_]),M<y&&(M=y)),s[i++]=0!=b?M:M*o.nsPsy.longfact[_]}var p=575;if(a.block_type!=h.SHORT_TYPE)for(var d=576;0!=d--&&BitStream.EQ(u[d],0);)p=d;a.max_nonzero_coeff=p;for(var v=a.sfb_smin;_<a.psymax;v++,_+=3){var g,S,w;for(w=e.VBR==r.vbr_rh||e.VBR==r.vbr_mtrh?athAdjust(c.adjust,c.s[v],c.floor):c.adjust*c.s[v],g=a.width[_],S=0;S<3;S++){var M,R,A,B,y,E=0,T=g>>1;R=w/g,A=n;do{var k,x;E+=k=u[l]*u[l],A+=k<R?k:R,E+=x=u[++l]*u[l],A+=x<R?x:R,l++}while(--T>0);E>w&&f++,v==h.SBPSY_s&&A<(y=w*o.nsPsy.shortfact[v])&&(A=y),M=0!=b?A:w,e.ATHonly||e.ATHshort||(B=t.en.s[v][S])>0&&(y=E*t.thm.s[v][S]*m/B,0!=b&&(y*=o.nsPsy.shortfact[v]),M<y&&(M=y)),s[i++]=0!=b?M:M*o.nsPsy.shortfact[v]}e.useTemporal&&(s[i-3]>s[i-3+1]&&(s[i-3+1]+=(s[i-3]-s[i-3+1])*o.decay),s[i-3+1]>s[i-3+2]&&(s[i-3+2]+=(s[i-3+1]-s[i-3+2])*o.decay))}return f},this.calc_noise_core=function(e,t,a,s){var n=0,r=t.s,_=e.l3_enc;if(r>e.count1)for(;0!=a--;)l=e.xr[r],r++,n+=l*l,l=e.xr[r],r++,n+=l*l;else if(r>e.big_values){var i=o(2);for(i[0]=0,i[1]=s;0!=a--;)l=Math.abs(e.xr[r])-i[_[r]],r++,n+=l*l,l=Math.abs(e.xr[r])-i[_[r]],r++,n+=l*l}else for(;0!=a--;){var l;l=Math.abs(e.xr[r])-w[_[r]]*s,r++,n+=l*l,l=Math.abs(e.xr[r])-w[_[r]]*s,r++,n+=l*l}return t.s=r,n},this.calc_noise=function(e,t,a,s,n){var r,_,o,l=0,h=0,c=0,u=0,m=0,p=-20,d=0,S=e.scalefac,w=0;for(s.over_SSD=0,r=0;r<e.psymax;r++){var M,R=e.global_gain-(S[w++]+(0!=e.preflag?v[r]:0)<<e.scalefac_scale+1)-8*e.subblock_gain[e.window[r]],B=0;if(null!=n&&n.step[r]==R)B=n.noise[r],d+=e.width[r],a[l++]=B/t[h++],B=n.noise_log[r];else{var y,E=(f(0<=(o=R)+b.Q_MAX2&&o<b.Q_MAX),g[o+b.Q_MAX2]);_=e.width[r]>>1,d+e.width[r]>e.max_nonzero_coeff&&(_=(y=e.max_nonzero_coeff-d+1)>0?y>>1:0);var T=new A(d);B=this.calc_noise_core(e,T,_,E),d=T.s,null!=n&&(n.step[r]=R,n.noise[r]=B),B=a[l++]=B/t[h++],B=i.FAST_LOG10(Math.max(B,1e-20)),null!=n&&(n.noise_log[r]=B)}null!=n&&(n.global_gain=e.global_gain),m+=B,B>0&&(M=Math.max(0|10*B+.5,1),s.over_SSD+=M*M,c++,u+=B),p=Math.max(p,B)}return s.over_count=c,s.tot_noise=m,s.over_noise=u,s.max_noise=p,c},this.set_pinfo=function(e,t,a,s,n){var r,_,i,l,c,u=e.internal_flags,b=0==t.scalefac_scale?.5:1,m=t.scalefac,p=o(L3Side.SFBMAX),d=o(L3Side.SFBMAX),g=new CalcNoiseResult;calc_xmin(e,a,t,p),calc_noise(t,p,d,g,null);var S=0;for(_=t.sfb_lmax,t.block_type!=h.SHORT_TYPE&&0==t.mixed_block_flag&&(_=22),r=0;r<_;r++){var w=u.scalefac_band.l[r],M=(R=u.scalefac_band.l[r+1])-w;for(l=0;S<R;S++)l+=t.xr[S]*t.xr[S];l/=M,c=1e15,u.pinfo.en[s][n][r]=c*l,u.pinfo.xfsf[s][n][r]=c*p[r]*d[r]/M,a.en.l[r]>0&&!e.ATHonly?l/=a.en.l[r]:l=0,u.pinfo.thr[s][n][r]=c*Math.max(l*a.thm.l[r],u.ATH.l[r]),u.pinfo.LAMEsfb[s][n][r]=0,0!=t.preflag&&r>=11&&(u.pinfo.LAMEsfb[s][n][r]=-b*v[r]),r<h.SBPSY_l&&(f(m[r]>=0),u.pinfo.LAMEsfb[s][n][r]-=b*m[r])}if(t.block_type==h.SHORT_TYPE)for(_=r,r=t.sfb_smin;r<h.SBMAX_s;r++){w=u.scalefac_band.s[r],M=(R=u.scalefac_band.s[r+1])-w;for(var R,A=0;A<3;A++){for(l=0,i=w;i<R;i++)l+=t.xr[S]*t.xr[S],S++;l=Math.max(l/M,1e-20),c=1e15,u.pinfo.en_s[s][n][3*r+A]=c*l,u.pinfo.xfsf_s[s][n][3*r+A]=c*p[_]*d[_]/M,a.en.s[r][A]>0?l/=a.en.s[r][A]:l=0,(e.ATHonly||e.ATHshort)&&(l=0),u.pinfo.thr_s[s][n][3*r+A]=c*Math.max(l*a.thm.s[r][A],u.ATH.s[r]),u.pinfo.LAMEsfb_s[s][n][3*r+A]=-2*t.subblock_gain[A],r<h.SBPSY_s&&(u.pinfo.LAMEsfb_s[s][n][3*r+A]-=b*m[_]),_++}}u.pinfo.LAMEqss[s][n]=t.global_gain,u.pinfo.LAMEmainbits[s][n]=t.part2_3_length+t.part2_length,u.pinfo.LAMEsfbits[s][n]=t.part2_length,u.pinfo.over[s][n]=g.over_count,u.pinfo.max_noise[s][n]=10*g.max_noise,u.pinfo.over_noise[s][n]=10*g.over_noise,u.pinfo.tot_noise[s][n]=10*g.tot_noise,u.pinfo.over_SSD[s][n]=g.over_SSD}}b.Q_MAX=257,b.Q_MAX2=116,b.LARGE_BITS=1e5,b.IXMAX_VAL=8206,e.exports=b},62:(e,t,a)=>{var s=a(38),n=(s.System,s.VbrMode,s.Float,s.ShortBlock,s.Util,s.Arrays,s.new_array_n,s.new_byte,s.new_double,s.new_float),r=(s.new_float_n,s.new_int),_=(s.new_int_n,s.assert,a(287));e.exports=function(){this.linprebuf=n(2*_.MAX_ORDER),this.linpre=0,this.lstepbuf=n(_.MAX_SAMPLES_PER_WINDOW+_.MAX_ORDER),this.lstep=0,this.loutbuf=n(_.MAX_SAMPLES_PER_WINDOW+_.MAX_ORDER),this.lout=0,this.rinprebuf=n(2*_.MAX_ORDER),this.rinpre=0,this.rstepbuf=n(_.MAX_SAMPLES_PER_WINDOW+_.MAX_ORDER),this.rstep=0,this.routbuf=n(_.MAX_SAMPLES_PER_WINDOW+_.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=r(0|_.STEPS_per_dB*_.MAX_dB),this.B=r(0|_.STEPS_per_dB*_.MAX_dB)}},60:(e,t,a)=>{var s=a(38).assert;e.exports=function(){var e;this.setModules=function(t){e=t},this.ResvFrameBegin=function(t,a){var n,r=t.internal_flags,_=r.l3_side,i=e.getframebits(t);a.bits=(i-8*r.sideinfo_len)/r.mode_gr;var o=2048*r.mode_gr-8;t.brate>320?n=8*int(1e3*t.brate/(t.out_samplerate/1152)/8+.5):(n=11520,t.strict_ISO&&(n=8*int(32e4/(t.out_samplerate/1152)/8+.5))),r.ResvMax=n-i,r.ResvMax>o&&(r.ResvMax=o),(r.ResvMax<0||t.disable_reservoir)&&(r.ResvMax=0);var l=a.bits*r.mode_gr+Math.min(r.ResvSize,r.ResvMax);return l>n&&(l=n),s(0==r.ResvMax%8),s(r.ResvMax>=0),_.resvDrain_pre=0,null!=r.pinfo&&(r.pinfo.mean_bits=a.bits/2,r.pinfo.resvsize=r.ResvSize),l},this.ResvMaxBits=function(e,t,a,s){var n,r=e.internal_flags,_=r.ResvSize,i=r.ResvMax;0!=s&&(_+=t),0!=(1&r.substep_shaping)&&(i*=.9),a.bits=t,10*_>9*i?(n=_-9*i/10,a.bits+=n,r.substep_shaping|=128):(n=0,r.substep_shaping&=127,e.disable_reservoir||0!=(1&r.substep_shaping)||(a.bits-=.1*t));var o=_<6*r.ResvMax/10?_:6*r.ResvMax/10;return(o-=n)<0&&(o=0),o},this.ResvAdjust=function(e,t){e.ResvSize-=t.part2_3_length+t.part2_length},this.ResvFrameEnd=function(e,t){var a,n=e.l3_side;e.ResvSize+=t*e.mode_gr;var r=0;n.resvDrain_post=0,n.resvDrain_pre=0,0!=(a=e.ResvSize%8)&&(r+=a),(a=e.ResvSize-r-e.ResvMax)>0&&(s(0==a%8),s(a>=0),r+=a);var _=Math.min(8*n.main_data_begin,r)/8;n.resvDrain_pre+=8*_,r-=8*_,e.ResvSize-=8*_,n.main_data_begin-=_,n.resvDrain_post+=r,e.ResvSize-=r}}},302:(e,t,a)=>{var s=a(38),n=s.System,r=(s.VbrMode,s.Float,s.ShortBlock,s.Util,s.Arrays,s.new_array_n,s.new_byte,s.new_double,s.new_float,s.new_float_n,s.new_int),_=(s.new_int_n,s.assert,a(687));e.exports=function(e,t,a,s){this.l=r(1+_.SBMAX_l),this.s=r(1+_.SBMAX_s),this.psfb21=r(1+_.PSFB21),this.psfb12=r(1+_.PSFB12);var i=this.l,o=this.s;4==arguments.length&&(this.arrL=arguments[0],this.arrS=arguments[1],this.arr21=arguments[2],this.arr12=arguments[3],n.arraycopy(this.arrL,0,i,0,Math.min(this.arrL.length,this.l.length)),n.arraycopy(this.arrS,0,o,0,Math.min(this.arrS.length,this.s.length)),n.arraycopy(this.arr21,0,this.psfb21,0,Math.min(this.arr21.length,this.psfb21.length)),n.arraycopy(this.arr12,0,this.psfb12,0,Math.min(this.arr12.length,this.psfb12.length)))}},721:e=>{function t(e,t,a,s){this.xlen=e,this.linmax=t,this.table=a,this.hlen=s}var a={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]};a.ht=[new t(0,0,null,null),new t(2,0,a.t1HB,a.t1l),new t(3,0,a.t2HB,a.t2l),new t(3,0,a.t3HB,a.t3l),new t(0,0,null,null),new t(4,0,a.t5HB,a.t5l),new t(4,0,a.t6HB,a.t6l),new t(6,0,a.t7HB,a.t7l),new t(6,0,a.t8HB,a.t8l),new t(6,0,a.t9HB,a.t9l),new t(8,0,a.t10HB,a.t10l),new t(8,0,a.t11HB,a.t11l),new t(8,0,a.t12HB,a.t12l),new t(16,0,a.t13HB,a.t13l),new t(0,0,null,a.t16_5l),new t(16,0,a.t15HB,a.t15l),new t(1,1,a.t16HB,a.t16l),new t(2,3,a.t16HB,a.t16l),new t(3,7,a.t16HB,a.t16l),new t(4,15,a.t16HB,a.t16l),new t(6,63,a.t16HB,a.t16l),new t(8,255,a.t16HB,a.t16l),new t(10,1023,a.t16HB,a.t16l),new t(13,8191,a.t16HB,a.t16l),new t(4,15,a.t24HB,a.t24l),new t(5,31,a.t24HB,a.t24l),new t(6,63,a.t24HB,a.t24l),new t(7,127,a.t24HB,a.t24l),new t(8,255,a.t24HB,a.t24l),new t(9,511,a.t24HB,a.t24l),new t(11,2047,a.t24HB,a.t24l),new t(13,8191,a.t24HB,a.t24l),new t(0,0,a.t32HB,a.t32l),new t(0,0,a.t33HB,a.t33l)],a.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],a.table23=[65538,262147,458759,262148,327684,458759,393222,458759,524296],a.table56=[65539,262148,458758,524296,262148,327684,524294,589831,458757,524294,589831,655368,524295,524295,589832,655369],a.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]],a.samplerate_table=[[22050,24e3,16e3,-1],[44100,48e3,32e3,-1],[11025,12e3,8e3,-1]],a.scfsi_band=[0,6,11,16,21],e.exports=a},638:(e,t,a)=>{var s=a(38),n=s.System,r=(s.VbrMode,s.Float,s.ShortBlock,s.Util,s.Arrays),_=(s.new_array_n,s.new_byte,s.new_double,s.new_float,s.new_float_n,s.new_int),i=(s.new_int_n,s.assert),o=a(687),l=a(721),f=a(438),h=a(429);e.exports=function e(){var t=null;function a(e){this.bits=0|e}this.qupvt=null,this.setModules=function(e){this.qupvt=e,t=e};var s=[[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 c(e,t,a,s,n,r){var _=.5946/t;for(i(e>0),e>>=1;0!=e--;)n[r++]=_>a[s++]?0:1,n[r++]=_>a[s++]?0:1}function u(e,a,s,n,r,_){i(e>0);var o=(e>>=1)%2;for(e>>=1;0!=e--;){var l,f,h,c,u,b,m,p;l=s[n++]*a,f=s[n++]*a,u=0|l,h=s[n++]*a,b=0|f,c=s[n++]*a,m=0|h,l+=t.adj43[u],p=0|c,f+=t.adj43[b],r[_++]=0|l,h+=t.adj43[m],r[_++]=0|f,c+=t.adj43[p],r[_++]=0|h,r[_++]=0|c}0!=o&&(u=0|(l=s[n++]*a),b=0|(f=s[n++]*a),l+=t.adj43[u],f+=t.adj43[b],r[_++]=0|l,r[_++]=0|f)}var b=[1,2,5,7,7,10,10,13,13,13,13,13,13,13,13];function m(e,t,a,s){var n=function(e,t,a){var s=0,n=0;do{var r=e[t++],_=e[t++];s<r&&(s=r),n<_&&(n=_)}while(t<a);return s<n&&(s=n),s}(e,t,a);switch(n){case 0:return n;case 1:return function(e,t,a,s){var n=0,r=l.ht[1].hlen;do{var _=2*e[t+0]+e[t+1];t+=2,n+=r[_]}while(t<a);return s.bits+=n,1}(e,t,a,s);case 2:case 3:return function(e,t,a,s,n){var r,_,i=0,o=l.ht[s].xlen;_=2==s?l.table23:l.table56;do{var f=e[t+0]*o+e[t+1];t+=2,i+=_[f]}while(t<a);return r=65535&i,(i>>=16)>r&&(i=r,s++),n.bits+=i,s}(e,t,a,b[n-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,a,s,n){var r=0,_=0,i=0,o=l.ht[s].xlen,f=l.ht[s].hlen,h=l.ht[s+1].hlen,c=l.ht[s+2].hlen;do{var u=e[t+0]*o+e[t+1];t+=2,r+=f[u],_+=h[u],i+=c[u]}while(t<a);var b=s;return r>_&&(r=_,b++),r>i&&(r=i,b=s+2),n.bits+=r,b}(e,t,a,b[n-1],s);default:if(n>h.IXMAX_VAL)return s.bits=h.LARGE_BITS,-1;var r,_;for(n-=15,r=24;r<32&&!(l.ht[r].linmax>=n);r++);for(_=r-8;_<24&&!(l.ht[_].linmax>=n);_++);return function(e,t,a,s,n,r){var _,i=65536*l.ht[s].xlen+l.ht[n].xlen,o=0;do{var f=e[t++],h=e[t++];0!=f&&(f>14&&(f=15,o+=i),f*=16),0!=h&&(h>14&&(h=15,o+=i),f+=h),o+=l.largetbl[f]}while(t<a);return _=65535&o,(o>>=16)>_&&(o=_,s=n),r.bits+=o,s}(e,t,a,_,r,s)}}function p(e,t,s,n,r,_,i,l){for(var f=t.big_values,h=2;h<o.SBMAX_l+1;h++){var c=e.scalefac_band.l[h];if(c>=f)break;var u=r[h-2]+t.count1bits;if(s.part2_3_length<=u)break;var b=new a(u),p=m(n,c,f,b);u=b.bits,s.part2_3_length<=u||(s.assign(t),s.part2_3_length=u,s.region0_count=_[h-2],s.region1_count=h-2-_[h-2],s.table_select[0]=i[h-2],s.table_select[1]=l[h-2],s.table_select[2]=p)}}this.noquant_count_bits=function(e,t,s){var n=t.l3_enc,r=Math.min(576,t.max_nonzero_coeff+2>>1<<1);for(null!=s&&(s.sfb_count1=0);r>1&&0==(n[r-1]|n[r-2]);r-=2);t.count1=r;for(var _=0,f=0;r>3;r-=4){var h;if((2147483647&(n[r-1]|n[r-2]|n[r-3]|n[r-4]))>1)break;h=2*(2*(2*n[r-4]+n[r-3])+n[r-2])+n[r-1],_+=l.t32l[h],f+=l.t33l[h]}var c=_;if(t.count1table_select=0,_>f&&(c=f,t.count1table_select=1),t.count1bits=c,t.big_values=r,0==r)return c;if(t.block_type==o.SHORT_TYPE)(_=3*e.scalefac_band.s[3])>t.big_values&&(_=t.big_values),f=t.big_values;else if(t.block_type==o.NORM_TYPE){if(i(r<=576),_=t.region0_count=e.bv_scf[r-2],f=t.region1_count=e.bv_scf[r-1],i(_+f+2<o.SBPSY_l),f=e.scalefac_band.l[_+f+2],_=e.scalefac_band.l[_+1],f<r){var u=new a(c);t.table_select[2]=m(n,f,r,u),c=u.bits}}else t.region0_count=7,t.region1_count=o.SBMAX_l-1-7-1,(_=e.scalefac_band.l[8])>(f=r)&&(_=f);if(_=Math.min(_,r),f=Math.min(f,r),i(_>=0),i(f>=0),0<_&&(u=new a(c),t.table_select[0]=m(n,0,_,u),c=u.bits),_<f&&(u=new a(c),t.table_select[1]=m(n,_,f,u),c=u.bits),2==e.use_best_huffman&&(t.part2_3_length=c,best_huffman_divide(e,t),c=t.part2_3_length),null!=s&&t.block_type==o.NORM_TYPE){for(var b=0;e.scalefac_band.l[b]<t.big_values;)b++;s.sfb_count1=b}return c},this.count_bits=function(e,a,s,n){var _=s.l3_enc,l=h.IXMAX_VAL/t.IPOW20(s.global_gain);if(s.xrpow_max>l)return h.LARGE_BITS;if(function(e,a,s,n,_){var l,f,h,b=0,m=0,p=0,d=0,v=a,g=0,S=v,w=0,M=e,R=0;for(h=null!=_&&n.global_gain==_.global_gain,f=n.block_type==o.SHORT_TYPE?38:21,l=0;l<=f;l++){var A=-1;if((h||n.block_type==o.NORM_TYPE)&&(A=n.global_gain-(n.scalefac[l]+(0!=n.preflag?t.pretab[l]:0)<<n.scalefac_scale+1)-8*n.subblock_gain[n.window[l]]),i(n.width[l]>=0),h&&_.step[l]==A)0!=m&&(u(m,s,M,R,S,w),m=0),0!=p&&(c(p,s,M,R,S,w),p=0);else{var B,y=n.width[l];if(b+n.width[l]>n.max_nonzero_coeff&&(B=n.max_nonzero_coeff-b+1,r.fill(a,n.max_nonzero_coeff,576,0),(y=B)<0&&(y=0),l=f+1),0==m&&0==p&&(S=v,w=g,M=e,R=d),null!=_&&_.sfb_count1>0&&l>=_.sfb_count1&&_.step[l]>0&&A>=_.step[l]?(0!=m&&(u(m,s,M,R,S,w),m=0,S=v,w=g,M=e,R=d),p+=y):(0!=p&&(c(p,s,M,R,S,w),p=0,S=v,w=g,M=e,R=d),m+=y),y<=0){0!=p&&(c(p,s,M,R,S,w),p=0),0!=m&&(u(m,s,M,R,S,w),m=0);break}}l<=f&&(g+=n.width[l],d+=n.width[l],b+=n.width[l])}0!=m&&(u(m,s,M,R,S,w),m=0),0!=p&&(c(p,s,M,R,S,w),p=0)}(a,_,t.IPOW20(s.global_gain),s,n),0!=(2&e.substep_shaping))for(var f=0,b=s.global_gain+s.scalefac_scale,m=.634521682242439/t.IPOW20(b),p=0;p<s.sfbmax;p++){var d,v=s.width[p];if(i(v>=0),0==e.pseudohalf[p])f+=v;else for(d=f,f+=v;d<f;++d)_[d]=a[d]>=m?_[d]:0}return this.noquant_count_bits(e,s,n)},this.best_huffman_divide=function(e,t){var s=new f,n=t.l3_enc,r=_(23),c=_(23),u=_(23),b=_(23);if(t.block_type!=o.SHORT_TYPE||1!=e.mode_gr){s.assign(t),t.block_type==o.NORM_TYPE&&(function(e,t,s,n,r,_,i){for(var o=t.big_values,l=0;l<=22;l++)n[l]=h.LARGE_BITS;for(l=0;l<16;l++){var f=e.scalefac_band.l[l+1];if(f>=o)break;var c=0,u=new a(c),b=m(s,0,f,u);c=u.bits;for(var p=0;p<8;p++){var d=e.scalefac_band.l[l+p+2];if(d>=o)break;var v=c,g=m(s,f,d,u=new a(v));v=u.bits,n[l+p]>v&&(n[l+p]=v,r[l+p]=l,_[l+p]=b,i[l+p]=g)}}}(e,t,n,r,c,u,b),p(e,s,t,n,r,c,u,b));var d=s.big_values;if(!(0==d||(n[d-2]|n[d-1])>1||(d=t.count1+2)>576)){s.assign(t),s.count1=d;var v=0,g=0;for(i(d<=576);d>s.big_values;d-=4){var S=2*(2*(2*n[d-4]+n[d-3])+n[d-2])+n[d-1];v+=l.t32l[S],g+=l.t33l[S]}if(s.big_values=d,s.count1table_select=0,v>g&&(v=g,s.count1table_select=1),s.count1bits=v,s.block_type==o.NORM_TYPE)p(e,s,t,n,r,c,u,b);else{if(s.part2_3_length=v,(v=e.scalefac_band.l[8])>d&&(v=d),v>0){var w=new a(s.part2_3_length);s.table_select[0]=m(n,0,v,w),s.part2_3_length=w.bits}d>v&&(w=new a(s.part2_3_length),s.table_select[1]=m(n,v,d,w),s.part2_3_length=w.bits),t.part2_3_length>s.part2_3_length&&t.assign(s)}}}};var d=[1,1,1,1,8,2,2,2,4,4,4,8,8,8,16,16],v=[1,2,4,8,1,2,4,8,2,4,8,2,4,8,4,8],g=[0,0,0,0,3,1,1,1,2,2,2,3,3,3,4,4],S=[0,1,2,3,0,1,2,3,1,2,3,1,2,3,2,3];e.slen1_tab=g,e.slen2_tab=S,this.best_scalefac_store=function(e,a,s,n){var r,_,f,h,c=n.tt[a][s],u=0;for(f=0,r=0;r<c.sfbmax;r++){var b=c.width[r];for(i(b>=0),f+=b,h=-b;h<0&&0==c.l3_enc[h+f];h++);0==h&&(c.scalefac[r]=u=-2)}if(0==c.scalefac_scale&&0==c.preflag){var m=0;for(r=0;r<c.sfbmax;r++)c.scalefac[r]>0&&(m|=c.scalefac[r]);if(0==(1&m)&&0!=m){for(r=0;r<c.sfbmax;r++)c.scalefac[r]>0&&(c.scalefac[r]>>=1);c.scalefac_scale=u=1}}if(0==c.preflag&&c.block_type!=o.SHORT_TYPE&&2==e.mode_gr){for(r=11;r<o.SBPSY_l&&!(c.scalefac[r]<t.pretab[r]&&-2!=c.scalefac[r]);r++);if(r==o.SBPSY_l){for(r=11;r<o.SBPSY_l;r++)c.scalefac[r]>0&&(c.scalefac[r]-=t.pretab[r]);c.preflag=u=1}}for(_=0;_<4;_++)n.scfsi[s][_]=0;for(2==e.mode_gr&&1==a&&n.tt[0][s].block_type!=o.SHORT_TYPE&&n.tt[1][s].block_type!=o.SHORT_TYPE&&(function(e,t){for(var a,s=t.tt[1][e],n=t.tt[0][e],r=0;r<l.scfsi_band.length-1;r++){for(a=l.scfsi_band[r];a<l.scfsi_band[r+1]&&!(n.scalefac[a]!=s.scalefac[a]&&s.scalefac[a]>=0);a++);if(a==l.scfsi_band[r+1]){for(a=l.scfsi_band[r];a<l.scfsi_band[r+1];a++)s.scalefac[a]=-1;t.scfsi[e][r]=1}}var _=0,i=0;for(a=0;a<11;a++)-1!=s.scalefac[a]&&(i++,_<s.scalefac[a]&&(_=s.scalefac[a]));for(var f=0,h=0;a<o.SBPSY_l;a++)-1!=s.scalefac[a]&&(h++,f<s.scalefac[a]&&(f=s.scalefac[a]));for(r=0;r<16;r++)if(_<d[r]&&f<v[r]){var c=g[r]*i+S[r]*h;s.part2_length>c&&(s.part2_length=c,s.scalefac_compress=r)}}(s,n),u=0),r=0;r<c.sfbmax;r++)-2==c.scalefac[r]&&(c.scalefac[r]=0);0!=u&&(2==e.mode_gr?this.scale_bitcount(c):this.scale_bitcount_lsf(e,c))};var w=[0,18,36,54,54,36,54,72,54,72,90,72,90,108,108,126],M=[0,18,36,54,51,35,53,71,52,70,88,69,87,105,104,122],R=[0,10,20,30,33,21,31,41,32,42,52,43,53,63,64,74];this.scale_bitcount=function(e){var a,s,n,r=0,_=0,l=e.scalefac;if(i(function(e,t){for(var a=0;a<t;++a)if(e[a]<0)return!1;return!0}(l,e.sfbmax)),e.block_type==o.SHORT_TYPE)n=w,0!=e.mixed_block_flag&&(n=M);else if(n=R,0==e.preflag){for(s=11;s<o.SBPSY_l&&!(l[s]<t.pretab[s]);s++);if(s==o.SBPSY_l)for(e.preflag=1,s=11;s<o.SBPSY_l;s++)l[s]-=t.pretab[s]}for(s=0;s<e.sfbdivide;s++)r<l[s]&&(r=l[s]);for(;s<e.sfbmax;s++)_<l[s]&&(_=l[s]);for(e.part2_length=h.LARGE_BITS,a=0;a<16;a++)r<d[a]&&_<v[a]&&e.part2_length>n[a]&&(e.part2_length=n[a],e.scalefac_compress=a);return e.part2_length==h.LARGE_BITS};var A=[[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,a){var s,r,l,f,h,c,u,b,m=_(4),p=a.scalefac;for(s=0!=a.preflag?2:0,u=0;u<4;u++)m[u]=0;if(a.block_type==o.SHORT_TYPE){r=1;var d=t.nr_of_sfb_block[s][r];for(b=0,l=0;l<4;l++)for(f=d[l]/3,u=0;u<f;u++,b++)for(h=0;h<3;h++)p[3*b+h]>m[l]&&(m[l]=p[3*b+h])}else for(r=0,d=t.nr_of_sfb_block[s][r],b=0,l=0;l<4;l++)for(f=d[l],u=0;u<f;u++,b++)p[b]>m[l]&&(m[l]=p[b]);for(c=!1,l=0;l<4;l++)m[l]>A[s][l]&&(c=!0);if(!c){var v,g,S,w;for(a.sfb_partition_table=t.nr_of_sfb_block[s][r],l=0;l<4;l++)a.slen[l]=B[m[l]];switch(v=a.slen[0],g=a.slen[1],S=a.slen[2],w=a.slen[3],s){case 0:a.scalefac_compress=(5*v+g<<4)+(S<<2)+w;break;case 1:a.scalefac_compress=400+(5*v+g<<2)+S;break;case 2:a.scalefac_compress=500+3*v+g;break;default:n.err.printf("intensity stereo not implemented yet\n")}}if(!c)for(i(null!=a.sfb_partition_table),a.part2_length=0,l=0;l<4;l++)a.part2_length+=a.slen[l]*a.sfb_partition_table[l];return c};var B=[0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4];this.huffman_init=function(e){for(var t=2;t<=576;t+=2){for(var a,n=0;e.scalefac_band.l[++n]<t;);for(a=s[n][0];e.scalefac_band.l[a+1]>t;)a--;for(a<0&&(a=s[n][0]),e.bv_scf[t-2]=a,a=s[n][1];e.scalefac_band.l[a+e.bv_scf[t-2]+2]>t;)a--;a<0&&(a=s[n][1]),e.bv_scf[t-1]=a}}}},95:e=>{e.exports=function(){this.setModules=function(e,t){}}},362:e=>{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}},4:(e,t,a)=>{var s=a(38),n=s.System,r=s.VbrMode,_=(s.Float,s.ShortBlock),i=(s.Util,s.Arrays),o=(s.new_array_n,s.new_byte),l=(s.new_double,s.new_float,s.new_float_n,s.new_int,s.new_int_n,s.assert);function f(){var e,t,a;this.setModules=function(s,n,r){e=s,t=n,a=r};var s=f.NUMTOCENTRIES,h=f.MAXFRAMESIZE,c=s+4+4+4+4+4+9+1+1+8+1+1+3+1+1+2+4+2+2,u="Xing",b="Info",m=[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 p(e,t){var a=255&e[t+0];return a<<=8,a|=255&e[t+1],a<<=8,a|=255&e[t+2],(a<<=8)|255&e[t+3]}function d(e,t,a){e[t+0]=255&a>>24,e[t+1]=255&a>>16,e[t+2]=255&a>>8,e[t+3]=255&a}function v(e,t,a){e[t+0]=255&a>>8,e[t+1]=255&a}function g(e,t,a){return 255&(e<<t|a&~(-1<<t))}function S(t,a){var s=t.internal_flags;a[0]=g(a[0],8,255),a[1]=g(a[1],3,7),a[1]=g(a[1],1,t.out_samplerate<16e3?0:1),a[1]=g(a[1],1,t.version),a[1]=g(a[1],2,1),a[1]=g(a[1],1,t.error_protection?0:1),a[2]=g(a[2],4,s.bitrate_index),a[2]=g(a[2],2,s.samplerate_index),a[2]=g(a[2],1,0),a[2]=g(a[2],1,t.extension),a[3]=g(a[3],2,t.mode.ordinal()),a[3]=g(a[3],2,s.mode_ext),a[3]=g(a[3],1,t.copyright),a[3]=g(a[3],1,t.original),a[3]=g(a[3],2,t.emphasis),a[0]=255;var n,_,i=241&a[1];n=1==t.version?128:t.out_samplerate<16e3?32:64,t.VBR==r.vbr_off&&(n=t.brate),_=t.free_format?0:255&16*e.BitrateIndex(n,t.version,t.out_samplerate),1==t.version?(a[1]=255&(10|i),i=13&a[2],a[2]=255&(_|i)):(a[1]=255&(2|i),i=13&a[2],a[2]=255&(_|i))}function w(e,t){return t>>8^m[255&(t^e)]}this.addVbrFrame=function(e){var t=e.internal_flags,a=Tables.bitrate_table[e.version][t.bitrate_index];l(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 a=1;a<e.size;a+=2)e.bag[a/2]=e.bag[a];e.want*=2,e.pos/=2}}(t.VBR_seek_table,a)},this.getVbrTag=function(e){var t=new VBRTagData,a=0;t.flags=0;var n=e[a+1]>>3&1,r=e[a+2]>>2&3,_=e[a+3]>>6&3,i=e[a+2]>>4&15;if(i=Tables.bitrate_table[n][i],e[a+1]>>4==14?t.samprate=Tables.samplerate_table[2][r]:t.samprate=Tables.samplerate_table[n][r],!function(e,t){return new String(e,t,u.length(),null).equals(u)||new String(e,t,b.length(),null).equals(b)}(e,a+=0!=n?3!=_?36:21:3!=_?21:13))return null;a+=4,t.hId=n;var o=t.flags=p(e,a);if(a+=4,0!=(1&o)&&(t.frames=p(e,a),a+=4),0!=(2&o)&&(t.bytes=p(e,a),a+=4),0!=(4&o)){if(null!=t.toc)for(var l=0;l<s;l++)t.toc[l]=e[a+l];a+=s}t.vbrScale=-1,0!=(8&o)&&(t.vbrScale=p(e,a),a+=4),t.headersize=72e3*(n+1)*i/t.samprate;var f=e[(a+=21)+0]<<4;f+=e[a+1]>>4;var h=(15&e[a+1])<<8;return(f<0||f>3e3)&&(f=-1),((h+=255&e[a+2])<0||h>3e3)&&(h=-1),t.encDelay=f,t.encPadding=h,t},this.InitVbrTag=function(e){var a,s=e.internal_flags;a=1==e.version?128:e.out_samplerate<16e3?32:64,e.VBR==r.vbr_off&&(a=e.brate);var n=72e3*(e.version+1)*a/e.out_samplerate,_=s.sideinfo_len+c;if(s.VBR_seek_table.TotalFrameSize=n,n<_||n>h)e.bWriteVbrTag=!1;else{s.VBR_seek_table.nVbrNumFrames=0,s.VBR_seek_table.nBytesWritten=0,s.VBR_seek_table.sum=0,s.VBR_seek_table.seen=0,s.VBR_seek_table.want=1,s.VBR_seek_table.pos=0,null==s.VBR_seek_table.bag&&(s.VBR_seek_table.bag=new int[400],s.VBR_seek_table.size=400);var i=o(h);S(e,i);for(var l=s.VBR_seek_table.TotalFrameSize,f=0;f<l;++f)t.add_dummy_byte(e,255&i[f],1)}},this.updateMusicCRC=function(e,t,a,s){for(var n=0;n<s;++n)e[0]=w(t[a+n],e[0])},this.getLameTagFrame=function(e,l){var f=e.internal_flags;if(!e.bWriteVbrTag)return 0;if(f.Class_ID!=Lame.LAME_ID)return 0;if(f.VBR_seek_table.pos<=0)return 0;if(l.length<f.VBR_seek_table.TotalFrameSize)return f.VBR_seek_table.TotalFrameSize;i.fill(l,0,f.VBR_seek_table.TotalFrameSize,0),S(e,l);var h=o(s);if(e.free_format)for(var c=1;c<s;++c)h[c]=255&255*c/100;else!function(e,t){if(!(e.pos<=0))for(var a=1;a<s;++a){var n=a/s,r=0|Math.floor(n*e.pos);r>e.pos-1&&(r=e.pos-1);var _=0|256*e.bag[r]/e.sum;_>255&&(_=255),t[a]=255&_}}(f.VBR_seek_table,h);var m=f.sideinfo_len;e.error_protection&&(m-=2),e.VBR==r.vbr_off?(l[m++]=255&b.charAt(0),l[m++]=255&b.charAt(1),l[m++]=255&b.charAt(2),l[m++]=255&b.charAt(3)):(l[m++]=255&u.charAt(0),l[m++]=255&u.charAt(1),l[m++]=255&u.charAt(2),l[m++]=255&u.charAt(3)),d(l,m,15),d(l,m+=4,f.VBR_seek_table.nVbrNumFrames),m+=4;var p=f.VBR_seek_table.nBytesWritten+f.VBR_seek_table.TotalFrameSize;d(l,m,0|p),m+=4,n.arraycopy(h,0,l,m,h.length),m+=h.length,e.error_protection&&t.CRC_writeheader(f,l);var g=0;for(c=0;c<m;c++)g=w(l[c],g);return m+=function(e,t,s,n,r){var i,o,l,f,h,c,u=e.internal_flags,b=0,m=e.encoder_delay,p=e.encoder_padding,g=100-10*e.VBR_q-e.quality,S=a.getLameVeryShortVersion(),M=[1,5,3,2,4,0,3],R=0|(e.lowpassfreq/100+.5>255?255:e.lowpassfreq/100+.5),A=0,B=0,y=e.internal_flags.noise_shaping,E=0,T=0,k=0!=(1&e.exp_nspsytune),x=0!=(2&e.exp_nspsytune),P=!1,I=!1,L=e.internal_flags.nogap_total,O=e.internal_flags.nogap_current,V=e.ATHtype;switch(e.VBR){case vbr_abr:h=e.VBR_mean_bitrate_kbps;break;case vbr_off:h=e.brate;break;default:h=e.VBR_min_bitrate_kbps}switch(i=0+(e.VBR.ordinal()<M.length?M[e.VBR.ordinal()]:0),u.findReplayGain&&(u.RadioGain>510&&(u.RadioGain=510),u.RadioGain<-510&&(u.RadioGain=-510),B=8192,B|=3072,u.RadioGain>=0?B|=u.RadioGain:(B|=512,B|=-u.RadioGain)),u.findPeakSample&&(A=Math.abs(0|u.PeakSample/32767*Math.pow(2,23)+.5)),-1!=L&&(O>0&&(I=!0),O<L-1&&(P=!0)),f=V+((k?1:0)<<4)+((x?1:0)<<5)+((P?1:0)<<6)+((I?1:0)<<7),g<0&&(g=0),e.mode){case MONO:E=0;break;case STEREO:E=1;break;case DUAL_CHANNEL:E=2;break;case JOINT_STEREO:E=e.force_ms?4:3;break;case NOT_SET:default:E=7}c=e.in_samplerate<=32e3?0:48e3==e.in_samplerate?2:e.in_samplerate>48e3?3:1,(e.short_blocks==_.short_block_forced||e.short_blocks==_.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==V||e.in_samplerate<=32e3)&&(T=1),o=y+(E<<2)+(T<<5)+(c<<6),l=u.nMusicCRC,d(s,n+b,g),b+=4;for(var H=0;H<9;H++)s[n+b+H]=255&S.charAt(H);s[n+(b+=9)]=255&i,s[n+ ++b]=255&R,d(s,n+ ++b,A),v(s,n+(b+=4),B),v(s,n+(b+=2),0),s[n+(b+=2)]=255&f,s[n+ ++b]=h>=255?255:255&h,s[n+ ++b]=255&m>>4,s[n+b+1]=255&(m<<4)+(p>>8),s[n+b+2]=255&p,s[n+(b+=3)]=255&o,b++,s[n+b++]=0,v(s,n+b,e.preset),d(s,n+(b+=2),t),v(s,n+(b+=4),l),b+=2;for(var N=0;N<b;N++)r=w(s[n+N],r);return v(s,n+b,r),b+2}(e,p,l,m,g),f.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 a=function(e){e.seek(0);var t=o(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(a);var s=o(h),n=getLameTagFrame(e,s);return n>s.length?-1:(n<1||t.write(s,0,n),0)}}f.NUMTOCENTRIES=100,f.MAXFRAMESIZE=2880,e.exports=f},367:e=>{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"}}},38:e=>{function t(e){return new Int16Array(e)}function a(e){return new Int32Array(e)}function s(e){return new Float32Array(e)}var n={arraycopy:function(e,t,a,s,n){for(var r=t+n;t<r;)a[s++]=e[t++]},out:{}};n.out.println=function(e){console.log(e)},n.out.printf=function(){console.log.apply(console,arguments)};var r={};function _(e){this.ordinal=e}r.SQRT2=1.4142135623730951,r.FAST_LOG10=function(e){return Math.log10(e)},r.FAST_LOG10_X=function(e,t){return Math.log10(e)*t},_.short_block_allowed=new _(0),_.short_block_coupled=new _(1),_.short_block_dispensed=new _(2),_.short_block_forced=new _(3);var i={};function o(e){this.ordinal=e}i.MAX_VALUE=34028235e31,o.vbr_off=new o(0),o.vbr_mt=new o(1),o.vbr_rh=new o(2),o.vbr_abr=new o(3),o.vbr_mtrh=new o(4),o.vbr_default=o.vbr_mtrh,e.exports={System:n,VbrMode:o,Float:i,ShortBlock:_,Util:r,Arrays:{fill:function(e,t,a,s){if(2==arguments.length)for(var n=0;n<e.length;n++)e[n]=arguments[1];else for(n=t;n<a;n++)e[n]=s}},new_array_n:function e(t){if(1==t.length)return new Array(t[0]);var a=t[0];t=t.slice(1);for(var s=[],n=0;n<a;n++)s.push(e(t));return s},new_byte:function(e){return new Int8Array(e)},new_double:function(e){return new Float64Array(e)},new_float:s,new_float_n:function e(t){if(1==t.length)return s(t[0]);var a=t[0];t=t.slice(1);for(var n=[],r=0;r<a;r++)n.push(e(t));return n},new_int:a,new_int_n:function e(t){if(1==t.length)return a(t[0]);var s=t[0];t=t.slice(1);for(var n=[],r=0;r<s;r++)n.push(e(t));return n},new_short:t,new_short_n:function e(a){if(1==a.length)return t(a[0]);var s=a[0];a=a.slice(1);for(var n=[],r=0;r<s;r++)n.push(e(a));return n},assert:function(e){}}},392:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){const s=function(e){switch(e){case 2:return new a([.5,.5]);case 3:return new a([-0,-684e-6,.001238,-0,-.003098,.004522,-0,-.008736,.011729,-0,-.020268,.026356,-0,-.045082,.060638,-0,-.133528,.273491,.666667,.273491,-.133528,-0,.060638,-.045082,-0,.026356,-.020268,-0,.011729,-.008736,-0,.004522,-.003098,-0,.001238,-684e-6,-0]);case 4:return new a([0,79e-5,-0,-.002338,0,.005222,-0,-.010087,0,.017899,-0,-.030433,0,.052057,-0,-.098769,0,.3158,.5,.3158,0,-.098769,-0,.052057,0,-.030433,-0,.017899,0,-.010087,-0,.005222,0,-.002338,-0,79e-5,0]);case 5:return new a([-212e-6,464e-6,.00136,-0,-.003402,-.003069,.004324,.009594,-0,-.017023,-.013756,.017888,.037672,-0,-.066591,-.058055,.090628,.300344,.4,.300344,.090628,-.058055,-.066591,-0,.037672,.017888,-.013756,-.017023,-0,.009594,.004324,-.003069,-.003402,-0,.00136,464e-6,-212e-6]);case 6:return new a([-0,-684e-6,-.001238,0,.003098,.004522,-0,-.008736,-.011729,0,.020268,.026356,-0,-.045082,-.060638,0,.133528,.273491,.333333,.273491,.133528,0,-.060638,-.045082,-0,.026356,.020268,0,-.011729,-.008736,-0,.004522,.003098,0,-.001238,-684e-6,-0]);default:throw new Error(`unsupported divider (${e})`)}}(t),n=new Float32Array(Math.round(e.length/t));let r=0,_=0,i=0;for(;_<n.length;)r<e.length?s.sampleIn(e[r++]):s.sampleIn(0),++i,i===t&&(i=0,n[_++]=s.sampleOut());return n};class a{constructor(e){this.coeffs=null,this.nCoeffs=0,this.registers=null,this.iTopReg=-1,this.coeffs=e,this.nCoeffs=e.length,this.registers=new Float32Array(this.nCoeffs),this.iTopReg=this.nCoeffs-1}sampleIn(e){let t=this.iTopReg;t+=1,t>=this.nCoeffs&&(t=0),this.registers[t]=e,this.iTopReg=t}sampleOut(){let e=0,t=0;for(let a=this.iTopReg;a>=0;a--)e+=this.coeffs[t++]*this.registers[a];for(let a=this.nCoeffs-1;a>this.iTopReg;a--)e+=this.coeffs[t++]*this.registers[a];return e}}},717:(e,t,a)=>{"use strict";const s=a(85),n=a(275);t.Z=function(e,t,a){const{numberOfChannels:r,sampleRate:_,length:i}=e,o=t.outputRate,l=new s.Mp3Encoder(r,_,o),f=1152,h=[],c=new Int16Array(f),u=new DataView(c.buffer),b=new Int16Array(f),m=new DataView(b.buffer);let p,d,v=0;for(let t=0;t<i;t+=f)d=Math.min(1,Math.round(100*t/i)/100),d!==v&&(a(d),v=d),(0,n.floatTo16BitPCM)(u,0,e.getChannelData(0).subarray(t,t+f)),(0,n.floatTo16BitPCM)(m,0,e.getChannelData(1).subarray(t,t+f)),p=l.encodeBuffer(c,b),p.length>0&&h.push(p);return p=l.flush(),p.length>0&&h.push(p),new Blob(h,{type:"audio/mpeg"})}},398:function(e,t,a){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=s(a(680));t.default=class{constructor({numberOfChannels:e,sampleRate:t}){this.numberOfChannels=0,this.sampleRate=0,this.duration=0,this.length=0,this.channels=[],this.numberOfChannels=e,this.sampleRate=t,this.duration=0,this.length=0,this.channels=new Array(e);for(let t=0;t<e;t+=1)this.channels[t]={chunks:[]}}stats(){const{numberOfChannels:e,sampleRate:t,duration:a,length:s,channels:n}=this;return{numberOfChannels:e,sampleRate:t,duration:a,length:s,channels:n.map((({chunks:e})=>({chunks:e.length})))}}getAudioBuffer(e){const{length:t,sampleRate:a,numberOfChannels:s,channels:r}=this,_=new n.default({length:t,sampleRate:a,numberOfChannels:s}),i=t*s;let o=0;for(let t=0;t<s;t+=1){let a=0;for(let s of r[t].chunks)_.copyToChannel(s,t,a),a+=s.length,o+=s.length,"function"==typeof e&&e(o/i)}return _}addSamples(e){const{numberOfChannels:t,channels:a}=this,s=e[0].length;for(let n=0;n<t;n+=1){if(e[n].length!==s)throw new Error("inconsistent chunk lengths");a[n].chunks.push(e[n])}return this.length+=s,this.duration=this.length/this.sampleRate,!0}truncateAt(e){const{sampleRate:t,numberOfChannels:a,channels:s}=this,n=Math.round(e*t),r=s[0].chunks;let _=0;for(let e=0;e<r.length;e+=1){const i=r[e],o=_+i.length;if(n<=o){const r=n-_;if(r<i.length)for(let t=0;t<a;t+=1)s[t].chunks[e]=s[t].chunks[e].slice(0,r);for(let t=0;t<a;t+=1)s[t].chunks.splice(e+1);return this.length=n,this.duration=n/t,!0}_=o}return!1}}},275:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.floatTo8BitPCM=t.floatTo16BitPCM=void 0,t.floatTo16BitPCM=function(e,t,a){for(let s=0;s<a.length;s++,t+=2){const n=Math.max(-1,Math.min(1,a[s]));e.setInt16(t,n<0?32768*n:32767*n,!0)}},t.floatTo8BitPCM=function(e,t,a){for(let s=0;s<a.length;s++,t+=1){const n=(Math.max(-1,Math.min(1,a[s]))+1)/2;e.setInt8(t,255*n)}}},515:function(e,t,a){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=a(275),r=s(a(392));function _(e){const t=e[0],a=e[1],s=t.length,n=new Float32Array(2*s);let r=0;for(let e=0;e<s;e++)n[r++]=t[e],n[r++]=a[e];return n}function i(e,t,a){for(let s=0;s<a.length;s++)e.setUint8(t+s,a.charCodeAt(s))}t.default=function(e,t,a){const{numberOfChannels:s,sampleRate:o}=e;let l=new Array(s);for(let t=0;t<s;t+=1)l[t]=e.getChannelData(t);a(.1);const f=o/t.sampleRate;let h;switch(1!==f&&(l=l.map((e=>(0,r.default)(e,f)))),a(.2),`${s}->${t.numChannels}`){case"1->1":h=l[0];break;case"1->2":h=_([l[0],l[0]]);break;case"2->1":h=function(e){const t=e[0],a=e[1],s=t.length,n=new Float32Array(s);for(let e=0;e<s;e++)n[e++]=(t[e]+a[e])/2;return n}(l);break;case"2->2":h=_(l);break;default:throw new Error("unsupported channels conversion")}a(.3);const c=t.numChannels*t.sampleSize,u=h.length*t.sampleSize,b=new ArrayBuffer(44+u),m=new DataView(b);switch(i(m,0,"RIFF"),m.setUint32(4,b.byteLength-8,!0),i(m,8,"WAVE"),i(m,12,"fmt "),m.setUint32(16,16,!0),m.setUint16(20,1,!0),m.setUint16(22,t.numChannels,!0),m.setUint32(24,t.sampleRate,!0),m.setUint32(28,t.sampleRate*c,!0),m.setUint16(32,c,!0),m.setUint16(34,8*t.sampleSize,!0),i(m,36,"data"),m.setUint32(40,u,!0),a(.4),t.sampleSize){case 1:(0,n.floatTo8BitPCM)(m,44,h);break;case 2:(0,n.floatTo16BitPCM)(m,44,h)}return a(1),new Blob([b],{type:"audio/wav"})}}},t={};function a(s){var n=t[s];if(void 0!==n)return n.exports;var r=t[s]={exports:{}};return e[s].call(r.exports,r,r.exports,a),r.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var s in t)a.o(t,s)&&!a.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}var t=a(398),s=a.n(t),n=a(717),r=a(515),_=a.n(r),i=null,o=null,l=0;function f(t){var a=t.data,r=a.id,l=a.command,f=a.payload,b=new h(r);try{var m=!1;switch(l){case"init":m=function(e){var t=e.sampleRate,a=e.numberOfChannels;if(u(),a>2)throw new Error("invalid number of channels");return i=new(s())({numberOfChannels:a,sampleRate:t}),o=setInterval(c,1e3),!0}(f);break;case"addSamples":i.addSamples(f.samples),m=!0;break;case"truncate":m=i.truncateAt(f.position);break;case"export":m={};var p=i.getAudioBuffer((function(e){b.send({step:"copy",progress:e})}));m.duration=p.duration,f.raw&&(m.raw=function(e){for(var t=e.numberOfChannels,a={numberOfChannels:t,sampleRate:e.sampleRate,length:e.length,duration:e.duration,channels:[]},s=0;s<t;s+=1)a.channels.push(e.getChannelData(s));return a}(p,f.raw)),f.wav&&(m.wav=function(t,a,s){return"object"!==e(a)&&(a={numChannels:t.numberOfChannels,sampleRate:t.sampleRate,sampleSize:2}),_()(t,a,(function(e){b.send({step:"wav",progress:e})}))}(p,f.wav)),f.mp3&&(m.mp3=function(t,a,s){return"object"!==e(a)&&(a={outputRate:128}),(0,n.Z)(t,a,(function(e){b.send({step:"mp3",progress:e})}))}(p,f.mp3));break;case"cleanup":m=u()}b.done(m)}catch(e){b.fail(e)}}function h(e){this._id=e}function c(){var e=0;i&&(e=i.length*i.numberOfChannels*4),e!==l&&(l=e,self.postMessage({id:"memoryUsage",done:!1,payload:e}))}function u(){return i=null,null!==o&&clearInterval(o),!0}self.onmessage=function(e){null===e.data&&(self.onmessage=f,self.postMessage(null))},h.prototype.done=function(e){self.postMessage({id:this._id,done:!0,payload:e})},h.prototype.send=function(e){self.postMessage({id:this._id,done:!1,payload:e})},h.prototype.fail=function(e){self.postMessage({id:this._id,done:!0,error:e})}})()})();