passwords-sqnfa-web
Version:
This library implements the recommendations that apply to client-side password handling from NIST and OWASP. The purpose of this library is to provide an easy pluggable client-side password preprocessor.
2 lines • 57.1 kB
JavaScript
/*! For license information please see passwords-sqnfa-web.min.js.LICENSE.txt */
!function(n,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("PasswordsSqnfaWeb",[],t):"object"==typeof exports?exports.PasswordsSqnfaWeb=t():n.PasswordsSqnfaWeb=t()}(this,(function(){return function(){var n={418:function(n,t,e){var r,o;n=e.nmd(n),void 0===(o="function"==typeof(r=function(){"use strict";var t={},r=null;function o(t){if(n&&n.exports)try{return e(995).randomBytes(t)}catch(n){}try{var o;return(self.crypto||self.msCrypto).getRandomValues(o=new Uint32Array(t)),Array.prototype.slice.call(o)}catch(n){}if(!r)throw Error("Neither WebCryptoAPI nor a crypto module is available. Use bcrypt.setRandomFallback to set an alternative");return r(t)}try{o(1)}catch(n){}function i(n,t){for(var e=0,r=0,o=0,i=n.length;o<i;++o)n.charCodeAt(o)===t.charCodeAt(o)?++e:++r;return!(e<0)&&0===r}r=null,t.setRandomFallback=function(n){r=n},t.genSaltSync=function(n,t){if("number"!=typeof(n=n||p))throw Error("Illegal arguments: "+typeof n+", "+typeof t);n<4?n=4:n>31&&(n=31);var e=[];return e.push("$2a$"),n<10&&e.push("0"),e.push(n.toString()),e.push("$"),e.push(l(o(d),d)),e.join("")},t.genSalt=function(n,e,r){if("function"==typeof e&&(r=e,e=void 0),"function"==typeof n&&(r=n,n=void 0),void 0===n)n=p;else if("number"!=typeof n)throw Error("illegal arguments: "+typeof n);function o(e){u((function(){try{e(null,t.genSaltSync(n))}catch(n){e(n)}}))}if(!r)return new Promise((function(n,t){o((function(e,r){e?t(e):n(r)}))}));if("function"!=typeof r)throw Error("Illegal callback: "+typeof r);o(r)},t.hashSync=function(n,e){if(void 0===e&&(e=p),"number"==typeof e&&(e=t.genSaltSync(e)),"string"!=typeof n||"string"!=typeof e)throw Error("Illegal arguments: "+typeof n+", "+typeof e);return D(n,e)},t.hash=function(n,e,r,o){function i(r){"string"==typeof n&&"number"==typeof e?t.genSalt(e,(function(t,e){D(n,e,r,o)})):"string"==typeof n&&"string"==typeof e?D(n,e,r,o):u(r.bind(this,Error("Illegal arguments: "+typeof n+", "+typeof e)))}if(!r)return new Promise((function(n,t){i((function(e,r){e?t(e):n(r)}))}));if("function"!=typeof r)throw Error("Illegal callback: "+typeof r);i(r)},t.compareSync=function(n,e){if("string"!=typeof n||"string"!=typeof e)throw Error("Illegal arguments: "+typeof n+", "+typeof e);return 60===e.length&&i(t.hashSync(n,e.substr(0,e.length-31)),e)},t.compare=function(n,e,r,o){function a(r){"string"==typeof n&&"string"==typeof e?60===e.length?t.hash(n,e.substr(0,29),(function(n,t){n?r(n):r(null,i(t,e))}),o):u(r.bind(this,null,!1)):u(r.bind(this,Error("Illegal arguments: "+typeof n+", "+typeof e)))}if(!r)return new Promise((function(n,t){a((function(e,r){e?t(e):n(r)}))}));if("function"!=typeof r)throw Error("Illegal callback: "+typeof r);a(r)},t.getRounds=function(n){if("string"!=typeof n)throw Error("Illegal arguments: "+typeof n);return parseInt(n.split("$")[2],10)},t.getSalt=function(n){if("string"!=typeof n)throw Error("Illegal arguments: "+typeof n);if(60!==n.length)throw Error("Illegal hash length: "+n.length+" != 60");return n.substring(0,29)};var u="undefined"!=typeof process&&process&&"function"==typeof process.nextTick?"function"==typeof setImmediate?setImmediate:process.nextTick:setTimeout;var a="./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),s=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,1,54,55,56,57,58,59,60,61,62,63,-1,-1,-1,-1,-1,-1,-1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,-1,-1,-1,-1,-1,-1,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,-1,-1,-1,-1,-1],f=String.fromCharCode;function l(n,t){var e,r,o=0,i=[];if(t<=0||t>n.length)throw Error("Illegal len: "+t);for(;o<t;){if(e=255&n[o++],i.push(a[e>>2&63]),e=(3&e)<<4,o>=t){i.push(a[63&e]);break}if(e|=(r=255&n[o++])>>4&15,i.push(a[63&e]),e=(15&r)<<2,o>=t){i.push(a[63&e]);break}e|=(r=255&n[o++])>>6&3,i.push(a[63&e]),i.push(a[63&r])}return i.join("")}function c(n,t){var e,r,o,i,u,a=0,l=n.length,c=0,h=[];if(t<=0)throw Error("Illegal len: "+t);for(;a<l-1&&c<t&&(e=(u=n.charCodeAt(a++))<s.length?s[u]:-1,r=(u=n.charCodeAt(a++))<s.length?s[u]:-1,-1!=e&&-1!=r)&&(i=e<<2>>>0,i|=(48&r)>>4,h.push(f(i)),!(++c>=t||a>=l))&&-1!=(o=(u=n.charCodeAt(a++))<s.length?s[u]:-1)&&(i=(15&r)<<4>>>0,i|=(60&o)>>2,h.push(f(i)),!(++c>=t||a>=l));)i=(3&o)<<6>>>0,i|=(u=n.charCodeAt(a++))<s.length?s[u]:-1,h.push(f(i)),++c;var d=[];for(a=0;a<c;a++)d.push(h[a].charCodeAt(0));return d}var h=function(){var n={MAX_CODEPOINT:1114111,encodeUTF8:function(n,t){var e=null;for("number"==typeof n&&(e=n,n=function(){return null});null!==e||null!==(e=n());)e<128?t(127&e):e<2048?(t(e>>6&31|192),t(63&e|128)):e<65536?(t(e>>12&15|224),t(e>>6&63|128),t(63&e|128)):(t(e>>18&7|240),t(e>>12&63|128),t(e>>6&63|128),t(63&e|128)),e=null},decodeUTF8:function(n,t){for(var e,r,o,i,u=function(n){n=n.slice(0,n.indexOf(null));var t=Error(n.toString());throw t.name="TruncatedError",t.bytes=n,t};null!==(e=n());)if(0==(128&e))t(e);else if(192==(224&e))null===(r=n())&&u([e,r]),t((31&e)<<6|63&r);else if(224==(240&e))(null===(r=n())||null===(o=n()))&&u([e,r,o]),t((15&e)<<12|(63&r)<<6|63&o);else{if(240!=(248&e))throw RangeError("Illegal starting byte: "+e);(null===(r=n())||null===(o=n())||null===(i=n()))&&u([e,r,o,i]),t((7&e)<<18|(63&r)<<12|(63&o)<<6|63&i)}},UTF16toUTF8:function(n,t){for(var e,r=null;null!==(e=null!==r?r:n());)e>=55296&&e<=57343&&null!==(r=n())&&r>=56320&&r<=57343?(t(1024*(e-55296)+r-56320+65536),r=null):t(e);null!==r&&t(r)},UTF8toUTF16:function(n,t){var e=null;for("number"==typeof n&&(e=n,n=function(){return null});null!==e||null!==(e=n());)e<=65535?t(e):(t(55296+((e-=65536)>>10)),t(e%1024+56320)),e=null},encodeUTF16toUTF8:function(t,e){n.UTF16toUTF8(t,(function(t){n.encodeUTF8(t,e)}))},decodeUTF8toUTF16:function(t,e){n.decodeUTF8(t,(function(t){n.UTF8toUTF16(t,e)}))},calculateCodePoint:function(n){return n<128?1:n<2048?2:n<65536?3:4},calculateUTF8:function(t){for(var e,r=0;null!==(e=t());)r+=n.calculateCodePoint(e);return r},calculateUTF16asUTF8:function(t){var e=0,r=0;return n.UTF16toUTF8(t,(function(t){++e,r+=n.calculateCodePoint(t)})),[e,r]}};return n}();Date.now=Date.now||function(){return+new Date};var d=16,p=10,g=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],w=[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946,1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055,3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504,976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462],y=[1332899944,1700884034,1701343084,1684370003,1668446532,1869963892];function C(n,t,e,r){var o,i=n[t],u=n[t+1];return o=r[(i^=e[0])>>>24],o+=r[256|i>>16&255],o^=r[512|i>>8&255],o=r[(u^=(o+=r[768|255&i])^e[1])>>>24],o+=r[256|u>>16&255],o^=r[512|u>>8&255],o=r[(i^=(o+=r[768|255&u])^e[2])>>>24],o+=r[256|i>>16&255],o^=r[512|i>>8&255],o=r[(u^=(o+=r[768|255&i])^e[3])>>>24],o+=r[256|u>>16&255],o^=r[512|u>>8&255],o=r[(i^=(o+=r[768|255&u])^e[4])>>>24],o+=r[256|i>>16&255],o^=r[512|i>>8&255],o=r[(u^=(o+=r[768|255&i])^e[5])>>>24],o+=r[256|u>>16&255],o^=r[512|u>>8&255],o=r[(i^=(o+=r[768|255&u])^e[6])>>>24],o+=r[256|i>>16&255],o^=r[512|i>>8&255],o=r[(u^=(o+=r[768|255&i])^e[7])>>>24],o+=r[256|u>>16&255],o^=r[512|u>>8&255],o=r[(i^=(o+=r[768|255&u])^e[8])>>>24],o+=r[256|i>>16&255],o^=r[512|i>>8&255],o=r[(u^=(o+=r[768|255&i])^e[9])>>>24],o+=r[256|u>>16&255],o^=r[512|u>>8&255],o=r[(i^=(o+=r[768|255&u])^e[10])>>>24],o+=r[256|i>>16&255],o^=r[512|i>>8&255],o=r[(u^=(o+=r[768|255&i])^e[11])>>>24],o+=r[256|u>>16&255],o^=r[512|u>>8&255],o=r[(i^=(o+=r[768|255&u])^e[12])>>>24],o+=r[256|i>>16&255],o^=r[512|i>>8&255],o=r[(u^=(o+=r[768|255&i])^e[13])>>>24],o+=r[256|u>>16&255],o^=r[512|u>>8&255],o=r[(i^=(o+=r[768|255&u])^e[14])>>>24],o+=r[256|i>>16&255],o^=r[512|i>>8&255],o=r[(u^=(o+=r[768|255&i])^e[15])>>>24],o+=r[256|u>>16&255],o^=r[512|u>>8&255],i^=(o+=r[768|255&u])^e[16],n[t]=u^e[17],n[t+1]=i,n}function v(n,t){for(var e=0,r=0;e<4;++e)r=r<<8|255&n[t],t=(t+1)%n.length;return{key:r,offp:t}}function B(n,t,e){for(var r,o=0,i=[0,0],u=t.length,a=e.length,s=0;s<u;s++)o=(r=v(n,o)).offp,t[s]=t[s]^r.key;for(s=0;s<u;s+=2)i=C(i,0,t,e),t[s]=i[0],t[s+1]=i[1];for(s=0;s<a;s+=2)i=C(i,0,t,e),e[s]=i[0],e[s+1]=i[1]}function A(n,t,e,r,o){var i,a=y.slice(),s=a.length;if(e<4||e>31){if(i=Error("Illegal number of rounds (4-31): "+e),r)return void u(r.bind(this,i));throw i}if(t.length!==d){if(i=Error("Illegal salt length: "+t.length+" != "+d),r)return void u(r.bind(this,i));throw i}e=1<<e>>>0;var f,l,c,h=0;function p(){if(o&&o(h/e),!(h<e)){for(h=0;h<64;h++)for(c=0;c<s>>1;c++)C(a,c<<1,f,l);var i=[];for(h=0;h<s;h++)i.push((a[h]>>24&255)>>>0),i.push((a[h]>>16&255)>>>0),i.push((a[h]>>8&255)>>>0),i.push((255&a[h])>>>0);return r?void r(null,i):i}for(var d=Date.now();h<e&&(h+=1,B(n,f,l),B(t,f,l),!(Date.now()-d>100)););r&&u(p)}if(Int32Array?(f=new Int32Array(g),l=new Int32Array(w)):(f=g.slice(),l=w.slice()),function(n,t,e,r){for(var o,i=0,u=[0,0],a=e.length,s=r.length,f=0;f<a;f++)i=(o=v(t,i)).offp,e[f]=e[f]^o.key;for(i=0,f=0;f<a;f+=2)i=(o=v(n,i)).offp,u[0]^=o.key,i=(o=v(n,i)).offp,u[1]^=o.key,u=C(u,0,e,r),e[f]=u[0],e[f+1]=u[1];for(f=0;f<s;f+=2)i=(o=v(n,i)).offp,u[0]^=o.key,i=(o=v(n,i)).offp,u[1]^=o.key,u=C(u,0,e,r),r[f]=u[0],r[f+1]=u[1]}(t,n,f,l),void 0!==r)p();else for(var A;;)if(void 0!==(A=p()))return A||[]}function D(n,t,e,r){var o,i,a;if("string"!=typeof n||"string"!=typeof t){if(o=Error("Invalid string / salt: Not a string"),e)return void u(e.bind(this,o));throw o}if("$"!==t.charAt(0)||"2"!==t.charAt(1)){if(o=Error("Invalid salt version: "+t.substring(0,2)),e)return void u(e.bind(this,o));throw o}if("$"===t.charAt(2))i=String.fromCharCode(0),a=3;else{if("a"!==(i=t.charAt(2))&&"b"!==i&&"y"!==i||"$"!==t.charAt(3)){if(o=Error("Invalid salt revision: "+t.substring(2,4)),e)return void u(e.bind(this,o));throw o}a=4}if(t.charAt(a+2)>"$"){if(o=Error("Missing salt rounds"),e)return void u(e.bind(this,o));throw o}var s,f,p,g=10*parseInt(t.substring(a,a+1),10)+parseInt(t.substring(a+1,a+2),10),w=t.substring(a+3,a+25),C=(s=n+=i>="a"?"\0":"",f=[],p=0,h.encodeUTF16toUTF8((function(){return p>=s.length?null:s.charCodeAt(p++)}),(function(n){f.push(n)})),f),v=c(w,d);function B(n){var t=[];return t.push("$2"),i>="a"&&t.push(i),t.push("$"),g<10&&t.push("0"),t.push(g.toString()),t.push("$"),t.push(l(v,v.length)),t.push(l(n,4*y.length-1)),t.join("")}if(void 0===e)return B(A(C,v,g));A(C,v,g,(function(n,t){n?e(n,null):e(null,B(t))}),r)}return t.encodeBase64=l,t.decodeBase64=c,t})?r.apply(t,[]):r)||(n.exports=o)},887:function(n,t,e){var r;!function(){var o;function i(n){var t,e,r,o="",i=-1;if(n&&n.length)for(r=n.length;(i+=1)<r;)t=n.charCodeAt(i),e=i+1<r?n.charCodeAt(i+1):0,55296<=t&&t<=56319&&56320<=e&&e<=57343&&(t=65536+((1023&t)<<10)+(1023&e),i+=1),t<=127?o+=String.fromCharCode(t):t<=2047?o+=String.fromCharCode(192|t>>>6&31,128|63&t):t<=65535?o+=String.fromCharCode(224|t>>>12&15,128|t>>>6&63,128|63&t):t<=2097151&&(o+=String.fromCharCode(240|t>>>18&7,128|t>>>12&63,128|t>>>6&63,128|63&t));return o}function u(n,t){var e=(65535&n)+(65535&t);return(n>>16)+(t>>16)+(e>>16)<<16|65535&e}function a(n,t){return n<<t|n>>>32-t}function s(n,t){for(var e,r=t?"0123456789ABCDEF":"0123456789abcdef",o="",i=0,u=n.length;i<u;i+=1)e=n.charCodeAt(i),o+=r.charAt(e>>>4&15)+r.charAt(15&e);return o}function f(n){var t,e=32*n.length,r="";for(t=0;t<e;t+=8)r+=String.fromCharCode(n[t>>5]>>>24-t%32&255);return r}function l(n){var t,e=32*n.length,r="";for(t=0;t<e;t+=8)r+=String.fromCharCode(n[t>>5]>>>t%32&255);return r}function c(n){var t,e=8*n.length,r=Array(n.length>>2),o=r.length;for(t=0;t<o;t+=1)r[t]=0;for(t=0;t<e;t+=8)r[t>>5]|=(255&n.charCodeAt(t/8))<<t%32;return r}function h(n){var t,e=8*n.length,r=Array(n.length>>2),o=r.length;for(t=0;t<o;t+=1)r[t]=0;for(t=0;t<e;t+=8)r[t>>5]|=(255&n.charCodeAt(t/8))<<24-t%32;return r}function d(n,t){var e,r,o,i,u,a,s,f,l=t.length,c=Array();for(i=(a=Array(Math.ceil(n.length/2))).length,e=0;e<i;e+=1)a[e]=n.charCodeAt(2*e)<<8|n.charCodeAt(2*e+1);for(;a.length>0;){for(u=Array(),o=0,e=0;e<a.length;e+=1)o=(o<<16)+a[e],o-=(r=Math.floor(o/l))*l,(u.length>0||r>0)&&(u[u.length]=r);c[c.length]=o,a=u}for(s="",e=c.length-1;e>=0;e--)s+=t.charAt(c[e]);for(f=Math.ceil(8*n.length/(Math.log(t.length)/Math.log(2))),e=s.length;e<f;e+=1)s=t[0]+s;return s}function p(n,t){var e,r,o,i="",u=n.length;for(t=t||"=",e=0;e<u;e+=3)for(o=n.charCodeAt(e)<<16|(e+1<u?n.charCodeAt(e+1)<<8:0)|(e+2<u?n.charCodeAt(e+2):0),r=0;r<4;r+=1)8*e+6*r>8*n.length?i+=t:i+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(o>>>6*(3-r)&63);return i}o={VERSION:"1.0.6",Base64:function(){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t="=",e=!0;this.encode=function(r){var o,u,a,s="",f=r.length;for(t=t||"=",r=e?i(r):r,o=0;o<f;o+=3)for(a=r.charCodeAt(o)<<16|(o+1<f?r.charCodeAt(o+1)<<8:0)|(o+2<f?r.charCodeAt(o+2):0),u=0;u<4;u+=1)s+=8*o+6*u>8*f?t:n.charAt(a>>>6*(3-u)&63);return s},this.decode=function(r){var o,i,u,a,s,f,l,c,h="",d=[];if(!r)return r;o=c=0,r=r.replace(new RegExp("\\"+t,"gi"),"");do{i=(l=n.indexOf(r.charAt(o+=1))<<18|n.indexOf(r.charAt(o+=1))<<12|(s=n.indexOf(r.charAt(o+=1)))<<6|(f=n.indexOf(r.charAt(o+=1))))>>16&255,u=l>>8&255,a=255&l,d[c+=1]=64===s?String.fromCharCode(i):64===f?String.fromCharCode(i,u):String.fromCharCode(i,u,a)}while(o<r.length);return h=d.join(""),h=e?function(n){var t,e,r,o,i,u,a=[];if(t=e=r=o=i=0,n&&n.length)for(u=n.length,n+="";t<u;)e+=1,(r=n.charCodeAt(t))<128?(a[e]=String.fromCharCode(r),t+=1):r>191&&r<224?(o=n.charCodeAt(t+1),a[e]=String.fromCharCode((31&r)<<6|63&o),t+=2):(o=n.charCodeAt(t+1),i=n.charCodeAt(t+2),a[e]=String.fromCharCode((15&r)<<12|(63&o)<<6|63&i),t+=3);return a.join("")}(h):h,h},this.setPad=function(n){return t=n||t,this},this.setTab=function(t){return n=t||n,this},this.setUTF8=function(n){return"boolean"==typeof n&&(e=n),this}},CRC32:function(n){var t,e,r,o=0,u=0;for(n=i(n),t=["00000000 77073096 EE0E612C 990951BA 076DC419 706AF48F E963A535 9E6495A3 0EDB8832 ","79DCB8A4 E0D5E91E 97D2D988 09B64C2B 7EB17CBD E7B82D07 90BF1D91 1DB71064 6AB020F2 F3B97148 ","84BE41DE 1ADAD47D 6DDDE4EB F4D4B551 83D385C7 136C9856 646BA8C0 FD62F97A 8A65C9EC 14015C4F ","63066CD9 FA0F3D63 8D080DF5 3B6E20C8 4C69105E D56041E4 A2677172 3C03E4D1 4B04D447 D20D85FD ","A50AB56B 35B5A8FA 42B2986C DBBBC9D6 ACBCF940 32D86CE3 45DF5C75 DCD60DCF ABD13D59 26D930AC ","51DE003A C8D75180 BFD06116 21B4F4B5 56B3C423 CFBA9599 B8BDA50F 2802B89E 5F058808 C60CD9B2 ","B10BE924 2F6F7C87 58684C11 C1611DAB B6662D3D 76DC4190 01DB7106 98D220BC EFD5102A 71B18589 ","06B6B51F 9FBFE4A5 E8B8D433 7807C9A2 0F00F934 9609A88E E10E9818 7F6A0DBB 086D3D2D 91646C97 ","E6635C01 6B6B51F4 1C6C6162 856530D8 F262004E 6C0695ED 1B01A57B 8208F4C1 F50FC457 65B0D9C6 ","12B7E950 8BBEB8EA FCB9887C 62DD1DDF 15DA2D49 8CD37CF3 FBD44C65 4DB26158 3AB551CE A3BC0074 ","D4BB30E2 4ADFA541 3DD895D7 A4D1C46D D3D6F4FB 4369E96A 346ED9FC AD678846 DA60B8D0 44042D73 ","33031DE5 AA0A4C5F DD0D7CC9 5005713C 270241AA BE0B1010 C90C2086 5768B525 206F85B3 B966D409 ","CE61E49F 5EDEF90E 29D9C998 B0D09822 C7D7A8B4 59B33D17 2EB40D81 B7BD5C3B C0BA6CAD EDB88320 ","9ABFB3B6 03B6E20C 74B1D29A EAD54739 9DD277AF 04DB2615 73DC1683 E3630B12 94643B84 0D6D6A3E ","7A6A5AA8 E40ECF0B 9309FF9D 0A00AE27 7D079EB1 F00F9344 8708A3D2 1E01F268 6906C2FE F762575D ","806567CB 196C3671 6E6B06E7 FED41B76 89D32BE0 10DA7A5A 67DD4ACC F9B9DF6F 8EBEEFF9 17B7BE43 ","60B08ED5 D6D6A3E8 A1D1937E 38D8C2C4 4FDFF252 D1BB67F1 A6BC5767 3FB506DD 48B2364B D80D2BDA ","AF0A1B4C 36034AF6 41047A60 DF60EFC3 A867DF55 316E8EEF 4669BE79 CB61B38C BC66831A 256FD2A0 ","5268E236 CC0C7795 BB0B4703 220216B9 5505262F C5BA3BBE B2BD0B28 2BB45A92 5CB36A04 C2D7FFA7 ","B5D0CF31 2CD99E8B 5BDEAE1D 9B64C2B0 EC63F226 756AA39C 026D930A 9C0906A9 EB0E363F 72076785 ","05005713 95BF4A82 E2B87A14 7BB12BAE 0CB61B38 92D28E9B E5D5BE0D 7CDCEFB7 0BDBDF21 86D3D2D4 ","F1D4E242 68DDB3F8 1FDA836E 81BE16CD F6B9265B 6FB077E1 18B74777 88085AE6 FF0F6A70 66063BCA ","11010B5C 8F659EFF F862AE69 616BFFD3 166CCF45 A00AE278 D70DD2EE 4E048354 3903B3C2 A7672661 ","D06016F7 4969474D 3E6E77DB AED16A4A D9D65ADC 40DF0B66 37D83BF0 A9BCAE53 DEBB9EC5 47B2CF7F ","30B5FFE9 BDBDF21C CABAC28A 53B39330 24B4A3A6 BAD03605 CDD70693 54DE5729 23D967BF B3667A2E ","C4614AB8 5D681B02 2A6F2B94 B40BBE37 C30C8EA1 5A05DF1B 2D02EF8D"].join(""),o^=-1,e=0,r=n.length;e<r;e+=1)u=255&(o^n.charCodeAt(e)),o=o>>>8^"0x"+t.substr(9*u,8);return(-1^o)>>>0},MD5:function(n){var t=!(!n||"boolean"!=typeof n.uppercase)&&n.uppercase,e=n&&"string"==typeof n.pad?n.pad:"=",r=!n||"boolean"!=typeof n.utf8||n.utf8;function o(n){return l(h(c(n=r?i(n):n),8*n.length))}function f(n,t){var e,o,u,a,s;for(n=r?i(n):n,t=r?i(t):t,(e=c(n)).length>16&&(e=h(e,8*n.length)),o=Array(16),u=Array(16),s=0;s<16;s+=1)o[s]=909522486^e[s],u[s]=1549556828^e[s];return a=h(o.concat(c(t)),512+8*t.length),l(h(u.concat(a),640))}function h(n,t){var e,r,o,i,a,s=1732584193,f=-271733879,l=-1732584194,c=271733878;for(n[t>>5]|=128<<t%32,n[14+(t+64>>>9<<4)]=t,e=0;e<n.length;e+=16)r=s,o=f,i=l,a=c,s=w(s,f,l,c,n[e+0],7,-680876936),c=w(c,s,f,l,n[e+1],12,-389564586),l=w(l,c,s,f,n[e+2],17,606105819),f=w(f,l,c,s,n[e+3],22,-1044525330),s=w(s,f,l,c,n[e+4],7,-176418897),c=w(c,s,f,l,n[e+5],12,1200080426),l=w(l,c,s,f,n[e+6],17,-1473231341),f=w(f,l,c,s,n[e+7],22,-45705983),s=w(s,f,l,c,n[e+8],7,1770035416),c=w(c,s,f,l,n[e+9],12,-1958414417),l=w(l,c,s,f,n[e+10],17,-42063),f=w(f,l,c,s,n[e+11],22,-1990404162),s=w(s,f,l,c,n[e+12],7,1804603682),c=w(c,s,f,l,n[e+13],12,-40341101),l=w(l,c,s,f,n[e+14],17,-1502002290),s=y(s,f=w(f,l,c,s,n[e+15],22,1236535329),l,c,n[e+1],5,-165796510),c=y(c,s,f,l,n[e+6],9,-1069501632),l=y(l,c,s,f,n[e+11],14,643717713),f=y(f,l,c,s,n[e+0],20,-373897302),s=y(s,f,l,c,n[e+5],5,-701558691),c=y(c,s,f,l,n[e+10],9,38016083),l=y(l,c,s,f,n[e+15],14,-660478335),f=y(f,l,c,s,n[e+4],20,-405537848),s=y(s,f,l,c,n[e+9],5,568446438),c=y(c,s,f,l,n[e+14],9,-1019803690),l=y(l,c,s,f,n[e+3],14,-187363961),f=y(f,l,c,s,n[e+8],20,1163531501),s=y(s,f,l,c,n[e+13],5,-1444681467),c=y(c,s,f,l,n[e+2],9,-51403784),l=y(l,c,s,f,n[e+7],14,1735328473),s=C(s,f=y(f,l,c,s,n[e+12],20,-1926607734),l,c,n[e+5],4,-378558),c=C(c,s,f,l,n[e+8],11,-2022574463),l=C(l,c,s,f,n[e+11],16,1839030562),f=C(f,l,c,s,n[e+14],23,-35309556),s=C(s,f,l,c,n[e+1],4,-1530992060),c=C(c,s,f,l,n[e+4],11,1272893353),l=C(l,c,s,f,n[e+7],16,-155497632),f=C(f,l,c,s,n[e+10],23,-1094730640),s=C(s,f,l,c,n[e+13],4,681279174),c=C(c,s,f,l,n[e+0],11,-358537222),l=C(l,c,s,f,n[e+3],16,-722521979),f=C(f,l,c,s,n[e+6],23,76029189),s=C(s,f,l,c,n[e+9],4,-640364487),c=C(c,s,f,l,n[e+12],11,-421815835),l=C(l,c,s,f,n[e+15],16,530742520),s=v(s,f=C(f,l,c,s,n[e+2],23,-995338651),l,c,n[e+0],6,-198630844),c=v(c,s,f,l,n[e+7],10,1126891415),l=v(l,c,s,f,n[e+14],15,-1416354905),f=v(f,l,c,s,n[e+5],21,-57434055),s=v(s,f,l,c,n[e+12],6,1700485571),c=v(c,s,f,l,n[e+3],10,-1894986606),l=v(l,c,s,f,n[e+10],15,-1051523),f=v(f,l,c,s,n[e+1],21,-2054922799),s=v(s,f,l,c,n[e+8],6,1873313359),c=v(c,s,f,l,n[e+15],10,-30611744),l=v(l,c,s,f,n[e+6],15,-1560198380),f=v(f,l,c,s,n[e+13],21,1309151649),s=v(s,f,l,c,n[e+4],6,-145523070),c=v(c,s,f,l,n[e+11],10,-1120210379),l=v(l,c,s,f,n[e+2],15,718787259),f=v(f,l,c,s,n[e+9],21,-343485551),s=u(s,r),f=u(f,o),l=u(l,i),c=u(c,a);return Array(s,f,l,c)}function g(n,t,e,r,o,i){return u(a(u(u(t,n),u(r,i)),o),e)}function w(n,t,e,r,o,i,u){return g(t&e|~t&r,n,t,o,i,u)}function y(n,t,e,r,o,i,u){return g(t&r|e&~r,n,t,o,i,u)}function C(n,t,e,r,o,i,u){return g(t^e^r,n,t,o,i,u)}function v(n,t,e,r,o,i,u){return g(e^(t|~r),n,t,o,i,u)}this.hex=function(n){return s(o(n),t)},this.b64=function(n){return p(o(n),e)},this.any=function(n,t){return d(o(n),t)},this.raw=function(n){return o(n)},this.hex_hmac=function(n,e){return s(f(n,e),t)},this.b64_hmac=function(n,t){return p(f(n,t),e)},this.any_hmac=function(n,t,e){return d(f(n,t),e)},this.vm_test=function(){return"900150983cd24fb0d6963f7d28e17f72"===hex("abc").toLowerCase()},this.setUpperCase=function(n){return"boolean"==typeof n&&(t=n),this},this.setPad=function(n){return e=n||e,this},this.setUTF8=function(n){return"boolean"==typeof n&&(r=n),this}},SHA1:function(n){var t=!(!n||"boolean"!=typeof n.uppercase)&&n.uppercase,e=n&&"string"==typeof n.pad?n.pad:"=",r=!n||"boolean"!=typeof n.utf8||n.utf8;function o(n){return f(c(h(n=r?i(n):n),8*n.length))}function l(n,t){var e,o,u,a,s;for(n=r?i(n):n,t=r?i(t):t,(e=h(n)).length>16&&(e=c(e,8*n.length)),o=Array(16),u=Array(16),a=0;a<16;a+=1)o[a]=909522486^e[a],u[a]=1549556828^e[a];return s=c(o.concat(h(t)),512+8*t.length),f(c(u.concat(s),672))}function c(n,t){var e,r,o,i,s,f,l,c,h=Array(80),d=1732584193,p=-271733879,y=-1732584194,C=271733878,v=-1009589776;for(n[t>>5]|=128<<24-t%32,n[15+(t+64>>9<<4)]=t,e=0;e<n.length;e+=16){for(i=d,s=p,f=y,l=C,c=v,r=0;r<80;r+=1)h[r]=r<16?n[e+r]:a(h[r-3]^h[r-8]^h[r-14]^h[r-16],1),o=u(u(a(d,5),g(r,p,y,C)),u(u(v,h[r]),w(r))),v=C,C=y,y=a(p,30),p=d,d=o;d=u(d,i),p=u(p,s),y=u(y,f),C=u(C,l),v=u(v,c)}return Array(d,p,y,C,v)}function g(n,t,e,r){return n<20?t&e|~t&r:n<40?t^e^r:n<60?t&e|t&r|e&r:t^e^r}function w(n){return n<20?1518500249:n<40?1859775393:n<60?-1894007588:-899497514}this.hex=function(n){return s(o(n),t)},this.b64=function(n){return p(o(n),e)},this.any=function(n,t){return d(o(n),t)},this.raw=function(n){return o(n)},this.hex_hmac=function(n,t){return s(l(n,t))},this.b64_hmac=function(n,t){return p(l(n,t),e)},this.any_hmac=function(n,t,e){return d(l(n,t),e)},this.vm_test=function(){return"900150983cd24fb0d6963f7d28e17f72"===hex("abc").toLowerCase()},this.setUpperCase=function(n){return"boolean"==typeof n&&(t=n),this},this.setPad=function(n){return e=n||e,this},this.setUTF8=function(n){return"boolean"==typeof n&&(r=n),this}},SHA256:function(n){n&&"boolean"==typeof n.uppercase&&n.uppercase;var t,e=n&&"string"==typeof n.pad?n.pad:"=",r=!n||"boolean"!=typeof n.utf8||n.utf8;function o(n,t){return f(B(h(n=t?i(n):n),8*n.length))}function a(n,t){n=r?i(n):n,t=r?i(t):t;var e,o=0,u=h(n),a=Array(16),s=Array(16);for(u.length>16&&(u=B(u,8*n.length));o<16;o+=1)a[o]=909522486^u[o],s[o]=1549556828^u[o];return e=B(a.concat(h(t)),512+8*t.length),f(B(s.concat(e),768))}function l(n,t){return n>>>t|n<<32-t}function c(n,t){return n>>>t}function g(n,t,e){return n&t^~n&e}function w(n,t,e){return n&t^n&e^t&e}function y(n){return l(n,2)^l(n,13)^l(n,22)}function C(n){return l(n,6)^l(n,11)^l(n,25)}function v(n){return l(n,7)^l(n,18)^c(n,3)}function B(n,e){var r,o,i,a,s,f,h,d,p,B,A,D,b,E=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],F=new Array(64);for(n[e>>5]|=128<<24-e%32,n[15+(e+64>>9<<4)]=e,p=0;p<n.length;p+=16){for(r=E[0],o=E[1],i=E[2],a=E[3],s=E[4],f=E[5],h=E[6],d=E[7],B=0;B<64;B+=1)F[B]=B<16?n[B+p]:u(u(u(l(b=F[B-2],17)^l(b,19)^c(b,10),F[B-7]),v(F[B-15])),F[B-16]),A=u(u(u(u(d,C(s)),g(s,f,h)),t[B]),F[B]),D=u(y(r),w(r,o,i)),d=h,h=f,f=s,s=u(a,A),a=i,i=o,o=r,r=u(A,D);E[0]=u(r,E[0]),E[1]=u(o,E[1]),E[2]=u(i,E[2]),E[3]=u(a,E[3]),E[4]=u(s,E[4]),E[5]=u(f,E[5]),E[6]=u(h,E[6]),E[7]=u(d,E[7])}return E}this.hex=function(n){return s(o(n,r))},this.b64=function(n){return p(o(n,r),e)},this.any=function(n,t){return d(o(n,r),t)},this.raw=function(n){return o(n,r)},this.hex_hmac=function(n,t){return s(a(n,t))},this.b64_hmac=function(n,t){return p(a(n,t),e)},this.any_hmac=function(n,t,e){return d(a(n,t),e)},this.vm_test=function(){return"900150983cd24fb0d6963f7d28e17f72"===hex("abc").toLowerCase()},this.setUpperCase=function(n){return this},this.setPad=function(n){return e=n||e,this},this.setUTF8=function(n){return"boolean"==typeof n&&(r=n),this},t=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998]},SHA512:function(n){n&&"boolean"==typeof n.uppercase&&n.uppercase;var t,e=n&&"string"==typeof n.pad?n.pad:"=",r=!n||"boolean"!=typeof n.utf8||n.utf8;function o(n){return f(a(h(n=r?i(n):n),8*n.length))}function u(n,t){n=r?i(n):n,t=r?i(t):t;var e,o=0,u=h(n),s=Array(32),l=Array(32);for(u.length>32&&(u=a(u,8*n.length));o<32;o+=1)s[o]=909522486^u[o],l[o]=1549556828^u[o];return e=a(s.concat(h(t)),1024+8*t.length),f(a(l.concat(e),1536))}function a(n,e){var r,o,i,u=new Array(80),a=new Array(16),s=[new l(1779033703,-205731576),new l(-1150833019,-2067093701),new l(1013904242,-23791573),new l(-1521486534,1595750129),new l(1359893119,-1377402159),new l(-1694144372,725511199),new l(528734635,-79577749),new l(1541459225,327033209)],f=new l(0,0),h=new l(0,0),d=new l(0,0),p=new l(0,0),A=new l(0,0),D=new l(0,0),b=new l(0,0),E=new l(0,0),F=new l(0,0),m=new l(0,0),S=new l(0,0),x=new l(0,0),k=new l(0,0),_=new l(0,0),T=new l(0,0),H=new l(0,0),U=new l(0,0);for(void 0===t&&(t=[new l(1116352408,-685199838),new l(1899447441,602891725),new l(-1245643825,-330482897),new l(-373957723,-2121671748),new l(961987163,-213338824),new l(1508970993,-1241133031),new l(-1841331548,-1357295717),new l(-1424204075,-630357736),new l(-670586216,-1560083902),new l(310598401,1164996542),new l(607225278,1323610764),new l(1426881987,-704662302),new l(1925078388,-226784913),new l(-2132889090,991336113),new l(-1680079193,633803317),new l(-1046744716,-815192428),new l(-459576895,-1628353838),new l(-272742522,944711139),new l(264347078,-1953704523),new l(604807628,2007800933),new l(770255983,1495990901),new l(1249150122,1856431235),new l(1555081692,-1119749164),new l(1996064986,-2096016459),new l(-1740746414,-295247957),new l(-1473132947,766784016),new l(-1341970488,-1728372417),new l(-1084653625,-1091629340),new l(-958395405,1034457026),new l(-710438585,-1828018395),new l(113926993,-536640913),new l(338241895,168717936),new l(666307205,1188179964),new l(773529912,1546045734),new l(1294757372,1522805485),new l(1396182291,-1651133473),new l(1695183700,-1951439906),new l(1986661051,1014477480),new l(-2117940946,1206759142),new l(-1838011259,344077627),new l(-1564481375,1290863460),new l(-1474664885,-1136513023),new l(-1035236496,-789014639),new l(-949202525,106217008),new l(-778901479,-688958952),new l(-694614492,1432725776),new l(-200395387,1467031594),new l(275423344,851169720),new l(430227734,-1194143544),new l(506948616,1363258195),new l(659060556,-544281703),new l(883997877,-509917016),new l(958139571,-976659869),new l(1322822218,-482243893),new l(1537002063,2003034995),new l(1747873779,-692930397),new l(1955562222,1575990012),new l(2024104815,1125592928),new l(-2067236844,-1578062990),new l(-1933114872,442776044),new l(-1866530822,593698344),new l(-1538233109,-561857047),new l(-1090935817,-1295615723),new l(-965641998,-479046869),new l(-903397682,-366583396),new l(-779700025,566280711),new l(-354779690,-840897762),new l(-176337025,-294727304),new l(116418474,1914138554),new l(174292421,-1563912026),new l(289380356,-1090974290),new l(460393269,320620315),new l(685471733,587496836),new l(852142971,1086792851),new l(1017036298,365543100),new l(1126000580,-1676669620),new l(1288033470,-885112138),new l(1501505948,-60457430),new l(1607167915,987167468),new l(1816402316,1246189591)]),o=0;o<80;o+=1)u[o]=new l(0,0);for(n[e>>5]|=128<<24-(31&e),n[31+(e+128>>10<<5)]=e,i=n.length,o=0;o<i;o+=32){for(c(d,s[0]),c(p,s[1]),c(A,s[2]),c(D,s[3]),c(b,s[4]),c(E,s[5]),c(F,s[6]),c(m,s[7]),r=0;r<16;r+=1)u[r].h=n[o+2*r],u[r].l=n[o+2*r+1];for(r=16;r<80;r+=1)g(T,u[r-2],19),w(H,u[r-2],29),y(U,u[r-2],6),x.l=T.l^H.l^U.l,x.h=T.h^H.h^U.h,g(T,u[r-15],1),g(H,u[r-15],8),y(U,u[r-15],7),S.l=T.l^H.l^U.l,S.h=T.h^H.h^U.h,v(u[r],x,u[r-7],S,u[r-16]);for(r=0;r<80;r+=1)k.l=b.l&E.l^~b.l&F.l,k.h=b.h&E.h^~b.h&F.h,g(T,b,14),g(H,b,18),w(U,b,9),x.l=T.l^H.l^U.l,x.h=T.h^H.h^U.h,g(T,d,28),w(H,d,2),w(U,d,7),S.l=T.l^H.l^U.l,S.h=T.h^H.h^U.h,_.l=d.l&p.l^d.l&A.l^p.l&A.l,_.h=d.h&p.h^d.h&A.h^p.h&A.h,B(f,m,x,k,t[r],u[r]),C(h,S,_),c(m,F),c(F,E),c(E,b),C(b,D,f),c(D,A),c(A,p),c(p,d),C(d,f,h);C(s[0],s[0],d),C(s[1],s[1],p),C(s[2],s[2],A),C(s[3],s[3],D),C(s[4],s[4],b),C(s[5],s[5],E),C(s[6],s[6],F),C(s[7],s[7],m)}for(o=0;o<8;o+=1)a[2*o]=s[o].h,a[2*o+1]=s[o].l;return a}function l(n,t){this.h=n,this.l=t}function c(n,t){n.h=t.h,n.l=t.l}function g(n,t,e){n.l=t.l>>>e|t.h<<32-e,n.h=t.h>>>e|t.l<<32-e}function w(n,t,e){n.l=t.h>>>e|t.l<<32-e,n.h=t.l>>>e|t.h<<32-e}function y(n,t,e){n.l=t.l>>>e|t.h<<32-e,n.h=t.h>>>e}function C(n,t,e){var r=(65535&t.l)+(65535&e.l),o=(t.l>>>16)+(e.l>>>16)+(r>>>16),i=(65535&t.h)+(65535&e.h)+(o>>>16),u=(t.h>>>16)+(e.h>>>16)+(i>>>16);n.l=65535&r|o<<16,n.h=65535&i|u<<16}function v(n,t,e,r,o){var i=(65535&t.l)+(65535&e.l)+(65535&r.l)+(65535&o.l),u=(t.l>>>16)+(e.l>>>16)+(r.l>>>16)+(o.l>>>16)+(i>>>16),a=(65535&t.h)+(65535&e.h)+(65535&r.h)+(65535&o.h)+(u>>>16),s=(t.h>>>16)+(e.h>>>16)+(r.h>>>16)+(o.h>>>16)+(a>>>16);n.l=65535&i|u<<16,n.h=65535&a|s<<16}function B(n,t,e,r,o,i){var u=(65535&t.l)+(65535&e.l)+(65535&r.l)+(65535&o.l)+(65535&i.l),a=(t.l>>>16)+(e.l>>>16)+(r.l>>>16)+(o.l>>>16)+(i.l>>>16)+(u>>>16),s=(65535&t.h)+(65535&e.h)+(65535&r.h)+(65535&o.h)+(65535&i.h)+(a>>>16),f=(t.h>>>16)+(e.h>>>16)+(r.h>>>16)+(o.h>>>16)+(i.h>>>16)+(s>>>16);n.l=65535&u|a<<16,n.h=65535&s|f<<16}this.hex=function(n){return s(o(n))},this.b64=function(n){return p(o(n),e)},this.any=function(n,t){return d(o(n),t)},this.raw=function(n){return o(n)},this.hex_hmac=function(n,t){return s(u(n,t))},this.b64_hmac=function(n,t){return p(u(n,t),e)},this.any_hmac=function(n,t,e){return d(u(n,t),e)},this.vm_test=function(){return"900150983cd24fb0d6963f7d28e17f72"===hex("abc").toLowerCase()},this.setUpperCase=function(n){return this},this.setPad=function(n){return e=n||e,this},this.setUTF8=function(n){return"boolean"==typeof n&&(r=n),this}},RMD160:function(n){n&&"boolean"==typeof n.uppercase&&n.uppercase;var t=n&&"string"==typeof n.pad?n.pa:"=",e=!n||"boolean"!=typeof n.utf8||n.utf8,r=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],o=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],f=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],l=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11];function h(n){return w(y(c(n=e?i(n):n),8*n.length))}function g(n,t){n=e?i(n):n,t=e?i(t):t;var r,o,u=c(n),a=Array(16),s=Array(16);for(u.length>16&&(u=y(u,8*n.length)),r=0;r<16;r+=1)a[r]=909522486^u[r],s[r]=1549556828^u[r];return o=y(a.concat(c(t)),512+8*t.length),w(y(s.concat(o),672))}function w(n){var t,e="",r=32*n.length;for(t=0;t<r;t+=8)e+=String.fromCharCode(n[t>>5]>>>t%32&255);return e}function y(n,t){var e,i,s,c,h,d,p,g,w,y,A,D,b,E,F=1732584193,m=4023233417,S=2562383102,x=271733878,k=3285377520;for(n[t>>5]|=128<<t%32,n[14+(t+64>>>9<<4)]=t,c=n.length,s=0;s<c;s+=16){for(h=y=F,d=A=m,p=D=S,g=b=x,w=E=k,i=0;i<=79;i+=1)e=u(h,C(i,d,p,g)),e=u(e,n[s+r[i]]),e=u(e,v(i)),e=u(a(e,f[i]),w),h=w,w=g,g=a(p,10),p=d,d=e,e=u(y,C(79-i,A,D,b)),e=u(e,n[s+o[i]]),e=u(e,B(i)),e=u(a(e,l[i]),E),y=E,E=b,b=a(D,10),D=A,A=e;e=u(m,u(p,b)),m=u(S,u(g,E)),S=u(x,u(w,y)),x=u(k,u(h,A)),k=u(F,u(d,D)),F=e}return[F,m,S,x,k]}function C(n,t,e,r){return 0<=n&&n<=15?t^e^r:16<=n&&n<=31?t&e|~t&r:32<=n&&n<=47?(t|~e)^r:48<=n&&n<=63?t&r|e&~r:64<=n&&n<=79?t^(e|~r):"rmd160_f: j out of range"}function v(n){return 0<=n&&n<=15?0:16<=n&&n<=31?1518500249:32<=n&&n<=47?1859775393:48<=n&&n<=63?2400959708:64<=n&&n<=79?2840853838:"rmd160_K1: j out of range"}function B(n){return 0<=n&&n<=15?1352829926:16<=n&&n<=31?1548603684:32<=n&&n<=47?1836072691:48<=n&&n<=63?2053994217:64<=n&&n<=79?0:"rmd160_K2: j out of range"}this.hex=function(n){return s(h(n))},this.b64=function(n){return p(h(n),t)},this.any=function(n,t){return d(h(n),t)},this.raw=function(n){return h(n)},this.hex_hmac=function(n,t){return s(g(n,t))},this.b64_hmac=function(n,e){return p(g(n,e),t)},this.any_hmac=function(n,t,e){return d(g(n,t),e)},this.vm_test=function(){return"900150983cd24fb0d6963f7d28e17f72"===hex("abc").toLowerCase()},this.setUpperCase=function(n){return this},this.setPad=function(n){return void 0!==n&&(t=n),this},this.setUTF8=function(n){return"boolean"==typeof n&&(e=n),this}}},t&&"object"==typeof e.g&&e.g&&e.g===e.g.global&&e.g,void 0===(r=function(){return o}.call(t,e,t,n))||(n.exports=r)}()},179:function(n,t,e){"use strict";var r=this&&this.__awaiter||function(n,t,e,r){return new(e||(e=Promise))((function(o,i){function u(n){try{s(r.next(n))}catch(n){i(n)}}function a(n){try{s(r.throw(n))}catch(n){i(n)}}function s(n){var t;n.done?o(n.value):(t=n.value,t instanceof e?t:new e((function(n){n(t)}))).then(u,a)}s((r=r.apply(n,t||[])).next())}))},o=this&&this.__generator||function(n,t){var e,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(e)throw new TypeError("Generator is already executing.");for(;u;)try{if(e=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!((o=(o=u.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=t.call(n,u)}catch(n){i=[6,n],r=0}finally{e=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.BcryptHandler=t.BcryptConfiguration=void 0;var i=e(877),u=e(418),a=e(882),s=e(887);t.BcryptConfiguration=function(n){this.salt=n};var f=function(){function n(n){this.config=n,this.name="BcryptHandler"}return n.prototype.handle=function(n){return r(this,void 0,void 0,(function(){var t;return o(this,(function(e){switch(e.label){case 0:return(0,a.utf8Length)(n)>=72&&(n=(new s.SHA512).b64(n).substring(0,72)),[4,(0,u.hash)(n,this.config.salt)];case 1:return t=e.sent(),[2,i.Result.ok(t)]}}))}))},n}();t.BcryptHandler=f},589:function(n,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlackListHandler=t.BlackListConfiguration=void 0;var r=e(877);t.BlackListConfiguration=function(n,t){this.caseInsensitiveWords=n,this.ratioThreshold=t};var o=function(){function n(n){this.config=n,this.name="BlackListHandler"}return n.prototype.handleSync=function(n){var t=this,e=n.toLocaleUpperCase(),o=e.length;return this.config.caseInsensitiveWords.some((function(n){return e.indexOf(n.toLocaleUpperCase())>=0&&n.length/o>=t.config.ratioThreshold}))?r.Result.fail({handler:this.name,rule:"caseInsensitiveWords",expected:0,actual:1}):r.Result.ok(n)},n}();t.BlackListHandler=o},321:function(n,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmailBlackListHandler=t.EmailBlackListConfiguration=void 0;var r=e(877);t.EmailBlackListConfiguration=function(n,t,e){this.email=n,this.slidingWindow=t,this.minTokenLength=e};var o=function(){function n(n){this.name="EmailBlackListHandler",this.emailTokens=[],this.addEmailInformation(n.email,n.slidingWindow,n.minTokenLength)}return n.prototype.handleSync=function(n){var t=n.toLocaleUpperCase();return this.emailTokens.some((function(n){return t.indexOf(n.toLocaleUpperCase())>=0}))?r.Result.fail({handler:this.name,rule:"emailTokens",expected:0,actual:1}):r.Result.ok(n)},n.prototype.addEmailInformation=function(n,t,e){var r=this,o=new Set,i=n.split("@"),u=i[0].split(/[!#$%&'*+-/=?^_`{|]+/),a=i[1].split(/[!#$%&'*+-/=?^_`{|]+/),s=a.pop();if(u.forEach((function(n){return o.add(n)})),a.forEach((function(n){return o.add(n)})),t>0){u.forEach((function(n){r.addSlidingWindowWords(n,t,o)})),a.forEach((function(n){r.addSlidingWindowWords(n,t,o)})),this.addSlidingWindowWords(u.join(""),t,o),this.addSlidingWindowWords(a.join(""),t,o),this.addSlidingWindowWords(i[0],t,o);var f=i[1];s&&(f=f.substring(0,f.length-s.length-1)),this.addSlidingWindowWords(f,t,o)}o.forEach((function(n){return r.addToken(n,e)}))},n.prototype.addSlidingWindowWords=function(n,t,e){for(var r=n.length-t+1,o=0;o<r;o++)e.add(n.substring(o,o+t))},n.prototype.addToken=function(n,t){n.length>=t&&this.emailTokens.push(n)},n}();t.EmailBlackListHandler=o},260:function(n,t,e){"use strict";var r=this&&this.__awaiter||function(n,t,e,r){return new(e||(e=Promise))((function(o,i){function u(n){try{s(r.next(n))}catch(n){i(n)}}function a(n){try{s(r.throw(n))}catch(n){i(n)}}function s(n){var t;n.done?o(n.value):(t=n.value,t instanceof e?t:new e((function(n){n(t)}))).then(u,a)}s((r=r.apply(n,t||[])).next())}))},o=this&&this.__generator||function(n,t){var e,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(e)throw new TypeError("Generator is already executing.");for(;u;)try{if(e=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!((o=(o=u.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=t.call(n,u)}catch(n){i=[6,n],r=0}finally{e=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.HaveibeenpwnedHandler=t.HaveibeenpwnedConfiguration=void 0;var i=e(877),u=e(887);t.HaveibeenpwnedConfiguration=function(n){this.httpClient=n,this.pwnedPasswordsUrl="https://api.pwnedpasswords.com/range/"};var a=function(){function n(n)