diff --git a/app/main.js b/app/main.js index 0b41b75d..353afa1a 100644 --- a/app/main.js +++ b/app/main.js @@ -1,10 +1,10 @@ +import 'fast-text-encoding'; // MS Edge support import 'fluent-intl-polyfill'; import app from './routes'; import locale from '../common/locales'; import fileManager from './fileManager'; import dragManager from './dragManager'; import { canHasSend } from './utils'; -import assets from '../common/assets'; import storage from './storage'; import metrics from './metrics'; import experiments from './experiments'; @@ -30,10 +30,7 @@ app.use((state, emitter) => { ) { unsupportedReason = 'outdated'; } - if (/edge\/\d+/i.test(navigator.userAgent)) { - unsupportedReason = 'edge'; - } - const ok = await canHasSend(assets.get('cryptofill.js')); + const ok = await canHasSend(); if (!ok) { unsupportedReason = /firefox/i.test(navigator.userAgent) ? 'outdated' diff --git a/app/utils.js b/app/utils.js index 0426ffc2..f22dea26 100644 --- a/app/utils.js +++ b/app/utils.js @@ -25,7 +25,7 @@ function loadShim(polyfill) { }); } -async function canHasSend(polyfill) { +async function canHasSend() { try { const key = await window.crypto.subtle.generateKey( { @@ -35,7 +35,6 @@ async function canHasSend(polyfill) { true, ['encrypt', 'decrypt'] ); - await window.crypto.subtle.encrypt( { name: 'AES-GCM', @@ -45,9 +44,23 @@ async function canHasSend(polyfill) { key, new ArrayBuffer(8) ); + await window.crypto.subtle.importKey( + 'raw', + window.crypto.getRandomValues(new Uint8Array(16)), + 'PBKDF2', + false, + ['deriveKey'] + ); + await window.crypto.subtle.importKey( + 'raw', + window.crypto.getRandomValues(new Uint8Array(16)), + 'HKDF', + false, + ['deriveKey'] + ); return true; } catch (err) { - return loadShim(polyfill); + return false; } } @@ -167,6 +180,7 @@ module.exports = { copyToClipboard, arrayToB64, b64ToArray, + loadShim, canHasSend, isFile, openLinksInNewTab diff --git a/assets/cryptofill.js b/assets/cryptofill.js index db29a332..e7378c54 100644 --- a/assets/cryptofill.js +++ b/assets/cryptofill.js @@ -1,4 +1,4 @@ -var liner=function(e){function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}var t={};return r.m=e,r.c=t,r.i=function(e){return e},r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},r.p="",r(r.s=16)}([function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),function(e){function n(e){for(var r=[],t=1;t=0;s--){var c=i[s],u=c.arg.substring(1),h=c.index+1;a=a.substring(0,h)+arguments[+u]+a.substring(h+1+u.length)}return a=a.replace("%%","%")}function a(e){var r;r="string"==typeof e?{name:e}:e,h.checkAlgorithm(r);var t=e;return t.hash&&(t.hash=a(t.hash)),r}function o(e,r){if(!e)throw new s("Parameter '"+r+"' is required and cant be empty");if("undefined"!=typeof Buffer&&Buffer.isBuffer(e))return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer);if(e instanceof ArrayBuffer)return new Uint8Array(e);throw new s("Incoming parameter '"+r+"' has wrong data type. Must be ArrayBufferView or ArrayBuffer")}t.d(r,"WebCryptoError",function(){return s}),t.d(r,"AlgorithmError",function(){return c}),t.d(r,"CryptoKeyError",function(){return u}),t.d(r,"PrepareAlgorithm",function(){return a}),t.d(r,"PrepareData",function(){return o}),t.d(r,"BaseCrypto",function(){return h}),t.d(r,"AlgorithmNames",function(){return p}),t.d(r,"Base64Url",function(){return l}),t.d(r,"SubtleCrypto",function(){return W}),t.d(r,"Aes",function(){return m}),t.d(r,"AesAlgorithmError",function(){return A}),t.d(r,"AesWrapKey",function(){return w}),t.d(r,"AesEncrypt",function(){return v}),t.d(r,"AesECB",function(){return g}),t.d(r,"AesCBC",function(){return C}),t.d(r,"AesCTR",function(){return d}),t.d(r,"AesGCM",function(){return E}),t.d(r,"AesKW",function(){return P}),t.d(r,"RsaKeyGenParamsError",function(){return N}),t.d(r,"RsaHashedImportParamsError",function(){return G}),t.d(r,"Rsa",function(){return M}),t.d(r,"RsaSSA",function(){return B}),t.d(r,"RsaPSSParamsError",function(){return T}),t.d(r,"RsaPSS",function(){return D}),t.d(r,"RsaOAEPParamsError",function(){return x}),t.d(r,"RsaOAEP",function(){return H}),t.d(r,"EcKeyGenParamsError",function(){return S}),t.d(r,"Ec",function(){return _}),t.d(r,"EcAlgorithmError",function(){return U}),t.d(r,"EcDSA",function(){return L}),t.d(r,"EcDH",function(){return R}),t.d(r,"ShaAlgorithms",function(){return k}),t.d(r,"Sha",function(){return b});var i=t(6),s=function(e){function r(r){for(var t=[],a=1;a0&&e.length<=128))throw new A(A.PARAM_WRONG_VALUE,"length","number [1-128]")},r}(v);d.ALG_NAME=p.AesCTR;var E=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return t.i(i.a)(r,e),r.checkAlgorithmParams=function(e){if(this.checkAlgorithm(e),e.additionalData&&!(ArrayBuffer.isView(e.additionalData)||e.additionalData instanceof ArrayBuffer))throw new A(A.PARAM_WRONG_TYPE,"additionalData","ArrayBufferView or ArrayBuffer");if(!e.iv)throw new A(A.PARAM_REQUIRED,"iv");if(!(ArrayBuffer.isView(e.iv)||e.iv instanceof ArrayBuffer))throw new A(A.PARAM_WRONG_TYPE,"iv","ArrayBufferView or ArrayBuffer");if(e.tagLength){if(![32,64,96,104,112,120,128].some(function(r){return r===e.tagLength}))throw new A(A.PARAM_WRONG_VALUE,"tagLength","32, 64, 96, 104, 112, 120 or 128")}},r}(v);E.ALG_NAME=p.AesGCM;var P=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return t.i(i.a)(r,e),r.checkAlgorithmParams=function(e){this.checkAlgorithm(e)},r}(w);P.ALG_NAME=p.AesKW,P.KEY_USAGES=["wrapKey","unwrapKey"];var k=[p.Sha1,p.Sha256,p.Sha384,p.Sha512].join(" | "),b=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return t.i(i.a)(r,e),r.checkAlgorithm=function(r){var t;switch(t="string"==typeof r?{name:r}:r,e.checkAlgorithm.call(this,t),t.name.toUpperCase()){case p.Sha1:case p.Sha256:case p.Sha384:case p.Sha512:break;default:throw new c(c.WRONG_ALG_NAME,t.name,k)}},r.digest=function(e,r){var t=this;return new Promise(function(r,n){t.checkAlgorithm(e),r(void 0)})},r}(h),S=function(e){function r(){var r=null!==e&&e.apply(this,arguments)||this;return r.code=9,r}return t.i(i.a)(r,e),r}(c),_=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return t.i(i.a)(r,e),r.checkAlgorithm=function(e){if(e.name.toUpperCase()!==this.ALG_NAME.toUpperCase())throw new c(c.WRONG_ALG_NAME,e.name,this.ALG_NAME)},r.checkKeyGenParams=function(e){if(!e.namedCurve)throw new S(S.PARAM_REQUIRED,"namedCurve");if("string"!=typeof e.namedCurve)throw new S(S.PARAM_WRONG_TYPE,"namedCurve","string");switch(e.namedCurve.toUpperCase()){case"P-256":case"P-384":case"P-521":break;default:throw new S(S.PARAM_WRONG_VALUE,"namedCurve","P-256, P-384 or P-521")}},r.checkKeyGenUsages=function(e){var r=this;e.forEach(function(e){var t=0;for(t;t0&&e.length<=512))throw new c(c.PARAM_WRONG_VALUE,"length","more 0 and less than 512")},r.checkKeyGenUsages=function(e){var r=this;this.checkKeyUsages(e),e.forEach(function(e){var t=0;for(t;t=256&&r<=16384)||r%8)throw new N(N.PARAM_WRONG_VALUE,"modulusLength"," a multiple of 8 bits and >= 256 and <= 16384");var t=e.publicExponent;if(!t)throw new N(N.PARAM_REQUIRED,"publicExponent");if(!ArrayBuffer.isView(t))throw new N(N.PARAM_WRONG_TYPE,"publicExponent","ArrayBufferView");if(3!==t[0]&&(1!==t[0]||0!==t[1]||1!==t[2]))throw new N(N.PARAM_WRONG_VALUE,"publicExponent","Uint8Array([3]) | Uint8Array([1, 0, 1])");if(!e.hash)throw new N(N.PARAM_REQUIRED,"hash",k);b.checkAlgorithm(e.hash)},r.checkKeyGenUsages=function(e){var r=this;this.checkKeyUsages(e),e.forEach(function(e){var t=0;for(t;t>>16&65535,n=65535&e,a=r>>>16&65535,o=65535&r;return n*o+(t*o+n*a<<16>>>0)|0})},function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=function(){function e(){}return e}();r.CryptoKey=n},function(e,r,t){"use strict";function n(e,r){function t(){this.constructor=e}a(e,r),e.prototype=null===r?Object.create(r):(t.prototype=r.prototype,new t)}r.a=n;/*! ***************************************************************************** +var liner=function(e){function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}var t={};return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},r.p="",r(r.s=18)}([function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),function(e){function n(e){for(var r,t=e,n=/[^%](%\d+)/g,a=[];r=n.exec(t);)a.push({arg:r[1],index:r.index});for(var o=a.length-1;o>=0;o--){var s=a[o],i=s.arg.substring(1),c=s.index+1;t=t.substring(0,c)+arguments[+i]+t.substring(c+1+i.length)}return t=t.replace("%%","%")}function a(e){var r;r="string"==typeof e?{name:e}:e,h.checkAlgorithm(r);var t=e;return t.hash&&(t.hash=a(t.hash)),r}function o(e,r){if(!e)throw new i("Parameter '"+r+"' is required and cant be empty");if("undefined"!=typeof Buffer&&Buffer.isBuffer(e))return new Uint8Array(e);if(ArrayBuffer.isView(e)){var t=e.map(function(e){return e});return new Uint8Array(t.buffer)}if(e instanceof ArrayBuffer)return new Uint8Array(e);throw new i("Incoming parameter '"+r+"' has wrong data type. Must be ArrayBufferView or ArrayBuffer")}t.d(r,"WebCryptoError",function(){return i}),t.d(r,"AlgorithmError",function(){return c}),t.d(r,"CryptoKeyError",function(){return u}),t.d(r,"PrepareAlgorithm",function(){return a}),t.d(r,"PrepareData",function(){return o}),t.d(r,"BaseCrypto",function(){return h}),t.d(r,"AlgorithmNames",function(){return p}),t.d(r,"Base64Url",function(){return y}),t.d(r,"SubtleCrypto",function(){return W}),t.d(r,"Aes",function(){return m}),t.d(r,"AesAlgorithmError",function(){return A}),t.d(r,"AesWrapKey",function(){return w}),t.d(r,"AesEncrypt",function(){return g}),t.d(r,"AesECB",function(){return v}),t.d(r,"AesCBC",function(){return C}),t.d(r,"AesCTR",function(){return d}),t.d(r,"AesGCM",function(){return k}),t.d(r,"AesKW",function(){return b}),t.d(r,"RsaKeyGenParamsError",function(){return M}),t.d(r,"RsaHashedImportParamsError",function(){return G}),t.d(r,"Rsa",function(){return B}),t.d(r,"RsaSSA",function(){return T}),t.d(r,"RsaPSSParamsError",function(){return D}),t.d(r,"RsaPSS",function(){return H}),t.d(r,"RsaOAEPParamsError",function(){return x}),t.d(r,"RsaOAEP",function(){return j}),t.d(r,"EcKeyGenParamsError",function(){return U}),t.d(r,"Ec",function(){return _}),t.d(r,"EcAlgorithmError",function(){return S}),t.d(r,"EcDSA",function(){return L}),t.d(r,"EcDH",function(){return R}),t.d(r,"ShaAlgorithms",function(){return E}),t.d(r,"Sha",function(){return P});var s=t(8),i=function(e){function r(r){for(var t=[],a=1;a0&&e.length<=128))throw new A(A.PARAM_WRONG_VALUE,"length","number [1-128]")},r.ALG_NAME=p.AesCTR,r}(g),k=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return Object(s.a)(r,e),r.checkAlgorithmParams=function(e){if(this.checkAlgorithm(e),e.additionalData&&!(ArrayBuffer.isView(e.additionalData)||e.additionalData instanceof ArrayBuffer))throw new A(A.PARAM_WRONG_TYPE,"additionalData","ArrayBufferView or ArrayBuffer");if(!e.iv)throw new A(A.PARAM_REQUIRED,"iv");if(!(ArrayBuffer.isView(e.iv)||e.iv instanceof ArrayBuffer))throw new A(A.PARAM_WRONG_TYPE,"iv","ArrayBufferView or ArrayBuffer");if(e.tagLength){if(![32,64,96,104,112,120,128].some(function(r){return r===e.tagLength}))throw new A(A.PARAM_WRONG_VALUE,"tagLength","32, 64, 96, 104, 112, 120 or 128")}},r.ALG_NAME=p.AesGCM,r}(g),b=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return Object(s.a)(r,e),r.checkAlgorithmParams=function(e){this.checkAlgorithm(e)},r.ALG_NAME=p.AesKW,r.KEY_USAGES=["wrapKey","unwrapKey"],r}(w),E=[p.Sha1,p.Sha256,p.Sha384,p.Sha512].join(" | "),P=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return Object(s.a)(r,e),r.checkAlgorithm=function(r){var t;switch(t="string"==typeof r?{name:r}:r,e.checkAlgorithm.call(this,t),t.name.toUpperCase()){case p.Sha1:case p.Sha256:case p.Sha384:case p.Sha512:break;default:throw new c(c.WRONG_ALG_NAME,t.name,E)}},r.digest=function(e,r){var t=this;return new Promise(function(r,n){t.checkAlgorithm(e),r(void 0)})},r}(h),U=function(e){function r(){var r=null!==e&&e.apply(this,arguments)||this;return r.code=9,r}return Object(s.a)(r,e),r}(c),_=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return Object(s.a)(r,e),r.checkAlgorithm=function(e){if(e.name.toUpperCase()!==this.ALG_NAME.toUpperCase())throw new c(c.WRONG_ALG_NAME,e.name,this.ALG_NAME)},r.checkKeyGenParams=function(e){if(!e.namedCurve)throw new U(U.PARAM_REQUIRED,"namedCurve");if("string"!=typeof e.namedCurve)throw new U(U.PARAM_WRONG_TYPE,"namedCurve","string");switch(e.namedCurve.toUpperCase()){case"P-256":case"K-256":case"P-384":case"P-521":break;default:throw new U(U.PARAM_WRONG_VALUE,"namedCurve","K-256, P-256, P-384 or P-521")}},r.checkKeyGenUsages=function(e){var r=this;e.forEach(function(e){var t=0;for(t;t0&&e.length<=512))throw new c(c.PARAM_WRONG_VALUE,"length","more 0 and less than 512")},r.checkKeyGenUsages=function(e){var r=this;this.checkKeyUsages(e),e.forEach(function(e){var t=0;for(t;t=256&&r<=16384)||r%8)throw new M(M.PARAM_WRONG_VALUE,"modulusLength"," a multiple of 8 bits and >= 256 and <= 16384");var t=e.publicExponent;if(!t)throw new M(M.PARAM_REQUIRED,"publicExponent");if(!ArrayBuffer.isView(t))throw new M(M.PARAM_WRONG_TYPE,"publicExponent","ArrayBufferView");if(3!==t[0]&&(1!==t[0]||0!==t[1]||1!==t[2]))throw new M(M.PARAM_WRONG_VALUE,"publicExponent","Uint8Array([3]) | Uint8Array([1, 0, 1])");if(!e.hash)throw new M(M.PARAM_REQUIRED,"hash",E);P.checkAlgorithm(e.hash)},r.checkKeyGenUsages=function(e){var r=this;this.checkKeyUsages(e),e.forEach(function(e){var t=0;for(t;t>>16&65535,n=65535&e,a=r>>>16&65535,o=65535&r;return n*o+(t*o+n*a<<16>>>0)|0})},function(e,r,t){"use strict";function n(){var e,t={name:"Unknown",version:"0"},n=self.navigator.userAgent;return(e=/edge\/([\d\.]+)/i.exec(n))?(t.name=r.Browser.Edge,t.version=e[1]):/msie/i.test(n)?(t.name=r.Browser.IE,t.version=/msie ([\d\.]+)/i.exec(n)[1]):/Trident/i.test(n)?(t.name=r.Browser.IE,t.version=/rv:([\d\.]+)/i.exec(n)[1]):/chrome/i.test(n)?(t.name=r.Browser.Chrome,t.version=/chrome\/([\d\.]+)/i.exec(n)[1]):/mobile/i.test(n)?(t.name=r.Browser.Mobile,t.version=/mobile\/([\w]+)/i.exec(n)[1]):/safari/i.test(n)?(t.name=r.Browser.Safari,t.version=/version\/([\d\.]+)/i.exec(n)[1]):/firefox/i.test(n)&&(t.name=r.Browser.Firefox,t.version=/firefox\/([\d\.]+)/i.exec(n)[1]),t}function a(e){for(var r=new Uint8Array(e.length),t=0;t32?o>48?66:48:32,t.length32?o>48?66:48:32,t.length/232?o>48?66:48:32,a.length-1&&("public"===e.type||"secret"===e.type)&&e.usages.push(t)}),["sign","decrypt","unwrapKey","deriveKey","deriveBits"].forEach(function(t){r.indexOf(t)>-1&&("private"===e.type||"secret"===e.type)&&e.usages.push(t)})))})}function s(e,r,t){if(r&&A.BrowserInfo().name===A.Browser.IE){"extractable"in e&&(e.ext=e.extractable,delete e.extractable);var n=null;switch(r.name.toUpperCase()){case h.AlgorithmNames.RsaOAEP.toUpperCase():case h.AlgorithmNames.RsaPSS.toUpperCase():case h.AlgorithmNames.RsaSSA.toUpperCase():n=g.RsaCrypto;break;case h.AlgorithmNames.AesECB.toUpperCase():case h.AlgorithmNames.AesCBC.toUpperCase():case h.AlgorithmNames.AesGCM.toUpperCase():n=w.AesCrypto;break;default:throw new m.LinerError(m.LinerError.UNSUPPORTED_ALGORITHM,r.name.toUpperCase())}n&&!e.alg&&(e.alg=n.alg2jwk(r)),"key_ops"in e||(e.key_ops=t)}}function c(e){A.BrowserInfo().name===A.Browser.IE&&("ext"in e&&(e.extractable=e.ext,delete e.ext),delete e.key_ops,delete e.alg)}var u=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)r.hasOwnProperty(t)&&(e[t]=r[t])};return function(r,t){function n(){this.constructor=r}e(r,t),r.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(r,"__esModule",{value:!0});var h=t(0),p=t(0),f=t(0),l=t(4),y=t(2),m=t(1),A=t(3),w=t(8),v=t(11),g=t(10),C=t(9),d=[],E=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return u(r,e),r.prototype.generateKey=function(r,t,n){var o,s=arguments;return e.prototype.generateKey.apply(this,s).then(function(e){if(o=f.PrepareAlgorithm(r),(A.BrowserInfo().name!==A.Browser.Edge||o.name.toUpperCase()!==h.AlgorithmNames.AesGCM)&&l.nativeSubtle)try{return l.nativeSubtle.generateKey.apply(l.nativeSubtle,s).catch(function(e){console.warn("WebCrypto: native generateKey for "+o.name+" doesn't work.",e.message||"")})}catch(e){console.warn("WebCrypto: native generateKey for "+o.name+" doesn't work.",e.message||"")}}).then(function(e){if(e)return i(e,n),a(o,e),e;var r;switch(o.name.toLowerCase()){case h.AlgorithmNames.AesECB.toLowerCase():case h.AlgorithmNames.AesCBC.toLowerCase():case h.AlgorithmNames.AesGCM.toLowerCase():r=w.AesCrypto;break;case h.AlgorithmNames.EcDSA.toLowerCase():case h.AlgorithmNames.EcDH.toLowerCase():r=C.EcCrypto;break;case h.AlgorithmNames.RsaOAEP.toLowerCase():case h.AlgorithmNames.RsaPSS.toLowerCase():case h.AlgorithmNames.RsaSSA.toLowerCase():r=g.RsaCrypto;break;default:throw new m.LinerError(m.LinerError.UNSUPPORTED_ALGORITHM,o.name.toLowerCase())}return r.generateKey(o,t,n)})},r.prototype.digest=function(r,t){var n,a,o=arguments;return e.prototype.digest.apply(this,o).then(function(e){if(n=f.PrepareAlgorithm(r),a=f.PrepareData(t,"data"),l.nativeSubtle)try{return l.nativeSubtle.digest.apply(l.nativeSubtle,o).catch(function(e){console.warn("WebCrypto: native digest for "+n.name+" doesn't work.",e.message||"")})}catch(e){console.warn("WebCrypto: native digest for "+n.name+" doesn't work.",e.message||"")}}).then(function(e){return e||v.ShaCrypto.digest(n,a)})},r.prototype.sign=function(r,t,a){var i,s,c=arguments;return e.prototype.sign.apply(this,c).then(function(e){i=f.PrepareAlgorithm(r),s=f.PrepareData(a,"data");var n=o(t);if(n&&(c[0]=A.assign(i,n)),l.nativeSubtle)try{return l.nativeSubtle.sign.apply(l.nativeSubtle,c).catch(function(e){console.warn("WebCrypto: native sign for "+i.name+" doesn't work.",e.message||"")})}catch(e){console.warn("WebCrypto: native sign for "+i.name+" doesn't work.",e.message||"")}}).then(function(e){if(e)return e;var r;switch(i.name.toLowerCase()){case h.AlgorithmNames.EcDSA.toLowerCase():r=C.EcCrypto;break;case h.AlgorithmNames.RsaSSA.toLowerCase():case h.AlgorithmNames.RsaPSS.toLowerCase():r=g.RsaCrypto;break;default:throw new m.LinerError(m.LinerError.UNSUPPORTED_ALGORITHM,i.name.toLowerCase())}return n(t,r).then(function(e){return r.sign(i,e,s)})})},r.prototype.verify=function(r,t,a,i){var s,c,u,p=arguments;return e.prototype.verify.apply(this,p).then(function(e){s=f.PrepareAlgorithm(r),c=f.PrepareData(a,"data"),u=f.PrepareData(i,"data");var n=o(t);if(n&&(p[0]=A.assign(s,n)),l.nativeSubtle)try{return l.nativeSubtle.verify.apply(l.nativeSubtle,p).catch(function(e){console.warn("WebCrypto: native verify for "+s.name+" doesn't work.",e.message||"")})}catch(e){console.warn("WebCrypto: native verify for "+s.name+" doesn't work.",e.message||"")}}).then(function(e){if("boolean"==typeof e)return e;var r;switch(s.name.toLowerCase()){case h.AlgorithmNames.EcDSA.toLowerCase():r=C.EcCrypto;break;case h.AlgorithmNames.RsaSSA.toLowerCase():case h.AlgorithmNames.RsaPSS.toLowerCase():r=g.RsaCrypto;break;default:throw new m.LinerError(m.LinerError.UNSUPPORTED_ALGORITHM,s.name.toLowerCase())}return n(t,r).then(function(e){return r.verify(s,e,c,u)})})},r.prototype.deriveBits=function(r,t,n){var a,o=arguments;return e.prototype.deriveBits.apply(this,o).then(function(e){if(a=f.PrepareAlgorithm(r),l.nativeSubtle)try{return l.nativeSubtle.deriveBits.apply(l.nativeSubtle,o).catch(function(e){console.warn("WebCrypto: native deriveBits for "+a.name+" doesn't work.",e.message||"")})}catch(e){console.warn("WebCrypto: native deriveBits for "+a.name+" doesn't work.",e.message||"")}}).then(function(e){if(e)return e;var r;switch(a.name.toLowerCase()){case h.AlgorithmNames.EcDH.toLowerCase():r=C.EcCrypto;break;default:throw new m.LinerError(m.LinerError.NOT_SUPPORTED,"deriveBits")}return r.deriveBits(a,t,n)})},r.prototype.deriveKey=function(r,t,n,a,o){var s,c,u=arguments;return e.prototype.deriveKey.apply(this,u).then(function(e){if(s=f.PrepareAlgorithm(r),c=f.PrepareAlgorithm(n),l.nativeSubtle)try{return l.nativeSubtle.deriveKey.apply(l.nativeSubtle,u).catch(function(e){console.warn("WebCrypto: native deriveKey for "+s.name+" doesn't work.",e.message||"")})}catch(e){console.warn("WebCrypto: native deriveKey for "+s.name+" doesn't work.",e.message||"")}}).then(function(e){if(e)return i(e,o),e;var r;switch(s.name.toLowerCase()){case h.AlgorithmNames.EcDH.toLowerCase():r=C.EcCrypto;break;default:throw new m.LinerError(m.LinerError.NOT_SUPPORTED,"deriveBits")}return r.deriveKey(s,t,c,a,o)})},r.prototype.encrypt=function(r,t,a){var o,i,s=arguments;return e.prototype.encrypt.apply(this,s).then(function(e){if(o=f.PrepareAlgorithm(r),i=f.PrepareData(a,"data"),l.nativeSubtle)try{return l.nativeSubtle.encrypt.apply(l.nativeSubtle,s).catch(function(e){console.warn("WebCrypto: native 'encrypt' for "+o.name+" doesn't work.",e.message||"")})}catch(e){console.warn("WebCrypto: native 'encrypt' for "+o.name+" doesn't work.",e.message||"")}}).then(function(e){if(e){if(A.BrowserInfo().name===A.Browser.IE&&o.name.toUpperCase()===h.AlgorithmNames.AesGCM&&e.ciphertext){var r=new Uint8Array(e.ciphertext.byteLength+e.tag.byteLength),a=0;new Uint8Array(e.ciphertext).forEach(function(e){return r[a++]=e}),new Uint8Array(e.tag).forEach(function(e){return r[a++]=e}),e=r.buffer}return Promise.resolve(e)}var s;switch(o.name.toLowerCase()){case h.AlgorithmNames.AesECB.toLowerCase():case h.AlgorithmNames.AesCBC.toLowerCase():case h.AlgorithmNames.AesGCM.toLowerCase():s=w.AesCrypto;break;case h.AlgorithmNames.RsaOAEP.toLowerCase():s=g.RsaCrypto;break;default:throw new m.LinerError(m.LinerError.NOT_SUPPORTED,"encrypt")}return n(t,s).then(function(e){return s.encrypt(o,e,i)})})},r.prototype.decrypt=function(r,t,n){var a,o,i=arguments;return e.prototype.decrypt.apply(this,i).then(function(e){a=f.PrepareAlgorithm(r),o=f.PrepareData(n,"data");var i=o;if(A.BrowserInfo().name===A.Browser.IE&&a.name.toUpperCase()===h.AlgorithmNames.AesGCM){var s=o.byteLength-a.tagLength/8;i={ciphertext:o.buffer.slice(0,s),tag:o.buffer.slice(s,o.byteLength)}}if(t.key){var c=void 0;switch(a.name.toLowerCase()){case h.AlgorithmNames.AesECB.toLowerCase():case h.AlgorithmNames.AesCBC.toLowerCase():case h.AlgorithmNames.AesGCM.toLowerCase():c=w.AesCrypto;break;case h.AlgorithmNames.RsaOAEP.toLowerCase():c=g.RsaCrypto;break;default:throw new m.LinerError(m.LinerError.NOT_SUPPORTED,"decrypt")}return c.decrypt(a,t,o)}return l.nativeSubtle.decrypt.call(l.nativeSubtle,a,t,i)})},r.prototype.wrapKey=function(r,t,n,a){var o,i=arguments;return e.prototype.wrapKey.apply(this,i).then(function(e){if(o=f.PrepareAlgorithm(a),l.nativeSubtle)try{return l.nativeSubtle.wrapKey.apply(l.nativeSubtle,i).catch(function(e){console.warn("WebCrypto: native 'wrapKey' for "+o.name+" doesn't work.",e.message||"")})}catch(e){console.warn("WebCrypto: native 'wrapKey' for "+o.name+" doesn't work.",e.message||"")}}).then(function(e){if(e)return e;var a;switch(o.name.toLowerCase()){case h.AlgorithmNames.AesECB.toLowerCase():case h.AlgorithmNames.AesCBC.toLowerCase():case h.AlgorithmNames.AesGCM.toLowerCase():a=w.AesCrypto;break;case h.AlgorithmNames.RsaOAEP.toLowerCase():a=g.RsaCrypto;break;default:throw new m.LinerError(m.LinerError.NOT_SUPPORTED,"wrapKey")}return a.wrapKey(r,t,n,o)})},r.prototype.unwrapKey=function(r,t,n,a,o,s,c){var u,p,y,v=this,C=arguments;return e.prototype.unwrapKey.apply(this,C).then(function(e){if(u=f.PrepareAlgorithm(a),p=f.PrepareAlgorithm(o),y=f.PrepareData(t,"wrappedKey"),n.key){var d=void 0;switch(u.name.toLowerCase()){case h.AlgorithmNames.AesECB.toLowerCase():case h.AlgorithmNames.AesCBC.toLowerCase():case h.AlgorithmNames.AesGCM.toLowerCase():d=w.AesCrypto;break;case h.AlgorithmNames.RsaOAEP.toLowerCase():d=g.RsaCrypto;break;default:throw new m.LinerError(m.LinerError.NOT_SUPPORTED,"unwrapKey")}return d.unwrapKey(r,y,n,u,p,s,c)}return l.nativeSubtle.unwrapKey.apply(l.nativeSubtle,C).catch(function(e){return v.decrypt(u,n,t).then(function(e){var t;return t="jwk"===r?JSON.parse(A.buffer2string(new Uint8Array(e))):e,v.importKey(r,t,p,s,c)})}).then(function(e){if(e)return i(e,c),e}).catch(function(e){throw console.error(e),new Error("Cannot unwrap key from incoming data")})})},r.prototype.exportKey=function(r,t){var n=arguments;return e.prototype.exportKey.apply(this,n).then(function(){if(l.nativeSubtle)try{return l.nativeSubtle.exportKey.apply(l.nativeSubtle,n).catch(function(e){console.warn("WebCrypto: native 'exportKey' for "+t.algorithm.name+" doesn't work.",e.message||"")})}catch(e){console.warn("WebCrypto: native 'exportKey' for "+t.algorithm.name+" doesn't work.",e.message||"")}}).then(function(e){if(e){"jwk"===r&&e instanceof ArrayBuffer&&(e=A.buffer2string(new Uint8Array(e)),e=JSON.parse(e));var n=o(t);return n||(n=A.assign({},t.algorithm)),s(e,n,t.usages),Promise.resolve(e)}if(!t.key)throw new m.LinerError("Cannot export native CryptoKey from JS implementation");var a;switch(t.algorithm.name.toLowerCase()){case h.AlgorithmNames.AesECB.toLowerCase():case h.AlgorithmNames.AesCBC.toLowerCase():case h.AlgorithmNames.AesGCM.toLowerCase():a=w.AesCrypto;break;case h.AlgorithmNames.EcDH.toLowerCase():case h.AlgorithmNames.EcDSA.toLowerCase():a=C.EcCrypto;break;case h.AlgorithmNames.RsaSSA.toLowerCase():case h.AlgorithmNames.RsaPSS.toLowerCase():case h.AlgorithmNames.RsaOAEP.toLowerCase():a=g.RsaCrypto;break;default:throw new m.LinerError(m.LinerError.UNSUPPORTED_ALGORITHM,t.algorithm.name.toLowerCase())}return a.exportKey(r,t)})},r.prototype.importKey=function(r,t,n,o,s){var u,p,y=arguments;return e.prototype.importKey.apply(this,y).then(function(e){if(u=f.PrepareAlgorithm(n),p=t,A.BrowserInfo().name!==A.Browser.Safari&&A.BrowserInfo().name!==A.Browser.IE||(A.BrowserInfo().name===A.Browser.IE&&(t=A.assign({},t),c(t)),y[1]=A.string2buffer(JSON.stringify(t)).buffer),ArrayBuffer.isView(t)&&(p=f.PrepareData(t,"keyData")),l.nativeSubtle)try{return l.nativeSubtle.importKey.apply(l.nativeSubtle,y).catch(function(e){console.warn("WebCrypto: native 'importKey' for "+u.name+" doesn't work.",e.message||"")})}catch(e){console.warn("WebCrypto: native 'importKey' for "+u.name+" doesn't work.",e.message||"")}}).then(function(e){if(e)return a(u,e),i(e,s),Promise.resolve(e);var t;switch(u.name.toLowerCase()){case h.AlgorithmNames.AesECB.toLowerCase():case h.AlgorithmNames.AesCBC.toLowerCase():case h.AlgorithmNames.AesGCM.toLowerCase():t=w.AesCrypto;break;case h.AlgorithmNames.EcDH.toLowerCase():case h.AlgorithmNames.EcDSA.toLowerCase():t=C.EcCrypto;break;case h.AlgorithmNames.RsaSSA.toLowerCase():case h.AlgorithmNames.RsaPSS.toLowerCase():case h.AlgorithmNames.RsaOAEP.toLowerCase():t=g.RsaCrypto;break;default:throw new m.LinerError(m.LinerError.UNSUPPORTED_ALGORITHM,u.name.toLowerCase())}return t.importKey(r,p,u,o,s)})},r}(p.SubtleCrypto);r.SubtleCrypto=E,Uint8Array.prototype.forEach||(Uint8Array.prototype.forEach=function(e){for(var r=0;re;e++){var g=a.charCodeAt(e);if(b&&g>=55296&&56319>=g){if(++e>=c)throw new Error("Malformed string, low surrogate expected at position "+e);g=(55296^g)<<10|65536|56320^a.charCodeAt(e)}else if(!b&&g>>>8)throw new Error("Wide characters are not allowed.");!b||127>=g?d[f++]=g:2047>=g?(d[f++]=192|g>>6,d[f++]=128|63&g):65535>=g?(d[f++]=224|g>>12,d[f++]=128|g>>6&63,d[f++]=128|63&g):(d[f++]=240|g>>18,d[f++]=128|g>>12&63,d[f++]=128|g>>6&63,d[f++]=128|63&g)}return d.subarray(0,f)}function g(a){var b=a.length;1&b&&(a="0"+a,b++);for(var c=new Uint8Array(b>>1),d=0;b>d;d+=2)c[d>>1]=parseInt(a.substr(d,2),16);return c}function h(a){return f(atob(a))}function i(a,b){b=!!b;for(var c=a.length,d=new Array(c),e=0,f=0;c>e;e++){var g=a[e];if(!b||128>g)d[f++]=g;else if(g>=192&&224>g&&c>e+1)d[f++]=(31&g)<<6|63&a[++e];else if(g>=224&&240>g&&c>e+2)d[f++]=(15&g)<<12|(63&a[++e])<<6|63&a[++e];else{if(!(g>=240&&248>g&&c>e+3))throw new Error("Malformed UTF8 character at byte offset "+e);var h=(7&g)<<18|(63&a[++e])<<12|(63&a[++e])<<6|63&a[++e];65535>=h?d[f++]=h:(h^=65536,d[f++]=55296|h>>10,d[f++]=56320|1023&h)}}for(var i="",j=16384,e=0;f>e;e+=j)i+=String.fromCharCode.apply(String,d.slice(e,f>=e+j?e+j:f));return i}function j(a){for(var b="",c=0;c>>1,a|=a>>>2,a|=a>>>4,a|=a>>>8,a|=a>>>16,a+=1}function m(a){return"number"==typeof a}function n(a){return"string"==typeof a}function o(a){return a instanceof ArrayBuffer}function p(a){return a instanceof Uint8Array}function q(a){return a instanceof Int8Array||a instanceof Uint8Array||a instanceof Int16Array||a instanceof Uint16Array||a instanceof Int32Array||a instanceof Uint32Array||a instanceof Float32Array||a instanceof Float64Array}function r(a,b){var c=b.heap,d=c?c.byteLength:b.heapSize||65536;if(4095&d||0>=d)throw new Error("heap size must be a positive integer and a multiple of 4096");return c=c||new a(new ArrayBuffer(d))}function s(a,b,c,d,e){var f=a.length-b,g=e>f?f:e;return a.set(c.subarray(d,d+g),b),g}function t(a){a=a||{},this.heap=r(Uint8Array,a).subarray(Xa.HEAP_DATA),this.asm=a.asm||Xa(b,null,this.heap.buffer),this.mode=null,this.key=null,this.reset(a)}function u(a){if(void 0!==a){if(o(a)||p(a))a=new Uint8Array(a);else{if(!n(a))throw new TypeError("unexpected key type");a=f(a)}var b=a.length;if(16!==b&&24!==b&&32!==b)throw new d("illegal key size");var c=new DataView(a.buffer,a.byteOffset,a.byteLength);this.asm.set_key(b>>2,c.getUint32(0),c.getUint32(4),c.getUint32(8),c.getUint32(12),b>16?c.getUint32(16):0,b>16?c.getUint32(20):0,b>24?c.getUint32(24):0,b>24?c.getUint32(28):0),this.key=a}else if(!this.key)throw new Error("key is required")}function v(a){if(void 0!==a){if(o(a)||p(a))a=new Uint8Array(a);else{if(!n(a))throw new TypeError("unexpected iv type");a=f(a)}if(16!==a.length)throw new d("illegal iv size");var b=new DataView(a.buffer,a.byteOffset,a.byteLength);this.iv=a,this.asm.set_iv(b.getUint32(0),b.getUint32(4),b.getUint32(8),b.getUint32(12))}else this.iv=null,this.asm.set_iv(0,0,0,0)}function w(a){void 0!==a?this.padding=!!a:this.padding=!0}function x(a){return a=a||{},this.result=null,this.pos=0,this.len=0,u.call(this,a.key),this.hasOwnProperty("iv")&&v.call(this,a.iv),this.hasOwnProperty("padding")&&w.call(this,a.padding),this}function y(a){if(n(a)&&(a=f(a)),o(a)&&(a=new Uint8Array(a)),!p(a))throw new TypeError("data isn't of expected type");for(var b=this.asm,c=this.heap,d=Xa.ENC[this.mode],e=Xa.HEAP_DATA,g=this.pos,h=this.len,i=0,j=a.length||0,k=0,l=h+j&-16,m=0,q=new Uint8Array(l);j>0;)m=s(c,g+h,a,i,j),h+=m,i+=m,j-=m,m=b.cipher(d,e+g,h),m&&q.set(c.subarray(g,g+m),k),k+=m,h>m?(g+=m,h-=m):(g=0,h=0);return this.result=q,this.pos=g,this.len=h,this}function z(a){var b=null,c=0;void 0!==a&&(b=y.call(this,a).result,c=b.length);var e=this.asm,f=this.heap,g=Xa.ENC[this.mode],h=Xa.HEAP_DATA,i=this.pos,j=this.len,k=16-j%16,l=j;if(this.hasOwnProperty("padding")){if(this.padding){for(var m=0;k>m;++m)f[i+j+m]=k;j+=k,l=j}else if(j%16)throw new d("data length must be a multiple of the block size")}else j+=k;var n=new Uint8Array(c+l);return c&&n.set(b),j&&e.cipher(g,h+i,j),l&&n.set(f.subarray(i,i+l),c),this.result=n,this.pos=0,this.len=0,this}function A(a){this.nonce=null,this.counter=0,this.counterSize=0,t.call(this,a),this.mode="CTR"}function B(a){A.call(this,a)}function C(a,b,c){if(void 0!==c){if(8>c||c>48)throw new d("illegal counter size");this.counterSize=c;var e=Math.pow(2,c)-1;this.asm.set_mask(0,0,e/4294967296|0,0|e)}else this.counterSize=c=48,this.asm.set_mask(0,0,65535,4294967295);if(void 0===a)throw new Error("nonce is required");if(o(a)||p(a))a=new Uint8Array(a);else{if(!n(a))throw new TypeError("unexpected nonce type");a=f(a)}var g=a.length;if(!g||g>16)throw new d("illegal nonce size");this.nonce=a;var h=new DataView(new ArrayBuffer(16));if(new Uint8Array(h.buffer).set(a),this.asm.set_nonce(h.getUint32(0),h.getUint32(4),h.getUint32(8),h.getUint32(12)),void 0!==b){if(!m(b))throw new TypeError("unexpected counter type");if(0>b||b>=Math.pow(2,c))throw new d("illegal counter value");this.counter=b,this.asm.set_counter(0,0,b/4294967296|0,0|b)}else this.counter=b=0}function D(a){return a=a||{},x.call(this,a),C.call(this,a.nonce,a.counter,a.counterSize),this}function E(a){for(var b=this.heap,c=this.asm,d=0,e=a.length||0,f=0;e>0;){for(f=s(b,0,a,d,e),d+=f,e-=f;15&f;)b[f++]=0;c.mac(Xa.MAC.GCM,Xa.HEAP_DATA,f)}}function F(a){this.nonce=null,this.adata=null,this.iv=null,this.counter=1,this.tagSize=16,t.call(this,a),this.mode="GCM"}function G(a){F.call(this,a)}function H(a){F.call(this,a)}function I(a){a=a||{},x.call(this,a);var b=this.asm,c=this.heap;b.gcm_init();var e=a.tagSize;if(void 0!==e){if(!m(e))throw new TypeError("tagSize must be a number");if(4>e||e>16)throw new d("illegal tagSize value");this.tagSize=e}else this.tagSize=16;var g=a.nonce;if(void 0===g)throw new Error("nonce is required");if(p(g)||o(g))g=new Uint8Array(g);else{if(!n(g))throw new TypeError("unexpected nonce type");g=f(g)}this.nonce=g;var h=g.length||0,i=new Uint8Array(16);12!==h?(E.call(this,g),c[0]=c[1]=c[2]=c[3]=c[4]=c[5]=c[6]=c[7]=c[8]=c[9]=c[10]=0,c[11]=h>>>29,c[12]=h>>>21&255,c[13]=h>>>13&255,c[14]=h>>>5&255,c[15]=h<<3&255,b.mac(Xa.MAC.GCM,Xa.HEAP_DATA,16),b.get_iv(Xa.HEAP_DATA),b.set_iv(),i.set(c.subarray(0,16))):(i.set(g),i[15]=1);var j=new DataView(i.buffer);this.gamma0=j.getUint32(12),b.set_nonce(j.getUint32(0),j.getUint32(4),j.getUint32(8),0),b.set_mask(0,0,0,4294967295);var k=a.adata;if(void 0!==k&&null!==k){if(p(k)||o(k))k=new Uint8Array(k);else{if(!n(k))throw new TypeError("unexpected adata type");k=f(k)}if(k.length>$a)throw new d("illegal adata length");k.length?(this.adata=k,E.call(this,k)):this.adata=null}else this.adata=null;var l=a.counter;if(void 0!==l){if(!m(l))throw new TypeError("counter must be a number");if(1>l||l>4294967295)throw new RangeError("counter must be a positive 32-bit integer");this.counter=l,b.set_counter(0,0,0,this.gamma0+l|0)}else this.counter=1,b.set_counter(0,0,0,this.gamma0+1|0);var q=a.iv;if(void 0!==q){if(!m(l))throw new TypeError("counter must be a number");this.iv=q,v.call(this,q)}return this}function J(a){if(n(a)&&(a=f(a)),o(a)&&(a=new Uint8Array(a)),!p(a))throw new TypeError("data isn't of expected type");var b=0,c=a.length||0,d=this.asm,e=this.heap,g=this.counter,h=this.pos,i=this.len,j=0,k=i+c&-16,l=0;if((g-1<<4)+i+c>$a)throw new RangeError("counter overflow");for(var m=new Uint8Array(k);c>0;)l=s(e,h+i,a,b,c),i+=l,b+=l,c-=l,l=d.cipher(Xa.ENC.CTR,Xa.HEAP_DATA+h,i),l=d.mac(Xa.MAC.GCM,Xa.HEAP_DATA+h,l),l&&m.set(e.subarray(h,h+l),j),g+=l>>>4,j+=l,i>l?(h+=l,i-=l):(h=0,i=0);return this.result=m,this.counter=g,this.pos=h,this.len=i,this}function K(){var a=this.asm,b=this.heap,c=this.counter,d=this.tagSize,e=this.adata,f=this.pos,g=this.len,h=new Uint8Array(g+d);a.cipher(Xa.ENC.CTR,Xa.HEAP_DATA+f,g+15&-16),g&&h.set(b.subarray(f,f+g));for(var i=g;15&i;i++)b[f+i]=0;a.mac(Xa.MAC.GCM,Xa.HEAP_DATA+f,i);var j=null!==e?e.length:0,k=(c-1<<4)+g;return b[0]=b[1]=b[2]=0,b[3]=j>>>29,b[4]=j>>>21,b[5]=j>>>13&255,b[6]=j>>>5&255,b[7]=j<<3&255,b[8]=b[9]=b[10]=0,b[11]=k>>>29,b[12]=k>>>21&255,b[13]=k>>>13&255,b[14]=k>>>5&255,b[15]=k<<3&255,a.mac(Xa.MAC.GCM,Xa.HEAP_DATA,16),a.get_iv(Xa.HEAP_DATA),a.set_counter(0,0,0,this.gamma0),a.cipher(Xa.ENC.CTR,Xa.HEAP_DATA,16),h.set(b.subarray(0,d),g),this.result=h,this.counter=1,this.pos=0,this.len=0,this}function L(a){var b=J.call(this,a).result,c=K.call(this).result,d=new Uint8Array(b.length+c.length);return b.length&&d.set(b),c.length&&d.set(c,b.length),this.result=d,this}function M(a){if(n(a)&&(a=f(a)),o(a)&&(a=new Uint8Array(a)),!p(a))throw new TypeError("data isn't of expected type");var b=0,c=a.length||0,d=this.asm,e=this.heap,g=this.counter,h=this.tagSize,i=this.pos,j=this.len,k=0,l=j+c>h?j+c-h&-16:0,m=j+c-l,q=0;if((g-1<<4)+j+c>$a)throw new RangeError("counter overflow");for(var r=new Uint8Array(l);c>m;)q=s(e,i+j,a,b,c-m),j+=q,b+=q,c-=q,q=d.mac(Xa.MAC.GCM,Xa.HEAP_DATA+i,q),q=d.cipher(Xa.DEC.CTR,Xa.HEAP_DATA+i,q),q&&r.set(e.subarray(i,i+q),k),g+=q>>>4,k+=q,i=0,j=0;return c>0&&(j+=s(e,0,a,b,c)),this.result=r,this.counter=g,this.pos=i,this.len=j,this}function N(){var a=this.asm,b=this.heap,d=this.tagSize,f=this.adata,g=this.counter,h=this.pos,i=this.len,j=i-d,k=0;if(d>i)throw new c("authentication tag not found");for(var l=new Uint8Array(j),m=new Uint8Array(b.subarray(h+j,h+i)),n=j;15&n;n++)b[h+n]=0;k=a.mac(Xa.MAC.GCM,Xa.HEAP_DATA+h,n),k=a.cipher(Xa.DEC.CTR,Xa.HEAP_DATA+h,n),j&&l.set(b.subarray(h,h+j));var o=null!==f?f.length:0,p=(g-1<<4)+i-d;b[0]=b[1]=b[2]=0,b[3]=o>>>29,b[4]=o>>>21,b[5]=o>>>13&255,b[6]=o>>>5&255,b[7]=o<<3&255,b[8]=b[9]=b[10]=0,b[11]=p>>>29,b[12]=p>>>21&255,b[13]=p>>>13&255,b[14]=p>>>5&255,b[15]=p<<3&255,a.mac(Xa.MAC.GCM,Xa.HEAP_DATA,16),a.get_iv(Xa.HEAP_DATA),a.set_counter(0,0,0,this.gamma0),a.cipher(Xa.ENC.CTR,Xa.HEAP_DATA,16);for(var q=0,n=0;d>n;++n)q|=m[n]^b[n];if(q)throw new e("data integrity check failed");return this.result=l,this.counter=1,this.pos=0,this.len=0,this}function O(a){var b=M.call(this,a).result,c=N.call(this).result,d=new Uint8Array(b.length+c.length);return b.length&&d.set(b),c.length&&d.set(c,b.length),this.result=d,this}function P(a,b,c,d,e){if(void 0===a)throw new SyntaxError("data required");if(void 0===b)throw new SyntaxError("key required");if(void 0===c)throw new SyntaxError("nonce required");return new F({heap:cb,asm:db,key:b,nonce:c,adata:d,tagSize:e}).encrypt(a).result}function Q(a,b,c,d,e){if(void 0===a)throw new SyntaxError("data required");if(void 0===b)throw new SyntaxError("key required");if(void 0===c)throw new SyntaxError("nonce required");return new F({heap:cb,asm:db,key:b,nonce:c,adata:d,tagSize:e}).decrypt(a).result}function R(){return this.result=null,this.pos=0,this.len=0,this.asm.reset(),this}function S(a){if(null!==this.result)throw new c("state must be reset before processing new data");if(n(a)&&(a=f(a)),o(a)&&(a=new Uint8Array(a)),!p(a))throw new TypeError("data isn't of expected type");for(var b=this.asm,d=this.heap,e=this.pos,g=this.len,h=0,i=a.length,j=0;i>0;)j=s(d,e+g,a,h,i),g+=j,h+=j,i-=j,j=b.process(e,g),e+=j,g-=j,g||(e=0);return this.pos=e,this.len=g,this}function T(){if(null!==this.result)throw new c("state must be reset before processing new data");return this.asm.finish(this.pos,this.len,0),this.result=new Uint8Array(this.HASH_SIZE),this.result.set(this.heap.subarray(0,this.HASH_SIZE)),this.pos=0,this.len=0,this}function U(a,b,c){"use asm";var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;var n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;var D=new a.Uint8Array(c);function E(Q,R,S,T,U,V,W,X,Y,Z,$,_,aa,ba,ca,da){Q=Q|0;R=R|0;S=S|0;T=T|0;U=U|0;V=V|0;W=W|0;X=X|0;Y=Y|0;Z=Z|0;$=$|0;_=_|0;aa=aa|0;ba=ba|0;ca=ca|0;da=da|0;var ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0;ea=d;fa=e;ga=f;ha=g;ia=h;ja=i;ka=j;la=k;ma=Q+la+(ia>>>6^ia>>>11^ia>>>25^ia<<26^ia<<21^ia<<7)+(ka^ia&(ja^ka))+1116352408|0;la=ka;ka=ja;ja=ia;ia=ha+ma|0;ha=ga;ga=fa;fa=ea;ea=ma+(fa&ga^ha&(fa^ga))+(fa>>>2^fa>>>13^fa>>>22^fa<<30^fa<<19^fa<<10)|0;ma=R+la+(ia>>>6^ia>>>11^ia>>>25^ia<<26^ia<<21^ia<<7)+(ka^ia&(ja^ka))+1899447441|0;la=ka;ka=ja;ja=ia;ia=ha+ma|0;ha=ga;ga=fa;fa=ea;ea=ma+(fa&ga^ha&(fa^ga))+(fa>>>2^fa>>>13^fa>>>22^fa<<30^fa<<19^fa<<10)|0;ma=S+la+(ia>>>6^ia>>>11^ia>>>25^ia<<26^ia<<21^ia<<7)+(ka^ia&(ja^ka))+3049323471|0;la=ka;ka=ja;ja=ia;ia=ha+ma|0;ha=ga;ga=fa;fa=ea;ea=ma+(fa&ga^ha&(fa^ga))+(fa>>>2^fa>>>13^fa>>>22^fa<<30^fa<<19^fa<<10)|0;ma=T+la+(ia>>>6^ia>>>11^ia>>>25^ia<<26^ia<<21^ia<<7)+(ka^ia&(ja^ka))+3921009573|0;la=ka;ka=ja;ja=ia;ia=ha+ma|0;ha=ga;ga=fa;fa=ea;ea=ma+(fa&ga^ha&(fa^ga))+(fa>>>2^fa>>>13^fa>>>22^fa<<30^fa<<19^fa<<10)|0;ma=U+la+(ia>>>6^ia>>>11^ia>>>25^ia<<26^ia<<21^ia<<7)+(ka^ia&(ja^ka))+961987163|0;la=ka;ka=ja;ja=ia;ia=ha+ma|0;ha=ga;ga=fa;fa=ea;ea=ma+(fa&ga^ha&(fa^ga))+(fa>>>2^fa>>>13^fa>>>22^fa<<30^fa<<19^fa<<10)|0;ma=V+la+(ia>>>6^ia>>>11^ia>>>25^ia<<26^ia<<21^ia<<7)+(ka^ia&(ja^ka))+1508970993|0;la=ka;ka=ja;ja=ia;ia=ha+ma|0;ha=ga;ga=fa;fa=ea;ea=ma+(fa&ga^ha&(fa^ga))+(fa>>>2^fa>>>13^fa>>>22^fa<<30^fa<<19^fa<<10)|0;ma=W+la+(ia>>>6^ia>>>11^ia>>>25^ia<<26^ia<<21^ia<<7)+(ka^ia&(ja^ka))+2453635748|0;la=ka;ka=ja;ja=ia;ia=ha+ma|0;ha=ga;ga=fa;fa=ea;ea=ma+(fa&ga^ha&(fa^ga))+(fa>>>2^fa>>>13^fa>>>22^fa<<30^fa<<19^fa<<10)|0;ma=X+la+(ia>>>6^ia>>>11^ia>>>25^ia<<26^ia<<21^ia<<7)+(ka^ia&(ja^ka))+2870763221|0;la=ka;ka=ja;ja=ia;ia=ha+ma|0;ha=ga;ga=fa;fa=ea;ea=ma+(fa&ga^ha&(fa^ga))+(fa>>>2^fa>>>13^fa>>>22^fa<<30^fa<<19^fa<<10)|0;ma=Y+la+(ia>>>6^ia>>>11^ia>>>25^ia<<26^ia<<21^ia<<7)+(ka^ia&(ja^ka))+3624381080|0;la=ka;ka=ja;ja=ia;ia=ha+ma|0;ha=ga;ga=fa;fa=ea;ea=ma+(fa&ga^ha&(fa^ga))+(fa>>>2^fa>>>13^fa>>>22^fa<<30^fa<<19^fa<<10)|0;ma=Z+la+(ia>>>6^ia>>>11^ia>>>25^ia<<26^ia<<21^ia<<7)+(ka^ia&(ja^ka))+310598401|0;la=ka;ka=ja;ja=ia;ia=ha+ma|0;ha=ga;ga=fa;fa=ea;ea=ma+(fa&ga^ha&(fa^ga))+(fa>>>2^fa>>>13^fa>>>22^fa<<30^fa<<19^fa<<10)|0;ma=$+la+(ia>>>6^ia>>>11^ia>>>25^ia<<26^ia<<21^ia<<7)+(ka^ia&(ja^ka))+607225278|0;la=ka;ka=ja;ja=ia;ia=ha+ma|0;ha=ga;ga=fa;fa=ea;ea=ma+(fa&ga^ha&(fa^ga))+(fa>>>2^fa>>>13^fa>>>22^fa<<30^fa<<19^fa<<10)|0;ma=_+la+(ia>>>6^ia>>>11^ia>>>25^ia<<26^ia<<21^ia<<7)+(ka^ia&(ja^ka))+1426881987|0;la=ka;ka=ja;ja=ia;ia=ha+ma|0;ha=ga;ga=fa;fa=ea;ea=ma+(fa&ga^ha&(fa^ga))+(fa>>>2^fa>>>13^fa>>>22^fa<<30^fa<<19^fa<<10)|0;ma=aa+la+(ia>>>6^ia>>>11^ia>>>25^ia<<26^ia<<21^ia<<7)+(ka^ia&(ja^ka))+1925078388|0;la=ka;ka=ja;ja=ia;ia=ha+ma|0;ha=ga;ga=fa;fa=ea;ea=ma+(fa&ga^ha&(fa^ga))+(fa>>>2^fa>>>13^fa>>>22^fa<<30^fa<<19^fa<<10)|0;ma=ba+la+(ia>>>6^ia>>>11^ia>>>25^ia<<26^ia<<21^ia<<7)+(ka^ia&(ja^ka))+2162078206|0;la=ka;ka=ja;ja=ia;ia=ha+ma|0;ha=ga;ga=fa;fa=ea;ea=ma+(fa&ga^ha&(fa^ga))+(fa>>>2^fa>>>13^fa>>>22^fa<<30^fa<<19^fa<<10)|0;ma=ca+la+(ia>>>6^ia>>>11^ia>>>25^ia<<26^ia<<21^ia<<7)+(ka^ia&(ja^ka))+2614888103|0;la=ka;ka=ja;ja=ia;ia=ha+ma|0;ha=ga;ga=fa;fa=ea;ea=ma+(fa&ga^ha&(fa^ga))+(fa>>>2^fa>>>13^fa>>>22^fa<<30^fa<<19^fa<<10)|0;ma=da+la+(ia>>>6^ia>>>11^ia>>>25^ia<<26^ia<<21^ia<<7)+(ka^ia&(ja^ka))+3248222580|0;la=ka;ka=ja;ja=ia;ia=ha+ma|0;ha=ga;ga=fa;fa=ea;ea=ma+(fa&ga^ha&(fa^ga))+(fa>>>2^fa>>>13^fa>>>22^fa<<30^fa<<19^fa<<10)|0;Q=ma=(R>>>7^R>>>18^R>>>3^R<<25^R<<14)+(ca>>>17^ca>>>19^ca>>>10^ca<<15^ca<<13)+Q+Z|0;ma=ma+la+(ia>>>6^ia>>>11^ia>>>25^ia<<26^ia<<21^ia<<7)+(ka^ia&(ja^ka))+3835390401|0;la=ka;ka=ja;ja=ia;ia=ha+ma|0;ha=ga;ga=fa;fa=ea;ea=ma+(fa&ga^ha&(fa^ga))+(fa>>>2^fa>>>13^fa>>>22^fa<<30^fa<<19^fa<<10)|0;R=ma=(S>>>7^S>>>18^S>>>3^S<<25^S<<14)+(da>>>17^da>>>19^da>>>10^da<<15^da<<13)+R+$|0;ma=ma+la+(ia>>>6^ia>>>11^ia>>>25^ia<<26^ia<<21^ia<<7)+(ka^ia&(ja^ka))+4022224774|0;la=ka;ka=ja;ja=ia;ia=ha+ma|0;ha=ga;ga=fa;fa=ea;ea=ma+(fa&ga^ha&(fa^ga))+(fa>>>2^fa>>>13^fa>>>22^fa<<30^fa<<19^fa<<10)|0;S=ma=(T>>>7^T>>>18^T>>>3^T<<25^T<<14)+(Q>>>17^Q>>>19^Q>>>10^Q<<15^Q<<13)+S+_|0;ma=ma+la+(ia>>>6^ia>>>11^ia>>>25^ia<<26^ia<<21^ia<<7)+(ka^ia&(ja^ka))+264347078|0;la=ka;ka=ja;ja=ia;ia=ha+ma|0;ha=ga;ga=fa;fa=ea;ea=ma+(fa&ga^ha&(fa^ga))+(fa>>>2^fa>>>13^fa>>>22^fa<<30^fa<<19^fa<<10)|0;T=ma=(U>>>7^U>>>18^U>>>3^U<<25^U<<14)+(R>>>17^R>>>19^R>>>10^R<<15^R<<13)+T+aa|0;ma=ma+la+(ia>>>6^ia>>>11^ia>>>25^ia<<26^ia<<21^ia<<7)+(ka^ia&(ja^ka))+604807628|0;la=ka;ka=ja;ja=ia;ia=ha+ma|0;ha=ga;ga=fa;fa=ea;ea=ma+(fa&ga^ha&(fa^ga))+(fa>>>2^fa>>>13^fa>>>22^fa<<30^fa<<19^fa<<10)|0;U=ma=(V>>>7^V>>>18^V>>>3^V<<25^V<<14)+(S>>>17^S>>>19^S>>>10^S<<15^S<<13)+U+ba|0;ma=ma+la+(ia>>>6^ia>>>11^ia>>>25^ia<<26^ia<<21^ia<<7)+(ka^ia&(ja^ka))+770255983|0;la=ka;ka=ja;ja=ia;ia=ha+ma|0;ha=ga;ga=fa;fa=ea;ea=ma+(fa&ga^ha&(fa^ga))+(fa>>>2^fa>>>13^fa>>>22^fa<<30^fa<<19^fa<<10)|0;V=ma=(W>>>7^W>>>18^W>>>3^W<<25^W<<14)+(T>>>17^T>>>19^T>>>10^T<<15^T<<13)+V+ca|0;ma=ma+la+(ia>>>6^ia>>>11^ia>>>25^ia<<26^ia<<21^ia<<7)+(ka^ia&(ja^ka))+1249150122|0;la=ka;ka=ja;ja=ia;ia=ha+ma|0;ha=ga;ga=fa;fa=ea;ea=ma+(fa&ga^ha&(fa^ga))+(fa>>>2^fa>>>13^fa>>>22^fa<<30^fa<<19^fa<<10)|0;W=ma=(X>>>7^X>>>18^X>>>3^X<<25^X<<14)+(U>>>17^U>>>19^U>>>10^U<<15^U<<13)+W+da|0;ma=ma+la+(ia>>>6^ia>>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+la+(ia>>>6^ia>>>11^ia>>>25^ia<<26^ia<<21^ia<<7)+(ka^ia&(ja^ka))+2952996808|0;la=ka;ka=ja;ja=ia;ia=ha+ma|0;ha=ga;ga=fa;fa=ea;ea=ma+(fa&ga^ha&(fa^ga))+(fa>>>2^fa>>>13^fa>>>22^fa<<30^fa<<19^fa<<10)|0;_=ma=(aa>>>7^aa>>>18^aa>>>3^aa<<25^aa<<14)+(Z>>>17^Z>>>19^Z>>>10^Z<<15^Z<<13)+_+U|0;ma=ma+la+(ia>>>6^ia>>>11^ia>>>25^ia<<26^ia<<21^ia<<7)+(ka^ia&(ja^ka))+3210313671|0;la=ka;ka=ja;ja=ia;ia=ha+ma|0;ha=ga;ga=fa;fa=ea;ea=ma+(fa&ga^ha&(fa^ga))+(fa>>>2^fa>>>13^fa>>>22^fa<<30^fa<<19^fa<<10)|0;aa=ma=(ba>>>7^ba>>>18^ba>>>3^ba<<25^ba<<14)+($>>>17^$>>>19^$>>>10^$<<15^$<<13)+aa+V|0;ma=ma+la+(ia>>>6^ia>>>11^ia>>>25^ia<<26^ia<<21^ia<<7)+(ka^ia&(ja^ka))+3336571891|0;la=ka;ka=ja;ja=ia;ia=ha+ma|0;ha=ga;ga=fa;fa=ea;ea=ma+(fa&ga^ha&(fa^ga))+(fa>>>2^fa>>>13^fa>>>22^fa<<30^fa<<19^fa<<10)|0;ba=ma=(ca>>>7^ca>>>18^ca>>>3^ca<<25^ca<<14)+(_>>>17^_>>>19^_>>>10^_<<15^_<<13)+ba+W|0;ma=ma+la+(ia>>>6^ia>>>11^ia>>>25^ia<<26^ia<<21^ia<<7)+(ka^ia&(ja^ka))+3584528711|0;la=ka;ka=ja;ja=ia;ia=ha+ma|0;ha=ga;ga=fa;fa=ea;ea=ma+(fa&ga^ha&(fa^ga))+(fa>>>2^fa>>>13^fa>>>22^fa<<30^fa<<19^fa<<10)|0;ca=ma=(da>>>7^da>>>18^da>>>3^da<<25^da<<14)+(aa>>>17^aa>>>19^aa>>>10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>>17^Q>>>19^Q>>>10^Q<<15^Q<<13)+S+_|0;ma=ma+la+(ia>>>6^ia>>>11^ia>>>25^ia<<26^ia<<21^ia<<7)+(ka^ia&(ja^ka))+1294757372|0;la=ka;ka=ja;ja=ia;ia=ha+ma|0;ha=ga;ga=fa;fa=ea;ea=ma+(fa&ga^ha&(fa^ga))+(fa>>>2^fa>>>13^fa>>>22^fa<<30^fa<<19^fa<<10)|0;T=ma=(U>>>7^U>>>18^U>>>3^U<<25^U<<14)+(R>>>17^R>>>19^R>>>10^R<<15^R<<13)+T+aa|0;ma=ma+la+(ia>>>6^ia>>>11^ia>>>25^ia<<26^ia<<21^ia<<7)+(ka^ia&(ja^ka))+1396182291|0;la=ka;ka=ja;ja=ia;ia=ha+ma|0;ha=ga;ga=fa;fa=ea;ea=ma+(fa&ga^ha&(fa^ga))+(fa>>>2^fa>>>13^fa>>>22^fa<<30^fa<<19^fa<<10)|0;U=ma=(V>>>7^V>>>18^V>>>3^V<<25^V<<14)+(S>>>17^S>>>19^S>>>10^S<<15^S<<13)+U+ba|0;ma=ma+la+(ia>>>6^ia>>>11^ia>>>25^ia<<26^ia<<21^ia<<7)+(ka^ia&(ja^ka))+1695183700|0;la=ka;ka=ja;ja=ia;ia=ha+ma|0;ha=ga;ga=fa;fa=ea;ea=ma+(fa&ga^ha&(fa^ga))+(fa>>>2^fa>>>13^fa>>>22^fa<<30^fa<<19^fa<<10)|0;V=ma=(W>>>7^W>>>18^W>>>3^W<<25^W<<14)+(T>>>17^T>>>19^T>>>10^T<<15^T<<13)+V+ca|0;ma=ma+la+(ia>>>6^ia>>>11^ia>>>25^ia<<26^ia<<21^ia<<7)+(ka^ia&(ja^ka))+1986661051|0;la=ka;ka=ja;ja=ia;ia=ha+ma|0;ha=ga;ga=fa;fa=ea;ea=ma+(fa&ga^ha&(fa^ga))+(fa>>>2^fa>>>13^fa>>>22^fa<<30^fa<<19^fa<<10)|0;W=ma=(X>>>7^X>>>18^X>>>3^X<<25^X<<14)+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ca=ma=(da>>>7^da>>>18^da>>>3^da<<25^da<<14)+(aa>>>17^aa>>>19^aa>>>10^aa<<15^aa<<13)+ca+X|0;ma=ma+la+(ia>>>6^ia>>>11^ia>>>25^ia<<26^ia<<21^ia<<7)+(ka^ia&(ja^ka))+4094571909|0;la=ka;ka=ja;ja=ia;ia=ha+ma|0;ha=ga;ga=fa;fa=ea;ea=ma+(fa&ga^ha&(fa^ga))+(fa>>>2^fa>>>13^fa>>>22^fa<<30^fa<<19^fa<<10)|0;da=ma=(Q>>>7^Q>>>18^Q>>>3^Q<<25^Q<<14)+(ba>>>17^ba>>>19^ba>>>10^ba<<15^ba<<13)+da+Y|0;ma=ma+la+(ia>>>6^ia>>>11^ia>>>25^ia<<26^ia<<21^ia<<7)+(ka^ia&(ja^ka))+275423344|0;la=ka;ka=ja;ja=ia;ia=ha+ma|0;ha=ga;ga=fa;fa=ea;ea=ma+(fa&ga^ha&(fa^ga))+(fa>>>2^fa>>>13^fa>>>22^fa<<30^fa<<19^fa<<10)|0;Q=ma=(R>>>7^R>>>18^R>>>3^R<<25^R<<14)+(ca>>>17^ca>>>19^ca>>>10^ca<<15^ca<<13)+Q+Z|0;ma=ma+la+(ia>>>6^ia>>>11^ia>>>25^ia<<26^ia<<21^ia<<7)+(ka^ia&(ja^ka))+430227734|0;la=ka;ka=ja;ja=ia;ia=ha+ma|0;ha=ga;ga=fa;fa=ea;ea=ma+(fa&ga^ha&(fa^ga))+(fa>>>2^fa>>>13^fa>>>22^fa<<30^fa<<19^fa<<10)|0;R=ma=(S>>>7^S>>>18^S>>>3^S<<25^S<<14)+(da>>>17^da>>>19^da>>>10^da<<15^da<<13)+R+$|0;ma=ma+la+(ia>>>6^ia>>>11^ia>>>25^ia<<26^ia<<21^ia<<7)+(ka^ia&(ja^ka))+506948616|0;la=ka;ka=ja;ja=ia;ia=ha+ma|0;ha=ga;ga=fa;fa=ea;ea=ma+(fa&ga^ha&(fa^ga))+(fa>>>2^fa>>>13^fa>>>22^fa<<30^fa<<19^fa<<10)|0;S=ma=(T>>>7^T>>>18^T>>>3^T<<25^T<<14)+(Q>>>17^Q>>>19^Q>>>10^Q<<15^Q<<13)+S+_|0;ma=ma+la+(ia>>>6^ia>>>11^ia>>>25^ia<<26^ia<<21^ia<<7)+(ka^ia&(ja^ka))+659060556|0;la=ka;ka=ja;ja=ia;ia=ha+ma|0;ha=ga;ga=fa;fa=ea;ea=ma+(fa&ga^ha&(fa^ga))+(fa>>>2^fa>>>13^fa>>>22^fa<<30^fa<<19^fa<<10)|0;T=ma=(U>>>7^U>>>18^U>>>3^U<<25^U<<14)+(R>>>17^R>>>19^R>>>10^R<<15^R<<13)+T+aa|0;ma=ma+la+(ia>>>6^ia>>>11^ia>>>25^ia<<26^ia<<21^ia<<7)+(ka^ia&(ja^ka))+883997877|0;la=ka;ka=ja;ja=ia;ia=ha+ma|0;ha=ga;ga=fa;fa=ea;ea=ma+(fa&ga^ha&(fa^ga))+(fa>>>2^fa>>>13^fa>>>22^fa<<30^fa<<19^fa<<10)|0;U=ma=(V>>>7^V>>>18^V>>>3^V<<25^V<<14)+(S>>>17^S>>>19^S>>>10^S<<15^S<<13)+U+ba|0;ma=ma+la+(ia>>>6^ia>>>11^ia>>>25^ia<<26^ia<<21^ia<<7)+(ka^ia&(ja^ka))+958139571|0;la=ka;ka=ja;ja=ia;ia=ha+ma|0;ha=ga;ga=fa;fa=ea;ea=ma+(fa&ga^ha&(fa^ga))+(fa>>>2^fa>>>13^fa>>>22^fa<<30^fa<<19^fa<<10)|0;V=ma=(W>>>7^W>>>18^W>>>3^W<<25^W<<14)+(T>>>17^T>>>19^T>>>10^T<<15^T<<13)+V+ca|0;ma=ma+la+(ia>>>6^ia>>>11^ia>>>25^ia<<26^ia<<21^ia<<7)+(ka^ia&(ja^ka))+1322822218|0;la=ka;ka=ja;ja=ia;ia=ha+ma|0;ha=ga;ga=fa;fa=ea;ea=ma+(fa&ga^ha&(fa^ga))+(fa>>>2^fa>>>13^fa>>>22^fa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q|35],D[Q|36]<<24|D[Q|37]<<16|D[Q|38]<<8|D[Q|39],D[Q|40]<<24|D[Q|41]<<16|D[Q|42]<<8|D[Q|43],D[Q|44]<<24|D[Q|45]<<16|D[Q|46]<<8|D[Q|47],D[Q|48]<<24|D[Q|49]<<16|D[Q|50]<<8|D[Q|51],D[Q|52]<<24|D[Q|53]<<16|D[Q|54]<<8|D[Q|55],D[Q|56]<<24|D[Q|57]<<16|D[Q|58]<<8|D[Q|59],D[Q|60]<<24|D[Q|61]<<16|D[Q|62]<<8|D[Q|63])}function G(Q){Q=Q|0;D[Q|0]=d>>>24;D[Q|1]=d>>>16&255;D[Q|2]=d>>>8&255;D[Q|3]=d&255;D[Q|4]=e>>>24;D[Q|5]=e>>>16&255;D[Q|6]=e>>>8&255;D[Q|7]=e&255;D[Q|8]=f>>>24;D[Q|9]=f>>>16&255;D[Q|10]=f>>>8&255;D[Q|11]=f&255;D[Q|12]=g>>>24;D[Q|13]=g>>>16&255;D[Q|14]=g>>>8&255;D[Q|15]=g&255;D[Q|16]=h>>>24;D[Q|17]=h>>>16&255;D[Q|18]=h>>>8&255;D[Q|19]=h&255;D[Q|20]=i>>>24;D[Q|21]=i>>>16&255;D[Q|22]=i>>>8&255;D[Q|23]=i&255;D[Q|24]=j>>>24;D[Q|25]=j>>>16&255;D[Q|26]=j>>>8&255;D[Q|27]=j&255;D[Q|28]=k>>>24;D[Q|29]=k>>>16&255;D[Q|30]=k>>>8&255;D[Q|31]=k&255}function H(){d=1779033703;e=3144134277;f=1013904242;g=2773480762;h=1359893119;i=2600822924;j=528734635;k=1541459225;l=m=0}function I(Q,R,S,T,U,V,W,X,Y,Z){Q=Q|0;R=R|0;S=S|0;T=T|0;U=U|0;V=V|0;W=W|0;X=X|0;Y=Y|0;Z=Z|0;d=Q;e=R;f=S;g=T;h=U;i=V;j=W;k=X;l=Y;m=Z}function J(Q,R){Q=Q|0;R=R|0;var S=0;if(Q&63)return-1;while((R|0)>=64){F(Q);Q=Q+64|0;R=R-64|0;S=S+64|0}l=l+S|0;if(l>>>0>>0)m=m+1|0;return S|0}function K(Q,R,S){Q=Q|0;R=R|0;S=S|0;var T=0,U=0;if(Q&63)return-1;if(~S)if(S&31)return-1;if((R|0)>=64){T=J(Q,R)|0;if((T|0)==-1)return-1;Q=Q+T|0;R=R-T|0}T=T+R|0;l=l+R|0;if(l>>>0>>0)m=m+1|0;D[Q|R]=128;if((R|0)>=56){for(U=R+1|0;(U|0)<64;U=U+1|0)D[Q|U]=0;F(Q);R=0;D[Q|0]=0}for(U=R+1|0;(U|0)<59;U=U+1|0)D[Q|U]=0;D[Q|56]=m>>>21&255;D[Q|57]=m>>>13&255;D[Q|58]=m>>>5&255;D[Q|59]=m<<3&255|l>>>29;D[Q|60]=l>>>21&255;D[Q|61]=l>>>13&255;D[Q|62]=l>>>5&255;D[Q|63]=l<<3&255;F(Q);if(~S)G(S);return T|0}function L(){d=n;e=o;f=p;g=q;h=r;i=s;j=t;k=u;l=64;m=0}function M(){d=v;e=w;f=x;g=y;h=z;i=A;j=B;k=C;l=64;m=0}function N(Q,R,S,T,U,V,W,X,Y,Z,$,_,aa,ba,ca,da){Q=Q|0;R=R|0;S=S|0;T=T|0;U=U|0;V=V|0;W=W|0;X=X|0;Y=Y|0;Z=Z|0;$=$|0;_=_|0;aa=aa|0;ba=ba|0;ca=ca|0;da=da|0;H();E(Q^1549556828,R^1549556828,S^1549556828,T^1549556828,U^1549556828,V^1549556828,W^1549556828,X^1549556828,Y^1549556828,Z^1549556828,$^1549556828,_^1549556828,aa^1549556828,ba^1549556828,ca^1549556828,da^1549556828);v=d;w=e;x=f;y=g;z=h;A=i;B=j;C=k;H();E(Q^909522486,R^909522486,S^909522486,T^909522486,U^909522486,V^909522486,W^909522486,X^909522486,Y^909522486,Z^909522486,$^909522486,_^909522486,aa^909522486,ba^909522486,ca^909522486,da^909522486); - -n=d;o=e;p=f;q=g;r=h;s=i;t=j;u=k;l=64;m=0}function O(Q,R,S){Q=Q|0;R=R|0;S=S|0;var T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,$=0,_=0;if(Q&63)return-1;if(~S)if(S&31)return-1;_=K(Q,R,-1)|0;T=d,U=e,V=f,W=g,X=h,Y=i,Z=j,$=k;M();E(T,U,V,W,X,Y,Z,$,2147483648,0,0,0,0,0,0,768);if(~S)G(S);return _|0}function P(Q,R,S,T,U){Q=Q|0;R=R|0;S=S|0;T=T|0;U=U|0;var V=0,W=0,X=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0;if(Q&63)return-1;if(~U)if(U&31)return-1;D[Q+R|0]=S>>>24;D[Q+R+1|0]=S>>>16&255;D[Q+R+2|0]=S>>>8&255;D[Q+R+3|0]=S&255;O(Q,R+4|0,-1)|0;V=ba=d,W=ca=e,X=da=f,Y=ea=g,Z=fa=h,$=ga=i,_=ha=j,aa=ia=k;T=T-1|0;while((T|0)>0){L();E(ba,ca,da,ea,fa,ga,ha,ia,2147483648,0,0,0,0,0,0,768);ba=d,ca=e,da=f,ea=g,fa=h,ga=i,ha=j,ia=k;M();E(ba,ca,da,ea,fa,ga,ha,ia,2147483648,0,0,0,0,0,0,768);ba=d,ca=e,da=f,ea=g,fa=h,ga=i,ha=j,ia=k;V=V^d;W=W^e;X=X^f;Y=Y^g;Z=Z^h;$=$^i;_=_^j;aa=aa^k;T=T-1|0}d=V;e=W;f=X;g=Y;h=Z;i=$;j=_;k=aa;if(~U)G(U);return 0}return{reset:H,init:I,process:J,finish:K,hmac_reset:L,hmac_init:N,hmac_finish:O,pbkdf2_generate_block:P}}function V(a){a=a||{},this.heap=r(Uint8Array,a),this.asm=a.asm||U({Uint8Array:Uint8Array},null,this.heap.buffer),this.BLOCK_SIZE=eb,this.HASH_SIZE=fb,this.reset()}function W(){return null===hb&&(hb=new V({heapSize:1048576})),hb}function X(a){if(void 0===a)throw new SyntaxError("data required");return W().reset().process(a).finish().result}function Y(a){var b=X(a);return j(b)}function Z(a){var b=X(a);return k(b)}function $(a){if(a=a||{},!a.hash)throw new SyntaxError("option 'hash' is required");if(!a.hash.HASH_SIZE)throw new SyntaxError("option 'hash' supplied doesn't seem to be a valid hash function");return this.hash=a.hash,this.BLOCK_SIZE=this.hash.BLOCK_SIZE,this.HMAC_SIZE=this.hash.HASH_SIZE,this.key=null,this.verify=null,this.result=null,(void 0!==a.password||void 0!==a.verify)&&this.reset(a),this}function _(a,b){if(o(b)&&(b=new Uint8Array(b)),n(b)&&(b=f(b)),!p(b))throw new TypeError("password isn't of expected type");var c=new Uint8Array(a.BLOCK_SIZE);return c.set(b.length>a.BLOCK_SIZE?a.reset().process(b).finish().result:b),c}function aa(a){if(o(a)||p(a))a=new Uint8Array(a);else{if(!n(a))throw new TypeError("verify tag isn't of expected type");a=f(a)}if(a.length!==this.HMAC_SIZE)throw new d("illegal verification tag size");this.verify=a}function ba(a){a=a||{};var b=a.password;if(null===this.key&&!n(b)&&!b)throw new c("no key is associated with the instance");this.result=null,this.hash.reset(),(b||n(b))&&(this.key=_(this.hash,b));for(var d=new Uint8Array(this.key),e=0;e=g;++g){var h=(g-1)*this.hmac.HMAC_SIZE,i=(f>g?0:e%this.hmac.HMAC_SIZE)||this.hmac.HMAC_SIZE,j=new Uint8Array(this.hmac.reset().process(a).process(new Uint8Array([g>>>24&255,g>>>16&255,g>>>8&255,255&g])).finish().result);this.result.set(j.subarray(0,i),h);for(var k=1;b>k;++k){j=new Uint8Array(this.hmac.reset().process(j).finish().result);for(var l=0;i>l;++l)this.result[h+l]^=j[l]}}return this}function oa(a){return a=a||{},a.hmac instanceof ea||(a.hmac=ha()),la.call(this,a),this}function pa(a,b,e){if(null!==this.result)throw new c("state must be reset before processing new data");if(!a&&!n(a))throw new d("bad 'salt' value");b=b||this.count,e=e||this.length,this.result=new Uint8Array(e);for(var f=Math.ceil(e/this.hmac.HMAC_SIZE),g=1;f>=g;++g){var h=(g-1)*this.hmac.HMAC_SIZE,i=(f>g?0:e%this.hmac.HMAC_SIZE)||this.hmac.HMAC_SIZE;this.hmac.reset().process(a),this.hmac.hash.asm.pbkdf2_generate_block(this.hmac.hash.pos,this.hmac.hash.len,g,b,0),this.result.set(this.hmac.hash.heap.subarray(0,i),h)}return this}function qa(){return null===ob&&(ob=new oa),ob}function ra(){if(void 0!==ub)d=new Uint8Array(32),nb.call(ub,d),xb(d);else{var a,c,d=new Wa(3);d[0]=sb(),d[1]=rb(),d[2]=vb(),d=new Uint8Array(d.buffer);var e="";void 0!==b.location?e+=b.location.href:void 0!==b.process&&(e+=b.process.pid+b.process.title);var f=qa();for(a=0;100>a;a++)d=f.reset({password:d}).generate(e,1e3,32).result,c=vb(),d[0]^=c>>>24,d[1]^=c>>>16,d[2]^=c>>>8,d[3]^=c;xb(d)}yb=0,zb=!0}function sa(a){if(!o(a)&&!q(a))throw new TypeError("bad seed type");var b=a.byteOffset||0,c=a.byteLength||a.length,d=new Uint8Array(a.buffer||a,b,c);xb(d),yb=0;for(var e=0,f=0;f=Cb}function ta(a){if(zb||ra(),!Ab&&void 0===ub){if(!Db)throw new e("No strong PRNGs available. Use asmCrypto.random.seed().");void 0!==qb&&qb.error("No strong PRNGs available; your security is greatly lowered. Use asmCrypto.random.seed().")}if(!Eb&&!Ab&&void 0!==ub&&void 0!==qb){var b=(new Error).stack;Fb[b]|=0,Fb[b]++||qb.warn("asmCrypto PRNG not seeded; your security relies on your system PRNG. If this is not acceptable, use asmCrypto.random.seed().")}if(!o(a)&&!q(a))throw new TypeError("unexpected buffer type");var c,d,f=a.byteOffset||0,g=a.byteLength||a.length,h=new Uint8Array(a.buffer||a,f,g);for(void 0!==ub&&nb.call(ub,h),c=0;g>c;c++)0===(3&c)&&(yb>=1099511627776&&ra(),d=wb(),yb++),h[c]^=d,d>>>=8;return a}function ua(){(!zb||yb>=1099511627776)&&ra();var a=(1048576*wb()+(wb()>>>12))/4503599627370496;return yb+=2,a}function va(a,b,c){"use asm";var d=0;var e=new a.Uint32Array(c);var f=a.Math.imul;function g(u){u=u|0;d=u=u+31&-32;return u|0}function h(u){u=u|0;var v=0;v=d;d=v+(u+31&-32)|0;return v|0}function i(u){u=u|0;d=d-(u+31&-32)|0}function j(u,v,w){u=u|0;v=v|0;w=w|0;var x=0;if((v|0)>(w|0)){for(;(x|0)<(u|0);x=x+4|0){e[w+x>>2]=e[v+x>>2]}}else{for(x=u-4|0;(x|0)>=0;x=x-4|0){e[w+x>>2]=e[v+x>>2]}}}function k(u,v,w){u=u|0;v=v|0;w=w|0;var x=0;for(;(x|0)<(u|0);x=x+4|0){e[w+x>>2]=v}}function l(u,v,w,x){u=u|0;v=v|0;w=w|0;x=x|0;var y=0,z=0,A=0,B=0,C=0;if((x|0)<=0)x=v;if((x|0)<(v|0))v=x;z=1;for(;(C|0)<(v|0);C=C+4|0){y=~e[u+C>>2];A=(y&65535)+z|0;B=(y>>>16)+(A>>>16)|0;e[w+C>>2]=B<<16|A&65535;z=B>>>16}for(;(C|0)<(x|0);C=C+4|0){e[w+C>>2]=z-1|0}return z|0}function m(u,v,w,x){u=u|0;v=v|0;w=w|0;x=x|0;var y=0,z=0,A=0;if((v|0)>(x|0)){for(A=v-4|0;(A|0)>=(x|0);A=A-4|0){if(e[u+A>>2]|0)return 1}}else{for(A=x-4|0;(A|0)>=(v|0);A=A-4|0){if(e[w+A>>2]|0)return-1}}for(;(A|0)>=0;A=A-4|0){y=e[u+A>>2]|0,z=e[w+A>>2]|0;if(y>>>0>>0)return-1;if(y>>>0>z>>>0)return 1}return 0}function n(u,v){u=u|0;v=v|0;var w=0;for(w=v-4|0;(w|0)>=0;w=w-4|0){if(e[u+w>>2]|0)return w+4|0}return 0}function o(u,v,w,x,y,z){u=u|0;v=v|0;w=w|0;x=x|0;y=y|0;z=z|0;var A=0,B=0,C=0,D=0,E=0,F=0;if((v|0)<(x|0)){D=u,u=w,w=D;D=v,v=x,x=D}if((z|0)<=0)z=v+4|0;if((z|0)<(x|0))v=x=z;for(;(F|0)<(x|0);F=F+4|0){A=e[u+F>>2]|0;B=e[w+F>>2]|0;D=((A&65535)+(B&65535)|0)+C|0;E=((A>>>16)+(B>>>16)|0)+(D>>>16)|0;e[y+F>>2]=D&65535|E<<16;C=E>>>16}for(;(F|0)<(v|0);F=F+4|0){A=e[u+F>>2]|0;D=(A&65535)+C|0;E=(A>>>16)+(D>>>16)|0;e[y+F>>2]=D&65535|E<<16;C=E>>>16}for(;(F|0)<(z|0);F=F+4|0){e[y+F>>2]=C|0;C=0}return C|0}function p(u,v,w,x,y,z){u=u|0;v=v|0;w=w|0;x=x|0;y=y|0;z=z|0;var A=0,B=0,C=0,D=0,E=0,F=0;if((z|0)<=0)z=(v|0)>(x|0)?v+4|0:x+4|0;if((z|0)<(v|0))v=z;if((z|0)<(x|0))x=z;if((v|0)<(x|0)){for(;(F|0)<(v|0);F=F+4|0){A=e[u+F>>2]|0;B=e[w+F>>2]|0;D=((A&65535)-(B&65535)|0)+C|0;E=((A>>>16)-(B>>>16)|0)+(D>>16)|0;e[y+F>>2]=D&65535|E<<16;C=E>>16}for(;(F|0)<(x|0);F=F+4|0){B=e[w+F>>2]|0;D=C-(B&65535)|0;E=(D>>16)-(B>>>16)|0;e[y+F>>2]=D&65535|E<<16;C=E>>16}}else{for(;(F|0)<(x|0);F=F+4|0){A=e[u+F>>2]|0;B=e[w+F>>2]|0;D=((A&65535)-(B&65535)|0)+C|0;E=((A>>>16)-(B>>>16)|0)+(D>>16)|0;e[y+F>>2]=D&65535|E<<16;C=E>>16}for(;(F|0)<(v|0);F=F+4|0){A=e[u+F>>2]|0;D=(A&65535)+C|0;E=(A>>>16)+(D>>16)|0;e[y+F>>2]=D&65535|E<<16;C=E>>16}}for(;(F|0)<(z|0);F=F+4|0){e[y+F>>2]=C|0}return C|0}function q(u,v,w,x,y,z){u=u|0;v=v|0;w=w|0;x=x|0;y=y|0;z=z|0;var A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R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]|0,ia=e[(Ca|16)>>2]|0,ja=e[(Ca|20)>>2]|0,ka=e[(Ca|24)>>2]|0,la=e[(Ca|28)>>2]|0;ua=((f(A,Q)|0)+(ma&65535)|0)+(ea&65535)|0;va=((f(I,Q)|0)+(ma>>>16)|0)+(ea>>>16)|0;wa=((f(A,Y)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(I,Y)|0)+(va>>>16)|0)+(wa>>>16)|0;ea=wa<<16|ua&65535;ua=((f(A,R)|0)+(xa&65535)|0)+(fa&65535)|0;va=((f(I,R)|0)+(xa>>>16)|0)+(fa>>>16)|0;wa=((f(A,Z)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(I,Z)|0)+(va>>>16)|0)+(wa>>>16)|0;fa=wa<<16|ua&65535;ua=((f(A,S)|0)+(xa&65535)|0)+(ga&65535)|0;va=((f(I,S)|0)+(xa>>>16)|0)+(ga>>>16)|0;wa=((f(A,$)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(I,$)|0)+(va>>>16)|0)+(wa>>>16)|0;ga=wa<<16|ua&65535;ua=((f(A,T)|0)+(xa&65535)|0)+(ha&65535)|0;va=((f(I,T)|0)+(xa>>>16)|0)+(ha>>>16)|0;wa=((f(A,_)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(I,_)|0)+(va>>>16)|0)+(wa>>>16)|0;ha=wa<<16|ua&65535;ua=((f(A,U)|0)+(xa&65535)|0)+(ia&65535)|0;va=((f(I,U)|0)+(xa>>>16)|0)+(ia>>>16)|0;wa=((f(A,aa)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(I,aa)|0)+(va>>>16)|0)+(wa>>>16)|0;ia=wa<<16|ua&65535;ua=((f(A,V)|0)+(xa&65535)|0)+(ja&65535)|0;va=((f(I,V)|0)+(xa>>>16)|0)+(ja>>>16)|0;wa=((f(A,ba)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(I,ba)|0)+(va>>>16)|0)+(wa>>>16)|0;ja=wa<<16|ua&65535;ua=((f(A,W)|0)+(xa&65535)|0)+(ka&65535)|0;va=((f(I,W)|0)+(xa>>>16)|0)+(ka>>>16)|0;wa=((f(A,ca)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(I,ca)|0)+(va>>>16)|0)+(wa>>>16)|0;ka=wa<<16|ua&65535;ua=((f(A,X)|0)+(xa&65535)|0)+(la&65535)|0;va=((f(I,X)|0)+(xa>>>16)|0)+(la>>>16)|0;wa=((f(A,da)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(I,da)|0)+(va>>>16)|0)+(wa>>>16)|0;la=wa<<16|ua&65535;ma=xa;ua=((f(B,Q)|0)+(na&65535)|0)+(fa&65535)|0;va=((f(J,Q)|0)+(na>>>16)|0)+(fa>>>16)|0;wa=((f(B,Y)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(J,Y)|0)+(va>>>16)|0)+(wa>>>16)|0;fa=wa<<16|ua&65535;ua=((f(B,R)|0)+(xa&65535)|0)+(ga&65535)|0;va=((f(J,R)|0)+(xa>>>16)|0)+(ga>>>16)|0;wa=((f(B,Z)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(J,Z)|0)+(va>>>16)|0)+(wa>>>16)|0;ga=wa<<16|ua&65535;ua=((f(B,S)|0)+(xa&65535)|0)+(ha&65535)|0;va=((f(J,S)|0)+(xa>>>16)|0)+(ha>>>16)|0;wa=((f(B,$)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(J,$)|0)+(va>>>16)|0)+(wa>>>16)|0;ha=wa<<16|ua&65535;ua=((f(B,T)|0)+(xa&65535)|0)+(ia&65535)|0;va=((f(J,T)|0)+(xa>>>16)|0)+(ia>>>16)|0;wa=((f(B,_)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(J,_)|0)+(va>>>16)|0)+(wa>>>16)|0;ia=wa<<16|ua&65535;ua=((f(B,U)|0)+(xa&65535)|0)+(ja&65535)|0;va=((f(J,U)|0)+(xa>>>16)|0)+(ja>>>16)|0;wa=((f(B,aa)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(J,aa)|0)+(va>>>16)|0)+(wa>>>16)|0;ja=wa<<16|ua&65535;ua=((f(B,V)|0)+(xa&65535)|0)+(ka&65535)|0;va=((f(J,V)|0)+(xa>>>16)|0)+(ka>>>16)|0;wa=((f(B,ba)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(J,ba)|0)+(va>>>16)|0)+(wa>>>16)|0;ka=wa<<16|ua&65535;ua=((f(B,W)|0)+(xa&65535)|0)+(la&65535)|0;va=((f(J,W)|0)+(xa>>>16)|0)+(la>>>16)|0;wa=((f(B,ca)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(J,ca)|0)+(va>>>16)|0)+(wa>>>16)|0;la=wa<<16|ua&65535;ua=((f(B,X)|0)+(xa&65535)|0)+(ma&65535)|0;va=((f(J,X)|0)+(xa>>>16)|0)+(ma>>>16)|0;wa=((f(B,da)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(J,da)|0)+(va>>>16)|0)+(wa>>>16)|0;ma=wa<<16|ua&65535;na=xa;ua=((f(C,Q)|0)+(oa&65535)|0)+(ga&65535)|0;va=((f(K,Q)|0)+(oa>>>16)|0)+(ga>>>16)|0;wa=((f(C,Y)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(K,Y)|0)+(va>>>16)|0)+(wa>>>16)|0;ga=wa<<16|ua&65535;ua=((f(C,R)|0)+(xa&65535)|0)+(ha&65535)|0;va=((f(K,R)|0)+(xa>>>16)|0)+(ha>>>16)|0;wa=((f(C,Z)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(K,Z)|0)+(va>>>16)|0)+(wa>>>16)|0;ha=wa<<16|ua&65535;ua=((f(C,S)|0)+(xa&65535)|0)+(ia&65535)|0;va=((f(K,S)|0)+(xa>>>16)|0)+(ia>>>16)|0;wa=((f(C,$)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(K,$)|0)+(va>>>16)|0)+(wa>>>16)|0;ia=wa<<16|ua&65535;ua=((f(C,T)|0)+(xa&65535)|0)+(ja&65535)|0;va=((f(K,T)|0)+(xa>>>16)|0)+(ja>>>16)|0;wa=((f(C,_)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(K,_)|0)+(va>>>16)|0)+(wa>>>16)|0;ja=wa<<16|ua&65535;ua=((f(C,U)|0)+(xa&65535)|0)+(ka&65535)|0;va=((f(K,U)|0)+(xa>>>16)|0)+(ka>>>16)|0;wa=((f(C,aa)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(K,aa)|0)+(va>>>16)|0)+(wa>>>16)|0;ka=wa<<16|ua&65535;ua=((f(C,V)|0)+(xa&65535)|0)+(la&65535)|0;va=((f(K,V)|0)+(xa>>>16)|0)+(la>>>16)|0;wa=((f(C,ba)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(K,ba)|0)+(va>>>16)|0)+(wa>>>16)|0;la=wa<<16|ua&65535;ua=((f(C,W)|0)+(xa&65535)|0)+(ma&65535)|0;va=((f(K,W)|0)+(xa>>>16)|0)+(ma>>>16)|0;wa=((f(C,ca)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(K,ca)|0)+(va>>>16)|0)+(wa>>>16)|0;ma=wa<<16|ua&65535;ua=((f(C,X)|0)+(xa&65535)|0)+(na&65535)|0;va=((f(K,X)|0)+(xa>>>16)|0)+(na>>>16)|0;wa=((f(C,da)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(K,da)|0)+(va>>>16)|0)+(wa>>>16)|0;na=wa<<16|ua&65535;oa=xa;ua=((f(D,Q)|0)+(pa&65535)|0)+(ha&65535)|0;va=((f(L,Q)|0)+(pa>>>16)|0)+(ha>>>16)|0;wa=((f(D,Y)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(L,Y)|0)+(va>>>16)|0)+(wa>>>16)|0;ha=wa<<16|ua&65535;ua=((f(D,R)|0)+(xa&65535)|0)+(ia&65535)|0;va=((f(L,R)|0)+(xa>>>16)|0)+(ia>>>16)|0;wa=((f(D,Z)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(L,Z)|0)+(va>>>16)|0)+(wa>>>16)|0;ia=wa<<16|ua&65535;ua=((f(D,S)|0)+(xa&65535)|0)+(ja&65535)|0;va=((f(L,S)|0)+(xa>>>16)|0)+(ja>>>16)|0;wa=((f(D,$)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(L,$)|0)+(va>>>16)|0)+(wa>>>16)|0;ja=wa<<16|ua&65535;ua=((f(D,T)|0)+(xa&65535)|0)+(ka&65535)|0;va=((f(L,T)|0)+(xa>>>16)|0)+(ka>>>16)|0;wa=((f(D,_)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(L,_)|0)+(va>>>16)|0)+(wa>>>16)|0;ka=wa<<16|ua&65535;ua=((f(D,U)|0)+(xa&65535)|0)+(la&65535)|0;va=((f(L,U)|0)+(xa>>>16)|0)+(la>>>16)|0;wa=((f(D,aa)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(L,aa)|0)+(va>>>16)|0)+(wa>>>16)|0;la=wa<<16|ua&65535;ua=((f(D,V)|0)+(xa&65535)|0)+(ma&65535)|0;va=((f(L,V)|0)+(xa>>>16)|0)+(ma>>>16)|0;wa=((f(D,ba)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(L,ba)|0)+(va>>>16)|0)+(wa>>>16)|0;ma=wa<<16|ua&65535;ua=((f(D,W)|0)+(xa&65535)|0)+(na&65535)|0;va=((f(L,W)|0)+(xa>>>16)|0)+(na>>>16)|0;wa=((f(D,ca)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(L,ca)|0)+(va>>>16)|0)+(wa>>>16)|0;na=wa<<16|ua&65535;ua=((f(D,X)|0)+(xa&65535)|0)+(oa&65535)|0;va=((f(L,X)|0)+(xa>>>16)|0)+(oa>>>16)|0;wa=((f(D,da)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(L,da)|0)+(va>>>16)|0)+(wa>>>16)|0;oa=wa<<16|ua&65535;pa=xa;ua=((f(E,Q)|0)+(qa&65535)|0)+(ia&65535)|0;va=((f(M,Q)|0)+(qa>>>16)|0)+(ia>>>16)|0;wa=((f(E,Y)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(M,Y)|0)+(va>>>16)|0)+(wa>>>16)|0;ia=wa<<16|ua&65535;ua=((f(E,R)|0)+(xa&65535)|0)+(ja&65535)|0;va=((f(M,R)|0)+(xa>>>16)|0)+(ja>>>16)|0;wa=((f(E,Z)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(M,Z)|0)+(va>>>16)|0)+(wa>>>16)|0;ja=wa<<16|ua&65535;ua=((f(E,S)|0)+(xa&65535)|0)+(ka&65535)|0;va=((f(M,S)|0)+(xa>>>16)|0)+(ka>>>16)|0;wa=((f(E,$)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(M,$)|0)+(va>>>16)|0)+(wa>>>16)|0;ka=wa<<16|ua&65535;ua=((f(E,T)|0)+(xa&65535)|0)+(la&65535)|0;va=((f(M,T)|0)+(xa>>>16)|0)+(la>>>16)|0;wa=((f(E,_)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(M,_)|0)+(va>>>16)|0)+(wa>>>16)|0;la=wa<<16|ua&65535;ua=((f(E,U)|0)+(xa&65535)|0)+(ma&65535)|0;va=((f(M,U)|0)+(xa>>>16)|0)+(ma>>>16)|0;wa=((f(E,aa)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(M,aa)|0)+(va>>>16)|0)+(wa>>>16)|0;ma=wa<<16|ua&65535;ua=((f(E,V)|0)+(xa&65535)|0)+(na&65535)|0;va=((f(M,V)|0)+(xa>>>16)|0)+(na>>>16)|0;wa=((f(E,ba)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(M,ba)|0)+(va>>>16)|0)+(wa>>>16)|0;na=wa<<16|ua&65535;ua=((f(E,W)|0)+(xa&65535)|0)+(oa&65535)|0;va=((f(M,W)|0)+(xa>>>16)|0)+(oa>>>16)|0;wa=((f(E,ca)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(M,ca)|0)+(va>>>16)|0)+(wa>>>16)|0;oa=wa<<16|ua&65535;ua=((f(E,X)|0)+(xa&65535)|0)+(pa&65535)|0;va=((f(M,X)|0)+(xa>>>16)|0)+(pa>>>16)|0;wa=((f(E,da)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(M,da)|0)+(va>>>16)|0)+(wa>>>16)|0;pa=wa<<16|ua&65535;qa=xa;ua=((f(F,Q)|0)+(ra&65535)|0)+(ja&65535)|0;va=((f(N,Q)|0)+(ra>>>16)|0)+(ja>>>16)|0;wa=((f(F,Y)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(N,Y)|0)+(va>>>16)|0)+(wa>>>16)|0;ja=wa<<16|ua&65535;ua=((f(F,R)|0)+(xa&65535)|0)+(ka&65535)|0;va=((f(N,R)|0)+(xa>>>16)|0)+(ka>>>16)|0;wa=((f(F,Z)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(N,Z)|0)+(va>>>16)|0)+(wa>>>16)|0;ka=wa<<16|ua&65535;ua=((f(F,S)|0)+(xa&65535)|0)+(la&65535)|0;va=((f(N,S)|0)+(xa>>>16)|0)+(la>>>16)|0;wa=((f(F,$)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(N,$)|0)+(va>>>16)|0)+(wa>>>16)|0;la=wa<<16|ua&65535;ua=((f(F,T)|0)+(xa&65535)|0)+(ma&65535)|0;va=((f(N,T)|0)+(xa>>>16)|0)+(ma>>>16)|0;wa=((f(F,_)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(N,_)|0)+(va>>>16)|0)+(wa>>>16)|0;ma=wa<<16|ua&65535;ua=((f(F,U)|0)+(xa&65535)|0)+(na&65535)|0;va=((f(N,U)|0)+(xa>>>16)|0)+(na>>>16)|0;wa=((f(F,aa)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(N,aa)|0)+(va>>>16)|0)+(wa>>>16)|0;na=wa<<16|ua&65535;ua=((f(F,V)|0)+(xa&65535)|0)+(oa&65535)|0;va=((f(N,V)|0)+(xa>>>16)|0)+(oa>>>16)|0;wa=((f(F,ba)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(N,ba)|0)+(va>>>16)|0)+(wa>>>16)|0;oa=wa<<16|ua&65535;ua=((f(F,W)|0)+(xa&65535)|0)+(pa&65535)|0;va=((f(N,W)|0)+(xa>>>16)|0)+(pa>>>16)|0;wa=((f(F,ca)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(N,ca)|0)+(va>>>16)|0)+(wa>>>16)|0;pa=wa<<16|ua&65535;ua=((f(F,X)|0)+(xa&65535)|0)+(qa&65535)|0;va=((f(N,X)|0)+(xa>>>16)|0)+(qa>>>16)|0;wa=((f(F,da)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(N,da)|0)+(va>>>16)|0)+(wa>>>16)|0;qa=wa<<16|ua&65535;ra=xa;ua=((f(G,Q)|0)+(sa&65535)|0)+(ka&65535)|0;va=((f(O,Q)|0)+(sa>>>16)|0)+(ka>>>16)|0;wa=((f(G,Y)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(O,Y)|0)+(va>>>16)|0)+(wa>>>16)|0;ka=wa<<16|ua&65535;ua=((f(G,R)|0)+(xa&65535)|0)+(la&65535)|0;va=((f(O,R)|0)+(xa>>>16)|0)+(la>>>16)|0;wa=((f(G,Z)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(O,Z)|0)+(va>>>16)|0)+(wa>>>16)|0;la=wa<<16|ua&65535;ua=((f(G,S)|0)+(xa&65535)|0)+(ma&65535)|0;va=((f(O,S)|0)+(xa>>>16)|0)+(ma>>>16)|0;wa=((f(G,$)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(O,$)|0)+(va>>>16)|0)+(wa>>>16)|0;ma=wa<<16|ua&65535;ua=((f(G,T)|0)+(xa&65535)|0)+(na&65535)|0;va=((f(O,T)|0)+(xa>>>16)|0)+(na>>>16)|0;wa=((f(G,_)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(O,_)|0)+(va>>>16)|0)+(wa>>>16)|0;na=wa<<16|ua&65535;ua=((f(G,U)|0)+(xa&65535)|0)+(oa&65535)|0;va=((f(O,U)|0)+(xa>>>16)|0)+(oa>>>16)|0;wa=((f(G,aa)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(O,aa)|0)+(va>>>16)|0)+(wa>>>16)|0;oa=wa<<16|ua&65535;ua=((f(G,V)|0)+(xa&65535)|0)+(pa&65535)|0;va=((f(O,V)|0)+(xa>>>16)|0)+(pa>>>16)|0;wa=((f(G,ba)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(O,ba)|0)+(va>>>16)|0)+(wa>>>16)|0;pa=wa<<16|ua&65535;ua=((f(G,W)|0)+(xa&65535)|0)+(qa&65535)|0;va=((f(O,W)|0)+(xa>>>16)|0)+(qa>>>16)|0;wa=((f(G,ca)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(O,ca)|0)+(va>>>16)|0)+(wa>>>16)|0;qa=wa<<16|ua&65535;ua=((f(G,X)|0)+(xa&65535)|0)+(ra&65535)|0;va=((f(O,X)|0)+(xa>>>16)|0)+(ra>>>16)|0;wa=((f(G,da)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(O,da)|0)+(va>>>16)|0)+(wa>>>16)|0;ra=wa<<16|ua&65535;sa=xa;ua=((f(H,Q)|0)+(ta&65535)|0)+(la&65535)|0;va=((f(P,Q)|0)+(ta>>>16)|0)+(la>>>16)|0;wa=((f(H,Y)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(P,Y)|0)+(va>>>16)|0)+(wa>>>16)|0;la=wa<<16|ua&65535;ua=((f(H,R)|0)+(xa&65535)|0)+(ma&65535)|0;va=((f(P,R)|0)+(xa>>>16)|0)+(ma>>>16)|0;wa=((f(H,Z)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(P,Z)|0)+(va>>>16)|0)+(wa>>>16)|0;ma=wa<<16|ua&65535;ua=((f(H,S)|0)+(xa&65535)|0)+(na&65535)|0;va=((f(P,S)|0)+(xa>>>16)|0)+(na>>>16)|0;wa=((f(H,$)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(P,$)|0)+(va>>>16)|0)+(wa>>>16)|0;na=wa<<16|ua&65535;ua=((f(H,T)|0)+(xa&65535)|0)+(oa&65535)|0;va=((f(P,T)|0)+(xa>>>16)|0)+(oa>>>16)|0;wa=((f(H,_)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(P,_)|0)+(va>>>16)|0)+(wa>>>16)|0;oa=wa<<16|ua&65535;ua=((f(H,U)|0)+(xa&65535)|0)+(pa&65535)|0;va=((f(P,U)|0)+(xa>>>16)|0)+(pa>>>16)|0;wa=((f(H,aa)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(P,aa)|0)+(va>>>16)|0)+(wa>>>16)|0;pa=wa<<16|ua&65535;ua=((f(H,V)|0)+(xa&65535)|0)+(qa&65535)|0;va=((f(P,V)|0)+(xa>>>16)|0)+(qa>>>16)|0;wa=((f(H,ba)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(P,ba)|0)+(va>>>16)|0)+(wa>>>16)|0;qa=wa<<16|ua&65535;ua=((f(H,W)|0)+(xa&65535)|0)+(ra&65535)|0;va=((f(P,W)|0)+(xa>>>16)|0)+(ra>>>16)|0;wa=((f(H,ca)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(P,ca)|0)+(va>>>16)|0)+(wa>>>16)|0;ra=wa<<16|ua&65535;ua=((f(H,X)|0)+(xa&65535)|0)+(sa&65535)|0;va=((f(P,X)|0)+(xa>>>16)|0)+(sa>>>16)|0;wa=((f(H,da)|0)+(va&65535)|0)+(ua>>>16)|0;xa=((f(P,da)|0)+(va>>>16)|0)+(wa>>>16)|0;sa=wa<<16|ua&65535;ta=xa;e[(Ca|0)>>2]=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)+((ra&65535)<<1)|0;ta=((xa>>>16)+((ta&65535)<<1)|0)+(ra>>>16)|0;e[(Ga|4)>>2]=ta<<16|ra&65535;ua=ta>>>16;xa=e[(Ga|8)>>2]|0;ra=((xa&65535)+((wa&65535)<<1)|0)+ua|0;ta=((xa>>>16)+(wa>>>16<<1)|0)+(ra>>>16)|0;e[(Ga|8)>>2]=ta<<16|ra&65535;ua=ta>>>16;if(ua){xa=e[(Ga|12)>>2]|0;ra=(xa&65535)+ua|0;ta=(xa>>>16)+(ra>>>16)|0;e[(Ga|12)>>2]=ta<<16|ra&65535}}for(Aa=0;(Aa|0)<(v|0);Aa=Aa+16|0){Ea=u+Aa|0,Ga=w+(Aa<<1)|0;F=e[Ea>>2]|0,x=F&65535,F=F>>>16,G=e[(Ea|4)>>2]|0,y=G&65535,G=G>>>16;V=e[(Ea|8)>>2]|0,N=V&65535,V=V>>>16,W=e[(Ea|12)>>2]|0,O=W&65535,W=W>>>16;ra=f(x,N)|0;sa=f(F,N)|0;ta=((f(x,V)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(F,V)|0)+(sa>>>16)|0)+(ta>>>16)|0;ba=ta<<16|ra&65535;ra=(f(x,O)|0)+(wa&65535)|0;sa=(f(F,O)|0)+(wa>>>16)|0;ta=((f(x,W)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(F,W)|0)+(sa>>>16)|0)+(ta>>>16)|0;ca=ta<<16|ra&65535;da=wa;ra=(f(y,N)|0)+(ca&65535)|0;sa=(f(G,N)|0)+(ca>>>16)|0;ta=((f(y,V)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(G,V)|0)+(sa>>>16)|0)+(ta>>>16)|0;ca=ta<<16|ra&65535;ra=((f(y,O)|0)+(da&65535)|0)+(wa&65535)|0;sa=((f(G,O)|0)+(da>>>16)|0)+(wa>>>16)|0;ta=((f(y,W)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(G,W)|0)+(sa>>>16)|0)+(ta>>>16)|0;da=ta<<16|ra&65535;ea=wa;xa=e[(Ga|8)>>2]|0;ra=(xa&65535)+((ba&65535)<<1)|0;ta=((xa>>>16)+(ba>>>16<<1)|0)+(ra>>>16)|0;e[(Ga|8)>>2]=ta<<16|ra&65535;ua=ta>>>16;xa=e[(Ga|12)>>2]|0;ra=((xa&65535)+((ca&65535)<<1)|0)+ua|0;ta=((xa>>>16)+(ca>>>16<<1)|0)+(ra>>>16)|0;e[(Ga|12)>>2]=ta<<16|ra&65535;ua=ta>>>16;xa=e[(Ga|16)>>2]|0;ra=((xa&65535)+((da&65535)<<1)|0)+ua|0;ta=((xa>>>16)+(da>>>16<<1)|0)+(ra>>>16)|0;e[(Ga|16)>>2]=ta<<16|ra&65535;ua=ta>>>16;xa=e[(Ga|20)>>2]|0;ra=((xa&65535)+((ea&65535)<<1)|0)+ua|0;ta=((xa>>>16)+(ea>>>16<<1)|0)+(ra>>>16)|0;e[(Ga|20)>>2]=ta<<16|ra&65535;ua=ta>>>16;for(Da=24;!!ua&(Da|0)<32;Da=Da+4|0){xa=e[(Ga|Da)>>2]|0;ra=(xa&65535)+ua|0;ta=(xa>>>16)+(ra>>>16)|0;e[(Ga|Da)>>2]=ta<<16|ra&65535;ua=ta>>>16}}for(Aa=0;(Aa|0)<(v|0);Aa=Aa+32|0){Ea=u+Aa|0,Ga=w+(Aa<<1)|0;F=e[Ea>>2]|0,x=F&65535,F=F>>>16,G=e[(Ea|4)>>2]|0,y=G&65535,G=G>>>16,H=e[(Ea|8)>>2]|0,z=H&65535,H=H>>>16,I=e[(Ea|12)>>2]|0,A=I&65535,I=I>>>16;V=e[(Ea|16)>>2]|0,N=V&65535,V=V>>>16,W=e[(Ea|20)>>2]|0,O=W&65535,W=W>>>16,X=e[(Ea|24)>>2]|0,P=X&65535,X=X>>>16,Y=e[(Ea|28)>>2]|0,Q=Y&65535,Y=Y>>>16;ra=f(x,N)|0;sa=f(F,N)|0;ta=((f(x,V)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(F,V)|0)+(sa>>>16)|0)+(ta>>>16)|0;ba=ta<<16|ra&65535;ra=(f(x,O)|0)+(wa&65535)|0;sa=(f(F,O)|0)+(wa>>>16)|0;ta=((f(x,W)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(F,W)|0)+(sa>>>16)|0)+(ta>>>16)|0;ca=ta<<16|ra&65535;ra=(f(x,P)|0)+(wa&65535)|0;sa=(f(F,P)|0)+(wa>>>16)|0;ta=((f(x,X)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(F,X)|0)+(sa>>>16)|0)+(ta>>>16)|0;da=ta<<16|ra&65535;ra=(f(x,Q)|0)+(wa&65535)|0;sa=(f(F,Q)|0)+(wa>>>16)|0;ta=((f(x,Y)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(F,Y)|0)+(sa>>>16)|0)+(ta>>>16)|0;ea=ta<<16|ra&65535;fa=wa;ra=(f(y,N)|0)+(ca&65535)|0;sa=(f(G,N)|0)+(ca>>>16)|0;ta=((f(y,V)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(G,V)|0)+(sa>>>16)|0)+(ta>>>16)|0;ca=ta<<16|ra&65535;ra=((f(y,O)|0)+(da&65535)|0)+(wa&65535)|0;sa=((f(G,O)|0)+(da>>>16)|0)+(wa>>>16)|0;ta=((f(y,W)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(G,W)|0)+(sa>>>16)|0)+(ta>>>16)|0;da=ta<<16|ra&65535;ra=((f(y,P)|0)+(ea&65535)|0)+(wa&65535)|0;sa=((f(G,P)|0)+(ea>>>16)|0)+(wa>>>16)|0;ta=((f(y,X)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(G,X)|0)+(sa>>>16)|0)+(ta>>>16)|0;ea=ta<<16|ra&65535;ra=((f(y,Q)|0)+(fa&65535)|0)+(wa&65535)|0;sa=((f(G,Q)|0)+(fa>>>16)|0)+(wa>>>16)|0;ta=((f(y,Y)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(G,Y)|0)+(sa>>>16)|0)+(ta>>>16)|0;fa=ta<<16|ra&65535;ga=wa;ra=(f(z,N)|0)+(da&65535)|0;sa=(f(H,N)|0)+(da>>>16)|0;ta=((f(z,V)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(H,V)|0)+(sa>>>16)|0)+(ta>>>16)|0;da=ta<<16|ra&65535;ra=((f(z,O)|0)+(ea&65535)|0)+(wa&65535)|0;sa=((f(H,O)|0)+(ea>>>16)|0)+(wa>>>16)|0;ta=((f(z,W)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(H,W)|0)+(sa>>>16)|0)+(ta>>>16)|0;ea=ta<<16|ra&65535;ra=((f(z,P)|0)+(fa&65535)|0)+(wa&65535)|0;sa=((f(H,P)|0)+(fa>>>16)|0)+(wa>>>16)|0;ta=((f(z,X)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(H,X)|0)+(sa>>>16)|0)+(ta>>>16)|0;fa=ta<<16|ra&65535;ra=((f(z,Q)|0)+(ga&65535)|0)+(wa&65535)|0;sa=((f(H,Q)|0)+(ga>>>16)|0)+(wa>>>16)|0;ta=((f(z,Y)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(H,Y)|0)+(sa>>>16)|0)+(ta>>>16)|0;ga=ta<<16|ra&65535;ha=wa;ra=(f(A,N)|0)+(ea&65535)|0;sa=(f(I,N)|0)+(ea>>>16)|0;ta=((f(A,V)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(I,V)|0)+(sa>>>16)|0)+(ta>>>16)|0;ea=ta<<16|ra&65535;ra=((f(A,O)|0)+(fa&65535)|0)+(wa&65535)|0;sa=((f(I,O)|0)+(fa>>>16)|0)+(wa>>>16)|0;ta=((f(A,W)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(I,W)|0)+(sa>>>16)|0)+(ta>>>16)|0;fa=ta<<16|ra&65535;ra=((f(A,P)|0)+(ga&65535)|0)+(wa&65535)|0;sa=((f(I,P)|0)+(ga>>>16)|0)+(wa>>>16)|0;ta=((f(A,X)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(I,X)|0)+(sa>>>16)|0)+(ta>>>16)|0;ga=ta<<16|ra&65535;ra=((f(A,Q)|0)+(ha&65535)|0)+(wa&65535)|0;sa=((f(I,Q)|0)+(ha>>>16)|0)+(wa>>>16)|0;ta=((f(A,Y)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(I,Y)|0)+(sa>>>16)|0)+(ta>>>16)|0;ha=ta<<16|ra&65535;ia=wa;xa=e[(Ga|16)>>2]|0;ra=(xa&65535)+((ba&65535)<<1)|0;ta=((xa>>>16)+(ba>>>16<<1)|0)+(ra>>>16)|0;e[(Ga|16)>>2]=ta<<16|ra&65535;ua=ta>>>16;xa=e[(Ga|20)>>2]|0;ra=((xa&65535)+((ca&65535)<<1)|0)+ua|0;ta=((xa>>>16)+(ca>>>16<<1)|0)+(ra>>>16)|0;e[(Ga|20)>>2]=ta<<16|ra&65535;ua=ta>>>16;xa=e[(Ga|24)>>2]|0;ra=((xa&65535)+((da&65535)<<1)|0)+ua|0;ta=((xa>>>16)+(da>>>16<<1)|0)+(ra>>>16)|0;e[(Ga|24)>>2]=ta<<16|ra&65535;ua=ta>>>16;xa=e[(Ga|28)>>2]|0;ra=((xa&65535)+((ea&65535)<<1)|0)+ua|0;ta=((xa>>>16)+(ea>>>16<<1)|0)+(ra>>>16)|0;e[(Ga|28)>>2]=ta<<16|ra&65535;ua=ta>>>16;xa=e[Ga+32>>2]|0;ra=((xa&65535)+((fa&65535)<<1)|0)+ua|0;ta=((xa>>>16)+(fa>>>16<<1)|0)+(ra>>>16)|0;e[Ga+32>>2]=ta<<16|ra&65535;ua=ta>>>16;xa=e[Ga+36>>2]|0;ra=((xa&65535)+((ga&65535)<<1)|0)+ua|0;ta=((xa>>>16)+(ga>>>16<<1)|0)+(ra>>>16)|0;e[Ga+36>>2]=ta<<16|ra&65535;ua=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Z>>>16,$=e[(Fa|20)>>2]|0,S=$&65535,$=$>>>16,_=e[(Fa|24)>>2]|0,T=_&65535,_=_>>>16,aa=e[(Fa|28)>>2]|0,U=aa&65535,aa=aa>>>16;ba=ca=da=ea=fa=ga=ha=ia=0;ra=((f(x,N)|0)+(ba&65535)|0)+(ja&65535)|0;sa=((f(F,N)|0)+(ba>>>16)|0)+(ja>>>16)|0;ta=((f(x,V)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(F,V)|0)+(sa>>>16)|0)+(ta>>>16)|0;ba=ta<<16|ra&65535;ra=((f(x,O)|0)+(ca&65535)|0)+(wa&65535)|0;sa=((f(F,O)|0)+(ca>>>16)|0)+(wa>>>16)|0; - -ta=((f(x,W)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(F,W)|0)+(sa>>>16)|0)+(ta>>>16)|0;ca=ta<<16|ra&65535;ra=((f(x,P)|0)+(da&65535)|0)+(wa&65535)|0;sa=((f(F,P)|0)+(da>>>16)|0)+(wa>>>16)|0;ta=((f(x,X)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(F,X)|0)+(sa>>>16)|0)+(ta>>>16)|0;da=ta<<16|ra&65535;ra=((f(x,Q)|0)+(ea&65535)|0)+(wa&65535)|0;sa=((f(F,Q)|0)+(ea>>>16)|0)+(wa>>>16)|0;ta=((f(x,Y)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(F,Y)|0)+(sa>>>16)|0)+(ta>>>16)|0;ea=ta<<16|ra&65535;ra=((f(x,R)|0)+(fa&65535)|0)+(wa&65535)|0;sa=((f(F,R)|0)+(fa>>>16)|0)+(wa>>>16)|0;ta=((f(x,Z)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(F,Z)|0)+(sa>>>16)|0)+(ta>>>16)|0;fa=ta<<16|ra&65535;ra=((f(x,S)|0)+(ga&65535)|0)+(wa&65535)|0;sa=((f(F,S)|0)+(ga>>>16)|0)+(wa>>>16)|0;ta=((f(x,$)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(F,$)|0)+(sa>>>16)|0)+(ta>>>16)|0;ga=ta<<16|ra&65535;ra=((f(x,T)|0)+(ha&65535)|0)+(wa&65535)|0;sa=((f(F,T)|0)+(ha>>>16)|0)+(wa>>>16)|0;ta=((f(x,_)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(F,_)|0)+(sa>>>16)|0)+(ta>>>16)|0;ha=ta<<16|ra&65535;ra=((f(x,U)|0)+(ia&65535)|0)+(wa&65535)|0;sa=((f(F,U)|0)+(ia>>>16)|0)+(wa>>>16)|0;ta=((f(x,aa)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(F,aa)|0)+(sa>>>16)|0)+(ta>>>16)|0;ia=ta<<16|ra&65535;ja=wa;ra=((f(y,N)|0)+(ca&65535)|0)+(ka&65535)|0;sa=((f(G,N)|0)+(ca>>>16)|0)+(ka>>>16)|0;ta=((f(y,V)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(G,V)|0)+(sa>>>16)|0)+(ta>>>16)|0;ca=ta<<16|ra&65535;ra=((f(y,O)|0)+(da&65535)|0)+(wa&65535)|0;sa=((f(G,O)|0)+(da>>>16)|0)+(wa>>>16)|0;ta=((f(y,W)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(G,W)|0)+(sa>>>16)|0)+(ta>>>16)|0;da=ta<<16|ra&65535;ra=((f(y,P)|0)+(ea&65535)|0)+(wa&65535)|0;sa=((f(G,P)|0)+(ea>>>16)|0)+(wa>>>16)|0;ta=((f(y,X)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(G,X)|0)+(sa>>>16)|0)+(ta>>>16)|0;ea=ta<<16|ra&65535;ra=((f(y,Q)|0)+(fa&65535)|0)+(wa&65535)|0;sa=((f(G,Q)|0)+(fa>>>16)|0)+(wa>>>16)|0;ta=((f(y,Y)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(G,Y)|0)+(sa>>>16)|0)+(ta>>>16)|0;fa=ta<<16|ra&65535;ra=((f(y,R)|0)+(ga&65535)|0)+(wa&65535)|0;sa=((f(G,R)|0)+(ga>>>16)|0)+(wa>>>16)|0;ta=((f(y,Z)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(G,Z)|0)+(sa>>>16)|0)+(ta>>>16)|0;ga=ta<<16|ra&65535;ra=((f(y,S)|0)+(ha&65535)|0)+(wa&65535)|0;sa=((f(G,S)|0)+(ha>>>16)|0)+(wa>>>16)|0;ta=((f(y,$)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(G,$)|0)+(sa>>>16)|0)+(ta>>>16)|0;ha=ta<<16|ra&65535;ra=((f(y,T)|0)+(ia&65535)|0)+(wa&65535)|0;sa=((f(G,T)|0)+(ia>>>16)|0)+(wa>>>16)|0;ta=((f(y,_)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(G,_)|0)+(sa>>>16)|0)+(ta>>>16)|0;ia=ta<<16|ra&65535;ra=((f(y,U)|0)+(ja&65535)|0)+(wa&65535)|0;sa=((f(G,U)|0)+(ja>>>16)|0)+(wa>>>16)|0;ta=((f(y,aa)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(G,aa)|0)+(sa>>>16)|0)+(ta>>>16)|0;ja=ta<<16|ra&65535;ka=wa;ra=((f(z,N)|0)+(da&65535)|0)+(la&65535)|0;sa=((f(H,N)|0)+(da>>>16)|0)+(la>>>16)|0;ta=((f(z,V)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(H,V)|0)+(sa>>>16)|0)+(ta>>>16)|0;da=ta<<16|ra&65535;ra=((f(z,O)|0)+(ea&65535)|0)+(wa&65535)|0;sa=((f(H,O)|0)+(ea>>>16)|0)+(wa>>>16)|0;ta=((f(z,W)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(H,W)|0)+(sa>>>16)|0)+(ta>>>16)|0;ea=ta<<16|ra&65535;ra=((f(z,P)|0)+(fa&65535)|0)+(wa&65535)|0;sa=((f(H,P)|0)+(fa>>>16)|0)+(wa>>>16)|0;ta=((f(z,X)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(H,X)|0)+(sa>>>16)|0)+(ta>>>16)|0;fa=ta<<16|ra&65535;ra=((f(z,Q)|0)+(ga&65535)|0)+(wa&65535)|0;sa=((f(H,Q)|0)+(ga>>>16)|0)+(wa>>>16)|0;ta=((f(z,Y)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(H,Y)|0)+(sa>>>16)|0)+(ta>>>16)|0;ga=ta<<16|ra&65535;ra=((f(z,R)|0)+(ha&65535)|0)+(wa&65535)|0;sa=((f(H,R)|0)+(ha>>>16)|0)+(wa>>>16)|0;ta=((f(z,Z)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(H,Z)|0)+(sa>>>16)|0)+(ta>>>16)|0;ha=ta<<16|ra&65535;ra=((f(z,S)|0)+(ia&65535)|0)+(wa&65535)|0;sa=((f(H,S)|0)+(ia>>>16)|0)+(wa>>>16)|0;ta=((f(z,$)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(H,$)|0)+(sa>>>16)|0)+(ta>>>16)|0;ia=ta<<16|ra&65535;ra=((f(z,T)|0)+(ja&65535)|0)+(wa&65535)|0;sa=((f(H,T)|0)+(ja>>>16)|0)+(wa>>>16)|0;ta=((f(z,_)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(H,_)|0)+(sa>>>16)|0)+(ta>>>16)|0;ja=ta<<16|ra&65535;ra=((f(z,U)|0)+(ka&65535)|0)+(wa&65535)|0;sa=((f(H,U)|0)+(ka>>>16)|0)+(wa>>>16)|0;ta=((f(z,aa)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(H,aa)|0)+(sa>>>16)|0)+(ta>>>16)|0;ka=ta<<16|ra&65535;la=wa;ra=((f(A,N)|0)+(ea&65535)|0)+(ma&65535)|0;sa=((f(I,N)|0)+(ea>>>16)|0)+(ma>>>16)|0;ta=((f(A,V)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(I,V)|0)+(sa>>>16)|0)+(ta>>>16)|0;ea=ta<<16|ra&65535;ra=((f(A,O)|0)+(fa&65535)|0)+(wa&65535)|0;sa=((f(I,O)|0)+(fa>>>16)|0)+(wa>>>16)|0;ta=((f(A,W)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(I,W)|0)+(sa>>>16)|0)+(ta>>>16)|0;fa=ta<<16|ra&65535;ra=((f(A,P)|0)+(ga&65535)|0)+(wa&65535)|0;sa=((f(I,P)|0)+(ga>>>16)|0)+(wa>>>16)|0;ta=((f(A,X)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(I,X)|0)+(sa>>>16)|0)+(ta>>>16)|0;ga=ta<<16|ra&65535;ra=((f(A,Q)|0)+(ha&65535)|0)+(wa&65535)|0;sa=((f(I,Q)|0)+(ha>>>16)|0)+(wa>>>16)|0;ta=((f(A,Y)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(I,Y)|0)+(sa>>>16)|0)+(ta>>>16)|0;ha=ta<<16|ra&65535;ra=((f(A,R)|0)+(ia&65535)|0)+(wa&65535)|0;sa=((f(I,R)|0)+(ia>>>16)|0)+(wa>>>16)|0;ta=((f(A,Z)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(I,Z)|0)+(sa>>>16)|0)+(ta>>>16)|0;ia=ta<<16|ra&65535;ra=((f(A,S)|0)+(ja&65535)|0)+(wa&65535)|0;sa=((f(I,S)|0)+(ja>>>16)|0)+(wa>>>16)|0;ta=((f(A,$)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(I,$)|0)+(sa>>>16)|0)+(ta>>>16)|0;ja=ta<<16|ra&65535;ra=((f(A,T)|0)+(ka&65535)|0)+(wa&65535)|0;sa=((f(I,T)|0)+(ka>>>16)|0)+(wa>>>16)|0;ta=((f(A,_)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(I,_)|0)+(sa>>>16)|0)+(ta>>>16)|0;ka=ta<<16|ra&65535;ra=((f(A,U)|0)+(la&65535)|0)+(wa&65535)|0;sa=((f(I,U)|0)+(la>>>16)|0)+(wa>>>16)|0;ta=((f(A,aa)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(I,aa)|0)+(sa>>>16)|0)+(ta>>>16)|0;la=ta<<16|ra&65535;ma=wa;ra=((f(B,N)|0)+(fa&65535)|0)+(na&65535)|0;sa=((f(J,N)|0)+(fa>>>16)|0)+(na>>>16)|0;ta=((f(B,V)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(J,V)|0)+(sa>>>16)|0)+(ta>>>16)|0;fa=ta<<16|ra&65535;ra=((f(B,O)|0)+(ga&65535)|0)+(wa&65535)|0;sa=((f(J,O)|0)+(ga>>>16)|0)+(wa>>>16)|0;ta=((f(B,W)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(J,W)|0)+(sa>>>16)|0)+(ta>>>16)|0;ga=ta<<16|ra&65535;ra=((f(B,P)|0)+(ha&65535)|0)+(wa&65535)|0;sa=((f(J,P)|0)+(ha>>>16)|0)+(wa>>>16)|0;ta=((f(B,X)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(J,X)|0)+(sa>>>16)|0)+(ta>>>16)|0;ha=ta<<16|ra&65535;ra=((f(B,Q)|0)+(ia&65535)|0)+(wa&65535)|0;sa=((f(J,Q)|0)+(ia>>>16)|0)+(wa>>>16)|0;ta=((f(B,Y)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(J,Y)|0)+(sa>>>16)|0)+(ta>>>16)|0;ia=ta<<16|ra&65535;ra=((f(B,R)|0)+(ja&65535)|0)+(wa&65535)|0;sa=((f(J,R)|0)+(ja>>>16)|0)+(wa>>>16)|0;ta=((f(B,Z)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(J,Z)|0)+(sa>>>16)|0)+(ta>>>16)|0;ja=ta<<16|ra&65535;ra=((f(B,S)|0)+(ka&65535)|0)+(wa&65535)|0;sa=((f(J,S)|0)+(ka>>>16)|0)+(wa>>>16)|0;ta=((f(B,$)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(J,$)|0)+(sa>>>16)|0)+(ta>>>16)|0;ka=ta<<16|ra&65535;ra=((f(B,T)|0)+(la&65535)|0)+(wa&65535)|0;sa=((f(J,T)|0)+(la>>>16)|0)+(wa>>>16)|0;ta=((f(B,_)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(J,_)|0)+(sa>>>16)|0)+(ta>>>16)|0;la=ta<<16|ra&65535;ra=((f(B,U)|0)+(ma&65535)|0)+(wa&65535)|0;sa=((f(J,U)|0)+(ma>>>16)|0)+(wa>>>16)|0;ta=((f(B,aa)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(J,aa)|0)+(sa>>>16)|0)+(ta>>>16)|0;ma=ta<<16|ra&65535;na=wa;ra=((f(C,N)|0)+(ga&65535)|0)+(oa&65535)|0;sa=((f(K,N)|0)+(ga>>>16)|0)+(oa>>>16)|0;ta=((f(C,V)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(K,V)|0)+(sa>>>16)|0)+(ta>>>16)|0;ga=ta<<16|ra&65535;ra=((f(C,O)|0)+(ha&65535)|0)+(wa&65535)|0;sa=((f(K,O)|0)+(ha>>>16)|0)+(wa>>>16)|0;ta=((f(C,W)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(K,W)|0)+(sa>>>16)|0)+(ta>>>16)|0;ha=ta<<16|ra&65535;ra=((f(C,P)|0)+(ia&65535)|0)+(wa&65535)|0;sa=((f(K,P)|0)+(ia>>>16)|0)+(wa>>>16)|0;ta=((f(C,X)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(K,X)|0)+(sa>>>16)|0)+(ta>>>16)|0;ia=ta<<16|ra&65535;ra=((f(C,Q)|0)+(ja&65535)|0)+(wa&65535)|0;sa=((f(K,Q)|0)+(ja>>>16)|0)+(wa>>>16)|0;ta=((f(C,Y)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(K,Y)|0)+(sa>>>16)|0)+(ta>>>16)|0;ja=ta<<16|ra&65535;ra=((f(C,R)|0)+(ka&65535)|0)+(wa&65535)|0;sa=((f(K,R)|0)+(ka>>>16)|0)+(wa>>>16)|0;ta=((f(C,Z)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(K,Z)|0)+(sa>>>16)|0)+(ta>>>16)|0;ka=ta<<16|ra&65535;ra=((f(C,S)|0)+(la&65535)|0)+(wa&65535)|0;sa=((f(K,S)|0)+(la>>>16)|0)+(wa>>>16)|0;ta=((f(C,$)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(K,$)|0)+(sa>>>16)|0)+(ta>>>16)|0;la=ta<<16|ra&65535;ra=((f(C,T)|0)+(ma&65535)|0)+(wa&65535)|0;sa=((f(K,T)|0)+(ma>>>16)|0)+(wa>>>16)|0;ta=((f(C,_)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(K,_)|0)+(sa>>>16)|0)+(ta>>>16)|0;ma=ta<<16|ra&65535;ra=((f(C,U)|0)+(na&65535)|0)+(wa&65535)|0;sa=((f(K,U)|0)+(na>>>16)|0)+(wa>>>16)|0;ta=((f(C,aa)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(K,aa)|0)+(sa>>>16)|0)+(ta>>>16)|0;na=ta<<16|ra&65535;oa=wa;ra=((f(D,N)|0)+(ha&65535)|0)+(pa&65535)|0;sa=((f(L,N)|0)+(ha>>>16)|0)+(pa>>>16)|0;ta=((f(D,V)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(L,V)|0)+(sa>>>16)|0)+(ta>>>16)|0;ha=ta<<16|ra&65535;ra=((f(D,O)|0)+(ia&65535)|0)+(wa&65535)|0;sa=((f(L,O)|0)+(ia>>>16)|0)+(wa>>>16)|0;ta=((f(D,W)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(L,W)|0)+(sa>>>16)|0)+(ta>>>16)|0;ia=ta<<16|ra&65535;ra=((f(D,P)|0)+(ja&65535)|0)+(wa&65535)|0;sa=((f(L,P)|0)+(ja>>>16)|0)+(wa>>>16)|0;ta=((f(D,X)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(L,X)|0)+(sa>>>16)|0)+(ta>>>16)|0;ja=ta<<16|ra&65535;ra=((f(D,Q)|0)+(ka&65535)|0)+(wa&65535)|0;sa=((f(L,Q)|0)+(ka>>>16)|0)+(wa>>>16)|0;ta=((f(D,Y)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(L,Y)|0)+(sa>>>16)|0)+(ta>>>16)|0;ka=ta<<16|ra&65535;ra=((f(D,R)|0)+(la&65535)|0)+(wa&65535)|0;sa=((f(L,R)|0)+(la>>>16)|0)+(wa>>>16)|0;ta=((f(D,Z)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(L,Z)|0)+(sa>>>16)|0)+(ta>>>16)|0;la=ta<<16|ra&65535;ra=((f(D,S)|0)+(ma&65535)|0)+(wa&65535)|0;sa=((f(L,S)|0)+(ma>>>16)|0)+(wa>>>16)|0;ta=((f(D,$)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(L,$)|0)+(sa>>>16)|0)+(ta>>>16)|0;ma=ta<<16|ra&65535;ra=((f(D,T)|0)+(na&65535)|0)+(wa&65535)|0;sa=((f(L,T)|0)+(na>>>16)|0)+(wa>>>16)|0;ta=((f(D,_)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(L,_)|0)+(sa>>>16)|0)+(ta>>>16)|0;na=ta<<16|ra&65535;ra=((f(D,U)|0)+(oa&65535)|0)+(wa&65535)|0;sa=((f(L,U)|0)+(oa>>>16)|0)+(wa>>>16)|0;ta=((f(D,aa)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(L,aa)|0)+(sa>>>16)|0)+(ta>>>16)|0;oa=ta<<16|ra&65535;pa=wa;ra=((f(E,N)|0)+(ia&65535)|0)+(qa&65535)|0;sa=((f(M,N)|0)+(ia>>>16)|0)+(qa>>>16)|0;ta=((f(E,V)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(M,V)|0)+(sa>>>16)|0)+(ta>>>16)|0;ia=ta<<16|ra&65535;ra=((f(E,O)|0)+(ja&65535)|0)+(wa&65535)|0;sa=((f(M,O)|0)+(ja>>>16)|0)+(wa>>>16)|0;ta=((f(E,W)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(M,W)|0)+(sa>>>16)|0)+(ta>>>16)|0;ja=ta<<16|ra&65535;ra=((f(E,P)|0)+(ka&65535)|0)+(wa&65535)|0;sa=((f(M,P)|0)+(ka>>>16)|0)+(wa>>>16)|0;ta=((f(E,X)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(M,X)|0)+(sa>>>16)|0)+(ta>>>16)|0;ka=ta<<16|ra&65535;ra=((f(E,Q)|0)+(la&65535)|0)+(wa&65535)|0;sa=((f(M,Q)|0)+(la>>>16)|0)+(wa>>>16)|0;ta=((f(E,Y)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(M,Y)|0)+(sa>>>16)|0)+(ta>>>16)|0;la=ta<<16|ra&65535;ra=((f(E,R)|0)+(ma&65535)|0)+(wa&65535)|0;sa=((f(M,R)|0)+(ma>>>16)|0)+(wa>>>16)|0;ta=((f(E,Z)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(M,Z)|0)+(sa>>>16)|0)+(ta>>>16)|0;ma=ta<<16|ra&65535;ra=((f(E,S)|0)+(na&65535)|0)+(wa&65535)|0;sa=((f(M,S)|0)+(na>>>16)|0)+(wa>>>16)|0;ta=((f(E,$)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(M,$)|0)+(sa>>>16)|0)+(ta>>>16)|0;na=ta<<16|ra&65535;ra=((f(E,T)|0)+(oa&65535)|0)+(wa&65535)|0;sa=((f(M,T)|0)+(oa>>>16)|0)+(wa>>>16)|0;ta=((f(E,_)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(M,_)|0)+(sa>>>16)|0)+(ta>>>16)|0;oa=ta<<16|ra&65535;ra=((f(E,U)|0)+(pa&65535)|0)+(wa&65535)|0;sa=((f(M,U)|0)+(pa>>>16)|0)+(wa>>>16)|0;ta=((f(E,aa)|0)+(sa&65535)|0)+(ra>>>16)|0;wa=((f(M,aa)|0)+(sa>>>16)|0)+(ta>>>16)|0;pa=ta<<16|ra&65535;qa=wa;Da=ya+(Ba+Ca|0)|0;xa=e[Ga+Da>>2]|0;ra=((xa&65535)+((ba&65535)<<1)|0)+ua|0;ta=((xa>>>16)+(ba>>>16<<1)|0)+(ra>>>16)|0;e[Ga+Da>>2]=ta<<16|ra&65535;ua=ta>>>16;Da=Da+4|0;xa=e[Ga+Da>>2]|0;ra=((xa&65535)+((ca&65535)<<1)|0)+ua|0;ta=((xa>>>16)+(ca>>>16<<1)|0)+(ra>>>16)|0;e[Ga+Da>>2]=ta<<16|ra&65535;ua=ta>>>16;Da=Da+4|0;xa=e[Ga+Da>>2]|0;ra=((xa&65535)+((da&65535)<<1)|0)+ua|0;ta=((xa>>>16)+(da>>>16<<1)|0)+(ra>>>16)|0;e[Ga+Da>>2]=ta<<16|ra&65535;ua=ta>>>16;Da=Da+4|0;xa=e[Ga+Da>>2]|0;ra=((xa&65535)+((ea&65535)<<1)|0)+ua|0;ta=((xa>>>16)+(ea>>>16<<1)|0)+(ra>>>16)|0;e[Ga+Da>>2]=ta<<16|ra&65535;ua=ta>>>16;Da=Da+4|0;xa=e[Ga+Da>>2]|0;ra=((xa&65535)+((fa&65535)<<1)|0)+ua|0;ta=((xa>>>16)+(fa>>>16<<1)|0)+(ra>>>16)|0;e[Ga+Da>>2]=ta<<16|ra&65535;ua=ta>>>16;Da=Da+4|0;xa=e[Ga+Da>>2]|0;ra=((xa&65535)+((ga&65535)<<1)|0)+ua|0;ta=((xa>>>16)+(ga>>>16<<1)|0)+(ra>>>16)|0;e[Ga+Da>>2]=ta<<16|ra&65535;ua=ta>>>16;Da=Da+4|0;xa=e[Ga+Da>>2]|0;ra=((xa&65535)+((ha&65535)<<1)|0)+ua|0;ta=((xa>>>16)+(ha>>>16<<1)|0)+(ra>>>16)|0;e[Ga+Da>>2]=ta<<16|ra&65535;ua=ta>>>16;Da=Da+4|0;xa=e[Ga+Da>>2]|0;ra=((xa&65535)+((ia&65535)<<1)|0)+ua|0;ta=((xa>>>16)+(ia>>>16<<1)|0)+(ra>>>16)|0;e[Ga+Da>>2]=ta<<16|ra&65535;ua=ta>>>16}Da=ya+(Ba+Ca|0)|0;xa=e[Ga+Da>>2]|0;ra=(((xa&65535)+((ja&65535)<<1)|0)+ua|0)+va|0;ta=((xa>>>16)+(ja>>>16<<1)|0)+(ra>>>16)|0;e[Ga+Da>>2]=ta<<16|ra&65535;ua=ta>>>16;Da=Da+4|0;xa=e[Ga+Da>>2]|0;ra=((xa&65535)+((ka&65535)<<1)|0)+ua|0;ta=((xa>>>16)+(ka>>>16<<1)|0)+(ra>>>16)|0;e[Ga+Da>>2]=ta<<16|ra&65535;ua=ta>>>16;Da=Da+4|0;xa=e[Ga+Da>>2]|0;ra=((xa&65535)+((la&65535)<<1)|0)+ua|0;ta=((xa>>>16)+(la>>>16<<1)|0)+(ra>>>16)|0;e[Ga+Da>>2]=ta<<16|ra&65535;ua=ta>>>16;Da=Da+4|0;xa=e[Ga+Da>>2]|0;ra=((xa&65535)+((ma&65535)<<1)|0)+ua|0;ta=((xa>>>16)+(ma>>>16<<1)|0)+(ra>>>16)|0;e[Ga+Da>>2]=ta<<16|ra&65535;ua=ta>>>16;Da=Da+4|0;xa=e[Ga+Da>>2]|0;ra=((xa&65535)+((na&65535)<<1)|0)+ua|0;ta=((xa>>>16)+(na>>>16<<1)|0)+(ra>>>16)|0;e[Ga+Da>>2]=ta<<16|ra&65535;ua=ta>>>16;Da=Da+4|0;xa=e[Ga+Da>>2]|0;ra=((xa&65535)+((oa&65535)<<1)|0)+ua|0;ta=((xa>>>16)+(oa>>>16<<1)|0)+(ra>>>16)|0;e[Ga+Da>>2]=ta<<16|ra&65535;ua=ta>>>16;Da=Da+4|0;xa=e[Ga+Da>>2]|0;ra=((xa&65535)+((pa&65535)<<1)|0)+ua|0;ta=((xa>>>16)+(pa>>>16<<1)|0)+(ra>>>16)|0;e[Ga+Da>>2]=ta<<16|ra&65535;ua=ta>>>16;Da=Da+4|0;xa=e[Ga+Da>>2]|0;ra=((xa&65535)+((qa&65535)<<1)|0)+ua|0;ta=((xa>>>16)+(qa>>>16<<1)|0)+(ra>>>16)|0;e[Ga+Da>>2]=ta<<16|ra&65535;va=ta>>>16}for(Da=Da+4|0;!!va&(Da|0)>2]|0;ra=(xa&65535)+va|0;ta=(xa>>>16)+(ra>>>16)|0;e[Ga+Da>>2]=ta<<16|ra&65535;va=ta>>>16}}}}function s(u,v,w,x,y){u=u|0;v=v|0;w=w|0;x=x|0;y=y|0;var z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0;for(P=v-1&-4;(P|0)>=0;P=P-4|0){z=e[u+P>>2]|0;if(z){v=P;break}}for(P=x-1&-4;(P|0)>=0;P=P-4|0){A=e[w+P>>2]|0;if(A){x=P;break}}while((A&2147483648)==0){A=A<<1;B=B+1|0}D=e[u+v>>2]|0;if(B){C=D>>>(32-B|0);for(P=v-4|0;(P|0)>=0;P=P-4|0){z=e[u+P>>2]|0;e[u+P+4>>2]=D<>>(32-B|0):0);D=z}e[u>>2]=D<>2]|0;for(P=x-4|0;(P|0)>=0;P=P-4|0){A=e[w+P>>2]|0;e[w+P+4>>2]=E<>>(32-B|0);E=A}e[w>>2]=E<>2]|0;F=E>>>16,G=E&65535;for(P=v;(P|0)>=(x|0);P=P-4|0){Q=P-x|0;D=e[u+P>>2]|0;H=(C>>>0)/(F>>>0)|0,J=(C>>>0)%(F>>>0)|0,L=f(H,G)|0;while((H|0)==65536|L>>>0>(J<<16|D>>>16)>>>0){H=H-1|0,J=J+F|0,L=L-G|0;if((J|0)>=65536)break}N=0,O=0;for(R=0;(R|0)<=(x|0);R=R+4|0){A=e[w+R>>2]|0;L=(f(H,A&65535)|0)+(N>>>16)|0;M=(f(H,A>>>16)|0)+(L>>>16)|0;A=N&65535|L<<16;N=M;z=e[u+Q+R>>2]|0;L=((z&65535)-(A&65535)|0)+O|0;M=((z>>>16)-(A>>>16)|0)+(L>>16)|0;e[u+Q+R>>2]=M<<16|L&65535;O=M>>16}L=((C&65535)-(N&65535)|0)+O|0;M=((C>>>16)-(N>>>16)|0)+(L>>16)|0;C=M<<16|L&65535;O=M>>16;if(O){H=H-1|0;O=0;for(R=0;(R|0)<=(x|0);R=R+4|0){A=e[w+R>>2]|0;z=e[u+Q+R>>2]|0;L=(z&65535)+O|0;M=(z>>>16)+A+(L>>>16)|0;e[u+Q+R>>2]=M<<16|L&65535;O=M>>>16}C=C+O|0}D=e[u+P>>2]|0;z=C<<16|D>>>16;I=(z>>>0)/(F>>>0)|0,K=(z>>>0)%(F>>>0)|0,L=f(I,G)|0;while((I|0)==65536|L>>>0>(K<<16|D&65535)>>>0){I=I-1|0,K=K+F|0,L=L-G|0;if((K|0)>=65536)break}N=0,O=0;for(R=0;(R|0)<=(x|0);R=R+4|0){A=e[w+R>>2]|0;L=(f(I,A&65535)|0)+(N&65535)|0;M=((f(I,A>>>16)|0)+(L>>>16)|0)+(N>>>16)|0;A=L&65535|M<<16;N=M>>>16;z=e[u+Q+R>>2]|0;L=((z&65535)-(A&65535)|0)+O|0;M=((z>>>16)-(A>>>16)|0)+(L>>16)|0;O=M>>16;e[u+Q+R>>2]=M<<16|L&65535}L=((C&65535)-(N&65535)|0)+O|0;M=((C>>>16)-(N>>>16)|0)+(L>>16)|0;O=M>>16;if(O){I=I-1|0;O=0;for(R=0;(R|0)<=(x|0);R=R+4|0){A=e[w+R>>2]|0;z=e[u+Q+R>>2]|0;L=((z&65535)+(A&65535)|0)+O|0;M=((z>>>16)+(A>>>16)|0)+(L>>>16)|0;O=M>>>16;e[u+Q+R>>2]=L&65535|M<<16}}e[y+Q>>2]=H<<16|I;C=e[u+P>>2]|0}if(B){D=e[u>>2]|0;for(P=4;(P|0)<=(x|0);P=P+4|0){z=e[u+P>>2]|0;e[u+P-4>>2]=z<<(32-B|0)|D>>>B;D=z}e[u+x>>2]=D>>>B}}function t(u,v,w,x,y,z){u=u|0;v=v|0;w=w|0;x=x|0;y=y|0;z=z|0;var A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0;A=h(x<<1)|0;k(x<<1,0,A);j(v,u,A);for(L=0;(L|0)<(x|0);L=L+4|0){C=e[A+L>>2]|0,D=C&65535,C=C>>>16;F=y>>>16,E=y&65535;G=f(D,E)|0,H=((f(D,F)|0)+(f(C,E)|0)|0)+(G>>>16)|0;D=G&65535,C=H&65535;K=0;for(M=0;(M|0)<(x|0);M=M+4|0){N=L+M|0;F=e[w+M>>2]|0,E=F&65535,F=F>>>16;J=e[A+N>>2]|0;G=((f(D,E)|0)+(K&65535)|0)+(J&65535)|0;H=((f(D,F)|0)+(K>>>16)|0)+(J>>>16)|0;I=((f(C,E)|0)+(H&65535)|0)+(G>>>16)|0;K=((f(C,F)|0)+(I>>>16)|0)+(H>>>16)|0;J=I<<16|G&65535;e[A+N>>2]=J}N=L+M|0;J=e[A+N>>2]|0;G=((J&65535)+(K&65535)|0)+B|0;H=((J>>>16)+(K>>>16)|0)+(G>>>16)|0;e[A+N>>2]=H<<16|G&65535;B=H>>>16}j(x,A+x|0,z);i(x<<1);if(B|(m(w,x,z,x)|0)<=0){p(z,x,w,x,z,x)|0}}return{sreset:g,salloc:h,sfree:i,z:k,tst:n,neg:l,cmp:m,add:o,sub:p,mul:q,sqr:r,div:s,mredc:t}}function wa(a){return a instanceof ya}function xa(a,b){return a*b|0}function ya(a){var b=Kb,c=0,d=0;if(n(a)&&(a=f(a)),o(a)&&(a=new Uint8Array(a)),void 0===a);else if(m(a)){var e=Math.abs(a);e>4294967295?(b=new Uint32Array(2),b[0]=0|e,b[1]=e/4294967296|0,c=52):e>0?(b=new Uint32Array(1),b[0]=e,c=32):(b=Kb,c=0),d=0>a?-1:1}else if(p(a)){for(var g=0;!a[g];g++);if(c=8*(a.length-g),!c)return Mb;b=new Uint32Array(c+31>>5);for(var h=a.length-4;h>=g;h-=4)b[a.length-4-h>>2]=a[h]<<24|a[h+1]<<16|a[h+2]<<8|a[h+3];g-h===3?b[b.length-1]=a[g]:g-h===2?b[b.length-1]=a[g]<<8|a[g+1]:g-h===1&&(b[b.length-1]=a[g]<<16|a[g+1]<<8|a[g+2]),d=1}else{if("object"!=typeof a||null===a)throw new TypeError("number is of unexpected type");b=new Uint32Array(a.limbs),c=a.bitLength,d=a.sign}this.limbs=b,this.bitLength=c,this.sign=d}function za(a){a=a||16;var b=this.limbs,c=this.bitLength,e="";if(16!==a)throw new d("bad radix");for(var f=(c+31>>5)-1;f>=0;f--){var g=b[f].toString(16);e+="00000000".substr(g.length),e+=g}return e=e.replace(/^0+/,""),e.length||(e="0"),this.sign<0&&(e="-"+e),e}function Aa(){var a=this.bitLength,b=this.limbs;if(0===a)return new Uint8Array(0);for(var c=a+7>>3,d=new Uint8Array(c),e=0;c>e;e++){var f=c-e-1;d[e]=b[f>>2]>>((3&f)<<3)}return d}function Ba(){var a=this.limbs,b=this.bitLength,c=this.sign;if(!c)return 0;if(32>=b)return c*(a[0]>>>0);if(52>=b)return c*(4294967296*(a[1]>>>0)+(a[0]>>>0));var d,e,f=0;for(d=a.length-1;d>=0;d--)if(0!==(e=a[d])){for(;0===(e<>>0):c*(1048576*((a[d]<>>32-f:0))>>>0)+((a[d-1]<1?a[d-2]>>>32-f:0))>>>12))*Math.pow(2,32*d-f-52)}function Ca(a){var b=this.limbs,c=this.bitLength;if(a>=c)return this;var d=new ya,e=a+31>>5,f=a%32;return d.limbs=new Uint32Array(b.subarray(0,e)),d.bitLength=a,d.sign=this.sign,f&&(d.limbs[e-1]&=-1>>>32-f),d}function Da(a,b){if(!m(a))throw new TypeError("TODO");if(void 0!==b&&!m(b))throw new TypeError("TODO");var c=this.limbs,d=this.bitLength;if(0>a)throw new RangeError("TODO");if(a>=d)return Mb;(void 0===b||b>d-a)&&(b=d-a);var e,f=new ya,g=a>>5,h=a+b+31>>5,i=b+31>>5,j=a%32,k=b%32;if(e=new Uint32Array(i),j){for(var l=0;h-g-1>l;l++)e[l]=c[g+l]>>>j|c[g+l+1]<<32-j;e[l]=c[g+l]>>>j}else e.set(c.subarray(g,h));return k&&(e[i-1]&=-1>>>32-k),f.limbs=e,f.bitLength=b,f.sign=this.sign,f}function Ea(){var a=new ya;return a.limbs=this.limbs,a.bitLength=this.bitLength,a.sign=-1*this.sign,a}function Fa(a){wa(a)||(a=new ya(a));var b=this.limbs,c=b.length,d=a.limbs,e=d.length,f=0;return this.signa.sign?1:(Jb.set(b,0),Jb.set(d,c),f=Hb.cmp(0,c<<2,c<<2,e<<2),f*this.sign)}function Ga(a){if(wa(a)||(a=new ya(a)),!this.sign)return a;if(!a.sign)return this;var b,c,d,e,f=this.bitLength,g=this.limbs,h=g.length,i=this.sign,j=a.bitLength,k=a.limbs,l=k.length,m=a.sign,n=new ya;b=(f>j?f:j)+(i*m>0?1:0),c=b+31>>5,Hb.sreset();var o=Hb.salloc(h<<2),p=Hb.salloc(l<<2),q=Hb.salloc(c<<2);return Hb.z(q-o+(c<<2),0,o),Jb.set(g,o>>2),Jb.set(k,p>>2),i*m>0?(Hb.add(o,h<<2,p,l<<2,q,c<<2),d=i):i>m?(e=Hb.sub(o,h<<2,p,l<<2,q,c<<2),d=e?m:i):(e=Hb.sub(p,l<<2,o,h<<2,q,c<<2),d=e?i:m),e&&Hb.neg(q,c<<2,q,c<<2),0===Hb.tst(q,c<<2)?Mb:(n.limbs=new Uint32Array(Jb.subarray(q>>2,(q>>2)+c)),n.bitLength=b,n.sign=d,n)}function Ha(a){return wa(a)||(a=new ya(a)),this.add(a.negate())}function Ia(a){if(wa(a)||(a=new ya(a)),!this.sign||!a.sign)return Mb;var b,c,d=this.bitLength,e=this.limbs,f=e.length,g=a.bitLength,h=a.limbs,i=h.length,j=new ya;b=d+g,c=b+31>>5,Hb.sreset();var k=Hb.salloc(f<<2),l=Hb.salloc(i<<2),m=Hb.salloc(c<<2);return Hb.z(m-k+(c<<2),0,k),Jb.set(e,k>>2),Jb.set(h,l>>2),Hb.mul(k,f<<2,l,i<<2,m,c<<2),j.limbs=new Uint32Array(Jb.subarray(m>>2,(m>>2)+c)),j.sign=this.sign*a.sign,j.bitLength=b,j}function Ja(){if(!this.sign)return Mb;var a,b,c=this.bitLength,d=this.limbs,e=d.length,f=new ya;a=c<<1,b=a+31>>5,Hb.sreset();var g=Hb.salloc(e<<2),h=Hb.salloc(b<<2);return Hb.z(h-g+(b<<2),0,g),Jb.set(d,g>>2),Hb.sqr(g,e<<2,h),f.limbs=new Uint32Array(Jb.subarray(h>>2,(h>>2)+b)),f.bitLength=a,f.sign=1,f}function Ka(a){wa(a)||(a=new ya(a));var b,c,d=this.bitLength,e=this.limbs,f=e.length,g=a.bitLength,h=a.limbs,i=h.length,j=Mb,k=Mb;Hb.sreset();var l=Hb.salloc(f<<2),m=Hb.salloc(i<<2),n=Hb.salloc(f<<2);return Hb.z(n-l+(f<<2),0,l),Jb.set(e,l>>2),Jb.set(h,m>>2),Hb.div(l,f<<2,m,i<<2,n),b=Hb.tst(n,f<<2)>>2,b&&(j=new ya,j.limbs=new Uint32Array(Jb.subarray(n>>2,(n>>2)+b)),j.bitLength=b<<5>d?d:b<<5,j.sign=this.sign*a.sign),c=Hb.tst(l,i<<2)>>2,c&&(k=new ya,k.limbs=new Uint32Array(Jb.subarray(l>>2,(l>>2)+c)),k.bitLength=c<<5>g?g:c<<5,k.sign=this.sign),{quotient:j,remainder:k}}function La(a,b){var c,d,e,f,g=0>a?-1:1,h=0>b?-1:1,i=1,j=0,k=0,l=1;for(a*=g,b*=h,f=b>a,f&&(e=a,a=b,b=e,e=g,g=h,h=e),d=Math.floor(a/b),c=a-d*b;c;)e=i-d*j,i=j,j=e,e=k-d*l,k=l,l=e,a=b,b=c,d=Math.floor(a/b),c=a-d*b;return j*=g,l*=h,f&&(e=j,j=l,l=e),{gcd:b,x:j,y:l}}function Ma(a,b){wa(a)||(a=new ya(a)),wa(b)||(b=new ya(b));var c=a.sign,d=b.sign;0>c&&(a=a.negate()),0>d&&(b=b.negate());var e=a.compare(b);if(0>e){var f=a;a=b,b=f,f=c,c=d,d=f}var g,h,i,j=Nb,k=Mb,l=b.bitLength,m=Mb,n=Nb,o=a.bitLength;for(g=a.divide(b);(h=g.remainder)!==Mb;)i=g.quotient,g=j.subtract(i.multiply(k).clamp(l)).clamp(l),j=k,k=g,g=m.subtract(i.multiply(n).clamp(o)).clamp(o),m=n,n=g,a=b,b=h,g=a.divide(b);if(0>c&&(k=k.negate()),0>d&&(n=n.negate()),0>e){var f=k;k=n,n=f}return{gcd:b,x:k,y:n}}function Na(){if(ya.apply(this,arguments),this.valueOf()<1)throw new RangeError;if(!(this.bitLength<=32)){var a;if(1&this.limbs[0]){var b=(this.bitLength+31&-32)+1,c=new Uint32Array(b+31>>5);c[c.length-1]=1,a=new ya,a.sign=1,a.bitLength=b,a.limbs=c;var d=La(4294967296,this.limbs[0]).y;this.coefficient=0>d?-d:4294967296-d,this.comodulus=a,this.comodulusRemainder=a.divide(this).remainder,this.comodulusRemainderSquare=a.square().divide(this).remainder}}}function Oa(a){return wa(a)||(a=new ya(a)),a.bitLength<=32&&this.bitLength<=32?new ya(a.valueOf()%this.valueOf()):a.compare(this)<0?a:a.divide(this).remainder}function Pa(a){a=this.reduce(a);var b=Ma(this,a);return 1!==b.gcd.valueOf()?null:(b=b.y,b.sign<0&&(b=b.add(this).clamp(this.bitLength)),b)}function Qa(a,b){wa(a)||(a=new ya(a)),wa(b)||(b=new ya(b));for(var c=0,d=0;d>>=1;var f=8;b.bitLength<=4536&&(f=7),b.bitLength<=1736&&(f=6),b.bitLength<=630&&(f=5),b.bitLength<=210&&(f=4),b.bitLength<=60&&(f=3),b.bitLength<=12&&(f=2),1<=c&&(f=1),a=Ra(this.reduce(a).multiply(this.comodulusRemainderSquare),this);var g=Ra(a.square(),this),h=new Array(1<d;d++)h[d]=Ra(h[d-1].multiply(g),this);for(var i=this.comodulusRemainder,j=i,d=b.limbs.length-1;d>=0;d--)for(var e=b.limbs[d],k=32;k>0;)if(2147483648&e){for(var l=e>>>32-f,m=f;0===(1&l);)l>>>=1,m--;for(var n=h[l>>>1];l;)l>>>=1,j!==i&&(j=Ra(j.square(),this));j=j!==i?Ra(j.multiply(n),this):n,e<<=m,k-=m}else j!==i&&(j=Ra(j.square(),this)),e<<=1,k--;return j=Ra(j,this)}function Ra(a,b){var c=a.limbs,d=c.length,e=b.limbs,f=e.length,g=b.coefficient;Hb.sreset();var h=Hb.salloc(d<<2),i=Hb.salloc(f<<2),j=Hb.salloc(f<<2);Hb.z(j-h+(f<<2),0,h),Jb.set(c,h>>2),Jb.set(e,i>>2),Hb.mredc(h,d<<2,i,f<<2,g,j);var k=new ya;return k.limbs=new Uint32Array(Jb.subarray(j>>2,(j>>2)+f)),k.bitLength=b.bitLength,k.sign=1,k}function Sa(a){var b=new ya(this),c=0;for(b.limbs[0]-=1;0===b.limbs[c>>5];)c+=32;for(;0===(b.limbs[c>>5]>>(31&c)&1);)c++;b=b.slice(c);for(var d=new Na(this),e=this.subtract(Nb),f=new ya(this),g=this.limbs.length-1;0===f.limbs[g];)g--;for(;--a>=0;){for(ta(f.limbs),f.limbs[0]<2&&(f.limbs[0]+=2);f.compare(e)>=0;)f.limbs[g]>>>=1;var h=d.power(f,b);if(0!==h.compare(Nb)&&0!==h.compare(e)){for(var i=c;--i>0;){if(h=h.square().divide(d).remainder,0===h.compare(Nb))return!1;if(0===h.compare(e))break}if(0===i)return!1}}return!0}function Ta(a){a=a||80;var b=this.limbs,c=0;if(0===(1&b[0]))return!1;if(1>=a)return!0;var d=0,e=0,f=0;for(c=0;c>>=2;for(var h=b[c];h;)e+=3&h,h>>>=2,e-=3&h,h>>>=2;for(var i=b[c];i;)f+=15&i,i>>>=4,f-=15&i,i>>>=4}return d%3&&e%5&&f%17?2>=a?!0:Sa.call(this,a>>>1):!1}function Ua(a){if(Pb.length>=a)return Pb.slice(0,a);for(var b=Pb[Pb.length-1]+2;Pb.length=d*d&&b%d!=0;d=Pb[++c]);d*d>b&&Pb.push(b)}return Pb}function Va(a,c){var d=a+31>>5,e=new ya({sign:1,bitLength:a,limbs:d}),f=e.limbs,g=1e4;512>=a&&(g=2200),256>=a&&(g=600);var h=Ua(g),i=new Uint32Array(g),j=a*b.Math.LN2|0,k=27;for(a>=250&&(k=12),a>=450&&(k=6),a>=850&&(k=3),a>=1300&&(k=2);;){ta(f),f[0]|=1,f[d-1]|=1<<(a-1&31),31&a&&(f[d-1]&=l(a+1&31)-1),i[0]=1;for(var m=1;g>m;m++)i[m]=e.divide(h[m]).remainder.valueOf();a:for(var n=0;j>n;n+=2,f[0]+=2){for(var m=1;g>m;m++)if((i[m]+n)%h[m]===0)continue a;if(("function"!=typeof c||c(e))&&Sa.call(e,k))return e}}}c.prototype=Object.create(Error.prototype,{name:{value:"IllegalStateError"}}),d.prototype=Object.create(Error.prototype,{name:{value:"IllegalArgumentError"}}),e.prototype=Object.create(Error.prototype,{name:{value:"SecurityError"}});var Wa=b.Float64Array||b.Float32Array;a.string_to_bytes=f,a.hex_to_bytes=g,a.base64_to_bytes=h,a.bytes_to_string=i,a.bytes_to_hex=j,a.bytes_to_base64=k,b.IllegalStateError=c,b.IllegalArgumentError=d,b.SecurityError=e;var Xa=function(){"use strict";function a(){e=[],f=[];var a,b,c=1;for(a=0;255>a;a++)e[a]=c,b=128&c,c<<=1,c&=255,128===b&&(c^=27),c^=e[a],f[e[a]]=a;e[255]=e[0],f[0]=0,k=!0}function b(a,b){var c=e[(f[a]+f[b])%255];return(0===a||0===b)&&(c=0),c}function c(a){var b=e[255-f[a]];return 0===a&&(b=0),b}function d(){function d(a){var b,d,e;for(d=e=c(a),b=0;4>b;b++)d=255&(d<<1|d>>>7),e^=d;return e^=99}k||a(),g=[],h=[],i=[[],[],[],[]],j=[[],[],[],[]];for(var e=0;256>e;e++){var f=d(e);g[e]=f,h[f]=e,i[0][e]=b(2,f)<<24|f<<16|f<<8|b(3,f),j[0][f]=b(14,e)<<24|b(9,e)<<16|b(13,e)<<8|b(11,e);for(var l=1;4>l;l++)i[l][e]=i[l-1][e]>>>8|i[l-1][e]<<24,j[l][f]=j[l-1][f]>>>8|j[l-1][f]<<24}}var e,f,g,h,i,j,k=!1,l=!1,m=function(a,b,c){function e(a,b,c,d,e,h,i,k,l){var m=f.subarray(0,60),o=f.subarray(256,316);m.set([b,c,d,e,h,i,k,l]);for(var p=a,q=1;4*a+28>p;p++){var r=m[p-1];(p%a===0||8===a&&p%a===4)&&(r=g[r>>>24]<<24^g[r>>>16&255]<<16^g[r>>>8&255]<<8^g[255&r]),p%a===0&&(r=r<<8^r>>>24^q<<24,q=q<<1^(128&q?27:0)),m[p]=m[p-a]^r}for(var s=0;p>s;s+=4)for(var t=0;4>t;t++){var r=m[p-(4+s)+(4-t)%4];4>s||s>=p-4?o[s+t]=r:o[s+t]=j[0][g[r>>>24]]^j[1][g[r>>>16&255]]^j[2][g[r>>>8&255]]^j[3][g[255&r]]}n.set_rounds(a+5)}l||d();var f=new Uint32Array(c);f.set(g,512),f.set(h,768);for(var k=0;4>k;k++)f.set(i[k],4096+1024*k>>2),f.set(j[k],8192+1024*k>>2);var m={Uint8Array:Uint8Array,Uint32Array:Uint32Array},n=function(a,b,c){"use asm";var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;var y=new a.Uint32Array(c),z=new a.Uint8Array(c);function A(X,Y,Z,$,_,aa,ba,ca){X=X|0;Y=Y|0;Z=Z|0;$=$|0;_=_|0;aa=aa|0;ba=ba|0;ca=ca|0;var da=0,ea=0,fa=0,ga=0,ha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>>1|Z<<31,Z=Z>>>1|Y<<31,Y=Y>>>1|X<<31,X=X>>>1;if(ia)X=X^3774873600}h=da,i=ea,j=fa,k=ga}function K(X){X=X|0;x=X}function L(X,Y,Z,$){X=X|0;Y=Y|0;Z=Z|0;$=$|0;d=X,e=Y,f=Z,g=$}function M(X,Y,Z,$){X=X|0;Y=Y|0;Z=Z|0;$=$|0;h=X,i=Y,j=Z,k=$}function N(X,Y,Z,$){X=X|0;Y=Y|0;Z=Z|0;$=$|0;l=X,m=Y,n=Z,o=$}function O(X,Y,Z,$){X=X|0;Y=Y|0;Z=Z|0;$=$|0;p=X,q=Y,r=Z,s=$}function P(X,Y,Z,$){X=X|0;Y=Y|0;Z=Z|0;$=$|0;o=~s&o|s&$,n=~r&n|r&Z,m=~q&m|q&Y,l=~p&l|p&X}function Q(X){X=X|0;if(X&15)return-1;z[X|0]=d>>>24,z[X|1]=d>>>16&255,z[X|2]=d>>>8&255,z[X|3]=d&255,z[X|4]=e>>>24,z[X|5]=e>>>16&255,z[X|6]=e>>>8&255,z[X|7]=e&255,z[X|8]=f>>>24,z[X|9]=f>>>16&255,z[X|10]=f>>>8&255,z[X|11]=f&255,z[X|12]=g>>>24,z[X|13]=g>>>16&255,z[X|14]=g>>>8&255,z[X|15]=g&255;return 16}function R(X){X=X|0;if(X&15)return-1;z[X|0]=h>>>24,z[X|1]=h>>>16&255,z[X|2]=h>>>8&255,z[X|3]=h&255,z[X|4]=i>>>24,z[X|5]=i>>>16&255,z[X|6]=i>>>8&255,z[X|7]=i&255,z[X|8]=j>>>24,z[X|9]=j>>>16&255,z[X|10]=j>>>8&255,z[X|11]=j&255,z[X|12]=k>>>24,z[X|13]=k>>>16&255,z[X|14]=k>>>8&255,z[X|15]=k&255;return 16}function S(){B(0,0,0,0);t=d,u=e,v=f,w=g}function T(X,Y,Z){X=X|0;Y=Y|0;Z=Z|0;var $=0;if(Y&15)return-1;while((Z|0)>=16){V[X&7](z[Y|0]<<24|z[Y|1]<<16|z[Y|2]<<8|z[Y|3],z[Y|4]<<24|z[Y|5]<<16|z[Y|6]<<8|z[Y|7],z[Y|8]<<24|z[Y|9]<<16|z[Y|10]<<8|z[Y|11],z[Y|12]<<24|z[Y|13]<<16|z[Y|14]<<8|z[Y|15]);z[Y|0]=d>>>24,z[Y|1]=d>>>16&255,z[Y|2]=d>>>8&255,z[Y|3]=d&255,z[Y|4]=e>>>24,z[Y|5]=e>>>16&255,z[Y|6]=e>>>8&255,z[Y|7]=e&255,z[Y|8]=f>>>24,z[Y|9]=f>>>16&255,z[Y|10]=f>>>8&255,z[Y|11]=f&255,z[Y|12]=g>>>24,z[Y|13]=g>>>16&255,z[Y|14]=g>>>8&255,z[Y|15]=g&255;$=$+16|0,Y=Y+16|0,Z=Z-16|0}return $|0}function U(X,Y,Z){X=X|0;Y=Y|0;Z=Z|0;var $=0;if(Y&15)return-1;while((Z|0)>=16){W[X&1](z[Y|0]<<24|z[Y|1]<<16|z[Y|2]<<8|z[Y|3],z[Y|4]<<24|z[Y|5]<<16|z[Y|6]<<8|z[Y|7],z[Y|8]<<24|z[Y|9]<<16|z[Y|10]<<8|z[Y|11],z[Y|12]<<24|z[Y|13]<<16|z[Y|14]<<8|z[Y|15]);$=$+16|0,Y=Y+16|0,Z=Z-16|0}return $|0}var V=[B,C,D,E,F,G,H,I];var W=[D,J];return{set_rounds:K,set_state:L, -set_iv:M,set_nonce:N,set_mask:O,set_counter:P,get_state:Q,get_iv:R,gcm_init:S,cipher:T,mac:U}}(m,b,c);return n.set_key=e,n};return m.ENC={ECB:0,CBC:2,CFB:4,OFB:6,CTR:7},m.DEC={ECB:1,CBC:3,CFB:5,OFB:6,CTR:7},m.MAC={CBC:0,GCM:1},m.HEAP_DATA=16384,m}(),Ya=A.prototype;Ya.BLOCK_SIZE=16,Ya.reset=D,Ya.encrypt=z,Ya.decrypt=z;var Za=B.prototype;Za.BLOCK_SIZE=16,Za.reset=D,Za.process=y,Za.finish=z;var $a=68719476704,_a=F.prototype;_a.BLOCK_SIZE=16,_a.reset=I,_a.encrypt=L,_a.decrypt=O;var ab=G.prototype;ab.BLOCK_SIZE=16,ab.reset=I,ab.process=J,ab.finish=K;var bb=H.prototype;bb.BLOCK_SIZE=16,bb.reset=I,bb.process=M,bb.finish=N;var cb=new Uint8Array(1048576),db=Xa(b,null,cb.buffer);a.AES_GCM=F,a.AES_GCM.encrypt=P,a.AES_GCM.decrypt=Q,a.AES_GCM.Encrypt=G,a.AES_GCM.Decrypt=H;var eb=64,fb=32;V.BLOCK_SIZE=eb,V.HASH_SIZE=fb;var gb=V.prototype;gb.reset=R,gb.process=S,gb.finish=T;var hb=null;V.bytes=X,V.hex=Y,V.base64=Z,a.SHA256=V;var ib=$.prototype;ib.reset=ba,ib.process=ca,ib.finish=da,ea.BLOCK_SIZE=V.BLOCK_SIZE,ea.HMAC_SIZE=V.HASH_SIZE;var jb=ea.prototype;jb.reset=fa,jb.process=ca,jb.finish=ga;var kb=null;ea.bytes=ia,ea.hex=ja,ea.base64=ka,a.HMAC_SHA256=ea;var lb=la.prototype;lb.reset=ma,lb.generate=na;var mb=oa.prototype;mb.reset=ma,mb.generate=pa;var nb,ob=null,pb=function(){function a(){function a(){b^=d<<11,l=l+b|0,d=d+f|0,d^=f>>>2,m=m+d|0,f=f+l|0,f^=l<<8,n=n+f|0,l=l+m|0,l^=m>>>16,o=o+l|0,m=m+n|0,m^=n<<10,p=p+m|0,n=n+o|0,n^=o>>>4,b=b+n|0,o=o+p|0,o^=p<<8,d=d+o|0,p=p+b|0,p^=b>>>9,f=f+p|0,b=b+d|0}var b,d,f,l,m,n,o,p;h=i=j=0,b=d=f=l=m=n=o=p=2654435769;for(var q=0;4>q;q++)a();for(var q=0;256>q;q+=8)b=b+g[0|q]|0,d=d+g[1|q]|0,f=f+g[2|q]|0,l=l+g[3|q]|0,m=m+g[4|q]|0,n=n+g[5|q]|0,o=o+g[6|q]|0,p=p+g[7|q]|0,a(),e.set([b,d,f,l,m,n,o,p],q);for(var q=0;256>q;q+=8)b=b+e[0|q]|0,d=d+e[1|q]|0,f=f+e[2|q]|0,l=l+e[3|q]|0,m=m+e[4|q]|0,n=n+e[5|q]|0,o=o+e[6|q]|0,p=p+e[7|q]|0,a(),e.set([b,d,f,l,m,n,o,p],q);c(1),k=256}function b(b){var c,d,e,h,i;if(q(b))b=new Uint8Array(b.buffer);else if(m(b))h=new Wa(1),h[0]=b,b=new Uint8Array(h.buffer);else if(n(b))b=f(b);else{if(!o(b))throw new TypeError("bad seed type");b=new Uint8Array(b)}for(i=b.length,d=0;i>d;d+=1024){for(e=d,c=0;1024>c&&i>e;e=d|++c)g[c>>2]^=b[e]<<((3&c)<<3);a()}}function c(a){a=a||1;for(var b,c,d;a--;)for(j=j+1|0,i=i+j|0,b=0;256>b;b+=4)h^=h<<13,h=e[b+128&255]+h|0,c=e[0|b],e[0|b]=d=e[c>>>2&255]+(h+i|0)|0,g[0|b]=i=e[d>>>10&255]+c|0,h^=h>>>6,h=e[b+129&255]+h|0,c=e[1|b],e[1|b]=d=e[c>>>2&255]+(h+i|0)|0,g[1|b]=i=e[d>>>10&255]+c|0,h^=h<<2,h=e[b+130&255]+h|0,c=e[2|b],e[2|b]=d=e[c>>>2&255]+(h+i|0)|0,g[2|b]=i=e[d>>>10&255]+c|0,h^=h>>>16,h=e[b+131&255]+h|0,c=e[3|b],e[3|b]=d=e[c>>>2&255]+(h+i|0)|0,g[3|b]=i=e[d>>>10&255]+c|0}function d(){return k--||(c(1),k=255),g[k]}var e=new Uint32Array(256),g=new Uint32Array(256),h=0,i=0,j=0,k=0;return{seed:b,prng:c,rand:d}}(),qb=b.console,rb=b.Date.now,sb=b.Math.random,tb=b.performance,ub=b.crypto||b.msCrypto;void 0!==ub&&(nb=ub.getRandomValues);var vb,wb=pb.rand,xb=pb.seed,yb=0,zb=!1,Ab=!1,Bb=0,Cb=256,Db=!1,Eb=!1,Fb={};if(void 0!==tb)vb=function(){return 1e3*tb.now()|0};else{var Gb=1e3*rb()|0;vb=function(){return 1e3*rb()-Gb|0}}a.random=ua,a.random.seed=sa,Object.defineProperty(ua,"allowWeak",{get:function(){return Db},set:function(a){Db=a}}),Object.defineProperty(ua,"skipSystemRNGWarning",{get:function(){return Eb},set:function(a){Eb=a}}),a.getRandomValues=ta,a.getRandomValues.seed=sa,Object.defineProperty(ta,"allowWeak",{get:function(){return Db},set:function(a){Db=a}}),Object.defineProperty(ta,"skipSystemRNGWarning",{get:function(){return Eb},set:function(a){Eb=a}}),b.Math.random=ua,void 0===b.crypto&&(b.crypto={}),b.crypto.getRandomValues=ta;var Hb,Ib={Uint32Array:Uint32Array,Math:b.Math},Jb=new Uint32Array(1048576);void 0===Ib.Math.imul?(Ib.Math.imul=xa,Hb=va(Ib,null,Jb.buffer),delete Ib.Math.imul):Hb=va(Ib,null,Jb.buffer);var Kb=new Uint32Array(0),Lb=ya.prototype=new Number;Lb.toString=za,Lb.toBytes=Aa,Lb.valueOf=Ba,Lb.clamp=Ca,Lb.slice=Da,Lb.negate=Ea,Lb.compare=Fa,Lb.add=Ga,Lb.subtract=Ha,Lb.multiply=Ia,Lb.square=Ja,Lb.divide=Ka;var Mb=new ya(0),Nb=new ya(1);Object.freeze(Mb),Object.freeze(Nb);var Ob=Na.prototype=new ya;Ob.reduce=Oa,Ob.inverse=Pa,Ob.power=Qa;var Pb=[2,3];return Lb.isProbablePrime=Ta,ya.randomProbablePrime=Va,ya.ZERO=Mb,ya.ONE=Nb,ya.extGCD=Ma,a.BigNumber=ya,a.Modulus=Na,"function"==typeof define&&define.amd?define([],function(){return a}):"object"==typeof module&&module.exports?module.exports=a:b.asmCrypto=a,a}({},this); +var a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)r.hasOwnProperty(t)&&(e[t]=r[t])};Object.assign},function(e,r){e.exports=require("crypto")},function(e,r,t){"use strict";function n(e,r){return Promise.resolve().then(function(){if(e.key)return e;if(e.extractable){return(new m.Crypto).subtle.exportKey("jwk",e).then(function(t){var n=o(e);return n&&(n=w.assign(n,e.algorithm)),r.importKey("jwk",t,n,!0,e.usages)})}throw new A.LinerError("'key' is Native CryptoKey. It can't be converted to JS CryptoKey")})}function a(e,r){w.BrowserInfo().name!==w.Browser.IE&&w.BrowserInfo().name!==w.Browser.Edge&&w.BrowserInfo().name!==w.Browser.Safari||!/^rsa/i.test(e.name)||(r.privateKey?(P.push({hash:e.hash,key:r.privateKey}),P.push({hash:e.hash,key:r.publicKey})):P.push({hash:e.hash,key:r}))}function o(e){var r=null;return P.some(function(t){return t.key===e&&(r=w.assign({},e.algorithm,{hash:t.hash}),!0)}),r}function s(e,r){var t=[];e.privateKey?(t.push(e.privateKey),t.push(e.publicKey)):t.push(e),t.forEach(function(e){"keyUsage"in e&&(e.usages=e.keyUsage||[],e.usages.length||(["verify","encrypt","wrapKey"].forEach(function(t){r.indexOf(t)>-1&&("public"===e.type||"secret"===e.type)&&e.usages.push(t)}),["sign","decrypt","unwrapKey","deriveKey","deriveBits"].forEach(function(t){r.indexOf(t)>-1&&("private"===e.type||"secret"===e.type)&&e.usages.push(t)})))})}function i(e,r,t){if(r&&w.BrowserInfo().name===w.Browser.IE){"extractable"in e&&(e.ext=e.extractable,delete e.extractable);var n=null;switch(r.name.toUpperCase()){case p.AlgorithmNames.RsaOAEP.toUpperCase():case p.AlgorithmNames.RsaPSS.toUpperCase():case p.AlgorithmNames.RsaSSA.toUpperCase():n=C.RsaCrypto;break;case p.AlgorithmNames.AesECB.toUpperCase():case p.AlgorithmNames.AesCBC.toUpperCase():case p.AlgorithmNames.AesGCM.toUpperCase():n=g.AesCrypto;break;default:throw new A.LinerError(A.LinerError.UNSUPPORTED_ALGORITHM,r.name.toUpperCase())}n&&!e.alg&&(e.alg=n.alg2jwk(r)),"key_ops"in e||(e.key_ops=t)}}function c(e){w.BrowserInfo().name===w.Browser.IE&&("ext"in e&&(e.extractable=e.ext,delete e.ext),delete e.key_ops,delete e.alg)}function u(e){var r=/AppleWebKit\/(\d+)/.exec(self.navigator.userAgent);return e.toUpperCase()===p.AlgorithmNames.RsaOAEP&&r&&parseInt(r[1],10)<604}var h=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)r.hasOwnProperty(t)&&(e[t]=r[t])};return function(r,t){function n(){this.constructor=r}e(r,t),r.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(r,"__esModule",{value:!0});var p=t(0),f=t(0),y=t(0),l=t(4),m=t(2),A=t(1),w=t(5),g=t(11),v=t(12),C=t(13),d=t(14),k=t(15),b=t(16),E=t(17),P=[],U=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return h(r,e),r.prototype.generateKey=function(r,t,n){var o,i=this,c=arguments;return e.prototype.generateKey.apply(this,c).then(function(e){if(o=y.PrepareAlgorithm(r),!(w.BrowserInfo().name===w.Browser.Edge&&o.name.toUpperCase()===p.AlgorithmNames.AesGCM||u(o.name))&&l.nativeSubtle)try{return l.nativeSubtle.generateKey.apply(l.nativeSubtle,c).catch(function(e){w.warn("WebCrypto: native generateKey for "+o.name+" doesn't work.",e&&e.message||"Unknown message")})}catch(e){w.warn("WebCrypto: native generateKey for "+o.name+" doesn't work.",e&&e.message||"Unknown message")}}).then(function(e){if(e){var c=Promise.resolve(e);if(w.BrowserInfo().name===w.Browser.Safari&&(o.name.toUpperCase()===p.AlgorithmNames.EcDH.toUpperCase()||o.name.toUpperCase()===p.AlgorithmNames.EcDSA.toUpperCase())){var u=e.publicKey;c=c.then(function(){return i.exportKey("jwk",u).then(function(a){return i.exportKey("spki",u).then(function(o){for(var s=p.Base64Url.decode(a.x),c=p.Base64Url.decode(a.y),u=s.length+c.length,h=new Uint8Array(o),f=0;f32?o>48?66:48:32,t.length32?o>48?66:48:32,t.length/232?o>48?66:48:32,a.length-1)t=r.replace("-","").toLowerCase();else{if("K-256"!==r)throw new c.LinerError("Unsupported named curve '"+e+"'");t="secp256k1"}return t},r}(i.BaseCrypto);r.EcCrypto=p;var f=t(2)},function(e,r,t){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)r.hasOwnProperty(t)&&(e[t]=r[t])};return function(r,t){function n(){this.constructor=r}e(r,t),r.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(r,"__esModule",{value:!0});var a=t(0),o=t(1),s=t(3),i=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return n(r,e),r.importKey=function(e,r,t,n,a){return Promise.resolve().then(function(){var e=new Uint8Array(r),o=new s.CryptoKey({type:"secret",algorithm:t,extractable:n,usages:a});return o.key=e,o})},r.deriveBits=function(e,r,t){return Promise.resolve().then(function(){var n,s=new Uint8Array(e.salt),i=e.iterations,c=t/8,u="string"==typeof e.hash?e.hash:e.hash.name;switch(u.toUpperCase()){case a.AlgorithmNames.Sha512.toUpperCase():n=asmCrypto.PBKDF2_HMAC_SHA512.bytes(r.key,s,i,c);break;case a.AlgorithmNames.Sha256.toUpperCase():n=asmCrypto.PBKDF2_HMAC_SHA256.bytes(r.key,s,i,c);break;case a.AlgorithmNames.Sha1.toUpperCase():n=asmCrypto.PBKDF2_HMAC_SHA1.bytes(r.key,s,i,c);break;default:throw new o.LinerError(o.LinerError.UNSUPPORTED_ALGORITHM,u)}return n.buffer})},r.deriveKey=function(e,r,t,n,s){var i=this;return Promise.resolve().then(function(){var n=0;switch(t.name.toUpperCase()){case a.AlgorithmNames.AesCBC.toUpperCase():case a.AlgorithmNames.AesCTR.toUpperCase():case a.AlgorithmNames.AesGCM.toUpperCase():case a.AlgorithmNames.AesKW.toUpperCase():n=t.length;break;case a.AlgorithmNames.Hmac.toUpperCase():n=512;break;default:throw new o.LinerError(o.LinerError.UNSUPPORTED_ALGORITHM,t.name)}return i.deriveBits(e,r,n)}).then(function(e){return(new c.Crypto).subtle.importKey("raw",new Uint8Array(e),t,n,s)})},r}(a.BaseCrypto);r.Pbkdf2Crypto=i;var c=t(2)},function(e,r,t){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)r.hasOwnProperty(t)&&(e[t]=r[t])};return function(r,t){function n(){this.constructor=r}e(r,t),r.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(r,"__esModule",{value:!0});var a=t(0),o=t(3),s=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return n(r,e),r.importKey=function(e,r,t,n,s){return Promise.resolve().then(function(){var i;if("jwk"===e.toLowerCase()){var c=r;i=a.Base64Url.decode(c.k)}else i=new Uint8Array(r);var u=new o.CryptoKey({type:"secret",algorithm:t,extractable:n,usages:s});return u.key=i,u})},r.sign=function(e,r,t){return Promise.resolve().then(function(){return asmCrypto.HMAC_SHA256.bytes(t,r.key).buffer})},r.exportKey=function(e,r){return Promise.resolve().then(function(){var t=r.key;if("jwk"===e.toLowerCase()){return{alg:"HS256",kty:"oct",k:a.Base64Url.encode(t),key_ops:r.usages,ext:r.extractable}}return t.buffer})},r}(a.BaseCrypto);r.HmacCrypto=s},function(e,r,t){"use strict";function n(e,r){return asmCrypto.HMAC_SHA256.bytes(e,r)}function a(e,r,t){for(var n=e.length,a=Math.ceil(r/n),o=new Uint8Array(n*a+t.length+1),s=0,i=0,c=0;c=e)throw new Error("Malformed string, low surrogate expected at position "+i);n=(55296^n)<<10|65536|56320^f.charCodeAt(i)}else if(!t&&n>>>8)throw new Error("Wide characters are not allowed.");!t||n<=127?r[s++]=n:n<=2047?(r[s++]=192|n>>6,r[s++]=128|63&n):n<=65535?(r[s++]=224|n>>12,r[s++]=128|n>>6&63,r[s++]=128|63&n):(r[s++]=240|n>>18,r[s++]=128|n>>12&63,r[s++]=128|n>>6&63,r[s++]=128|63&n)}return r.subarray(0,s)}function r(f,t){t=!!t;for(var e=f.length,r=new Array(e),i=0,s=0;i=192&&n<224&&i+1=224&&n<240&&i+2=240&&n<248&&i+3>10,r[s++]=56320|1023&a)}}var h="";for(i=0;i>>7);return s^=99}e||function(){f=[],t=[];var r,i,s=1;for(r=0;r<255;r++)f[r]=s,i=128&s,s<<=1,s&=255,128===i&&(s^=27),s^=f[r],t[f[r]]=r;f[255]=f[0],t[0]=0,e=!0}(),i=[],s=[],n=[[],[],[],[]],a=[[],[],[],[]];for(var o=0;o<256;o++){var x=h(o);i[o]=x,s[x]=o,n[0][o]=r(2,x)<<24|x<<16|x<<8|r(3,x),a[0][x]=r(14,o)<<24|r(9,o)<<16|r(13,o)<<8|r(11,o);for(var c=1;c<4;c++)n[c][o]=n[c-1][o]>>>8|n[c-1][o]<<24,a[c][x]=a[c-1][x]>>>8|a[c-1][x]<<24}}var o=function(f,t){h();var e=new Uint32Array(t);e.set(i,512),e.set(s,768);for(var r=0;r<4;r++)e.set(n[r],4096+1024*r>>2),e.set(a[r],8192+1024*r>>2);var o=function(f,t,e){"use asm";var r=0,i=0,s=0,n=0,a=0,h=0,o=0,x=0,c=0,u=0,l=0,y=0,w=0,d=0,p=0,g=0,v=0,b=0,m=0,_=0,A=0;var E=new f.Uint32Array(e),S=new f.Uint8Array(e);function C(f,t,e,a,h,o,x,c){f=f|0;t=t|0;e=e|0;a=a|0;h=h|0;o=o|0;x=x|0;c=c|0;var u=0,l=0,y=0,w=0,d=0,p=0,g=0,v=0;u=e|0x400,l=e|0x800,y=e|0xc00;h=h^E[(f|0)>>2],o=o^E[(f|4)>>2],x=x^E[(f|8)>>2],c=c^E[(f|12)>>2];for(v=16;(v|0)<=a<<4;v=v+16|0){w=E[(e|h>>22&1020)>>2]^E[(u|o>>14&1020)>>2]^E[(l|x>>6&1020)>>2]^E[(y|c<<2&1020)>>2]^E[(f|v|0)>>2],d=E[(e|o>>22&1020)>>2]^E[(u|x>>14&1020)>>2]^E[(l|c>>6&1020)>>2]^E[(y|h<<2&1020)>>2]^E[(f|v|4)>>2],p=E[(e|x>>22&1020)>>2]^E[(u|c>>14&1020)>>2]^E[(l|h>>6&1020)>>2]^E[(y|o<<2&1020)>>2]^E[(f|v|8)>>2],g=E[(e|c>>22&1020)>>2]^E[(u|h>>14&1020)>>2]^E[(l|o>>6&1020)>>2]^E[(y|x<<2&1020)>>2]^E[(f|v|12)>>2];h=w,o=d,x=p,c=g}r=E[(t|h>>22&1020)>>2]<<24^E[(t|o>>14&1020)>>2]<<16^E[(t|x>>6&1020)>>2]<<8^E[(t|c<<2&1020)>>2]^E[(f|v|0)>>2],i=E[(t|o>>22&1020)>>2]<<24^E[(t|x>>14&1020)>>2]<<16^E[(t|c>>6&1020)>>2]<<8^E[(t|h<<2&1020)>>2]^E[(f|v|4)>>2],s=E[(t|x>>22&1020)>>2]<<24^E[(t|c>>14&1020)>>2]<<16^E[(t|h>>6&1020)>>2]<<8^E[(t|o<<2&1020)>>2]^E[(f|v|8)>>2],n=E[(t|c>>22&1020)>>2]<<24^E[(t|h>>14&1020)>>2]<<16^E[(t|o>>6&1020)>>2]<<8^E[(t|x<<2&1020)>>2]^E[(f|v|12)>>2]}function U(f,t,e,r){f=f|0;t=t|0;e=e|0;r=r|0;C(0x0000,0x0800,0x1000,A,f,t,e,r)}function k(f,t,e,r){f=f|0;t=t|0;e=e|0;r=r|0;var s=0;C(0x0400,0x0c00,0x2000,A,f,r,e,t);s=i,i=n,n=s}function M(f,t,e,c){f=f|0;t=t|0;e=e|0;c=c|0;C(0x0000,0x0800,0x1000,A,a^f,h^t,o^e,x^c);a=r,h=i,o=s,x=n}function H(f,t,e,c){f=f|0;t=t|0;e=e|0;c=c|0;var u=0;C(0x0400,0x0c00,0x2000,A,f,c,e,t);u=i,i=n,n=u;r=r^a,i=i^h,s=s^o,n=n^x;a=f,h=t,o=e,x=c}function L(f,t,e,c){f=f|0;t=t|0;e=e|0;c=c|0;C(0x0000,0x0800,0x1000,A,a,h,o,x);a=r=r^f,h=i=i^t,o=s=s^e,x=n=n^c}function T(f,t,e,c){f=f|0;t=t|0;e=e|0;c=c|0;C(0x0000,0x0800,0x1000,A,a,h,o,x);r=r^f,i=i^t,s=s^e,n=n^c;a=f,h=t,o=e,x=c}function I(f,t,e,c){f=f|0;t=t|0;e=e|0;c=c|0;C(0x0000,0x0800,0x1000,A,a,h,o,x);a=r,h=i,o=s,x=n;r=r^f,i=i^t,s=s^e,n=n^c}function Z(f,t,e,a){f=f|0;t=t|0;e=e|0;a=a|0;C(0x0000,0x0800,0x1000,A,c,u,l,y);y=~g&y|g&y+1;l=~p&l|p&l+((y|0)==0);u=~d&u|d&u+((l|0)==0);c=~w&c|w&c+((u|0)==0);r=r^f;i=i^t;s=s^e;n=n^a}function D(f,t,e,r){f=f|0;t=t|0;e=e|0;r=r|0;var i=0,s=0,n=0,c=0,u=0,l=0,y=0,w=0,d=0,p=0;f=f^a,t=t^h,e=e^o,r=r^x;i=v|0,s=b|0,n=m|0,c=_|0;for(;(d|0)<128;d=d+1|0){if(i>>>31){u=u^f,l=l^t,y=y^e,w=w^r}i=i<<1|s>>>31,s=s<<1|n>>>31,n=n<<1|c>>>31,c=c<<1;p=r&1;r=r>>>1|e<<31,e=e>>>1|t<<31,t=t>>>1|f<<31,f=f>>>1;if(p)f=f^0xe1000000}a=u,h=l,o=y,x=w}function P(f){f=f|0;A=f}function O(f,t,e,a){f=f|0;t=t|0;e=e|0;a=a|0;r=f,i=t,s=e,n=a}function B(f,t,e,r){f=f|0;t=t|0;e=e|0;r=r|0;a=f,h=t,o=e,x=r}function q(f,t,e,r){f=f|0;t=t|0;e=e|0;r=r|0;c=f,u=t,l=e,y=r}function G(f,t,e,r){f=f|0;t=t|0;e=e|0;r=r|0;w=f,d=t,p=e,g=r}function R(f,t,e,r){f=f|0;t=t|0;e=e|0;r=r|0;y=~g&y|g&r,l=~p&l|p&e,u=~d&u|d&t,c=~w&c|w&f}function z(f){f=f|0;if(f&15)return-1;S[f|0]=r>>>24,S[f|1]=r>>>16&255,S[f|2]=r>>>8&255,S[f|3]=r&255,S[f|4]=i>>>24,S[f|5]=i>>>16&255,S[f|6]=i>>>8&255,S[f|7]=i&255,S[f|8]=s>>>24,S[f|9]=s>>>16&255,S[f|10]=s>>>8&255,S[f|11]=s&255,S[f|12]=n>>>24,S[f|13]=n>>>16&255,S[f|14]=n>>>8&255,S[f|15]=n&255;return 16}function N(f){f=f|0;if(f&15)return-1;S[f|0]=a>>>24,S[f|1]=a>>>16&255,S[f|2]=a>>>8&255,S[f|3]=a&255,S[f|4]=h>>>24,S[f|5]=h>>>16&255,S[f|6]=h>>>8&255,S[f|7]=h&255,S[f|8]=o>>>24,S[f|9]=o>>>16&255,S[f|10]=o>>>8&255,S[f|11]=o&255,S[f|12]=x>>>24,S[f|13]=x>>>16&255,S[f|14]=x>>>8&255,S[f|15]=x&255;return 16}function K(){U(0,0,0,0);v=r,b=i,m=s,_=n}function F(f,t,e){f=f|0;t=t|0;e=e|0;var a=0;if(t&15)return-1;while((e|0)>=16){V[f&7](S[t|0]<<24|S[t|1]<<16|S[t|2]<<8|S[t|3],S[t|4]<<24|S[t|5]<<16|S[t|6]<<8|S[t|7],S[t|8]<<24|S[t|9]<<16|S[t|10]<<8|S[t|11],S[t|12]<<24|S[t|13]<<16|S[t|14]<<8|S[t|15]);S[t|0]=r>>>24,S[t|1]=r>>>16&255,S[t|2]=r>>>8&255,S[t|3]=r&255,S[t|4]=i>>>24,S[t|5]=i>>>16&255,S[t|6]=i>>>8&255,S[t|7]=i&255,S[t|8]=s>>>24,S[t|9]=s>>>16&255,S[t|10]=s>>>8&255,S[t|11]=s&255,S[t|12]=n>>>24,S[t|13]=n>>>16&255,S[t|14]=n>>>8&255,S[t|15]=n&255;a=a+16|0,t=t+16|0,e=e-16|0}return a|0}function j(f,t,e){f=f|0;t=t|0;e=e|0;var r=0;if(t&15)return-1;while((e|0)>=16){W[f&1](S[t|0]<<24|S[t|1]<<16|S[t|2]<<8|S[t|3],S[t|4]<<24|S[t|5]<<16|S[t|6]<<8|S[t|7],S[t|8]<<24|S[t|9]<<16|S[t|10]<<8|S[t|11],S[t|12]<<24|S[t|13]<<16|S[t|14]<<8|S[t|15]);r=r+16|0,t=t+16|0,e=e-16|0}return r|0}var V=[U,k,M,H,L,T,I,Z];var W=[M,D];return{set_rounds:P,set_state:O,set_iv:B,set_nonce:q,set_mask:G,set_counter:R,get_state:z,get_iv:N,gcm_init:K,cipher:F,mac:j}}({Uint8Array:Uint8Array,Uint32Array:Uint32Array},f,t);return o.set_key=function(f,t,r,s,n,h,x,c,u){var l=e.subarray(0,60),y=e.subarray(256,316);l.set([t,r,s,n,h,x,c,u]);for(var w=f,d=1;w<4*f+28;w++){var p=l[w-1];(w%f==0||8===f&&w%f==4)&&(p=i[p>>>24]<<24^i[p>>>16&255]<<16^i[p>>>8&255]<<8^i[255&p]),w%f==0&&(p=p<<8^p>>>24^d<<24,d=d<<1^(128&d?27:0)),l[w]=l[w-f]^p}for(var g=0;g=w-4?p:a[0][i[p>>>24]]^a[1][i[p>>>16&255]]^a[2][i[p>>>8&255]]^a[3][i[255&p]];o.set_rounds(f+5)},o};return o.ENC={ECB:0,CBC:2,CFB:4,OFB:6,CTR:7},o.DEC={ECB:1,CBC:3,CFB:5,OFB:6,CTR:7},o.MAC={CBC:0,GCM:1},o.HEAP_DATA=16384,o}(),p=new Uint8Array(1048576),g=d(null,p.buffer);class v{constructor(f,t,e,r,i){this.nonce=null,this.counter=0,this.counterSize=0,this.heap=c(Uint8Array,r).subarray(d.HEAP_DATA),this.asm=i||d(null,this.heap.buffer),this.mode=null,this.key=null,this.AES_reset(f,t,e)}AES_set_key(f){if(void 0!==f){if(!o(f))throw new TypeError("unexpected key type");var t=f.length;if(16!==t&&24!==t&&32!==t)throw new y("illegal key size");var e=new DataView(f.buffer,f.byteOffset,f.byteLength);this.asm.set_key(t>>2,e.getUint32(0),e.getUint32(4),e.getUint32(8),e.getUint32(12),t>16?e.getUint32(16):0,t>16?e.getUint32(20):0,t>24?e.getUint32(24):0,t>24?e.getUint32(28):0),this.key=f}else if(!this.key)throw new Error("key is required")}AES_CTR_set_options(f,t,e){if(void 0!==e){if(e<8||e>48)throw new y("illegal counter size");this.counterSize=e;var r=Math.pow(2,e)-1;this.asm.set_mask(0,0,r/4294967296|0,0|r)}else this.counterSize=e=48,this.asm.set_mask(0,0,65535,4294967295);if(void 0===f)throw new Error("nonce is required");if(!o(f))throw new TypeError("unexpected nonce type");var i=f.length;if(!i||i>16)throw new y("illegal nonce size");this.nonce=f;var s=new DataView(new ArrayBuffer(16));if(new Uint8Array(s.buffer).set(f),this.asm.set_nonce(s.getUint32(0),s.getUint32(4),s.getUint32(8),s.getUint32(12)),void 0!==t){if(!n(t))throw new TypeError("unexpected counter type");if(t<0||t>=Math.pow(2,e))throw new y("illegal counter value");this.counter=t,this.asm.set_counter(0,0,t/4294967296|0,0|t)}else this.counter=0}AES_set_iv(f){if(void 0!==f){if(!o(f))throw new TypeError("unexpected iv type");if(16!==f.length)throw new y("illegal iv size");var t=new DataView(f.buffer,f.byteOffset,f.byteLength);this.iv=f,this.asm.set_iv(t.getUint32(0),t.getUint32(4),t.getUint32(8),t.getUint32(12))}else this.iv=null,this.asm.set_iv(0,0,0,0)}AES_set_padding(f){this.padding=void 0===f||!!f}AES_reset(f,t,e){return this.result=null,this.pos=0,this.len=0,this.AES_set_key(f),this.AES_set_iv(t),this.AES_set_padding(e),this}AES_Encrypt_process(f){if(!o(f))throw new TypeError("data isn't of expected type");for(var t=this.asm,e=this.heap,r=d.ENC[this.mode],i=d.HEAP_DATA,s=this.pos,n=this.len,a=0,h=f.length||0,x=0,c=0,l=new Uint8Array(n+h&-16);h>0;)n+=c=u(e,s+n,f,a,h),a+=c,h-=c,(c=t.cipher(r,i+s,n))&&l.set(e.subarray(s,s+c),x),x+=c,c0;)n+=y=u(e,s+n,f,a,h),a+=y,h-=y,(y=t.cipher(r,i+s,n-(h?0:l)))&&w.set(e.subarray(s,s+y),x),x+=y,y0){if(h%16){if(this.hasOwnProperty("padding"))throw new y("data length must be a multiple of the block size");h+=16-h%16}if(r.cipher(s,n+a,h),this.hasOwnProperty("padding")&&this.padding){var x=i[a+o-1];if(x<1||x>16||x>o)throw new w("bad padding");for(var c=0,u=x;u>1;u--)c|=x^i[a+o-u];if(c)throw new w("bad padding");o-=x}}var l=new Uint8Array(e+o);return e>0&&l.set(t),o>0&&l.set(i.subarray(a,a+o),e),this.result=l,this.pos=0,this.len=0,this}}class b extends v{constructor(f,t=null,e=!0,r,i){super(f,t,e,r,i),this.mode="CBC",this.BLOCK_SIZE=16}encrypt(f){return this.AES_Encrypt_finish(f)}decrypt(f){return this.AES_Decrypt_finish(f)}}b.encrypt=function(f,t,e,r){if(void 0===f)throw new SyntaxError("data required");if(void 0===t)throw new SyntaxError("key required");return new b(t,r,e,p,g).encrypt(f).result},b.decrypt=function(f,t,e,r){if(void 0===f)throw new SyntaxError("data required");if(void 0===t)throw new SyntaxError("key required");return new b(t,r,e,p,g).decrypt(f).result};var m=68719476704;class _ extends v{constructor(f,t,e,r,i,s){super(f,void 0,!1,i,s),this.nonce=null,this.adata=null,this.iv=null,this.counter=1,this.tagSize=16,this.mode="GCM",this.BLOCK_SIZE=16,this.reset(f,r,t,e)}reset(f,t,e,r){return this.AES_GCM_reset(f,t,e,r)}encrypt(f){return this.AES_GCM_encrypt(f)}decrypt(f){return this.AES_GCM_decrypt(f)}AES_GCM_Encrypt_process(f){if(!o(f))throw new TypeError("data isn't of expected type");var t=0,e=f.length||0,r=this.asm,i=this.heap,s=this.counter,n=this.pos,a=this.len,h=0,x=a+e&-16,c=0;if((s-1<<4)+a+e>m)throw new RangeError("counter overflow");for(var l=new Uint8Array(x);e>0;)a+=c=u(i,n+a,f,t,e),t+=c,e-=c,c=r.cipher(d.ENC.CTR,d.HEAP_DATA+n,a),(c=r.mac(d.MAC.GCM,d.HEAP_DATA+n,c))&&l.set(i.subarray(n,n+c),h),s+=c>>>4,h+=c,c>>29,t[4]=o>>>21,t[5]=o>>>13&255,t[6]=o>>>5&255,t[7]=o<<3&255,t[8]=t[9]=t[10]=0,t[11]=x>>>29,t[12]=x>>>21&255,t[13]=x>>>13&255,t[14]=x>>>5&255,t[15]=x<<3&255,f.mac(d.MAC.GCM,d.HEAP_DATA,16),f.get_iv(d.HEAP_DATA),f.set_counter(0,0,0,this.gamma0),f.cipher(d.ENC.CTR,d.HEAP_DATA,16),a.set(t.subarray(0,r),n),this.result=a,this.counter=1,this.pos=0,this.len=0,this}AES_GCM_Decrypt_process(f){if(!o(f))throw new TypeError("data isn't of expected type");var t=0,e=f.length||0,r=this.asm,i=this.heap,s=this.counter,n=this.tagSize,a=this.pos,h=this.len,x=0,c=h+e>n?h+e-n&-16:0,l=h+e-c,y=0;if((s-1<<4)+h+e>m)throw new RangeError("counter overflow");for(var w=new Uint8Array(c);e>l;)h+=y=u(i,a+h,f,t,e-l),t+=y,e-=y,y=r.mac(d.MAC.GCM,d.HEAP_DATA+a,y),(y=r.cipher(d.DEC.CTR,d.HEAP_DATA+a,y))&&w.set(i.subarray(a,a+y),x),s+=y>>>4,x+=y,a=0,h=0;return e>0&&(h+=u(i,0,f,t,e)),this.result=w,this.counter=s,this.pos=a,this.len=h,this}AES_GCM_Decrypt_finish(){var f=this.asm,t=this.heap,e=this.tagSize,r=this.adata,i=this.counter,s=this.pos,n=this.len,a=n-e;if(n>>29,t[4]=c>>>21,t[5]=c>>>13&255,t[6]=c>>>5&255,t[7]=c<<3&255,t[8]=t[9]=t[10]=0,t[11]=u>>>29,t[12]=u>>>21&255,t[13]=u>>>13&255,t[14]=u>>>5&255,t[15]=u<<3&255,f.mac(d.MAC.GCM,d.HEAP_DATA,16),f.get_iv(d.HEAP_DATA),f.set_counter(0,0,0,this.gamma0),f.cipher(d.ENC.CTR,d.HEAP_DATA,16);var y=0;for(x=0;x16)throw new y("illegal tagSize value");this.tagSize=t}else this.tagSize=16;if(void 0===e)throw new Error("nonce is required");if(!o(e))throw new TypeError("unexpected nonce type");this.nonce=e;var x=e.length||0,c=new Uint8Array(16);12!==x?(this._gcm_mac_process(e),h[0]=h[1]=h[2]=h[3]=h[4]=h[5]=h[6]=h[7]=h[8]=h[9]=h[10]=0,h[11]=x>>>29,h[12]=x>>>21&255,h[13]=x>>>13&255,h[14]=x>>>5&255,h[15]=x<<3&255,a.mac(d.MAC.GCM,d.HEAP_DATA,16),a.get_iv(d.HEAP_DATA),a.set_iv(),c.set(h.subarray(0,16))):(c.set(e),c[15]=1);var u=new DataView(c.buffer);if(this.gamma0=u.getUint32(12),a.set_nonce(u.getUint32(0),u.getUint32(4),u.getUint32(8),0),a.set_mask(0,0,0,4294967295),void 0!==r&&null!==r){if(!o(r))throw new TypeError("unexpected adata type");if(r.length>m)throw new y("illegal adata length");r.length?(this.adata=r,this._gcm_mac_process(r)):this.adata=null}else this.adata=null;if(void 0!==i){if(!n(i))throw new TypeError("counter must be a number");if(i<1||i>4294967295)throw new RangeError("counter must be a positive 32-bit integer");this.counter=i,a.set_counter(0,0,0,this.gamma0+i|0)}else this.counter=1,a.set_counter(0,0,0,this.gamma0+1|0);if(void 0!==s){if(!n(s))throw new TypeError("iv must be a number");this.iv=s,this.AES_set_iv(s)}return this}_gcm_mac_process(f){for(var t=this.heap,e=this.asm,r=0,i=f.length||0,s=0;i>0;){for(r+=s=u(t,0,f,r,i),i-=s;15&s;)t[s++]=0;e.mac(d.MAC.GCM,d.HEAP_DATA,s)}}}function A(){return this.result=null,this.pos=0,this.len=0,this.asm.reset(),this}function E(f){if(null!==this.result)throw new l("state must be reset before processing new data");if(a(f)&&(f=e(f)),h(f)&&(f=new Uint8Array(f)),!o(f))throw new TypeError("data isn't of expected type");for(var t=this.asm,r=this.heap,i=this.pos,s=this.len,n=0,x=f.length,c=0;x>0;)s+=c=u(r,i+s,f,n,x),n+=c,x-=c,i+=c=t.process(i,s),(s-=c)||(i=0);return this.pos=i,this.len=s,this}function S(){if(null!==this.result)throw new l("state must be reset before processing new data");return this.asm.finish(this.pos,this.len,0),this.result=new Uint8Array(this.HASH_SIZE),this.result.set(this.heap.subarray(0,this.HASH_SIZE)),this.pos=0,this.len=0,this}_.encrypt=function(f,t,e,r,i){if(void 0===f)throw new SyntaxError("data required");if(void 0===t)throw new SyntaxError("key required");if(void 0===e)throw new SyntaxError("nonce required");return new _(t,e,r,i,p,g).encrypt(f).result},_.decrypt=function(f,t,e,r,i){if(void 0===f)throw new SyntaxError("data required");if(void 0===t)throw new SyntaxError("key required");if(void 0===e)throw new SyntaxError("nonce required");return new _(t,e,r,i,p,g).decrypt(f).result};var C=64,U=20;function k(f){f=f||{},this.heap=c(Uint8Array,f.heap),this.asm=f.asm||function(f,t,e){"use asm";var r=0,i=0,s=0,n=0,a=0,h=0,o=0,x=0,c=0,u=0,l=0,y=0,w=0,d=0,p=0,g=0,v=0,b=new f.Uint8Array(e);function m(f,t,e,h,o,x,c,u,l,y,w,d,p,g,v,b){f=f|0;t=t|0;e=e|0;h=h|0;o=o|0;x=x|0;c=c|0;u=u|0;l=l|0;y=y|0;w=w|0;d=d|0;p=p|0;g=g|0;v=v|0;b=b|0;var m=0,_=0,A=0,E=0,S=0,C=0,U=0,k=0,M=0,H=0,L=0,T=0,I=0,Z=0,D=0,P=0,O=0,B=0,q=0,G=0,R=0,z=0,N=0,K=0,F=0,j=0,V=0,W=0,J=0,Q=0,X=0,Y=0,$=0,ff=0,tf=0,ef=0,rf=0,sf=0,nf=0,af=0,hf=0,of=0,xf=0,cf=0,uf=0,lf=0,yf=0,wf=0,df=0,pf=0,gf=0,vf=0,bf=0,mf=0,_f=0,Af=0,Ef=0,Sf=0,Cf=0,Uf=0,kf=0,Mf=0,Hf=0,Lf=0,Tf=0,If=0,Zf=0,Df=0,Pf=0,Of=0,Bf=0;m=r;_=i;A=s;E=n;S=a;U=f+(m<<5|m>>>27)+S+(_&A|~_&E)+0x5a827999|0;S=E;E=A;A=_<<30|_>>>2;_=m;m=U;U=t+(m<<5|m>>>27)+S+(_&A|~_&E)+0x5a827999|0;S=E;E=A;A=_<<30|_>>>2;_=m;m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f|8]<<24|b[f|9]<<16|b[f|10]<<8|b[f|11],b[f|12]<<24|b[f|13]<<16|b[f|14]<<8|b[f|15],b[f|16]<<24|b[f|17]<<16|b[f|18]<<8|b[f|19],b[f|20]<<24|b[f|21]<<16|b[f|22]<<8|b[f|23],b[f|24]<<24|b[f|25]<<16|b[f|26]<<8|b[f|27],b[f|28]<<24|b[f|29]<<16|b[f|30]<<8|b[f|31],b[f|32]<<24|b[f|33]<<16|b[f|34]<<8|b[f|35],b[f|36]<<24|b[f|37]<<16|b[f|38]<<8|b[f|39],b[f|40]<<24|b[f|41]<<16|b[f|42]<<8|b[f|43],b[f|44]<<24|b[f|45]<<16|b[f|46]<<8|b[f|47],b[f|48]<<24|b[f|49]<<16|b[f|50]<<8|b[f|51],b[f|52]<<24|b[f|53]<<16|b[f|54]<<8|b[f|55],b[f|56]<<24|b[f|57]<<16|b[f|58]<<8|b[f|59],b[f|60]<<24|b[f|61]<<16|b[f|62]<<8|b[f|63])}function A(f){f=f|0;b[f|0]=r>>>24;b[f|1]=r>>>16&255;b[f|2]=r>>>8&255;b[f|3]=r&255;b[f|4]=i>>>24;b[f|5]=i>>>16&255;b[f|6]=i>>>8&255;b[f|7]=i&255;b[f|8]=s>>>24;b[f|9]=s>>>16&255;b[f|10]=s>>>8&255;b[f|11]=s&255;b[f|12]=n>>>24;b[f|13]=n>>>16&255;b[f|14]=n>>>8&255;b[f|15]=n&255;b[f|16]=a>>>24;b[f|17]=a>>>16&255;b[f|18]=a>>>8&255;b[f|19]=a&255}function E(){r=0x67452301;i=0xefcdab89;s=0x98badcfe;n=0x10325476;a=0xc3d2e1f0;h=o=0}function S(f,t,e,x,c,u,l){f=f|0;t=t|0;e=e|0;x=x|0;c=c|0;u=u|0;l=l|0;r=f;i=t;s=e;n=x;a=c;h=u;o=l}function C(f,t){f=f|0;t=t|0;var e=0;if(f&63)return-1;while((t|0)>=64){_(f);f=f+64|0;t=t-64|0;e=e+64|0}h=h+e|0;if(h>>>0>>0)o=o+1|0;return e|0}function U(f,t,e){f=f|0;t=t|0;e=e|0;var r=0,i=0;if(f&63)return-1;if(~e)if(e&31)return-1;if((t|0)>=64){r=C(f,t)|0;if((r|0)==-1)return-1;f=f+r|0;t=t-r|0}r=r+t|0;h=h+t|0;if(h>>>0>>0)o=o+1|0;b[f|t]=0x80;if((t|0)>=56){for(i=t+1|0;(i|0)<64;i=i+1|0)b[f|i]=0x00;_(f);t=0;b[f|0]=0}for(i=t+1|0;(i|0)<59;i=i+1|0)b[f|i]=0;b[f|56]=o>>>21&255;b[f|57]=o>>>13&255;b[f|58]=o>>>5&255;b[f|59]=o<<3&255|h>>>29;b[f|60]=h>>>21&255;b[f|61]=h>>>13&255;b[f|62]=h>>>5&255;b[f|63]=h<<3&255;_(f);if(~e)A(e);return r|0}function k(){r=x;i=c;s=u;n=l;a=y;h=64;o=0}function M(){r=w;i=d;s=p;n=g;a=v;h=64;o=0}function H(f,t,e,b,_,A,S,C,U,k,M,H,L,T,I,Z){f=f|0;t=t|0;e=e|0;b=b|0;_=_|0;A=A|0;S=S|0;C=C|0;U=U|0;k=k|0;M=M|0;H=H|0;L=L|0;T=T|0;I=I|0;Z=Z|0;E();m(f^0x5c5c5c5c,t^0x5c5c5c5c,e^0x5c5c5c5c,b^0x5c5c5c5c,_^0x5c5c5c5c,A^0x5c5c5c5c,S^0x5c5c5c5c,C^0x5c5c5c5c,U^0x5c5c5c5c,k^0x5c5c5c5c,M^0x5c5c5c5c,H^0x5c5c5c5c,L^0x5c5c5c5c,T^0x5c5c5c5c,I^0x5c5c5c5c,Z^0x5c5c5c5c);w=r;d=i;p=s;g=n;v=a;E();m(f^0x36363636,t^0x36363636,e^0x36363636,b^0x36363636,_^0x36363636,A^0x36363636,S^0x36363636,C^0x36363636,U^0x36363636,k^0x36363636,M^0x36363636,H^0x36363636,L^0x36363636,T^0x36363636,I^0x36363636,Z^0x36363636);x=r;c=i;u=s;l=n;y=a;h=64;o=0}function L(f,t,e){f=f|0;t=t|0;e=e|0;var h=0,o=0,x=0,c=0,u=0,l=0;if(f&63)return-1;if(~e)if(e&31)return-1;l=U(f,t,-1)|0;h=r,o=i,x=s,c=n,u=a;M();m(h,o,x,c,u,0x80000000,0,0,0,0,0,0,0,0,0,672);if(~e)A(e);return l|0}function T(f,t,e,h,o){f=f|0;t=t|0;e=e|0;h=h|0;o=o|0;var x=0,c=0,u=0,l=0,y=0,w=0,d=0,p=0,g=0,v=0;if(f&63)return-1;if(~o)if(o&31)return-1;b[f+t|0]=e>>>24;b[f+t+1|0]=e>>>16&255;b[f+t+2|0]=e>>>8&255;b[f+t+3|0]=e&255;L(f,t+4|0,-1)|0;x=w=r,c=d=i,u=p=s,l=g=n,y=v=a;h=h-1|0;while((h|0)>0){k();m(w,d,p,g,v,0x80000000,0,0,0,0,0,0,0,0,0,672);w=r,d=i,p=s,g=n,v=a;M();m(w,d,p,g,v,0x80000000,0,0,0,0,0,0,0,0,0,672);w=r,d=i,p=s,g=n,v=a;x=x^r;c=c^i;u=u^s;l=l^n;y=y^a;h=h-1|0}r=x;i=c;s=u;n=l;a=y;if(~o)A(o);return 0}return{reset:E,init:S,process:C,finish:U,hmac_reset:k,hmac_init:H,hmac_finish:L,pbkdf2_generate_block:T}}({Uint8Array:Uint8Array},null,this.heap.buffer),this.BLOCK_SIZE=C,this.HASH_SIZE=U,this.reset()}k.BLOCK_SIZE=C,k.NAME="sha1",k.HASH_SIZE=U;var M=k.prototype;M.reset=A,M.process=E,M.finish=S;var H=null;function L(){return null===H&&(H=new k({heapSize:1048576})),H}function T(f){if(void 0===f)throw new SyntaxError("data required");return L().reset().process(f).finish().result}var I=k;I.bytes=T,I.hex=function(f){return i(T(f))},I.base64=function(f){return s(T(f))};var Z=64,D=32;function P(f){f=f||{},this.heap=c(Uint8Array,f.heap),this.asm=f.asm||function(f,t,e){"use asm";var r=0,i=0,s=0,n=0,a=0,h=0,o=0,x=0,c=0,u=0,l=0,y=0,w=0,d=0,p=0,g=0,v=0,b=0,m=0,_=0,A=0,E=0,S=0,C=0,U=0,k=0,M=new f.Uint8Array(e);function H(f,t,e,c,u,l,y,w,d,p,g,v,b,m,_,A){f=f|0;t=t|0;e=e|0;c=c|0;u=u|0;l=l|0;y=y|0;w=w|0;d=d|0;p=p|0;g=g|0;v=v|0;b=b|0;m=m|0;_=_|0;A=A|0;var E=0,S=0,C=0,U=0,k=0,M=0,H=0,L=0;E=r;S=i;C=s;U=n;k=a;M=h;H=o;L=x;L=f+L+(k>>>6^k>>>11^k>>>25^k<<26^k<<21^k<<7)+(H^k&(M^H))+0x428a2f98|0;U=U+L|0;L=L+(E&S^C&(E^S))+(E>>>2^E>>>13^E>>>22^E<<30^E<<19^E<<10)|0;H=t+H+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(M^U&(k^M))+0x71374491|0;C=C+H|0;H=H+(L&E^S&(L^E))+(L>>>2^L>>>13^L>>>22^L<<30^L<<19^L<<10)|0;M=e+M+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(k^C&(U^k))+0xb5c0fbcf|0;S=S+M|0;M=M+(H&L^E&(H^L))+(H>>>2^H>>>13^H>>>22^H<<30^H<<19^H<<10)|0;k=c+k+(S>>>6^S>>>11^S>>>25^S<<26^S<<21^S<<7)+(U^S&(C^U))+0xe9b5dba5|0;E=E+k|0;k=k+(M&H^L&(M^H))+(M>>>2^M>>>13^M>>>22^M<<30^M<<19^M<<10)|0;U=u+U+(E>>>6^E>>>11^E>>>25^E<<26^E<<21^E<<7)+(C^E&(S^C))+0x3956c25b|0;L=L+U|0;U=U+(k&M^H&(k^M))+(k>>>2^k>>>13^k>>>22^k<<30^k<<19^k<<10)|0;C=l+C+(L>>>6^L>>>11^L>>>25^L<<26^L<<21^L<<7)+(S^L&(E^S))+0x59f111f1|0;H=H+C|0;C=C+(U&k^M&(U^k))+(U>>>2^U>>>13^U>>>22^U<<30^U<<19^U<<10)|0;S=y+S+(H>>>6^H>>>11^H>>>25^H<<26^H<<21^H<<7)+(E^H&(L^E))+0x923f82a4|0;M=M+S|0;S=S+(C&U^k&(C^U))+(C>>>2^C>>>13^C>>>22^C<<30^C<<19^C<<10)|0;E=w+E+(M>>>6^M>>>11^M>>>25^M<<26^M<<21^M<<7)+(L^M&(H^L))+0xab1c5ed5|0;k=k+E|0;E=E+(S&C^U&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;L=d+L+(k>>>6^k>>>11^k>>>25^k<<26^k<<21^k<<7)+(H^k&(M^H))+0xd807aa98|0;U=U+L|0;L=L+(E&S^C&(E^S))+(E>>>2^E>>>13^E>>>22^E<<30^E<<19^E<<10)|0;H=p+H+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(M^U&(k^M))+0x12835b01|0;C=C+H|0;H=H+(L&E^S&(L^E))+(L>>>2^L>>>13^L>>>22^L<<30^L<<19^L<<10)|0;M=g+M+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(k^C&(U^k))+0x243185be|0;S=S+M|0;M=M+(H&L^E&(H^L))+(H>>>2^H>>>13^H>>>22^H<<30^H<<19^H<<10)|0;k=v+k+(S>>>6^S>>>11^S>>>25^S<<26^S<<21^S<<7)+(U^S&(C^U))+0x550c7dc3|0;E=E+k|0;k=k+(M&H^L&(M^H))+(M>>>2^M>>>13^M>>>22^M<<30^M<<19^M<<10)|0;U=b+U+(E>>>6^E>>>11^E>>>25^E<<26^E<<21^E<<7)+(C^E&(S^C))+0x72be5d74|0;L=L+U|0;U=U+(k&M^H&(k^M))+(k>>>2^k>>>13^k>>>22^k<<30^k<<19^k<<10)|0;C=m+C+(L>>>6^L>>>11^L>>>25^L<<26^L<<21^L<<7)+(S^L&(E^S))+0x80deb1fe|0;H=H+C|0;C=C+(U&k^M&(U^k))+(U>>>2^U>>>13^U>>>22^U<<30^U<<19^U<<10)|0;S=_+S+(H>>>6^H>>>11^H>>>25^H<<26^H<<21^H<<7)+(E^H&(L^E))+0x9bdc06a7|0;M=M+S|0;S=S+(C&U^k&(C^U))+(C>>>2^C>>>13^C>>>22^C<<30^C<<19^C<<10)|0;E=A+E+(M>>>6^M>>>11^M>>>25^M<<26^M<<21^M<<7)+(L^M&(H^L))+0xc19bf174|0;k=k+E|0;E=E+(S&C^U&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;f=(t>>>7^t>>>18^t>>>3^t<<25^t<<14)+(_>>>17^_>>>19^_>>>10^_<<15^_<<13)+f+p|0;L=f+L+(k>>>6^k>>>11^k>>>25^k<<26^k<<21^k<<7)+(H^k&(M^H))+0xe49b69c1|0;U=U+L|0;L=L+(E&S^C&(E^S))+(E>>>2^E>>>13^E>>>22^E<<30^E<<19^E<<10)|0;t=(e>>>7^e>>>18^e>>>3^e<<25^e<<14)+(A>>>17^A>>>19^A>>>10^A<<15^A<<13)+t+g|0;H=t+H+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(M^U&(k^M))+0xefbe4786|0;C=C+H|0;H=H+(L&E^S&(L^E))+(L>>>2^L>>>13^L>>>22^L<<30^L<<19^L<<10)|0;e=(c>>>7^c>>>18^c>>>3^c<<25^c<<14)+(f>>>17^f>>>19^f>>>10^f<<15^f<<13)+e+v|0;M=e+M+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(k^C&(U^k))+0x0fc19dc6|0;S=S+M|0;M=M+(H&L^E&(H^L))+(H>>>2^H>>>13^H>>>22^H<<30^H<<19^H<<10)|0;c=(u>>>7^u>>>18^u>>>3^u<<25^u<<14)+(t>>>17^t>>>19^t>>>10^t<<15^t<<13)+c+b|0;k=c+k+(S>>>6^S>>>11^S>>>25^S<<26^S<<21^S<<7)+(U^S&(C^U))+0x240ca1cc|0;E=E+k|0;k=k+(M&H^L&(M^H))+(M>>>2^M>>>13^M>>>22^M<<30^M<<19^M<<10)|0;u=(l>>>7^l>>>18^l>>>3^l<<25^l<<14)+(e>>>17^e>>>19^e>>>10^e<<15^e<<13)+u+m|0;U=u+U+(E>>>6^E>>>11^E>>>25^E<<26^E<<21^E<<7)+(C^E&(S^C))+0x2de92c6f|0;L=L+U|0;U=U+(k&M^H&(k^M))+(k>>>2^k>>>13^k>>>22^k<<30^k<<19^k<<10)|0;l=(y>>>7^y>>>18^y>>>3^y<<25^y<<14)+(c>>>17^c>>>19^c>>>10^c<<15^c<<13)+l+_|0;C=l+C+(L>>>6^L>>>11^L>>>25^L<<26^L<<21^L<<7)+(S^L&(E^S))+0x4a7484aa|0;H=H+C|0;C=C+(U&k^M&(U^k))+(U>>>2^U>>>13^U>>>22^U<<30^U<<19^U<<10)|0;y=(w>>>7^w>>>18^w>>>3^w<<25^w<<14)+(u>>>17^u>>>19^u>>>10^u<<15^u<<13)+y+A|0;S=y+S+(H>>>6^H>>>11^H>>>25^H<<26^H<<21^H<<7)+(E^H&(L^E))+0x5cb0a9dc|0;M=M+S|0;S=S+(C&U^k&(C^U))+(C>>>2^C>>>13^C>>>22^C<<30^C<<19^C<<10)|0;w=(d>>>7^d>>>18^d>>>3^d<<25^d<<14)+(l>>>17^l>>>19^l>>>10^l<<15^l<<13)+w+f|0;E=w+E+(M>>>6^M>>>11^M>>>25^M<<26^M<<21^M<<7)+(L^M&(H^L))+0x76f988da|0;k=k+E|0;E=E+(S&C^U&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;d=(p>>>7^p>>>18^p>>>3^p<<25^p<<14)+(y>>>17^y>>>19^y>>>10^y<<15^y<<13)+d+t|0;L=d+L+(k>>>6^k>>>11^k>>>25^k<<26^k<<21^k<<7)+(H^k&(M^H))+0x983e5152|0;U=U+L|0;L=L+(E&S^C&(E^S))+(E>>>2^E>>>13^E>>>22^E<<30^E<<19^E<<10)|0;p=(g>>>7^g>>>18^g>>>3^g<<25^g<<14)+(w>>>17^w>>>19^w>>>10^w<<15^w<<13)+p+e|0;H=p+H+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(M^U&(k^M))+0xa831c66d|0;C=C+H|0;H=H+(L&E^S&(L^E))+(L>>>2^L>>>13^L>>>22^L<<30^L<<19^L<<10)|0;g=(v>>>7^v>>>18^v>>>3^v<<25^v<<14)+(d>>>17^d>>>19^d>>>10^d<<15^d<<13)+g+c|0;M=g+M+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(k^C&(U^k))+0xb00327c8|0;S=S+M|0;M=M+(H&L^E&(H^L))+(H>>>2^H>>>13^H>>>22^H<<30^H<<19^H<<10)|0;v=(b>>>7^b>>>18^b>>>3^b<<25^b<<14)+(p>>>17^p>>>19^p>>>10^p<<15^p<<13)+v+u|0;k=v+k+(S>>>6^S>>>11^S>>>25^S<<26^S<<21^S<<7)+(U^S&(C^U))+0xbf597fc7|0;E=E+k|0;k=k+(M&H^L&(M^H))+(M>>>2^M>>>13^M>>>22^M<<30^M<<19^M<<10)|0;b=(m>>>7^m>>>18^m>>>3^m<<25^m<<14)+(g>>>17^g>>>19^g>>>10^g<<15^g<<13)+b+l|0;U=b+U+(E>>>6^E>>>11^E>>>25^E<<26^E<<21^E<<7)+(C^E&(S^C))+0xc6e00bf3|0;L=L+U|0;U=U+(k&M^H&(k^M))+(k>>>2^k>>>13^k>>>22^k<<30^k<<19^k<<10)|0;m=(_>>>7^_>>>18^_>>>3^_<<25^_<<14)+(v>>>17^v>>>19^v>>>10^v<<15^v<<13)+m+y|0;C=m+C+(L>>>6^L>>>11^L>>>25^L<<26^L<<21^L<<7)+(S^L&(E^S))+0xd5a79147|0;H=H+C|0;C=C+(U&k^M&(U^k))+(U>>>2^U>>>13^U>>>22^U<<30^U<<19^U<<10)|0;_=(A>>>7^A>>>18^A>>>3^A<<25^A<<14)+(b>>>17^b>>>19^b>>>10^b<<15^b<<13)+_+w|0;S=_+S+(H>>>6^H>>>11^H>>>25^H<<26^H<<21^H<<7)+(E^H&(L^E))+0x06ca6351|0;M=M+S|0;S=S+(C&U^k&(C^U))+(C>>>2^C>>>13^C>>>22^C<<30^C<<19^C<<10)|0;A=(f>>>7^f>>>18^f>>>3^f<<25^f<<14)+(m>>>17^m>>>19^m>>>10^m<<15^m<<13)+A+d|0;E=A+E+(M>>>6^M>>>11^M>>>25^M<<26^M<<21^M<<7)+(L^M&(H^L))+0x14292967|0;k=k+E|0;E=E+(S&C^U&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;f=(t>>>7^t>>>18^t>>>3^t<<25^t<<14)+(_>>>17^_>>>19^_>>>10^_<<15^_<<13)+f+p|0;L=f+L+(k>>>6^k>>>11^k>>>25^k<<26^k<<21^k<<7)+(H^k&(M^H))+0x27b70a85|0;U=U+L|0;L=L+(E&S^C&(E^S))+(E>>>2^E>>>13^E>>>22^E<<30^E<<19^E<<10)|0;t=(e>>>7^e>>>18^e>>>3^e<<25^e<<14)+(A>>>17^A>>>19^A>>>10^A<<15^A<<13)+t+g|0;H=t+H+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(M^U&(k^M))+0x2e1b2138|0;C=C+H|0;H=H+(L&E^S&(L^E))+(L>>>2^L>>>13^L>>>22^L<<30^L<<19^L<<10)|0;e=(c>>>7^c>>>18^c>>>3^c<<25^c<<14)+(f>>>17^f>>>19^f>>>10^f<<15^f<<13)+e+v|0;M=e+M+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(k^C&(U^k))+0x4d2c6dfc|0;S=S+M|0;M=M+(H&L^E&(H^L))+(H>>>2^H>>>13^H>>>22^H<<30^H<<19^H<<10)|0;c=(u>>>7^u>>>18^u>>>3^u<<25^u<<14)+(t>>>17^t>>>19^t>>>10^t<<15^t<<13)+c+b|0;k=c+k+(S>>>6^S>>>11^S>>>25^S<<26^S<<21^S<<7)+(U^S&(C^U))+0x53380d13|0;E=E+k|0;k=k+(M&H^L&(M^H))+(M>>>2^M>>>13^M>>>22^M<<30^M<<19^M<<10)|0;u=(l>>>7^l>>>18^l>>>3^l<<25^l<<14)+(e>>>17^e>>>19^e>>>10^e<<15^e<<13)+u+m|0;U=u+U+(E>>>6^E>>>11^E>>>25^E<<26^E<<21^E<<7)+(C^E&(S^C))+0x650a7354|0;L=L+U|0;U=U+(k&M^H&(k^M))+(k>>>2^k>>>13^k>>>22^k<<30^k<<19^k<<10)|0;l=(y>>>7^y>>>18^y>>>3^y<<25^y<<14)+(c>>>17^c>>>19^c>>>10^c<<15^c<<13)+l+_|0;C=l+C+(L>>>6^L>>>11^L>>>25^L<<26^L<<21^L<<7)+(S^L&(E^S))+0x766a0abb|0;H=H+C|0;C=C+(U&k^M&(U^k))+(U>>>2^U>>>13^U>>>22^U<<30^U<<19^U<<10)|0;y=(w>>>7^w>>>18^w>>>3^w<<25^w<<14)+(u>>>17^u>>>19^u>>>10^u<<15^u<<13)+y+A|0;S=y+S+(H>>>6^H>>>11^H>>>25^H<<26^H<<21^H<<7)+(E^H&(L^E))+0x81c2c92e|0;M=M+S|0;S=S+(C&U^k&(C^U))+(C>>>2^C>>>13^C>>>22^C<<30^C<<19^C<<10)|0;w=(d>>>7^d>>>18^d>>>3^d<<25^d<<14)+(l>>>17^l>>>19^l>>>10^l<<15^l<<13)+w+f|0;E=w+E+(M>>>6^M>>>11^M>>>25^M<<26^M<<21^M<<7)+(L^M&(H^L))+0x92722c85|0;k=k+E|0;E=E+(S&C^U&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;d=(p>>>7^p>>>18^p>>>3^p<<25^p<<14)+(y>>>17^y>>>19^y>>>10^y<<15^y<<13)+d+t|0;L=d+L+(k>>>6^k>>>11^k>>>25^k<<26^k<<21^k<<7)+(H^k&(M^H))+0xa2bfe8a1|0;U=U+L|0;L=L+(E&S^C&(E^S))+(E>>>2^E>>>13^E>>>22^E<<30^E<<19^E<<10)|0;p=(g>>>7^g>>>18^g>>>3^g<<25^g<<14)+(w>>>17^w>>>19^w>>>10^w<<15^w<<13)+p+e|0;H=p+H+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(M^U&(k^M))+0xa81a664b|0;C=C+H|0;H=H+(L&E^S&(L^E))+(L>>>2^L>>>13^L>>>22^L<<30^L<<19^L<<10)|0;g=(v>>>7^v>>>18^v>>>3^v<<25^v<<14)+(d>>>17^d>>>19^d>>>10^d<<15^d<<13)+g+c|0;M=g+M+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(k^C&(U^k))+0xc24b8b70|0;S=S+M|0;M=M+(H&L^E&(H^L))+(H>>>2^H>>>13^H>>>22^H<<30^H<<19^H<<10)|0;v=(b>>>7^b>>>18^b>>>3^b<<25^b<<14)+(p>>>17^p>>>19^p>>>10^p<<15^p<<13)+v+u|0;k=v+k+(S>>>6^S>>>11^S>>>25^S<<26^S<<21^S<<7)+(U^S&(C^U))+0xc76c51a3|0;E=E+k|0;k=k+(M&H^L&(M^H))+(M>>>2^M>>>13^M>>>22^M<<30^M<<19^M<<10)|0;b=(m>>>7^m>>>18^m>>>3^m<<25^m<<14)+(g>>>17^g>>>19^g>>>10^g<<15^g<<13)+b+l|0;U=b+U+(E>>>6^E>>>11^E>>>25^E<<26^E<<21^E<<7)+(C^E&(S^C))+0xd192e819|0;L=L+U|0;U=U+(k&M^H&(k^M))+(k>>>2^k>>>13^k>>>22^k<<30^k<<19^k<<10)|0;m=(_>>>7^_>>>18^_>>>3^_<<25^_<<14)+(v>>>17^v>>>19^v>>>10^v<<15^v<<13)+m+y|0;C=m+C+(L>>>6^L>>>11^L>>>25^L<<26^L<<21^L<<7)+(S^L&(E^S))+0xd6990624|0;H=H+C|0;C=C+(U&k^M&(U^k))+(U>>>2^U>>>13^U>>>22^U<<30^U<<19^U<<10)|0;_=(A>>>7^A>>>18^A>>>3^A<<25^A<<14)+(b>>>17^b>>>19^b>>>10^b<<15^b<<13)+_+w|0;S=_+S+(H>>>6^H>>>11^H>>>25^H<<26^H<<21^H<<7)+(E^H&(L^E))+0xf40e3585|0;M=M+S|0;S=S+(C&U^k&(C^U))+(C>>>2^C>>>13^C>>>22^C<<30^C<<19^C<<10)|0;A=(f>>>7^f>>>18^f>>>3^f<<25^f<<14)+(m>>>17^m>>>19^m>>>10^m<<15^m<<13)+A+d|0;E=A+E+(M>>>6^M>>>11^M>>>25^M<<26^M<<21^M<<7)+(L^M&(H^L))+0x106aa070|0;k=k+E|0;E=E+(S&C^U&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;f=(t>>>7^t>>>18^t>>>3^t<<25^t<<14)+(_>>>17^_>>>19^_>>>10^_<<15^_<<13)+f+p|0;L=f+L+(k>>>6^k>>>11^k>>>25^k<<26^k<<21^k<<7)+(H^k&(M^H))+0x19a4c116|0;U=U+L|0;L=L+(E&S^C&(E^S))+(E>>>2^E>>>13^E>>>22^E<<30^E<<19^E<<10)|0;t=(e>>>7^e>>>18^e>>>3^e<<25^e<<14)+(A>>>17^A>>>19^A>>>10^A<<15^A<<13)+t+g|0;H=t+H+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(M^U&(k^M))+0x1e376c08|0;C=C+H|0;H=H+(L&E^S&(L^E))+(L>>>2^L>>>13^L>>>22^L<<30^L<<19^L<<10)|0;e=(c>>>7^c>>>18^c>>>3^c<<25^c<<14)+(f>>>17^f>>>19^f>>>10^f<<15^f<<13)+e+v|0;M=e+M+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(k^C&(U^k))+0x2748774c|0;S=S+M|0;M=M+(H&L^E&(H^L))+(H>>>2^H>>>13^H>>>22^H<<30^H<<19^H<<10)|0;c=(u>>>7^u>>>18^u>>>3^u<<25^u<<14)+(t>>>17^t>>>19^t>>>10^t<<15^t<<13)+c+b|0;k=c+k+(S>>>6^S>>>11^S>>>25^S<<26^S<<21^S<<7)+(U^S&(C^U))+0x34b0bcb5|0;E=E+k|0;k=k+(M&H^L&(M^H))+(M>>>2^M>>>13^M>>>22^M<<30^M<<19^M<<10)|0;u=(l>>>7^l>>>18^l>>>3^l<<25^l<<14)+(e>>>17^e>>>19^e>>>10^e<<15^e<<13)+u+m|0;U=u+U+(E>>>6^E>>>11^E>>>25^E<<26^E<<21^E<<7)+(C^E&(S^C))+0x391c0cb3|0;L=L+U|0;U=U+(k&M^H&(k^M))+(k>>>2^k>>>13^k>>>22^k<<30^k<<19^k<<10)|0;l=(y>>>7^y>>>18^y>>>3^y<<25^y<<14)+(c>>>17^c>>>19^c>>>10^c<<15^c<<13)+l+_|0;C=l+C+(L>>>6^L>>>11^L>>>25^L<<26^L<<21^L<<7)+(S^L&(E^S))+0x4ed8aa4a|0;H=H+C|0;C=C+(U&k^M&(U^k))+(U>>>2^U>>>13^U>>>22^U<<30^U<<19^U<<10)|0;y=(w>>>7^w>>>18^w>>>3^w<<25^w<<14)+(u>>>17^u>>>19^u>>>10^u<<15^u<<13)+y+A|0;S=y+S+(H>>>6^H>>>11^H>>>25^H<<26^H<<21^H<<7)+(E^H&(L^E))+0x5b9cca4f|0;M=M+S|0;S=S+(C&U^k&(C^U))+(C>>>2^C>>>13^C>>>22^C<<30^C<<19^C<<10)|0;w=(d>>>7^d>>>18^d>>>3^d<<25^d<<14)+(l>>>17^l>>>19^l>>>10^l<<15^l<<13)+w+f|0;E=w+E+(M>>>6^M>>>11^M>>>25^M<<26^M<<21^M<<7)+(L^M&(H^L))+0x682e6ff3|0;k=k+E|0;E=E+(S&C^U&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;d=(p>>>7^p>>>18^p>>>3^p<<25^p<<14)+(y>>>17^y>>>19^y>>>10^y<<15^y<<13)+d+t|0;L=d+L+(k>>>6^k>>>11^k>>>25^k<<26^k<<21^k<<7)+(H^k&(M^H))+0x748f82ee|0;U=U+L|0;L=L+(E&S^C&(E^S))+(E>>>2^E>>>13^E>>>22^E<<30^E<<19^E<<10)|0;p=(g>>>7^g>>>18^g>>>3^g<<25^g<<14)+(w>>>17^w>>>19^w>>>10^w<<15^w<<13)+p+e|0;H=p+H+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(M^U&(k^M))+0x78a5636f|0;C=C+H|0;H=H+(L&E^S&(L^E))+(L>>>2^L>>>13^L>>>22^L<<30^L<<19^L<<10)|0;g=(v>>>7^v>>>18^v>>>3^v<<25^v<<14)+(d>>>17^d>>>19^d>>>10^d<<15^d<<13)+g+c|0;M=g+M+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(k^C&(U^k))+0x84c87814|0;S=S+M|0;M=M+(H&L^E&(H^L))+(H>>>2^H>>>13^H>>>22^H<<30^H<<19^H<<10)|0;v=(b>>>7^b>>>18^b>>>3^b<<25^b<<14)+(p>>>17^p>>>19^p>>>10^p<<15^p<<13)+v+u|0;k=v+k+(S>>>6^S>>>11^S>>>25^S<<26^S<<21^S<<7)+(U^S&(C^U))+0x8cc70208|0;E=E+k|0;k=k+(M&H^L&(M^H))+(M>>>2^M>>>13^M>>>22^M<<30^M<<19^M<<10)|0;b=(m>>>7^m>>>18^m>>>3^m<<25^m<<14)+(g>>>17^g>>>19^g>>>10^g<<15^g<<13)+b+l|0;U=b+U+(E>>>6^E>>>11^E>>>25^E<<26^E<<21^E<<7)+(C^E&(S^C))+0x90befffa|0;L=L+U|0;U=U+(k&M^H&(k^M))+(k>>>2^k>>>13^k>>>22^k<<30^k<<19^k<<10)|0;m=(_>>>7^_>>>18^_>>>3^_<<25^_<<14)+(v>>>17^v>>>19^v>>>10^v<<15^v<<13)+m+y|0;C=m+C+(L>>>6^L>>>11^L>>>25^L<<26^L<<21^L<<7)+(S^L&(E^S))+0xa4506ceb|0;H=H+C|0;C=C+(U&k^M&(U^k))+(U>>>2^U>>>13^U>>>22^U<<30^U<<19^U<<10)|0;_=(A>>>7^A>>>18^A>>>3^A<<25^A<<14)+(b>>>17^b>>>19^b>>>10^b<<15^b<<13)+_+w|0;S=_+S+(H>>>6^H>>>11^H>>>25^H<<26^H<<21^H<<7)+(E^H&(L^E))+0xbef9a3f7|0;M=M+S|0;S=S+(C&U^k&(C^U))+(C>>>2^C>>>13^C>>>22^C<<30^C<<19^C<<10)|0;A=(f>>>7^f>>>18^f>>>3^f<<25^f<<14)+(m>>>17^m>>>19^m>>>10^m<<15^m<<13)+A+d|0;E=A+E+(M>>>6^M>>>11^M>>>25^M<<26^M<<21^M<<7)+(L^M&(H^L))+0xc67178f2|0;k=k+E|0;E=E+(S&C^U&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;r=r+E|0;i=i+S|0;s=s+C|0;n=n+U|0;a=a+k|0;h=h+M|0;o=o+H|0;x=x+L|0}function L(f){f=f|0;H(M[f|0]<<24|M[f|1]<<16|M[f|2]<<8|M[f|3],M[f|4]<<24|M[f|5]<<16|M[f|6]<<8|M[f|7],M[f|8]<<24|M[f|9]<<16|M[f|10]<<8|M[f|11],M[f|12]<<24|M[f|13]<<16|M[f|14]<<8|M[f|15],M[f|16]<<24|M[f|17]<<16|M[f|18]<<8|M[f|19],M[f|20]<<24|M[f|21]<<16|M[f|22]<<8|M[f|23],M[f|24]<<24|M[f|25]<<16|M[f|26]<<8|M[f|27],M[f|28]<<24|M[f|29]<<16|M[f|30]<<8|M[f|31],M[f|32]<<24|M[f|33]<<16|M[f|34]<<8|M[f|35],M[f|36]<<24|M[f|37]<<16|M[f|38]<<8|M[f|39],M[f|40]<<24|M[f|41]<<16|M[f|42]<<8|M[f|43],M[f|44]<<24|M[f|45]<<16|M[f|46]<<8|M[f|47],M[f|48]<<24|M[f|49]<<16|M[f|50]<<8|M[f|51],M[f|52]<<24|M[f|53]<<16|M[f|54]<<8|M[f|55],M[f|56]<<24|M[f|57]<<16|M[f|58]<<8|M[f|59],M[f|60]<<24|M[f|61]<<16|M[f|62]<<8|M[f|63])}function T(f){f=f|0;M[f|0]=r>>>24;M[f|1]=r>>>16&255;M[f|2]=r>>>8&255;M[f|3]=r&255;M[f|4]=i>>>24;M[f|5]=i>>>16&255;M[f|6]=i>>>8&255;M[f|7]=i&255;M[f|8]=s>>>24;M[f|9]=s>>>16&255;M[f|10]=s>>>8&255;M[f|11]=s&255;M[f|12]=n>>>24;M[f|13]=n>>>16&255;M[f|14]=n>>>8&255;M[f|15]=n&255;M[f|16]=a>>>24;M[f|17]=a>>>16&255;M[f|18]=a>>>8&255;M[f|19]=a&255;M[f|20]=h>>>24;M[f|21]=h>>>16&255;M[f|22]=h>>>8&255;M[f|23]=h&255;M[f|24]=o>>>24;M[f|25]=o>>>16&255;M[f|26]=o>>>8&255;M[f|27]=o&255;M[f|28]=x>>>24;M[f|29]=x>>>16&255;M[f|30]=x>>>8&255;M[f|31]=x&255}function I(){r=0x6a09e667;i=0xbb67ae85;s=0x3c6ef372;n=0xa54ff53a;a=0x510e527f;h=0x9b05688c;o=0x1f83d9ab;x=0x5be0cd19;c=u=0}function Z(f,t,e,l,y,w,d,p,g,v){f=f|0;t=t|0;e=e|0;l=l|0;y=y|0;w=w|0;d=d|0;p=p|0;g=g|0;v=v|0;r=f;i=t;s=e;n=l;a=y;h=w;o=d;x=p;c=g;u=v}function D(f,t){f=f|0;t=t|0;var e=0;if(f&63)return-1;while((t|0)>=64){L(f);f=f+64|0;t=t-64|0;e=e+64|0}c=c+e|0;if(c>>>0>>0)u=u+1|0;return e|0}function P(f,t,e){f=f|0;t=t|0;e=e|0;var r=0,i=0;if(f&63)return-1;if(~e)if(e&31)return-1;if((t|0)>=64){r=D(f,t)|0;if((r|0)==-1)return-1;f=f+r|0;t=t-r|0}r=r+t|0;c=c+t|0;if(c>>>0>>0)u=u+1|0;M[f|t]=0x80;if((t|0)>=56){for(i=t+1|0;(i|0)<64;i=i+1|0)M[f|i]=0x00;L(f);t=0;M[f|0]=0}for(i=t+1|0;(i|0)<59;i=i+1|0)M[f|i]=0;M[f|56]=u>>>21&255;M[f|57]=u>>>13&255;M[f|58]=u>>>5&255;M[f|59]=u<<3&255|c>>>29;M[f|60]=c>>>21&255;M[f|61]=c>>>13&255;M[f|62]=c>>>5&255;M[f|63]=c<<3&255;L(f);if(~e)T(e);return r|0}function O(){r=l;i=y;s=w;n=d;a=p;h=g;o=v;x=b;c=64;u=0}function B(){r=m;i=_;s=A;n=E;a=S;h=C;o=U;x=k;c=64;u=0}function q(f,t,e,M,L,T,Z,D,P,O,B,q,G,R,z,N){f=f|0;t=t|0;e=e|0;M=M|0;L=L|0;T=T|0;Z=Z|0;D=D|0;P=P|0;O=O|0;B=B|0;q=q|0;G=G|0;R=R|0;z=z|0;N=N|0;I();H(f^0x5c5c5c5c,t^0x5c5c5c5c,e^0x5c5c5c5c,M^0x5c5c5c5c,L^0x5c5c5c5c,T^0x5c5c5c5c,Z^0x5c5c5c5c,D^0x5c5c5c5c,P^0x5c5c5c5c,O^0x5c5c5c5c,B^0x5c5c5c5c,q^0x5c5c5c5c,G^0x5c5c5c5c,R^0x5c5c5c5c,z^0x5c5c5c5c,N^0x5c5c5c5c);m=r;_=i;A=s;E=n;S=a;C=h;U=o;k=x;I();H(f^0x36363636,t^0x36363636,e^0x36363636,M^0x36363636,L^0x36363636,T^0x36363636,Z^0x36363636,D^0x36363636,P^0x36363636,O^0x36363636,B^0x36363636,q^0x36363636,G^0x36363636,R^0x36363636,z^0x36363636,N^0x36363636);l=r;y=i;w=s;d=n;p=a;g=h;v=o;b=x;c=64;u=0}function G(f,t,e){f=f|0;t=t|0;e=e|0;var c=0,u=0,l=0,y=0,w=0,d=0,p=0,g=0,v=0;if(f&63)return-1;if(~e)if(e&31)return-1;v=P(f,t,-1)|0;c=r,u=i,l=s,y=n,w=a,d=h,p=o,g=x;B();H(c,u,l,y,w,d,p,g,0x80000000,0,0,0,0,0,0,768);if(~e)T(e);return v|0}function R(f,t,e,c,u){f=f|0;t=t|0;e=e|0;c=c|0;u=u|0;var l=0,y=0,w=0,d=0,p=0,g=0,v=0,b=0,m=0,_=0,A=0,E=0,S=0,C=0,U=0,k=0;if(f&63)return-1;if(~u)if(u&31)return-1;M[f+t|0]=e>>>24;M[f+t+1|0]=e>>>16&255;M[f+t+2|0]=e>>>8&255;M[f+t+3|0]=e&255;G(f,t+4|0,-1)|0;l=m=r,y=_=i,w=A=s,d=E=n,p=S=a,g=C=h,v=U=o,b=k=x;c=c-1|0;while((c|0)>0){O();H(m,_,A,E,S,C,U,k,0x80000000,0,0,0,0,0,0,768);m=r,_=i,A=s,E=n,S=a,C=h,U=o,k=x;B();H(m,_,A,E,S,C,U,k,0x80000000,0,0,0,0,0,0,768);m=r,_=i,A=s,E=n,S=a,C=h,U=o,k=x;l=l^r;y=y^i;w=w^s;d=d^n;p=p^a;g=g^h;v=v^o;b=b^x;c=c-1|0}r=l;i=y;s=w;n=d;a=p;h=g;o=v;x=b;if(~u)T(u);return 0}return{reset:I,init:Z,process:D,finish:P,hmac_reset:O,hmac_init:q,hmac_finish:G,pbkdf2_generate_block:R}}({Uint8Array:Uint8Array},null,this.heap.buffer),this.BLOCK_SIZE=Z,this.HASH_SIZE=D,this.reset()}P.BLOCK_SIZE=Z,P.HASH_SIZE=D,P.NAME="sha256";var O=P.prototype;O.reset=A,O.process=E,O.finish=S;var B=null;function q(){return null===B&&(B=new P({heapSize:1048576})),B}function G(f){if(void 0===f)throw new SyntaxError("data required");return q().reset().process(f).finish().result}var R=P;R.bytes=G,R.hex=function(f){return i(G(f))},R.base64=function(f){return s(G(f))};class z{constructor(f){if(!(f=f||{}).hash)throw new SyntaxError("option 'hash' is required");if(!f.hash.HASH_SIZE)throw new SyntaxError("option 'hash' supplied doesn't seem to be a valid hash function");return this.hash=f.hash,this.BLOCK_SIZE=this.hash.BLOCK_SIZE,this.HMAC_SIZE=this.hash.HASH_SIZE,this.key=null,this.verify=null,this.result=null,void 0===f.password&&void 0===f.verify||this.reset(f),this}reset(f){var t=(f=f||{}).password;if(null===this.key&&!a(t)&&!t)throw new l("no key is associated with the instance");this.result=null,this.hash.reset(),(t||a(t))&&(this.key=N(this.hash,t));for(var e=new Uint8Array(this.key),r=0;rf.BLOCK_SIZE?r.set(f.reset().process(t).finish().result):r.set(t),r}class K extends z{constructor(f){(f=f||{}).hash instanceof k||(f.hash=L()),super(f)}reset(f){f=f||{},this.result=null,this.hash.reset();var t=f.password;if(void 0!==t){a(t)&&(t=e(t));var r=this.key=N(this.hash,t);this.hash.reset().asm.hmac_init(r[0]<<24|r[1]<<16|r[2]<<8|r[3],r[4]<<24|r[5]<<16|r[6]<<8|r[7],r[8]<<24|r[9]<<16|r[10]<<8|r[11],r[12]<<24|r[13]<<16|r[14]<<8|r[15],r[16]<<24|r[17]<<16|r[18]<<8|r[19],r[20]<<24|r[21]<<16|r[22]<<8|r[23],r[24]<<24|r[25]<<16|r[26]<<8|r[27],r[28]<<24|r[29]<<16|r[30]<<8|r[31],r[32]<<24|r[33]<<16|r[34]<<8|r[35],r[36]<<24|r[37]<<16|r[38]<<8|r[39],r[40]<<24|r[41]<<16|r[42]<<8|r[43],r[44]<<24|r[45]<<16|r[46]<<8|r[47],r[48]<<24|r[49]<<16|r[50]<<8|r[51],r[52]<<24|r[53]<<16|r[54]<<8|r[55],r[56]<<24|r[57]<<16|r[58]<<8|r[59],r[60]<<24|r[61]<<16|r[62]<<8|r[63])}else this.hash.asm.hmac_reset();var i=f.verify;return void 0!==i?this._hmac_init_verify(i):this.verify=null,this}finish(){if(null===this.key)throw new l("no key is associated with the instance");if(null!==this.result)throw new l("state must be reset before processing new data");var f=this.hash,t=this.hash.asm,e=this.hash.heap;t.hmac_finish(f.pos,f.len,0);var r=this.verify,i=new Uint8Array(U);if(i.set(e.subarray(0,U)),r)if(r.length===i.length){for(var s=0,n=0;n>>24&255,i>>>16&255,i>>>8&255,255&i])).finish().result);this.result.set(h.subarray(0,n),s);for(var o=1;o>>2,n=n+(a=a+t|0)|0,n^=a<<8,a=a+(h=h+e|0)|0,a^=h>>>16,h=h+(x=x+n|0)|0,h^=x<<10,x=x+(u=u+a|0)|0,x^=u>>>4,u=u+(y=y+h|0)|0,u^=y<<8,y=y+(t=t+x|0)|0,n=n+(y^=t>>>9)|0,t=t+(e=e+u|0)|0}i=s=o=0,t=e=n=a=h=x=u=y=2654435769;for(var d=0;d<4;d++)w();for(d=0;d<256;d+=8)t=t+r[0|d]|0,e=e+r[1|d]|0,n=n+r[2|d]|0,a=a+r[3|d]|0,h=h+r[4|d]|0,x=x+r[5|d]|0,u=u+r[6|d]|0,y=y+r[7|d]|0,w(),f.set([t,e,n,a,h,x,u,y],d);for(d=0;d<256;d+=8)t=t+f[0|d]|0,e=e+f[1|d]|0,n=n+f[2|d]|0,a=a+f[3|d]|0,h=h+f[4|d]|0,x=x+f[5|d]|0,u=u+f[6|d]|0,y=y+f[7|d]|0,w(),f.set([t,e,n,a,h,x,u,y],d);l(1),c=256}function l(t){var e,n,a;for(t=t||1;t--;)for(s=s+(o=o+1|0)|0,e=0;e<256;e+=4)i^=i<<13,i=f[e+128&255]+i|0,n=f[0|e],f[0|e]=a=f[n>>>2&255]+(i+s|0)|0,r[0|e]=s=f[a>>>10&255]+n|0,i^=i>>>6,i=f[e+129&255]+i|0,n=f[1|e],f[1|e]=a=f[n>>>2&255]+(i+s|0)|0,r[1|e]=s=f[a>>>10&255]+n|0,i^=i<<2,i=f[e+130&255]+i|0,n=f[2|e],f[2|e]=a=f[n>>>2&255]+(i+s|0)|0,r[2|e]=s=f[a>>>10&255]+n|0,i^=i>>>16,i=f[e+131&255]+i|0,n=f[3|e],f[3|e]=a=f[n>>>2&255]+(i+s|0)|0,r[3|e]=s=f[a>>>10&255]+n|0}return{seed:function(f){var i,s,o,c,l;if(x(f))f=new Uint8Array(f.buffer);else if(n(f))(c=new t(1))[0]=f,f=new Uint8Array(c.buffer);else if(a(f))f=e(f);else{if(!h(f))throw new TypeError("bad seed type");f=new Uint8Array(f)}for(l=f.length,s=0;s>2]^=f[o]<<((3&i)<<3);u()}},prng:l,rand:function(){return c--||(l(1),c=255),r[c]}}}(),df="undefined"!=typeof console?console:void 0,pf=Date.now,gf=Math.random,vf="undefined"!=typeof performance?performance:void 0,bf="undefined"!=typeof crypto?crypto:"undefined"!=typeof msCrypto?msCrypto:void 0;void 0!==bf&&(lf=bf.getRandomValues);var mf,_f=wf.rand,Af=wf.seed,Ef=0,Sf=!1,Cf=!1,Uf=0,kf=256,Mf={};if(f._random_skip_system_rng_warning=!1,f._random_allow_weak=!1,void 0!==vf)mf=function(){return 1e3*vf.now()|0};else{var Hf=1e3*pf()|0;mf=function(){return 1e3*pf()-Hf|0}}function Lf(){if(void 0!==bf)r=new Uint8Array(32),lf.call(bf,r),Af(r);else{var f,e,r=new t(3);r[0]=gf(),r[1]=pf(),r[2]=mf(),r=new Uint8Array(r.buffer);var i="";"undefined"!=typeof location?i+=location.href:"undefined"!=typeof process&&(i+=process.pid+process.title);var s=cf();for(f=0;f<100;f++)r=s.reset({password:r}).generate(i,1e3,32).result,e=mf(),r[0]^=e>>>24,r[1]^=e>>>16,r[2]^=e>>>8,r[3]^=e;Af(r)}Ef=0,Sf=!0}function Tf(f){if(!h(f)&&!x(f))throw new TypeError("bad seed type");var t=f.byteOffset||0,e=f.byteLength||f.length,r=new Uint8Array(f.buffer||f,t,e);Af(r),Ef=0;for(var i=0,s=0;s=kf}function If(t){if(Sf||Lf(),!Cf&&void 0===bf){if(!f._random_allow_weak)throw new w("No strong PRNGs available. Use asmCrypto.random.seed().");void 0!==df&&df.error("No strong PRNGs available; your security is greatly lowered. Use asmCrypto.random.seed().")}if(!f._random_skip_system_rng_warning&&!Cf&&void 0!==bf&&void 0!==df){var e=(new Error).stack;Mf[e]|=0,Mf[e]++||df.warn("asmCrypto PRNG not seeded; your security relies on your system PRNG. If this is not acceptable, use asmCrypto.random.seed().")}if(!h(t)&&!x(t))throw new TypeError("unexpected buffer type");var r,i,s=t.byteOffset||0,n=t.byteLength||t.length,a=new Uint8Array(t.buffer||t,s,n);for(void 0!==bf&&lf.call(bf,a),r=0;r=1099511627776&&Lf(),i=_f(),Ef++),a[r]^=i,i>>>=8;return t}function Zf(){(!Sf||Ef>=1099511627776)&&Lf();var f=(1048576*_f()+(_f()>>>12))/4503599627370496;return Ef+=2,f}function Df(f,t,e){"use asm";var r=0;var i=new f.Uint32Array(e);var s=f.Math.imul;function n(f){f=f|0;r=f=f+31&-32;return f|0}function a(f){f=f|0;var t=0;t=r;r=t+(f+31&-32)|0;return t|0}function h(f){f=f|0;r=r-(f+31&-32)|0}function o(f,t,e){f=f|0;t=t|0;e=e|0;var r=0;if((t|0)>(e|0)){for(;(r|0)<(f|0);r=r+4|0){i[e+r>>2]=i[t+r>>2]}}else{for(r=f-4|0;(r|0)>=0;r=r-4|0){i[e+r>>2]=i[t+r>>2]}}}function x(f,t,e){f=f|0;t=t|0;e=e|0;var r=0;for(;(r|0)<(f|0);r=r+4|0){i[e+r>>2]=t}}function c(f,t,e,r){f=f|0;t=t|0;e=e|0;r=r|0;var s=0,n=0,a=0,h=0,o=0;if((r|0)<=0)r=t;if((r|0)<(t|0))t=r;n=1;for(;(o|0)<(t|0);o=o+4|0){s=~i[f+o>>2];a=(s&0xffff)+n|0;h=(s>>>16)+(a>>>16)|0;i[e+o>>2]=h<<16|a&0xffff;n=h>>>16}for(;(o|0)<(r|0);o=o+4|0){i[e+o>>2]=n-1|0}return n|0}function u(f,t,e,r){f=f|0;t=t|0;e=e|0;r=r|0;var s=0,n=0,a=0;if((t|0)>(r|0)){for(a=t-4|0;(a|0)>=(r|0);a=a-4|0){if(i[f+a>>2]|0)return 1}}else{for(a=r-4|0;(a|0)>=(t|0);a=a-4|0){if(i[e+a>>2]|0)return-1}}for(;(a|0)>=0;a=a-4|0){s=i[f+a>>2]|0,n=i[e+a>>2]|0;if(s>>>0>>0)return-1;if(s>>>0>n>>>0)return 1}return 0}function l(f,t){f=f|0;t=t|0;var e=0;for(e=t-4|0;(e|0)>=0;e=e-4|0){if(i[f+e>>2]|0)return e+4|0}return 0}function y(f,t,e,r,s,n){f=f|0;t=t|0;e=e|0;r=r|0;s=s|0;n=n|0;var a=0,h=0,o=0,x=0,c=0,u=0;if((t|0)<(r|0)){x=f,f=e,e=x;x=t,t=r,r=x}if((n|0)<=0)n=t+4|0;if((n|0)<(r|0))t=r=n;for(;(u|0)<(r|0);u=u+4|0){a=i[f+u>>2]|0;h=i[e+u>>2]|0;x=((a&0xffff)+(h&0xffff)|0)+o|0;c=((a>>>16)+(h>>>16)|0)+(x>>>16)|0;i[s+u>>2]=x&0xffff|c<<16;o=c>>>16}for(;(u|0)<(t|0);u=u+4|0){a=i[f+u>>2]|0;x=(a&0xffff)+o|0;c=(a>>>16)+(x>>>16)|0;i[s+u>>2]=x&0xffff|c<<16;o=c>>>16}for(;(u|0)<(n|0);u=u+4|0){i[s+u>>2]=o|0;o=0}return o|0}function w(f,t,e,r,s,n){f=f|0;t=t|0;e=e|0;r=r|0;s=s|0;n=n|0;var a=0,h=0,o=0,x=0,c=0,u=0;if((n|0)<=0)n=(t|0)>(r|0)?t+4|0:r+4|0;if((n|0)<(t|0))t=n;if((n|0)<(r|0))r=n;if((t|0)<(r|0)){for(;(u|0)<(t|0);u=u+4|0){a=i[f+u>>2]|0;h=i[e+u>>2]|0;x=((a&0xffff)-(h&0xffff)|0)+o|0;c=((a>>>16)-(h>>>16)|0)+(x>>16)|0;i[s+u>>2]=x&0xffff|c<<16;o=c>>16}for(;(u|0)<(r|0);u=u+4|0){h=i[e+u>>2]|0;x=o-(h&0xffff)|0;c=(x>>16)-(h>>>16)|0;i[s+u>>2]=x&0xffff|c<<16;o=c>>16}}else{for(;(u|0)<(r|0);u=u+4|0){a=i[f+u>>2]|0;h=i[e+u>>2]|0;x=((a&0xffff)-(h&0xffff)|0)+o|0;c=((a>>>16)-(h>>>16)|0)+(x>>16)|0;i[s+u>>2]=x&0xffff|c<<16;o=c>>16}for(;(u|0)<(t|0);u=u+4|0){a=i[f+u>>2]|0;x=(a&0xffff)+o|0;c=(a>>>16)+(x>>16)|0;i[s+u>>2]=x&0xffff|c<<16;o=c>>16}}for(;(u|0)<(n|0);u=u+4|0){i[s+u>>2]=o|0}return o|0}function d(f,t,e,r,n,a){f=f|0;t=t|0;e=e|0;r=r|0;n=n|0;a=a|0;var h=0,o=0,x=0,c=0,u=0,l=0,y=0,w=0,d=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|12)>>2]|0,K=i[(cf|16)>>2]|0,F=i[(cf|20)>>2]|0,j=i[(cf|24)>>2]|0,V=i[(cf|28)>>2]|0;ef=((s(h,E)|0)+(W&0xffff)|0)+(G&0xffff)|0;rf=((s(d,E)|0)+(W>>>16)|0)+(G>>>16)|0;sf=((s(h,T)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(d,T)|0)+(rf>>>16)|0)+(sf>>>16)|0;G=sf<<16|ef&0xffff;ef=((s(h,S)|0)+(nf&0xffff)|0)+(R&0xffff)|0;rf=((s(d,S)|0)+(nf>>>16)|0)+(R>>>16)|0;sf=((s(h,I)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(d,I)|0)+(rf>>>16)|0)+(sf>>>16)|0;R=sf<<16|ef&0xffff;ef=((s(h,C)|0)+(nf&0xffff)|0)+(z&0xffff)|0;rf=((s(d,C)|0)+(nf>>>16)|0)+(z>>>16)|0;sf=((s(h,Z)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(d,Z)|0)+(rf>>>16)|0)+(sf>>>16)|0;z=sf<<16|ef&0xffff;ef=((s(h,U)|0)+(nf&0xffff)|0)+(N&0xffff)|0;rf=((s(d,U)|0)+(nf>>>16)|0)+(N>>>16)|0;sf=((s(h,D)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(d,D)|0)+(rf>>>16)|0)+(sf>>>16)|0;N=sf<<16|ef&0xffff;ef=((s(h,k)|0)+(nf&0xffff)|0)+(K&0xffff)|0;rf=((s(d,k)|0)+(nf>>>16)|0)+(K>>>16)|0;sf=((s(h,P)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(d,P)|0)+(rf>>>16)|0)+(sf>>>16)|0;K=sf<<16|ef&0xffff;ef=((s(h,M)|0)+(nf&0xffff)|0)+(F&0xffff)|0;rf=((s(d,M)|0)+(nf>>>16)|0)+(F>>>16)|0;sf=((s(h,O)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(d,O)|0)+(rf>>>16)|0)+(sf>>>16)|0;F=sf<<16|ef&0xffff;ef=((s(h,H)|0)+(nf&0xffff)|0)+(j&0xffff)|0;rf=((s(d,H)|0)+(nf>>>16)|0)+(j>>>16)|0;sf=((s(h,B)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(d,B)|0)+(rf>>>16)|0)+(sf>>>16)|0;j=sf<<16|ef&0xffff;ef=((s(h,L)|0)+(nf&0xffff)|0)+(V&0xffff)|0;rf=((s(d,L)|0)+(nf>>>16)|0)+(V>>>16)|0;sf=((s(h,q)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(d,q)|0)+(rf>>>16)|0)+(sf>>>16)|0;V=sf<<16|ef&0xffff;W=nf;ef=((s(o,E)|0)+(J&0xffff)|0)+(R&0xffff)|0;rf=((s(p,E)|0)+(J>>>16)|0)+(R>>>16)|0;sf=((s(o,T)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(p,T)|0)+(rf>>>16)|0)+(sf>>>16)|0;R=sf<<16|ef&0xffff;ef=((s(o,S)|0)+(nf&0xffff)|0)+(z&0xffff)|0;rf=((s(p,S)|0)+(nf>>>16)|0)+(z>>>16)|0;sf=((s(o,I)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(p,I)|0)+(rf>>>16)|0)+(sf>>>16)|0;z=sf<<16|ef&0xffff;ef=((s(o,C)|0)+(nf&0xffff)|0)+(N&0xffff)|0;rf=((s(p,C)|0)+(nf>>>16)|0)+(N>>>16)|0;sf=((s(o,Z)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(p,Z)|0)+(rf>>>16)|0)+(sf>>>16)|0;N=sf<<16|ef&0xffff;ef=((s(o,U)|0)+(nf&0xffff)|0)+(K&0xffff)|0;rf=((s(p,U)|0)+(nf>>>16)|0)+(K>>>16)|0;sf=((s(o,D)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(p,D)|0)+(rf>>>16)|0)+(sf>>>16)|0;K=sf<<16|ef&0xffff;ef=((s(o,k)|0)+(nf&0xffff)|0)+(F&0xffff)|0;rf=((s(p,k)|0)+(nf>>>16)|0)+(F>>>16)|0;sf=((s(o,P)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(p,P)|0)+(rf>>>16)|0)+(sf>>>16)|0;F=sf<<16|ef&0xffff;ef=((s(o,M)|0)+(nf&0xffff)|0)+(j&0xffff)|0;rf=((s(p,M)|0)+(nf>>>16)|0)+(j>>>16)|0;sf=((s(o,O)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(p,O)|0)+(rf>>>16)|0)+(sf>>>16)|0;j=sf<<16|ef&0xffff;ef=((s(o,H)|0)+(nf&0xffff)|0)+(V&0xffff)|0;rf=((s(p,H)|0)+(nf>>>16)|0)+(V>>>16)|0;sf=((s(o,B)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(p,B)|0)+(rf>>>16)|0)+(sf>>>16)|0;V=sf<<16|ef&0xffff;ef=((s(o,L)|0)+(nf&0xffff)|0)+(W&0xffff)|0;rf=((s(p,L)|0)+(nf>>>16)|0)+(W>>>16)|0;sf=((s(o,q)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(p,q)|0)+(rf>>>16)|0)+(sf>>>16)|0;W=sf<<16|ef&0xffff;J=nf;ef=((s(x,E)|0)+(Q&0xffff)|0)+(z&0xffff)|0;rf=((s(g,E)|0)+(Q>>>16)|0)+(z>>>16)|0;sf=((s(x,T)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(g,T)|0)+(rf>>>16)|0)+(sf>>>16)|0;z=sf<<16|ef&0xffff;ef=((s(x,S)|0)+(nf&0xffff)|0)+(N&0xffff)|0;rf=((s(g,S)|0)+(nf>>>16)|0)+(N>>>16)|0;sf=((s(x,I)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(g,I)|0)+(rf>>>16)|0)+(sf>>>16)|0;N=sf<<16|ef&0xffff;ef=((s(x,C)|0)+(nf&0xffff)|0)+(K&0xffff)|0;rf=((s(g,C)|0)+(nf>>>16)|0)+(K>>>16)|0;sf=((s(x,Z)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(g,Z)|0)+(rf>>>16)|0)+(sf>>>16)|0;K=sf<<16|ef&0xffff;ef=((s(x,U)|0)+(nf&0xffff)|0)+(F&0xffff)|0;rf=((s(g,U)|0)+(nf>>>16)|0)+(F>>>16)|0;sf=((s(x,D)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(g,D)|0)+(rf>>>16)|0)+(sf>>>16)|0;F=sf<<16|ef&0xffff;ef=((s(x,k)|0)+(nf&0xffff)|0)+(j&0xffff)|0;rf=((s(g,k)|0)+(nf>>>16)|0)+(j>>>16)|0;sf=((s(x,P)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(g,P)|0)+(rf>>>16)|0)+(sf>>>16)|0;j=sf<<16|ef&0xffff;ef=((s(x,M)|0)+(nf&0xffff)|0)+(V&0xffff)|0;rf=((s(g,M)|0)+(nf>>>16)|0)+(V>>>16)|0;sf=((s(x,O)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(g,O)|0)+(rf>>>16)|0)+(sf>>>16)|0;V=sf<<16|ef&0xffff;ef=((s(x,H)|0)+(nf&0xffff)|0)+(W&0xffff)|0;rf=((s(g,H)|0)+(nf>>>16)|0)+(W>>>16)|0;sf=((s(x,B)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(g,B)|0)+(rf>>>16)|0)+(sf>>>16)|0;W=sf<<16|ef&0xffff;ef=((s(x,L)|0)+(nf&0xffff)|0)+(J&0xffff)|0;rf=((s(g,L)|0)+(nf>>>16)|0)+(J>>>16)|0;sf=((s(x,q)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(g,q)|0)+(rf>>>16)|0)+(sf>>>16)|0;J=sf<<16|ef&0xffff;Q=nf;ef=((s(c,E)|0)+(X&0xffff)|0)+(N&0xffff)|0;rf=((s(v,E)|0)+(X>>>16)|0)+(N>>>16)|0;sf=((s(c,T)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(v,T)|0)+(rf>>>16)|0)+(sf>>>16)|0;N=sf<<16|ef&0xffff;ef=((s(c,S)|0)+(nf&0xffff)|0)+(K&0xffff)|0;rf=((s(v,S)|0)+(nf>>>16)|0)+(K>>>16)|0;sf=((s(c,I)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(v,I)|0)+(rf>>>16)|0)+(sf>>>16)|0;K=sf<<16|ef&0xffff;ef=((s(c,C)|0)+(nf&0xffff)|0)+(F&0xffff)|0;rf=((s(v,C)|0)+(nf>>>16)|0)+(F>>>16)|0;sf=((s(c,Z)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(v,Z)|0)+(rf>>>16)|0)+(sf>>>16)|0;F=sf<<16|ef&0xffff;ef=((s(c,U)|0)+(nf&0xffff)|0)+(j&0xffff)|0;rf=((s(v,U)|0)+(nf>>>16)|0)+(j>>>16)|0;sf=((s(c,D)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(v,D)|0)+(rf>>>16)|0)+(sf>>>16)|0;j=sf<<16|ef&0xffff;ef=((s(c,k)|0)+(nf&0xffff)|0)+(V&0xffff)|0;rf=((s(v,k)|0)+(nf>>>16)|0)+(V>>>16)|0;sf=((s(c,P)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(v,P)|0)+(rf>>>16)|0)+(sf>>>16)|0;V=sf<<16|ef&0xffff;ef=((s(c,M)|0)+(nf&0xffff)|0)+(W&0xffff)|0;rf=((s(v,M)|0)+(nf>>>16)|0)+(W>>>16)|0;sf=((s(c,O)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(v,O)|0)+(rf>>>16)|0)+(sf>>>16)|0;W=sf<<16|ef&0xffff;ef=((s(c,H)|0)+(nf&0xffff)|0)+(J&0xffff)|0;rf=((s(v,H)|0)+(nf>>>16)|0)+(J>>>16)|0;sf=((s(c,B)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(v,B)|0)+(rf>>>16)|0)+(sf>>>16)|0;J=sf<<16|ef&0xffff;ef=((s(c,L)|0)+(nf&0xffff)|0)+(Q&0xffff)|0;rf=((s(v,L)|0)+(nf>>>16)|0)+(Q>>>16)|0;sf=((s(c,q)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(v,q)|0)+(rf>>>16)|0)+(sf>>>16)|0;Q=sf<<16|ef&0xffff;X=nf;ef=((s(u,E)|0)+(Y&0xffff)|0)+(K&0xffff)|0;rf=((s(b,E)|0)+(Y>>>16)|0)+(K>>>16)|0;sf=((s(u,T)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(b,T)|0)+(rf>>>16)|0)+(sf>>>16)|0;K=sf<<16|ef&0xffff;ef=((s(u,S)|0)+(nf&0xffff)|0)+(F&0xffff)|0;rf=((s(b,S)|0)+(nf>>>16)|0)+(F>>>16)|0;sf=((s(u,I)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(b,I)|0)+(rf>>>16)|0)+(sf>>>16)|0;F=sf<<16|ef&0xffff;ef=((s(u,C)|0)+(nf&0xffff)|0)+(j&0xffff)|0;rf=((s(b,C)|0)+(nf>>>16)|0)+(j>>>16)|0;sf=((s(u,Z)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(b,Z)|0)+(rf>>>16)|0)+(sf>>>16)|0;j=sf<<16|ef&0xffff;ef=((s(u,U)|0)+(nf&0xffff)|0)+(V&0xffff)|0;rf=((s(b,U)|0)+(nf>>>16)|0)+(V>>>16)|0;sf=((s(u,D)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(b,D)|0)+(rf>>>16)|0)+(sf>>>16)|0;V=sf<<16|ef&0xffff;ef=((s(u,k)|0)+(nf&0xffff)|0)+(W&0xffff)|0;rf=((s(b,k)|0)+(nf>>>16)|0)+(W>>>16)|0;sf=((s(u,P)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(b,P)|0)+(rf>>>16)|0)+(sf>>>16)|0;W=sf<<16|ef&0xffff;ef=((s(u,M)|0)+(nf&0xffff)|0)+(J&0xffff)|0;rf=((s(b,M)|0)+(nf>>>16)|0)+(J>>>16)|0;sf=((s(u,O)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(b,O)|0)+(rf>>>16)|0)+(sf>>>16)|0;J=sf<<16|ef&0xffff;ef=((s(u,H)|0)+(nf&0xffff)|0)+(Q&0xffff)|0;rf=((s(b,H)|0)+(nf>>>16)|0)+(Q>>>16)|0;sf=((s(u,B)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(b,B)|0)+(rf>>>16)|0)+(sf>>>16)|0;Q=sf<<16|ef&0xffff;ef=((s(u,L)|0)+(nf&0xffff)|0)+(X&0xffff)|0;rf=((s(b,L)|0)+(nf>>>16)|0)+(X>>>16)|0;sf=((s(u,q)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(b,q)|0)+(rf>>>16)|0)+(sf>>>16)|0;X=sf<<16|ef&0xffff;Y=nf;ef=((s(l,E)|0)+($&0xffff)|0)+(F&0xffff)|0;rf=((s(m,E)|0)+($>>>16)|0)+(F>>>16)|0;sf=((s(l,T)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(m,T)|0)+(rf>>>16)|0)+(sf>>>16)|0;F=sf<<16|ef&0xffff;ef=((s(l,S)|0)+(nf&0xffff)|0)+(j&0xffff)|0;rf=((s(m,S)|0)+(nf>>>16)|0)+(j>>>16)|0;sf=((s(l,I)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(m,I)|0)+(rf>>>16)|0)+(sf>>>16)|0;j=sf<<16|ef&0xffff;ef=((s(l,C)|0)+(nf&0xffff)|0)+(V&0xffff)|0;rf=((s(m,C)|0)+(nf>>>16)|0)+(V>>>16)|0;sf=((s(l,Z)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(m,Z)|0)+(rf>>>16)|0)+(sf>>>16)|0;V=sf<<16|ef&0xffff;ef=((s(l,U)|0)+(nf&0xffff)|0)+(W&0xffff)|0;rf=((s(m,U)|0)+(nf>>>16)|0)+(W>>>16)|0;sf=((s(l,D)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(m,D)|0)+(rf>>>16)|0)+(sf>>>16)|0;W=sf<<16|ef&0xffff;ef=((s(l,k)|0)+(nf&0xffff)|0)+(J&0xffff)|0;rf=((s(m,k)|0)+(nf>>>16)|0)+(J>>>16)|0;sf=((s(l,P)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(m,P)|0)+(rf>>>16)|0)+(sf>>>16)|0;J=sf<<16|ef&0xffff;ef=((s(l,M)|0)+(nf&0xffff)|0)+(Q&0xffff)|0;rf=((s(m,M)|0)+(nf>>>16)|0)+(Q>>>16)|0;sf=((s(l,O)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(m,O)|0)+(rf>>>16)|0)+(sf>>>16)|0;Q=sf<<16|ef&0xffff;ef=((s(l,H)|0)+(nf&0xffff)|0)+(X&0xffff)|0;rf=((s(m,H)|0)+(nf>>>16)|0)+(X>>>16)|0;sf=((s(l,B)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(m,B)|0)+(rf>>>16)|0)+(sf>>>16)|0;X=sf<<16|ef&0xffff;ef=((s(l,L)|0)+(nf&0xffff)|0)+(Y&0xffff)|0;rf=((s(m,L)|0)+(nf>>>16)|0)+(Y>>>16)|0;sf=((s(l,q)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(m,q)|0)+(rf>>>16)|0)+(sf>>>16)|0;Y=sf<<16|ef&0xffff;$=nf;ef=((s(y,E)|0)+(ff&0xffff)|0)+(j&0xffff)|0;rf=((s(_,E)|0)+(ff>>>16)|0)+(j>>>16)|0;sf=((s(y,T)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(_,T)|0)+(rf>>>16)|0)+(sf>>>16)|0;j=sf<<16|ef&0xffff;ef=((s(y,S)|0)+(nf&0xffff)|0)+(V&0xffff)|0;rf=((s(_,S)|0)+(nf>>>16)|0)+(V>>>16)|0;sf=((s(y,I)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(_,I)|0)+(rf>>>16)|0)+(sf>>>16)|0;V=sf<<16|ef&0xffff;ef=((s(y,C)|0)+(nf&0xffff)|0)+(W&0xffff)|0;rf=((s(_,C)|0)+(nf>>>16)|0)+(W>>>16)|0;sf=((s(y,Z)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(_,Z)|0)+(rf>>>16)|0)+(sf>>>16)|0;W=sf<<16|ef&0xffff;ef=((s(y,U)|0)+(nf&0xffff)|0)+(J&0xffff)|0;rf=((s(_,U)|0)+(nf>>>16)|0)+(J>>>16)|0;sf=((s(y,D)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(_,D)|0)+(rf>>>16)|0)+(sf>>>16)|0;J=sf<<16|ef&0xffff;ef=((s(y,k)|0)+(nf&0xffff)|0)+(Q&0xffff)|0;rf=((s(_,k)|0)+(nf>>>16)|0)+(Q>>>16)|0;sf=((s(y,P)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(_,P)|0)+(rf>>>16)|0)+(sf>>>16)|0;Q=sf<<16|ef&0xffff;ef=((s(y,M)|0)+(nf&0xffff)|0)+(X&0xffff)|0;rf=((s(_,M)|0)+(nf>>>16)|0)+(X>>>16)|0;sf=((s(y,O)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(_,O)|0)+(rf>>>16)|0)+(sf>>>16)|0;X=sf<<16|ef&0xffff;ef=((s(y,H)|0)+(nf&0xffff)|0)+(Y&0xffff)|0;rf=((s(_,H)|0)+(nf>>>16)|0)+(Y>>>16)|0;sf=((s(y,B)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(_,B)|0)+(rf>>>16)|0)+(sf>>>16)|0;Y=sf<<16|ef&0xffff;ef=((s(y,L)|0)+(nf&0xffff)|0)+($&0xffff)|0;rf=((s(_,L)|0)+(nf>>>16)|0)+($>>>16)|0;sf=((s(y,q)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(_,q)|0)+(rf>>>16)|0)+(sf>>>16)|0;$=sf<<16|ef&0xffff;ff=nf;ef=((s(w,E)|0)+(tf&0xffff)|0)+(V&0xffff)|0;rf=((s(A,E)|0)+(tf>>>16)|0)+(V>>>16)|0;sf=((s(w,T)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(A,T)|0)+(rf>>>16)|0)+(sf>>>16)|0;V=sf<<16|ef&0xffff;ef=((s(w,S)|0)+(nf&0xffff)|0)+(W&0xffff)|0;rf=((s(A,S)|0)+(nf>>>16)|0)+(W>>>16)|0;sf=((s(w,I)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(A,I)|0)+(rf>>>16)|0)+(sf>>>16)|0;W=sf<<16|ef&0xffff;ef=((s(w,C)|0)+(nf&0xffff)|0)+(J&0xffff)|0;rf=((s(A,C)|0)+(nf>>>16)|0)+(J>>>16)|0;sf=((s(w,Z)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(A,Z)|0)+(rf>>>16)|0)+(sf>>>16)|0;J=sf<<16|ef&0xffff;ef=((s(w,U)|0)+(nf&0xffff)|0)+(Q&0xffff)|0;rf=((s(A,U)|0)+(nf>>>16)|0)+(Q>>>16)|0;sf=((s(w,D)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(A,D)|0)+(rf>>>16)|0)+(sf>>>16)|0;Q=sf<<16|ef&0xffff;ef=((s(w,k)|0)+(nf&0xffff)|0)+(X&0xffff)|0;rf=((s(A,k)|0)+(nf>>>16)|0)+(X>>>16)|0;sf=((s(w,P)|0)+(rf&0xffff)|0)+(ef>>>16)|0;nf=((s(A,P)|0)+(rf>>>16)|0)+(sf>>>16)|0;X=sf<<16|ef&0xffff;ef=((s(w,M)|0)+(nf&0xffff)|0)+(Y&0xff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0,wf=0;for(;(xf|0)<(t|0);xf=xf+4|0){wf=e+(xf<<1)|0;l=i[f+xf>>2]|0,r=l&0xffff,l=l>>>16;$=s(r,r)|0;ff=(s(r,l)|0)+($>>>17)|0;tf=(s(l,l)|0)+(ff>>>15)|0;i[wf>>2]=ff<<17|$&0x1ffff;i[(wf|4)>>2]=tf}for(of=0;(of|0)<(t|0);of=of+8|0){lf=f+of|0,wf=e+(of<<1)|0;l=i[lf>>2]|0,r=l&0xffff,l=l>>>16;M=i[(lf|4)>>2]|0,m=M&0xffff,M=M>>>16;$=s(r,m)|0;ff=(s(r,M)|0)+($>>>16)|0;tf=(s(l,m)|0)+(ff&0xffff)|0;sf=((s(l,M)|0)+(ff>>>16)|0)+(tf>>>16)|0;nf=i[(wf|4)>>2]|0;$=(nf&0xffff)+(($&0xffff)<<1)|0;tf=((nf>>>16)+((tf&0xffff)<<1)|0)+($>>>16)|0;i[(wf|4)>>2]=tf<<16|$&0xffff;ef=tf>>>16;nf=i[(wf|8)>>2]|0;$=((nf&0xffff)+((sf&0xffff)<<1)|0)+ef|0;tf=((nf>>>16)+(sf>>>16<<1)|0)+($>>>16)|0;i[(wf|8)>>2]=tf<<16|$&0xffff;ef=tf>>>16;if(ef){nf=i[(wf|12)>>2]|0;$=(nf&0xffff)+ef|0;tf=(nf>>>16)+($>>>16)|0;i[(wf|12)>>2]=tf<<16|$&0xffff}}for(of=0;(of|0)<(t|0);of=of+16|0){lf=f+of|0,wf=e+(of<<1)|0;l=i[lf>>2]|0,r=l&0xffff,l=l>>>16,y=i[(lf|4)>>2]|0,n=y&0xffff,y=y>>>16;M=i[(lf|8)>>2]|0,m=M&0xffff,M=M>>>16,H=i[(lf|12)>>2]|0,_=H&0xffff,H=H>>>16;$=s(r,m)|0;ff=s(l,m)|0;tf=((s(r,M)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(l,M)|0)+(ff>>>16)|0)+(tf>>>16)|0;O=tf<<16|$&0xffff;$=(s(r,_)|0)+(sf&0xffff)|0;ff=(s(l,_)|0)+(sf>>>16)|0;tf=((s(r,H)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(l,H)|0)+(ff>>>16)|0)+(tf>>>16)|0;B=tf<<16|$&0xffff;q=sf;$=(s(n,m)|0)+(B&0xffff)|0;ff=(s(y,m)|0)+(B>>>16)|0;tf=((s(n,M)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(y,M)|0)+(ff>>>16)|0)+(tf>>>16)|0;B=tf<<16|$&0xffff;$=((s(n,_)|0)+(q&0xffff)|0)+(sf&0xffff)|0;ff=((s(y,_)|0)+(q>>>16)|0)+(sf>>>16)|0;tf=((s(n,H)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(y,H)|0)+(ff>>>16)|0)+(tf>>>16)|0;q=tf<<16|$&0xffff;G=sf;nf=i[(wf|8)>>2]|0;$=(nf&0xffff)+((O&0xffff)<<1)|0;tf=((nf>>>16)+(O>>>16<<1)|0)+($>>>16)|0;i[(wf|8)>>2]=tf<<16|$&0xffff;ef=tf>>>16;nf=i[(wf|12)>>2]|0;$=((nf&0xffff)+((B&0xffff)<<1)|0)+ef|0;tf=((nf>>>16)+(B>>>16<<1)|0)+($>>>16)|0;i[(wf|12)>>2]=tf<<16|$&0xffff;ef=tf>>>16;nf=i[(wf|16)>>2]|0;$=((nf&0xffff)+((q&0xffff)<<1)|0)+ef|0;tf=((nf>>>16)+(q>>>16<<1)|0)+($>>>16)|0;i[(wf|16)>>2]=tf<<16|$&0xffff;ef=tf>>>16;nf=i[(wf|20)>>2]|0;$=((nf&0xffff)+((G&0xffff)<<1)|0)+ef|0;tf=((nf>>>16)+(G>>>16<<1)|0)+($>>>16)|0;i[(wf|20)>>2]=tf<<16|$&0xffff;ef=tf>>>16;for(uf=24;!!ef&(uf|0)<32;uf=uf+4|0){nf=i[(wf|uf)>>2]|0;$=(nf&0xffff)+ef|0;tf=(nf>>>16)+($>>>16)|0;i[(wf|uf)>>2]=tf<<16|$&0xffff;ef=tf>>>16}}for(of=0;(of|0)<(t|0);of=of+32|0){lf=f+of|0,wf=e+(of<<1)|0;l=i[lf>>2]|0,r=l&0xffff,l=l>>>16,y=i[(lf|4)>>2]|0,n=y&0xffff,y=y>>>16,w=i[(lf|8)>>2]|0,a=w&0xffff,w=w>>>16,d=i[(lf|12)>>2]|0,h=d&0xffff,d=d>>>16;M=i[(lf|16)>>2]|0,m=M&0xffff,M=M>>>16,H=i[(lf|20)>>2]|0,_=H&0xffff,H=H>>>16,L=i[(lf|24)>>2]|0,A=L&0xffff,L=L>>>16,T=i[(lf|28)>>2]|0,E=T&0xffff,T=T>>>16;$=s(r,m)|0;ff=s(l,m)|0;tf=((s(r,M)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(l,M)|0)+(ff>>>16)|0)+(tf>>>16)|0;O=tf<<16|$&0xffff;$=(s(r,_)|0)+(sf&0xffff)|0;ff=(s(l,_)|0)+(sf>>>16)|0;tf=((s(r,H)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(l,H)|0)+(ff>>>16)|0)+(tf>>>16)|0;B=tf<<16|$&0xffff;$=(s(r,A)|0)+(sf&0xffff)|0;ff=(s(l,A)|0)+(sf>>>16)|0;tf=((s(r,L)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(l,L)|0)+(ff>>>16)|0)+(tf>>>16)|0;q=tf<<16|$&0xffff;$=(s(r,E)|0)+(sf&0xffff)|0;ff=(s(l,E)|0)+(sf>>>16)|0;tf=((s(r,T)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(l,T)|0)+(ff>>>16)|0)+(tf>>>16)|0;G=tf<<16|$&0xffff;R=sf;$=(s(n,m)|0)+(B&0xffff)|0;ff=(s(y,m)|0)+(B>>>16)|0;tf=((s(n,M)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(y,M)|0)+(ff>>>16)|0)+(tf>>>16)|0;B=tf<<16|$&0xffff;$=((s(n,_)|0)+(q&0xffff)|0)+(sf&0xffff)|0;ff=((s(y,_)|0)+(q>>>16)|0)+(sf>>>16)|0;tf=((s(n,H)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(y,H)|0)+(ff>>>16)|0)+(tf>>>16)|0;q=tf<<16|$&0xffff;$=((s(n,A)|0)+(G&0xffff)|0)+(sf&0xffff)|0;ff=((s(y,A)|0)+(G>>>16)|0)+(sf>>>16)|0;tf=((s(n,L)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(y,L)|0)+(ff>>>16)|0)+(tf>>>16)|0;G=tf<<16|$&0xffff;$=((s(n,E)|0)+(R&0xffff)|0)+(sf&0xffff)|0;ff=((s(y,E)|0)+(R>>>16)|0)+(sf>>>16)|0;tf=((s(n,T)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(y,T)|0)+(ff>>>16)|0)+(tf>>>16)|0;R=tf<<16|$&0xffff;z=sf;$=(s(a,m)|0)+(q&0xffff)|0;ff=(s(w,m)|0)+(q>>>16)|0;tf=((s(a,M)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(w,M)|0)+(ff>>>16)|0)+(tf>>>16)|0;q=tf<<16|$&0xffff;$=((s(a,_)|0)+(G&0xffff)|0)+(sf&0xffff)|0;ff=((s(w,_)|0)+(G>>>16)|0)+(sf>>>16)|0;tf=((s(a,H)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(w,H)|0)+(ff>>>16)|0)+(tf>>>16)|0;G=tf<<16|$&0xffff;$=((s(a,A)|0)+(R&0xffff)|0)+(sf&0xffff)|0;ff=((s(w,A)|0)+(R>>>16)|0)+(sf>>>16)|0;tf=((s(a,L)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(w,L)|0)+(ff>>>16)|0)+(tf>>>16)|0;R=tf<<16|$&0xffff;$=((s(a,E)|0)+(z&0xffff)|0)+(sf&0xffff)|0;ff=((s(w,E)|0)+(z>>>16)|0)+(sf>>>16)|0;tf=((s(a,T)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(w,T)|0)+(ff>>>16)|0)+(tf>>>16)|0;z=tf<<16|$&0xffff;N=sf;$=(s(h,m)|0)+(G&0xffff)|0;ff=(s(d,m)|0)+(G>>>16)|0;tf=((s(h,M)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(d,M)|0)+(ff>>>16)|0)+(tf>>>16)|0;G=tf<<16|$&0xffff;$=((s(h,_)|0)+(R&0xffff)|0)+(sf&0xffff)|0;ff=((s(d,_)|0)+(R>>>16)|0)+(sf>>>16)|0;tf=((s(h,H)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(d,H)|0)+(ff>>>16)|0)+(tf>>>16)|0;R=tf<<16|$&0xffff;$=((s(h,A)|0)+(z&0xffff)|0)+(sf&0xffff)|0;ff=((s(d,A)|0)+(z>>>16)|0)+(sf>>>16)|0;tf=((s(h,L)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(d,L)|0)+(ff>>>16)|0)+(tf>>>16)|0;z=tf<<16|$&0xffff;$=((s(h,E)|0)+(N&0xffff)|0)+(sf&0xffff)|0;ff=((s(d,E)|0)+(N>>>16)|0)+(sf>>>16)|0;tf=((s(h,T)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(d,T)|0)+(ff>>>16)|0)+(tf>>>16)|0;N=tf<<16|$&0xffff;K=sf;nf=i[(wf|16)>>2]|0;$=(nf&0xffff)+((O&0xffff)<<1)|0;tf=((nf>>>16)+(O>>>16<<1)|0)+($>>>16)|0;i[(wf|16)>>2]=tf<<16|$&0xffff;ef=tf>>>16;nf=i[(wf|20)>>2]|0;$=((nf&0xffff)+((B&0xffff)<<1)|0)+ef|0;tf=((nf>>>16)+(B>>>16<<1)|0)+($>>>16)|0;i[(wf|20)>>2]=tf<<16|$&0xffff;ef=tf>>>16;nf=i[(wf|24)>>2]|0;$=((nf&0xffff)+((q&0xffff)<<1)|0)+ef|0;tf=((nf>>>16)+(q>>>16<<1)|0)+($>>>16)|0;i[(wf|24)>>2]=tf<<16|$&0xffff;ef=tf>>>16;nf=i[(wf|28)>>2]|0;$=((nf&0xffff)+((G&0xffff)<<1)|0)+ef|0;tf=((nf>>>16)+(G>>>16<<1)|0)+($>>>16)|0;i[(wf|28)>>2]=tf<<16|$&0xffff;ef=tf>>>16;nf=i[wf+32>>2]|0;$=((nf&0xffff)+((R&0xffff)<<1)|0)+ef|0;tf=((nf>>>16)+(R>>>16<<1)|0)+($>>>16)|0;i[wf+32>>2]=tf<<16|$&0xffff;ef=tf>>>16;nf=i[wf+36>>2]|0;$=((nf&0xffff)+((z&0xffff)<<1)|0)+ef|0;tf=((nf>>>16)+(z>>>16<<1)|0)+($>>>16)|0;i[wf+36>>2]=tf<<16|$&0xffff;ef=tf>>>16;nf=i[wf+40>>2]|0;$=((nf&0xffff)+((N&0xffff)<<1)|0)+ef|0;tf=((nf>>>16)+(N>>>16<<1)|0)+($>>>16)|0;i[wf+40>>2]=tf<<16|$&0xffff;ef=tf>>>16;nf=i[wf+44>>2]|0;$=((nf&0xffff)+((K&0xffff)<<1)|0)+ef|0;tf=((nf>>>16)+(K>>>16<<1)|0)+($>>>16)|0;i[wf+44>>2]=tf<<16|$&0xffff;ef=tf>>>16;for(uf=48;!!ef&(uf|0)<64;uf=uf+4|0){nf=i[wf+uf>>2]|0;$=(nf&0xffff)+ef|0;tf=(nf>>>16)+($>>>16)|0;i[wf+uf>>2]=tf<<16|$&0xffff;ef=tf>>>16}}for(af=32;(af|0)<(t|0);af=af<<1){hf=af<<1;for(of=0;(of|0)<(t|0);of=of+hf|0){wf=e+(of<<1)|0;rf=0;for(xf=0;(xf|0)<(af|0);xf=xf+32|0){lf=(f+of|0)+xf|0;l=i[lf>>2]|0,r=l&0xffff,l=l>>>16,y=i[(lf|4)>>2]|0,n=y&0xffff,y=y>>>16,w=i[(lf|8)>>2]|0,a=w&0xffff,w=w>>>16,d=i[(lf|12)>>2]|0,h=d&0xffff,d=d>>>16,p=i[(lf|16)>>2]|0,o=p&0xffff,p=p>>>16,g=i[(lf|20)>>2]|0,x=g&0xffff,g=g>>>16,v=i[(lf|24)>>2]|0,c=v&0xffff,v=v>>>16,b=i[(lf|28)>>2]|0,u=b&0xffff,b=b>>>16;F=j=V=W=J=Q=X=Y=ef=0;for(cf=0;(cf|0)<(af|0);cf=cf+32|0){yf=((f+of|0)+af|0)+cf|0;M=i[yf>>2]|0,m=M&0xffff,M=M>>>16,H=i[(yf|4)>>2]|0,_=H&0xffff,H=H>>>16,L=i[(yf|8)>>2]|0,A=L&0xffff,L=L>>>16,T=i[(yf|12)>>2]|0,E=T&0xffff,T=T>>>16,I=i[(yf|16)>>2]|0,S=I&0xffff,I=I>>>16,Z=i[(yf|20)>>2]|0,C=Z&0xffff,Z=Z>>>16,D=i[(yf|24)>>2]|0,U=D&0xffff,D=D>>>16,P=i[(yf|28)>>2]|0,k=P&0xffff,P=P>>>16;O=B=q=G=R=z=N=K=0;$=((s(r,m)|0)+(O&0xffff)|0)+(F&0xffff)|0;ff=((s(l,m)|0)+(O>>>16)|0)+(F>>>16)|0;tf=((s(r,M)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(l,M)|0)+(ff>>>16)|0)+(tf>>>16)|0;O=tf<<16|$&0xffff;$=((s(r,_)|0)+(B&0xffff)|0)+(sf&0xffff)|0;ff=((s(l,_)|0)+(B>>>16)|0)+(sf>>>16)|0;tf=((s(r,H)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(l,H)|0)+(ff>>>16)|0)+(tf>>>16)|0;B=tf<<16|$&0xffff;$=((s(r,A)|0)+(q&0xffff)|0)+(sf&0xffff)|0;ff=((s(l,A)|0)+(q>>>16)|0)+(sf>>>16)|0;tf=((s(r,L)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(l,L)|0)+(ff>>>16)|0)+(tf>>>16)|0;q=tf<<16|$&0xffff;$=((s(r,E)|0)+(G&0xffff)|0)+(sf&0xffff)|0;ff=((s(l,E)|0)+(G>>>16)|0)+(sf>>>16)|0;tf=((s(r,T)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(l,T)|0)+(ff>>>16)|0)+(tf>>>16)|0;G=tf<<16|$&0xffff;$=((s(r,S)|0)+(R&0xffff)|0)+(sf&0xffff)|0;ff=((s(l,S)|0)+(R>>>16)|0)+(sf>>>16)|0;tf=((s(r,I)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(l,I)|0)+(ff>>>16)|0)+(tf>>>16)|0;R=tf<<16|$&0xffff;$=((s(r,C)|0)+(z&0xffff)|0)+(sf&0xffff)|0;ff=((s(l,C)|0)+(z>>>16)|0)+(sf>>>16)|0;tf=((s(r,Z)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(l,Z)|0)+(ff>>>16)|0)+(tf>>>16)|0;z=tf<<16|$&0xffff;$=((s(r,U)|0)+(N&0xffff)|0)+(sf&0xffff)|0;ff=((s(l,U)|0)+(N>>>16)|0)+(sf>>>16)|0;tf=((s(r,D)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(l,D)|0)+(ff>>>16)|0)+(tf>>>16)|0;N=tf<<16|$&0xffff;$=((s(r,k)|0)+(K&0xffff)|0)+(sf&0xffff)|0;ff=((s(l,k)|0)+(K>>>16)|0)+(sf>>>16)|0;tf=((s(r,P)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(l,P)|0)+(ff>>>16)|0)+(tf>>>16)|0;K=tf<<16|$&0xffff;F=sf;$=((s(n,m)|0)+(B&0xffff)|0)+(j&0xffff)|0;ff=((s(y,m)|0)+(B>>>16)|0)+(j>>>16)|0;tf=((s(n,M)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(y,M)|0)+(ff>>>16)|0)+(tf>>>16)|0;B=tf<<16|$&0xffff;$=((s(n,_)|0)+(q&0xffff)|0)+(sf&0xffff)|0;ff=((s(y,_)|0)+(q>>>16)|0)+(sf>>>16)|0;tf=((s(n,H)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(y,H)|0)+(ff>>>16)|0)+(tf>>>16)|0;q=tf<<16|$&0xffff;$=((s(n,A)|0)+(G&0xffff)|0)+(sf&0xffff)|0;ff=((s(y,A)|0)+(G>>>16)|0)+(sf>>>16)|0;tf=((s(n,L)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(y,L)|0)+(ff>>>16)|0)+(tf>>>16)|0;G=tf<<16|$&0xffff;$=((s(n,E)|0)+(R&0xffff)|0)+(sf&0xffff)|0;ff=((s(y,E)|0)+(R>>>16)|0)+(sf>>>16)|0;tf=((s(n,T)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(y,T)|0)+(ff>>>16)|0)+(tf>>>16)|0;R=tf<<16|$&0xffff;$=((s(n,S)|0)+(z&0xffff)|0)+(sf&0xffff)|0;ff=((s(y,S)|0)+(z>>>16)|0)+(sf>>>16)|0;tf=((s(n,I)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(y,I)|0)+(ff>>>16)|0)+(tf>>>16)|0;z=tf<<16|$&0xffff;$=((s(n,C)|0)+(N&0xffff)|0)+(sf&0xffff)|0;ff=((s(y,C)|0)+(N>>>16)|0)+(sf>>>16)|0;tf=((s(n,Z)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(y,Z)|0)+(ff>>>16)|0)+(tf>>>16)|0;N=tf<<16|$&0xffff;$=((s(n,U)|0)+(K&0xffff)|0)+(sf&0xffff)|0;ff=((s(y,U)|0)+(K>>>16)|0)+(sf>>>16)|0;tf=((s(n,D)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(y,D)|0)+(ff>>>16)|0)+(tf>>>16)|0;K=tf<<16|$&0xffff;$=((s(n,k)|0)+(F&0xffff)|0)+(sf&0xffff)|0;ff=((s(y,k)|0)+(F>>>16)|0)+(sf>>>16)|0;tf=((s(n,P)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(y,P)|0)+(ff>>>16)|0)+(tf>>>16)|0;F=tf<<16|$&0xffff;j=sf;$=((s(a,m)|0)+(q&0xffff)|0)+(V&0xffff)|0;ff=((s(w,m)|0)+(q>>>16)|0)+(V>>>16)|0;tf=((s(a,M)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(w,M)|0)+(ff>>>16)|0)+(tf>>>16)|0;q=tf<<16|$&0xffff;$=((s(a,_)|0)+(G&0xffff)|0)+(sf&0xffff)|0;ff=((s(w,_)|0)+(G>>>16)|0)+(sf>>>16)|0;tf=((s(a,H)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(w,H)|0)+(ff>>>16)|0)+(tf>>>16)|0;G=tf<<16|$&0xffff;$=((s(a,A)|0)+(R&0xffff)|0)+(sf&0xffff)|0;ff=((s(w,A)|0)+(R>>>16)|0)+(sf>>>16)|0;tf=((s(a,L)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(w,L)|0)+(ff>>>16)|0)+(tf>>>16)|0;R=tf<<16|$&0xffff;$=((s(a,E)|0)+(z&0xffff)|0)+(sf&0xffff)|0;ff=((s(w,E)|0)+(z>>>16)|0)+(sf>>>16)|0;tf=((s(a,T)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(w,T)|0)+(ff>>>16)|0)+(tf>>>16)|0;z=tf<<16|$&0xffff;$=((s(a,S)|0)+(N&0xffff)|0)+(sf&0xffff)|0;ff=((s(w,S)|0)+(N>>>16)|0)+(sf>>>16)|0;tf=((s(a,I)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(w,I)|0)+(ff>>>16)|0)+(tf>>>16)|0;N=tf<<16|$&0xffff;$=((s(a,C)|0)+(K&0xffff)|0)+(sf&0xffff)|0;ff=((s(w,C)|0)+(K>>>16)|0)+(sf>>>16)|0;tf=((s(a,Z)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(w,Z)|0)+(ff>>>16)|0)+(tf>>>16)|0;K=tf<<16|$&0xffff;$=((s(a,U)|0)+(F&0xffff)|0)+(sf&0xffff)|0;ff=((s(w,U)|0)+(F>>>16)|0)+(sf>>>16)|0;tf=((s(a,D)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(w,D)|0)+(ff>>>16)|0)+(tf>>>16)|0;F=tf<<16|$&0xffff;$=((s(a,k)|0)+(j&0xffff)|0)+(sf&0xffff)|0;ff=((s(w,k)|0)+(j>>>16)|0)+(sf>>>16)|0;tf=((s(a,P)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(w,P)|0)+(ff>>>16)|0)+(tf>>>16)|0;j=tf<<16|$&0xffff;V=sf;$=((s(h,m)|0)+(G&0xffff)|0)+(W&0xffff)|0;ff=((s(d,m)|0)+(G>>>16)|0)+(W>>>16)|0;tf=((s(h,M)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(d,M)|0)+(ff>>>16)|0)+(tf>>>16)|0;G=tf<<16|$&0xffff;$=((s(h,_)|0)+(R&0xffff)|0)+(sf&0xffff)|0;ff=((s(d,_)|0)+(R>>>16)|0)+(sf>>>16)|0;tf=((s(h,H)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(d,H)|0)+(ff>>>16)|0)+(tf>>>16)|0;R=tf<<16|$&0xffff;$=((s(h,A)|0)+(z&0xffff)|0)+(sf&0xffff)|0;ff=((s(d,A)|0)+(z>>>16)|0)+(sf>>>16)|0;tf=((s(h,L)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(d,L)|0)+(ff>>>16)|0)+(tf>>>16)|0;z=tf<<16|$&0xffff;$=((s(h,E)|0)+(N&0xffff)|0)+(sf&0xffff)|0;ff=((s(d,E)|0)+(N>>>16)|0)+(sf>>>16)|0;tf=((s(h,T)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(d,T)|0)+(ff>>>16)|0)+(tf>>>16)|0;N=tf<<16|$&0xffff;$=((s(h,S)|0)+(K&0xffff)|0)+(sf&0xffff)|0;ff=((s(d,S)|0)+(K>>>16)|0)+(sf>>>16)|0;tf=((s(h,I)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(d,I)|0)+(ff>>>16)|0)+(tf>>>16)|0;K=tf<<16|$&0xffff;$=((s(h,C)|0)+(F&0xffff)|0)+(sf&0xffff)|0;ff=((s(d,C)|0)+(F>>>16)|0)+(sf>>>16)|0;tf=((s(h,Z)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(d,Z)|0)+(ff>>>16)|0)+(tf>>>16)|0;F=tf<<16|$&0xffff;$=((s(h,U)|0)+(j&0xffff)|0)+(sf&0xffff)|0;ff=((s(d,U)|0)+(j>>>16)|0)+(sf>>>16)|0;tf=((s(h,D)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(d,D)|0)+(ff>>>16)|0)+(tf>>>16)|0;j=tf<<16|$&0xffff;$=((s(h,k)|0)+(V&0xffff)|0)+(sf&0xffff)|0;ff=((s(d,k)|0)+(V>>>16)|0)+(sf>>>16)|0;tf=((s(h,P)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(d,P)|0)+(ff>>>16)|0)+(tf>>>16)|0;V=tf<<16|$&0xffff;W=sf;$=((s(o,m)|0)+(R&0xffff)|0)+(J&0xffff)|0;ff=((s(p,m)|0)+(R>>>16)|0)+(J>>>16)|0;tf=((s(o,M)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(p,M)|0)+(ff>>>16)|0)+(tf>>>16)|0;R=tf<<16|$&0xffff;$=((s(o,_)|0)+(z&0xffff)|0)+(sf&0xffff)|0;ff=((s(p,_)|0)+(z>>>16)|0)+(sf>>>16)|0;tf=((s(o,H)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(p,H)|0)+(ff>>>16)|0)+(tf>>>16)|0;z=tf<<16|$&0xffff;$=((s(o,A)|0)+(N&0xffff)|0)+(sf&0xffff)|0;ff=((s(p,A)|0)+(N>>>16)|0)+(sf>>>16)|0;tf=((s(o,L)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(p,L)|0)+(ff>>>16)|0)+(tf>>>16)|0;N=tf<<16|$&0xffff;$=((s(o,E)|0)+(K&0xffff)|0)+(sf&0xffff)|0;ff=((s(p,E)|0)+(K>>>16)|0)+(sf>>>16)|0;tf=((s(o,T)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(p,T)|0)+(ff>>>16)|0)+(tf>>>16)|0;K=tf<<16|$&0xffff;$=((s(o,S)|0)+(F&0xffff)|0)+(sf&0xffff)|0;ff=((s(p,S)|0)+(F>>>16)|0)+(sf>>>16)|0;tf=((s(o,I)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(p,I)|0)+(ff>>>16)|0)+(tf>>>16)|0;F=tf<<16|$&0xffff;$=((s(o,C)|0)+(j&0xffff)|0)+(sf&0xffff)|0;ff=((s(p,C)|0)+(j>>>16)|0)+(sf>>>16)|0;tf=((s(o,Z)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(p,Z)|0)+(ff>>>16)|0)+(tf>>>16)|0;j=tf<<16|$&0xffff;$=((s(o,U)|0)+(V&0xffff)|0)+(sf&0xffff)|0;ff=((s(p,U)|0)+(V>>>16)|0)+(sf>>>16)|0;tf=((s(o,D)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(p,D)|0)+(ff>>>16)|0)+(tf>>>16)|0;V=tf<<16|$&0xffff;$=((s(o,k)|0)+(W&0xffff)|0)+(sf&0xffff)|0;ff=((s(p,k)|0)+(W>>>16)|0)+(sf>>>16)|0;tf=((s(o,P)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(p,P)|0)+(ff>>>16)|0)+(tf>>>16)|0;W=tf<<16|$&0xffff;J=sf;$=((s(x,m)|0)+(z&0xffff)|0)+(Q&0xffff)|0;ff=((s(g,m)|0)+(z>>>16)|0)+(Q>>>16)|0;tf=((s(x,M)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(g,M)|0)+(ff>>>16)|0)+(tf>>>16)|0;z=tf<<16|$&0xffff;$=((s(x,_)|0)+(N&0xffff)|0)+(sf&0xffff)|0;ff=((s(g,_)|0)+(N>>>16)|0)+(sf>>>16)|0;tf=((s(x,H)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(g,H)|0)+(ff>>>16)|0)+(tf>>>16)|0;N=tf<<16|$&0xffff;$=((s(x,A)|0)+(K&0xffff)|0)+(sf&0xffff)|0;ff=((s(g,A)|0)+(K>>>16)|0)+(sf>>>16)|0;tf=((s(x,L)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(g,L)|0)+(ff>>>16)|0)+(tf>>>16)|0;K=tf<<16|$&0xffff;$=((s(x,E)|0)+(F&0xffff)|0)+(sf&0xffff)|0;ff=((s(g,E)|0)+(F>>>16)|0)+(sf>>>16)|0;tf=((s(x,T)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(g,T)|0)+(ff>>>16)|0)+(tf>>>16)|0;F=tf<<16|$&0xffff;$=((s(x,S)|0)+(j&0xffff)|0)+(sf&0xffff)|0;ff=((s(g,S)|0)+(j>>>16)|0)+(sf>>>16)|0;tf=((s(x,I)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(g,I)|0)+(ff>>>16)|0)+(tf>>>16)|0;j=tf<<16|$&0xffff;$=((s(x,C)|0)+(V&0xffff)|0)+(sf&0xffff)|0;ff=((s(g,C)|0)+(V>>>16)|0)+(sf>>>16)|0;tf=((s(x,Z)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(g,Z)|0)+(ff>>>16)|0)+(tf>>>16)|0;V=tf<<16|$&0xffff;$=((s(x,U)|0)+(W&0xffff)|0)+(sf&0xffff)|0;ff=((s(g,U)|0)+(W>>>16)|0)+(sf>>>16)|0;tf=((s(x,D)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(g,D)|0)+(ff>>>16)|0)+(tf>>>16)|0;W=tf<<16|$&0xffff;$=((s(x,k)|0)+(J&0xffff)|0)+(sf&0xffff)|0;ff=((s(g,k)|0)+(J>>>16)|0)+(sf>>>16)|0;tf=((s(x,P)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(g,P)|0)+(ff>>>16)|0)+(tf>>>16)|0;J=tf<<16|$&0xffff;Q=sf;$=((s(c,m)|0)+(N&0xffff)|0)+(X&0xffff)|0;ff=((s(v,m)|0)+(N>>>16)|0)+(X>>>16)|0;tf=((s(c,M)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(v,M)|0)+(ff>>>16)|0)+(tf>>>16)|0;N=tf<<16|$&0xffff;$=((s(c,_)|0)+(K&0xffff)|0)+(sf&0xffff)|0;ff=((s(v,_)|0)+(K>>>16)|0)+(sf>>>16)|0;tf=((s(c,H)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(v,H)|0)+(ff>>>16)|0)+(tf>>>16)|0;K=tf<<16|$&0xffff;$=((s(c,A)|0)+(F&0xffff)|0)+(sf&0xffff)|0;ff=((s(v,A)|0)+(F>>>16)|0)+(sf>>>16)|0;tf=((s(c,L)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(v,L)|0)+(ff>>>16)|0)+(tf>>>16)|0;F=tf<<16|$&0xffff;$=((s(c,E)|0)+(j&0xffff)|0)+(sf&0xffff)|0;ff=((s(v,E)|0)+(j>>>16)|0)+(sf>>>16)|0;tf=((s(c,T)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(v,T)|0)+(ff>>>16)|0)+(tf>>>16)|0;j=tf<<16|$&0xffff;$=((s(c,S)|0)+(V&0xffff)|0)+(sf&0xffff)|0;ff=((s(v,S)|0)+(V>>>16)|0)+(sf>>>16)|0;tf=((s(c,I)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(v,I)|0)+(ff>>>16)|0)+(tf>>>16)|0;V=tf<<16|$&0xffff;$=((s(c,C)|0)+(W&0xffff)|0)+(sf&0xffff)|0;ff=((s(v,C)|0)+(W>>>16)|0)+(sf>>>16)|0;tf=((s(c,Z)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(v,Z)|0)+(ff>>>16)|0)+(tf>>>16)|0;W=tf<<16|$&0xffff;$=((s(c,U)|0)+(J&0xffff)|0)+(sf&0xffff)|0;ff=((s(v,U)|0)+(J>>>16)|0)+(sf>>>16)|0;tf=((s(c,D)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(v,D)|0)+(ff>>>16)|0)+(tf>>>16)|0;J=tf<<16|$&0xffff;$=((s(c,k)|0)+(Q&0xffff)|0)+(sf&0xffff)|0;ff=((s(v,k)|0)+(Q>>>16)|0)+(sf>>>16)|0;tf=((s(c,P)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(v,P)|0)+(ff>>>16)|0)+(tf>>>16)|0;Q=tf<<16|$&0xffff;X=sf;$=((s(u,m)|0)+(K&0xffff)|0)+(Y&0xffff)|0;ff=((s(b,m)|0)+(K>>>16)|0)+(Y>>>16)|0;tf=((s(u,M)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(b,M)|0)+(ff>>>16)|0)+(tf>>>16)|0;K=tf<<16|$&0xffff;$=((s(u,_)|0)+(F&0xffff)|0)+(sf&0xffff)|0;ff=((s(b,_)|0)+(F>>>16)|0)+(sf>>>16)|0;tf=((s(u,H)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(b,H)|0)+(ff>>>16)|0)+(tf>>>16)|0;F=tf<<16|$&0xffff;$=((s(u,A)|0)+(j&0xffff)|0)+(sf&0xffff)|0;ff=((s(b,A)|0)+(j>>>16)|0)+(sf>>>16)|0;tf=((s(u,L)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(b,L)|0)+(ff>>>16)|0)+(tf>>>16)|0;j=tf<<16|$&0xffff;$=((s(u,E)|0)+(V&0xffff)|0)+(sf&0xffff)|0;ff=((s(b,E)|0)+(V>>>16)|0)+(sf>>>16)|0;tf=((s(u,T)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(b,T)|0)+(ff>>>16)|0)+(tf>>>16)|0;V=tf<<16|$&0xffff;$=((s(u,S)|0)+(W&0xffff)|0)+(sf&0xffff)|0;ff=((s(b,S)|0)+(W>>>16)|0)+(sf>>>16)|0;tf=((s(u,I)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(b,I)|0)+(ff>>>16)|0)+(tf>>>16)|0;W=tf<<16|$&0xffff;$=((s(u,C)|0)+(J&0xffff)|0)+(sf&0xffff)|0;ff=((s(b,C)|0)+(J>>>16)|0)+(sf>>>16)|0;tf=((s(u,Z)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(b,Z)|0)+(ff>>>16)|0)+(tf>>>16)|0;J=tf<<16|$&0xffff;$=((s(u,U)|0)+(Q&0xffff)|0)+(sf&0xffff)|0;ff=((s(b,U)|0)+(Q>>>16)|0)+(sf>>>16)|0;tf=((s(u,D)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(b,D)|0)+(ff>>>16)|0)+(tf>>>16)|0;Q=tf<<16|$&0xffff;$=((s(u,k)|0)+(X&0xffff)|0)+(sf&0xffff)|0;ff=((s(b,k)|0)+(X>>>16)|0)+(sf>>>16)|0;tf=((s(u,P)|0)+(ff&0xffff)|0)+($>>>16)|0;sf=((s(b,P)|0)+(ff>>>16)|0)+(tf>>>16)|0;X=tf<<16|$&0xffff;Y=sf;uf=af+(xf+cf|0)|0;nf=i[wf+uf>>2]|0;$=((nf&0xffff)+((O&0xffff)<<1)|0)+ef|0;tf=((nf>>>16)+(O>>>16<<1)|0)+($>>>16)|0;i[wf+uf>>2]=tf<<16|$&0xffff;ef=tf>>>16;uf=uf+4|0;nf=i[wf+uf>>2]|0;$=((nf&0xffff)+((B&0xffff)<<1)|0)+ef|0;tf=((nf>>>16)+(B>>>16<<1)|0)+($>>>16)|0;i[wf+uf>>2]=tf<<16|$&0xffff;ef=tf>>>16;uf=uf+4|0;nf=i[wf+uf>>2]|0;$=((nf&0xffff)+((q&0xffff)<<1)|0)+ef|0;tf=((nf>>>16)+(q>>>16<<1)|0)+($>>>16)|0;i[wf+uf>>2]=tf<<16|$&0xffff;ef=tf>>>16;uf=uf+4|0;nf=i[wf+uf>>2]|0;$=((nf&0xffff)+((G&0xffff)<<1)|0)+ef|0;tf=((nf>>>16)+(G>>>16<<1)|0)+($>>>16)|0;i[wf+uf>>2]=tf<<16|$&0xffff;ef=tf>>>16;uf=uf+4|0;nf=i[wf+uf>>2]|0;$=((nf&0xffff)+((R&0xffff)<<1)|0)+ef|0;tf=((nf>>>16)+(R>>>16<<1)|0)+($>>>16)|0;i[wf+uf>>2]=tf<<16|$&0xffff;ef=tf>>>16;uf=uf+4|0;nf=i[wf+uf>>2]|0;$=((nf&0xffff)+((z&0xffff)<<1)|0)+ef|0;tf=((nf>>>16)+(z>>>16<<1)|0)+($>>>16)|0;i[wf+uf>>2]=tf<<16|$&0xffff;ef=tf>>>16;uf=uf+4|0;nf=i[wf+uf>>2]|0;$=((nf&0xffff)+((N&0xffff)<<1)|0)+ef|0;tf=((nf>>>16)+(N>>>16<<1)|0)+($>>>16)|0;i[wf+uf>>2]=tf<<16|$&0xffff;ef=tf>>>16;uf=uf+4|0;nf=i[wf+uf>>2]|0;$=((nf&0xffff)+((K&0xffff)<<1)|0)+ef|0;tf=((nf>>>16)+(K>>>16<<1)|0)+($>>>16)|0;i[wf+uf>>2]=tf<<16|$&0xffff;ef=tf>>>16}uf=af+(xf+cf|0)|0;nf=i[wf+uf>>2]|0;$=(((nf&0xffff)+((F&0xffff)<<1)|0)+ef|0)+rf|0;tf=((nf>>>16)+(F>>>16<<1)|0)+($>>>16)|0;i[wf+uf>>2]=tf<<16|$&0xffff;ef=tf>>>16;uf=uf+4|0;nf=i[wf+uf>>2]|0;$=((nf&0xffff)+((j&0xffff)<<1)|0)+ef|0;tf=((nf>>>16)+(j>>>16<<1)|0)+($>>>16)|0;i[wf+uf>>2]=tf<<16|$&0xffff;ef=tf>>>16;uf=uf+4|0;nf=i[wf+uf>>2]|0;$=((nf&0xffff)+((V&0xffff)<<1)|0)+ef|0;tf=((nf>>>16)+(V>>>16<<1)|0)+($>>>16)|0;i[wf+uf>>2]=tf<<16|$&0xffff;ef=tf>>>16;uf=uf+4|0;nf=i[wf+uf>>2]|0;$=((nf&0xffff)+((W&0xffff)<<1)|0)+ef|0;tf=((nf>>>16)+(W>>>16<<1)|0)+($>>>16)|0;i[wf+uf>>2]=tf<<16|$&0xffff;ef=tf>>>16;uf=uf+4|0;nf=i[wf+uf>>2]|0;$=((nf&0xffff)+((J&0xffff)<<1)|0)+ef|0;tf=((nf>>>16)+(J>>>16<<1)|0)+($>>>16)|0;i[wf+uf>>2]=tf<<16|$&0xffff;ef=tf>>>16;uf=uf+4|0;nf=i[wf+uf>>2]|0;$=((nf&0xffff)+((Q&0xffff)<<1)|0)+ef|0;tf=((nf>>>16)+(Q>>>16<<1)|0)+($>>>16)|0;i[wf+uf>>2]=tf<<16|$&0xffff;ef=tf>>>16;uf=uf+4|0;nf=i[wf+uf>>2]|0;$=((nf&0xffff)+((X&0xffff)<<1)|0)+ef|0;tf=((nf>>>16)+(X>>>16<<1)|0)+($>>>16)|0;i[wf+uf>>2]=tf<<16|$&0xffff;ef=tf>>>16;uf=uf+4|0;nf=i[wf+uf>>2]|0;$=((nf&0xffff)+((Y&0xffff)<<1)|0)+ef|0;tf=((nf>>>16)+(Y>>>16<<1)|0)+($>>>16)|0;i[wf+uf>>2]=tf<<16|$&0xffff;rf=tf>>>16}for(uf=uf+4|0;!!rf&(uf|0)>2]|0;$=(nf&0xffff)+rf|0;tf=(nf>>>16)+($>>>16)|0;i[wf+uf>>2]=tf<<16|$&0xffff;rf=tf>>>16}}}}function g(f,t,e,r,n){f=f|0;t=t|0;e=e|0;r=r|0;n=n|0;var a=0,h=0,o=0,x=0,c=0,u=0,l=0,y=0,w=0,d=0,p=0,g=0,v=0,b=0,m=0,_=0,A=0,E=0,S=0;for(A=t-1&-4;(A|0)>=0;A=A-4|0){a=i[f+A>>2]|0;if(a){t=A;break}}for(A=r-1&-4;(A|0)>=0;A=A-4|0){h=i[e+A>>2]|0;if(h){r=A;break}}while((h&0x80000000)==0){h=h<<1;o=o+1|0}c=i[f+t>>2]|0;if(o){x=c>>>(32-o|0);for(A=t-4|0;(A|0)>=0;A=A-4|0){a=i[f+A>>2]|0;i[f+A+4>>2]=c<>>(32-o|0):0);c=a}i[f>>2]=c<>2]|0;for(A=r-4|0;(A|0)>=0;A=A-4|0){h=i[e+A>>2]|0;i[e+A+4>>2]=u<>>(32-o|0);u=h}i[e>>2]=u<>2]|0;l=u>>>16,y=u&0xffff;for(A=t;(A|0)>=(r|0);A=A-4|0){E=A-r|0;c=i[f+A>>2]|0;w=(x>>>0)/(l>>>0)|0,p=(x>>>0)%(l>>>0)|0,v=s(w,y)|0;while((w|0)==0x10000|v>>>0>(p<<16|c>>>16)>>>0){w=w-1|0,p=p+l|0,v=v-y|0;if((p|0)>=0x10000)break}m=0,_=0;for(S=0;(S|0)<=(r|0);S=S+4|0){h=i[e+S>>2]|0;v=(s(w,h&0xffff)|0)+(m>>>16)|0;b=(s(w,h>>>16)|0)+(v>>>16)|0;h=m&0xffff|v<<16;m=b;a=i[f+E+S>>2]|0;v=((a&0xffff)-(h&0xffff)|0)+_|0;b=((a>>>16)-(h>>>16)|0)+(v>>16)|0;i[f+E+S>>2]=b<<16|v&0xffff;_=b>>16}v=((x&0xffff)-(m&0xffff)|0)+_|0;b=((x>>>16)-(m>>>16)|0)+(v>>16)|0;x=b<<16|v&0xffff;_=b>>16;if(_){w=w-1|0;_=0;for(S=0;(S|0)<=(r|0);S=S+4|0){h=i[e+S>>2]|0;a=i[f+E+S>>2]|0;v=(a&0xffff)+_|0;b=(a>>>16)+h+(v>>>16)|0;i[f+E+S>>2]=b<<16|v&0xffff;_=b>>>16}x=x+_|0}c=i[f+A>>2]|0;a=x<<16|c>>>16;d=(a>>>0)/(l>>>0)|0,g=(a>>>0)%(l>>>0)|0,v=s(d,y)|0;while((d|0)==0x10000|v>>>0>(g<<16|c&0xffff)>>>0){d=d-1|0,g=g+l|0,v=v-y|0;if((g|0)>=0x10000)break}m=0,_=0;for(S=0;(S|0)<=(r|0);S=S+4|0){h=i[e+S>>2]|0;v=(s(d,h&0xffff)|0)+(m&0xffff)|0;b=((s(d,h>>>16)|0)+(v>>>16)|0)+(m>>>16)|0;h=v&0xffff|b<<16;m=b>>>16;a=i[f+E+S>>2]|0;v=((a&0xffff)-(h&0xffff)|0)+_|0;b=((a>>>16)-(h>>>16)|0)+(v>>16)|0;_=b>>16;i[f+E+S>>2]=b<<16|v&0xffff}v=((x&0xffff)-(m&0xffff)|0)+_|0;b=((x>>>16)-(m>>>16)|0)+(v>>16)|0;_=b>>16;if(_){d=d-1|0;_=0;for(S=0;(S|0)<=(r|0);S=S+4|0){h=i[e+S>>2]|0;a=i[f+E+S>>2]|0;v=((a&0xffff)+(h&0xffff)|0)+_|0;b=((a>>>16)+(h>>>16)|0)+(v>>>16)|0;_=b>>>16;i[f+E+S>>2]=v&0xffff|b<<16}}i[n+E>>2]=w<<16|d;x=i[f+A>>2]|0}if(o){c=i[f>>2]|0;for(A=4;(A|0)<=(r|0);A=A+4|0){a=i[f+A>>2]|0;i[f+A-4>>2]=a<<(32-o|0)|c>>>o;c=a}i[f+r>>2]=c>>>o}}function v(f,t,e,r,n,c){f=f|0;t=t|0;e=e|0;r=r|0;n=n|0;c=c|0;var l=0,y=0,d=0,p=0,g=0,v=0,b=0,m=0,_=0,A=0,E=0,S=0,C=0,U=0;l=a(r<<1)|0;x(r<<1,0,l);o(t,f,l);for(S=0;(S|0)<(r|0);S=S+4|0){d=i[l+S>>2]|0,p=d&0xffff,d=d>>>16;v=n>>>16,g=n&0xffff;b=s(p,g)|0,m=((s(p,v)|0)+(s(d,g)|0)|0)+(b>>>16)|0;p=b&0xffff,d=m&0xffff;E=0;for(C=0;(C|0)<(r|0);C=C+4|0){U=S+C|0;v=i[e+C>>2]|0,g=v&0xffff,v=v>>>16;A=i[l+U>>2]|0;b=((s(p,g)|0)+(E&0xffff)|0)+(A&0xffff)|0;m=((s(p,v)|0)+(E>>>16)|0)+(A>>>16)|0;_=((s(d,g)|0)+(m&0xffff)|0)+(b>>>16)|0;E=((s(d,v)|0)+(_>>>16)|0)+(m>>>16)|0;A=_<<16|b&0xffff;i[l+U>>2]=A}U=S+C|0;A=i[l+U>>2]|0;b=((A&0xffff)+(E&0xffff)|0)+y|0;m=((A>>>16)+(E>>>16)|0)+(b>>>16)|0;i[l+U>>2]=m<<16|b&0xffff;y=m>>>16}o(r,l+r|0,c);h(r<<1);if(y|(u(e,r,c,r)|0)<=0){w(c,r,e,r,c,r)|0}}return{sreset:n,salloc:a,sfree:h,z:x,tst:l,neg:c,cmp:u,add:y,sub:w,mul:d,sqr:p,div:g,mredc:v}}function Pf(f,t){Of(f)||(f=new zf(f)),Of(t)||(t=new zf(t));var e=f.sign,r=t.sign;e<0&&(f=f.negate()),r<0&&(t=t.negate());var i=f.compare(t);if(i<0){var s=f;f=t,t=s,s=e,e=r,r=s}var n,a,h,o=Kf,x=Nf,c=t.bitLength,u=Nf,l=Kf,y=f.bitLength;for(n=f.divide(t);(a=n.remainder)!==Nf;)h=n.quotient,n=o.subtract(h.multiply(x).clamp(c)).clamp(c),o=x,x=n,n=u.subtract(h.multiply(l).clamp(y)).clamp(y),u=l,l=n,f=t,t=a,n=f.divide(t);if(e<0&&(x=x.negate()),r<0&&(l=l.negate()),i<0){s=x;x=l,l=s}return{gcd:t,x:x,y:l}}function Of(f){return f instanceof zf}Object.defineProperty(Zf,"allowWeak",{get:function(){return f._random_allow_weak},set:function(t){f._random_allow_weak=t}}),Object.defineProperty(Zf,"skipSystemRNGWarning",{get:function(){return f._random_skip_system_rng_warning},set:function(t){f._random_skip_system_rng_warning=t}}),Object.defineProperty(If,"allowWeak",{get:function(){return f._random_allow_weak},set:function(t){f._random_allow_weak=t}}),Object.defineProperty(If,"skipSystemRNGWarning",{get:function(){return f._random_skip_system_rng_warning},set:function(t){f._random_skip_system_rng_warning=t}}),Zf.seed=Tf,If.seed=Tf;var Bf,qf={Uint32Array:Uint32Array,Math:Math},Gf=new Uint32Array(1048576);void 0===qf.Math.imul?(qf.Math.imul=function(f,t){return f*t|0},Bf=Df(qf,null,Gf.buffer),delete qf.Math.imul):Bf=Df(qf,null,Gf.buffer);const Rf=new Uint32Array(0);class zf{static fromString(f){const t=e(f);return new zf(t)}static fromNumber(f){let t=Rf,e=0,r=0;var i=Math.abs(f);return i>4294967295?((t=new Uint32Array(2))[0]=0|i,t[1]=i/4294967296|0,e=52):i>0?((t=new Uint32Array(1))[0]=i,e=32):(t=Rf,e=0),r=f<0?-1:1,zf.fromConfig({limbs:t,bitLength:e,sign:r})}static fromArrayBuffer(f){return new zf(new Uint8Array(f))}static fromConfig(f){const t=new zf;return t.limbs=new Uint32Array(f.limbs),t.bitLength=f.bitLength,t.sign=f.sign,t}constructor(f){let t=Rf,e=0,r=0;if(void 0===f);else{if(!o(f))throw new TypeError("number is of unexpected type");for(var i=0;!f[i];i++);if(!(e=8*(f.length-i)))return Nf;t=new Uint32Array(e+31>>5);for(var s=f.length-4;s>=i;s-=4)t[f.length-4-s>>2]=f[s]<<24|f[s+1]<<16|f[s+2]<<8|f[s+3];i-s==3?t[t.length-1]=f[i]:i-s==2?t[t.length-1]=f[i]<<8|f[i+1]:i-s==1&&(t[t.length-1]=f[i]<<16|f[i+1]<<8|f[i+2]),r=1}this.limbs=t,this.bitLength=e,this.sign=r}toString(f){f=f||16;const t=this.limbs,e=this.bitLength;let r="";if(16!==f)throw new y("bad radix");for(var i=(e+31>>5)-1;i>=0;i--){var s=t[i].toString(16);r+="00000000".substr(s.length),r+=s}return(r=r.replace(/^0+/,"")).length||(r="0"),this.sign<0&&(r="-"+r),r}toBytes(){const f=this.bitLength,t=this.limbs;if(0===f)return new Uint8Array(0);const e=f+7>>3,r=new Uint8Array(e);for(let f=0;f>2]>>((3&i)<<3)}return r}valueOf(){const f=this.limbs,t=this.bitLength,e=this.sign;if(!e)return 0;if(t<=32)return e*(f[0]>>>0);if(t<=52)return e*(4294967296*(f[1]>>>0)+(f[0]>>>0));let r,i,s=0;for(r=f.length-1;r>=0;r--)if(0!==(i=f[r])){for(;0==(i<>>0):e*(1048576*((f[r]<>>32-s:0))>>>0)+((f[r-1]<1?f[r-2]>>>32-s:0))>>>12))*Math.pow(2,32*r-s-52)}clamp(f){const t=this.limbs;if(f>=this.bitLength)return this;const e=new zf;let r=f+31>>5,i=f%32;return e.limbs=new Uint32Array(t.subarray(0,r)),e.bitLength=f,e.sign=this.sign,i&&(e.limbs[r-1]&=-1>>>32-i),e}slice(f,t){if(!n(f))throw new TypeError("TODO");if(void 0!==t&&!n(t))throw new TypeError("TODO");const e=this.limbs,r=this.bitLength;if(f<0)throw new RangeError("TODO");if(f>=r)return Nf;(void 0===t||t>r-f)&&(t=r-f);const i=new zf;let s=f>>5,a=f+t+31>>5,h=t+31>>5,o=f%32,x=t%32;const c=new Uint32Array(h);if(o){for(var u=0;u>>o|e[s+u+1]<<32-o;c[u]=e[s+u]>>>o}else c.set(e.subarray(s,a));return x&&(c[h-1]&=-1>>>32-x),i.limbs=c,i.bitLength=t,i.sign=this.sign,i}negate(){const f=new zf;return f.limbs=this.limbs,f.bitLength=this.bitLength,f.sign=-1*this.sign,f}compare(f){var t=this.limbs,e=t.length,r=f.limbs,i=r.length;return this.signf.sign?1:(Gf.set(t,0),Gf.set(r,e),Bf.cmp(0,e<<2,e<<2,i<<2)*this.sign)}add(f){if(!this.sign)return f;if(!f.sign)return this;var t,e,r,i,s=this.bitLength,n=this.limbs,a=n.length,h=this.sign,o=f.bitLength,x=f.limbs,c=x.length,u=f.sign,l=new zf;e=(t=(s>o?s:o)+(h*u>0?1:0))+31>>5,Bf.sreset();var y=Bf.salloc(a<<2),w=Bf.salloc(c<<2),d=Bf.salloc(e<<2);return Bf.z(d-y+(e<<2),0,y),Gf.set(n,y>>2),Gf.set(x,w>>2),h*u>0?(Bf.add(y,a<<2,w,c<<2,d,e<<2),r=h):r=h>u?(i=Bf.sub(y,a<<2,w,c<<2,d,e<<2))?u:h:(i=Bf.sub(w,c<<2,y,a<<2,d,e<<2))?h:u,i&&Bf.neg(d,e<<2,d,e<<2),0===Bf.tst(d,e<<2)?Nf:(l.limbs=new Uint32Array(Gf.subarray(d>>2,(d>>2)+e)),l.bitLength=t,l.sign=r,l)}subtract(f){return this.add(f.negate())}square(){if(!this.sign)return Nf;var f,t,e=this.bitLength,r=this.limbs,i=r.length,s=new zf;t=(f=e<<1)+31>>5,Bf.sreset();var n=Bf.salloc(i<<2),a=Bf.salloc(t<<2);return Bf.z(a-n+(t<<2),0,n),Gf.set(r,n>>2),Bf.sqr(n,i<<2,a),s.limbs=new Uint32Array(Gf.subarray(a>>2,(a>>2)+t)),s.bitLength=f,s.sign=1,s}divide(f){var t,e,r=this.bitLength,i=this.limbs,s=i.length,n=f.bitLength,a=f.limbs,h=a.length,o=Nf,x=Nf;Bf.sreset();var c=Bf.salloc(s<<2),u=Bf.salloc(h<<2),l=Bf.salloc(s<<2);return Bf.z(l-c+(s<<2),0,c),Gf.set(i,c>>2),Gf.set(a,u>>2),Bf.div(c,s<<2,u,h<<2,l),(t=Bf.tst(l,s<<2)>>2)&&((o=new zf).limbs=new Uint32Array(Gf.subarray(l>>2,(l>>2)+t)),o.bitLength=r>2)&&((x=new zf).limbs=new Uint32Array(Gf.subarray(c>>2,(c>>2)+e)),x.bitLength=n>5,Bf.sreset();var x=Bf.salloc(s<<2),c=Bf.salloc(h<<2),u=Bf.salloc(e<<2);return Bf.z(u-x+(e<<2),0,x),Gf.set(i,x>>2),Gf.set(a,c>>2),Bf.mul(x,s<<2,c,h<<2,u,e<<2),o.limbs=new Uint32Array(Gf.subarray(u>>2,(u>>2)+e)),o.sign=this.sign*f.sign,o.bitLength=t,o}isMillerRabinProbablePrime(f){var t=zf.fromConfig(this),e=0;for(t.limbs[0]-=1;0===t.limbs[e>>5];)e+=32;for(;0==(t.limbs[e>>5]>>(31&e)&1);)e++;t=t.slice(e);for(var r=new Ff(this),i=this.subtract(Kf),s=zf.fromConfig(this),n=this.limbs.length-1;0===s.limbs[n];)n--;for(;--f>=0;){for(If(s.limbs),s.limbs[0]<2&&(s.limbs[0]+=2);s.compare(i)>=0;)s.limbs[n]>>>=1;var a=r.power(s,t);if(0!==a.compare(Kf)&&0!==a.compare(i)){for(var h=e;--h>0;){if(0===(a=a.square().divide(r).remainder).compare(Kf))return!1;if(0===a.compare(i))break}if(0===h)return!1}}return!0}isProbablePrime(f){f=f||80;var t=this.limbs,e=0;if(0==(1&t[0]))return!1;if(f<=1)return!0;var r=0,i=0,s=0;for(e=0;e>>=2;for(var a=t[e];a;)i+=3&a,i-=3&(a>>>=2),a>>>=2;for(var h=t[e];h;)s+=15&h,s-=15&(h>>>=4),h>>>=4}return!!(r%3&&i%5&&s%17)&&(f<=2||this.isMillerRabinProbablePrime(f>>>1))}}const Nf=zf.fromNumber(0),Kf=zf.fromNumber(1);class Ff extends zf{constructor(f){if(super(),this.limbs=f.limbs,this.bitLength=f.bitLength,this.sign=f.sign,this.valueOf()<1)throw new RangeError;if(this.bitLength<=32)return;let t;if(1&this.limbs[0]){{const f=1+(this.bitLength+31&-32),e=new Uint32Array(f+31>>5);e[e.length-1]=1,(t=new zf).sign=1,t.bitLength=f,t.limbs=e;const r=function(f,t){var e,r,i,s,n=f<0?-1:1,a=t<0?-1:1,h=1,o=0,x=0,c=1;for((s=(f*=n)<(t*=a))&&(i=f,f=t,t=i,i=n,n=a,a=i),e=f-(r=Math.floor(f/t))*t;e;)i=h-r*o,h=o,o=i,i=x-r*c,x=c,c=i,f=t,t=e,e=f-(r=Math.floor(f/t))*t;return o*=n,c*=a,s&&(i=o,o=c,c=i),{gcd:t,x:o,y:c}}(4294967296,this.limbs[0]).y;this.coefficient=r<0?-r:4294967296-r}this.comodulus=t,this.comodulusRemainder=t.divide(this).remainder,this.comodulusRemainderSquare=t.square().divide(this).remainder}}reduce(f){return f.bitLength<=32&&this.bitLength<=32?zf.fromNumber(f.valueOf()%this.valueOf()):f.compare(this)<0?f:f.divide(this).remainder}inverse(f){const t=Pf(this,f=this.reduce(f));return 1!==t.gcd.valueOf()?null:t.y.sign<0?t.y.add(this).clamp(this.bitLength):t.y}power(f,t){let e=0;for(let f=0;f>>=1}let r=8;t.bitLength<=4536&&(r=7),t.bitLength<=1736&&(r=6),t.bitLength<=630&&(r=5),t.bitLength<=210&&(r=4),t.bitLength<=60&&(r=3),t.bitLength<=12&&(r=2),e<=1<=0;f--){let e=t.limbs[f];for(let f=32;f>0;)if(2147483648&e){let t=e>>>32-r,i=r;for(;0==(1&t);)t>>>=1,i--;for(var h=s[t>>>1];t;)t>>>=1,a!==n&&(a=jf(a.square(),this));a=a!==n?jf(a.multiply(h),this):h,e<<=i,f-=i}else a!==n&&(a=jf(a.square(),this)),e<<=1,f--}return jf(a,this)}}function jf(f,t){const e=f.limbs,r=e.length,i=t.limbs,s=i.length,n=t.coefficient;Bf.sreset();const a=Bf.salloc(r<<2),h=Bf.salloc(s<<2),o=Bf.salloc(s<<2);Bf.z(o-a+(s<<2),0,a),Gf.set(e,a>>2),Gf.set(i,h>>2),Bf.mredc(a,r<<2,h,s<<2,n,o);const x=new zf;return x.limbs=new Uint32Array(Gf.subarray(o>>2,(o>>2)+s)),x.bitLength=t.bitLength,x.sign=1,x}function Vf(f){f=f||{},this.result=null;var t=f.key;if(void 0!==t){if(!(t instanceof Array))throw new TypeError("unexpected key type");var e=t.length;if(2!==e&&3!==e&&8!==e)throw new SyntaxError("unexpected key type");var r=[];r[0]=new Ff(new zf(t[0])),r[1]=new zf(t[1]),e>2&&(r[2]=new zf(t[2])),e>3&&(r[3]=new Ff(new zf(t[3])),r[4]=new Ff(new zf(t[4])),r[5]=new zf(t[5]),r[6]=new zf(t[6]),r[7]=new zf(t[7])),this.key=r}return this}function Wf(f){if(!this.key)throw new l("no key is associated with the instance");var t;if(a(f)&&(f=e(f)),h(f)&&(f=new Uint8Array(f)),o(f))t=new zf(f);else{if(!Of(f))throw new TypeError("unexpected data type");t=f}if(this.key[0].compare(t)<=0)throw new RangeError("data too large");var r=this.key[0],i=this.key[1],s=r.power(t,i).toBytes(),n=r.bitLength+7>>3;if(s.length3){for(var i=this.key[0],s=this.key[3],n=this.key[4],x=this.key[5],c=this.key[6],u=this.key[7],y=s.power(t,x),w=n.power(t,c),d=y.subtract(w);d.sign<0;)d=d.add(s);r=s.reduce(u.multiply(d)).multiply(n).add(w).clamp(i.bitLength).toBytes()}else{i=this.key[0];var p=this.key[2];r=i.power(t,p).toBytes()}var g=i.bitLength+7>>3;if(r.length>>24,i[1]=n>>>16&255,i[2]=n>>>8&255,i[3]=255&n;var a=r.subarray(n*e),h=this.hash.reset().process(f).process(i).finish().result;h.length>a.length&&(h=h.subarray(0,a.length)),a.set(h)}return r}const Xf={sha1:new Uint8Array([48,33,48,9,6,5,43,14,3,2,26,5,0,4,20]),sha256:new Uint8Array([48,49,48,13,6,9,96,134,72,1,101,3,4,2,1,5,0,4,32]),sha384:new Uint8Array([48,65,48,13,6,9,96,134,72,1,101,3,4,2,2,5,0,4,48]),sha512:new Uint8Array([48,81,48,13,6,9,96,134,72,1,101,3,4,2,3,5,0,4,64])};function Yf(f){var t=f.constructor.NAME,e=Xf[t];if(!e)throw new Error("Cannot get hash prefix for hash algorithm '"+t+"'");return e}var $f="undefined"!=typeof console?console:void 0;"undefined"==typeof location||!location.protocol.search(/https:|file:|chrome:|chrome-extension:|moz-extension:/)||void 0===$f||$f.warn("asmCrypto seems to be load from an insecure origin; this may cause to MitM-attack vulnerability. Consider using secure transport protocol."),f.string_to_bytes=e,f.hex_to_bytes=function(f){var t=f.length;1&t&&(f="0"+f,t++);for(var e=new Uint8Array(t>>1),r=0;r>1]=parseInt(f.substr(r,2),16);return e},f.base64_to_bytes=function(f){return e(atob(f))},f.bytes_to_string=r,f.bytes_to_hex=i,f.bytes_to_base64=s,f.IllegalStateError=l,f.IllegalArgumentError=y,f.SecurityError=w,f.AES_CBC=b,f.AES_CBC_Encrypt=class extends b{constructor(f,t,e,r,i){super(f,t,e,r,i)}reset(f){return this.AES_reset(f,null,!0)}process(f){return this.AES_Encrypt_process(f)}finish(f){return this.AES_Encrypt_finish(f)}},f.AES_CBC_Decrypt=class extends b{constructor(f,t,e,r,i){super(f,t,e,r,i)}reset(f){return this.AES_reset(f,null,!0)}process(f){return this.AES_Decrypt_process(f)}finish(f){return this.AES_Decrypt_finish(f)}},f.AES_GCM=_,f.AES_GCM_Encrypt=class extends _{constructor(f,t,e,r,i,s){super(f,t,e,r,i,s)}process(f){return this.AES_GCM_Encrypt_process(f)}finish(){return this.AES_GCM_Encrypt_finish()}},f.AES_GCM_Decrypt=class extends _{constructor(f,t,e,r,i,s){super(f,t,e,r,i,s)}process(f){return this.AES_GCM_Decrypt_process(f)}finish(){return this.AES_GCM_Decrypt_finish()}},f.SHA1=I,f.SHA256=R,f.HMAC_SHA1=W,f.HMAC_SHA256=$,f.PBKDF2=af,f.PBKDF2_HMAC_SHA1=hf,f.PBKDF2_HMAC_SHA256=yf,f.Random_seed=Tf,f.Random_getValues=If,f.Random_getNumber=Zf,f.BigNumber=zf,f.Modulus=Ff,f.RSA_OAEP=class{constructor(f){if(!(f=f||{}).hash)throw new SyntaxError("option 'hash' is required");if(!f.hash.HASH_SIZE)throw new SyntaxError("option 'hash' supplied doesn't seem to be a valid hash function");this.hash=f.hash,this.label=null,this.reset(f)}reset(f){var t=(f=f||{}).label;if(void 0!==t){if(h(t)||o(t))t=new Uint8Array(t);else{if(!a(t))throw new TypeError("unexpected label type");t=e(t)}this.label=t.length>0?t:null}else this.label=null;Vf.call(this,f)}encrypt(f){if(!this.key)throw new l("no key is associated with the instance");var t=Math.ceil(this.key[0].bitLength/8),r=this.hash.HASH_SIZE,i=f.byteLength||f.length||0,s=t-i-2*r-2;if(i>t-2*this.hash.HASH_SIZE-2)throw new y("data too large");var n=new Uint8Array(t),x=n.subarray(1,r+1),c=n.subarray(r+1);if(o(f))c.set(f,r+s+1);else if(h(f))c.set(new Uint8Array(f),r+s+1);else{if(!a(f))throw new TypeError("unexpected data type");c.set(e(f),r+s+1)}c.set(this.hash.reset().process(this.label||"").finish().result,0),c[r+s]=1,If(x);for(var u=Qf.call(this,x,c.length),w=0;w0&&If(u),h[s]=1,o.set(u),a.set(this.hash.reset().process(x).finish().result);for(var y=Qf.call(this,a,h.length),w=0;w>>d),Jf.call(this,n),this}verify(f,t){if(!this.key)throw new l("no key is associated with the instance");var e=this.key[0].bitLength,r=this.hash.HASH_SIZE,i=Math.ceil((e-1)/8),s=this.saltLength,n=i-s-r-2;Wf.call(this,f);var a=this.result;if(188!==a[i-1])throw new w("bad signature");var h=a.subarray(i-r-1,i-1),o=a.subarray(0,i-r-1),x=o.subarray(n+1),c=8*i-e+1;if(c%8&&a[0]>>>8-c)throw new w("bad signature");for(var u=Qf.call(this,h,o.length),y=0;y>>c),y=0;y>3;if(i>3;if(s=8.2.0" }, "devDependencies": { + "asmcrypto.js": "^0.22.0", "babel-core": "^6.26.0", "babel-loader": "^7.1.3", "babel-plugin-istanbul": "^4.1.5", @@ -74,6 +75,7 @@ "expose-loader": "^0.7.4", "extract-loader": "^1.0.2", "extract-text-webpack-plugin": "^3.0.2", + "fast-text-encoding": "^1.0.0", "file-loader": "^1.1.9", "fluent-intl-polyfill": "^0.1.0", "git-rev-sync": "^1.10.0", diff --git a/server/layout.js b/server/layout.js index 460a8e50..bc665e3a 100644 --- a/server/layout.js +++ b/server/layout.js @@ -69,6 +69,7 @@ module.exports = function(state, body = '') { + ${body} diff --git a/test/frontend/index.js b/test/frontend/index.js index fa37cc5e..c5906c65 100644 --- a/test/frontend/index.js +++ b/test/frontend/index.js @@ -7,7 +7,7 @@ function kv(f) { module.exports = function() { const files = fs.readdirSync(path.join(__dirname, 'tests')); - const code = files.map(kv).join(';\n'); + const code = "require('fast-text-encoding');\n" + files.map(kv).join(';\n'); return { code, dependencies: files.map(f => require.resolve('./tests/' + f)), diff --git a/test/frontend/routes.js b/test/frontend/routes.js index 3aa9649b..4641f724 100644 --- a/test/frontend/routes.js +++ b/test/frontend/routes.js @@ -29,6 +29,7 @@ module.exports = function(app) { }) + diff --git a/test/frontend/tests/crypto-tests.js b/test/frontend/tests/crypto-tests.js new file mode 100644 index 00000000..0b7f004e --- /dev/null +++ b/test/frontend/tests/crypto-tests.js @@ -0,0 +1,122 @@ +import assert from 'assert'; +import { arrayToB64, b64ToArray } from '../../../app/utils'; + +describe('webcrypto', function() { + it('can do it', async function() { + const encoder = new TextEncoder(); + const x = b64ToArray('SPIfAlwbnncIFw3hEHYihw'); + const a = await crypto.subtle.importKey('raw', x, 'PBKDF2', false, [ + 'deriveKey' + ]); + + const ad = await crypto.subtle.deriveKey( + { + name: 'PBKDF2', + salt: encoder.encode('metadata'), + iterations: 100, + hash: 'SHA-256' + }, + a, + { + name: 'AES-GCM', + length: 128 + }, + false, + ['encrypt', 'decrypt'] + ); + + const ae = await crypto.subtle.encrypt( + { + name: 'AES-GCM', + iv: new Uint8Array(12), + tagLength: 128 + }, + ad, + encoder.encode('hello world!') + ); + + assert.equal( + arrayToB64(new Uint8Array(ae)), + 'UXQQ4yVf55TRk9AZtz5QCwFofRvh-HdWJyxSCQ' + ); + + const ah = await crypto.subtle.deriveKey( + { + name: 'PBKDF2', + salt: encoder.encode('authentication'), + iterations: 100, + hash: 'SHA-256' + }, + a, + { + name: 'HMAC', + hash: { name: 'SHA-256' } + }, + true, + ['sign'] + ); + const ahx = await crypto.subtle.exportKey('raw', ah); + assert.equal( + arrayToB64(new Uint8Array(ahx)), + 'wxXDmHgmMgrcDVD8zbDLRl2yNa8jSAQgsaeIBZ4vueygpxzaTK6ZE_6X-XHvllBly6pSuFNbSxcve0ZHhVdcEA' + ); + // const jwk = await crypto.subtle.exportKey('jwk', ah) + // console.error(jwk) + const as = await crypto.subtle.sign( + { + name: 'HMAC' + }, + ah, + encoder.encode('test') + ); + assert.equal( + arrayToB64(new Uint8Array(as)), + 'AOi4HcoCJxQ4nUYxlmHB1rlcxQBn-zVjrSHz-VW7S-I' + ); + + const b = await crypto.subtle.importKey('raw', x, 'HKDF', false, [ + 'deriveKey' + ]); + const bd = await crypto.subtle.deriveKey( + { + name: 'HKDF', + salt: new Uint8Array(), + info: encoder.encode('encryption'), + hash: 'SHA-256' + }, + b, + { + name: 'AES-GCM', + length: 128 + }, + true, + ['encrypt', 'decrypt'] + ); + const bdx = await crypto.subtle.exportKey('raw', bd); + + assert.equal(arrayToB64(new Uint8Array(bdx)), 'g7okjWWO9yueDz16-owShQ'); + + const bh = await crypto.subtle.deriveKey( + { + name: 'HKDF', + salt: new Uint8Array(), + info: encoder.encode('authentication'), + hash: 'SHA-256' + }, + b, + { + name: 'HMAC', + hash: { name: 'SHA-256' } + }, + true, + ['sign'] + ); + + const bhx = await crypto.subtle.exportKey('raw', bh); + + assert.equal( + arrayToB64(new Uint8Array(bhx)), + 'TQOGtmQ8-ZfnWu6Iq-U1IAVBVREFuI17xqsW1shiC8eMCa-a5qeYTvoX3-5kCoCha8R59ycnPDnTz75clLBmbQ' + ); + }); +}); diff --git a/webpack.config.js b/webpack.config.js index c02f73f3..07e0112c 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -192,6 +192,7 @@ module.exports = { ], devServer: { compress: true, + host: '0.0.0.0', before: IS_DEV ? require('./server/dev') : undefined } };