var u="function"==typeof Object.create?Object.create:function(k){function h(){}h.prototype=k;return new h},v;if("function"==typeof Object.setPrototypeOf)v=Object.setPrototypeOf;else{var w;a:{var x={h:!0},z={};try{z.__proto__=x;w=z.h;break a}catch(k){}w=!1}v=w?function(k,h){k.__proto__=h;if(k.__proto__!==h)throw new TypeError(k+" is not extensible");return k}:null}var A=v; function D(k,h){k.prototype=u(h.prototype);k.prototype.constructor=k;if(A)A(k,h);else for(var n in h)if("prototype"!=n)if(Object.defineProperties){var p=Object.getOwnPropertyDescriptor(h,n);p&&Object.defineProperty(k,n,p)}else k[n]=h[n]}var E=this; function F(k){function h(){this.container="";this.chunkSize=0;this.format="";this.signature=null;this.head=0;this.uInt32={bits:32,be:!1,signed:!1,fp:!1};this.supported_containers=["RIFF","RIFX"]}function n(a,c,b){if(c){if(!a||16!==a&&32!==a&&64!==a)throw Error("Unsupported type: float, bits: "+a);c=this.a(a)}else{if(!a||1>a||53a?1:Math.ceil(a/8);this.max=Math.pow(2,a)-1;this.min=0}function r(a,c){this.a=a;this.c=(1<=g)c+=String.fromCharCode(g);else{var m=0;194<=g&&223>=g?m=1:224<=g&&239>=g?(m=2,224===a[d]&&(f=160),237===a[d]&&(e=159)):240<=g&&244>=g?(m=3,240===a[d]&&(f=144),244===a[d]&&(e=143)):l=!0;g&=(1<<8-m-1)-1;for(var t=0;te)l=!0;g=g<<6|a[d]&63;d++}l?c+=String.fromCharCode(65533):65535>=g?c+=String.fromCharCode(g):(g-=65536,c+=String.fromCharCode((g>>10&1023)+55296,(g&1023)+56320))}}return c}function C(a, c,b){b=void 0===b?0:b;var d=b+Math.ceil(c.bits/8);d=void 0===d?a.length:d;var f=[];b=void 0===b?0:b;var e=!0;b=void 0===b?0:b;d=void 0===d?a.length:d;e=void 0===e?!1:e;var l=c||{};var g=new n(l.bits,l.fp,l.signed);c=g.offset;var m=(d-b)%c;if(e&&(m||a.lengththis.max||athis.max&&(a-=2*this.max+2);return a};n.prototype.g=function(a,c){return this.b.g(a,void 0===c?0:c)};n.prototype.a=function(a){return 16===a?new r(5,11):32===a?new r(8,23):new r(11,52)};h.prototype.setSignature=function(a){this.head=0;this.container=this.readString(a,4); if(-1===this.supported_containers.indexOf(this.container))throw Error("Not a supported format.");this.uInt32.be="RIFX"===this.container;this.chunkSize=this.readUInt32(a);this.format=this.readString(a,4);this.signature={chunkId:this.container,chunkSize:this.chunkSize,format:this.format,subChunks:this.a(a),chunkData:{start:0,end:this.chunkSize}}};h.prototype.findChunk=function(a,c){c=void 0===c?!1:c;for(var b=this.signature.subChunks,d=[],f=0;f