(function(){function w(a){this.data="";this.read=0;if("string"===typeof a)this.data=a;else if(c.isArrayBuffer(a)||c.isArrayBufferView(a)){a=new Uint8Array(a);try{this.data=String.fromCharCode.apply(null,a)}catch(f){for(var b=0;b<a.length;++b)this.putByte(a[b])}}else if(a instanceof w||"object"===typeof a&&"string"===typeof a.data&&"number"===typeof a.read)this.data=a.data,this.read=a.read;this._constructedStringLength=0}function y(a,b,f){for(var e,d,h,z,g,k,n,r,u,l,t,p,v,A=f.length();64<=A;){for(g=
0;16>g;++g)b[g]=f.getInt32();for(;64>g;++g)e=b[g-2],e=(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10,d=b[g-15],d=(d>>>7|d<<25)^(d>>>18|d<<14)^d>>>3,b[g]=e+b[g-7]+d+b[g-16]|0;k=a.h0;n=a.h1;r=a.h2;u=a.h3;l=a.h4;t=a.h5;p=a.h6;v=a.h7;for(g=0;64>g;++g)e=(l>>>6|l<<26)^(l>>>11|l<<21)^(l>>>25|l<<7),h=p^l&(t^p),d=(k>>>2|k<<30)^(k>>>13|k<<19)^(k>>>22|k<<10),z=k&n|r&(k^n),e=v+e+h+B[g]+b[g],d+=z,v=p,p=t,t=l,l=u+e|0,u=r,r=n,n=k,k=e+d|0;a.h0=a.h0+k|0;a.h1=a.h1+n|0;a.h2=a.h2+r|0;a.h3=a.h3+u|0;a.h4=a.h4+l|0;a.h5=a.h5+t|0;
a.h6=a.h6+p|0;a.h7=a.h7+v|0;A-=64}}var m,C,c=m=m||{};c.isArrayBuffer=function(a){return"undefined"!==typeof ArrayBuffer&&a instanceof ArrayBuffer};c.isArrayBufferView=function(a){return a&&c.isArrayBuffer(a.buffer)&&void 0!==a.byteLength};c.ByteBuffer=w;c.ByteStringBuffer=w;c.ByteStringBuffer.prototype._optimizeConstructedString=function(a){this._constructedStringLength+=a;4096<this._constructedStringLength&&(this.data.substr(0,1),this._constructedStringLength=0)};c.ByteStringBuffer.prototype.length=
function(){return this.data.length-this.read};c.ByteStringBuffer.prototype.isEmpty=function(){return 0>=this.length()};c.ByteStringBuffer.prototype.putByte=function(a){return this.putBytes(String.fromCharCode(a))};c.ByteStringBuffer.prototype.fillWithByte=function(a,b){a=String.fromCharCode(a);for(var f=this.data;0<b;)b&1&&(f+=a),b>>>=1,0<b&&(a+=a);this.data=f;this._optimizeConstructedString(b);return this};c.ByteStringBuffer.prototype.putBytes=function(a){this.data+=a;this._optimizeConstructedString(a.length);
return this};c.ByteStringBuffer.prototype.putString=function(a){return this.putBytes(c.encodeUtf8(a))};c.ByteStringBuffer.prototype.putInt16=function(a){return this.putBytes(String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};c.ByteStringBuffer.prototype.putInt24=function(a){return this.putBytes(String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};c.ByteStringBuffer.prototype.putInt32=function(a){return this.putBytes(String.fromCharCode(a>>24&255)+String.fromCharCode(a>>
16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};c.ByteStringBuffer.prototype.putInt16Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>8&255))};c.ByteStringBuffer.prototype.putInt24Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a>>16&255))};c.ByteStringBuffer.prototype.putInt32Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a>>
16&255)+String.fromCharCode(a>>24&255))};c.ByteStringBuffer.prototype.putInt=function(a,b){var f="";do b-=8,f+=String.fromCharCode(a>>b&255);while(0<b);return this.putBytes(f)};c.ByteStringBuffer.prototype.putSignedInt=function(a,b){0>a&&(a+=2<<b-1);return this.putInt(a,b)};c.ByteStringBuffer.prototype.putBuffer=function(a){return this.putBytes(a.getBytes())};c.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)};c.ByteStringBuffer.prototype.getInt16=function(){var a=
this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);this.read+=2;return a};c.ByteStringBuffer.prototype.getInt24=function(){var a=this.data.charCodeAt(this.read)<<16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);this.read+=3;return a};c.ByteStringBuffer.prototype.getInt32=function(){var a=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);this.read+=4;return a};c.ByteStringBuffer.prototype.getInt16Le=
function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;this.read+=2;return a};c.ByteStringBuffer.prototype.getInt24Le=function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;this.read+=3;return a};c.ByteStringBuffer.prototype.getInt32Le=function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;this.read+=
4;return a};c.ByteStringBuffer.prototype.getInt=function(a){var b=0;do b=(b<<8)+this.data.charCodeAt(this.read++),a-=8;while(0<a);return b};c.ByteStringBuffer.prototype.getSignedInt=function(a){var b=this.getInt(a);a=2<<a-2;b>=a&&(b-=a<<1);return b};c.ByteStringBuffer.prototype.getBytes=function(a){if(a){a=Math.min(this.length(),a);var b=this.data.slice(this.read,this.read+a);this.read+=a}else 0===a?b="":(b=0===this.read?this.data:this.data.slice(this.read),this.clear());return b};c.ByteStringBuffer.prototype.bytes=
function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};c.ByteStringBuffer.prototype.at=function(a){return this.data.charCodeAt(this.read+a)};c.ByteStringBuffer.prototype.setAt=function(a,b){this.data=this.data.substr(0,this.read+a)+String.fromCharCode(b)+this.data.substr(this.read+a+1);return this};c.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};c.ByteStringBuffer.prototype.copy=function(){var a=c.createBuffer(this.data);
a.read=this.read;return a};c.ByteStringBuffer.prototype.compact=function(){0<this.read&&(this.data=this.data.slice(this.read),this.read=0);return this};c.ByteStringBuffer.prototype.clear=function(){this.data="";this.read=0;return this};c.ByteStringBuffer.prototype.truncate=function(a){a=Math.max(0,this.length()-a);this.data=this.data.substr(this.read,a);this.read=0;return this};c.ByteStringBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.length;++b){var f=this.data.charCodeAt(b);
16>f&&(a+="0");a+=f.toString(16)}return a};c.ByteStringBuffer.prototype.toString=function(){return c.decodeUtf8(this.bytes())};c.createBuffer=function(a,b){void 0!==a&&"utf8"===(b||"raw")&&(a=c.encodeUtf8(a));return new c.ByteBuffer(a)};c.fillString=function(a,b){for(var f="";0<b;)b&1&&(f+=a),b>>>=1,0<b&&(a+=a);return f};c.encodeUtf8=function(a){return unescape(encodeURIComponent(a))};c.decodeUtf8=function(a){return decodeURIComponent(escape(a))};var D=C=C||{};var q=q||{};q.algorithms=q.algorithms||
{};q.sha256=q.algorithms.sha256=D;D.create=function(){E||(x=String.fromCharCode(128),x+=m.fillString(String.fromCharCode(0),64),B=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,
1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],E=!0);var a=null,b=m.createBuffer(),f=Array(64),e={algorithm:"sha256",blockLength:64,digestLength:32,messageLength:0,messageLength64:[0,0],start:function(){e.messageLength=0;e.messageLength64=
[0,0];b=m.createBuffer();a={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225};return e}};e.start();e.update=function(d,h){"utf8"===h&&(d=m.encodeUtf8(d));e.messageLength+=d.length;e.messageLength64[0]+=d.length/4294967296>>>0;e.messageLength64[1]+=d.length>>>0;b.putBytes(d);y(a,f,b);(2048<b.read||0===b.length())&&b.compact();return e};e.digest=function(){var d=m.createBuffer();d.putBytes(b.bytes());d.putBytes(x.substr(0,64-(e.messageLength64[1]+
8&63)));d.putInt32(e.messageLength64[0]<<3|e.messageLength64[0]>>>28);d.putInt32(e.messageLength64[1]<<3);var h={h0:a.h0,h1:a.h1,h2:a.h2,h3:a.h3,h4:a.h4,h5:a.h5,h6:a.h6,h7:a.h7};y(h,f,d);d=m.createBuffer();d.putInt32(h.h0);d.putInt32(h.h1);d.putInt32(h.h2);d.putInt32(h.h3);d.putInt32(h.h4);d.putInt32(h.h5);d.putInt32(h.h6);d.putInt32(h.h7);return d};return e};var x=null,E=!1,B=null;c.hasWideChar=function(a){for(var b=0;b<a.length;b++)if(a.charCodeAt(b)>>>8)return!0;return!1};window.forge_sha256=function(a,
b){var f=q.sha256.create();f.update(a,"UTF-8"==b||c.hasWideChar(a)?"utf8":void 0);return f.digest().toHex()}})();
