function lamejs(){function U(f){return new Int32Array(f)}function G(f){return new Float32Array(f)}function ha(f){if(1==f.length)return G(f[0]);var k=f[0];f=f.slice(1);for(var r=[],x=0;x>=1;0!=a--;)g[l++]=e>c[b++]?0:1,g[l++]=e>c[b++]?0:1}function r(a,e,c,b,g,l){a>>=1;var h=a%2;for(a>>=1;0!=a--;){var p=c[b++]*e;var m=c[b++]*e;var n=0|p;var d=c[b++]*e;var z=0|m;var E=c[b++]*e;var f=0|d;p+=u.adj43[n];n=0|E;m+=u.adj43[z];g[l++]=0|p;d+=u.adj43[f];g[l++]=0|m;E+=u.adj43[n];g[l++]=0|d;g[l++]=0|E}0!=h&&(p=c[b++]*e,m=c[b++]*e,p+=u.adj43[0|p],m+=u.adj43[0|m],g[l++]=0|p,g[l++]=0|m)}function K(a,e,c,b){var m,g= e,h=m=0;do{var p=a[g++],n=a[g++];m>=16;m>a&&(m=a,e++);b.bits+=m;return e;case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:g=e;e=d[m-1];var p=h=m=0,n=v.ht[e].xlen,l=v.ht[e].hlen, f=v.ht[e+1].hlen,q=v.ht[e+2].hlen;do{var D=a[g+0]*n+a[g+1],g=g+2;m+=l[D];h+=f[D];p+=q[D]}while(gh&&(m=h,a++);m>p&&(m=p,a=e+2);b.bits+=m;return a;default:if(m>Y.IXMAX_VAL)return b.bits=Y.LARGE_BITS,-1;m-=15;for(g=24;32>g&&!(v.ht[g].linmax>=m);g++);for(h=g-8;24>h&&!(v.ht[h].linmax>=m);h++);m=h;p=65536*v.ht[m].xlen+v.ht[g].xlen;h=0;do n=a[e++],l=a[e++],0!=n&&(14>=16;h>a&&(h=a,m=g);b.bits+=h;return m}} function C(a,e,b,c,g,l,h,p){for(var m=e.big_values,n=2;n=m)break;var E=g[n-2]+e.count1bits;if(b.part2_3_length<=E)break;E=new x(E);d=K(c,d,m,E);E=E.bits;b.part2_3_length<=E||(b.assign(e),b.part2_3_length=E,b.region0_count=l[n-2],b.region1_count=n-2-l[n-2],b.table_select[0]=h[n-2],b.table_select[1]=p[n-2],b.table_select[2]=d)}}var u=null;this.qupvt=null;this.setModules=function(a){u=this.qupvt=a};var fa=[[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]],d=[1,2,5,7,7,10,10,13,13,13,13,13,13,13,13];this.noquant_count_bits=function(a,e,b){var c=e.l3_enc,m=Math.min(576,e.max_nonzero_coeff+2>>1<<1);null!=b&&(b.sfb_count1=0);for(;1h&&(p=h,e.count1table_select= 1);e.count1bits=p;e.big_values=m;if(0==m)return p;e.block_type==f.SHORT_TYPE?(g=3*a.scalefac_band.s[3],g>e.big_values&&(g=e.big_values),h=e.big_values):e.block_type==f.NORM_TYPE?(g=e.region0_count=a.bv_scf[m-2],h=e.region1_count=a.bv_scf[m-1],h=a.scalefac_band.l[g+h+2],g=a.scalefac_band.l[g+1],hh&&(g=h));g=Math.min(g,m);h=Math.min(h,m);0g)return Y.LARGE_BITS;var g=u.IPOW20(c.global_gain),h,p=0,n=0,l=0,d=0,q=0,w=m,t=0,D=e,H=0;var B=null!=b&&c.global_gain==b.global_gain; var Q=c.block_type==f.SHORT_TYPE?38:21;for(h=0;h<=Q;h++){var V=-1;if(B||c.block_type==f.NORM_TYPE)V=c.global_gain-(c.scalefac[h]+(0!=c.preflag?u.pretab[h]:0)<c.max_nonzero_coeff&&(h=c.max_nonzero_coeff-p+1,qa.fill(m,c.max_nonzero_coeff,576,0),N=h,0>N&&(N=0),h=Q+1);0==n&&0==l&&(w=m,t=q,D=e,H=d);null!=b&&0=b.sfb_count1&&0=b.step[h]?(0!=n&&(r(n,g,D,H,w,t),n=0,w=m,t=q,D=e,H=d),l+=N):(0!=l&&(k(l,g,D,H,w,t),l=0,w=m,t=q,D=e,H=d),n+=N);if(0>=N){0!=l&&(k(l,g,D,H,w,t),l=0);0!=n&&(r(n,g,D,H,w,t),n=0);break}}h<=Q&&(q+=c.width[h],d+=c.width[h],p+=c.width[h])}0!=n&&r(n,g,D,H,w,t);0!=l&&k(l,g,D,H,w,t);if(0!=(a.substep_shaping&2))for(g=0,Q=.634521682242439/u.IPOW20(c.global_gain+c.scalefac_scale),p=0;p=Q?m[n]:0;return this.noquant_count_bits(a, c,b)};this.best_huffman_divide=function(a,e){var c=new rb,b=e.l3_enc,g=U(23),l=U(23),h=U(23),p=U(23);if(e.block_type!=f.SHORT_TYPE||1!=a.mode_gr){c.assign(e);if(e.block_type==f.NORM_TYPE){for(var d=e.big_values,q=0;22>=q;q++)g[q]=Y.LARGE_BITS;for(q=0;16>q;q++){var w=a.scalefac_band.l[q+1];if(w>=d)break;for(var t=0,D=new x(t),k=K(b,0,w,D),t=D.bits,I=0;8>I;I++){var H=a.scalefac_band.l[q+I+2];if(H>=d)break;D=t;D=new x(D);H=K(b,w,H,D);D=D.bits;g[q+I]>D&&(g[q+I]=D,l[q+I]=q,h[q+I]=k,p[q+I]=H)}}C(a,c,e, b,g,l,h,p)}d=c.big_values;if(!(0==d||1<(b[d-2]|b[d-1])||(d=e.count1+2,576c.big_values;d-=4)t=2*(2*(2*b[d-4]+b[d-3])+b[d-2])+b[d-1],q+=v.t32l[t],w+=v.t33l[t];c.big_values=d;c.count1table_select=0;q>w&&(q=w,c.count1table_select=1);c.count1bits=q;c.block_type==f.NORM_TYPE?C(a,c,e,b,g,l,h,p):(c.part2_3_length=q,q=a.scalefac_band.l[8],q>d&&(q=d),0q&&(a=new x(c.part2_3_length), c.table_select[1]=K(b,q,d,a),c.part2_3_length=a.bits),e.part2_3_length>c.part2_3_length&&e.assign(c))}}};var c=[1,1,1,1,8,2,2,2,4,4,4,8,8,8,16,16],w=[1,2,4,8,1,2,4,8,2,4,8,2,4,8,4,8],a=[0,0,0,0,3,1,1,1,2,2,2,3,3,3,4,4],b=[0,1,2,3,0,1,2,3,1,2,3,1,2,3,2,3];fb.slen1_tab=a;fb.slen2_tab=b;this.best_scalefac_store=function(e,g,m,n){var l=n.tt[g][m],d,h,p=0;for(d=h=0;dq&&0==l.l3_enc[q+h];q++);0==q&&(l.scalefac[d]=p=-2)}if(0==l.scalefac_scale&&0==l.preflag){for(d= h=0;d>=1);l.scalefac_scale=p=1}}if(0==l.preflag&&l.block_type!=f.SHORT_TYPE&&2==e.mode_gr){for(d=11;dd;d++)n.scfsi[m][d]=0;if(2==e.mode_gr&&1==g&&n.tt[0][m].block_type!=f.SHORT_TYPE&&n.tt[1][m].block_type!= f.SHORT_TYPE){g=n.tt[1][m];h=n.tt[0][m];for(p=0;pd;d++)-1!=g.scalefac[d]&&(n++,mp;p++)m d&&(g.part2_length=d,g.scalefac_compress=p));p=0}for(d=0;db;b++)gt[b]&&(a.part2_length=t[b],a.scalefac_compress=b);return a.part2_length==Y.LARGE_BITS};var q=[[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(a,e){var b,c,d,l,h=U(4),p=e.scalefac;a= 0!=e.preflag?2:0;for(d=0;4>d;d++)h[d]=0;if(e.block_type==f.SHORT_TYPE){var A=1;var w=u.nr_of_sfb_block[a][A];for(b=l=0;4>b;b++){var t=w[b]/3;for(d=0;dc;c++)p[3*l+c]>h[b]&&(h[b]=p[3*l+c])}}else for(A=0,w=u.nr_of_sfb_block[a][A],b=l=0;4>b;b++)for(t=w[b],d=0;dh[b]&&(h[b]=p[l]);w=!1;for(b=0;4>b;b++)h[b]>q[a][b]&&(w=!0);if(!w){e.sfb_partition_table=u.nr_of_sfb_block[a][A];for(b=0;4>b;b++)e.slen[b]=g[h[b]];A=e.slen[0];b=e.slen[1];h=e.slen[2];t=e.slen[3];switch(a){case 0:e.scalefac_compress= (5*A+b<<4)+(h<<2)+t;break;case 1:e.scalefac_compress=400+(5*A+b<<2)+h;break;case 2:e.scalefac_compress=500+3*A+b;break;default:S.err.printf("intensity stereo not implemented yet\n")}}if(!w)for(b=e.part2_length=0;4>b;b++)e.part2_length+=e.slen[b]*e.sfb_partition_table[b];return w};var g=[0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4];this.huffman_init=function(a){for(var e=2;576>=e;e+=2){for(var b=0,c;a.scalefac_band.l[++b]e;)c--;0>c&&(c=fa[b][0]);a.bv_scf[e-2]=c;for(c= fa[b][1];a.scalefac_band.l[c+a.bv_scf[e-2]+2]>e;)c--;0>c&&(c=fa[b][1]);a.bv_scf[e-1]=c}}}function ca(){function f(d,c,f,a,b,k){for(;0!=b--;)f[a]=1E-10+d[c+0]*k[0]-f[a-1]*k[1]+d[c-1]*k[2]-f[a-2]*k[3]+d[c-2]*k[4]-f[a-3]*k[5]+d[c-3]*k[6]-f[a-4]*k[7]+d[c-4]*k[8]-f[a-5]*k[9]+d[c-5]*k[10]-f[a-6]*k[11]+d[c-6]*k[12]-f[a-7]*k[13]+d[c-7]*k[14]-f[a-8]*k[15]+d[c-8]*k[16]-f[a-9]*k[17]+d[c-9]*k[18]-f[a-10]*k[19]+d[c-10]*k[20],++a,++c}function k(d,c,f,a,b,k){for(;0!=b--;)f[a]=d[c+0]*k[0]-f[a-1]*k[1]+d[c-1]*k[2]- f[a-2]*k[3]+d[c-2]*k[4],++a,++c}function r(d){return d*d}var K=ca.RMS_WINDOW_TIME_NUMERATOR,C=ca.RMS_WINDOW_TIME_DENOMINATOR,u=[[.038575994352,-3.84664617118067,-.02160367184185,7.81501653005538,-.00123395316851,-11.34170355132042,-9.291677959E-5,13.05504219327545,-.01655260341619,-12.28759895145294,.02161526843274,9.4829380631979,-.02074045215285,-5.87257861775999,.00594298065125,2.75465861874613,.00306428023191,-.86984376593551,1.2025322027E-4,.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,-8.28086748E-6,.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]],v=[[.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]];this.InitGainAnalysis=function(d,c){a:{for(var f= 0;fd.sampleWindow-d.totsamp?d.sampleWindow-d.totsamp:q;if(lMAX_ORDER-l&&(g=MAX_ORDER-l)}else e=w+l,t=c,D=b+l,m=a;f(t,e,d.lstepbuf,d.lstep+d.totsamp,g,u[d.reqindex]);f(m,D,d.rstepbuf,d.rstep+d.totsamp,g,u[d.reqindex]);k(d.lstepbuf,d.lstep+d.totsamp,d.loutbuf,d.lout+d.totsamp,g,v[d.reqindex]);k(d.rstepbuf,d.rstep+d.totsamp,d.routbuf,d.rout+ d.totsamp,g,v[d.reqindex]);e=d.lout+d.totsamp;t=d.loutbuf;D=d.rout+d.totsamp;m=d.routbuf;for(var n=g%8;0!=n--;)d.lsum+=r(t[e++]),d.rsum+=r(m[D++]);for(n=g/8;0!=n--;)d.lsum+=r(t[e+0])+r(t[e+1])+r(t[e+2])+r(t[e+3])+r(t[e+4])+r(t[e+5])+r(t[e+6])+r(t[e+7]),e+=8,d.rsum+=r(m[D+0])+r(m[D+1])+r(m[D+2])+r(m[D+3])+r(m[D+4])+r(m[D+5])+r(m[D+6])+r(m[D+7]),D+=8;q-=g;l+=g;d.totsamp+=g;d.totsamp==d.sampleWindow&&(e=10*ca.STEPS_per_dB*Math.log10((d.lsum+d.rsum)/d.totsamp*.5+1E-37),e=0>=e?0:0|e,e>=d.A.length&&(e= d.A.length-1),d.A[e]++,d.lsum=d.rsum=0,S.arraycopy(d.loutbuf,d.totsamp,d.loutbuf,0,MAX_ORDER),S.arraycopy(d.routbuf,d.totsamp,d.routbuf,0,MAX_ORDER),S.arraycopy(d.lstepbuf,d.totsamp,d.lstepbuf,0,MAX_ORDER),S.arraycopy(d.rstepbuf,d.totsamp,d.rstepbuf,0,MAX_ORDER),d.totsamp=0);if(d.totsamp>d.sampleWindow)return GAIN_ANALYSIS_ERROR}B=(b-=c[a])););c=64.82-a/ca.STEPS_per_dB}for(f=0;fb&&(b=0);9w&&(w+=64);c.exp_nspsytune|=w<<2}0!=a?c.quant_comp=d[b].quant_comp:0=d)return K(c,d,a);c.preset=0;return d}}function xc(){var f;this.setModules= function(k){f=k};this.ResvFrameBegin=function(k,r){var x=k.internal_flags,C=x.l3_side,u=f.getframebits(k);r.bits=(u-8*x.sideinfo_len)/x.mode_gr;var v=2048*x.mode_gr-8;if(320v&&(x.ResvMax=v);if(0>x.ResvMax||k.disable_reservoir)x.ResvMax=0;k=r.bits*x.mode_gr+Math.min(x.ResvSize,x.ResvMax);k>d&&(k=d);C.resvDrain_pre=0;null!=x.pinfo&&(x.pinfo.mean_bits= r.bits/2,x.pinfo.resvsize=x.ResvSize);return k};this.ResvMaxBits=function(f,r,x,C){var k=f.internal_flags,v=k.ResvSize,d=k.ResvMax;0!=C&&(v+=r);0!=(k.substep_shaping&1)&&(d*=.9);x.bits=r;10*v>9*d?(C=v-9*d/10,x.bits+=C,k.substep_shaping|=128):(C=0,k.substep_shaping&=127,f.disable_reservoir||0!=(k.substep_shaping&1)||(x.bits-=.1*r));f=v<6*k.ResvMax/10?v:6*k.ResvMax/10;f-=C;0>f&&(f=0);return f};this.ResvAdjust=function(f,r){f.ResvSize-=r.part2_3_length+r.part2_length};this.ResvFrameEnd=function(f,r){var k, x=f.l3_side;f.ResvSize+=r*f.mode_gr;r=0;x.resvDrain_post=0;x.resvDrain_pre=0;0!=(k=f.ResvSize%8)&&(r+=k);k=f.ResvSize-r-f.ResvMax;0>24&255;a[b+1]=c>>16&255;a[b+2]=c>>8&255;a[b+3]=c&255}function r(a,b,c){a[b+0]=c>>8&255; a[b+1]=c&255}function K(a,b,c){return 255&(a<a.out_samplerate?0:1);b[1]=K(b[1],1,a.version);b[1]=K(b[1],2,1);b[1]=K(b[1],1,a.error_protection?0:1);b[2]=K(b[2],4,e.bitrate_index);b[2]=K(b[2],2,e.samplerate_index);b[2]=K(b[2],1,0);b[2]=K(b[2],1,a.extension);b[3]=K(b[3],2,a.mode.ordinal());b[3]=K(b[3],2,e.mode_ext);b[3]=K(b[3],1,a.copyright);b[3]=K(b[3],1,a.original);b[3]=K(b[3],2,a.emphasis); b[0]=255;var e=b[1]&241;var c=1==a.version?128:16E3>a.out_samplerate?32:64;a.VBR==J.vbr_off&&(c=a.brate);c=a.free_format?0:255&16*G.BitrateIndex(c,a.version,a.out_samplerate);b[1]=1==a.version?255&(e|10):255&(e|2);e=b[2]&13;b[2]=255&(c|e)}function u(a,b){return b=b>>8^B[(b^a)&255]}var G,d,c;this.setModules=function(a,b,f){G=a;d=b;c=f};var w=gb.NUMTOCENTRIES,a=gb.MAXFRAMESIZE,b=w+4+4+4+4+4+9+1+1+8+1+1+3+1+1+2+4+2+2,B=[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];this.addVbrFrame=function(a){var b=a.internal_flags;var e=b.VBR_seek_table;a=v.bitrate_table[a.version][b.bitrate_index]; e.nVbrNumFrames++;e.sum+=a;e.seen++;if(!(e.seen>3&1,d=a[e+2]>>2&3,k=a[e+3]>>6&3,m=a[e+2]>>4&15,m=v.bitrate_table[c][m];b.samprate=14==a[e+1]>>4?v.samplerate_table[2][d]:v.samplerate_table[c][d];d=e=0!=c?3!=k?e+36:e+21:3!=k?e+21:e+13;if(!(new String(a,d,4(),null)).equals("Xing")&&!(new String(a, d,4(),null)).equals("Info"))return null;e+=4;b.hId=c;d=b.flags=f(a,e);e+=4;0!=(d&1)&&(b.frames=f(a,e),e+=4);0!=(d&2)&&(b.bytes=f(a,e),e+=4);if(0!=(d&4)){if(null!=b.toc)for(k=0;k>4;m=(a[e+1]&15)<<8;m+=a[e+2]&255;if(0>c||3E3m||3E3e.out_samplerate?32:64;e.VBR==J.vbr_off&&(f=e.brate);f=72E3*(e.version+1)*f/e.out_samplerate;var g=c.sideinfo_len+b;c.VBR_seek_table.TotalFrameSize=f;if(fa)e.bWriteVbrTag=!1;else for(c.VBR_seek_table.nVbrNumFrames=0,c.VBR_seek_table.nBytesWritten=0,c.VBR_seek_table.sum=0,c.VBR_seek_table.seen=0,c.VBR_seek_table.want=1,c.VBR_seek_table.pos=0,null==c.VBR_seek_table.bag&&(c.VBR_seek_table.bag=new int[400],c.VBR_seek_table.size=400),f=new Int8Array(a),C(e,f),c=c.VBR_seek_table.TotalFrameSize, g=0;g=e.VBR_seek_table.pos)return 0;if(b.length=l.pos))for(f=1;fl.pos-1&&(m=l.pos-1);m=0|256*l.bag[m]/l.sum;255z.RadioGain&&(z.RadioGain=-510),x=11264,x=0<=z.RadioGain?x|z.RadioGain:x|512|-z.RadioGain);z.findPeakSample&&(B=Math.abs(0|z.PeakSample/32767*Math.pow(2,23)+.5));-1!=V&&(0h&&(h=0);switch(a.mode){case MONO:M=0;break;case STEREO:M=1;break;case DUAL_CHANNEL:M=2;break;case JOINT_STEREO:M=a.force_ms?4:3;break;default:M= 7}I=32E3>=a.in_samplerate?0:48E3==a.in_samplerate?2:48E3a.scale_right||a.disable_reservoir&&320>a.brate||a.noATH||a.ATHonly||0==v||32E3>=a.in_samplerate)X=1;R=R+(M<<2)+(X<<5)+(I<<6);z=z.nMusicCRC;k(b,g+m,h);m+=4;for(h=0;9>h;h++)b[g+m+h]=255&p.charAt(h);m+=9;b[g+m]=255&A;m++;b[g+m]=255&y;m++;k(b,g+m,B);m+=4;r(b,g+m, x);m+=2;r(b,g+m,0);m+=2;b[g+m]=255&H;m++;b[g+m]=255<=Qa?255:255&Qa;m++;b[g+m]=255&n>>4;b[g+m+1]=255&(n<<4)+(E>>8);b[g+m+2]=255&E;m+=3;b[g+m]=255&R;m++;b[g+m++]=0;r(b,g+m,a.preset);m+=2;k(b,g+m,l);m+=4;r(b,g+m,z);m+=2;for(a=0;a=b.internal_flags.VBR_seek_table.pos)return-1;c.seek(c.length());if(0==c.length())return-1;c.seek(0);var e=new Int8Array(10);c.readFully(e);e=(new String(e,"ISO-8859-1")).startsWith("ID3")? 0:((e[6]&127)<<21|(e[7]&127)<<14|(e[8]&127)<<7|e[9]&127)+e.length;c.seek(e);e=new Int8Array(a);b=getLameTagFrame(b,e);if(b>e.length)return-1;if(1>b)return 0;c.write(e,0,b);return 0}}function da(){function x(a,b,c){for(;0>c<>3]|=b>>c<<8-(e&7)-h;e+=h}a.header[a.h_ptr].ptr=e}function K(a,b){a<<=8;for(var c=0;8>c;c++)a<<=1,b<<=1,0!=((b^a)& 65536)&&(b^=32773);return b}function C(a,b){var c=v.ht[b.count1table_select+32],e,h=0,d=b.big_values,g=b.big_values;for(e=(b.count1-b.big_values)/4;0b.xr[g+0]&&f++);n=b.l3_enc[d+1];0!=n&&(m+=4,f*=2,0>b.xr[g+1]&&f++);n=b.l3_enc[d+2];0!=n&&(m+=2,f*=2,0>b.xr[g+2]&&f++);n=b.l3_enc[d+3];0!=n&&(m++,f*=2,0>b.xr[g+3]&&f++);d+=4;g+=4;x(a,f+c.table[m],c.hlen[m]);h+=c.hlen[m]}return h}function u(a,b,c,e,h){var d=v.ht[b],g=0;if(0==b)return g;for(;ch.xr[c]&&q++,f--);15h.xr[c+1]&&q++,f--);I=I*l+k;m-=f;f+=d.hlen[I];x(a,d.table[I],f);x(a,q,m);g+=f+m}return g}function G(a,b){var c=3*a.scalefac_band.s[3];c>b.big_values&&(c=b.big_values);var e=u(a,b.table_select[0],0,c,b);return e+=u(a,b.table_select[1],c,b.big_values,b)}function d(a,b){var c=b.big_values;var e=b.region0_count+1;var h=a.scalefac_band.l[e]; e+=b.region1_count+1;var d=a.scalefac_band.l[e];h>c&&(h=c);d>c&&(d=c);e=u(a,b.table_select[0],0,h,b);e+=u(a,b.table_select[1],h,d,b);return e+=u(a,b.table_select[2],d,c,b)}function c(){this.total=0}function w(b,c){var e=b.internal_flags;var d=e.w_ptr;var h=e.h_ptr-1;-1==h&&(h=ia.MAX_HEADER_BUF-1);var f=e.header[h].write_timing-g;c.total=f;if(0<=f){var m=1+h-d;hf&&S.err.println("strange error flushing buffer ... \n");return f}var a=this,b=null,B=null,e=null,l=null;this.setModules=function(a,c,d,f){b=a;B=c;e=d;l=f};var q=null,g=0,t=0,D=0;this.getframebits=function(a){var b=a.internal_flags;return 8*(0|72E3*(a.version+1)*(0!=b.bitrate_index?v.bitrate_table[a.version][b.bitrate_index]:a.brate)/a.out_samplerate+b.padding)};this.CRC_writeheader=function(a,b){var c=K(b[2]&255,65535);c=K(b[3]&255,c);for(var e=6;e> 8);b[5]=byte(c&255)};this.flush_bitstream=function(a){var e=a.internal_flags,d;var f=e.l3_side;0>(d=w(a,new c))||(k(a,d),e.ResvSize=0,f.main_data_begin=0,e.findReplayGain&&(f=b.GetTitleGain(e.rgdata),e.RadioGain=Math.floor(10*f+.5)|0),e.findPeakSample&&(e.noclipGainChange=Math.ceil(200*Math.log10(e.PeakSample/32767))|0,0>h<a.out_samplerate?r(p,4094,12):r(p,4095,12);r(p,a.version,1);r(p,1,2);r(p,a.error_protection? 0:1,1);r(p,p.bitrate_index,4);r(p,p.samplerate_index,2);r(p,p.padding,1);r(p,a.extension,1);r(p,a.mode.ordinal(),2);r(p,p.mode_ext,2);r(p,a.copyright,1);r(p,a.original,1);r(p,a.emphasis,2);a.error_protection&&r(p,0,16);if(1==a.version){r(p,t.main_data_begin,9);2==p.channels_out?r(p,t.private_bits,3):r(p,t.private_bits,5);for(q=0;qh;h++)r(p,t.scfsi[q][h],1);for(l=0;2>l;l++)for(q=0;qq;q++)for(h=0;hN;N++)for(M=t.sfb_partition_table[N]/3,H=t.slen[N],Q=0;QN;N++)for(M=t.sfb_partition_table[N], H=t.slen[N],Q=0;Q ResvSize");8*e.main_data_begin!=b.ResvSize&&(S.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*e.main_data_begin,b.ResvSize,e.resvDrain_post,e.resvDrain_pre,8*b.sideinfo_len,p-e.resvDrain_post-8*b.sideinfo_len,p,p%8,m),S.err.println("This is a fatal error. It has several possible causes:"),S.err.println("90%% LAME compiled with buggy version of gcc using advanced optimizations"),S.err.println(" 9%% Your system is overclocked"),S.err.println(" 1%% bug in LAME encoding library"),b.ResvSize=8*e.main_data_begin);if(1E9=f)return 0;if(0!=d&&f>d)return-1;S.arraycopy(q,0,c,e,f);t=-1;D=0;if(0!=h&&(d=U(1),d[0]=a.nMusicCRC,l.updateMusicCRC(d,c,e,f),a.nMusicCRC=d[0],0a.PeakSample?a.PeakSample=d[0][m]:-d[0][m]>a.PeakSample&&(a.PeakSample=-d[0][m]);if(1< a.channels_out)for(m=0;ma.PeakSample?a.PeakSample=d[1][m]:-d[1][m]>a.PeakSample&&(a.PeakSample=-d[1][m])}if(a.findReplayGain&&b.AnalyzeSamples(a.rgdata,d[0],0,d[1],0,g,a.channels_out)==ca.GAIN_ANALYSIS_ERROR)return-6}}return f};this.init_bit_stream_w=function(a){q=new Int8Array(W.LAME_MAXMP3BUFFER);a.h_ptr=a.w_ptr=0;a.header[a.h_ptr].write_timing=0;t=-1;g=D=0}}function ba(f,k,r,v){this.xlen=f;this.linmax=k;this.table=r;this.hlen=v}function Fa(f){this.bits=f}function Fb(){this.bits= this.over_SSD=this.over_count=this.max_noise=this.tot_noise=this.over_noise=0}function yc(){this.setModules=function(f,k){}}function zc(){this.floor=this.decay=this.adjustLimit=this.adjust=this.aaSensitivityP=this.useAdjust=0;this.l=G(f.SBMAX_l);this.s=G(f.SBMAX_s);this.psfb21=G(f.PSFB21);this.psfb12=G(f.PSFB12);this.cb_l=G(f.CBANDS);this.cb_s=G(f.CBANDS);this.eql_w=G(f.BLKSIZE/2)}function Ac(){this.scale_right=this.scale_left=this.scale=this.out_samplerate=this.in_samplerate=this.num_channels=this.num_samples= this.class_id=0;this.decode_only=this.bWriteVbrTag=this.analysis=!1;this.quality=0;this.mode=ka.STEREO;this.write_id3tag_automatic=this.decode_on_the_fly=this.findReplayGain=this.free_format=this.force_ms=!1;this.error_protection=this.emphasis=this.extension=this.original=this.copyright=this.compression_ratio=this.brate=0;this.disable_reservoir=this.strict_ISO=!1;this.quant_comp_short=this.quant_comp=0;this.experimentalY=!1;this.preset=this.exp_nspsytune=this.experimentalZ=0;this.VBR=null;this.maskingadjust_short= this.maskingadjust=this.highpasswidth=this.lowpasswidth=this.highpassfreq=this.lowpassfreq=this.VBR_hard_min=this.VBR_max_bitrate_kbps=this.VBR_min_bitrate_kbps=this.VBR_mean_bitrate_kbps=this.VBR_q=this.VBR_q_frac=0;this.noATH=this.ATHshort=this.ATHonly=!1;this.athaa_sensitivity=this.athaa_loudapprox=this.athaa_type=this.ATHlower=this.ATHcurve=this.ATHtype=0;this.short_blocks=null;this.useTemporal=!1;this.msfix=this.interChRatio=0;this.tune=!1;this.lame_allocated_gfp=this.frameNum=this.framesize= this.encoder_padding=this.encoder_delay=this.version=this.tune_value_a=0;this.internal_flags=null}function Bc(x){this.quantize=x;this.iteration_loop=function(k,r,x,v){var u=k.internal_flags,C=G(ra.SFBMAX),d=G(576),c=U(2),w=u.l3_side;var a=new Fa(0);this.quantize.rv.ResvFrameBegin(k,a);a=a.bits;for(var b=0;b>2&63;32<=q&&(q-=64); k=Math.pow(10,q/4/10);q=c.exp_nspsytune>>8&63;32<=q&&(q-=64);m=Math.pow(10,q/4/10);q=c.exp_nspsytune>>14&63;32<=q&&(q-=64);n=Math.pow(10,q/4/10);q=c.exp_nspsytune>>20&63;32<=q&&(q-=64);z=n*Math.pow(10,q/4/10);for(q=0;q=q?k:13>=q?m:20>=q?n:z,e.nsPsy.longfact[q]=c;for(q=0;q=q?k:10>=q?m:11>=q?n:z,e.nsPsy.shortfact[q]=c}};this.on_pe=function(a,b,c,d,f,k){var e=a.internal_flags,g=0,l=U(2),q,g=new Fa(g);a=v.ResvMaxBits(a,d,g,k);var g=g.bits,h=g+a;h>ia.MAX_BITS_PER_GRANULE&& (h=ia.MAX_BITS_PER_GRANULE);for(q=k=0;q3*d/4&&(l[q]=3*d/4),0>l[q]&&(l[q]=0),l[q]+c[q]>ia.MAX_BITS_PER_CHANNEL&&(l[q]=Math.max(0,ia.MAX_BITS_PER_CHANNEL-c[q])),k+=l[q];if(k>a)for(q=0;qia.MAX_BITS_PER_GRANULE)for(q=0;qb&&(b=0);.5ia.MAX_BITS_PER_CHANNEL-a[0]&&(b=ia.MAX_BITS_PER_CHANNEL-a[0]);0>b&&(b=0);125<=a[1]&&(125d&&(a[0]=d*a[0]/b,a[1]=d*a[1]/b)};this.athAdjust=function(a,b,c){b=Z.FAST_LOG10_X(b,10);a*=a;var e=0;b-=c;1E-20e&&(e=0);return Math.pow(10,.1*(b*e+(c+90.30873362-94.82444863)))}; this.calc_xmin=function(a,b,c,d){var e=0,g=a.internal_flags,m,l=0,q=0,k=g.ATH,h=c.xr,p=a.VBR==J.vbr_mtrh?1:0,A=g.masking_lower;if(a.VBR==J.vbr_mtrh||a.VBR==J.vbr_mt)A=1;for(m=0;m>1;var I=0;do{var H=h[l]*h[l];I+=H;x+=Hw&&q++;m==f.SBPSY_l&&(u=w*g.nsPsy.longfact[m],xQ;Q++){I=0;u=r>>1;B=V/r;x=2.220446049250313E-16;do H=h[l]*h[l],I+=H,x+=HV&&q++;M==f.SBPSY_s&&(u=V*g.nsPsy.shortfact[M],xd[e-3+1]&&(d[e-3+1]+=(d[e-3]-d[e-3+1])*g.decay),d[e-3+1]>d[e-3+2]&&(d[e-3+2]+=(d[e-3+1]-d[e-3+2])*g.decay))}return q};this.calc_noise_core=function(a,c,d,f){var e=0,g=c.s,m=a.l3_enc;if(g>a.count1)for(;0!=d--;){var l=a.xr[g]; g++;e+=l*l;l=a.xr[g];g++;e+=l*l}else if(g>a.big_values){var q=G(2);q[0]=0;for(q[1]=f;0!=d--;)l=Math.abs(a.xr[g])-q[m[g]],g++,e+=l*l,l=Math.abs(a.xr[g])-q[m[g]],g++,e+=l*l}else for(;0!=d--;)l=Math.abs(a.xr[g])-b[m[g]]*f,g++,e+=l*l,l=Math.abs(a.xr[g])-b[m[g]]*f,g++,e+=l*l;c.s=g;return e};this.calc_noise=function(a,b,d,f,t){var e=0,g=0,l,q=0,r=0,h=0,p=-20,A=0,y=a.scalefac,x=0;for(l=f.over_SSD=0;l>1;A+a.width[l]>a.max_nonzero_coeff&&(v=a.max_nonzero_coeff-A+1,v=0>1:0);A=new k(A);u=this.calc_noise_core(a,A,v,u);A=A.s;null!=t&&(t.step[l]=B,t.noise[l]=u);u=d[e++]=u/b[g++];u=Z.FAST_LOG10(Math.max(u,1E-20));null!=t&&(t.noise_log[l]=u)}null!=t&&(t.global_gain=a.global_gain);h+=u;0H;H++){l=0;for(I=B;If;++f){var a=d.tt[c][0].xr[f],b=d.tt[c][1].xr[f];d.tt[c][0].xr[f]=.5*(a+b)*Z.SQRT2;d.tt[c][1].xr[f]=.5*(a-b)*Z.SQRT2}};this.init_xrpow=function(d,c,f){var a=0|c.max_nonzero_coeff;c.xrpow_max=0;qa.fill(f,a,576,0);for(var b,k=b=0;k<=a;++k){var e=Math.abs(c.xr[k]);b+=e;f[k]=Math.sqrt(e*Math.sqrt(e));f[k]>c.xrpow_max&&(c.xrpow_max=f[k])}if(1E-20l;l++)for(var q=r;q=c;e--)if(Math.abs(a[e])l;l++)for(b=!1,r=f.PSFB12-1;0<=r&&!b;r--)for(c=3*d.scalefac_band.s[12]+(d.scalefac_band.s[13]-d.scalefac_band.s[12])*l+(d.scalefac_band.psfb12[r]-d.scalefac_band.psfb12[0]),e=c+(d.scalefac_band.psfb12[r+1]-d.scalefac_band.psfb12[r]), q=C.athAdjust(k.adjust,k.psfb12[r],k.floor),1E-12=c;e--)if(Math.abs(a[e])r;r++){var e=0;0!=c.l3_enc[r]&&(e=Math.abs(c.xr[r]));a[r]=e}r=0;e= 8;c.block_type==f.SHORT_TYPE&&(e=6);do{var l,q,g=c.width[e],r=r+g;if(!(1<=b[e]||(qa.sort(a,r-g,g),da.EQ(a[r-1],0)))){var t=(1-b[e])*k[e];var w=l=0;do{for(q=1;w+qh?(O==x.BINSEARCH_DOWN&&(A=!0),A&&(p/=2),O=x.BINSEARCH_UP,F=p):(O==x.BINSEARCH_UP&&(A=!0),A&&(p/=2),O=x.BINSEARCH_DOWN,F=-p);c.global_gain+=F;0>c.global_gain&&(c.global_gain=0,A=!0);255h&&255>c.global_gain;)c.global_gain++,F=fa.count_bits(e, a,c,null);e.CurrentStep[b]=4<=y-c.global_gain?4:2;e.OldValue[b]=c.global_gain;c.part2_3_length=F;if(0==e.noise_shaping)return 100;C.calc_noise(c,r,g,t,w);t.bits=c.part2_3_length;l.assign(c);b=0;for(S.arraycopy(a,0,q,0,576);!n;){do{h=new Fb;A=255;p=0!=(e.substep_shaping&2)?20:3;if(e.sfb21_extra){if(1la;la++)I[N+la]*=M,I[N+la]>R.xrpow_max&&(R.xrpow_max=I[N+la]);if(2==H.noise_shaping_amp)break}}if(M=k(y))y=!1;else if(M= 2==O.mode_gr?fa.scale_bitcount(y):fa.scale_bitcount_lsf(O,y)){if(1H;H++)F[R+H]*=1.2968395546510096,F[R+H]>M.xrpow_max&&(M.xrpow_max=F[R+H]);M.scalefac[X]=I>>1}M.preflag=0;M.scalefac_scale=1;M=!1}else if(y.block_type==f.SHORT_TYPE&&0H;H++){V=Q=0;for(F=R.sfb_lmax+H;FQ&&8>V)){if(7<=R.subblock_gain[H]){F=!0;break b}R.subblock_gain[H]++;Q=M.scalefac_band.l[R.sfb_lmax];for(F=R.sfb_lmax+H;F>R.scalefac_scale,0<=N)I[F]=N,Q+=3*V;else{I[F]=0;N=C.IPOW20(210+(N<la;la++)X[Q+la]*=N,X[Q+la]>R.xrpow_max&&(R.xrpow_max=X[Q+la]);Q+=V*(3-H-1)}N=C.IPOW20(202); Q+=R.width[F]*(H+1);for(la=-R.width[F];0>la;la++)X[Q+la]*=N,X[Q+la]>R.xrpow_max&&(R.xrpow_max=X[Q+la])}}F=!1}M=F||k(y)}M||(M=2==O.mode_gr?fa.scale_bitcount(y):fa.scale_bitcount_lsf(O,y));y=!M}else y=!0;if(!y)break;0!=l.scalefac_scale&&(A=254);y=u-l.part2_length;if(0>=y)break;for(;(l.part2_3_length=fa.count_bits(e,a,l,w))>y&&l.global_gain<=A;)l.global_gain++;if(l.global_gain>A)break;if(0==t.over_count){for(;(l.part2_3_length=fa.count_bits(e,a,l,w))>m&&l.global_gain<=A;)l.global_gain++;if(l.global_gain> A)break}C.calc_noise(l,r,g,h,w);h.bits=l.part2_3_length;O=c.block_type!=f.SHORT_TYPE?d.quant_comp:d.quant_comp_short;A=t;y=h;M=l;F=g;switch(O){default:case 9:0y.max_noise&&10*y.max_noise+y.bits<=10*A.max_noise+A.bits;break;case 0:O=y.over_count=y.max_noise&&.2=y.max_noise&&0>A.max_noise&&A.max_noise>y.max_noise-.2&&y.tot_noise=y.max_noise&&0y.max_noise-.2&&y.tot_noisey.max_noise-.1&&y.tot_noise+y.over_noisey.max_noise-.15&&y.tot_noise+y.over_noise+y.over_noisep&&0==t.over_count)break;if(3==e.noise_shaping_amp&&B&&30l.global_gain+l.scalefac_scale);3==e.noise_shaping_amp?B?n=!0:(l.assign(c),S.arraycopy(q,0,a,0,576),b=0,v=l.global_gain,B=!0):n=!0}d.VBR==J.vbr_rh||d.VBR==J.vbr_mtrh?S.arraycopy(q, 0,a,0,576):0!=(e.substep_shaping&1)&&trancate_smallspectrums(e,c,r,a);return t.over_count};this.iteration_finish_one=function(d,c,f){var a=d.l3_side,b=a.tt[c][f];fa.best_scalefac_store(d,c,f,a);1==d.use_best_huffman&&fa.best_huffman_divide(d,b);v.ResvAdjust(d,b)};this.VBR_encode_granule=function(d,c,f,a,b,k,e){var l=d.internal_flags,q=new rb,g=G(576),r=e,w=(e+k)/2,m=0,n=l.sfb21_extra;qa.fill(q.l3_enc,0);do{l.sfb21_extra=w>r-42?!1:n;var u=outer_loop(d,c,f,a,b,w);0>=u?(m=1,e=c.part2_3_length,q.assign(c), S.arraycopy(a,0,g,0,576),e-=32,u=e-k,w=(e+k)/2):(k=w+32,u=e-k,w=(e+k)/2,0!=m&&(m=2,c.assign(q),S.arraycopy(g,0,a,0,576)))}while(12r[g.VBR_max_bitrate]&&(l[n][u]*=r[g.VBR_max_bitrate],l[n][u]/=w),e[n][u]>l[n][u]&&(e[n][u]=l[n][u]);return t};this.bitpressure_strategy=function(d,c,k,a){for(var b=0;bt&&(r[b][u]*=t,r[b][u]/=g);return q};this.calc_target_bits=function(d,c,k,a,b,u){var e=d.internal_flags,l=e.l3_side;e.bitrate_index=e.VBR_max_bitrate;var q=new Fa(0); u[0]=v.ResvFrameBegin(d,q);e.bitrate_index=1;q=r.getframebits(d)-8*e.sideinfo_len;b[0]=q/(e.mode_gr*e.channels_out);q=d.VBR_mean_bitrate_kbps*d.framesize*1E3;0!=(e.substep_shaping&1)&&(q*=1.09);q/=d.out_samplerate;q-=8*e.sideinfo_len;q/=e.mode_gr*e.channels_out;var g=.93+.07*(11-d.compression_ratio)/5.5;.9>g&&(g=.9);13*q/2?w=3*q/2:0>w&&(w=0);a[d][b]+=w}a[d][b]>ia.MAX_BITS_PER_CHANNEL&&(a[d][b]=ia.MAX_BITS_PER_CHANNEL);t+=a[d][b]}if(t>ia.MAX_BITS_PER_GRANULE)for(b=0;bia.MAX_BITS_PER_CHANNEL&&(a[d][b]=ia.MAX_BITS_PER_CHANNEL),c+=a[d][b];if(c>u[0])for(d= 0;dq;q++){var g=k[e+-10];f=c[l+-224]*g;b=c[d+224]*g;g=k[e+-9];f+=c[l+-160]*g;b+=c[d+160]*g;g=k[e+-8];f+=c[l+-96]*g;b+=c[d+96]*g;g=k[e+-7];f+=c[l+-32]*g;b+=c[d+32]*g;g=k[e+-6];f+=c[l+32]*g;b+=c[d+-32]*g;g=k[e+-5];f+=c[l+96]*g;b+=c[d+-96]*g;g=k[e+-4];f+=c[l+160]*g;b+=c[d+-160]*g;g=k[e+-3];f+=c[l+224]*g;b+=c[d+-224]*g;g=k[e+-2];f+=c[d+-256]*g;b-=c[l+256]*g;g=k[e+ -1];f+=c[d+-192]*g;b-=c[l+192]*g;g=k[e+0];f+=c[d+-128]*g;b-=c[l+128]*g;g=k[e+1];f+=c[d+-64]*g;b-=c[l+64]*g;g=k[e+2];f+=c[d+0]*g;b-=c[l+0]*g;g=k[e+3];f+=c[d+64]*g;b-=c[l+-64]*g;g=k[e+4];f+=c[d+128]*g;b-=c[l+-128]*g;g=k[e+5];f+=c[d+192]*g;b-=c[l+-192]*g;f*=k[e+6];g=b-f;a[30+2*q]=b+f;a[31+2*q]=k[e+7]*g;e+=18;d--;l++}b=c[d+-16]*k[e+-10];f=c[d+-32]*k[e+-2];b+=(c[d+-48]-c[d+16])*k[e+-9];f+=c[d+-96]*k[e+-1];b+=(c[d+-80]+c[d+48])*k[e+-8];f+=c[d+-160]*k[e+0];b+=(c[d+-112]-c[d+80])*k[e+-7];f+=c[d+-224]*k[e+ 1];b+=(c[d+-144]+c[d+112])*k[e+-6];f-=c[d+32]*k[e+2];b+=(c[d+-176]-c[d+144])*k[e+-5];f-=c[d+96]*k[e+3];b+=(c[d+-208]+c[d+176])*k[e+-4];f-=c[d+160]*k[e+4];b+=(c[d+-240]-c[d+208])*k[e+-3];f-=c[d+224];c=f-b;d=f+b;b=a[14];f=a[15]-b;a[31]=d+b;a[30]=c+f;a[15]=c-f;a[14]=d-b;b=a[28]-a[0];a[0]+=a[28];a[28]=b*k[e+-36+7];b=a[29]-a[1];a[1]+=a[29];a[29]=b*k[e+-36+7];b=a[26]-a[2];a[2]+=a[26];a[26]=b*k[e+-72+7];b=a[27]-a[3];a[3]+=a[27];a[27]=b*k[e+-72+7];b=a[24]-a[4];a[4]+=a[24];a[24]=b*k[e+-108+7];b=a[25]-a[5]; a[5]+=a[25];a[25]=b*k[e+-108+7];b=a[22]-a[6];a[6]+=a[22];a[22]=b*Z.SQRT2;b=a[23]-a[7];a[7]+=a[23];a[23]=b*Z.SQRT2-a[7];a[7]-=a[6];a[22]-=a[7];a[23]-=a[22];b=a[6];a[6]=a[31]-b;a[31]+=b;b=a[7];a[7]=a[30]-b;a[30]+=b;b=a[22];a[22]=a[15]-b;a[15]+=b;b=a[23];a[23]=a[14]-b;a[14]+=b;b=a[20]-a[8];a[8]+=a[20];a[20]=b*k[e+-180+7];b=a[21]-a[9];a[9]+=a[21];a[21]=b*k[e+-180+7];b=a[18]-a[10];a[10]+=a[18];a[18]=b*k[e+-216+7];b=a[19]-a[11];a[11]+=a[19];a[19]=b*k[e+-216+7];b=a[16]-a[12];a[12]+=a[16];a[16]=b*k[e+-252+ 7];b=a[17]-a[13];a[13]+=a[17];a[17]=b*k[e+-252+7];b=-a[20]+a[24];a[20]+=a[24];a[24]=b*k[e+-216+7];b=-a[21]+a[25];a[21]+=a[25];a[25]=b*k[e+-216+7];b=a[4]-a[8];a[4]+=a[8];a[8]=b*k[e+-216+7];b=a[5]-a[9];a[5]+=a[9];a[9]=b*k[e+-216+7];b=a[0]-a[12];a[0]+=a[12];a[12]=b*k[e+-72+7];b=a[1]-a[13];a[1]+=a[13];a[13]=b*k[e+-72+7];b=a[16]-a[28];a[16]+=a[28];a[28]=b*k[e+-72+7];b=-a[17]+a[29];a[17]+=a[29];a[29]=b*k[e+-72+7];b=Z.SQRT2*(a[2]-a[10]);a[2]+=a[10];a[10]=b;b=Z.SQRT2*(a[3]-a[11]);a[3]+=a[11];a[11]=b;b=Z.SQRT2* (-a[18]+a[26]);a[18]+=a[26];a[26]=b-a[18];b=Z.SQRT2*(-a[19]+a[27]);a[19]+=a[27];a[27]=b-a[19];b=a[2];a[19]-=a[3];a[3]-=b;a[2]=a[31]-b;a[31]+=b;b=a[3];a[11]-=a[19];a[18]-=b;a[3]=a[30]-b;a[30]+=b;b=a[18];a[27]-=a[11];a[19]-=b;a[18]=a[15]-b;a[15]+=b;b=a[19];a[10]-=b;a[19]=a[14]-b;a[14]+=b;b=a[10];a[11]-=b;a[10]=a[23]-b;a[23]+=b;b=a[11];a[26]-=b;a[11]=a[22]-b;a[22]+=b;b=a[26];a[27]-=b;a[26]=a[7]-b;a[7]+=b;b=a[27];a[27]=a[6]-b;a[6]+=b;b=Z.SQRT2*(a[0]-a[4]);a[0]+=a[4];a[4]=b;b=Z.SQRT2*(a[1]-a[5]);a[1]+= a[5];a[5]=b;b=Z.SQRT2*(a[16]-a[20]);a[16]+=a[20];a[20]=b;b=Z.SQRT2*(a[17]-a[21]);a[17]+=a[21];a[21]=b;b=-Z.SQRT2*(a[8]-a[12]);a[8]+=a[12];a[12]=b-a[8];b=-Z.SQRT2*(a[9]-a[13]);a[9]+=a[13];a[13]=b-a[9];b=-Z.SQRT2*(a[25]-a[29]);a[25]+=a[29];a[29]=b-a[25];b=-Z.SQRT2*(a[24]+a[28]);a[24]-=a[28];a[28]=b-a[24];b=a[24]-a[16];a[24]=b;b=a[20]-b;a[20]=b;b=a[28]-b;a[28]=b;b=a[25]-a[17];a[25]=b;b=a[21]-b;a[21]=b;b=a[29]-b;a[29]=b;b=a[17]-a[1];a[17]=b;b=a[9]-b;a[9]=b;b=a[25]-b;a[25]=b;b=a[5]-b;a[5]=b;b=a[21]-b; a[21]=b;b=a[13]-b;a[13]=b;b=a[29]-b;a[29]=b;b=a[1]-a[0];a[1]=b;b=a[16]-b;a[16]=b;b=a[17]-b;a[17]=b;b=a[8]-b;a[8]=b;b=a[9]-b;a[9]=b;b=a[24]-b;a[24]=b;b=a[25]-b;a[25]=b;b=a[4]-b;a[4]=b;b=a[5]-b;a[5]=b;b=a[20]-b;a[20]=b;b=a[21]-b;a[21]=b;b=a[12]-b;a[12]=b;b=a[13]-b;a[13]=b;b=a[28]-b;a[28]=b;b=a[29]-b;a[29]=b;b=a[0];a[0]+=a[31];a[31]-=b;b=a[1];a[1]+=a[30];a[30]-=b;b=a[16];a[16]+=a[15];a[15]-=b;b=a[17];a[17]+=a[14];a[14]-=b;b=a[8];a[8]+=a[23];a[23]-=b;b=a[9];a[9]+=a[22];a[22]-=b;b=a[24];a[24]+=a[7];a[7]-= b;b=a[25];a[25]+=a[6];a[6]-=b;b=a[4];a[4]+=a[27];a[27]-=b;b=a[5];a[5]+=a[26];a[26]-=b;b=a[20];a[20]+=a[11];a[11]-=b;b=a[21];a[21]+=a[10];a[10]-=b;b=a[12];a[12]+=a[19];a[19]-=b;b=a[13];a[13]+=a[18];a[18]-=b;b=a[28];a[28]+=a[3];a[3]-=b;b=a[29];a[29]+=a[2];a[2]-=b}var k=[-.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,.0178904535*Z.SQRT2/2.384E-6,.008938074*Z.SQRT2/2.384E-6,.0015673635*Z.SQRT2/2.384E-6,.001228571*Z.SQRT2/2.384E-6,4.856585E-4*Z.SQRT2/2.384E-6,1.09434E-4*Z.SQRT2/2.384E-6,5.0783E-5*Z.SQRT2/2.384E-6,6.914E-6*Z.SQRT2/2.384E-6,12804.797818791945, 1945.5515939597317,313.4244966442953,20.801593959731544,1995.1556208053692,9.000838926174497,-29.20218120805369],r=[[2.382191739347913E-13,6.423305872147834E-13,9.400849094049688E-13,1.122435026096556E-12,1.183840321267481E-12,1.122435026096556E-12,9.40084909404969E-13,6.423305872147839E-13,2.382191739347918E-13,5.456116108943412E-12,4.878985199565852E-12,4.240448995017367E-12,3.559909094758252E-12,2.858043359288075E-12,2.156177623817898E-12,1.475637723558783E-12,8.371015190102974E-13,2.599706096327376E-13, -5.456116108943412E-12,-4.878985199565852E-12,-4.240448995017367E-12,-3.559909094758252E-12,-2.858043359288076E-12,-2.156177623817898E-12,-1.475637723558783E-12,-8.371015190102975E-13,-2.599706096327376E-13,-2.382191739347923E-13,-6.423305872147843E-13,-9.400849094049696E-13,-1.122435026096556E-12,-1.183840321267481E-12,-1.122435026096556E-12,-9.400849094049694E-13,-6.42330587214784E-13,-2.382191739347918E-13],[2.382191739347913E-13,6.423305872147834E-13,9.400849094049688E-13,1.122435026096556E-12, 1.183840321267481E-12,1.122435026096556E-12,9.400849094049688E-13,6.423305872147841E-13,2.382191739347918E-13,5.456116108943413E-12,4.878985199565852E-12,4.240448995017367E-12,3.559909094758253E-12,2.858043359288075E-12,2.156177623817898E-12,1.475637723558782E-12,8.371015190102975E-13,2.599706096327376E-13,-5.461314069809755E-12,-4.921085770524055E-12,-4.343405037091838E-12,-3.732668368707687E-12,-3.093523840190885E-12,-2.430835727329465E-12,-1.734679010007751E-12,-9.74825365660928E-13,-2.797435120168326E-13, 0,0,0,0,0,0,-2.283748241799531E-13,-4.037858874020686E-13,-2.146547464825323E-13],[.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,2.283748241799531E-13,4.037858874020686E-13,2.146547464825323E-13,5.461314069809755E-12,4.921085770524055E-12,4.343405037091838E-12,3.732668368707687E-12,3.093523840190885E-12,2.430835727329466E-12,1.734679010007751E-12,9.74825365660928E-13,2.797435120168326E-13, -5.456116108943413E-12,-4.878985199565852E-12,-4.240448995017367E-12,-3.559909094758253E-12,-2.858043359288075E-12,-2.156177623817898E-12,-1.475637723558782E-12,-8.371015190102975E-13,-2.599706096327376E-13,-2.382191739347913E-13,-6.423305872147834E-13,-9.400849094049688E-13,-1.122435026096556E-12,-1.183840321267481E-12,-1.122435026096556E-12,-9.400849094049688E-13,-6.423305872147841E-13,-2.382191739347918E-13]],v=r[f.SHORT_TYPE],C=r[f.SHORT_TYPE],u=r[f.SHORT_TYPE],J=r[f.SHORT_TYPE],d=[0,1,16,17, 8,9,24,25,4,5,20,21,12,13,28,29,2,3,18,19,10,11,26,27,6,7,22,23,14,15,30,31];this.mdct_sub48=function(c,k,a){for(var b=286,w=0;wn;n++)for(x(k,b,D[m]),x(k,b+32,D[m+1]),m+=2,b+=64,l=1;32>l;l+=2)D[m-1][l]*=-1;for(l=0;32>l;l++,t+=18){var D=q.block_type,m=c.sb_sample[w][e],z=c.sb_sample[w][1-e];0!=q.mixed_block_flag&&2>l&&(D=0);if(1E-12>c.amp_filter[l])qa.fill(g,t+0,t+18,0);else{if(1> c.amp_filter[l])for(n=0;18>n;n++)z[n][d[l]]*=c.amp_filter[l];if(D==f.SHORT_TYPE){for(n=-3;0>n;n++){var E=r[f.SHORT_TYPE][n+3];g[t+3*n+9]=m[9+n][d[l]]*E-m[8-n][d[l]];g[t+3*n+18]=m[14-n][d[l]]*E+m[15+n][d[l]];g[t+3*n+10]=m[15+n][d[l]]*E-m[14-n][d[l]];g[t+3*n+19]=z[2-n][d[l]]*E+z[3+n][d[l]];g[t+3*n+11]=z[3+n][d[l]]*E-z[2-n][d[l]];g[t+3*n+20]=z[8-n][d[l]]*E+z[9+n][d[l]]}n=g;m=t;for(E=0;3>E;E++){var h=n[m+6]*r[f.SHORT_TYPE][0]-n[m+15];z=n[m+0]*r[f.SHORT_TYPE][2]-n[m+9];var p=h+z;var A=h-z;h=n[m+15]*r[f.SHORT_TYPE][0]+ n[m+6];z=n[m+9]*r[f.SHORT_TYPE][2]+n[m+0];var y=h+z;var O=-h+z;z=2.069978111953089E-11*(n[m+3]*r[f.SHORT_TYPE][1]-n[m+12]);h=2.069978111953089E-11*(n[m+12]*r[f.SHORT_TYPE][1]+n[m+3]);n[m+0]=1.90752519173728E-11*p+z;n[m+15]=1.90752519173728E-11*-y+h;A*=1.6519652744032674E-11;y=9.537625958686404E-12*y+h;n[m+3]=A-y;n[m+6]=A+y;p=9.537625958686404E-12*p-z;O*=1.6519652744032674E-11;n[m+9]=p+O;n[m+12]=p-O;m++}}else{E=G(18);for(n=-9;0>n;n++)p=r[D][n+27]*z[n+9][d[l]]+r[D][n+36]*z[8-n][d[l]],A=r[D][n+9]*m[n+ 9][d[l]]-r[D][n+18]*m[8-n][d[l]],E[n+9]=p-A*v[3+n+9],E[n+18]=p*v[3+n+9]+A;var n=g,m=t;p=E;var F=p[17]-p[9];var R=p[15]-p[11];var X=p[14]-p[12];O=p[0]+p[8];y=p[1]+p[7];h=p[2]+p[6];A=p[3]+p[5];n[m+17]=O+h-A-(y-p[4]);E=(O+h-A)*C[19]+(y-p[4]);z=(F-R-X)*C[18];n[m+5]=z+E;n[m+6]=z-E;var I=(p[16]-p[10])*C[18];y=y*C[19]+p[4];z=F*C[12]+I+R*C[13]+X*C[14];E=-O*C[16]+y-h*C[17]+A*C[15];n[m+1]=z+E;n[m+2]=z-E;z=F*C[13]-I-R*C[14]+X*C[12];E=-O*C[17]+y-h*C[15]+A*C[16];n[m+9]=z+E;n[m+10]=z-E;z=F*C[14]-I+R*C[12]-X*C[13]; E=O*C[15]-y+h*C[16]-A*C[17];n[m+13]=z+E;n[m+14]=z-E;F=p[8]-p[0];R=p[6]-p[2];X=p[5]-p[3];O=p[17]+p[9];y=p[16]+p[10];h=p[15]+p[11];A=p[14]+p[12];n[m+0]=O+h+A+(y+p[13]);z=(O+h+A)*C[19]-(y+p[13]);E=(F-R+X)*C[18];n[m+11]=z+E;n[m+12]=z-E;I=(p[7]-p[1])*C[18];y=p[13]-y*C[19];z=O*C[15]-y+h*C[16]+A*C[17];E=F*C[14]+I+R*C[12]+X*C[13];n[m+3]=z+E;n[m+4]=z-E;z=-O*C[17]+y-h*C[15]-A*C[16];E=F*C[13]+I-R*C[14]-X*C[12];n[m+7]=z+E;n[m+8]=z-E;z=-O*C[16]+y-h*C[17]-A*C[15];E=F*C[12]-I+R*C[13]-X*C[14];n[m+15]=z+E;n[m+16]= z-E}}if(D!=f.SHORT_TYPE&&0!=l)for(n=7;0<=n;--n)D=g[t+n]*u[20+n]+g[t+-1-n]*J[28+n],m=g[t+n]*J[28+n]-g[t+-1-n]*u[20+n],g[t+-1-n]=D,g[t+n]=m}}k=a;b=286;if(1==c.mode_gr)for(e=0;18>e;e++)S.arraycopy(c.sb_sample[w][1][e],0,c.sb_sample[w][0][e],0,32)}}}function za(){this.thm=new tb;this.en=new tb}function f(){var x=f.FFTOFFSET,k=f.MPG_MD_MS_LR,r=null,v=this.psy=null,C=null,u=null;this.setModules=function(d,c,f,a){r=d;v=this.psy=c;C=a;u=f};var fa=new Fc;this.lame_encode_mp3_frame=function(d,c,w,a,b,B){var e= Tb([2,2]);e[0][0]=new za;e[0][1]=new za;e[1][0]=new za;e[1][1]=new za;var l=Tb([2,2]);l[0][0]=new za;l[0][1]=new za;l[1][0]=new za;l[1][1]=new za;var q=[null,null],g=d.internal_flags,t=ha([2,4]),D=[.5,.5],m=[[0,0],[0,0]],n=[[0,0],[0,0]];q[0]=c;q[1]=w;if(0==g.lame_encode_frame_init){c=d.internal_flags;var z,E;if(0==c.lame_encode_frame_init){w=G(2014);var h=G(2014);c.lame_encode_frame_init=1;for(E=z=0;z<286+576*(1+c.mode_gr);++z)z<576*c.mode_gr?(w[z]=0,2==c.channels_out&&(h[z]=0)):(w[z]=q[0][E],2== c.channels_out&&(h[z]=q[1][E]),++E);for(E=0;E(g.slot_lag-=g.frac_SpF)&&(g.slot_lag+=d.out_samplerate,g.padding=1);if(0!=g.psymodel)for(h=[null,null],z=0,E=U(2),w=0;w=t?(g.ATH.adjust*=.075*t+.925,g.ATH.adjust=t?g.ATH.adjust=t:g.ATH.adjustl;l++)g.nsPsy.pefirbuf[l]=g.nsPsy.pefirbuf[l+1];for(w=n=0;wl;l++)n+=(g.nsPsy.pefirbuf[l]+g.nsPsy.pefirbuf[18-l])*f.fircoef[l];n=3350*g.mode_gr*g.channels_out/n;for(w=0;wb;b++)g.pinfo.pcmdata[c][b]=q[c][b-x]}u.set_frame_pinfo(d,e)}g.bitrate_stereoMode_Hist[g.bitrate_index][4]++;g.bitrate_stereoMode_Hist[15][4]++;2==g.channels_out&&(g.bitrate_stereoMode_Hist[g.bitrate_index][g.mode_ext]++, g.bitrate_stereoMode_Hist[15][g.mode_ext]++);for(d=0;df;f++)for(var k=0;2>k;k++)this.tt[f][k]=new rb}function tb(){this.l=G(f.SBMAX_l);this.s=ha([f.SBMAX_s,3]);var x=this;this.assign=function(k){S.arraycopy(k.l,0,x.l,0,f.SBMAX_l);for(var r=0;rv;v++)x.s[r][v]=k.s[r][v]}}function Ic(){this.last_en_subshort=ha([4,9]);this.lastAttacks=U(4);this.pefirbuf=G(19);this.longfact=G(f.SBMAX_l); this.shortfact=G(f.SBMAX_s);this.attackthre_s=this.attackthre=0}function ia(){function x(){this.ptr=this.write_timing=0;this.buf=new Int8Array(40)}this.fill_buffer_resample_init=this.iteration_init_init=this.lame_encode_frame_init=this.Class_ID=0;this.mfbuf=ha([2,ia.MFSIZE]);this.full_outer_loop=this.use_best_huffman=this.subblock_gain=this.noise_shaping_stop=this.psymodel=this.substep_shaping=this.noise_shaping_amp=this.noise_shaping=this.highpass2=this.highpass1=this.lowpass2=this.lowpass1=this.mode_ext= this.samplerate_index=this.bitrate_index=this.VBR_max_bitrate=this.VBR_min_bitrate=this.mf_size=this.mf_samples_to_encode=this.resample_ratio=this.channels_out=this.channels_in=this.mode_gr=0;this.l3_side=new Hc;this.ms_ratio=G(2);this.slot_lag=this.frac_SpF=this.padding=0;this.tag_spec=null;this.nMusicCRC=0;this.OldValue=U(2);this.CurrentStep=U(2);this.masking_lower=0;this.bv_scf=U(576);this.pseudohalf=U(ra.SFBMAX);this.sfb21_extra=!1;this.inbuf_old=Array(2);this.blackfilt=Array(2*ia.BPC+1);this.itime= new Float64Array(2);this.sideinfo_len=0;this.sb_sample=ha([2,2,18,f.SBLIMIT]);this.amp_filter=G(32);this.header=Array(ia.MAX_HEADER_BUF);this.ResvMax=this.ResvSize=this.ancillary_flag=this.w_ptr=this.h_ptr=0;this.scalefac_band=new ma;this.minval_l=G(f.CBANDS);this.minval_s=G(f.CBANDS);this.nb_1=ha([4,f.CBANDS]);this.nb_2=ha([4,f.CBANDS]);this.nb_s1=ha([4,f.CBANDS]);this.nb_s2=ha([4,f.CBANDS]);this.s3_ll=this.s3_ss=null;this.decay=0;this.thm=Array(4);this.en=Array(4);this.tot_ener=G(4);this.loudness_sq= ha([2,2]);this.loudness_sq_save=G(2);this.mld_l=G(f.SBMAX_l);this.mld_s=G(f.SBMAX_s);this.bm_l=U(f.SBMAX_l);this.bo_l=U(f.SBMAX_l);this.bm_s=U(f.SBMAX_s);this.bo_s=U(f.SBMAX_s);this.npart_s=this.npart_l=0;this.s3ind=Ua([f.CBANDS,2]);this.s3ind_s=Ua([f.CBANDS,2]);this.numlines_s=U(f.CBANDS);this.numlines_l=U(f.CBANDS);this.rnumlines_l=G(f.CBANDS);this.mld_cb_l=G(f.CBANDS);this.mld_cb_s=G(f.CBANDS);this.numlines_l_num1=this.numlines_s_num1=0;this.pe=G(4);this.ms_ener_ratio_old=this.ms_ratio_l_old=this.ms_ratio_s_old= 0;this.blocktype_old=U(2);this.nsPsy=new Ic;this.VBR_seek_table=new Gc;this.PSY=this.ATH=null;this.nogap_current=this.nogap_total=0;this.findPeakSample=this.findReplayGain=this.decode_on_the_fly=!0;this.AudiophileGain=this.RadioGain=this.PeakSample=0;this.rgdata=null;this.noclipScale=this.noclipGainChange=0;this.bitrate_stereoMode_Hist=Ua([16,5]);this.bitrate_blockType_Hist=Ua([16,6]);this.hip=this.pinfo=null;this.in_buffer_nsamples=0;this.iteration_loop=this.in_buffer_1=this.in_buffer_0=null;for(var k= 0;k>1;var e=a;var l=a<<1;var q=l+e;a=l<<1;var g=k;var t=g+u;do{var x=f[g+0]-f[g+e];var m=f[g+0]+f[g+e];var n=f[g+l]-f[g+q];var C=f[g+l]+f[g+q];f[g+l]=m-C;f[g+0]=m+C;f[g+q]=x-n;f[g+e]=x+n;x=f[t+0]-f[t+e];m=f[t+0]+f[t+e];n=Z.SQRT2*f[t+q];C=Z.SQRT2*f[t+l];f[t+l]=m-C;f[t+0]=m+C;f[t+ q]=x-n;f[t+e]=x+n;t+=a;g+=a}while(gk;k++){var a=f.BLKSIZE_s/2,b=65535&192*(k+1),u=f.BLKSIZE_s/8-1;do{var e=C[u<<2]&255;var l=r[e]*c[d][w+e+b];var q=r[127-e]*c[d][w+e+b+128];var g=l-q;l+=q;var t=r[e+64]*c[d][w+e+b+64];q=r[63-e]*c[d][w+e+b+192];var D=t-q;t+=q;a-=4;v[k][a+0]=l+t;v[k][a+2]=l-t;v[k][a+1]=g+D;v[k][a+3]=g-D;l=r[e+ 1]*c[d][w+e+b+1];q=r[126-e]*c[d][w+e+b+129];g=l-q;l+=q;t=r[e+65]*c[d][w+e+b+65];q=r[62-e]*c[d][w+e+b+193];D=t-q;t+=q;v[k][a+f.BLKSIZE_s/2+0]=l+t;v[k][a+f.BLKSIZE_s/2+2]=l-t;v[k][a+f.BLKSIZE_s/2+1]=g+D;v[k][a+f.BLKSIZE_s/2+3]=g-D}while(0<=--u);x(v[k],a,f.BLKSIZE_s/2)}};this.fft_long=function(r,v,d,c,w){r=f.BLKSIZE/8-1;var a=f.BLKSIZE/2;do{var b=C[r]&255;var u=k[b]*c[d][w+b];var e=k[b+512]*c[d][w+b+512];var l=u-e;u+=e;var q=k[b+256]*c[d][w+b+256];e=k[b+768]*c[d][w+b+768];var g=q-e;q+=e;a-=4;v[a+0]= u+q;v[a+2]=u-q;v[a+1]=l+g;v[a+3]=l-g;u=k[b+1]*c[d][w+b+1];e=k[b+513]*c[d][w+b+513];l=u-e;u+=e;q=k[b+257]*c[d][w+b+257];e=k[b+769]*c[d][w+b+769];g=q-e;q+=e;v[a+f.BLKSIZE/2+0]=u+q;v[a+f.BLKSIZE/2+2]=u-q;v[a+f.BLKSIZE/2+1]=l+g;v[a+f.BLKSIZE/2+3]=l-g}while(0<=--r);x(v,a,f.BLKSIZE/2)};this.init_fft=function(u){for(u=0;ua)if(b=b*n)return a+b;g=a/b}a+=b;if(6>=f+3){if(g>=m)return a;f=0|Z.FAST_LOG10_X(g,16);return a*p[f]}f=0|Z.FAST_LOG10_X(g,16);b=0!=e?d.ATH.cb_s[c]*d.ATH.adjust:d.ATH.cb_l[c]*d.ATH.adjust;return ab?(c=1,13>=f&&(c=A[f]),b=Z.FAST_LOG10_X(a/b,10/15),a*((h[f]-c)*b+c)):13a&&(a=0);0>b&&(b=0);if(0>= a)return b;if(0>=b)return a;var f=b>a?b/a:a/b;if(-2<=c&&2>=c){if(f>=m)return a+b;c=0|Z.FAST_LOG10_X(f,16);return(a+b)*y[c]}if(f=m){++h;break}k=a.PSY.bo_s_weight[h];m=1-k;p=k*b[g];k*=c[g];a.en[d].s[h][e]+=p;a.thm[d].s[h][e]+=k;p=m*b[g];k=m*c[g]}for(;h=l){++e;break}p=a.PSY.bo_l_weight[e];l=1-p;g=p*b[h];p*=c[h];a.en[d].l[e]+=g;a.thm[d].l[e]+=p;g=l*b[h];p=l*c[h]}for(;e=c?b:0e;e++){var h=a.thm.s[d][e];if(0h&&(c=g>1E10*h?c+23.02585092994046*O[d]:c+O[d]*Z.FAST_LOG10(g/h))}}return c}function d(a,b){for(var c=281.0575,d=0;de&&(c=h>1E10*e?c+23.02585092994046*F[d]:c+F[d]*Z.FAST_LOG10(h/e))}}return c}function c(a,b,c,d,f){var e,h;for(e=h=0;ef&&(g=f);d[e]=g}else d[e]=0;for(e=1;ef&&(g=f),d[e]=g):d[e]=0;h=c[e-1]+c[e];0f&&(g=f),d[e]=g):d[e]=0}function a(a,b,c,e,d,f,h){var g= 2*f;d=0m&&(k=m);p>q&&(p=q);b[2][l]=k;b[3][l]=p}}function b(a,b){a=0<=a?27*-a:a*b;return-72>=a?0:Math.exp(.2302585093*a)}function B(a){0> a&&(a=0);a*=.001;return 13*Math.atan(.76*a)+3.5*Math.atan(a*a/56.25)}function e(a,b,c,e,d,h,g,p,k,l,m,q){var A=G(f.CBANDS+1),r=p/(15B(p*w)-y&&w<=k/2;w++);a[n]=w-u;for(Q=n+1;uk/2){u=k/2;++n;break}}A[n]=p*u;for(y=0;yn&&(n=0),w=0|Math.floor(.5+m*(u-.5)),w>k/2&&(w=k/2),c[y]=(t[n]+t[w])/2,b[y]=t[w],g[y]=(r*u-A[b[y]])/(A[b[y]+ 1]-A[b[y]]),0>g[y]?g[y]=0:1=m){var q=m-.5;q=8*(q*q-2*q)}else q=0;m+=.474;m=15.811389+7.5*m-17.5*Math.sqrt(1+m*m);-60>=m?q=0:(m=Math.exp(.2302585093* (q+m)),q=m/.6609193);m=q*d[g];p[l][g]=m*h[l]}else for(g=0;g=n;++n)A=m+n*(r-m)/1E3,A=b(A,l),t+=A;A=1001/(t*(r-m));for(l=0;la&&(a=3410);a=Math.max(.1,a/1E3);return 3.64*Math.pow(a,-.8)-6.8*Math.exp(-.6*Math.pow(a-3.4,2))+6*Math.exp(-.15*Math.pow(a-8.7,2))+.001*(.6+.04*b)*Math.pow(a,4)}var t=new Jc,D=1/217621504/(f.BLKSIZE/2),m,n,z,E=[1,.79433,.63096,.63096,.63096,.63096,.63096,.25119,.11749],h=[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],p=[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],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],O=[11.8,13.6,17.2,32,46.5,51.3,57.5,67.1,71.5,84.6,97.6,130],F=[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],R=[-1.730326E-17,-.01703172, -1.349528E-17,.0418072,-6.73278E-17,-.0876324,-3.0835E-17,.1863476,-1.104424E-16,-.627638];this.L3psycho_anal_ns=function(a,b,e,h,g,p,l,m,q,A){var r,n=a.internal_flags,y=ha([2,f.BLKSIZE]),Q=ha([2,3,f.BLKSIZE_s]),I=G(f.CBANDS+1),H=G(f.CBANDS+1),V=G(f.CBANDS+2),O=U(2),D=U(2),z,M,B,X,F,N,K,la=ha([2,576]),S=U(f.CBANDS+2),ca=U(f.CBANDS+2);qa.fill(ca,0);var fa=n.channels_out;a.mode==ka.JOINT_STEREO&&(fa=4);var T=a.VBR==J.vbr_off?0==n.ResvMax?0:n.ResvSize/n.ResvMax*.5:a.VBR==J.vbr_rh||a.VBR==J.vbr_mtrh|| a.VBR==J.vbr_mt?.6:1;for(z=0;zB;B++){var ba;var ia=Qa[L+B+10];for(X=ba=0;9>X;X+=2)ia+=R[X]*(Qa[L+B+X]+Qa[L+B+21-X]),ba+=R[X+1]*(Qa[L+B+X+1]+Qa[L+B+21-X-1]);la[z][B]=ia+ba}g[h][z].en.assign(n.en[z]);g[h][z].thm.assign(n.thm[z]);2B;B++)Ka[B]=n.nsPsy.last_en_subshort[z][B+6],Da[B]=Ka[B]/n.nsPsy.last_en_subshort[z][B+4],da[0]+=Ka[B];if(2==z)for(B=0;576>B;B++){var za=la[0][B];var Ub=la[1][B];la[0][B]=za+Ub;la[1][B]=za-Ub}var Za=la[z&1],bc=0;for(B=0;9>B;B++){var Ua=bc+64;for(r=1;bcKa[B+3-2]?r/Ka[B+3-2]:Ka[B+3-2]>10*r?Ka[B+3-2]/(10*r):0;Da[B+3]=r}if(a.analysis){var Fa=Da[0];for(B=1;12>B;B++)FaB;B++)0==ya[B/3]&&Da[B]>sb&&(ya[B/3]=B%3+1);for(B=1;4>B;B++)1.7>(da[B-1]>da[B]?da[B-1]/da[B]:da[B]/da[B-1])&&(ya[B]=0,1==B&&(ya[0]=0));0!=ya[0]&&0!=n.nsPsy.lastAttacks[z]&&(ya[0]=0);if(3==n.nsPsy.lastAttacks[z]||0!=ya[0]+ya[1]+ya[2]+ya[3])Y=0,0!=ya[1]&&0!=ya[0]&&(ya[1]=0),0!=ya[2]&&0!=ya[1]&&(ya[2]=0),0!=ya[3]&&0!=ya[2]&&(ya[3]=0);2>z?D[z]=Y:0==Y&&(D[0]=D[1]=0);q[z]=n.tot_ener[z];var ub=void 0, Vb=void 0,ob=void 0,P=void 0,jc=a,Ia=xa,Gb=ma,Ra=y,La=z&1,Ma=Q,Sa=z&1,va=h,Na=z,fb=b,gb=e,Va=jc.internal_flags;if(2>Na)t.fft_long(Va,Ra[La],Na,fb,gb),t.fft_short(Va,Ma[Sa],Na,fb,gb);else if(2==Na){for(var ja=f.BLKSIZE-1;0<=ja;--ja)ub=Ra[La+0][ja],Vb=Ra[La+1][ja],Ra[La+0][ja]=(ub+Vb)*Z.SQRT2*.5,Ra[La+1][ja]=(ub-Vb)*Z.SQRT2*.5;for(var Ca=2;0<=Ca;--Ca)for(ja=f.BLKSIZE_s-1;0<=ja;--ja)ub=Ma[Sa+0][Ca][ja],Vb=Ma[Sa+1][Ca][ja],Ma[Sa+0][Ca][ja]=(ub+Vb)*Z.SQRT2*.5,Ma[Sa+1][Ca][ja]=(ub-Vb)*Z.SQRT2*.5}Ia[0]= Ra[La+0][0];Ia[0]*=Ia[0];for(ja=f.BLKSIZE/2-1;0<=ja;--ja)ob=Ra[La+0][f.BLKSIZE/2-ja],P=Ra[La+0][f.BLKSIZE/2+ja],Ia[f.BLKSIZE/2-ja]=.5*(ob*ob+P*P);for(Ca=2;0<=Ca;--Ca)for(Gb[Ca][0]=Ma[Sa+0][Ca][0],Gb[Ca][0]*=Gb[Ca][0],ja=f.BLKSIZE_s/2-1;0<=ja;--ja)ob=Ma[Sa+0][Ca][f.BLKSIZE_s/2-ja],P=Ma[Sa+0][Ca][f.BLKSIZE_s/2+ja],Gb[Ca][f.BLKSIZE_s/2-ja]=.5*(ob*ob+P*P);for(var rb=0,ja=11;jaNa&&(Va.loudness_sq[va][Na]=Va.loudness_sq_save[Na],Va.loudness_sq_save[Na]=x(Ia,Va));c(n,xa,I,ac,ra);w(n,ac,ra,S);for(K=0;3>K;K++){for(var Hb,aa,sa=void 0,ta=void 0,Wb=void 0,Ab=ma,Ta=H,$a=V,vb=z,Fb=K,Ga=a.internal_flags,sa=ta=0;sakb;kb++)oa=Oa.thm[0].s[Aa][kb],Jb= Oa.thm[1].s[Aa][kb],Oa.thm[0].s[Aa][kb]+=Jb*Cb,Oa.thm[1].s[Aa][kb]+=oa*Cb}}if(a.mode==ka.JOINT_STEREO){for(var Db,Kb,Ja,Xa,ea=0;ea1.58*n.thm[1].l[ea]||n.thm[1].l[ea]>1.58*n.thm[0].l[ea]||(Xa=n.mld_l[ea]*n.en[3].l[ea],Ja=Math.max(n.thm[2].l[ea],Math.min(n.thm[3].l[ea],Xa)),Xa=n.mld_l[ea]*n.en[2].l[ea],Kb=Math.max(n.thm[3].l[ea],Math.min(n.thm[2].l[ea],Xa)),n.thm[2].l[ea]=Ja,n.thm[3].l[ea]=Kb);for(ea=0;eaBa;Ba++)n.thm[0].s[ea][Ba]>1.58*n.thm[1].s[ea][Ba]|| n.thm[1].s[ea][Ba]>1.58*n.thm[0].s[ea][Ba]||(Xa=n.mld_s[ea]*n.en[3].s[ea][Ba],Ja=Math.max(n.thm[2].s[ea][Ba],Math.min(n.thm[3].s[ea][Ba],Xa)),Xa=n.mld_s[ea]*n.en[2].s[ea][Ba],Kb=Math.max(n.thm[3].s[ea][Ba],Math.min(n.thm[2].s[ea][Ba],Xa)),n.thm[2].s[ea][Ba]=Ja,n.thm[3].s[ea][Ba]=Kb);Db=a.msfix;if(0mb;mb++)bb=n.ATH.cb_s[n.bm_s[wa]]*lb,Eb=Math.min(Math.max(n.thm[0].s[wa][mb],bb),Math.max(n.thm[1].s[wa][mb],bb)),db=Math.max(n.thm[2].s[wa][mb],bb),cb=Math.max(n.thm[3].s[wa][mb],bb),Eb*LbL;L++){var ba; var ia=firbuf[Qa+L+10];for(var da=ba=0;9>da;da+=2)ia+=X[da]*(firbuf[Qa+L+da]+firbuf[Qa+L+21-da]),ba+=X[da+1]*(firbuf[Qa+L+da+1]+firbuf[Qa+L+21-da-1]);la[T][L]=ia+ba}p[g][T].en.assign(S.en[T]);p[g][T].thm.assign(S.thm[T]);2L;L++)Da[L]=S.nsPsy.last_en_subshort[T][L+6],Y[L]=Da[L]/S.nsPsy.last_en_subshort[T][L+4],ra[0]+=Da[L];for(L=0;9>L;L++){for(var za=qa+64,Za=1;qaDa[L+3-2]?Za/Da[L+3-2]:Da[L+3-2]>10*Za?Da[L+3-2]/(10*Za):0;Y[L+3]=Za}for(L=0;3>L;++L){var Ua=Da[3*L+3]+Da[3*L+4]+Da[3*L+5],Ub=1;6*Da[3*L+5]L;L++)fb< Y[L]&&(fb=Y[L]);S.pinfo.ers[g][T]=S.pinfo.ers_save[T];S.pinfo.ers_save[T]=fb}for(L=0;12>L;L++)0==N[T][L/3]&&Y[L]>ya&&(N[T][L/3]=L%3+1);for(L=1;4>L;L++){var gb=ra[L-1],ub=ra[L];4E4>Math.max(gb,ub)&&gb<1.7*ub&&ub<1.7*gb&&(1==L&&N[T][0]<=N[T][L]&&(N[T][0]=0),N[T][L]=0)}N[T][0]<=S.nsPsy.lastAttacks[T]&&(N[T][0]=0);if(3==S.nsPsy.lastAttacks[T]||0!=N[T][0]+N[T][1]+N[T][2]+N[T][3])ma=0,0!=N[T][1]&&0!=N[T][0]&&(N[T][1]=0),0!=N[T][2]&&0!=N[T][1]&&(N[T][2]=0),0!=N[T][3]&&0!=N[T][2]&&(N[T][3]=0);2>T?K[T]=ma: 0==ma&&(K[0]=K[1]=0);n[T]=S.tot_ener[T]}var sb=b.internal_flags;b.short_blocks!=pa.short_block_coupled||0!=K[0]&&0!=K[1]||(K[0]=K[1]=0);for(var ob=0;obIa)t.fft_long(Sa,La[Ma],Ia,e,h);else if(2==Ia)for(var va=f.BLKSIZE-1;0<=va;--va){var Na=La[Ma+0][va],tb=La[Ma+1][va];La[Ma+0][va]=(Na+tb)* Z.SQRT2*.5;La[Ma+1][va]=(Na-tb)*Z.SQRT2*.5}Ra[0]=La[Ma+0][0];Ra[0]*=Ra[0];for(va=f.BLKSIZE/2-1;0<=va;--va){var zb=La[Ma+0][f.BLKSIZE/2-va],Va=La[Ma+0][f.BLKSIZE/2+va];Ra[f.BLKSIZE/2-va]=.5*(zb*zb+Va*Va)}for(var ja=0,va=11;vaCa&& (Hb.loudness_sq[g][Ca]=Hb.loudness_sq_save[Ca],Hb.loudness_sq_save[Ca]=x(Fb,Hb));if(0!=K[Q]){var aa=void 0,sa=void 0,ta=z,Wb=V,Ab=M[P],Ta=R[P],$a=P,vb=G(f.CBANDS),Tb=G(f.CBANDS),Ga=U(f.CBANDS+2);c(ta,Wb,Ab,vb,Tb);w(ta,vb,Tb,Ga);for(var Ib=0,aa=0;aa=Qb&&(Qb=ab);0>=jb&&(jb=ab);sa=ta.blocktype_old[$a&1]==f.NORM_TYPE?Math.min(jb,Qb):jb;Ta[aa]=Math.min(ab,sa)}ta.nb_2[$a][aa]=ta.nb_1[$a][aa];ta.nb_1[$a][aa]=ab;ib=vb[aa];ib*=ta.minval_l[aa];ib*=xb;Ta[aa]>ib&&(Ta[aa]=ib);1Ab[aa]&&(Ta[aa]=Ab[aa]);1>ta.masking_lower&& (Ta[aa]*=ta.masking_lower)}for(;aaoa;oa++){for(P=0;PKb&&t.fft_short(Lb,ea[Ba],Kb,e,h);if(2==Kb)for(var Ha=f.BLKSIZE_s-1;0<=Ha;--Ha){var bb=ea[Ba+0][Ja][Ha],cb=ea[Ba+1][Ja][Ha];ea[Ba+0][Ja][Ha]=(bb+cb)*Z.SQRT2*.5;ea[Ba+1][Ja][Ha]=(bb-cb)*Z.SQRT2*.5}Xa[Ja][0]=ea[Ba+0][Ja][0];Xa[Ja][0]*=Xa[Ja][0];for(Ha=f.BLKSIZE_s/2-1;0<=Ha;--Ha){var db=ea[Ba+0][Ja][f.BLKSIZE_s/2-Ha],Eb=ea[Ba+0][Ja][f.BLKSIZE_s/2+Ha];Xa[Ja][f.BLKSIZE_s/2-Ha]=.5*(db*db+Eb*Eb)}for(var ga=void 0,lb=void 0,wa=void 0,mb=I,Wa=M[P],ua=R[P], Mb=P,cc=oa,Ea=b.internal_flags,Nb=new float[f.CBANDS],kc=G(f.CBANDS),dc=new int[f.CBANDS],ga=lb=0;gaYb&& (nb=Yb),Xb[na]=nb):Xb[na]=0;for(na=1;naYb&&(nb=Yb),Xb[na]=nb):Xb[na]=0;Pa=Rb[na-1]+Rb[na];0Yb&&(nb=Yb),Xb[na]=nb):Xb[na]=0;for(lb=ga=0;gaZb&&(ua[ga]=Zb);1Wa[ga]&&(ua[ga]=Wa[ga]);1>Ea.masking_lower&&(ua[ga]*=Ea.masking_lower)}for(;gaoa;oa++){var eb=z.thm[P].s[Sb][oa],eb=.8*eb;if(2<=N[P][oa]||1==N[P][oa+1])y=0!=oa?oa-1:2,A=u(z.thm[P].s[Sb][y],eb,.36),eb=Math.min(eb,A);else if(1==N[P][oa])y=0!=oa?oa-1:2,A=u(z.thm[P].s[Sb][y],eb,.18),eb=Math.min(eb,A);else if(0!=oa&&3==N[P][oa- 1]||0==oa&&3==z.nsPsy.lastAttacks[P])y=2!=oa?oa+1:0,A=u(z.thm[P].s[Sb][y],eb,.18),eb=Math.min(eb,A);eb*=F[P][oa];vc[oa]=eb}for(oa=0;3>oa;oa++)z.thm[P].s[Sb][oa]=vc[oa]}for(P=0;Ph;++h){for(var v=0;vv;++v){for(c=0;cv;v++)d.nsPsy.last_en_subshort[h][v]=10}d.loudness_sq_save[0]=d.loudness_sq_save[1]=0;d.npart_l=e(d.numlines_l,d.bo_l,d.bm_l,u,y,d.mld_l,d.PSY.bo_l_weight,x,f.BLKSIZE,d.scalefac_band.l,f.BLKSIZE/1152,f.SBMAX_l);for(h=0;h=p&&(c=k*(u[h]-p)/(24-p)+b*(24-u[h])/(24-p)),w[h]=Math.pow(10,c/10),d.rnumlines_l[h]=0b&&(k=b);d.ATH.cb_l[h]=k;k=-20+20*u[h]/10;6k&&(k=-15);k-=8;d.minval_l[h]=Math.pow(10,k/10)*d.numlines_l[h]}d.npart_s=e(d.numlines_s,d.bo_s,d.bm_s,u,y,d.mld_s,d.PSY.bo_s_weight,x,f.BLKSIZE_s,d.scalefac_band.s,f.BLKSIZE_s/384,f.SBMAX_s);for(h=v=0;h=p&&(c=r*(u[h]-p)/(24-p)+A*(24-u[h])/(24-p));w[h]=Math.pow(10,c/10);k=sb.MAX_VALUE;for(c=0;cb&&(k=b);d.ATH.cb_s[h]=k;k=-7+7*u[h]/12;12u[h]&&(k*=1+2.3*Math.log(1-k));-15>k&&(k=-15);k-=8;d.minval_s[h]=Math.pow(10,k/10)*d.numlines_s[h]}d.s3_ss=l(d.s3ind_s,d.npart_s,u,y,w,g);m=Math.pow(10,.5625);n=Math.pow(10,1.5);z=Math.pow(10,1.5);t.init_fft(d);d.decay=Math.exp(-2.302585092994046/(.01*x/192));h=3.5;0!=(a.exp_nspsytune&2)&&(h=1);0 d.npart_l-1&&(d.s3ind[g][1]=d.npart_l-1);d.ATH.decay=Math.pow(10,576*d.mode_gr/x*-1.2);d.ATH.adjust=.01;d.ATH.adjustLimit=1;if(-1!=a.ATHtype){v=a.out_samplerate/f.BLKSIZE;for(h=b=g=0;h=a?1:Math.cos(Math.PI/2*a)}function C(a,b){switch(a){case 44100:return b.version=1,0;case 48E3:return b.version=1;case 32E3:return b.version=1,2;case 22050:return b.version=0;case 24E3:return b.version=0,1;case 16E3:return b.version=0,2;case 11025:return b.version=0;case 12E3:return b.version=0,1;case 8E3:return b.version=0,2;default:return b.version= 0,-1}}function u(a,b,c){16E3>c&&(b=2);c=v.bitrate_table[b][1];for(var d=2;14>=d;d++)0c&&(b=2);for(c=0;14>=c;c++)if(0y)return y;r+=y;p+=y;u[0]=g;u[1]=k;if(da.NEQ(d.scale,0)&&da.NEQ(d.scale,1))for(y= 0;yD.resample_ratio|| 1.0001ia.BPC&&(ra=ia.BPC);var pa=1E-4>Math.abs(Y.resample_ratio-Math.floor(.5+Y.resample_ratio))?1:0;var qa=1/Y.resample_ratio;1za&&(za=0);1Math.abs(Ka)?Ua/Math.PI:za*Math.sin(ma*Ua*Ka)/(Math.PI*ma*Ka))}for(F=0;F<=ma;F++)Y.blackfilt[ha][F]/=xa}Y.fill_buffer_resample_init=1}xa=Y.inbuf_old[ka];for(qa=0;qa=ba)break;T=F-Y.itime[ka]-(ha+ma%2*.5);T=0|Math.floor(2*T*ra+ra+.5);for(F=Fa=0;F<=ma;++F)L=F+ha-ma/2,Fa+=(0>L?xa[pa+L]:U[Z+L])*Y.blackfilt[T][F];J[S+qa]=Fa}fa.num_used=Math.min(ba,ma+ha-ma/2);Y.itime[ka]+=fa.num_used-qa*Y.resample_ratio;if(fa.num_used>=pa)for(F=0;Fh.mf_samples_to_encode&&(h.mf_samples_to_encode=f.ENCDELAY+f.POSTDELAY);h.mf_samples_to_encode+=y;if(h.mf_size>=g){x=t-p;0==t&&(x=0);y=d;x=e.enc.lame_encode_mp3_frame(y,A[0],A[1],n,r,x);y.frameNum++;y=x;if(0>y)return y; r+=y;p+=y;h.mf_size-=d.framesize;h.mf_samples_to_encode-=d.framesize;for(x=0;xf;f++)if(Math.max(a,b[f+ 1])!=a){c=b[f+1];d=f+1;e=b[f];h=f;break}return c-a>a-e?h:d};this.lame_init_params=function(a){var b=a.internal_flags;b.Class_ID=0;null==b.ATH&&(b.ATH=new zc);null==b.PSY&&(b.PSY=new x);null==b.rgdata&&(b.rgdata=new Cc);b.channels_in=a.num_channels;1==b.channels_in&&(a.mode=ka.MONO);b.channels_out=a.mode==ka.MONO?1:2;b.mode_ext=f.MPG_MD_MS_LR;a.mode==ka.MONO&&(a.force_ms=!1);a.VBR==J.vbr_off&&128!=a.VBR_mean_bitrate_kbps&&0==a.brate&&(a.brate=a.VBR_mean_bitrate_kbps);a.VBR!=J.vbr_off&&a.VBR!=J.vbr_mtrh&& a.VBR!=J.vbr_mt&&(a.free_format=!1);a.VBR==J.vbr_off&&0==a.brate&&da.EQ(a.compression_ratio,0)&&(a.compression_ratio=11.025);a.VBR==J.vbr_off&&0a.out_samplerate?(a.VBR_mean_bitrate_kbps=Math.max(a.VBR_mean_bitrate_kbps, 8),a.VBR_mean_bitrate_kbps=Math.min(a.VBR_mean_bitrate_kbps,64)):32E3>a.out_samplerate?(a.VBR_mean_bitrate_kbps=Math.max(a.VBR_mean_bitrate_kbps,8),a.VBR_mean_bitrate_kbps=Math.min(a.VBR_mean_bitrate_kbps,160)):(a.VBR_mean_bitrate_kbps=Math.max(a.VBR_mean_bitrate_kbps,32),a.VBR_mean_bitrate_kbps=Math.min(a.VBR_mean_bitrate_kbps,320)));if(0==a.lowpassfreq){switch(a.VBR){case J.vbr_off:var c=new k;d(c,a.brate);c=c.lowerlimit;break;case J.vbr_abr:c=new k;d(c,a.VBR_mean_bitrate_kbps);c=c.lowerlimit;break; case J.vbr_rh:var e=[19500,19E3,18600,18E3,17500,16E3,15600,14900,12500,1E4,3950];if(0<=a.VBR_q&&9>=a.VBR_q){c=e[a.VBR_q];var h=e[a.VBR_q+1];e=a.VBR_q_frac;c=linear_int(c,h,e)}else c=19500;break;default:e=[19500,19E3,18500,18E3,17500,16500,15500,14500,12500,9500,3950],0<=a.VBR_q&&9>=a.VBR_q?(c=e[a.VBR_q],h=e[a.VBR_q+1],e=a.VBR_q_frac,c=linear_int(c,h,e)):c=19500}a.mode!=ka.MONO||a.VBR!=J.vbr_off&&a.VBR!=J.vbr_abr||(c*=1.5);a.lowpassfreq=c|0}0==a.out_samplerate&&(2*a.lowpassfreq>a.in_samplerate&&(a.lowpassfreq= a.in_samplerate/2),c=a.lowpassfreq|0,e=a.in_samplerate,h=44100,48E3<=e?h=48E3:44100<=e?h=44100:32E3<=e?h=32E3:24E3<=e?h=24E3:22050<=e?h=22050:16E3<=e?h=16E3:12E3<=e?h=12E3:11025<=e?h=11025:8E3<=e&&(h=8E3),-1==c?c=h:(15960>=c&&(h=44100),15250>=c&&(h=32E3),11220>=c&&(h=24E3),9970>=c&&(h=22050),7230>=c&&(h=16E3),5420>=c&&(h=12E3),4510>=c&&(h=11025),3970>=c&&(h=8E3),c=e=a.out_samplerate?1:2;a.framesize=576*b.mode_gr;a.encoder_delay=f.ENCDELAY;b.resample_ratio=a.in_samplerate/a.out_samplerate;switch(a.VBR){case J.vbr_mt:case J.vbr_rh:case J.vbr_mtrh:a.compression_ratio=[5.7,6.5,7.3,8.2,10,11.9,13,14,15,16.5][a.VBR_q];break;case J.vbr_abr:a.compression_ratio=16*a.out_samplerate* b.channels_out/(1E3*a.VBR_mean_bitrate_kbps);break;default:a.compression_ratio=16*a.out_samplerate*b.channels_out/(1E3*a.brate)}a.mode==ka.NOT_SET&&(a.mode=ka.JOINT_STEREO);0b.lowpass1&&(b.lowpass1=0)):b.lowpass1=2*a.lowpassfreq,b.lowpass1/=a.out_samplerate,b.lowpass2/=a.out_samplerate):(b.lowpass1=0,b.lowpass2=0);c=a.internal_flags;var r=32,w=-1;if(0=e;e++)h=e/31,h>=c.lowpass2&&(r=Math.min(r,e)),c.lowpass1=e;e++)h=e/31,h<=c.highpass1&&(w=Math.max(w,e)),c.highpass1e;e++)h=e/31,w=c.highpass2>c.highpass1?K((c.highpass2-h)/(c.highpass2-c.highpass1+1E-20)):1,h=c.lowpass2>c.lowpass1?K((h-c.lowpass1)/(c.lowpass2-c.lowpass1+1E-20)):1,c.amp_filter[e]=w*h;b.samplerate_index=C(a.out_samplerate,a);if(0>b.samplerate_index)return a.internal_flags=null,-1;if(a.VBR==J.vbr_off)if(a.free_format)b.bitrate_index= 0;else{if(a.brate=u(a.brate,a.version,a.out_samplerate),b.bitrate_index=U(a.brate,a.version,a.out_samplerate),0>=b.bitrate_index)return a.internal_flags=null,-1}else b.bitrate_index=1;a.analysis&&(a.bWriteVbrTag=!1);null!=b.pinfo&&(a.bWriteVbrTag=!1);q.init_bit_stream_w(b);c=b.samplerate_index+3*a.version+6*(16E3>a.out_samplerate?1:0);for(e=0;ec;c++)b.nsPsy.pefirbuf[c]=700*b.mode_gr*b.channels_out;-1==a.ATHtype&&(a.ATHtype=4);switch(a.VBR){case J.vbr_mt:a.VBR=J.vbr_mtrh;case J.vbr_mtrh:null==a.useTemporal&&(a.useTemporal=!1);g.apply_preset(a,500-10*a.VBR_q,0);0>a.quality&&(a.quality=LAME_DEFAULT_QUALITY);5>a.quality&&(a.quality=0);5a.quality&&(a.quality=LAME_DEFAULT_QUALITY);b.iteration_loop=new VBROldIterationLoop(D);break;default:b.sfb21_extra=!1,0>a.quality&&(a.quality= LAME_DEFAULT_QUALITY),c=a.VBR,c==J.vbr_off&&(a.VBR_mean_bitrate_kbps=a.brate),g.apply_preset(a,a.VBR_mean_bitrate_kbps,0),a.VBR=c,b.PSY.mask_adjust=a.maskingadjust,b.PSY.mask_adjust_short=a.maskingadjust_short,b.iteration_loop=c==J.vbr_off?new Bc(D):new ABRIterationLoop(D)}if(a.VBR!=J.vbr_off){b.VBR_min_bitrate=1;b.VBR_max_bitrate=14;16E3>a.out_samplerate&&(b.VBR_max_bitrate=8);if(0!=a.VBR_min_bitrate_kbps&&(a.VBR_min_bitrate_kbps=u(a.VBR_min_bitrate_kbps,a.version,a.out_samplerate),b.VBR_min_bitrate= U(a.VBR_min_bitrate_kbps,a.version,a.out_samplerate),0>b.VBR_min_bitrate)||0!=a.VBR_max_bitrate_kbps&&(a.VBR_max_bitrate_kbps=u(a.VBR_max_bitrate_kbps,a.version,a.out_samplerate),b.VBR_max_bitrate=U(a.VBR_max_bitrate_kbps,a.version,a.out_samplerate),0>b.VBR_max_bitrate))return-1;a.VBR_min_bitrate_kbps=v.bitrate_table[a.version][b.VBR_min_bitrate];a.VBR_max_bitrate_kbps=v.bitrate_table[a.version][b.VBR_max_bitrate];a.VBR_mean_bitrate_kbps=Math.min(v.bitrate_table[a.version][b.VBR_max_bitrate],a.VBR_mean_bitrate_kbps); a.VBR_mean_bitrate_kbps=Math.max(v.bitrate_table[a.version][b.VBR_min_bitrate],a.VBR_mean_bitrate_kbps)}a.tune&&(b.PSY.mask_adjust+=a.tune_value_a,b.PSY.mask_adjust_short+=a.tune_value_a);c=a.internal_flags;switch(a.quality){default:case 9:c.psymodel=0;c.noise_shaping=0;c.noise_shaping_amp=0;c.noise_shaping_stop=0;c.use_best_huffman=0;c.full_outer_loop=0;break;case 8:a.quality=7;case 7:c.psymodel=1;c.noise_shaping=0;c.noise_shaping_amp=0;c.noise_shaping_stop=0;c.use_best_huffman=0;c.full_outer_loop= 0;break;case 6:c.psymodel=1;0==c.noise_shaping&&(c.noise_shaping=1);c.noise_shaping_amp=0;c.noise_shaping_stop=0;-1==c.subblock_gain&&(c.subblock_gain=1);c.use_best_huffman=0;c.full_outer_loop=0;break;case 5:c.psymodel=1;0==c.noise_shaping&&(c.noise_shaping=1);c.noise_shaping_amp=0;c.noise_shaping_stop=0;-1==c.subblock_gain&&(c.subblock_gain=1);c.use_best_huffman=0;c.full_outer_loop=0;break;case 4:c.psymodel=1;0==c.noise_shaping&&(c.noise_shaping=1);c.noise_shaping_amp=0;c.noise_shaping_stop=0;-1== c.subblock_gain&&(c.subblock_gain=1);c.use_best_huffman=1;c.full_outer_loop=0;break;case 3:c.psymodel=1;0==c.noise_shaping&&(c.noise_shaping=1);c.noise_shaping_amp=1;c.noise_shaping_stop=1;-1==c.subblock_gain&&(c.subblock_gain=1);c.use_best_huffman=1;c.full_outer_loop=0;break;case 2:c.psymodel=1;0==c.noise_shaping&&(c.noise_shaping=1);0==c.substep_shaping&&(c.substep_shaping=2);c.noise_shaping_amp=1;c.noise_shaping_stop=1;-1==c.subblock_gain&&(c.subblock_gain=1);c.use_best_huffman=1;c.full_outer_loop= 0;break;case 1:c.psymodel=1;0==c.noise_shaping&&(c.noise_shaping=1);0==c.substep_shaping&&(c.substep_shaping=2);c.noise_shaping_amp=2;c.noise_shaping_stop=1;-1==c.subblock_gain&&(c.subblock_gain=1);c.use_best_huffman=1;c.full_outer_loop=0;break;case 0:c.psymodel=1,0==c.noise_shaping&&(c.noise_shaping=1),0==c.substep_shaping&&(c.substep_shaping=2),c.noise_shaping_amp=2,c.noise_shaping_stop=1,-1==c.subblock_gain&&(c.subblock_gain=1),c.use_best_huffman=1,c.full_outer_loop=0}b.ATH.useAdjust=0>a.athaa_type? 3:a.athaa_type;b.ATH.aaSensitivityP=Math.pow(10,a.athaa_sensitivity/-10);null==a.short_blocks&&(a.short_blocks=pa.short_block_allowed);a.short_blocks!=pa.short_block_allowed||a.mode!=ka.JOINT_STEREO&&a.mode!=ka.STEREO||(a.short_blocks=pa.short_block_coupled);0>a.quant_comp&&(a.quant_comp=1);0>a.quant_comp_short&&(a.quant_comp_short=0);0>a.msfix&&(a.msfix=0);a.exp_nspsytune|=1;0>a.internal_flags.nsPsy.attackthre&&(a.internal_flags.nsPsy.attackthre=$b.NSATTACKTHRE);0>a.internal_flags.nsPsy.attackthre_s&& (a.internal_flags.nsPsy.attackthre_s=$b.NSATTACKTHRE_S);0>a.scale&&(a.scale=1);0>a.ATHtype&&(a.ATHtype=4);0>a.ATHcurve&&(a.ATHcurve=4);0>a.athaa_loudapprox&&(a.athaa_loudapprox=2);0>a.interChRatio&&(a.interChRatio=0);null==a.useTemporal&&(a.useTemporal=!0);b.slot_lag=b.frac_SpF=0;a.VBR==J.vbr_off&&(b.slot_lag=b.frac_SpF=72E3*(a.version+1)*a.brate%a.out_samplerate|0);t.iteration_init(a);m.psymodel_init(a);return 0};this.lame_encode_flush=function(a,b,d,e){var g=a.internal_flags,h=fc([2,1152]),k=0, l=g.mf_samples_to_encode-f.POSTDELAY,m=c(a);if(1>g.mf_samples_to_encode)return 0;var n=0;a.in_samplerate!=a.out_samplerate&&(l+=16*a.out_samplerate/a.in_samplerate);var p=a.framesize-l%a.framesize;576>p&&(p+=a.framesize);a.encoder_padding=p;for(p=(l+p)/a.framesize;0r&&(r=1);k=e-n;0==e&&(k=0);k=this.lame_encode_buffer(a,h[0],h[1],r,b,d,k);d+=k;n+=k;p-=l!=a.frameNum?1:0}g.mf_samples_to_encode=0;if(0> k)return k;k=e-n;0==e&&(k=0);q.flush_bitstream(a);k=q.copy_buffer(g,b,d,k,1);if(0>k)return k;d+=k;n+=k;k=e-n;0==e&&(k=0);if(a.write_id3tag_automatic){z.id3tag_write_v1(a);k=q.copy_buffer(g,b,d,k,0);if(0>k)return k;n+=k}return n};this.lame_encode_buffer=function(a,b,c,d,e,f,g){var h=a.internal_flags,k=[null,null];if(4294479419!=h.Class_ID)return-3;if(0==d)return 0;if(null==h.in_buffer_0||h.in_buffer_nsamplesMath.abs(k)?Math.abs(f-k)<=1E-6*Math.abs(f):Math.abs(f-k)<=1E-6*Math.abs(k)};da.NEQ=function(f,k){return!da.EQ(f,k)};var v={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]};v.ht=[new ba(0,0,null,null),new ba(2,0,v.t1HB,v.t1l),new ba(3, 0,v.t2HB,v.t2l),new ba(3,0,v.t3HB,v.t3l),new ba(0,0,null,null),new ba(4,0,v.t5HB,v.t5l),new ba(4,0,v.t6HB,v.t6l),new ba(6,0,v.t7HB,v.t7l),new ba(6,0,v.t8HB,v.t8l),new ba(6,0,v.t9HB,v.t9l),new ba(8,0,v.t10HB,v.t10l),new ba(8,0,v.t11HB,v.t11l),new ba(8,0,v.t12HB,v.t12l),new ba(16,0,v.t13HB,v.t13l),new ba(0,0,null,v.t16_5l),new ba(16,0,v.t15HB,v.t15l),new ba(1,1,v.t16HB,v.t16l),new ba(2,3,v.t16HB,v.t16l),new ba(3,7,v.t16HB,v.t16l),new ba(4,15,v.t16HB,v.t16l),new ba(6,63,v.t16HB,v.t16l),new ba(8,255, v.t16HB,v.t16l),new ba(10,1023,v.t16HB,v.t16l),new ba(13,8191,v.t16HB,v.t16l),new ba(4,15,v.t24HB,v.t24l),new ba(5,31,v.t24HB,v.t24l),new ba(6,63,v.t24HB,v.t24l),new ba(7,127,v.t24HB,v.t24l),new ba(8,255,v.t24HB,v.t24l),new ba(9,511,v.t24HB,v.t24l),new ba(11,2047,v.t24HB,v.t24l),new ba(13,8191,v.t24HB,v.t24l),new ba(0,0,v.t32HB,v.t32l),new ba(0,0,v.t33HB,v.t33l)];v.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];v.table23=[65538,262147,458759,262148,327684,458759,393222,458759,524296];v.table56=[65539,262148,458758,524296,262148,327684,524294,589831,458757,524294,589831,655368,524295,524295,589832,655369];v.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]];v.samplerate_table=[[22050,24E3,16E3,-1],[44100,48E3,32E3,-1],[11025,12E3,8E3,-1]];v.scfsi_band=[0,6,11,16,21];Y.Q_MAX=257;Y.Q_MAX2=116;Y.LARGE_BITS=1E5;Y.IXMAX_VAL=8206;var ra={};ra.SFBMAX=3*f.SBMAX_s;f.ENCDELAY=576;f.POSTDELAY=1152;f.MDCTDELAY=48;f.FFTOFFSET=224+f.MDCTDELAY;f.DECDELAY=528;f.SBLIMIT=32;f.CBANDS=64;f.SBPSY_l=21;f.SBPSY_s=12;f.SBMAX_l=22;f.SBMAX_s=13;f.PSFB21=6;f.PSFB12=6;f.BLKSIZE=1024;f.HBLKSIZE=f.BLKSIZE/2+1;f.BLKSIZE_s= 256;f.HBLKSIZE_s=f.BLKSIZE_s/2+1;f.NORM_TYPE=0;f.START_TYPE=1;f.SHORT_TYPE=2;f.STOP_TYPE=3;f.MPG_MD_LR_LR=0;f.MPG_MD_LR_I=1;f.MPG_MD_MS_LR=2;f.MPG_MD_MS_I=3;f.fircoef=[-.1039435,-.1892065,-.0432472*5,-.155915,3.898045E-17,.0467745*5,.50455,.756825,.187098*5];ia.MFSIZE=3456+f.ENCDELAY-f.MDCTDELAY;ia.MAX_HEADER_BUF=256;ia.MAX_BITS_PER_CHANNEL=4095;ia.MAX_BITS_PER_GRANULE=7680;ia.BPC=320;xa.RIFF=zb("RIFF");xa.WAVE=zb("WAVE");xa.fmt_=zb("fmt ");xa.data=zb("data");xa.readHeader=function(f){var k=new xa, r=f.getUint32(0,!1);if(xa.RIFF==r&&(f.getUint32(4,!0),xa.WAVE==f.getUint32(8,!1)&&xa.fmt_==f.getUint32(12,!1))){var v=f.getUint32(16,!0),x=20;switch(v){case 16:case 18:k.channels=f.getUint16(x+2,!0);k.sampleRate=f.getUint32(x+4,!0);break;default:throw"extended fmt chunk not implemented";}for(var x=x+v,v=xa.data,u=0;v!=r;){r=f.getUint32(x,!1);u=f.getUint32(x+4,!0);if(v==r)break;x+=u+8}k.dataLen=u;k.dataOffset=x+8;return k}};ra.SFBMAX=3*f.SBMAX_s;lamejs.Mp3Encoder=function(f,k,r){3!=arguments.length&& (console.error("WARN: Mp3Encoder(channels, samplerate, kbps) not specified"),f=1,k=44100,r=128);var v=new W,x=new Kc,u=new ca,G=new da,d=new wc,c=new Y,w=new Ec,a=new gb,b=new ic,B=new Nc,e=new xc,l=new fb,q=new Lc,g=new Mc;v.setModules(u,G,d,c,w,a,b,B,g);G.setModules(u,g,b,a);B.setModules(G,b);d.setModules(v);w.setModules(G,e,c,l);c.setModules(l,e,v.enc.psy);e.setModules(G);l.setModules(c);a.setModules(v,G,b);x.setModules(q,g);q.setModules(b,B,d);var t=v.lame_init();t.num_channels=f;t.in_samplerate= k;t.brate=r;t.mode=ka.STEREO;t.quality=3;t.bWriteVbrTag=!1;t.disable_reservoir=!0;t.write_id3tag_automatic=!1;v.lame_init_params(t);var D=1152,m=0|1.25*D+7200,n=new Int8Array(m);this.encodeBuffer=function(a,b){1==f&&(b=a);a.length>D&&(D=a.length,m=0|1.25*D+7200,n=new Int8Array(m));a=v.lame_encode_buffer(t,a,b,a.length,n,0,m);return new Int8Array(n.subarray(0,a))};this.flush=function(){var a=v.lame_encode_flush(t,n,0,m);return new Int8Array(n.subarray(0,a))}};lamejs.WavHeader=xa}lamejs();