16 lines
83 KiB
JavaScript
16 lines
83 KiB
JavaScript
|
|
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var r=t();for(var i in r)("object"==typeof exports?exports:e)[i]=r[i]}}("undefined"!=typeof self?self:this,function(){return function(e){function t(i){if(r[i])return r[i].exports;var n=r[i]={i:i,l:!1,exports:{}};return e[i].call(n.exports,n,n.exports,t),n.l=!0,n.exports}var r={};return t.m=e,t.c=r,t.d=function(e,r,i){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=8)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=i||function(e,t){var r=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),i={},n=i.lib={},o=n.Base=function(){return{extend:function(e){var t=r(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),a=n.WordArray=o.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=void 0!=t?t:4*e.length},toString:function(e){return(e||c).stringify(this)},concat:function(e){var t=this.words,r=e.words,i=this.sigBytes,n=e.sigBytes;if(this.clamp(),i%4)for(var o=0;o<n;o++){var a=r[o>>>2]>>>24-o%4*8&255;t[i+o>>>2]|=a<<24-(i+o)%4*8}else for(var o=0;o<n;o+=4)t[i+o>>>2]=r[o>>>2];return this.sigBytes+=n,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=o.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var r,i=[],n=0;n<t;n+=4){var o=function(t){var t=t,r=987654321,i=4294967295;return function(){r=36969*(65535&r)+(r>>16)&i,t=18e3*(65535&t)+(t>>16)&i;var n=(r<<16)+t&i;return n/=4294967296,(n+=.5)*(e.random()>.5?1:-1)}}(4294967296*(r||e.random()));r=987654071*o(),i.push(4294967296*o()|0)}return new a.init(i,t)}}),s=i.enc={},c=s.Hex={stringify:function(e){for(var t=e.words,r=e.sigBytes,i=[],n=0;n<r;n++){var o=t[n>>>2]>>>24-n%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(e){for(var t=e.length,r=[],i=0;i<t;i+=2)r[i>>>3]|=parseInt(e.substr(i,2),16)<<24-i%8*4;return new a.init(r,t/2)}},u=s.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,i=[],n=0;n<r;n++){var o=t[n>>>2]>>>24-n%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(e){for(var t=e.length,r=[],i=0;i<t;i++)r[i>>>2]|=(255&e.charCodeAt(i))<<24-i%4*8;return new a.init(r,t)}},l=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(u.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return u.parse(unescape(encodeURIComponent(e)))}},d=n.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=l.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r=this._data,i=r.words,n=r.sigBytes,o=this.blockSize,s=4*o,c=n/s;c=t?e.ceil(c):e.max((0|c)-this._minBufferSize,0);var u=c*o,l=e.min(4*u,n);if(u){for(var d=0;d<u;d+=o)this._doProcessBlock(i,d);var f=i.splice(0,u);r.sigBytes-=l}return new a.init(f,l)},clone:function(){var e=o.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),f=(n.Hasher=d.extend({cfg:o.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){d.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_create
|
||
|
|
(c) 2012 by Cédric Mesnil. All rights reserved.
|
||
|
|
|
||
|
|
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||
|
|
|
||
|
|
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||
|
|
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||
|
|
|
||
|
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||
|
|
*/
|
||
|
|
function(e){function t(e,t,r){return e^t^r}function r(e,t,r){return e&t|~e&r}function n(e,t,r){return(e|~t)^r}function o(e,t,r){return e&r|t&~r}function a(e,t,r){return e^(t|~r)}function s(e,t){return e<<t|e>>>32-t}var c=i,u=c.lib,l=u.WordArray,d=u.Hasher,f=c.algo,h=l.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),p=l.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),v=l.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),_=l.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),y=l.create([0,1518500249,1859775393,2400959708,2840853838]),g=l.create([1352829926,1548603684,1836072691,2053994217,0]),k=f.RIPEMD160=d.extend({_doReset:function(){this._hash=l.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,i){for(var c=0;c<16;c++){var u=i+c,l=e[u];e[u]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}var d,f,k,S,m,A,b,I,T,w,U=this._hash.words,E=y.words,C=g.words,B=h.words,x=p.words,D=v.words,O=_.words;A=d=U[0],b=f=U[1],I=k=U[2],T=S=U[3],w=m=U[4];for(var P,c=0;c<80;c+=1)P=d+e[i+B[c]]|0,P+=c<16?t(f,k,S)+E[0]:c<32?r(f,k,S)+E[1]:c<48?n(f,k,S)+E[2]:c<64?o(f,k,S)+E[3]:a(f,k,S)+E[4],P|=0,P=s(P,D[c]),P=P+m|0,d=m,m=S,S=s(k,10),k=f,f=P,P=A+e[i+x[c]]|0,P+=c<16?a(b,I,T)+C[0]:c<32?o(b,I,T)+C[1]:c<48?n(b,I,T)+C[2]:c<64?r(b,I,T)+C[3]:t(b,I,T)+C[4],P|=0,P=s(P,O[c]),P=P+w|0,A=w,w=T,T=s(I,10),I=b,b=P;P=U[1]+k+T|0,U[1]=U[2]+S+w|0,U[2]=U[3]+m+A|0,U[3]=U[4]+d+b|0,U[4]=U[0]+f+I|0,U[0]=P},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;t[i>>>5]|=128<<24-i%32,t[14+(i+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),e.sigBytes=4*(t.length+1),this._process();for(var n=this._hash,o=n.words,a=0;a<5;a++){var s=o[a];o[a]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return n},clone:function(){var e=d.clone.call(this);return e._hash=this._hash.clone(),e}});c.RIPEMD160=d._createHelper(k),c.HmacRIPEMD160=d._createHmacHelper(k)}(Math),function(){var e=i,t=e.lib,r=t.Base,n=e.enc,o=n.Utf8,a=e.algo;a.HMAC=r.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=o.parse(t));var r=e.blockSize,i=4*r;t.sigBytes>i&&(t=e.finalize(t)),t.clamp();for(var n=this._oKey=t.clone(),a=this._iKey=t.clone(),s=n.words,c=a.words,u=0;u<r;u++)s[u]^=1549556828,c[u]^=909522486;n.sigBytes=a.sigBytes=i,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,r=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(r))}})}(),function(){var e=i,t=e.lib,r=t.Base,n=t.WordArray,o=e.algo,a=o.SHA1,s=o.HMAC,c=o.PBKDF2=r.extend({cfg:r.extend({keySize:4,hasher:a,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r=this.cfg,i=s.create(r.hasher,e),o=n.create(),a=n.create([1]),c=o.words,u=a.words,l=r.keySize,d=r.iterations;c.length<l;){var f=i.update(t).finalize(a);i.reset();for(var h=f.words,p=h.length,v=f,_=1;_<d;_++){v=i.finalize(v),i.reset();for(var y=v.words,g=0;g<p;g++)h[g]^=y[g]}o.concat(f),u[0]++}return o.sigBytes=4*l,o}});e.PBKDF2=function(e,t,r){return c.create(r).compute(e,t)}}(),function(){var e=i,t=e.lib,r=t.Base,n=t.WordArray,o=e.algo,a=o.MD5,s=o.EvpKDF=r.extend({cfg:r.extend({keySize:4,hasher:a,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r=this.cfg,i=r.hasher.create(),o=n.create(),a=o.words,s=r.keySize,c=r.iterations;a.length<s;){u&&i.update(u);var u=i
|
||
|
|
* Counter block mode compatible with Dr Brian Gladman fileenc.c
|
||
|
|
* derived from CryptoJS.mode.CTR
|
||
|
|
* Jan Hruby jhruby.web@gmail.com
|
||
|
|
*/
|
||
|
|
i.mode.CTRGladman=function(){function e(e){if(255==(e>>24&255)){var t=e>>16&255,r=e>>8&255,i=255&e;255===t?(t=0,255===r?(r=0,255===i?i=0:++i):++r):++t,e=0,e+=t<<16,e+=r<<8,e+=i}else e+=1<<24;return e}function t(t){return 0===(t[0]=e(t[0]))&&(t[1]=e(t[1])),t}var r=i.lib.BlockCipherMode.extend(),n=r.Encryptor=r.extend({processBlock:function(e,r){var i=this._cipher,n=i.blockSize,o=this._iv,a=this._counter;o&&(a=this._counter=o.slice(0),this._iv=void 0),t(a);var s=a.slice(0);i.encryptBlock(s,0);for(var c=0;c<n;c++)e[r+c]^=s[c]}});return r.Decryptor=n,r}(),function(){function e(){for(var e=this._X,t=this._C,r=0;r<8;r++)s[r]=t[r];t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<s[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<s[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<s[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<s[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<s[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<s[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<s[6]>>>0?1:0)|0,this._b=t[7]>>>0<s[7]>>>0?1:0;for(var r=0;r<8;r++){var i=e[r]+t[r],n=65535&i,o=i>>>16,a=((n*n>>>17)+n*o>>>15)+o*o,u=((4294901760&i)*i|0)+((65535&i)*i|0);c[r]=a^u}e[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,e[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,e[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,e[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,e[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,e[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,e[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,e[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}var t=i,r=t.lib,n=r.StreamCipher,o=t.algo,a=[],s=[],c=[],u=o.Rabbit=n.extend({_doReset:function(){for(var t=this._key.words,r=this.cfg.iv,i=0;i<4;i++)t[i]=16711935&(t[i]<<8|t[i]>>>24)|4278255360&(t[i]<<24|t[i]>>>8);var n=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],o=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];this._b=0;for(var i=0;i<4;i++)e.call(this);for(var i=0;i<8;i++)o[i]^=n[i+4&7];if(r){var a=r.words,s=a[0],c=a[1],u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),l=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),d=u>>>16|4294901760&l,f=l<<16|65535&u;o[0]^=u,o[1]^=d,o[2]^=l,o[3]^=f,o[4]^=u,o[5]^=d,o[6]^=l,o[7]^=f;for(var i=0;i<4;i++)e.call(this)}},_doProcessBlock:function(t,r){var i=this._X;e.call(this),a[0]=i[0]^i[5]>>>16^i[3]<<16,a[1]=i[2]^i[7]>>>16^i[5]<<16,a[2]=i[4]^i[1]>>>16^i[7]<<16,a[3]=i[6]^i[3]>>>16^i[1]<<16;for(var n=0;n<4;n++)a[n]=16711935&(a[n]<<8|a[n]>>>24)|4278255360&(a[n]<<24|a[n]>>>8),t[r+n]^=a[n]},blockSize:4,ivSize:2});t.Rabbit=n._createHelper(u)}(),i.mode.CTR=function(){var e=i.lib.BlockCipherMode.extend(),t=e.Encryptor=e.extend({processBlock:function(e,t){var r=this._cipher,i=r.blockSize,n=this._iv,o=this._counter;n&&(o=this._counter=n.slice(0),this._iv=void 0);var a=o.slice(0);r.encryptBlock(a,0),o[i-1]=o[i-1]+1|0;for(var s=0;s<i;s++)e[t+s]^=a[s]}});return e.Decryptor=t,e}(),function(){function e(){for(var e=this._X,t=this._C,r=0;r<8;r++)s[r]=t[r];t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<s[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<s[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<s[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<s[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<s[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<s[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<s[6]>>>0?1:0)|0,this._b=t[7]>>>0<s[7]>>>0?1:0;for(var r=0;r<8;r++){var i=e[r]+t[r],n=65535&i,o=i>>>16,a=((n*n>>>17)+n*o>>>15)+o*o,u=((4294901760&i)*i|0)+((65535&i)*i|0);c[r]=a^u}e[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,e[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,e[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,e[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,e[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,e[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,e[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,e[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}var t=i,r=t.lib,n=r.StreamCipher,o=t.algo,a=[],s=[],c=[],u=o.RabbitLegacy=n.extend({_doR
|