>=1;for(l=n<<16|f,h=a;h >=1;for(l=n<<16|f,h=a;h>>16)>s)throw Error("invalid code length: "+n);return e.f=i>>n,e.c=s-n,e.d=o,65535&r}var s=void 0,a=this,o="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView,u=0,f=1;r.prototype.t=function(){for(;!this.l;){var e=n(this,3);switch(1&e&&(this.l=!0),e>>>=1){case 0:var r=this.input,a=this.d,h=this.b,l=this.a,c=r.length,p=s,y=s,g=h.length,m=s;if(this.c=this.f=0,a+1>=c)throw Error("invalid uncompressed block header: LEN");if(p=r[a++]|r[a++]<<8,a+1>=c)throw Error("invalid uncompressed block header: NLEN");if(y=r[a++]|r[a++]<<8,p===~y)throw Error("invalid uncompressed block header: length verify");if(a+p>r.length)throw Error("input buffer is broken");switch(this.i){case u:for(;l+p>h.length;){if(m=g-l,p-=m,o)h.set(r.subarray(a,a+m),l),l+=m,a+=m;else for(;m--;)h[l++]=r[a++];this.a=l,h=this.e(),l=this.a}break;case f:for(;l+p>h.length;)h=this.e({o:2});break;default:throw Error("invalid inflate mode")}if(o)h.set(r.subarray(a,a+p),l),l+=p,a+=p;else for(;p--;)h[l++]=r[a++];this.d=a,this.a=l,this.b=h;break;case 1:this.j(S,K);break;case 2:for(var v=n(this,5)+257,w=n(this,5)+1,b=n(this,4)+4,k=new(o?Uint8Array:Array)(d.length),A=s,_=s,E=s,U=s,P=s,j=s,x=s,T=s,O=s,T=0;T=h?8:255>=h?9:279>=h?7:8;var _,E,S=t(A),U=new(o?Uint8Array:Array)(30);for(_=0,E=U.length;_=s){for(l&&n(l,-1),a=0,o=s-i;a>>r,t.e=s-r,t.c=o,n}function l(t,r){for(var n,i,s=t.g,a=t.e,o=t.input,u=t.c,f=o.length,h=r[0],l=r[1];a>>8&255,b[k++]=255&p,b[k++]=p>>>8&255,w)b.set(h,k),k+=h.length,b=b.subarray(0,k);else{for(y=0,v=h.length;y>>3;i.length<=n;)i.push(0);i[t>>>3]|=r<<24-t%8*4}return{value:i,binLen:4*s}}function a(e){var t,r,n,i=[];for(r=0;r>>2]>>>8*(3-r%4)&255,i+=String.fromCharCode(n);return i}function l(e,t){var r,n=4*e.length,i=new Uint8Array(n);for(r=0;r>>2,i.length<=n&&i.push(0),i[n]|=t<<24-r%4*8;return{value:i,binLen:8*e.length}}(e),n=y.binLen,d=y.value}this.getHash=function(e,t,r,i){var s,a=null,o=d.slice(),p=n;if(3===arguments.length?"number"!=typeof r&&(i=r,r=1):2===arguments.length&&(r=1),r!==parseInt(r,10)||1>r)throw"numRounds must a integer >= 1";switch(t){case"HEX":a=u;break;case"B64":a=f;break;case"BYTES":a=h;break;case"TYPED":a=l;break;default:throw"format must be HEX, B64, or BYTES"}if("SHA-1"===e&&1&L)for(s=0;s
>=this.DB;if(e.t0&&(g|=e[v-1]>>this.DB+s-d)),c=r;0==(1&g);)g>>=1,--c;if((s-=c)<0&&(s+=this.DB,--v),b)l[g].copyTo(a),b=!1;else{for(;c>1;)n.sqrTo(a,k),n.sqrTo(k,a),c-=2;c>0?n.sqrTo(a,k):(m=a,a=k,k=m),n.mulTo(k,l[g],a)}for(;v>=0&&0==(e[v]&1<=0?(r.subTo(i,r),t&&s.subTo(u,s),a.subTo(f,a)):(i.subTo(r,i),t&&u.subTo(s,u),f.subTo(a,f))}return 0!=i.compareTo(n.ONE)?n.ZERO:f.compareTo(e)>=0?f.subtract(e):f.signum()<0?(f.addTo(e,f),f.signum()<0?f.add(e):f):f},n.prototype.pow=function(e){return this.exp(e,new m)},n.prototype.gcd=function(e){var t=this.s<0?this.negate():this.clone(),r=e.s<0?e.negate():e.clone();if(t.compareTo(r)<0){var n=t;t=r,r=n}var i=t.getLowestSetBit(),s=r.getLowestSetBit();if(s<0)return t;for(i0&&(t.rShiftTo(s,t),r.rShiftTo(s,r));t.signum()>0;)(i=t.getLowestSetBit())>0&&t.rShiftTo(i,t),(i=r.getLowestSetBit())>0&&r.rShiftTo(i,r),t.compareTo(r)>=0?(t.subTo(r,t),t.rShiftTo(1,t)):(r.subTo(t,r),r.rShiftTo(1,r));return s>0&&r.lShiftTo(s,r),r},n.prototype.isProbablePrime=function(e){var t,r=this.abs();if(1==r.t&&r[0]<=S[S.length-1]){for(t=0;t>2,r.getUint32(0),r.getUint32(4),r.getUint32(8),r.getUint32(12),t>16?r.getUint32(16):0,t>16?r.getUint32(20):0,t>24?r.getUint32(24):0,t>24?r.getUint32(28):0),this.key=e}else if(!this.key)throw new Error("key is required")}.call(this,e.key),this.hasOwnProperty("iv")&&y.call(this,e.iv),this.hasOwnProperty("padding")&&function(e){this.padding=void 0===e||!!e}.call(this,e.padding),this}function m(e){if(f(e)&&(e=a(e)),h(e)&&(e=new Uint8Array(e)),!l(e))throw new TypeError("data isn't of expected type");for(var t=this.asm,r=this.heap,n=D.ENC[this.mode],i=D.HEAP_DATA,s=this.pos,o=this.len,u=0,c=e.length||0,p=0,y=o+c&-16,g=0,m=new Uint8Array(y);c>0;)o+=g=d(r,s+o,e,u,c),u+=g,c-=g,(g=t.cipher(n,i+s,o))&&m.set(r.subarray(s,s+g),p),p+=g,g